@stackbe/sdk 0.9.2 → 0.9.3
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.d.mts +15 -0
- package/dist/index.d.ts +15 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2094,6 +2094,8 @@ declare class EarlyAccessClient {
|
|
|
2094
2094
|
}
|
|
2095
2095
|
|
|
2096
2096
|
type CouponDiscountType = 'percentage' | 'fixed_amount';
|
|
2097
|
+
/** How long the discount applies */
|
|
2098
|
+
type CouponDuration = 'once' | 'repeating' | 'forever';
|
|
2097
2099
|
interface Coupon {
|
|
2098
2100
|
id: string;
|
|
2099
2101
|
code: string;
|
|
@@ -2101,6 +2103,10 @@ interface Coupon {
|
|
|
2101
2103
|
discountType: CouponDiscountType;
|
|
2102
2104
|
discountValue: number;
|
|
2103
2105
|
currency?: string;
|
|
2106
|
+
/** How long the discount applies: once (first invoice), repeating (X months), forever */
|
|
2107
|
+
duration: CouponDuration;
|
|
2108
|
+
/** Number of months for repeating duration */
|
|
2109
|
+
durationInMonths?: number;
|
|
2104
2110
|
maxRedemptions?: number;
|
|
2105
2111
|
timesRedeemed: number;
|
|
2106
2112
|
expiresAt?: string;
|
|
@@ -2120,6 +2126,15 @@ interface CreateCouponOptions {
|
|
|
2120
2126
|
discountValue: number;
|
|
2121
2127
|
/** Currency code (required for fixed_amount) */
|
|
2122
2128
|
currency?: string;
|
|
2129
|
+
/**
|
|
2130
|
+
* How long the discount applies (default: 'once')
|
|
2131
|
+
* - 'once': Applies to first invoice only
|
|
2132
|
+
* - 'repeating': Applies for X months (requires durationInMonths)
|
|
2133
|
+
* - 'forever': Applies to all future invoices
|
|
2134
|
+
*/
|
|
2135
|
+
duration?: CouponDuration;
|
|
2136
|
+
/** Number of months the discount applies (required when duration is 'repeating') */
|
|
2137
|
+
durationInMonths?: number;
|
|
2123
2138
|
/** Maximum number of times this coupon can be used */
|
|
2124
2139
|
maxRedemptions?: number;
|
|
2125
2140
|
/** When the coupon expires (ISO date string) */
|
package/dist/index.d.ts
CHANGED
|
@@ -2094,6 +2094,8 @@ declare class EarlyAccessClient {
|
|
|
2094
2094
|
}
|
|
2095
2095
|
|
|
2096
2096
|
type CouponDiscountType = 'percentage' | 'fixed_amount';
|
|
2097
|
+
/** How long the discount applies */
|
|
2098
|
+
type CouponDuration = 'once' | 'repeating' | 'forever';
|
|
2097
2099
|
interface Coupon {
|
|
2098
2100
|
id: string;
|
|
2099
2101
|
code: string;
|
|
@@ -2101,6 +2103,10 @@ interface Coupon {
|
|
|
2101
2103
|
discountType: CouponDiscountType;
|
|
2102
2104
|
discountValue: number;
|
|
2103
2105
|
currency?: string;
|
|
2106
|
+
/** How long the discount applies: once (first invoice), repeating (X months), forever */
|
|
2107
|
+
duration: CouponDuration;
|
|
2108
|
+
/** Number of months for repeating duration */
|
|
2109
|
+
durationInMonths?: number;
|
|
2104
2110
|
maxRedemptions?: number;
|
|
2105
2111
|
timesRedeemed: number;
|
|
2106
2112
|
expiresAt?: string;
|
|
@@ -2120,6 +2126,15 @@ interface CreateCouponOptions {
|
|
|
2120
2126
|
discountValue: number;
|
|
2121
2127
|
/** Currency code (required for fixed_amount) */
|
|
2122
2128
|
currency?: string;
|
|
2129
|
+
/**
|
|
2130
|
+
* How long the discount applies (default: 'once')
|
|
2131
|
+
* - 'once': Applies to first invoice only
|
|
2132
|
+
* - 'repeating': Applies for X months (requires durationInMonths)
|
|
2133
|
+
* - 'forever': Applies to all future invoices
|
|
2134
|
+
*/
|
|
2135
|
+
duration?: CouponDuration;
|
|
2136
|
+
/** Number of months the discount applies (required when duration is 'repeating') */
|
|
2137
|
+
durationInMonths?: number;
|
|
2123
2138
|
/** Maximum number of times this coupon can be used */
|
|
2124
2139
|
maxRedemptions?: number;
|
|
2125
2140
|
/** When the coupon expires (ISO date string) */
|
package/package.json
CHANGED