@paddle/paddle-node-sdk 2.7.3 → 2.8.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.
Files changed (197) hide show
  1. package/dist/cjs/entities/discount/discount.js +1 -0
  2. package/dist/cjs/entities/discount-group/discount-group-collection.js +11 -0
  3. package/dist/cjs/entities/discount-group/discount-group.js +15 -0
  4. package/dist/cjs/entities/discount-group/index.js +18 -0
  5. package/dist/cjs/entities/index.js +1 -0
  6. package/dist/cjs/entities/payment-method/payment-method.js +3 -0
  7. package/dist/cjs/entities/shared/index.js +2 -0
  8. package/dist/cjs/entities/shared/korean-market-underlying-details.js +9 -0
  9. package/dist/cjs/entities/shared/payment-method-details.js +4 -0
  10. package/dist/cjs/entities/shared/payment-method-underlying-details.js +12 -0
  11. package/dist/cjs/enums/api-key/api-key-permission.js +2 -0
  12. package/dist/cjs/enums/api-key/api-key-status.js +2 -0
  13. package/dist/cjs/enums/api-key/index.js +18 -0
  14. package/dist/cjs/enums/discount/discount-mode.js +2 -0
  15. package/dist/cjs/enums/discount/index.js +1 -0
  16. package/dist/cjs/enums/index.js +1 -0
  17. package/dist/cjs/enums/shared/index.js +1 -0
  18. package/dist/cjs/enums/shared/korean-market-underlying-payment-method-type.js +2 -0
  19. package/dist/cjs/notifications/entities/api-key/api-key-notification.js +19 -0
  20. package/dist/cjs/notifications/entities/api-key/index.js +17 -0
  21. package/dist/cjs/notifications/entities/discount/discount-notification.js +1 -0
  22. package/dist/cjs/notifications/entities/discount-group/discount-group-notification.js +17 -0
  23. package/dist/cjs/notifications/entities/discount-group/index.js +17 -0
  24. package/dist/cjs/notifications/entities/index.js +2 -0
  25. package/dist/cjs/notifications/entities/shared/index.js +2 -0
  26. package/dist/cjs/notifications/entities/shared/korean-market-underlying-details-notification.js +9 -0
  27. package/dist/cjs/notifications/entities/shared/payment-method-details-notification.js +4 -0
  28. package/dist/cjs/notifications/entities/shared/payment-method-underlying-details-notification.js +12 -0
  29. package/dist/cjs/notifications/events/api-key/api-key-created-event.js +14 -0
  30. package/dist/cjs/notifications/events/api-key/api-key-expired-event.js +14 -0
  31. package/dist/cjs/notifications/events/api-key/api-key-expiring-event.js +14 -0
  32. package/dist/cjs/notifications/events/api-key/api-key-revoked-event.js +14 -0
  33. package/dist/cjs/notifications/events/api-key/api-key-updated-event.js +14 -0
  34. package/dist/cjs/notifications/events/api-key/index.js +21 -0
  35. package/dist/cjs/notifications/events/discount-group/discount-group-created-event.js +14 -0
  36. package/dist/cjs/notifications/events/discount-group/index.js +17 -0
  37. package/dist/cjs/notifications/events/index.js +2 -0
  38. package/dist/cjs/notifications/helpers/types.js +6 -0
  39. package/dist/cjs/notifications/helpers/webhooks.js +12 -0
  40. package/dist/cjs/notifications/types/api-key/api-key-notification-response.js +2 -0
  41. package/dist/cjs/notifications/types/api-key/index.js +17 -0
  42. package/dist/cjs/notifications/types/discount-group/discount-group-notification-response.js +2 -0
  43. package/dist/cjs/notifications/types/discount-group/index.js +17 -0
  44. package/dist/cjs/notifications/types/index.js +2 -0
  45. package/dist/cjs/notifications/types/shared/index.js +2 -0
  46. package/dist/cjs/notifications/types/shared/korean-market-underlying-details-notification.js +2 -0
  47. package/dist/cjs/notifications/types/shared/payment-method-underlying-details-notification.js +2 -0
  48. package/dist/cjs/paddle.js +1 -0
  49. package/dist/cjs/resources/discount-groups/index.js +47 -0
  50. package/dist/cjs/resources/discount-groups/operations/create-discount-group-request-body.js +2 -0
  51. package/dist/cjs/resources/discount-groups/operations/index.js +18 -0
  52. package/dist/cjs/resources/discount-groups/operations/list-discount-group-query-parameters.js +2 -0
  53. package/dist/cjs/resources/index.js +1 -0
  54. package/dist/cjs/types/discount-group/discount-group-response.js +2 -0
  55. package/dist/cjs/types/discount-group/index.js +17 -0
  56. package/dist/cjs/types/index.js +1 -0
  57. package/dist/cjs/types/shared/index.js +2 -0
  58. package/dist/cjs/types/shared/korean-market-underlying-details.js +2 -0
  59. package/dist/cjs/types/shared/payment-method-underlying-details.js +2 -0
  60. package/dist/cjs/version.js +1 -1
  61. package/dist/esm/entities/discount/discount.js +1 -0
  62. package/dist/esm/entities/discount-group/discount-group-collection.js +7 -0
  63. package/dist/esm/entities/discount-group/discount-group.js +11 -0
  64. package/dist/esm/entities/discount-group/index.js +2 -0
  65. package/dist/esm/entities/index.js +1 -0
  66. package/dist/esm/entities/payment-method/payment-method.js +4 -1
  67. package/dist/esm/entities/shared/index.js +2 -0
  68. package/dist/esm/entities/shared/korean-market-underlying-details.js +5 -0
  69. package/dist/esm/entities/shared/payment-method-details.js +4 -0
  70. package/dist/esm/entities/shared/payment-method-underlying-details.js +8 -0
  71. package/dist/esm/enums/api-key/api-key-permission.js +1 -0
  72. package/dist/esm/enums/api-key/api-key-status.js +1 -0
  73. package/dist/esm/enums/api-key/index.js +2 -0
  74. package/dist/esm/enums/discount/discount-mode.js +1 -0
  75. package/dist/esm/enums/discount/index.js +1 -0
  76. package/dist/esm/enums/index.js +1 -0
  77. package/dist/esm/enums/shared/index.js +1 -0
  78. package/dist/esm/enums/shared/korean-market-underlying-payment-method-type.js +1 -0
  79. package/dist/esm/notifications/entities/api-key/api-key-notification.js +15 -0
  80. package/dist/esm/notifications/entities/api-key/index.js +1 -0
  81. package/dist/esm/notifications/entities/discount/discount-notification.js +1 -0
  82. package/dist/esm/notifications/entities/discount-group/discount-group-notification.js +13 -0
  83. package/dist/esm/notifications/entities/discount-group/index.js +1 -0
  84. package/dist/esm/notifications/entities/index.js +2 -0
  85. package/dist/esm/notifications/entities/shared/index.js +2 -0
  86. package/dist/esm/notifications/entities/shared/korean-market-underlying-details-notification.js +5 -0
  87. package/dist/esm/notifications/entities/shared/payment-method-details-notification.js +4 -0
  88. package/dist/esm/notifications/entities/shared/payment-method-underlying-details-notification.js +8 -0
  89. package/dist/esm/notifications/events/api-key/api-key-created-event.js +10 -0
  90. package/dist/esm/notifications/events/api-key/api-key-expired-event.js +10 -0
  91. package/dist/esm/notifications/events/api-key/api-key-expiring-event.js +10 -0
  92. package/dist/esm/notifications/events/api-key/api-key-revoked-event.js +10 -0
  93. package/dist/esm/notifications/events/api-key/api-key-updated-event.js +10 -0
  94. package/dist/esm/notifications/events/api-key/index.js +5 -0
  95. package/dist/esm/notifications/events/discount-group/discount-group-created-event.js +10 -0
  96. package/dist/esm/notifications/events/discount-group/index.js +1 -0
  97. package/dist/esm/notifications/events/index.js +2 -0
  98. package/dist/esm/notifications/helpers/types.js +6 -0
  99. package/dist/esm/notifications/helpers/webhooks.js +13 -1
  100. package/dist/esm/notifications/types/api-key/api-key-notification-response.js +1 -0
  101. package/dist/esm/notifications/types/api-key/index.js +1 -0
  102. package/dist/esm/notifications/types/discount-group/discount-group-notification-response.js +1 -0
  103. package/dist/esm/notifications/types/discount-group/index.js +1 -0
  104. package/dist/esm/notifications/types/index.js +2 -0
  105. package/dist/esm/notifications/types/shared/index.js +2 -0
  106. package/dist/esm/notifications/types/shared/korean-market-underlying-details-notification.js +1 -0
  107. package/dist/esm/notifications/types/shared/payment-method-underlying-details-notification.js +1 -0
  108. package/dist/esm/paddle.js +2 -1
  109. package/dist/esm/resources/discount-groups/index.js +29 -0
  110. package/dist/esm/resources/discount-groups/operations/create-discount-group-request-body.js +1 -0
  111. package/dist/esm/resources/discount-groups/operations/index.js +2 -0
  112. package/dist/esm/resources/discount-groups/operations/list-discount-group-query-parameters.js +1 -0
  113. package/dist/esm/resources/index.js +1 -0
  114. package/dist/esm/types/discount-group/discount-group-response.js +1 -0
  115. package/dist/esm/types/discount-group/index.js +1 -0
  116. package/dist/esm/types/index.js +1 -0
  117. package/dist/esm/types/shared/index.js +2 -0
  118. package/dist/esm/types/shared/korean-market-underlying-details.js +1 -0
  119. package/dist/esm/types/shared/payment-method-underlying-details.js +1 -0
  120. package/dist/esm/version.js +1 -1
  121. package/dist/tsconfig.cjs.tsbuildinfo +1 -1
  122. package/dist/tsconfig.esm.tsbuildinfo +1 -1
  123. package/dist/tsconfig.types.tsbuildinfo +1 -1
  124. package/dist/types/entities/discount/discount.d.ts +2 -1
  125. package/dist/types/entities/discount-group/discount-group-collection.d.ts +6 -0
  126. package/dist/types/entities/discount-group/discount-group.d.ts +12 -0
  127. package/dist/types/entities/discount-group/index.d.ts +2 -0
  128. package/dist/types/entities/index.d.ts +1 -0
  129. package/dist/types/entities/payment-method/payment-method.d.ts +2 -1
  130. package/dist/types/entities/shared/index.d.ts +2 -0
  131. package/dist/types/entities/shared/korean-market-underlying-details.d.ts +6 -0
  132. package/dist/types/entities/shared/payment-method-details.d.ts +2 -0
  133. package/dist/types/entities/shared/payment-method-underlying-details.d.ts +6 -0
  134. package/dist/types/enums/adjustment/adjustment-action.d.ts +1 -1
  135. package/dist/types/enums/api-key/api-key-permission.d.ts +1 -0
  136. package/dist/types/enums/api-key/api-key-status.d.ts +1 -0
  137. package/dist/types/enums/api-key/index.d.ts +2 -0
  138. package/dist/types/enums/discount/discount-mode.d.ts +1 -0
  139. package/dist/types/enums/discount/index.d.ts +1 -0
  140. package/dist/types/enums/index.d.ts +1 -0
  141. package/dist/types/enums/report/report-type.d.ts +1 -1
  142. package/dist/types/enums/shared/available-payment-methods.d.ts +1 -1
  143. package/dist/types/enums/shared/index.d.ts +1 -0
  144. package/dist/types/enums/shared/korean-market-underlying-payment-method-type.d.ts +1 -0
  145. package/dist/types/enums/shared/payment-type.d.ts +1 -1
  146. package/dist/types/notifications/entities/api-key/api-key-notification.d.ts +15 -0
  147. package/dist/types/notifications/entities/api-key/index.d.ts +1 -0
  148. package/dist/types/notifications/entities/discount/discount-notification.d.ts +2 -1
  149. package/dist/types/notifications/entities/discount-group/discount-group-notification.d.ts +12 -0
  150. package/dist/types/notifications/entities/discount-group/index.d.ts +1 -0
  151. package/dist/types/notifications/entities/index.d.ts +2 -0
  152. package/dist/types/notifications/entities/payment-method/payment-method-deleted-notification.d.ts +1 -1
  153. package/dist/types/notifications/entities/shared/index.d.ts +2 -0
  154. package/dist/types/notifications/entities/shared/korean-market-underlying-details-notification.d.ts +6 -0
  155. package/dist/types/notifications/entities/shared/payment-method-details-notification.d.ts +2 -0
  156. package/dist/types/notifications/entities/shared/payment-method-underlying-details-notification.d.ts +6 -0
  157. package/dist/types/notifications/events/api-key/api-key-created-event.d.ts +10 -0
  158. package/dist/types/notifications/events/api-key/api-key-expired-event.d.ts +10 -0
  159. package/dist/types/notifications/events/api-key/api-key-expiring-event.d.ts +10 -0
  160. package/dist/types/notifications/events/api-key/api-key-revoked-event.d.ts +10 -0
  161. package/dist/types/notifications/events/api-key/api-key-updated-event.d.ts +10 -0
  162. package/dist/types/notifications/events/api-key/index.d.ts +5 -0
  163. package/dist/types/notifications/events/discount-group/discount-group-created-event.d.ts +10 -0
  164. package/dist/types/notifications/events/discount-group/index.d.ts +1 -0
  165. package/dist/types/notifications/events/index.d.ts +2 -0
  166. package/dist/types/notifications/helpers/types.d.ts +9 -3
  167. package/dist/types/notifications/types/api-key/api-key-notification-response.d.ts +13 -0
  168. package/dist/types/notifications/types/api-key/index.d.ts +1 -0
  169. package/dist/types/notifications/types/discount/discount-notification-response.d.ts +2 -1
  170. package/dist/types/notifications/types/discount-group/discount-group-notification-response.d.ts +10 -0
  171. package/dist/types/notifications/types/discount-group/index.d.ts +1 -0
  172. package/dist/types/notifications/types/index.d.ts +2 -0
  173. package/dist/types/notifications/types/shared/index.d.ts +2 -0
  174. package/dist/types/notifications/types/shared/korean-market-underlying-details-notification.d.ts +4 -0
  175. package/dist/types/notifications/types/shared/payment-method-details.d.ts +3 -1
  176. package/dist/types/notifications/types/shared/payment-method-underlying-details-notification.d.ts +4 -0
  177. package/dist/types/paddle.d.ts +2 -1
  178. package/dist/types/resources/discount-groups/index.d.ts +8 -0
  179. package/dist/types/resources/discount-groups/operations/create-discount-group-request-body.d.ts +3 -0
  180. package/dist/types/resources/discount-groups/operations/index.d.ts +2 -0
  181. package/dist/types/resources/discount-groups/operations/list-discount-group-query-parameters.d.ts +6 -0
  182. package/dist/types/resources/discounts/operations/create-discount-request-body.d.ts +2 -1
  183. package/dist/types/resources/discounts/operations/list-discount-query-parameters.d.ts +2 -1
  184. package/dist/types/resources/discounts/operations/update-discount-request-body.d.ts +2 -1
  185. package/dist/types/resources/index.d.ts +1 -0
  186. package/dist/types/types/discount/discount-response.d.ts +2 -1
  187. package/dist/types/types/discount-group/discount-group-response.d.ts +10 -0
  188. package/dist/types/types/discount-group/index.d.ts +1 -0
  189. package/dist/types/types/events/events-response.d.ts +20 -2
  190. package/dist/types/types/index.d.ts +1 -0
  191. package/dist/types/types/payment-method/payment-method.d.ts +4 -2
  192. package/dist/types/types/shared/index.d.ts +2 -0
  193. package/dist/types/types/shared/korean-market-underlying-details.d.ts +4 -0
  194. package/dist/types/types/shared/payment-method-details.d.ts +3 -1
  195. package/dist/types/types/shared/payment-method-underlying-details.d.ts +4 -0
  196. package/dist/types/version.d.ts +1 -1
  197. package/package.json +5 -5
