Get File Metadata
import { initializeMeshSDK, logResponse } from "./util";
import {
GetFileMetadataRequest,
GetFileMetadataResponse
} from "@instruxi-io/mesh-sdk-core";
async function main() {
try {
const mesh = await initializeMeshSDK();
const getMetadataRequest: GetFileMetadataRequest = { file_id: file.id };
const getMetadataResponse: GetFileMetadataResponse = await mesh.os.getFileMetadata(getMetadataRequest);
await logResponse(`getFileMetadata: status`, getMetadataResponse.data.status);
} catch (error) {
console.error("An error occurred:", error);
}
}
main().catch((error) => {
console.error("Unhandled error in main function:", error);
process.exit(1);
});
Updated 26 days ago