@hashgraphonline/standards-sdk 0.1.180 → 0.1.182
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/browser/services/registry-broker/client/base-client.d.ts +8 -2
- package/dist/browser/services/registry-broker/client/base-client.d.ts.map +1 -1
- package/dist/browser/services/registry-broker/client/chat.d.ts +9 -3
- package/dist/browser/services/registry-broker/client/chat.d.ts.map +1 -1
- package/dist/browser/services/registry-broker/client/guard.d.ts.map +1 -1
- package/dist/browser/services/registry-broker/schemas.d.ts +471 -108
- package/dist/browser/services/registry-broker/schemas.d.ts.map +1 -1
- package/dist/browser/services/registry-broker/types.d.ts +25 -1
- package/dist/browser/services/registry-broker/types.d.ts.map +1 -1
- package/dist/browser/standards-sdk.browser.js +141 -3
- package/dist/browser/standards-sdk.browser.js.map +1 -1
- package/dist/browser-root/services/registry-broker/client/base-client.d.ts +8 -2
- package/dist/browser-root/services/registry-broker/client/base-client.d.ts.map +1 -1
- package/dist/browser-root/services/registry-broker/client/chat.d.ts +9 -3
- package/dist/browser-root/services/registry-broker/client/chat.d.ts.map +1 -1
- package/dist/browser-root/services/registry-broker/client/guard.d.ts.map +1 -1
- package/dist/browser-root/services/registry-broker/schemas.d.ts +471 -108
- package/dist/browser-root/services/registry-broker/schemas.d.ts.map +1 -1
- package/dist/browser-root/services/registry-broker/types.d.ts +25 -1
- package/dist/browser-root/services/registry-broker/types.d.ts.map +1 -1
- package/dist/browser-root/standards-sdk.root-browser.js +653 -110
- package/dist/browser-root/standards-sdk.root-browser.js.map +1 -1
- package/dist/cjs/services/registry-broker/client/base-client.d.ts +8 -2
- package/dist/cjs/services/registry-broker/client/base-client.d.ts.map +1 -1
- package/dist/cjs/services/registry-broker/client/chat.d.ts +9 -3
- package/dist/cjs/services/registry-broker/client/chat.d.ts.map +1 -1
- package/dist/cjs/services/registry-broker/client/guard.d.ts.map +1 -1
- package/dist/cjs/services/registry-broker/schemas.d.ts +587 -224
- package/dist/cjs/services/registry-broker/schemas.d.ts.map +1 -1
- package/dist/cjs/services/registry-broker/types.d.ts +25 -1
- package/dist/cjs/services/registry-broker/types.d.ts.map +1 -1
- package/dist/cjs/standards-sdk.cjs +1 -1
- package/dist/cjs/standards-sdk.cjs.map +1 -1
- package/dist/es/services/registry-broker/client/base-client.d.ts +8 -2
- package/dist/es/services/registry-broker/client/base-client.d.ts.map +1 -1
- package/dist/es/services/registry-broker/client/chat.d.ts +9 -3
- package/dist/es/services/registry-broker/client/chat.d.ts.map +1 -1
- package/dist/es/services/registry-broker/client/guard.d.ts.map +1 -1
- package/dist/es/services/registry-broker/schemas.d.ts +587 -224
- package/dist/es/services/registry-broker/schemas.d.ts.map +1 -1
- package/dist/es/services/registry-broker/types.d.ts +25 -1
- package/dist/es/services/registry-broker/types.d.ts.map +1 -1
- package/dist/es/standards-sdk.es.js +10 -7
- package/dist/es/standards-sdk.es.js.map +1 -1
- package/dist/es/standards-sdk.es104.js +1 -1
- package/dist/es/standards-sdk.es106.js +1 -1
- package/dist/es/standards-sdk.es108.js +1 -1
- package/dist/es/standards-sdk.es11.js +1 -1
- package/dist/es/standards-sdk.es110.js +1 -1
- package/dist/es/standards-sdk.es116.js +2 -2
- package/dist/es/standards-sdk.es12.js +1 -1
- package/dist/es/standards-sdk.es121.js +1 -1
- package/dist/es/standards-sdk.es127.js +2 -2
- package/dist/es/standards-sdk.es128.js +5 -5
- package/dist/es/standards-sdk.es138.js +1 -1
- package/dist/es/standards-sdk.es139.js +1 -1
- package/dist/es/standards-sdk.es140.js +5 -5
- package/dist/es/standards-sdk.es142.js +3 -3
- package/dist/es/standards-sdk.es143.js +1 -1
- package/dist/es/standards-sdk.es145.js +53 -15
- package/dist/es/standards-sdk.es145.js.map +1 -1
- package/dist/es/standards-sdk.es147.js +3 -3
- package/dist/es/standards-sdk.es148.js +4 -81
- package/dist/es/standards-sdk.es148.js.map +1 -1
- package/dist/es/standards-sdk.es149.js +71 -77
- package/dist/es/standards-sdk.es149.js.map +1 -1
- package/dist/es/standards-sdk.es150.js +80 -53
- package/dist/es/standards-sdk.es150.js.map +1 -1
- package/dist/es/standards-sdk.es151.js +53 -152
- package/dist/es/standards-sdk.es151.js.map +1 -1
- package/dist/es/standards-sdk.es152.js +159 -7
- package/dist/es/standards-sdk.es152.js.map +1 -1
- package/dist/es/standards-sdk.es153.js +7 -86
- package/dist/es/standards-sdk.es153.js.map +1 -1
- package/dist/es/standards-sdk.es154.js +64 -43
- package/dist/es/standards-sdk.es154.js.map +1 -1
- package/dist/es/standards-sdk.es155.js +65 -30
- package/dist/es/standards-sdk.es155.js.map +1 -1
- package/dist/es/standards-sdk.es156.js +30 -34
- package/dist/es/standards-sdk.es156.js.map +1 -1
- package/dist/es/standards-sdk.es157.js +34 -48
- package/dist/es/standards-sdk.es157.js.map +1 -1
- package/dist/es/standards-sdk.es158.js +48 -138
- package/dist/es/standards-sdk.es158.js.map +1 -1
- package/dist/es/standards-sdk.es159.js +133 -37
- package/dist/es/standards-sdk.es159.js.map +1 -1
- package/dist/es/standards-sdk.es16.js +2 -2
- package/dist/es/standards-sdk.es160.js +42 -2352
- package/dist/es/standards-sdk.es160.js.map +1 -1
- package/dist/es/standards-sdk.es161.js +2488 -12476
- package/dist/es/standards-sdk.es161.js.map +1 -1
- package/dist/es/standards-sdk.es162.js +12425 -615
- package/dist/es/standards-sdk.es162.js.map +1 -1
- package/dist/es/standards-sdk.es163.js +15 -54
- package/dist/es/standards-sdk.es163.js.map +1 -1
- package/dist/es/standards-sdk.es164.js +47 -102
- package/dist/es/standards-sdk.es164.js.map +1 -1
- package/dist/es/standards-sdk.es165.js +94 -64
- package/dist/es/standards-sdk.es165.js.map +1 -1
- package/dist/es/standards-sdk.es166.js +61 -180
- package/dist/es/standards-sdk.es166.js.map +1 -1
- package/dist/es/standards-sdk.es167.js +197 -14
- package/dist/es/standards-sdk.es167.js.map +1 -1
- package/dist/es/standards-sdk.es168.js +165 -66
- package/dist/es/standards-sdk.es168.js.map +1 -1
- package/dist/es/standards-sdk.es169.js +289 -139
- package/dist/es/standards-sdk.es169.js.map +1 -1
- package/dist/es/standards-sdk.es170.js +298 -274
- package/dist/es/standards-sdk.es170.js.map +1 -1
- package/dist/es/standards-sdk.es171.js +369 -262
- package/dist/es/standards-sdk.es171.js.map +1 -1
- package/dist/es/standards-sdk.es172.js +194 -316
- package/dist/es/standards-sdk.es172.js.map +1 -1
- package/dist/es/standards-sdk.es173.js +64 -319
- package/dist/es/standards-sdk.es173.js.map +1 -1
- package/dist/es/standards-sdk.es174.js +664 -68
- package/dist/es/standards-sdk.es174.js.map +1 -1
- package/dist/es/standards-sdk.es175.js +60 -126
- package/dist/es/standards-sdk.es175.js.map +1 -1
- package/dist/es/standards-sdk.es176.js +111 -303
- package/dist/es/standards-sdk.es176.js.map +1 -1
- package/dist/es/standards-sdk.es177.js +457 -222
- package/dist/es/standards-sdk.es177.js.map +1 -1
- package/dist/es/standards-sdk.es178.js +239 -176
- package/dist/es/standards-sdk.es178.js.map +1 -1
- package/dist/es/standards-sdk.es179.js +178 -101
- package/dist/es/standards-sdk.es179.js.map +1 -1
- package/dist/es/standards-sdk.es18.js +5 -5
- package/dist/es/standards-sdk.es180.js +75 -108
- package/dist/es/standards-sdk.es180.js.map +1 -1
- package/dist/es/standards-sdk.es181.js +116 -148
- package/dist/es/standards-sdk.es181.js.map +1 -1
- package/dist/es/standards-sdk.es182.js +143 -439
- package/dist/es/standards-sdk.es182.js.map +1 -1
- package/dist/es/standards-sdk.es183.js +661 -162
- package/dist/es/standards-sdk.es183.js.map +1 -1
- package/dist/es/standards-sdk.es184.js +156 -206
- package/dist/es/standards-sdk.es184.js.map +1 -1
- package/dist/es/standards-sdk.es185.js +219 -223
- package/dist/es/standards-sdk.es185.js.map +1 -1
- package/dist/es/standards-sdk.es186.js +242 -0
- package/dist/es/standards-sdk.es186.js.map +1 -0
- package/dist/es/standards-sdk.es19.js +3 -3
- package/dist/es/standards-sdk.es22.js +1 -1
- package/dist/es/standards-sdk.es27.js +5 -5
- package/dist/es/standards-sdk.es30.js +1 -1
- package/dist/es/standards-sdk.es31.js +1 -1
- package/dist/es/standards-sdk.es35.js +2 -2
- package/dist/es/standards-sdk.es36.js +3 -3
- package/dist/es/standards-sdk.es37.js +1 -1
- package/dist/es/standards-sdk.es4.js +1 -1
- package/dist/es/standards-sdk.es53.js +1 -1
- package/dist/es/standards-sdk.es56.js +1 -1
- package/dist/es/standards-sdk.es59.js +1 -1
- package/dist/es/standards-sdk.es60.js +1 -1
- package/dist/es/standards-sdk.es62.js +1 -1
- package/dist/es/standards-sdk.es63.js +2 -2
- package/dist/es/standards-sdk.es64.js +1 -1
- package/dist/es/standards-sdk.es65.js +1 -1
- package/dist/es/standards-sdk.es66.js +1 -1
- package/dist/es/standards-sdk.es67.js +3 -3
- package/dist/es/standards-sdk.es69.js +1 -1
- package/dist/es/standards-sdk.es7.js +1 -1
- package/dist/es/standards-sdk.es71.js +1 -1
- package/dist/es/standards-sdk.es72.js +2 -2
- package/dist/es/standards-sdk.es75.js +3 -3
- package/dist/es/standards-sdk.es76.js +1 -1
- package/dist/es/standards-sdk.es78.js +1 -1
- package/dist/es/standards-sdk.es83.js +1 -1
- package/dist/es/standards-sdk.es84.js +2 -2
- package/dist/es/standards-sdk.es85.js +1 -1
- package/dist/es/standards-sdk.es88.js +1 -1
- package/dist/es/standards-sdk.es90.js +1 -1
- package/dist/es/standards-sdk.es94.js +3 -3
- package/dist/es/standards-sdk.es98.js +1 -1
- package/dist/es/standards-sdk.es99.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proto } from "@hashgraph/proto";
|
|
2
|
-
import { hasTransactionType, parseKey } from "./standards-sdk.
|
|
2
|
+
import { hasTransactionType, parseKey } from "./standards-sdk.es173.js";
|
|
3
3
|
import { AccountId, Long, ScheduleId } from "@hashgraph/sdk";
|
|
4
4
|
class ScheduleParser {
|
|
5
5
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { HTSParser } from "./standards-sdk.es138.js";
|
|
2
|
-
import { HCSParser } from "./standards-sdk.
|
|
3
|
-
import { CryptoParser } from "./standards-sdk.
|
|
4
|
-
import { FileParser } from "./standards-sdk.
|
|
5
|
-
import { SCSParser } from "./standards-sdk.
|
|
2
|
+
import { HCSParser } from "./standards-sdk.es168.js";
|
|
3
|
+
import { CryptoParser } from "./standards-sdk.es170.js";
|
|
4
|
+
import { FileParser } from "./standards-sdk.es169.js";
|
|
5
|
+
import { SCSParser } from "./standards-sdk.es171.js";
|
|
6
6
|
import { ScheduleParser } from "./standards-sdk.es139.js";
|
|
7
|
-
import { UtilParser } from "./standards-sdk.
|
|
7
|
+
import { UtilParser } from "./standards-sdk.es172.js";
|
|
8
8
|
const transactionParserRegistry = {
|
|
9
9
|
TOKENCREATE: {
|
|
10
10
|
bodyField: "tokenCreation",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { InscriptionSDK } from "./standards-sdk.
|
|
1
|
+
import { InscriptionSDK } from "./standards-sdk.es162.js";
|
|
2
2
|
import { Logger } from "./standards-sdk.es123.js";
|
|
3
3
|
import { ProgressReporter } from "./standards-sdk.es126.js";
|
|
4
4
|
import { TransactionParser } from "./standards-sdk.es128.js";
|
|
5
5
|
import { isBrowser } from "./standards-sdk.es136.js";
|
|
6
|
-
import { optionalImport } from "./standards-sdk.
|
|
6
|
+
import { optionalImport } from "./standards-sdk.es165.js";
|
|
7
7
|
import { validateQuoteParameters, getCachedQuote, getOrCreateSDK, cacheQuote } from "./standards-sdk.es143.js";
|
|
8
8
|
import { HederaMirrorNode } from "./standards-sdk.es144.js";
|
|
9
9
|
import { sleep } from "./standards-sdk.es133.js";
|
|
10
|
-
import { computeInscriptionCostSummary } from "./standards-sdk.
|
|
10
|
+
import { computeInscriptionCostSummary } from "./standards-sdk.es175.js";
|
|
11
11
|
let nodeModules = {};
|
|
12
12
|
const normalizeTransactionId = (txId) => {
|
|
13
13
|
if (!txId.includes("@")) {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { Buffer } from "buffer";
|
|
2
2
|
import { secp256k1 } from "@noble/curves/secp256k1.js";
|
|
3
3
|
import { ZodError } from "zod";
|
|
4
|
-
import { agentFeedbackResponseSchema, agentFeedbackIndexResponseSchema, agentFeedbackEntriesIndexResponseSchema, agentFeedbackEligibilityResponseSchema, agentFeedbackSubmissionResponseSchema, registerAgentResponseSchema } from "./standards-sdk.
|
|
5
|
-
import { fetchHistorySnapshot, attachDecryptedHistory, registerConversationContextForEncryption, resolveDecryptionContext, decryptHistoryEntryFromContext } from "./standards-sdk.
|
|
6
|
-
import { createChatApi, createSession, startChat, startConversation, acceptConversation, compactHistory, fetchEncryptionStatus, postEncryptionHandshake, sendMessage, endSession, createPlaintextConversationHandle } from "./standards-sdk.
|
|
7
|
-
import { EncryptedChatManager } from "./standards-sdk.
|
|
8
|
-
import { generateEncryptionKeyPair, bootstrapEncryptionOptions, createEncryptionApi } from "./standards-sdk.
|
|
9
|
-
import { adapters, adaptersDetailed, adapterRegistryCategories, adapterRegistryAdapters, createAdapterRegistryCategory, submitAdapterRegistryAdapter, adapterRegistrySubmissionStatus } from "./standards-sdk.
|
|
4
|
+
import { agentFeedbackResponseSchema, agentFeedbackIndexResponseSchema, agentFeedbackEntriesIndexResponseSchema, agentFeedbackEligibilityResponseSchema, agentFeedbackSubmissionResponseSchema, registerAgentResponseSchema } from "./standards-sdk.es161.js";
|
|
5
|
+
import { fetchHistorySnapshot, attachDecryptedHistory, registerConversationContextForEncryption, resolveDecryptionContext, decryptHistoryEntryFromContext } from "./standards-sdk.es176.js";
|
|
6
|
+
import { createChatApi, createSession, checkChatReadiness, startChat, startConversation, acceptConversation, compactHistory, fetchEncryptionStatus, postEncryptionHandshake, sendMessage, retryMessage, cancelSession, endSession, createPlaintextConversationHandle } from "./standards-sdk.es177.js";
|
|
7
|
+
import { EncryptedChatManager } from "./standards-sdk.es178.js";
|
|
8
|
+
import { generateEncryptionKeyPair, bootstrapEncryptionOptions, createEncryptionApi } from "./standards-sdk.es179.js";
|
|
9
|
+
import { adapters, adaptersDetailed, adapterRegistryCategories, adapterRegistryAdapters, createAdapterRegistryCategory, submitAdapterRegistryAdapter, adapterRegistrySubmissionStatus } from "./standards-sdk.es180.js";
|
|
10
10
|
import { resolveUaid, getRegistrationQuote, updateAgent, getRegistrationProgress, waitForRegistrationCompletion, validateUaid, getUaidConnectionStatus, closeUaidConnection, dashboardStats } from "./standards-sdk.es147.js";
|
|
11
|
-
import { getRegisterStatus, registerOwnedMoltbookAgent, getVerificationStatus, createVerificationChallenge, getVerificationChallenge, verifyVerificationChallenge, getVerificationOwnership, verifySenderOwnership, verifyUaidDnsTxt, getVerificationDnsStatus } from "./standards-sdk.
|
|
12
|
-
import { getCreditsBalance, getCreditProviders, createHbarPurchaseIntent, purchaseCreditsWithHbar, getX402Minimums, purchaseCreditsWithX402, buyCreditsWithX402 } from "./standards-sdk.
|
|
13
|
-
import { getGuardSession, getGuardEntitlements, getGuardBillingBalance, getGuardFeed, getGuardOverview, getGuardTrustByHash, resolveGuardTrust, getGuardRevocations, fetchGuardAdvisories, fetchGuardPolicy, getGuardInventory, getGuardReceiptHistory, getGuardArtifactTimeline, getGuardInventoryDiff, exportGuardAbom, exportGuardArtifactAbom, exportGuardReceipts, getGuardDevices, getGuardAlertPreferences, updateGuardAlertPreferences, getGuardExceptions, getGuardWatchlist, lookupGuardWatchlist, getGuardPainSignals, getGuardAggregatedPainSignals, getGuardPreInstallVerdict, getGuardPreExecutionVerdict, addGuardWatchlistItem, removeGuardWatchlistItem, addGuardException, requestGuardException, removeGuardException, ingestGuardPainSignals, syncGuardReceipts, syncGuardInventory, submitGuardReceipts, getGuardTeamPolicyPack, updateGuardTeamPolicyPack } from "./standards-sdk.
|
|
14
|
-
import { createLedgerChallenge, verifyLedgerChallenge, authenticateWithLedger, authenticateWithLedgerCredentials } from "./standards-sdk.
|
|
15
|
-
import { search, delegate, stats, registries, getAdditionalRegistries, popularSearches, listProtocols, detectProtocol, registrySearchByNamespace, vectorSearch, searchStatus, websocketStats, metricsSummary, facets } from "./standards-sdk.
|
|
16
|
-
import { skillsConfig, listSkills, getSkillsCatalog, listSkillVersions, listMySkills, getMySkillsList, quoteSkillPublish, quoteSkillPublishPreview, publishSkill, getSkillPublishJob, getSkillOwnership, getRecommendedSkillVersion, setRecommendedSkillVersion, getSkillDeprecations, setSkillDeprecation, getSkillBadge, getSkillStatus, getSkillSecurityBreakdown, getSkillStatusByRepo, getSkillConversionSignalsByRepo, uploadSkillPreviewFromGithubOidc, getSkillPreview, getSkillPreviewByRepo, getSkillPreviewById, getSkillInstall, recordSkillInstallCopy, listSkillTags, listSkillCategories, resolveSkillMarkdown, resolveSkillManifest, getSkillVoteStatus, setSkillVote, requestSkillVerification, getSkillVerificationStatus, createSkillDomainProofChallenge, verifySkillDomainProof } from "./standards-sdk.
|
|
17
|
-
import { DEFAULT_BASE_URL, normaliseBaseUrl, normaliseHeaderName, isBrowserRuntime, DEFAULT_USER_AGENT, JSON_CONTENT_TYPE, serialiseAgentRegistrationRequest, MINIMUM_REGISTRATION_AUTO_TOP_UP_CREDITS, createAbortError, isJsonObject, DEFAULT_HISTORY_TOP_UP_HBAR } from "./standards-sdk.
|
|
11
|
+
import { getRegisterStatus, registerOwnedMoltbookAgent, getVerificationStatus, createVerificationChallenge, getVerificationChallenge, verifyVerificationChallenge, getVerificationOwnership, verifySenderOwnership, verifyUaidDnsTxt, getVerificationDnsStatus } from "./standards-sdk.es181.js";
|
|
12
|
+
import { getCreditsBalance, getCreditProviders, createHbarPurchaseIntent, purchaseCreditsWithHbar, getX402Minimums, purchaseCreditsWithX402, buyCreditsWithX402 } from "./standards-sdk.es182.js";
|
|
13
|
+
import { getGuardSession, getGuardEntitlements, getGuardBillingBalance, getGuardFeed, getGuardOverview, getGuardTrustByHash, resolveGuardTrust, getGuardRevocations, fetchGuardAdvisories, fetchGuardPolicy, getGuardInventory, getGuardReceiptHistory, getGuardArtifactTimeline, getGuardInventoryDiff, exportGuardAbom, exportGuardArtifactAbom, exportGuardReceipts, getGuardDevices, getGuardAlertPreferences, updateGuardAlertPreferences, getGuardExceptions, getGuardWatchlist, lookupGuardWatchlist, getGuardPainSignals, getGuardAggregatedPainSignals, getGuardPreInstallVerdict, getGuardPreExecutionVerdict, addGuardWatchlistItem, removeGuardWatchlistItem, addGuardException, requestGuardException, removeGuardException, ingestGuardPainSignals, syncGuardReceipts, syncGuardInventory, submitGuardReceipts, getGuardTeamPolicyPack, updateGuardTeamPolicyPack } from "./standards-sdk.es183.js";
|
|
14
|
+
import { createLedgerChallenge, verifyLedgerChallenge, authenticateWithLedger, authenticateWithLedgerCredentials } from "./standards-sdk.es184.js";
|
|
15
|
+
import { search, delegate, stats, registries, getAdditionalRegistries, popularSearches, listProtocols, detectProtocol, registrySearchByNamespace, vectorSearch, searchStatus, websocketStats, metricsSummary, facets } from "./standards-sdk.es185.js";
|
|
16
|
+
import { skillsConfig, listSkills, getSkillsCatalog, listSkillVersions, listMySkills, getMySkillsList, quoteSkillPublish, quoteSkillPublishPreview, publishSkill, getSkillPublishJob, getSkillOwnership, getRecommendedSkillVersion, setRecommendedSkillVersion, getSkillDeprecations, setSkillDeprecation, getSkillBadge, getSkillStatus, getSkillSecurityBreakdown, getSkillStatusByRepo, getSkillConversionSignalsByRepo, uploadSkillPreviewFromGithubOidc, getSkillPreview, getSkillPreviewByRepo, getSkillPreviewById, getSkillInstall, recordSkillInstallCopy, listSkillTags, listSkillCategories, resolveSkillMarkdown, resolveSkillManifest, getSkillVoteStatus, setSkillVote, requestSkillVerification, getSkillVerificationStatus, createSkillDomainProofChallenge, verifySkillDomainProof } from "./standards-sdk.es174.js";
|
|
17
|
+
import { DEFAULT_BASE_URL, normaliseBaseUrl, normaliseHeaderName, isBrowserRuntime, DEFAULT_USER_AGENT, JSON_CONTENT_TYPE, serialiseAgentRegistrationRequest, MINIMUM_REGISTRATION_AUTO_TOP_UP_CREDITS, createAbortError, isJsonObject, DEFAULT_HISTORY_TOP_UP_HBAR } from "./standards-sdk.es186.js";
|
|
18
18
|
import { RegistryBrokerError, RegistryBrokerParseError } from "./standards-sdk.es146.js";
|
|
19
|
-
import { optionalImportSync } from "./standards-sdk.
|
|
19
|
+
import { optionalImportSync } from "./standards-sdk.es165.js";
|
|
20
20
|
class RegistryBrokerClient {
|
|
21
21
|
constructor(options = {}) {
|
|
22
22
|
this.encryptionBootstrapPromise = null;
|
|
@@ -137,7 +137,7 @@ class RegistryBrokerClient {
|
|
|
137
137
|
const normalisedPath = path.startsWith("/") ? path : `/${path}`;
|
|
138
138
|
return `${this.baseUrl}${normalisedPath}`;
|
|
139
139
|
}
|
|
140
|
-
|
|
140
|
+
buildRequestInit(config) {
|
|
141
141
|
const headers = new Headers();
|
|
142
142
|
Object.entries(this.defaultHeaders).forEach(([key, value]) => {
|
|
143
143
|
headers.set(key, value);
|
|
@@ -163,6 +163,10 @@ class RegistryBrokerClient {
|
|
|
163
163
|
headers.set("content-type", "application/json");
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
+
return init;
|
|
167
|
+
}
|
|
168
|
+
async request(path, config) {
|
|
169
|
+
const init = this.buildRequestInit(config);
|
|
166
170
|
const response = await this.fetchImpl(this.buildUrl(path), init);
|
|
167
171
|
if (response.ok) {
|
|
168
172
|
return response;
|
|
@@ -174,6 +178,19 @@ class RegistryBrokerClient {
|
|
|
174
178
|
body: errorBody
|
|
175
179
|
});
|
|
176
180
|
}
|
|
181
|
+
async requestAbsolute(url, config) {
|
|
182
|
+
const init = this.buildRequestInit(config);
|
|
183
|
+
const response = await this.fetchImpl(url, init);
|
|
184
|
+
if (response.ok) {
|
|
185
|
+
return response;
|
|
186
|
+
}
|
|
187
|
+
const errorBody = await this.extractErrorBody(response);
|
|
188
|
+
throw new RegistryBrokerError("Registry broker request failed", {
|
|
189
|
+
status: response.status,
|
|
190
|
+
statusText: response.statusText,
|
|
191
|
+
body: errorBody
|
|
192
|
+
});
|
|
193
|
+
}
|
|
177
194
|
async requestJson(path, config) {
|
|
178
195
|
const response = await this.request(path, config);
|
|
179
196
|
const contentType = response.headers?.get("content-type") ?? "";
|
|
@@ -186,6 +203,18 @@ class RegistryBrokerClient {
|
|
|
186
203
|
}
|
|
187
204
|
return await response.json();
|
|
188
205
|
}
|
|
206
|
+
async requestAbsoluteJson(url, config) {
|
|
207
|
+
const response = await this.requestAbsolute(url, config);
|
|
208
|
+
const contentType = response.headers?.get("content-type") ?? "";
|
|
209
|
+
if (!JSON_CONTENT_TYPE.test(contentType)) {
|
|
210
|
+
const body = await response.text();
|
|
211
|
+
throw new RegistryBrokerParseError(
|
|
212
|
+
"Expected JSON response from registry broker",
|
|
213
|
+
body
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
return await response.json();
|
|
217
|
+
}
|
|
189
218
|
async getAgentFeedback(uaid, options = {}) {
|
|
190
219
|
const normalized = uaid.trim();
|
|
191
220
|
if (!normalized) {
|
|
@@ -820,6 +849,9 @@ class RegistryBrokerClient {
|
|
|
820
849
|
async createSession(payload, allowHistoryAutoTopUp = true) {
|
|
821
850
|
return createSession(this, payload, allowHistoryAutoTopUp);
|
|
822
851
|
}
|
|
852
|
+
async checkChatReadiness(payload) {
|
|
853
|
+
return checkChatReadiness(this, payload);
|
|
854
|
+
}
|
|
823
855
|
async startChat(options) {
|
|
824
856
|
return startChat(this, this.getEncryptedChatManager(), options);
|
|
825
857
|
}
|
|
@@ -845,6 +877,12 @@ class RegistryBrokerClient {
|
|
|
845
877
|
sendMessage(payload) {
|
|
846
878
|
return sendMessage(this, payload);
|
|
847
879
|
}
|
|
880
|
+
retryMessage(messageId, payload) {
|
|
881
|
+
return retryMessage(this, messageId, payload);
|
|
882
|
+
}
|
|
883
|
+
cancelSession(sessionId) {
|
|
884
|
+
return cancelSession(this, sessionId);
|
|
885
|
+
}
|
|
848
886
|
endSession(sessionId) {
|
|
849
887
|
return endSession(this, sessionId);
|
|
850
888
|
}
|