@usethrottle/discounts 0.4.0 → 0.4.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/dist/index.cjs CHANGED
@@ -77,7 +77,8 @@ var DiscountsClient = class {
77
77
  code: json?.error?.code ?? "unknown_error",
78
78
  message: json?.error?.message ?? `HTTP ${res.status}`,
79
79
  statusCode: res.status,
80
- details: json?.error?.details
80
+ details: json?.error?.details,
81
+ responseHeaders: res.headers
81
82
  });
82
83
  }
83
84
  return {
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { ThrottleError } from '@usethrottle/errors';
1
+ import { ThrottleError, ThrottleErrorArgs } from '@usethrottle/errors';
2
2
  export { ThrottleError, isThrottleError } from '@usethrottle/errors';
3
3
 
4
4
  type DiscountType = 'percentage' | 'fixed_amount';
@@ -146,6 +146,7 @@ declare class ThrottleDiscountsError extends ThrottleError {
146
146
  message: string;
147
147
  statusCode: number;
148
148
  details?: unknown;
149
+ responseHeaders?: ThrottleErrorArgs['responseHeaders'];
149
150
  });
150
151
  }
151
152
 
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ThrottleError } from '@usethrottle/errors';
1
+ import { ThrottleError, ThrottleErrorArgs } from '@usethrottle/errors';
2
2
  export { ThrottleError, isThrottleError } from '@usethrottle/errors';
3
3
 
4
4
  type DiscountType = 'percentage' | 'fixed_amount';
@@ -146,6 +146,7 @@ declare class ThrottleDiscountsError extends ThrottleError {
146
146
  message: string;
147
147
  statusCode: number;
148
148
  details?: unknown;
149
+ responseHeaders?: ThrottleErrorArgs['responseHeaders'];
149
150
  });
150
151
  }
151
152
 
package/dist/index.js CHANGED
@@ -47,7 +47,8 @@ var DiscountsClient = class {
47
47
  code: json?.error?.code ?? "unknown_error",
48
48
  message: json?.error?.message ?? `HTTP ${res.status}`,
49
49
  statusCode: res.status,
50
- details: json?.error?.details
50
+ details: json?.error?.details,
51
+ responseHeaders: res.headers
51
52
  });
52
53
  }
53
54
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usethrottle/discounts",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Headless TypeScript client for Throttle discount and promotion code APIs.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -19,7 +19,7 @@
19
19
  "CLAUDE.md"
20
20
  ],
21
21
  "dependencies": {
22
- "@usethrottle/errors": "^1.0.0"
22
+ "@usethrottle/errors": "^1.1.0"
23
23
  },
24
24
  "devDependencies": {
25
25
  "tsup": "^8.0.0",