@garuhq/node 0.11.0 → 0.11.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,21 @@
3
3
  All notable changes to `@garuhq/node` are documented in this file. Format:
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versioning: [SemVer](https://semver.org/).
5
5
 
6
+ ## [0.11.1] — 2026-05-19
7
+
8
+ ### Fixed
9
+
10
+ - Empty-body mutations (`webhookEvents.retry`, `scheduledCharges.resume`,
11
+ `customers.delete`, `products.portalConfig.clear`,
12
+ `scheduledCharges.clearPaymentMethod`) now send an explicit `{}` body.
13
+ `openapi-fetch` sets `Content-Type: application/json` as a default
14
+ header on every request, and the backend body-parser rejects
15
+ `Content-Type: json` + empty body with
16
+ `Body cannot be empty when content-type is set to 'application/json'`.
17
+ Previously these calls failed against production; the SDK's mock-fetch
18
+ tests didn't surface the regression because the mock never hits the
19
+ body-parser middleware.
20
+
6
21
  ## [0.11.0] — 2026-05-19
7
22
 
8
23
  ### Added
package/dist/index.cjs CHANGED
@@ -435,9 +435,10 @@ var Customers = class {
435
435
  */
436
436
  async delete(id) {
437
437
  await this.http.call(
438
- (signal) => this.http.client.DELETE(`/api/customers/${id}`, { signal }).then(
439
- (r) => r
440
- )
438
+ (signal) => this.http.client.DELETE(`/api/customers/${id}`, {
439
+ body: {},
440
+ signal
441
+ }).then((r) => r)
441
442
  );
442
443
  }
443
444
  };
@@ -525,6 +526,7 @@ var ProductPortalConfigResource = class {
525
526
  async clear(productId) {
526
527
  return this.http.call(
527
528
  (signal) => this.http.client.DELETE(`/api/products/${encodeURIComponent(String(productId))}/portal-config`, {
529
+ body: {},
528
530
  signal
529
531
  }).then((r) => r)
530
532
  );
@@ -700,6 +702,7 @@ var ScheduledCharges = class {
700
702
  async resume(id) {
701
703
  return this.http.call(
702
704
  (signal) => this.http.client.POST(`/api/scheduled-charges/${id}/resume`, {
705
+ body: {},
703
706
  signal
704
707
  }).then((r) => r)
705
708
  );
@@ -798,6 +801,7 @@ var ScheduledCharges = class {
798
801
  async clearPaymentMethod(id) {
799
802
  return this.http.call(
800
803
  (signal) => this.http.client.DELETE(`/api/scheduled-charges/${id}/payment-method`, {
804
+ body: {},
801
805
  signal
802
806
  }).then((r) => r)
803
807
  );
@@ -907,9 +911,10 @@ var WebhookEvents = class {
907
911
  */
908
912
  async retry(id) {
909
913
  return this.http.call(
910
- (signal) => this.http.client.POST(`/api/webhook-events/${id}/retry`, { signal }).then(
911
- (r) => r
912
- )
914
+ (signal) => this.http.client.POST(`/api/webhook-events/${id}/retry`, {
915
+ body: {},
916
+ signal
917
+ }).then((r) => r)
913
918
  );
914
919
  }
915
920
  };
@@ -972,7 +977,7 @@ function parseSignatureHeader(header) {
972
977
  var DEFAULT_BASE_URL = "https://garu.com.br";
973
978
  var DEFAULT_TIMEOUT_MS = 3e4;
974
979
  var DEFAULT_MAX_RETRIES = 2;
975
- var SDK_VERSION = "0.11.0";
980
+ var SDK_VERSION = "0.11.1";
976
981
  var Garu = class {
977
982
  charges;
978
983
  customers;
package/dist/index.js CHANGED
@@ -429,9 +429,10 @@ var Customers = class {
429
429
  */
430
430
  async delete(id) {
431
431
  await this.http.call(
432
- (signal) => this.http.client.DELETE(`/api/customers/${id}`, { signal }).then(
433
- (r) => r
434
- )
432
+ (signal) => this.http.client.DELETE(`/api/customers/${id}`, {
433
+ body: {},
434
+ signal
435
+ }).then((r) => r)
435
436
  );
436
437
  }
437
438
  };
@@ -519,6 +520,7 @@ var ProductPortalConfigResource = class {
519
520
  async clear(productId) {
520
521
  return this.http.call(
521
522
  (signal) => this.http.client.DELETE(`/api/products/${encodeURIComponent(String(productId))}/portal-config`, {
523
+ body: {},
522
524
  signal
523
525
  }).then((r) => r)
524
526
  );
@@ -694,6 +696,7 @@ var ScheduledCharges = class {
694
696
  async resume(id) {
695
697
  return this.http.call(
696
698
  (signal) => this.http.client.POST(`/api/scheduled-charges/${id}/resume`, {
699
+ body: {},
697
700
  signal
698
701
  }).then((r) => r)
699
702
  );
@@ -792,6 +795,7 @@ var ScheduledCharges = class {
792
795
  async clearPaymentMethod(id) {
793
796
  return this.http.call(
794
797
  (signal) => this.http.client.DELETE(`/api/scheduled-charges/${id}/payment-method`, {
798
+ body: {},
795
799
  signal
796
800
  }).then((r) => r)
797
801
  );
@@ -901,9 +905,10 @@ var WebhookEvents = class {
901
905
  */
902
906
  async retry(id) {
903
907
  return this.http.call(
904
- (signal) => this.http.client.POST(`/api/webhook-events/${id}/retry`, { signal }).then(
905
- (r) => r
906
- )
908
+ (signal) => this.http.client.POST(`/api/webhook-events/${id}/retry`, {
909
+ body: {},
910
+ signal
911
+ }).then((r) => r)
907
912
  );
908
913
  }
909
914
  };
@@ -966,7 +971,7 @@ function parseSignatureHeader(header) {
966
971
  var DEFAULT_BASE_URL = "https://garu.com.br";
967
972
  var DEFAULT_TIMEOUT_MS = 3e4;
968
973
  var DEFAULT_MAX_RETRIES = 2;
969
- var SDK_VERSION = "0.11.0";
974
+ var SDK_VERSION = "0.11.1";
970
975
  var Garu = class {
971
976
  charges;
972
977
  customers;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@garuhq/node",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "Official Node.js / TypeScript SDK for the Garu payment gateway.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://garu.com.br",