@dyrected/sdk 2.4.2 → 2.4.4

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.cjs CHANGED
@@ -37,7 +37,7 @@ __export(index_exports, {
37
37
  generateFreshSetupPrompt: () => generateFreshSetupPrompt
38
38
  });
39
39
  module.exports = __toCommonJS(index_exports);
40
- var import_qs = __toESM(require("qs"), 1);
40
+ var qs = __toESM(require("qs"), 1);
41
41
 
42
42
  // src/query-builder.ts
43
43
  var QueryBuilder = class {
@@ -953,7 +953,7 @@ var DyrectedClient = class {
953
953
  if (normalizedArgs.where && typeof normalizedArgs.where === "object") {
954
954
  normalizedArgs.where = JSON.stringify(normalizedArgs.where);
955
955
  }
956
- const query = import_qs.default.stringify(normalizedArgs, { addQueryPrefix: true });
956
+ const query = qs.stringify(normalizedArgs, { addQueryPrefix: true });
957
957
  const res = await this.request(`/api/collections/${collection}${query}`);
958
958
  if (res.docs.length === 0 && initialData && initialData.length > 0) {
959
959
  this.request(`/api/collections/${collection}/seed`, {
@@ -1047,7 +1047,7 @@ var DyrectedClient = class {
1047
1047
  }
1048
1048
  async findOne(collection, id, args = {}) {
1049
1049
  const { initialData, ...queryArgs } = args;
1050
- const query = import_qs.default.stringify(queryArgs, { addQueryPrefix: true });
1050
+ const query = qs.stringify(queryArgs, { addQueryPrefix: true });
1051
1051
  try {
1052
1052
  return await this.request(`/api/collections/${collection}/${id}${query}`);
1053
1053
  } catch (err) {
@@ -1083,12 +1083,12 @@ var DyrectedClient = class {
1083
1083
  async deleteMany(collection, ids) {
1084
1084
  return this.request(`/api/collections/${collection}/delete-many`, {
1085
1085
  method: "DELETE",
1086
- body: import_qs.default.stringify({ ids })
1086
+ body: qs.stringify({ ids })
1087
1087
  });
1088
1088
  }
1089
1089
  async getGlobal(slug, args = {}) {
1090
1090
  const { initialData, ...queryArgs } = args;
1091
- const query = import_qs.default.stringify(queryArgs, { addQueryPrefix: true });
1091
+ const query = qs.stringify(queryArgs, { addQueryPrefix: true });
1092
1092
  try {
1093
1093
  const res = await this.request(`/api/globals/${slug}${query}`);
1094
1094
  if ((!res || Object.keys(res).length === 0) && initialData) {
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/index.ts
2
- import qs from "qs";
2
+ import * as qs from "qs";
3
3
 
4
4
  // src/query-builder.ts
5
5
  var QueryBuilder = class {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dyrected/sdk",
3
- "version": "2.4.2",
3
+ "version": "2.4.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",