fix(ts-sdk): preserve user-defined schema keys in createMemoryExport (#5594)

This commit is contained in:
Abhishek Chauhan
2026-06-17 14:40:33 +05:30
committed by GitHub
parent 137b7519f7
commit 0d66d3d127
2 changed files with 52 additions and 1 deletions
+5 -1
View File
@@ -696,7 +696,10 @@ export default class MemoryClient {
throw new Error("Missing filters or schema");
}
const { filters, ...rest } = data;
// filters and schema are user-controlled blobs whose keys must reach the
// API verbatim; only the remaining SDK params (e.g. exportInstructions)
// get camel->snake conversion. See issue #5593.
const { filters, schema, ...rest } = data;
const response = await this._fetchWithErrorHandling(
`${this.host}/v1/exports/`,
{
@@ -705,6 +708,7 @@ export default class MemoryClient {
body: JSON.stringify({
...camelToSnakeKeys(rest),
filters,
schema,
}),
},
);