@wishknish/knishio-client-ts 0.7.7 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -0
- package/dist/index.cjs +262 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +72 -26
- package/dist/index.d.ts +72 -26
- package/dist/index.iife.js +264 -7
- package/dist/index.iife.js.map +1 -1
- package/dist/index.js +261 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/KnishIOClient.ts +151 -1
- package/src/core/Molecule.ts +6 -7
- package/src/index.ts +7 -0
- package/src/libraries/GraphQLClient.ts +15 -0
- package/src/libraries/crypto.ts +3 -2
- package/src/query/QueryEmbeddingStatus.ts +130 -0
- package/src/response/ResponseEmbeddingStatus.ts +107 -0
- package/src/response/ResponseProposeMolecule.ts +47 -0
package/dist/index.d.cts
CHANGED
|
@@ -866,6 +866,7 @@ declare class GraphQLClient implements GraphQLClient$1 {
|
|
|
866
866
|
getSocketUri(): string | null;
|
|
867
867
|
getUri(): string;
|
|
868
868
|
setUri(uri: string): void;
|
|
869
|
+
setSocketUri(socketUri: string): void;
|
|
869
870
|
socketDisconnect(): void;
|
|
870
871
|
}
|
|
871
872
|
|
|
@@ -1058,6 +1059,31 @@ declare class Mutation extends Query {
|
|
|
1058
1059
|
}): Promise<Response | null>;
|
|
1059
1060
|
}
|
|
1060
1061
|
|
|
1062
|
+
interface BaseExceptionOptions {
|
|
1063
|
+
message?: string;
|
|
1064
|
+
cause?: Error | unknown;
|
|
1065
|
+
context?: ErrorContext;
|
|
1066
|
+
code?: string;
|
|
1067
|
+
details?: Record<string, unknown>;
|
|
1068
|
+
}
|
|
1069
|
+
declare class BaseException extends Error {
|
|
1070
|
+
readonly type: KnishIOErrorType;
|
|
1071
|
+
readonly context: ErrorContext | null;
|
|
1072
|
+
readonly code: string | null;
|
|
1073
|
+
readonly details: Record<string, unknown> | null;
|
|
1074
|
+
readonly timestamp: number;
|
|
1075
|
+
constructor(type: KnishIOErrorType, message: string, options?: BaseExceptionOptions);
|
|
1076
|
+
getFullMessage(): string;
|
|
1077
|
+
toJSON(): Record<string, unknown>;
|
|
1078
|
+
isType(type: KnishIOErrorType): boolean;
|
|
1079
|
+
getContextValue(key: keyof ErrorContext): unknown;
|
|
1080
|
+
withContext(additionalContext: Partial<ErrorContext>): this;
|
|
1081
|
+
static create<T extends BaseException>(this: new (type: KnishIOErrorType, message: string, options?: BaseExceptionOptions) => T, type: KnishIOErrorType, message: string, options?: BaseExceptionOptions): T;
|
|
1082
|
+
static isKnishIOException(error: unknown): error is BaseException;
|
|
1083
|
+
static getErrorType(error: unknown): KnishIOErrorType | null;
|
|
1084
|
+
static fromError(error: Error | unknown, type?: KnishIOErrorType, additionalContext?: Partial<ErrorContext>): BaseException;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1061
1087
|
declare class ResponseProposeMolecule extends Response {
|
|
1062
1088
|
private $__clientMolecule;
|
|
1063
1089
|
constructor({ query, json }: {
|
|
@@ -1070,6 +1096,7 @@ declare class ResponseProposeMolecule extends Response {
|
|
|
1070
1096
|
success(): boolean;
|
|
1071
1097
|
status(): string;
|
|
1072
1098
|
reason(): string;
|
|
1099
|
+
toException(): BaseException | null;
|
|
1073
1100
|
payload(): any;
|
|
1074
1101
|
}
|
|
1075
1102
|
|
|
@@ -1097,6 +1124,8 @@ declare class KnishIOClient {
|
|
|
1097
1124
|
private $__remainderWallet;
|
|
1098
1125
|
private lastMoleculeQuery;
|
|
1099
1126
|
private abortControllers;
|
|
1127
|
+
private $__capabilityCache;
|
|
1128
|
+
private $__moleculeChain;
|
|
1100
1129
|
constructor(config: {
|
|
1101
1130
|
uri: string | string[];
|
|
1102
1131
|
cellSlug?: string | null;
|
|
@@ -1127,6 +1156,7 @@ declare class KnishIOClient {
|
|
|
1127
1156
|
reset(): void;
|
|
1128
1157
|
client(): GraphQLClient;
|
|
1129
1158
|
setUri(uri: string | string[]): void;
|
|
1159
|
+
setSocketUri(socketUri: string): void;
|
|
1130
1160
|
getUri(): string[];
|
|
1131
1161
|
setCellSlug(cellSlug: string | null): void;
|
|
1132
1162
|
getCellSlug(): string | null;
|
|
@@ -1146,7 +1176,9 @@ declare class KnishIOClient {
|
|
|
1146
1176
|
mutationClass: new (client: GraphQLClient, knishIOClient: KnishIOClient, molecule: Molecule) => T;
|
|
1147
1177
|
molecule?: Molecule | null;
|
|
1148
1178
|
}): Promise<T>;
|
|
1179
|
+
private withMoleculeLock;
|
|
1149
1180
|
executeQuery(query: Query | Mutation, variables?: Record<string, any> | null): Promise<Response | null>;
|
|
1181
|
+
private handlePositionDrift;
|
|
1150
1182
|
setSecret(secret: string): void;
|
|
1151
1183
|
setAuthToken(authToken: AuthToken): void;
|
|
1152
1184
|
getSourceWallet(): Promise<Wallet>;
|
|
@@ -1226,6 +1258,15 @@ declare class KnishIOClient {
|
|
|
1226
1258
|
keys?: string[] | null;
|
|
1227
1259
|
atomValues?: any[] | null;
|
|
1228
1260
|
}): Promise<Response>;
|
|
1261
|
+
hasQueryField(fieldName: string): Promise<boolean>;
|
|
1262
|
+
queryEmbeddingStatus({ metaType, metaId, instances }: {
|
|
1263
|
+
metaType?: string | null;
|
|
1264
|
+
metaId?: string | null;
|
|
1265
|
+
instances?: Array<{
|
|
1266
|
+
metaType: string;
|
|
1267
|
+
metaId: string;
|
|
1268
|
+
}> | null;
|
|
1269
|
+
}): Promise<Response | null>;
|
|
1229
1270
|
queryBatch({ batchId }: {
|
|
1230
1271
|
batchId: BatchId | string;
|
|
1231
1272
|
}): Promise<Response>;
|
|
@@ -1564,6 +1605,36 @@ declare class QueryMetaTypeViaAtom extends Query {
|
|
|
1564
1605
|
createResponse(json: any): ResponseMetaTypeViaAtom;
|
|
1565
1606
|
}
|
|
1566
1607
|
|
|
1608
|
+
interface EmbeddingStatusItem {
|
|
1609
|
+
metaType: string;
|
|
1610
|
+
metaId: string;
|
|
1611
|
+
state: 'PENDING' | 'STALE' | 'COMPLETE';
|
|
1612
|
+
totalMetas: number;
|
|
1613
|
+
embeddedCount: number;
|
|
1614
|
+
embeddedAt: number | null;
|
|
1615
|
+
model: string | null;
|
|
1616
|
+
}
|
|
1617
|
+
declare class ResponseEmbeddingStatus extends Response {
|
|
1618
|
+
constructor({ query, json }: {
|
|
1619
|
+
query: Query;
|
|
1620
|
+
json: any;
|
|
1621
|
+
});
|
|
1622
|
+
payload(): EmbeddingStatusItem[] | null;
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
declare class QueryEmbeddingStatus extends Query {
|
|
1626
|
+
constructor(graphQLClient: GraphQLClient$1, knishIOClient: KnishIOClient);
|
|
1627
|
+
static createVariables({ metaType, metaId, instances }?: {
|
|
1628
|
+
metaType?: string | null;
|
|
1629
|
+
metaId?: string | null;
|
|
1630
|
+
instances?: Array<{
|
|
1631
|
+
metaType: string;
|
|
1632
|
+
metaId: string;
|
|
1633
|
+
}> | null;
|
|
1634
|
+
}): Record<string, any>;
|
|
1635
|
+
createResponse(json: any): ResponseEmbeddingStatus;
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1567
1638
|
declare class ResponseContinuId extends Response {
|
|
1568
1639
|
constructor({ query, json }: {
|
|
1569
1640
|
query: Query;
|
|
@@ -1814,31 +1885,6 @@ declare function runExtendedCompatibilityTests(): {
|
|
|
1814
1885
|
}>;
|
|
1815
1886
|
};
|
|
1816
1887
|
|
|
1817
|
-
interface BaseExceptionOptions {
|
|
1818
|
-
message?: string;
|
|
1819
|
-
cause?: Error | unknown;
|
|
1820
|
-
context?: ErrorContext;
|
|
1821
|
-
code?: string;
|
|
1822
|
-
details?: Record<string, unknown>;
|
|
1823
|
-
}
|
|
1824
|
-
declare class BaseException extends Error {
|
|
1825
|
-
readonly type: KnishIOErrorType;
|
|
1826
|
-
readonly context: ErrorContext | null;
|
|
1827
|
-
readonly code: string | null;
|
|
1828
|
-
readonly details: Record<string, unknown> | null;
|
|
1829
|
-
readonly timestamp: number;
|
|
1830
|
-
constructor(type: KnishIOErrorType, message: string, options?: BaseExceptionOptions);
|
|
1831
|
-
getFullMessage(): string;
|
|
1832
|
-
toJSON(): Record<string, unknown>;
|
|
1833
|
-
isType(type: KnishIOErrorType): boolean;
|
|
1834
|
-
getContextValue(key: keyof ErrorContext): unknown;
|
|
1835
|
-
withContext(additionalContext: Partial<ErrorContext>): this;
|
|
1836
|
-
static create<T extends BaseException>(this: new (type: KnishIOErrorType, message: string, options?: BaseExceptionOptions) => T, type: KnishIOErrorType, message: string, options?: BaseExceptionOptions): T;
|
|
1837
|
-
static isKnishIOException(error: unknown): error is BaseException;
|
|
1838
|
-
static getErrorType(error: unknown): KnishIOErrorType | null;
|
|
1839
|
-
static fromError(error: Error | unknown, type?: KnishIOErrorType, additionalContext?: Partial<ErrorContext>): BaseException;
|
|
1840
|
-
}
|
|
1841
|
-
|
|
1842
1888
|
declare class AtomIndexException extends BaseException {
|
|
1843
1889
|
constructor(message?: string, options?: BaseExceptionOptions);
|
|
1844
1890
|
static indexConflict(index: number, existingIndex: number): AtomIndexException;
|
|
@@ -2068,4 +2114,4 @@ declare const KnishIO: {
|
|
|
2068
2114
|
};
|
|
2069
2115
|
};
|
|
2070
2116
|
|
|
2071
|
-
export { Atom, AtomIndexException, type AtomIsotope, AtomMeta, type AtomParams, AtomsMissingException, type AuthParams, AuthToken, type BalanceQueryParams, type Base17Hash, BaseException, type BaseResponse, type BundleHash, type BundleHashOptions, COMPATIBLE_SERVER_VERSIONS, CRYPTO_CONSTANTS, type CellSlug, CheckMolecule, type CreateTokenParams, DevUtils, Dot, EXCEPTION_CODES, EXCEPTION_TYPES, EXTENDED_COMPATIBILITY_TEST_VECTORS, ExceptionFactory, GraphQLClient, type GraphQLError, type GraphQLRequest, type GraphQLResponse, type HexString, InvalidResponseException, type KeyGenerationOptions, KnishIO, KnishIOClient, type KnishIOClientConfig, Meta$1 as Meta, type MetaData, type MetaId, type MetaQueryParams, type MetaType, type MolecularHash, MolecularHashMismatchException, Molecule, type MoleculeParams, Mutation, MutationAppendRequest, MutationCreateMeta, MutationCreateToken, MutationCreateWallet, type MutationOperation, MutationPeering, MutationProposeMolecule, MutationRequestAuthorization, MutationRequestTokens, MutationTransferTokens, PolicyMeta, type Position, type PositionGenerationOptions, Query, QueryAtom, QueryBalance, QueryBatch, QueryContinuId, QueryMetaType, QueryMetaTypeViaAtom, type QueryOperation, QueryWalletBundle, QueryWalletList, type RequestTokensParams, Response, ResponseAppendRequest, ResponseAtom, ResponseBalance, ResponseContinuId, ResponseCreateMeta, ResponseCreateToken, ResponseCreateWallet, ResponseMetaType, ResponseMetaTypeViaAtom, ResponsePeering, ResponseProposeMolecule, ResponseRequestAuthorization, ResponseRequestTokens, ResponseTransferTokens, ResponseWalletBundle, ResponseWalletList, type SDKConfig, SDK_INFO, SDK_NAME, SDK_VERSION, type SHAKE256Options, type SecretGenerationOptions, SignatureMismatchException, type SignatureOptions, type TokenSlug, TokenUnit, TransferBalanceException, type TransferParams, type ValidationResult$1 as ValidationResult, type VerificationOptions, Wallet, type WalletAddress, WalletCredentialException, type WalletParams, type WalletQueryParams, base64ToHex, bufferToHexString, capitalize, charsetBaseConvert, chunkArray, chunkSubstr, configureSDK, convertToBase17, createBundleHash, createMolecularHash, createPosition, createTokenSlug, createWalletAddress, deepCloning, diff, enumerateMolecularHash, generateBatchId, generateBundleHash, generateOTSSignature, generatePosition, generateSecret, generateWalletAddress, generateWalletKey, getSDKConfig, hexStringToBuffer, hexToBase64, intersect, isAtomIsotope, isBundleHash, isHex, isHexString, isMolecularHash, isNumeric, isPosition, isWalletAddress, normalizeMolecularHash, randomString, runCompatibilityTests, runExtendedCompatibilityTests, shake256, toCamelCase, toSnakeCase, truncate, validateBundleHash, validateMolecularHashForSignature, validateOTSSignature, validatePosition, validateSecret, validateWalletAddress, verifyOTSSignature };
|
|
2117
|
+
export { Atom, AtomIndexException, type AtomIsotope, AtomMeta, type AtomParams, AtomsMissingException, type AuthParams, AuthToken, type BalanceQueryParams, type Base17Hash, BaseException, type BaseResponse, type BundleHash, type BundleHashOptions, COMPATIBLE_SERVER_VERSIONS, CRYPTO_CONSTANTS, type CellSlug, CheckMolecule, type CreateTokenParams, DevUtils, Dot, EXCEPTION_CODES, EXCEPTION_TYPES, EXTENDED_COMPATIBILITY_TEST_VECTORS, type EmbeddingStatusItem, ExceptionFactory, GraphQLClient, type GraphQLError, type GraphQLRequest, type GraphQLResponse, type HexString, InvalidResponseException, type KeyGenerationOptions, KnishIO, KnishIOClient, type KnishIOClientConfig, Meta$1 as Meta, type MetaData, type MetaId, type MetaQueryParams, type MetaType, type MolecularHash, MolecularHashMismatchException, Molecule, type MoleculeParams, Mutation, MutationAppendRequest, MutationCreateMeta, MutationCreateToken, MutationCreateWallet, type MutationOperation, MutationPeering, MutationProposeMolecule, MutationRequestAuthorization, MutationRequestTokens, MutationTransferTokens, PolicyMeta, type Position, type PositionGenerationOptions, Query, QueryAtom, QueryBalance, QueryBatch, QueryContinuId, QueryEmbeddingStatus, QueryMetaType, QueryMetaTypeViaAtom, type QueryOperation, QueryWalletBundle, QueryWalletList, type RequestTokensParams, Response, ResponseAppendRequest, ResponseAtom, ResponseBalance, ResponseContinuId, ResponseCreateMeta, ResponseCreateToken, ResponseCreateWallet, ResponseEmbeddingStatus, ResponseMetaType, ResponseMetaTypeViaAtom, ResponsePeering, ResponseProposeMolecule, ResponseRequestAuthorization, ResponseRequestTokens, ResponseTransferTokens, ResponseWalletBundle, ResponseWalletList, type SDKConfig, SDK_INFO, SDK_NAME, SDK_VERSION, type SHAKE256Options, type SecretGenerationOptions, SignatureMismatchException, type SignatureOptions, type TokenSlug, TokenUnit, TransferBalanceException, type TransferParams, type ValidationResult$1 as ValidationResult, type VerificationOptions, Wallet, type WalletAddress, WalletCredentialException, type WalletParams, type WalletQueryParams, base64ToHex, bufferToHexString, capitalize, charsetBaseConvert, chunkArray, chunkSubstr, configureSDK, convertToBase17, createBundleHash, createMolecularHash, createPosition, createTokenSlug, createWalletAddress, deepCloning, diff, enumerateMolecularHash, generateBatchId, generateBundleHash, generateOTSSignature, generatePosition, generateSecret, generateWalletAddress, generateWalletKey, getSDKConfig, hexStringToBuffer, hexToBase64, intersect, isAtomIsotope, isBundleHash, isHex, isHexString, isMolecularHash, isNumeric, isPosition, isWalletAddress, normalizeMolecularHash, randomString, runCompatibilityTests, runExtendedCompatibilityTests, shake256, toCamelCase, toSnakeCase, truncate, validateBundleHash, validateMolecularHashForSignature, validateOTSSignature, validatePosition, validateSecret, validateWalletAddress, verifyOTSSignature };
|
package/dist/index.d.ts
CHANGED
|
@@ -866,6 +866,7 @@ declare class GraphQLClient implements GraphQLClient$1 {
|
|
|
866
866
|
getSocketUri(): string | null;
|
|
867
867
|
getUri(): string;
|
|
868
868
|
setUri(uri: string): void;
|
|
869
|
+
setSocketUri(socketUri: string): void;
|
|
869
870
|
socketDisconnect(): void;
|
|
870
871
|
}
|
|
871
872
|
|
|
@@ -1058,6 +1059,31 @@ declare class Mutation extends Query {
|
|
|
1058
1059
|
}): Promise<Response | null>;
|
|
1059
1060
|
}
|
|
1060
1061
|
|
|
1062
|
+
interface BaseExceptionOptions {
|
|
1063
|
+
message?: string;
|
|
1064
|
+
cause?: Error | unknown;
|
|
1065
|
+
context?: ErrorContext;
|
|
1066
|
+
code?: string;
|
|
1067
|
+
details?: Record<string, unknown>;
|
|
1068
|
+
}
|
|
1069
|
+
declare class BaseException extends Error {
|
|
1070
|
+
readonly type: KnishIOErrorType;
|
|
1071
|
+
readonly context: ErrorContext | null;
|
|
1072
|
+
readonly code: string | null;
|
|
1073
|
+
readonly details: Record<string, unknown> | null;
|
|
1074
|
+
readonly timestamp: number;
|
|
1075
|
+
constructor(type: KnishIOErrorType, message: string, options?: BaseExceptionOptions);
|
|
1076
|
+
getFullMessage(): string;
|
|
1077
|
+
toJSON(): Record<string, unknown>;
|
|
1078
|
+
isType(type: KnishIOErrorType): boolean;
|
|
1079
|
+
getContextValue(key: keyof ErrorContext): unknown;
|
|
1080
|
+
withContext(additionalContext: Partial<ErrorContext>): this;
|
|
1081
|
+
static create<T extends BaseException>(this: new (type: KnishIOErrorType, message: string, options?: BaseExceptionOptions) => T, type: KnishIOErrorType, message: string, options?: BaseExceptionOptions): T;
|
|
1082
|
+
static isKnishIOException(error: unknown): error is BaseException;
|
|
1083
|
+
static getErrorType(error: unknown): KnishIOErrorType | null;
|
|
1084
|
+
static fromError(error: Error | unknown, type?: KnishIOErrorType, additionalContext?: Partial<ErrorContext>): BaseException;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1061
1087
|
declare class ResponseProposeMolecule extends Response {
|
|
1062
1088
|
private $__clientMolecule;
|
|
1063
1089
|
constructor({ query, json }: {
|
|
@@ -1070,6 +1096,7 @@ declare class ResponseProposeMolecule extends Response {
|
|
|
1070
1096
|
success(): boolean;
|
|
1071
1097
|
status(): string;
|
|
1072
1098
|
reason(): string;
|
|
1099
|
+
toException(): BaseException | null;
|
|
1073
1100
|
payload(): any;
|
|
1074
1101
|
}
|
|
1075
1102
|
|
|
@@ -1097,6 +1124,8 @@ declare class KnishIOClient {
|
|
|
1097
1124
|
private $__remainderWallet;
|
|
1098
1125
|
private lastMoleculeQuery;
|
|
1099
1126
|
private abortControllers;
|
|
1127
|
+
private $__capabilityCache;
|
|
1128
|
+
private $__moleculeChain;
|
|
1100
1129
|
constructor(config: {
|
|
1101
1130
|
uri: string | string[];
|
|
1102
1131
|
cellSlug?: string | null;
|
|
@@ -1127,6 +1156,7 @@ declare class KnishIOClient {
|
|
|
1127
1156
|
reset(): void;
|
|
1128
1157
|
client(): GraphQLClient;
|
|
1129
1158
|
setUri(uri: string | string[]): void;
|
|
1159
|
+
setSocketUri(socketUri: string): void;
|
|
1130
1160
|
getUri(): string[];
|
|
1131
1161
|
setCellSlug(cellSlug: string | null): void;
|
|
1132
1162
|
getCellSlug(): string | null;
|
|
@@ -1146,7 +1176,9 @@ declare class KnishIOClient {
|
|
|
1146
1176
|
mutationClass: new (client: GraphQLClient, knishIOClient: KnishIOClient, molecule: Molecule) => T;
|
|
1147
1177
|
molecule?: Molecule | null;
|
|
1148
1178
|
}): Promise<T>;
|
|
1179
|
+
private withMoleculeLock;
|
|
1149
1180
|
executeQuery(query: Query | Mutation, variables?: Record<string, any> | null): Promise<Response | null>;
|
|
1181
|
+
private handlePositionDrift;
|
|
1150
1182
|
setSecret(secret: string): void;
|
|
1151
1183
|
setAuthToken(authToken: AuthToken): void;
|
|
1152
1184
|
getSourceWallet(): Promise<Wallet>;
|
|
@@ -1226,6 +1258,15 @@ declare class KnishIOClient {
|
|
|
1226
1258
|
keys?: string[] | null;
|
|
1227
1259
|
atomValues?: any[] | null;
|
|
1228
1260
|
}): Promise<Response>;
|
|
1261
|
+
hasQueryField(fieldName: string): Promise<boolean>;
|
|
1262
|
+
queryEmbeddingStatus({ metaType, metaId, instances }: {
|
|
1263
|
+
metaType?: string | null;
|
|
1264
|
+
metaId?: string | null;
|
|
1265
|
+
instances?: Array<{
|
|
1266
|
+
metaType: string;
|
|
1267
|
+
metaId: string;
|
|
1268
|
+
}> | null;
|
|
1269
|
+
}): Promise<Response | null>;
|
|
1229
1270
|
queryBatch({ batchId }: {
|
|
1230
1271
|
batchId: BatchId | string;
|
|
1231
1272
|
}): Promise<Response>;
|
|
@@ -1564,6 +1605,36 @@ declare class QueryMetaTypeViaAtom extends Query {
|
|
|
1564
1605
|
createResponse(json: any): ResponseMetaTypeViaAtom;
|
|
1565
1606
|
}
|
|
1566
1607
|
|
|
1608
|
+
interface EmbeddingStatusItem {
|
|
1609
|
+
metaType: string;
|
|
1610
|
+
metaId: string;
|
|
1611
|
+
state: 'PENDING' | 'STALE' | 'COMPLETE';
|
|
1612
|
+
totalMetas: number;
|
|
1613
|
+
embeddedCount: number;
|
|
1614
|
+
embeddedAt: number | null;
|
|
1615
|
+
model: string | null;
|
|
1616
|
+
}
|
|
1617
|
+
declare class ResponseEmbeddingStatus extends Response {
|
|
1618
|
+
constructor({ query, json }: {
|
|
1619
|
+
query: Query;
|
|
1620
|
+
json: any;
|
|
1621
|
+
});
|
|
1622
|
+
payload(): EmbeddingStatusItem[] | null;
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
declare class QueryEmbeddingStatus extends Query {
|
|
1626
|
+
constructor(graphQLClient: GraphQLClient$1, knishIOClient: KnishIOClient);
|
|
1627
|
+
static createVariables({ metaType, metaId, instances }?: {
|
|
1628
|
+
metaType?: string | null;
|
|
1629
|
+
metaId?: string | null;
|
|
1630
|
+
instances?: Array<{
|
|
1631
|
+
metaType: string;
|
|
1632
|
+
metaId: string;
|
|
1633
|
+
}> | null;
|
|
1634
|
+
}): Record<string, any>;
|
|
1635
|
+
createResponse(json: any): ResponseEmbeddingStatus;
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1567
1638
|
declare class ResponseContinuId extends Response {
|
|
1568
1639
|
constructor({ query, json }: {
|
|
1569
1640
|
query: Query;
|
|
@@ -1814,31 +1885,6 @@ declare function runExtendedCompatibilityTests(): {
|
|
|
1814
1885
|
}>;
|
|
1815
1886
|
};
|
|
1816
1887
|
|
|
1817
|
-
interface BaseExceptionOptions {
|
|
1818
|
-
message?: string;
|
|
1819
|
-
cause?: Error | unknown;
|
|
1820
|
-
context?: ErrorContext;
|
|
1821
|
-
code?: string;
|
|
1822
|
-
details?: Record<string, unknown>;
|
|
1823
|
-
}
|
|
1824
|
-
declare class BaseException extends Error {
|
|
1825
|
-
readonly type: KnishIOErrorType;
|
|
1826
|
-
readonly context: ErrorContext | null;
|
|
1827
|
-
readonly code: string | null;
|
|
1828
|
-
readonly details: Record<string, unknown> | null;
|
|
1829
|
-
readonly timestamp: number;
|
|
1830
|
-
constructor(type: KnishIOErrorType, message: string, options?: BaseExceptionOptions);
|
|
1831
|
-
getFullMessage(): string;
|
|
1832
|
-
toJSON(): Record<string, unknown>;
|
|
1833
|
-
isType(type: KnishIOErrorType): boolean;
|
|
1834
|
-
getContextValue(key: keyof ErrorContext): unknown;
|
|
1835
|
-
withContext(additionalContext: Partial<ErrorContext>): this;
|
|
1836
|
-
static create<T extends BaseException>(this: new (type: KnishIOErrorType, message: string, options?: BaseExceptionOptions) => T, type: KnishIOErrorType, message: string, options?: BaseExceptionOptions): T;
|
|
1837
|
-
static isKnishIOException(error: unknown): error is BaseException;
|
|
1838
|
-
static getErrorType(error: unknown): KnishIOErrorType | null;
|
|
1839
|
-
static fromError(error: Error | unknown, type?: KnishIOErrorType, additionalContext?: Partial<ErrorContext>): BaseException;
|
|
1840
|
-
}
|
|
1841
|
-
|
|
1842
1888
|
declare class AtomIndexException extends BaseException {
|
|
1843
1889
|
constructor(message?: string, options?: BaseExceptionOptions);
|
|
1844
1890
|
static indexConflict(index: number, existingIndex: number): AtomIndexException;
|
|
@@ -2068,4 +2114,4 @@ declare const KnishIO: {
|
|
|
2068
2114
|
};
|
|
2069
2115
|
};
|
|
2070
2116
|
|
|
2071
|
-
export { Atom, AtomIndexException, type AtomIsotope, AtomMeta, type AtomParams, AtomsMissingException, type AuthParams, AuthToken, type BalanceQueryParams, type Base17Hash, BaseException, type BaseResponse, type BundleHash, type BundleHashOptions, COMPATIBLE_SERVER_VERSIONS, CRYPTO_CONSTANTS, type CellSlug, CheckMolecule, type CreateTokenParams, DevUtils, Dot, EXCEPTION_CODES, EXCEPTION_TYPES, EXTENDED_COMPATIBILITY_TEST_VECTORS, ExceptionFactory, GraphQLClient, type GraphQLError, type GraphQLRequest, type GraphQLResponse, type HexString, InvalidResponseException, type KeyGenerationOptions, KnishIO, KnishIOClient, type KnishIOClientConfig, Meta$1 as Meta, type MetaData, type MetaId, type MetaQueryParams, type MetaType, type MolecularHash, MolecularHashMismatchException, Molecule, type MoleculeParams, Mutation, MutationAppendRequest, MutationCreateMeta, MutationCreateToken, MutationCreateWallet, type MutationOperation, MutationPeering, MutationProposeMolecule, MutationRequestAuthorization, MutationRequestTokens, MutationTransferTokens, PolicyMeta, type Position, type PositionGenerationOptions, Query, QueryAtom, QueryBalance, QueryBatch, QueryContinuId, QueryMetaType, QueryMetaTypeViaAtom, type QueryOperation, QueryWalletBundle, QueryWalletList, type RequestTokensParams, Response, ResponseAppendRequest, ResponseAtom, ResponseBalance, ResponseContinuId, ResponseCreateMeta, ResponseCreateToken, ResponseCreateWallet, ResponseMetaType, ResponseMetaTypeViaAtom, ResponsePeering, ResponseProposeMolecule, ResponseRequestAuthorization, ResponseRequestTokens, ResponseTransferTokens, ResponseWalletBundle, ResponseWalletList, type SDKConfig, SDK_INFO, SDK_NAME, SDK_VERSION, type SHAKE256Options, type SecretGenerationOptions, SignatureMismatchException, type SignatureOptions, type TokenSlug, TokenUnit, TransferBalanceException, type TransferParams, type ValidationResult$1 as ValidationResult, type VerificationOptions, Wallet, type WalletAddress, WalletCredentialException, type WalletParams, type WalletQueryParams, base64ToHex, bufferToHexString, capitalize, charsetBaseConvert, chunkArray, chunkSubstr, configureSDK, convertToBase17, createBundleHash, createMolecularHash, createPosition, createTokenSlug, createWalletAddress, deepCloning, diff, enumerateMolecularHash, generateBatchId, generateBundleHash, generateOTSSignature, generatePosition, generateSecret, generateWalletAddress, generateWalletKey, getSDKConfig, hexStringToBuffer, hexToBase64, intersect, isAtomIsotope, isBundleHash, isHex, isHexString, isMolecularHash, isNumeric, isPosition, isWalletAddress, normalizeMolecularHash, randomString, runCompatibilityTests, runExtendedCompatibilityTests, shake256, toCamelCase, toSnakeCase, truncate, validateBundleHash, validateMolecularHashForSignature, validateOTSSignature, validatePosition, validateSecret, validateWalletAddress, verifyOTSSignature };
|
|
2117
|
+
export { Atom, AtomIndexException, type AtomIsotope, AtomMeta, type AtomParams, AtomsMissingException, type AuthParams, AuthToken, type BalanceQueryParams, type Base17Hash, BaseException, type BaseResponse, type BundleHash, type BundleHashOptions, COMPATIBLE_SERVER_VERSIONS, CRYPTO_CONSTANTS, type CellSlug, CheckMolecule, type CreateTokenParams, DevUtils, Dot, EXCEPTION_CODES, EXCEPTION_TYPES, EXTENDED_COMPATIBILITY_TEST_VECTORS, type EmbeddingStatusItem, ExceptionFactory, GraphQLClient, type GraphQLError, type GraphQLRequest, type GraphQLResponse, type HexString, InvalidResponseException, type KeyGenerationOptions, KnishIO, KnishIOClient, type KnishIOClientConfig, Meta$1 as Meta, type MetaData, type MetaId, type MetaQueryParams, type MetaType, type MolecularHash, MolecularHashMismatchException, Molecule, type MoleculeParams, Mutation, MutationAppendRequest, MutationCreateMeta, MutationCreateToken, MutationCreateWallet, type MutationOperation, MutationPeering, MutationProposeMolecule, MutationRequestAuthorization, MutationRequestTokens, MutationTransferTokens, PolicyMeta, type Position, type PositionGenerationOptions, Query, QueryAtom, QueryBalance, QueryBatch, QueryContinuId, QueryEmbeddingStatus, QueryMetaType, QueryMetaTypeViaAtom, type QueryOperation, QueryWalletBundle, QueryWalletList, type RequestTokensParams, Response, ResponseAppendRequest, ResponseAtom, ResponseBalance, ResponseContinuId, ResponseCreateMeta, ResponseCreateToken, ResponseCreateWallet, ResponseEmbeddingStatus, ResponseMetaType, ResponseMetaTypeViaAtom, ResponsePeering, ResponseProposeMolecule, ResponseRequestAuthorization, ResponseRequestTokens, ResponseTransferTokens, ResponseWalletBundle, ResponseWalletList, type SDKConfig, SDK_INFO, SDK_NAME, SDK_VERSION, type SHAKE256Options, type SecretGenerationOptions, SignatureMismatchException, type SignatureOptions, type TokenSlug, TokenUnit, TransferBalanceException, type TransferParams, type ValidationResult$1 as ValidationResult, type VerificationOptions, Wallet, type WalletAddress, WalletCredentialException, type WalletParams, type WalletQueryParams, base64ToHex, bufferToHexString, capitalize, charsetBaseConvert, chunkArray, chunkSubstr, configureSDK, convertToBase17, createBundleHash, createMolecularHash, createPosition, createTokenSlug, createWalletAddress, deepCloning, diff, enumerateMolecularHash, generateBatchId, generateBundleHash, generateOTSSignature, generatePosition, generateSecret, generateWalletAddress, generateWalletKey, getSDKConfig, hexStringToBuffer, hexToBase64, intersect, isAtomIsotope, isBundleHash, isHex, isHexString, isMolecularHash, isNumeric, isPosition, isWalletAddress, normalizeMolecularHash, randomString, runCompatibilityTests, runExtendedCompatibilityTests, shake256, toCamelCase, toSnakeCase, truncate, validateBundleHash, validateMolecularHashForSignature, validateOTSSignature, validatePosition, validateSecret, validateWalletAddress, verifyOTSSignature };
|