@zerocost/sdk 0.10.0 → 0.11.0

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
@@ -65,14 +65,18 @@ var ZerocostClient = class {
65
65
  }
66
66
  async request(path, body) {
67
67
  const url = `${this.baseUrl}${path}`;
68
- this.log(`\u2192 ${url}`, body);
68
+ const payload = {
69
+ ...body || {},
70
+ app_id: this.config.appId
71
+ };
72
+ this.log(`\u2192 ${url}`, payload);
69
73
  const res = await fetch(url, {
70
74
  method: "POST",
71
75
  headers: {
72
76
  "Content-Type": "application/json",
73
77
  "x-api-key": this.config.apiKey
74
78
  },
75
- body: body ? JSON.stringify(body) : void 0
79
+ body: JSON.stringify(payload)
76
80
  });
77
81
  const data = await res.json();
78
82
  if (!res.ok) {
package/dist/index.js CHANGED
@@ -36,14 +36,18 @@ var ZerocostClient = class {
36
36
  }
37
37
  async request(path, body) {
38
38
  const url = `${this.baseUrl}${path}`;
39
- this.log(`\u2192 ${url}`, body);
39
+ const payload = {
40
+ ...body || {},
41
+ app_id: this.config.appId
42
+ };
43
+ this.log(`\u2192 ${url}`, payload);
40
44
  const res = await fetch(url, {
41
45
  method: "POST",
42
46
  headers: {
43
47
  "Content-Type": "application/json",
44
48
  "x-api-key": this.config.apiKey
45
49
  },
46
- body: body ? JSON.stringify(body) : void 0
50
+ body: JSON.stringify(payload)
47
51
  });
48
52
  const data = await res.json();
49
53
  if (!res.ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zerocost/sdk",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",