Update File Metadata
import { initializeMeshSDK, logResponse } from "./util";
import {
UpdateFileMetadataRequest,
UpdateFileMetadataResponse
} from "@instruxi-io/mesh-sdk-core";
async function main() {
try {
const mesh = await initializeMeshSDK();
const updateMetadataRequest: UpdateFileMetadataRequest = {
file_id: '',
file_type: '',
status: '',
version: '',
policy_id: '',
version: ''
};
const updateMetadataResponse: UpdateFileMetadataResponse = await mesh.os.updateFileMetadata(updateMetadataRequest);
await logResponse(`updateFileMetadata:`, updateMetadataResponse);
} 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