@maximem/synap-js-sdk 0.5.19 → 0.5.20

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/index.d.cts CHANGED
@@ -1892,7 +1892,7 @@ declare class SynapClient {
1892
1892
  * build when the two disagree, which is the only thing that makes a manual
1893
1893
  * publish safe.
1894
1894
  */
1895
- declare const SDK_VERSION = "0.5.19";
1895
+ declare const SDK_VERSION = "0.5.20";
1896
1896
 
1897
1897
  /**
1898
1898
  * `response_shape: "ranked"`: one list in the order the server ranked it.
package/dist/index.d.ts CHANGED
@@ -1892,7 +1892,7 @@ declare class SynapClient {
1892
1892
  * build when the two disagree, which is the only thing that makes a manual
1893
1893
  * publish safe.
1894
1894
  */
1895
- declare const SDK_VERSION = "0.5.19";
1895
+ declare const SDK_VERSION = "0.5.20";
1896
1896
 
1897
1897
  /**
1898
1898
  * `response_shape: "ranked"`: one list in the order the server ranked it.
package/dist/index.js CHANGED
@@ -1140,6 +1140,10 @@ function createMemoriesInterface(transport, onForgotten) {
1140
1140
  async create_from_file(options) {
1141
1141
  const userId = options.user_id ?? options.userId;
1142
1142
  const customerId = options.customer_id ?? options.customerId;
1143
+ const scope = options.scope;
1144
+ if (scope !== void 0 && scope !== null && (typeof scope !== "object" || Array.isArray(scope) || !Object.values(scope).every((v) => typeof v === "string"))) {
1145
+ throw new InvalidInputError("scope must be a flat dict of level key to id, both strings.");
1146
+ }
1143
1147
  if (!userId) throw new InvalidInputError("user_id is required");
1144
1148
  await transport.checkCustomerId(customerId, "memories.create_from_file");
1145
1149
  const filePath = options.file_path ?? options.filePath;
@@ -2040,7 +2044,7 @@ function createInstanceNamespace(credentials, cache, onTurn, agentModel = () =>
2040
2044
  }
2041
2045
 
2042
2046
  // src/version.ts
2043
- var SDK_VERSION = "0.5.19";
2047
+ var SDK_VERSION = "0.5.20";
2044
2048
 
2045
2049
  // src/registry.ts
2046
2050
  var instances = /* @__PURE__ */ new Map();