@@ -0,0 +1,12 @@
1
+ import { type IDiscountGroupResponse } from '../../types/index.js';
2
+ import { Status } from '../../enums/index.js';
3
+ import { ImportMeta } from '../index.js';
4
+ export declare class DiscountGroup {
5
+ readonly id: string;
6
+ readonly name: string;
7
+ readonly status: Status;
8
+ readonly createdAt: string;
9
+ readonly updatedAt: string;
10
+ readonly importMeta: ImportMeta | null;
11
+ constructor(discountGroupResponse: IDiscountGroupResponse);
12
+ }
@@ -0,0 +1,2 @@
1
+ export * from './discount-group.js';
2
+ export * from './discount-group-collection.js';
@@ -9,6 +9,7 @@ export * from './business/index.js';
9
9
  export * from './subscription/index.js';
10
10
  export * from './address/index.js';
11
11
  export * from './discount/index.js';
12
+ export * from './discount-group/index.js';
12
13
  export * from './events/index.js';
13
14
  export * from './payment-method/index.js';
14
15
  export * from './payout/index.js';
@@ -1,6 +1,6 @@
1
1
  import type { SavedPaymentMethodType, SavedPaymentOrigin } from '../../enums/index.js';
2
2
  import type { IPaymentMethodResponse } from '../../types/index.js';
