@dnax/core 0.63.0 → 0.63.1

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.
@@ -1258,7 +1258,9 @@ class useRest {
1258
1258
  filter: object,
1259
1259
  update: updateParams,
1260
1260
  options?: Omit<
1261
- optionCb,
1261
+ optionCb & {
1262
+ upsert: boolean;
1263
+ },
1262
1264
  "useHook" | "useCustomApi" | "elementAt" | "withMeta"
1263
1265
  >
1264
1266
  ): Promise<{ docs: object[]; matchedCount: number; modifiedCount: number }> {
@@ -1305,6 +1307,7 @@ class useRest {
1305
1307
  },
1306
1308
  },
1307
1309
  {
1310
+ upsert: options?.upsert ?? false,
1308
1311
  session: this.#session ? this.#session : undefined,
1309
1312
  }
1310
1313
  );
@@ -1361,7 +1364,9 @@ class useRest {
1361
1364
  filter: object,
1362
1365
  update: updateParams,
1363
1366
  options?: Omit<
1364
- optionCb,
1367
+ optionCb & {
1368
+ upsert: boolean;
1369
+ },
1365
1370
  "useHook" | "useCustomApi" | "elementAt" | "withMeta"
1366
1371
  >
1367
1372
  ): Promise<object | null> {
@@ -1410,9 +1415,8 @@ class useRest {
1410
1415
  },
1411
1416
  },
1412
1417
  {
1413
- upsert: true,
1418
+ upsert: options?.upsert ?? false,
1414
1419
  returnDocument: "after",
1415
-
1416
1420
  session: this.#session ? this.#session : undefined,
1417
1421
  }
1418
1422
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.63.0",
3
+ "version": "0.63.1",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {