@maximem/synap-js-sdk 0.5.14 → 0.5.15

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
@@ -1873,7 +1873,7 @@ declare class SynapClient {
1873
1873
  * build when the two disagree, which is the only thing that makes a manual
1874
1874
  * publish safe.
1875
1875
  */
1876
- declare const SDK_VERSION = "0.5.14";
1876
+ declare const SDK_VERSION = "0.5.15";
1877
1877
 
1878
1878
  /**
1879
1879
  * `response_shape: "ranked"`: one list in the order the server ranked it.
package/dist/index.d.ts CHANGED
@@ -1873,7 +1873,7 @@ declare class SynapClient {
1873
1873
  * build when the two disagree, which is the only thing that makes a manual
1874
1874
  * publish safe.
1875
1875
  */
1876
- declare const SDK_VERSION = "0.5.14";
1876
+ declare const SDK_VERSION = "0.5.15";
1877
1877
 
1878
1878
  /**
1879
1879
  * `response_shape: "ranked"`: one list in the order the server ranked it.
package/dist/index.js CHANGED
@@ -1119,7 +1119,7 @@ function buildForgetBody(options) {
1119
1119
  mode
1120
1120
  };
1121
1121
  }
1122
- var TERMINAL_STATUSES = /* @__PURE__ */ new Set(["completed", "failed", "error", "cancelled"]);
1122
+ var TERMINAL_STATUSES = /* @__PURE__ */ new Set(["completed", "failed", "partial_success", "error", "cancelled"]);
1123
1123
  function createMemoriesInterface(transport, onForgotten) {
1124
1124
  return {
1125
1125
  async create(options) {
@@ -1154,7 +1154,9 @@ function createMemoriesInterface(transport, onForgotten) {
1154
1154
  }
1155
1155
  const form = new FormData();
1156
1156
  form.set("user_id", userId);
1157
- form.set("customer_id", customerId);
1157
+ if (typeof customerId === "string" && customerId !== "") {
1158
+ form.set("customer_id", customerId);
1159
+ }
1158
1160
  form.set("relationship_type", options.relationship_type ?? options.relationshipType ?? "b2c");
1159
1161
  form.set("mode", String(options.mode ?? DEFAULT_INGEST_MODE));
1160
1162
  const documentType = options.document_type ?? options.documentType;
@@ -1162,6 +1164,9 @@ function createMemoriesInterface(transport, onForgotten) {
1162
1164
  if (options.metadata !== void 0 && Object.keys(options.metadata).length > 0) {
1163
1165
  form.set("metadata", JSON.stringify(options.metadata));
1164
1166
  }
1167
+ if (options.scope && Object.keys(options.scope).length > 0) {
1168
+ form.set("scope", JSON.stringify(options.scope));
1169
+ }
1165
1170
  if (filePath !== void 0) {
1166
1171
  const { readFile } = await import("fs/promises");
1167
1172
  const { basename } = await import("path");
@@ -2007,7 +2012,7 @@ function createInstanceNamespace(credentials, cache, onTurn, agentModel = () =>
2007
2012
  }
2008
2013
 
2009
2014
  // src/version.ts
2010
- var SDK_VERSION = "0.5.14";
2015
+ var SDK_VERSION = "0.5.15";
2011
2016
 
2012
2017
  // src/registry.ts
2013
2018
  var instances = /* @__PURE__ */ new Map();