3
- import { PaymentCard, PayPal } from '../shared/index.js';
3
+ import { PaymentCard, PaymentMethodUnderlyingDetails, PayPal } from '../shared/index.js';
4
4
  export declare class PaymentMethod {
5
5
  readonly id: string;
6
6
  readonly customerId: string;
@@ -8,6 +8,7 @@ export declare class PaymentMethod {
8
8
  readonly type: SavedPaymentMethodType;
9
9
  readonly card: PaymentCard | null;
10
10
  readonly paypal: PayPal | null;
11
+ readonly underlyingDetails: PaymentMethodUnderlyingDetails | null;
11
12
  readonly origin: SavedPaymentOrigin;
12
13
  readonly savedAt: string;
13
14
  readonly updatedAt: string;
@@ -21,3 +21,5 @@ export * from './payout-totals-adjustment.js';
21
21
  export * from './import-meta.js';
22
22
  export * from './simulation-event-request.js';
23
23
  export * from './simulation-event-response.js';
24
+ export * from './payment-method-underlying-details.js';
25
+ export * from './korean-market-underlying-details.js';
@@ -0,0 +1,6 @@
1
+ import { IKoreanMarketUnderlyingDetails } from '../../types/index.js';
2
+ import { KoreanMarketUnderlyingPaymentMethodType } from '../../enums/index.js';
3
+ export declare class KoreanMarketUnderlyingDetails {
4
+ readonly type: KoreanMarketUnderlyingPaymentMethodType | null;
5
+ constructor(koreanMarketUnderlyingDetails: IKoreanMarketUnderlyingDetails);
6
+ }
@@ -1,8 +1,10 @@
1
1
  import { type PaymentType } from '../../enums/index.js';
2
2
  import { PaymentCard } from './payment-card.js';
3
3
  import { type IPaymentMethodDetails } from '../../types/index.js';
4
+ import { PaymentMethodUnderlyingDetails } from './payment-method-underlying-details.js';
4
5
  export declare class PaymentMethodDetails {
5
6
  readonly type: PaymentType;
6
7
  readonly card: PaymentCard | null;
8
+ readonly underlyingDetails: PaymentMethodUnderlyingDetails | null;
7
9
  constructor(paymentMethodDetails: IPaymentMethodDetails);
8
10
  }
@@ -0,0 +1,6 @@
1
+ import { IPaymentMethodUnderlyingDetails } from '../../types/index.js';
2
+ import { KoreanMarketUnderlyingDetails } from './korean-market-underlying-details.js';
3
+ export declare class PaymentMethodUnderlyingDetails {
4
+ readonly koreaLocal: KoreanMarketUnderlyingDetails | null;
5
+ constructor(paymentMethodUnderlyingDetails: IPaymentMethodUnderlyingDetails);
6
+ }
@@ -1 +1 @@
1
- export type AdjustmentAction = 'credit' | 'credit_reverse' | 'refund' | 'chargeback' | 'chargeback_reverse' | 'chargeback_warning';
1
+ export type AdjustmentAction = 'credit' | 'credit_reverse' | 'refund' | 'chargeback' | 'chargeback_reverse' | 'chargeback_warning' | 'chargeback_warning_reverse';
@@ -0,0 +1 @@
1
+ export type ApiKeyPermission = 'address.read' | 'address.write' | 'adjustment.read' | 'adjustment.write' | 'business.read' | 'business.write' | 'customer.read' | 'customer.write' | 'customer_auth_token.write' | 'customer_portal_session.write' | 'discount.read' | 'discount.write' | 'notification.read' | 'notification.write' | 'notification_setting.read' | 'notification_setting.write' | 'notification_simulation.read' | 'notification_simulation.write' | 'payment_method.read' | 'payment_method.write' | 'price.read' | 'price.write' | 'product.read' | 'product.write' | 'report.read' | 'report.write' | 'subscription.read' | 'subscription.write' | 'transaction.read' | 'transaction.write';
@@ -0,0 +1 @@
1
+ export type ApiKeyStatus = 'active' | 'expired' | 'revoked';
@@ -0,0 +1,2 @@
1
+ export * from './api-key-status.js';
2
+ export * from './api-key-permission.js';
@@ -0,0 +1 @@
1
+ export type DiscountMode = 'standard' | 'custom';
@@ -1,2 +1,3 @@
1
1
  export * from './discount-status.js';
2
2
  export * from './discount-type.js';
3
+ export * from './discount-mode.js';
@@ -12,3 +12,4 @@ export * from './simulation-type/index.js';
12
12
  export * from './simulation/index.js';
13
13
  export * from './simulation-run/index.js';
14
14
  export * from './simulation-run-event/index.js';
15
+ export * from './api-key/index.js';
@@ -1 +1 @@
1
- export type ReportType = 'adjustments' | 'adjustment_line_items' | 'transactions' | 'transaction_line_items' | 'discounts' | 'products_prices';
1
+ export type ReportType = 'adjustments' | 'adjustment_line_items' | 'transactions' | 'transaction_line_items' | 'discounts' | 'products_prices' | 'balance';
@@ -1 +1 @@
1
- export type AvailablePaymentMethod = 'alipay' | 'apple_pay' | 'bancontact' | 'card' | 'google_pay' | 'ideal' | 'paypal';
1
+ export type AvailablePaymentMethod = 'alipay' | 'apple_pay' | 'bancontact' | 'card' | 'google_pay' | 'ideal' | 'korea_local' | 'paypal';
@@ -14,3 +14,4 @@ export * from './payment-type.js';
14
14
  export * from './catalog-type.js';
15
15
  export * from './available-payment-methods.js';
16
16
  export * from './disposition.js';
17
+ export * from './korean-market-underlying-payment-method-type.js';
@@ -0,0 +1 @@
1
+ export type KoreanMarketUnderlyingPaymentMethodType = 'bc' | 'citi' | 'hana' | 'hyundai' | 'jeju' | 'jeonbuk' | 'kakaobank' | 'kakaopay' | 'kbank' | 'kdbbank' | 'kookmin' | 'kwangju' | 'lotte' | 'mg' | 'naverpaycard' | 'naverpaypoint' | 'nh' | 'payco' | 'post' | 'samsung' | 'samsungpay' | 'savingsbank' | 'shinhan' | 'shinhyup' | 'suhyup' | 'tossbank' | 'unknown' | 'woori';
@@ -1 +1 @@
1
- export type PaymentType = 'alipay' | 'apple_pay' | 'bancontact' | 'card' | 'google_pay' | 'ideal' | 'offline' | 'paypal' | 'unknown' | 'wire_transfer';
1
+ export type PaymentType = 'alipay' | 'apple_pay' | 'bancontact' | 'card' | 'google_pay' | 'ideal' | 'korea_local' | 'offline' | 'paypal' | 'unknown' | 'wire_transfer';
@@ -0,0 +1,15 @@
1
+ import { IApiKeyNotificationResponse } from '../../types/index.js';
2
+ import { ApiKeyPermission, ApiKeyStatus } from '../../../enums/index.js';
3
+ export declare class ApiKeyNotification {
4
+ readonly id: string;
5
+ readonly name: string;
6
+ readonly description: string | null;
7
+ readonly key: string;
8
+ readonly status: ApiKeyStatus;
9
+ readonly permissions: ApiKeyPermission[];
10
+ readonly expiresAt: string | null;
11
+ readonly lastUsedAt: string | null;
12
+ readonly createdAt: string;
13
+ readonly updatedAt: string;
14
+ constructor(apiKey: IApiKeyNotificationResponse);
15
+ }
@@ -0,0 +1 @@
1
+ export * from './api-key-notification.js';
@@ -1,4 +1,4 @@
1
- import { type CurrencyCode, type DiscountStatus, type DiscountType } from '../../../enums/index.js';
1
+ import { type CurrencyCode, type DiscountMode, type DiscountStatus, type DiscountType } from '../../../enums/index.js';
2
2
  import { type CustomData } from '../../../entities/index.js';
3
3
  import { ImportMetaNotification } from '../shared/index.js';
4
4
  import { type IDiscountNotificationResponse } from '../../types/index.js';
@@ -8,6 +8,7 @@ export declare class DiscountNotification {
8
8
  readonly description: string;
9
9
  readonly enabledForCheckout: boolean;
10
10
  readonly code: string | null;
11
+ readonly mode: DiscountMode | null;
11
12
  readonly type: DiscountType;
12
13
  readonly amount: string;
13
14
  readonly currencyCode: CurrencyCode | null;
@@ -0,0 +1,12 @@
1
+ import { Status } from '../../../enums/index.js';
2
+ import { ImportMetaNotification } from '../shared/index.js';
3
+ import { IDiscountGroupNotificationResponse } from '../../types/index.js';
4
+ export declare class DiscountGroupNotification {
5
+ readonly id: string;
6
+ readonly name: string;
7
+ readonly status: Status;
8
+ readonly createdAt: string;
9
+ readonly updatedAt: string;
10
+ readonly importMeta: ImportMetaNotification | null;
11
+ constructor(discountGroupResponse: IDiscountGroupNotificationResponse);
12
+ }
@@ -0,0 +1 @@
1
+ export * from './discount-group-notification.js';
@@ -7,7 +7,9 @@ export * from './business/index.js';
7
7
  export * from './subscription/index.js';
8
8
  export * from './address/index.js';
9
9
  export * from './discount/index.js';
10
+ export * from './discount-group/index.js';
10
11
  export * from './payment-method/index.js';
11
12
  export * from './payout/index.js';
12
13
  export * from './report/index.js';
13
14
  export * from './shared/index.js';
15
+ export * from './api-key/index.js';
@@ -1,5 +1,5 @@
1
1
  import { type IPaymentMethodDeletedNotificationResponse } from '../../types/index.js';
2
- import { type SavedPaymentMethodType, type SavedPaymentOrigin, type SavedPaymentDeletionReason } from '../../../enums/index.js';
2
+ import { type SavedPaymentDeletionReason, type SavedPaymentMethodType, type SavedPaymentOrigin } from '../../../enums/index.js';
3
3
  export declare class PaymentMethodDeletedNotification {
4
4
  readonly id: string;
5
5
  readonly customerId: string;
@@ -18,3 +18,5 @@ export * from './transaction-checkout-notification.js';
18
18
  export * from './total-adjustments-notification.js';
19
19
  export * from './payout-totals-adjustment-notification.js';
20
20
  export * from './import-meta-notification.js';
21
+ export * from './korean-market-underlying-details-notification.js';
22
+ export * from './payment-method-underlying-details-notification.js';
@@ -0,0 +1,6 @@
1
+ import { KoreanMarketUnderlyingPaymentMethodType } from '../../../enums/index.js';
2
+ import { IKoreanMarketUnderlyingDetailsNotification } from '../../types/index.js';
3
+ export declare class KoreanMarketUnderlyingDetailsNotification {
4
+ readonly type: KoreanMarketUnderlyingPaymentMethodType | null;
5
+ constructor(koreanMarketUnderlyingDetails: IKoreanMarketUnderlyingDetailsNotification);
6
+ }
@@ -1,8 +1,10 @@
1
1
  import { type PaymentType } from '../../../enums/index.js';
2
2
  import { PaymentCardNotification } from './payment-card-notification.js';
3
3
  import { type IPaymentMethodDetailsNotification } from '../../types/index.js';
4
+ import { PaymentMethodUnderlyingDetailsNotification } from './payment-method-underlying-details-notification.js';
4
5
  export declare class PaymentMethodDetailsNotification {
5
6
  readonly type: PaymentType;
6
7
  readonly card: PaymentCardNotification | null;
8
+ readonly underlyingDetails: PaymentMethodUnderlyingDetailsNotification | null;
7
9
  constructor(paymentMethodDetails: IPaymentMethodDetailsNotification);
8
10
  }
@@ -0,0 +1,6 @@
1
+ import { IPaymentMethodUnderlyingDetailsNotification } from '../../types/index.js';
2
+ import { KoreanMarketUnderlyingDetailsNotification } from './korean-market-underlying-details-notification.js';
3
+ export declare class PaymentMethodUnderlyingDetailsNotification {
4
+ readonly koreaLocal: KoreanMarketUnderlyingDetailsNotification | null;
5
+ constructor(paymentMethodUnderlyingDetails: IPaymentMethodUnderlyingDetailsNotification);
6
+ }
@@ -0,0 +1,10 @@
1
+ import { Event } from '../../../entities/events/event.js';
2
+ import { EventName } from '../../helpers/index.js';
3
+ import { ApiKeyNotification } from '../../entities/index.js';
4
+ import { type IEventsResponse } from '../../../types/index.js';
5
+ import { IApiKeyNotificationResponse } from '../../types/index.js';
6
+ export declare class ApiKeyCreatedEvent extends Event {
7
+ readonly eventType = EventName.ApiKeyCreated;
8
+ readonly data: ApiKeyNotification;
9
+ constructor(response: IEventsResponse<IApiKeyNotificationResponse>);
10
+ }
@@ -0,0 +1,10 @@
1
+ import { Event } from '../../../entities/events/event.js';
2
+ import { EventName } from '../../helpers/index.js';
3
+ import { ApiKeyNotification } from '../../entities/index.js';
4
+ import { type IEventsResponse } from '../../../types/index.js';
5
+ import { IApiKeyNotificationResponse } from '../../types/index.js';
6
+ export declare class ApiKeyExpiredEvent extends Event {
7
+ readonly eventType = EventName.ApiKeyExpired;
8
+ readonly data: ApiKeyNotification;
9
+ constructor(response: IEventsResponse<IApiKeyNotificationResponse>);
10
+ }
@@ -0,0 +1,10 @@
1
+ import { Event } from '../../../entities/events/event.js';
2
+ import { EventName } from '../../helpers/index.js';
3
+ import { ApiKeyNotification } from '../../entities/index.js';
4
+ import { type IEventsResponse } from '../../../types/index.js';
5
+ import { IApiKeyNotificationResponse } from '../../types/index.js';
6
+ export declare class ApiKeyExpiringEvent extends Event {
7
+ readonly eventType = EventName.ApiKeyExpiring;
8
+ readonly data: ApiKeyNotification;
9
+ constructor(response: IEventsResponse<IApiKeyNotificationResponse>);
10
+ }
@@ -0,0 +1,10 @@
1
+ import { Event } from '../../../entities/events/event.js';
2
+ import { EventName } from '../../helpers/index.js';
3
+ import { ApiKeyNotification } from '../../entities/index.js';
4
+ import { type IEventsResponse } from '../../../types/index.js';
5
+ import { IApiKeyNotificationResponse } from '../../types/index.js';
6
+ export declare class ApiKeyRevokedEvent extends Event {
7
+ readonly eventType = EventName.ApiKeyRevoked;
8
+ readonly data: ApiKeyNotification;
9
+ constructor(response: IEventsResponse<IApiKeyNotificationResponse>);
10
+ }
@@ -0,0 +1,10 @@
1
+ import { Event } from '../../../entities/events/event.js';
2
+ import { EventName } from '../../helpers/index.js';
3
+ import { ApiKeyNotification } from '../../entities/index.js';
4
+ import { type IEventsResponse } from '../../../types/index.js';
5
+ import { IApiKeyNotificationResponse } from '../../types/index.js';
6
+ export declare class ApiKeyUpdatedEvent extends Event {
7
+ readonly eventType = EventName.ApiKeyUpdated;
8
+ readonly data: ApiKeyNotification;
9
+ constructor(response: IEventsResponse<IApiKeyNotificationResponse>);
10
+ }
@@ -0,0 +1,5 @@
1
+ export * from './api-key-created-event.js';
2
+ export * from './api-key-expired-event.js';
3
+ export * from './api-key-expiring-event.js';
4
+ export * from './api-key-revoked-event.js';
5
+ export * from './api-key-updated-event.js';
@@ -0,0 +1,10 @@
1
+ import { Event } from '../../../entities/events/event.js';
2
+ import { EventName } from '../../helpers/index.js';
3
+ import { DiscountGroupNotification } from '../../entities/index.js';
4
+ import { type IEventsResponse } from '../../../types/index.js';
5
+ import { IDiscountGroupNotificationResponse } from '../../types/index.js';
6
+ export declare class DiscountGroupCreatedEvent extends Event {
7
+ readonly eventType = EventName.DiscountGroupCreated;
8
+ readonly data: DiscountGroupNotification;
9
+ constructor(response: IEventsResponse<IDiscountGroupNotificationResponse>);
10
+ }
@@ -0,0 +1 @@
1
+ export * from './discount-group-created-event.js';
@@ -3,6 +3,7 @@ export * from './adjustment/index.js';
3
3
  export * from './business/index.js';
4
4
  export * from './customer/index.js';
5
5
  export * from './discount/index.js';
6
+ export * from './discount-group/index.js';
6
7
  export * from './generic/index.js';
7
8
  export * from './payment-method/index.js';
8
9
  export * from './payout/index.js';
@@ -11,3 +12,4 @@ export * from './product/index.js';
11
12
  export * from './subscription/index.js';
12
13
  export * from './transaction/index.js';
13
14
  export * from './report/index.js';
15
+ export * from './api-key/index.js';
@@ -1,11 +1,16 @@
1
- import { type AddressCreatedEvent, type AddressImportedEvent, type AddressUpdatedEvent, type AdjustmentCreatedEvent, type AdjustmentUpdatedEvent, type BusinessCreatedEvent, type BusinessImportedEvent, type BusinessUpdatedEvent, type CustomerCreatedEvent, type CustomerImportedEvent, type CustomerUpdatedEvent, type DiscountCreatedEvent, type DiscountImportedEvent, type DiscountUpdatedEvent, type PaymentMethodDeletedEvent, type PaymentMethodSavedEvent, type PayoutCreatedEvent, type PayoutPaidEvent, type PriceCreatedEvent, type PriceImportedEvent, type PriceUpdatedEvent, type ProductCreatedEvent, type ProductImportedEvent, type ProductUpdatedEvent, type ReportCreatedEvent, type ReportUpdatedEvent, type SubscriptionActivatedEvent, type SubscriptionCanceledEvent, type SubscriptionCreatedEvent, type SubscriptionImportedEvent, type SubscriptionPastDueEvent, type SubscriptionPausedEvent, type SubscriptionResumedEvent, type SubscriptionTrialingEvent, type SubscriptionUpdatedEvent, type TransactionBilledEvent, type TransactionCanceledEvent, type TransactionCompletedEvent, type TransactionCreatedEvent, type TransactionPaidEvent, type TransactionPastDueEvent, type TransactionPaymentFailedEvent, type TransactionReadyEvent, type TransactionUpdatedEvent, type TransactionRevisedEvent } from '../events/index.js';
2
- export type EventEntity = AddressCreatedEvent | AddressUpdatedEvent | AddressImportedEvent | AdjustmentUpdatedEvent | AdjustmentCreatedEvent | BusinessCreatedEvent | BusinessUpdatedEvent | BusinessImportedEvent | CustomerCreatedEvent | CustomerUpdatedEvent | CustomerImportedEvent | DiscountCreatedEvent | DiscountUpdatedEvent | DiscountImportedEvent | PaymentMethodDeletedEvent | PaymentMethodSavedEvent | PayoutCreatedEvent | PayoutPaidEvent | PriceCreatedEvent | PriceUpdatedEvent | PriceImportedEvent | ProductCreatedEvent | ProductUpdatedEvent | ProductImportedEvent | SubscriptionActivatedEvent | SubscriptionCanceledEvent | SubscriptionCreatedEvent | SubscriptionImportedEvent | SubscriptionPastDueEvent | SubscriptionPausedEvent | SubscriptionResumedEvent | SubscriptionTrialingEvent | SubscriptionUpdatedEvent | TransactionBilledEvent | TransactionCanceledEvent | TransactionCompletedEvent | TransactionCreatedEvent | TransactionPaidEvent | TransactionPastDueEvent | TransactionPaymentFailedEvent | TransactionReadyEvent | TransactionUpdatedEvent | TransactionRevisedEvent | ReportUpdatedEvent | ReportCreatedEvent;
1
+ import { type AddressCreatedEvent, type AddressImportedEvent, type AddressUpdatedEvent, type AdjustmentCreatedEvent, type AdjustmentUpdatedEvent, type ApiKeyCreatedEvent, type ApiKeyExpiredEvent, type ApiKeyExpiringEvent, type ApiKeyRevokedEvent, type ApiKeyUpdatedEvent, type BusinessCreatedEvent, type BusinessImportedEvent, type BusinessUpdatedEvent, type CustomerCreatedEvent, type CustomerImportedEvent, type CustomerUpdatedEvent, type DiscountCreatedEvent, type DiscountGroupCreatedEvent, type DiscountImportedEvent, type DiscountUpdatedEvent, type PaymentMethodDeletedEvent, type PaymentMethodSavedEvent, type PayoutCreatedEvent, type PayoutPaidEvent, type PriceCreatedEvent, type PriceImportedEvent, type PriceUpdatedEvent, type ProductCreatedEvent, type ProductImportedEvent, type ProductUpdatedEvent, type ReportCreatedEvent, type ReportUpdatedEvent, type SubscriptionActivatedEvent, type SubscriptionCanceledEvent, type SubscriptionCreatedEvent, type SubscriptionImportedEvent, type SubscriptionPastDueEvent, type SubscriptionPausedEvent, type SubscriptionResumedEvent, type SubscriptionTrialingEvent, type SubscriptionUpdatedEvent, type TransactionBilledEvent, type TransactionCanceledEvent, type TransactionCompletedEvent, type TransactionCreatedEvent, type TransactionPaidEvent, type TransactionPastDueEvent, type TransactionPaymentFailedEvent, type TransactionReadyEvent, type TransactionRevisedEvent, type TransactionUpdatedEvent } from '../events/index.js';
2
+ export type EventEntity = AddressCreatedEvent | AddressUpdatedEvent | AddressImportedEvent | AdjustmentUpdatedEvent | AdjustmentCreatedEvent | ApiKeyCreatedEvent | ApiKeyUpdatedEvent | ApiKeyExpiringEvent | ApiKeyExpiredEvent | ApiKeyRevokedEvent | BusinessCreatedEvent | BusinessUpdatedEvent | BusinessImportedEvent | CustomerCreatedEvent | CustomerUpdatedEvent | CustomerImportedEvent | DiscountCreatedEvent | DiscountUpdatedEvent | DiscountImportedEvent | DiscountGroupCreatedEvent | PaymentMethodDeletedEvent | PaymentMethodSavedEvent | PayoutCreatedEvent | PayoutPaidEvent | PriceCreatedEvent | PriceUpdatedEvent | PriceImportedEvent | ProductCreatedEvent | ProductUpdatedEvent | ProductImportedEvent | SubscriptionActivatedEvent | SubscriptionCanceledEvent | SubscriptionCreatedEvent | SubscriptionImportedEvent | SubscriptionPastDueEvent | SubscriptionPausedEvent | SubscriptionResumedEvent | SubscriptionTrialingEvent | SubscriptionUpdatedEvent | TransactionBilledEvent | TransactionCanceledEvent | TransactionCompletedEvent | TransactionCreatedEvent | TransactionPaidEvent | TransactionPastDueEvent | TransactionPaymentFailedEvent | TransactionReadyEvent | TransactionUpdatedEvent | TransactionRevisedEvent | ReportUpdatedEvent | ReportCreatedEvent;
3
3
  export declare enum EventName {
4
4
  AddressCreated = "address.created",
5
5
  AddressUpdated = "address.updated",
6
6
  AddressImported = "address.imported",
7
7
  AdjustmentCreated = "adjustment.created",
8
8
  AdjustmentUpdated = "adjustment.updated",
9
+ ApiKeyCreated = "api_key.created",
10
+ ApiKeyUpdated = "api_key.updated",
11
+ ApiKeyExpiring = "api_key.expiring",
12
+ ApiKeyExpired = "api_key.expired",
13
+ ApiKeyRevoked = "api_key.revoked",
9
14
  BusinessCreated = "business.created",
10
15
  BusinessImported = "business.imported",
11
16
  BusinessUpdated = "business.updated",
@@ -15,6 +20,7 @@ export declare enum EventName {
15
20
  DiscountCreated = "discount.created",
16
21
  DiscountUpdated = "discount.updated",
17
22
  DiscountImported = "discount.imported",
23
+ DiscountGroupCreated = "discount_group.created",
18
24
  PaymentMethodDeleted = "payment_method.deleted",
19
25
  PaymentMethodSaved = "payment_method.saved",
20
26
  PayoutCreated = "payout.created",
@@ -47,4 +53,4 @@ export declare enum EventName {
47
53
  ReportCreated = "report.created",
48
54
  ReportUpdated = "report.updated"
49
55
  }
50
- export type IEventName = 'address.created' | 'address.updated' | 'address.imported' | 'adjustment.created' | 'adjustment.updated' | 'business.created' | 'business.updated' | 'business.imported' | 'customer.created' | 'customer.imported' | 'customer.updated' | 'discount.created' | 'discount.updated' | 'discount.imported' | 'payment_method.saved' | 'payment_method.deleted' | 'payout.created' | 'payout.updated' | 'payout.paid' | 'price.updated' | 'price.created' | 'price.imported' | 'product.updated' | 'product.created' | 'product.imported' | 'subscription.activated' | 'subscription.canceled' | 'subscription.imported' | 'subscription.created' | 'subscription.past_due' | 'subscription.paused' | 'subscription.resumed' | 'subscription.trialing' | 'subscription.updated' | 'transaction.billed' | 'transaction.canceled' | 'transaction.completed' | 'transaction.paid' | 'transaction.created' | 'transaction.past_due' | 'transaction.payment_failed' | 'transaction.ready' | 'transaction.updated' | 'transaction.revised' | 'report.created' | 'report.updated';
56
+ export type IEventName = 'address.created' | 'address.updated' | 'address.imported' | 'adjustment.created' | 'adjustment.updated' | 'api_key.created' | 'api_key.updated' | 'api_key.expiring' | 'api_key.expired' | 'api_key.revoked' | 'business.created' | 'business.updated' | 'business.imported' | 'customer.created' | 'customer.imported' | 'customer.updated' | 'discount.created' | 'discount.updated' | 'discount.imported' | 'discount_group.created' | 'payment_method.saved' | 'payment_method.deleted' | 'payout.created' | 'payout.updated' | 'payout.paid' | 'price.updated' | 'price.created' | 'price.imported' | 'product.updated' | 'product.created' | 'product.imported' | 'subscription.activated' | 'subscription.canceled' | 'subscription.imported' | 'subscription.created' | 'subscription.past_due' | 'subscription.paused' | 'subscription.resumed' | 'subscription.trialing' | 'subscription.updated' | 'transaction.billed' | 'transaction.canceled' | 'transaction.completed' | 'transaction.paid' | 'transaction.created' | 'transaction.past_due' | 'transaction.payment_failed' | 'transaction.ready' | 'transaction.updated' | 'transaction.revised' | 'report.created' | 'report.updated';
@@ -0,0 +1,13 @@
1
+ import { ApiKeyPermission, ApiKeyStatus } from '../../../enums/index.js';
2
+ export interface IApiKeyNotificationResponse {
3
+ id: string;
4
+ name: string;
5
+ description: string | null;
6
+ key: string;
7
+ status: ApiKeyStatus;
8
+ permissions: ApiKeyPermission[];
9
+ expires_at: string | null;
10
+ last_used_at: string | null;
11
+ created_at: string;
12
+ updated_at: string;
13
+ }
@@ -0,0 +1 @@
1
+ export * from './api-key-notification-response.js';
@@ -1,4 +1,4 @@
1
- import { type CurrencyCode, type DiscountStatus, type DiscountType } from '../../../enums/index.js';
1
+ import { type CurrencyCode, type DiscountMode, type DiscountStatus, type DiscountType } from '../../../enums/index.js';
2
2
  import { type ICustomData } from '../../../types/index.js';
3
3
  import { type IImportMetaNotificationResponse } from '../shared/index.js';
4
4
  export interface IDiscountNotificationResponse {
@@ -7,6 +7,7 @@ export interface IDiscountNotificationResponse {
7
7
  description: string;
8
8
  enabled_for_checkout: boolean;
9
9
  code?: string | null;
10
+ mode?: DiscountMode | null;
10
11
  type: DiscountType;
11
12
  amount: string;
12
13
  currency_code?: CurrencyCode | null;
@@ -0,0 +1,10 @@
1
+ import type { IImportMetaNotificationResponse } from '../shared/index.js';
2
+ import { Status } from '../../../enums/index.js';
3
+ export interface IDiscountGroupNotificationResponse {
4
+ id: string;
5
+ name: string;
6
+ status: Status;
7
+ created_at: string;
8
+ updated_at: string;
9
+ import_meta: IImportMetaNotificationResponse | null;
10
+ }
@@ -0,0 +1 @@
1
+ export * from './discount-group-notification-response.js';
@@ -7,7 +7,9 @@ export * from './business/index.js';
7
7
  export * from './subscription/index.js';
8
8
  export * from './address/index.js';
9
9
  export * from './discount/index.js';
10
+ export * from './discount-group/index.js';
10
11
  export * from './payment-method/index.js';
11
12
  export * from './payout/index.js';
12
13
  export * from './report/index.js';
13
14
  export * from './shared/index.js';
15
+ export * from './api-key/index.js';
@@ -20,3 +20,5 @@ export * from './transaction-checkout-notification.js';
20
20
  export * from './total-adjustments-notification-response.js';
21
21
  export * from './payout-totals-adjustment-notification-response.js';
22
22
  export * from './import-meta-notification-response.js';
23
+ export * from './korean-market-underlying-details-notification.js';
24
+ export * from './payment-method-underlying-details-notification.js';
@@ -0,0 +1,4 @@
1
+ import { KoreanMarketUnderlyingPaymentMethodType } from '../../../enums/index.js';
2
+ export interface IKoreanMarketUnderlyingDetailsNotification {
3
+ type: KoreanMarketUnderlyingPaymentMethodType;
4
+ }
@@ -1,6 +1,8 @@
1
1
  import { type PaymentType } from '../../../enums/index.js';
2
2
  import { type IPaymentCardNotificationResponse } from './payment-card-notification-response.js';
3
+ import { IPaymentMethodUnderlyingDetailsNotification } from './payment-method-underlying-details-notification.js';
3
4
  export interface IPaymentMethodDetailsNotification {
4
5
  type: PaymentType;
5
- card?: IPaymentCardNotificationResponse | null;
6
+ card: IPaymentCardNotificationResponse | null;
7
+ underlying_details: IPaymentMethodUnderlyingDetailsNotification;
6
8
  }
@@ -0,0 +1,4 @@
1
+ import { IKoreanMarketUnderlyingDetailsNotification } from './korean-market-underlying-details-notification.js';
2
+ export interface IPaymentMethodUnderlyingDetailsNotification {
3
+ korea_local: IKoreanMarketUnderlyingDetailsNotification;
4
+ }
@@ -1,5 +1,5 @@
1
1
  import { type PaddleOptions } from './internal/index.js';
2
- import { AddressesResource, AdjustmentsResource, BusinessesResource, CustomersResource, CustomerPortalSessionsResource, DiscountsResource, EventTypesResource, NotificationSettingsResource, NotificationsResource, PaymentMethodsResource, PricesResource, PricingPreviewResource, ProductsResource, ReportsResource, SimulationTypesResource, SimulationsResource, SimulationRunsResource, SimulationRunEventsResource, SubscriptionsResource, TransactionsResource } from './resources/index.js';
2
+ import { AddressesResource, AdjustmentsResource, BusinessesResource, CustomerPortalSessionsResource, CustomersResource, DiscountGroupsResource, DiscountsResource, EventTypesResource, NotificationSettingsResource, NotificationsResource, PaymentMethodsResource, PricesResource, PricingPreviewResource, ProductsResource, ReportsResource, SimulationRunEventsResource, SimulationRunsResource, SimulationsResource, SimulationTypesResource, SubscriptionsResource, TransactionsResource } from './resources/index.js';
3
3
  import { EventsResource } from './resources/events/index.js';
4
4
  import { Webhooks } from './notifications/index.js';
5
5
  export declare class Paddle {
@@ -14,6 +14,7 @@ export declare class Paddle {
14
14
  addresses: AddressesResource;
15
15
  businesses: BusinessesResource;
16
16
  discounts: DiscountsResource;
17
+ discountGroups: DiscountGroupsResource;
17
18
  subscriptions: SubscriptionsResource;
18
19
  paymentMethods: PaymentMethodsResource;
19
20
  pricingPreview: PricingPreviewResource;
@@ -0,0 +1,8 @@
1
+ import { DiscountGroup, DiscountGroupCollection } from '../../entities/index.js';
2
+ import { BaseResource } from '../../internal/base/index.js';
3
+ import { CreateDiscountGroupRequestBody, type ListDiscountGroupQueryParameters } from './operations/index.js';
4
+ export * from './operations/index.js';
5
+ export declare class DiscountGroupsResource extends BaseResource {
6
+ list(queryParams?: ListDiscountGroupQueryParameters): DiscountGroupCollection;
7
+ create(createDiscountGroupRequestBody: CreateDiscountGroupRequestBody): Promise<DiscountGroup>;
8
+ }
@@ -0,0 +1,3 @@
1
+ export interface CreateDiscountGroupRequestBody {
2
+ name: string;
3
+ }
@@ -0,0 +1,2 @@
1
+ export * from './list-discount-group-query-parameters.js';
2
+ export * from './create-discount-group-request-body.js';
@@ -0,0 +1,6 @@
1
+ export interface ListDiscountGroupQueryParameters {
2
+ after?: string;
3
+ id?: string[];
4
+ orderBy?: string;
5
+ perPage?: number;
6
+ }
@@ -1,4 +1,4 @@
1
- import { type CurrencyCode, type DiscountType } from '../../../enums/index.js';
1
+ import { type CurrencyCode, type DiscountMode, type DiscountType } from '../../../enums/index.js';
2
2
  import { type ICustomData } from '../../../types/index.js';
3
3
  export interface CreateDiscountRequestBody {
4
4
  amount: string;
@@ -6,6 +6,7 @@ export interface CreateDiscountRequestBody {
6
6
  type: DiscountType;
7
7
  enabledForCheckout?: boolean;
8
8
  code?: string | null;
9
+ mode?: DiscountMode;
9
10
  currencyCode?: CurrencyCode | null;
10
11
  recur?: boolean;
11
12
  maximumRecurringIntervals?: number | null;
@@ -1,4 +1,4 @@
1
- import { type DiscountStatus } from '../../../enums/index.js';
1
+ import { type DiscountMode, type DiscountStatus } from '../../../enums/index.js';
2
2
  export interface ListDiscountQueryParameters {
3
3
  after?: string;
4
4
  code?: string[];
@@ -6,4 +6,5 @@ export interface ListDiscountQueryParameters {
6
6
  orderBy?: string;
7
7
  perPage?: number;
8
8
  status?: DiscountStatus[];
9
+ mode?: DiscountMode;
9
10
  }
@@ -1,10 +1,11 @@
1
- import { type CurrencyCode, type DiscountType, type Status } from '../../../enums/index.js';
1
+ import { type CurrencyCode, type DiscountMode, type DiscountType, type Status } from '../../../enums/index.js';
2
2
  import { type ICustomData } from '../../../types/index.js';
3
3
  export interface UpdateDiscountRequestBody {
4
4
  status?: Status;
5
5
  description?: string;
6
6
  enabledForCheckout?: boolean;
7
7
  code?: string | null;
8
+ mode?: DiscountMode;
8
9
  type?: DiscountType;
9
10
  amount?: string;
10
11
  currencyCode?: CurrencyCode | null;
@@ -4,6 +4,7 @@ export * from './businesses/index.js';
4
4
  export * from './customers/index.js';
5
5
  export * from './customer-portal-sessions/index.js';
6
6
  export * from './discounts/index.js';
7
+ export * from './discount-groups/index.js';
7
8
  export * from './prices/index.js';
8
9
  export * from './products/index.js';
9
10
  export * from './subscriptions/index.js';
@@ -1,4 +1,4 @@
1
- import { type CurrencyCode, type DiscountStatus, type DiscountType } from '../../enums/index.js';
1
+ import { type CurrencyCode, type DiscountMode, type DiscountStatus, type DiscountType } from '../../enums/index.js';
2
2
  import { type ICustomData, type IImportMetaResponse } from '../shared/index.js';
3
3
  export interface IDiscountResponse {
4
4
  id: string;
@@ -6,6 +6,7 @@ export interface IDiscountResponse {
6
6
  description: string;
7
7
  enabled_for_checkout: boolean;
8
8
  code?: string | null;
9
+ mode: DiscountMode;
9
10
  type: DiscountType;
10
11
  amount: string;
11
12
  currency_code?: CurrencyCode | null;
@@ -0,0 +1,10 @@
1
+ import { Status } from '../../enums/index.js';
2
+ import type { IImportMetaResponse } from '../shared/index.js';
3
+ export interface IDiscountGroupResponse {
4
+ id: string;
5
+ name: string;
6
+ status: Status;
7
+ created_at: string;
8
+ updated_at: string;
9
+ import_meta: IImportMetaResponse | null;
10
+ }
@@ -0,0 +1 @@
1
+ export * from './discount-group-response.js';