dodopayments 2.31.2 → 2.32.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 (363) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +7 -7
  3. package/api-promise.d.mts +1 -0
  4. package/api-promise.d.mts.map +1 -1
  5. package/api-promise.d.ts +1 -0
  6. package/api-promise.d.ts.map +1 -1
  7. package/api-promise.mjs +1 -0
  8. package/api-promise.mjs.map +1 -1
  9. package/bin/migration-config.json +187 -0
  10. package/client.d.mts +9 -6
  11. package/client.d.mts.map +1 -1
  12. package/client.d.ts +9 -6
  13. package/client.d.ts.map +1 -1
  14. package/client.js +3 -0
  15. package/client.js.map +1 -1
  16. package/client.mjs +3 -0
  17. package/client.mjs.map +1 -1
  18. package/core/api-promise.d.mts.map +1 -1
  19. package/core/api-promise.d.ts.map +1 -1
  20. package/core/api-promise.mjs.map +1 -1
  21. package/core/error.mjs.map +1 -1
  22. package/core/pagination.d.mts.map +1 -1
  23. package/core/pagination.d.ts.map +1 -1
  24. package/core/pagination.mjs.map +1 -1
  25. package/core/resource.d.mts.map +1 -1
  26. package/core/resource.d.ts.map +1 -1
  27. package/core/uploads.d.mts.map +1 -1
  28. package/core/uploads.d.ts.map +1 -1
  29. package/core/uploads.mjs.map +1 -1
  30. package/error.d.mts +1 -0
  31. package/error.d.mts.map +1 -1
  32. package/error.d.ts +1 -0
  33. package/error.d.ts.map +1 -1
  34. package/error.mjs +1 -0
  35. package/error.mjs.map +1 -1
  36. package/index.d.mts.map +1 -1
  37. package/index.d.ts.map +1 -1
  38. package/index.mjs.map +1 -1
  39. package/internal/detect-platform.mjs.map +1 -1
  40. package/internal/headers.mjs.map +1 -1
  41. package/internal/parse.d.mts.map +1 -1
  42. package/internal/parse.d.ts.map +1 -1
  43. package/internal/parse.mjs.map +1 -1
  44. package/internal/request-options.d.mts.map +1 -1
  45. package/internal/request-options.d.ts.map +1 -1
  46. package/internal/shims.d.mts +6 -0
  47. package/internal/shims.d.mts.map +1 -1
  48. package/internal/shims.d.ts +6 -0
  49. package/internal/shims.d.ts.map +1 -1
  50. package/internal/to-file.d.mts.map +1 -1
  51. package/internal/to-file.d.ts.map +1 -1
  52. package/internal/to-file.mjs.map +1 -1
  53. package/internal/types.d.mts +4 -4
  54. package/internal/types.d.mts.map +1 -1
  55. package/internal/types.d.ts +4 -4
  56. package/internal/types.d.ts.map +1 -1
  57. package/internal/uploads.d.mts.map +1 -1
  58. package/internal/uploads.d.ts.map +1 -1
  59. package/internal/uploads.mjs.map +1 -1
  60. package/internal/utils/base64.mjs.map +1 -1
  61. package/internal/utils/log.d.mts.map +1 -1
  62. package/internal/utils/log.d.ts.map +1 -1
  63. package/internal/utils/log.mjs.map +1 -1
  64. package/internal/utils/path.mjs.map +1 -1
  65. package/internal/utils/query.mjs.map +1 -1
  66. package/internal/utils/values.mjs.map +1 -1
  67. package/internal/utils.d.mts.map +1 -1
  68. package/internal/utils.d.ts.map +1 -1
  69. package/internal/utils.mjs.map +1 -1
  70. package/package.json +1 -1
  71. package/pagination.d.mts +1 -0
  72. package/pagination.d.mts.map +1 -1
  73. package/pagination.d.ts +1 -0
  74. package/pagination.d.ts.map +1 -1
  75. package/pagination.mjs +1 -0
  76. package/pagination.mjs.map +1 -1
  77. package/resource.d.mts +1 -0
  78. package/resource.d.mts.map +1 -1
  79. package/resource.d.ts +1 -0
  80. package/resource.d.ts.map +1 -1
  81. package/resource.mjs +1 -0
  82. package/resource.mjs.map +1 -1
  83. package/resources/addons.d.mts.map +1 -1
  84. package/resources/addons.d.ts.map +1 -1
  85. package/resources/addons.mjs.map +1 -1
  86. package/resources/balances.d.mts.map +1 -1
  87. package/resources/balances.d.ts.map +1 -1
  88. package/resources/balances.mjs.map +1 -1
  89. package/resources/brands.d.mts.map +1 -1
  90. package/resources/brands.d.ts.map +1 -1
  91. package/resources/brands.mjs.map +1 -1
  92. package/resources/checkout-sessions.d.mts +45 -0
  93. package/resources/checkout-sessions.d.mts.map +1 -1
  94. package/resources/checkout-sessions.d.ts +45 -0
  95. package/resources/checkout-sessions.d.ts.map +1 -1
  96. package/resources/checkout-sessions.mjs.map +1 -1
  97. package/resources/credit-entitlements/balances.d.mts.map +1 -1
  98. package/resources/credit-entitlements/balances.d.ts.map +1 -1
  99. package/resources/credit-entitlements/balances.mjs.map +1 -1
  100. package/resources/credit-entitlements/credit-entitlements.d.mts.map +1 -1
  101. package/resources/credit-entitlements/credit-entitlements.d.ts.map +1 -1
  102. package/resources/credit-entitlements/credit-entitlements.mjs.map +1 -1
  103. package/resources/credit-entitlements/index.d.mts.map +1 -1
  104. package/resources/credit-entitlements/index.d.ts.map +1 -1
  105. package/resources/credit-entitlements/index.mjs.map +1 -1
  106. package/resources/credit-entitlements.d.mts.map +1 -1
  107. package/resources/credit-entitlements.d.ts.map +1 -1
  108. package/resources/credit-entitlements.mjs.map +1 -1
  109. package/resources/customers/customer-portal.d.mts.map +1 -1
  110. package/resources/customers/customer-portal.d.ts.map +1 -1
  111. package/resources/customers/customer-portal.mjs.map +1 -1
  112. package/resources/customers/customers.d.mts.map +1 -1
  113. package/resources/customers/customers.d.ts.map +1 -1
  114. package/resources/customers/customers.mjs.map +1 -1
  115. package/resources/customers/index.d.mts.map +1 -1
  116. package/resources/customers/index.d.ts.map +1 -1
  117. package/resources/customers/index.mjs.map +1 -1
  118. package/resources/customers/wallets/index.d.mts.map +1 -1
  119. package/resources/customers/wallets/index.d.ts.map +1 -1
  120. package/resources/customers/wallets/index.mjs.map +1 -1
  121. package/resources/customers/wallets/ledger-entries.d.mts.map +1 -1
  122. package/resources/customers/wallets/ledger-entries.d.ts.map +1 -1
  123. package/resources/customers/wallets/ledger-entries.mjs.map +1 -1
  124. package/resources/customers/wallets/wallets.d.mts.map +1 -1
  125. package/resources/customers/wallets/wallets.d.ts.map +1 -1
  126. package/resources/customers/wallets/wallets.mjs.map +1 -1
  127. package/resources/customers/wallets.d.mts.map +1 -1
  128. package/resources/customers/wallets.d.ts.map +1 -1
  129. package/resources/customers/wallets.mjs.map +1 -1
  130. package/resources/customers.d.mts.map +1 -1
  131. package/resources/customers.d.ts.map +1 -1
  132. package/resources/customers.mjs.map +1 -1
  133. package/resources/discounts.d.mts +74 -1
  134. package/resources/discounts.d.mts.map +1 -1
  135. package/resources/discounts.d.ts +74 -1
  136. package/resources/discounts.d.ts.map +1 -1
  137. package/resources/discounts.mjs.map +1 -1
  138. package/resources/disputes.d.mts.map +1 -1
  139. package/resources/disputes.d.ts.map +1 -1
  140. package/resources/disputes.mjs.map +1 -1
  141. package/resources/entitlements/entitlements.d.mts +8 -3
  142. package/resources/entitlements/entitlements.d.mts.map +1 -1
  143. package/resources/entitlements/entitlements.d.ts +8 -3
  144. package/resources/entitlements/entitlements.d.ts.map +1 -1
  145. package/resources/entitlements/entitlements.js.map +1 -1
  146. package/resources/entitlements/entitlements.mjs.map +1 -1
  147. package/resources/entitlements/files.d.mts.map +1 -1
  148. package/resources/entitlements/files.d.ts.map +1 -1
  149. package/resources/entitlements/files.mjs.map +1 -1
  150. package/resources/entitlements/grants.d.mts.map +1 -1
  151. package/resources/entitlements/grants.d.ts.map +1 -1
  152. package/resources/entitlements/grants.mjs.map +1 -1
  153. package/resources/entitlements/index.d.mts +1 -1
  154. package/resources/entitlements/index.d.mts.map +1 -1
  155. package/resources/entitlements/index.d.ts +1 -1
  156. package/resources/entitlements/index.d.ts.map +1 -1
  157. package/resources/entitlements/index.js.map +1 -1
  158. package/resources/entitlements/index.mjs.map +1 -1
  159. package/resources/entitlements.d.mts.map +1 -1
  160. package/resources/entitlements.d.ts.map +1 -1
  161. package/resources/entitlements.mjs.map +1 -1
  162. package/resources/index.d.mts +4 -3
  163. package/resources/index.d.mts.map +1 -1
  164. package/resources/index.d.ts +4 -3
  165. package/resources/index.d.ts.map +1 -1
  166. package/resources/index.js +3 -1
  167. package/resources/index.js.map +1 -1
  168. package/resources/index.mjs +1 -0
  169. package/resources/index.mjs.map +1 -1
  170. package/resources/invoices/index.d.mts.map +1 -1
  171. package/resources/invoices/index.d.ts.map +1 -1
  172. package/resources/invoices/index.mjs.map +1 -1
  173. package/resources/invoices/invoices.d.mts.map +1 -1
  174. package/resources/invoices/invoices.d.ts.map +1 -1
  175. package/resources/invoices/invoices.mjs.map +1 -1
  176. package/resources/invoices/payments.d.mts +1 -0
  177. package/resources/invoices/payments.d.mts.map +1 -1
  178. package/resources/invoices/payments.d.ts +1 -0
  179. package/resources/invoices/payments.d.ts.map +1 -1
  180. package/resources/invoices/payments.js +7 -0
  181. package/resources/invoices/payments.js.map +1 -1
  182. package/resources/invoices/payments.mjs +7 -0
  183. package/resources/invoices/payments.mjs.map +1 -1
  184. package/resources/invoices.d.mts.map +1 -1
  185. package/resources/invoices.d.ts.map +1 -1
  186. package/resources/invoices.mjs.map +1 -1
  187. package/resources/license-key-instances.d.mts.map +1 -1
  188. package/resources/license-key-instances.d.ts.map +1 -1
  189. package/resources/license-key-instances.mjs.map +1 -1
  190. package/resources/license-keys.d.mts.map +1 -1
  191. package/resources/license-keys.d.ts.map +1 -1
  192. package/resources/license-keys.mjs.map +1 -1
  193. package/resources/licenses.d.mts.map +1 -1
  194. package/resources/licenses.d.ts.map +1 -1
  195. package/resources/licenses.mjs.map +1 -1
  196. package/resources/meters.d.mts +24 -96
  197. package/resources/meters.d.mts.map +1 -1
  198. package/resources/meters.d.ts +24 -96
  199. package/resources/meters.d.ts.map +1 -1
  200. package/resources/meters.mjs.map +1 -1
  201. package/resources/misc.d.mts.map +1 -1
  202. package/resources/misc.d.ts.map +1 -1
  203. package/resources/misc.mjs.map +1 -1
  204. package/resources/payments.d.mts +8 -75
  205. package/resources/payments.d.mts.map +1 -1
  206. package/resources/payments.d.ts +8 -75
  207. package/resources/payments.d.ts.map +1 -1
  208. package/resources/payments.mjs.map +1 -1
  209. package/resources/payouts/breakup/breakup.d.mts.map +1 -1
  210. package/resources/payouts/breakup/breakup.d.ts.map +1 -1
  211. package/resources/payouts/breakup/breakup.mjs.map +1 -1
  212. package/resources/payouts/breakup/details.d.mts.map +1 -1
  213. package/resources/payouts/breakup/details.d.ts.map +1 -1
  214. package/resources/payouts/breakup/details.mjs.map +1 -1
  215. package/resources/payouts/breakup/index.d.mts.map +1 -1
  216. package/resources/payouts/breakup/index.d.ts.map +1 -1
  217. package/resources/payouts/breakup/index.mjs.map +1 -1
  218. package/resources/payouts/breakup.d.mts.map +1 -1
  219. package/resources/payouts/breakup.d.ts.map +1 -1
  220. package/resources/payouts/breakup.mjs.map +1 -1
  221. package/resources/payouts/index.d.mts.map +1 -1
  222. package/resources/payouts/index.d.ts.map +1 -1
  223. package/resources/payouts/index.mjs.map +1 -1
  224. package/resources/payouts/payouts.d.mts.map +1 -1
  225. package/resources/payouts/payouts.d.ts.map +1 -1
  226. package/resources/payouts/payouts.mjs.map +1 -1
  227. package/resources/payouts.d.mts.map +1 -1
  228. package/resources/payouts.d.ts.map +1 -1
  229. package/resources/payouts.mjs.map +1 -1
  230. package/resources/product-collections/groups/groups.d.mts +88 -0
  231. package/resources/product-collections/groups/groups.d.mts.map +1 -0
  232. package/resources/product-collections/groups/groups.d.ts +88 -0
  233. package/resources/product-collections/groups/groups.d.ts.map +1 -0
  234. package/resources/product-collections/groups/groups.js +37 -0
  235. package/resources/product-collections/groups/groups.js.map +1 -0
  236. package/resources/product-collections/groups/groups.mjs +32 -0
  237. package/resources/product-collections/groups/groups.mjs.map +1 -0
  238. package/resources/product-collections/groups/index.d.mts +3 -0
  239. package/resources/product-collections/groups/index.d.mts.map +1 -0
  240. package/resources/product-collections/groups/index.d.ts +3 -0
  241. package/resources/product-collections/groups/index.d.ts.map +1 -0
  242. package/resources/product-collections/groups/index.js +9 -0
  243. package/resources/product-collections/groups/index.js.map +1 -0
  244. package/resources/product-collections/groups/index.mjs +4 -0
  245. package/resources/product-collections/groups/index.mjs.map +1 -0
  246. package/resources/product-collections/groups/items.d.mts +78 -0
  247. package/resources/product-collections/groups/items.d.mts.map +1 -0
  248. package/resources/product-collections/groups/items.d.ts +78 -0
  249. package/resources/product-collections/groups/items.d.ts.map +1 -0
  250. package/resources/product-collections/groups/items.js +30 -0
  251. package/resources/product-collections/groups/items.js.map +1 -0
  252. package/resources/product-collections/groups/items.mjs +26 -0
  253. package/resources/product-collections/groups/items.mjs.map +1 -0
  254. package/resources/product-collections/groups.d.mts +2 -0
  255. package/resources/product-collections/groups.d.mts.map +1 -0
  256. package/resources/product-collections/groups.d.ts +2 -0
  257. package/resources/product-collections/groups.d.ts.map +1 -0
  258. package/resources/product-collections/groups.js +6 -0
  259. package/resources/product-collections/groups.js.map +1 -0
  260. package/resources/product-collections/groups.mjs +3 -0
  261. package/resources/product-collections/groups.mjs.map +1 -0
  262. package/resources/product-collections/index.d.mts +3 -0
  263. package/resources/product-collections/index.d.mts.map +1 -0
  264. package/resources/product-collections/index.d.ts +3 -0
  265. package/resources/product-collections/index.d.ts.map +1 -0
  266. package/resources/product-collections/index.js +9 -0
  267. package/resources/product-collections/index.js.map +1 -0
  268. package/resources/product-collections/index.mjs +4 -0
  269. package/resources/product-collections/index.mjs.map +1 -0
  270. package/resources/product-collections/product-collections.d.mts +166 -0
  271. package/resources/product-collections/product-collections.d.mts.map +1 -0
  272. package/resources/product-collections/product-collections.d.ts +166 -0
  273. package/resources/product-collections/product-collections.d.ts.map +1 -0
  274. package/resources/product-collections/product-collections.js +49 -0
  275. package/resources/product-collections/product-collections.js.map +1 -0
  276. package/resources/product-collections/product-collections.mjs +44 -0
  277. package/resources/product-collections/product-collections.mjs.map +1 -0
  278. package/resources/product-collections.d.mts +2 -0
  279. package/resources/product-collections.d.mts.map +1 -0
  280. package/resources/product-collections.d.ts +2 -0
  281. package/resources/product-collections.d.ts.map +1 -0
  282. package/resources/product-collections.js +6 -0
  283. package/resources/product-collections.js.map +1 -0
  284. package/resources/product-collections.mjs +3 -0
  285. package/resources/product-collections.mjs.map +1 -0
  286. package/resources/products/images.d.mts.map +1 -1
  287. package/resources/products/images.d.ts.map +1 -1
  288. package/resources/products/images.mjs.map +1 -1
  289. package/resources/products/index.d.mts.map +1 -1
  290. package/resources/products/index.d.ts.map +1 -1
  291. package/resources/products/index.mjs.map +1 -1
  292. package/resources/products/products.d.mts.map +1 -1
  293. package/resources/products/products.d.ts.map +1 -1
  294. package/resources/products/products.mjs.map +1 -1
  295. package/resources/products/short-links.d.mts.map +1 -1
  296. package/resources/products/short-links.d.ts.map +1 -1
  297. package/resources/products/short-links.mjs.map +1 -1
  298. package/resources/products.d.mts.map +1 -1
  299. package/resources/products.d.ts.map +1 -1
  300. package/resources/products.mjs.map +1 -1
  301. package/resources/refunds.d.mts.map +1 -1
  302. package/resources/refunds.d.ts.map +1 -1
  303. package/resources/refunds.mjs.map +1 -1
  304. package/resources/subscriptions.d.mts +28 -78
  305. package/resources/subscriptions.d.mts.map +1 -1
  306. package/resources/subscriptions.d.ts +28 -78
  307. package/resources/subscriptions.d.ts.map +1 -1
  308. package/resources/subscriptions.js +3 -2
  309. package/resources/subscriptions.js.map +1 -1
  310. package/resources/subscriptions.mjs +3 -2
  311. package/resources/subscriptions.mjs.map +1 -1
  312. package/resources/usage-events.d.mts.map +1 -1
  313. package/resources/usage-events.d.ts.map +1 -1
  314. package/resources/usage-events.mjs.map +1 -1
  315. package/resources/webhook-events.d.mts +1 -1
  316. package/resources/webhook-events.d.mts.map +1 -1
  317. package/resources/webhook-events.d.ts +1 -1
  318. package/resources/webhook-events.d.ts.map +1 -1
  319. package/resources/webhook-events.mjs.map +1 -1
  320. package/resources/webhooks/headers.d.mts.map +1 -1
  321. package/resources/webhooks/headers.d.ts.map +1 -1
  322. package/resources/webhooks/headers.mjs.map +1 -1
  323. package/resources/webhooks/index.d.mts.map +1 -1
  324. package/resources/webhooks/index.d.ts.map +1 -1
  325. package/resources/webhooks/index.mjs.map +1 -1
  326. package/resources/webhooks/webhooks.d.mts.map +1 -1
  327. package/resources/webhooks/webhooks.d.ts.map +1 -1
  328. package/resources/webhooks/webhooks.mjs.map +1 -1
  329. package/resources/webhooks.d.mts.map +1 -1
  330. package/resources/webhooks.d.ts.map +1 -1
  331. package/resources/webhooks.mjs.map +1 -1
  332. package/resources.d.mts.map +1 -1
  333. package/resources.d.ts.map +1 -1
  334. package/resources.mjs.map +1 -1
  335. package/src/client.ts +33 -0
  336. package/src/resources/checkout-sessions.ts +52 -0
  337. package/src/resources/discounts.ts +88 -0
  338. package/src/resources/entitlements/entitlements.ts +9 -2
  339. package/src/resources/entitlements/index.ts +1 -0
  340. package/src/resources/index.ts +15 -0
  341. package/src/resources/invoices/payments.ts +8 -0
  342. package/src/resources/meters.ts +28 -113
  343. package/src/resources/payments.ts +9 -88
  344. package/src/resources/product-collections/groups/groups.ts +156 -0
  345. package/src/resources/product-collections/groups/index.ts +19 -0
  346. package/src/resources/product-collections/groups/items.ts +135 -0
  347. package/src/resources/product-collections/groups.ts +3 -0
  348. package/src/resources/product-collections/index.ts +23 -0
  349. package/src/resources/product-collections/product-collections.ts +278 -0
  350. package/src/resources/product-collections.ts +3 -0
  351. package/src/resources/subscriptions.ts +35 -96
  352. package/src/resources/webhook-events.ts +1 -5
  353. package/src/version.ts +1 -1
  354. package/uploads.d.mts +1 -0
  355. package/uploads.d.mts.map +1 -1
  356. package/uploads.d.ts +1 -0
  357. package/uploads.d.ts.map +1 -1
  358. package/uploads.mjs +1 -0
  359. package/uploads.mjs.map +1 -1
  360. package/version.d.mts +1 -1
  361. package/version.d.ts +1 -1
  362. package/version.js +1 -1
  363. package/version.mjs +1 -1
package/src/client.ts CHANGED
@@ -68,6 +68,7 @@ import {
68
68
  import {
69
69
  Discount,
70
70
  DiscountCreateParams,
71
+ DiscountDetail,
71
72
  DiscountListParams,
72
73
  DiscountType,
73
74
  DiscountUpdateParams,
@@ -111,6 +112,7 @@ import {
111
112
  import {
112
113
  Conjunction,
113
114
  FilterOperator,
115
+ FilterType,
114
116
  Meter,
115
117
  MeterAggregation,
116
118
  MeterCreateParams,
@@ -221,6 +223,7 @@ import {
221
223
  EntitlementUpdateParams,
222
224
  Entitlements,
223
225
  EntitlementsDefaultPageNumberPagination,
226
+ GitHubPermission,
224
227
  IntegrationConfig,
225
228
  IntegrationConfigResponse,
226
229
  } from './resources/entitlements/entitlements';
@@ -231,6 +234,18 @@ import {
231
234
  PayoutListResponsesDefaultPageNumberPagination,
232
235
  Payouts,
233
236
  } from './resources/payouts/payouts';
237
+ import {
238
+ ProductCollection,
239
+ ProductCollectionCreateParams,
240
+ ProductCollectionListParams,
241
+ ProductCollectionListResponse,
242
+ ProductCollectionListResponsesDefaultPageNumberPagination,
243
+ ProductCollectionUnarchiveResponse,
244
+ ProductCollectionUpdateImagesParams,
245
+ ProductCollectionUpdateImagesResponse,
246
+ ProductCollectionUpdateParams,
247
+ ProductCollections,
248
+ } from './resources/product-collections/product-collections';
234
249
  import {
235
250
  AddMeterToPrice,
236
251
  AttachCreditEntitlement,
@@ -1096,6 +1111,7 @@ export class DodoPayments {
1096
1111
  balances: API.Balances = new API.Balances(this);
1097
1112
  creditEntitlements: API.CreditEntitlements = new API.CreditEntitlements(this);
1098
1113
  entitlements: API.Entitlements = new API.Entitlements(this);
1114
+ productCollections: API.ProductCollections = new API.ProductCollections(this);
1099
1115
  }
1100
1116
 
1101
1117
  DodoPayments.CheckoutSessions = CheckoutSessions;
@@ -1121,6 +1137,7 @@ DodoPayments.Meters = Meters;
1121
1137
  DodoPayments.Balances = Balances;
1122
1138
  DodoPayments.CreditEntitlements = CreditEntitlements;
1123
1139
  DodoPayments.Entitlements = Entitlements;
1140
+ DodoPayments.ProductCollections = ProductCollections;
1124
1141
 
1125
1142
  export declare namespace DodoPayments {
1126
1143
  export type RequestOptions = Opts.RequestOptions;
@@ -1313,6 +1330,7 @@ export declare namespace DodoPayments {
1313
1330
  export {
1314
1331
  Discounts as Discounts,
1315
1332
  type Discount as Discount,
1333
+ type DiscountDetail as DiscountDetail,
1316
1334
  type DiscountType as DiscountType,
1317
1335
  type DiscountsDefaultPageNumberPagination as DiscountsDefaultPageNumberPagination,
1318
1336
  type DiscountCreateParams as DiscountCreateParams,
@@ -1410,6 +1428,7 @@ export declare namespace DodoPayments {
1410
1428
  Meters as Meters,
1411
1429
  type Conjunction as Conjunction,
1412
1430
  type FilterOperator as FilterOperator,
1431
+ type FilterType as FilterType,
1413
1432
  type Meter as Meter,
1414
1433
  type MeterAggregation as MeterAggregation,
1415
1434
  type MeterFilter as MeterFilter,
@@ -1439,6 +1458,7 @@ export declare namespace DodoPayments {
1439
1458
  Entitlements as Entitlements,
1440
1459
  type Entitlement as Entitlement,
1441
1460
  type EntitlementIntegrationType as EntitlementIntegrationType,
1461
+ type GitHubPermission as GitHubPermission,
1442
1462
  type IntegrationConfig as IntegrationConfig,
1443
1463
  type IntegrationConfigResponse as IntegrationConfigResponse,
1444
1464
  type EntitlementsDefaultPageNumberPagination as EntitlementsDefaultPageNumberPagination,
@@ -1446,4 +1466,17 @@ export declare namespace DodoPayments {
1446
1466
  type EntitlementUpdateParams as EntitlementUpdateParams,
1447
1467
  type EntitlementListParams as EntitlementListParams,
1448
1468
  };
1469
+
1470
+ export {
1471
+ ProductCollections as ProductCollections,
1472
+ type ProductCollection as ProductCollection,
1473
+ type ProductCollectionListResponse as ProductCollectionListResponse,
1474
+ type ProductCollectionUnarchiveResponse as ProductCollectionUnarchiveResponse,
1475
+ type ProductCollectionUpdateImagesResponse as ProductCollectionUpdateImagesResponse,
1476
+ type ProductCollectionListResponsesDefaultPageNumberPagination as ProductCollectionListResponsesDefaultPageNumberPagination,
1477
+ type ProductCollectionCreateParams as ProductCollectionCreateParams,
1478
+ type ProductCollectionUpdateParams as ProductCollectionUpdateParams,
1479
+ type ProductCollectionListParams as ProductCollectionListParams,
1480
+ type ProductCollectionUpdateImagesParams as ProductCollectionUpdateImagesParams,
1481
+ };
1449
1482
  }
@@ -93,6 +93,17 @@ export interface CheckoutSessionFlags {
93
93
  */
94
94
  allow_currency_selection?: boolean;
95
95
 
96
+ /**
97
+ * If true, the customer can supply or edit the business name associated with the
98
+ * tax id during checkout. Works independently of `allow_customer_editing_tax_id` —
99
+ * either flag (or `allow_tax_id`) is sufficient to let the customer override the
100
+ * session's business name. Typically set together with
101
+ * `allow_customer_editing_tax_id`.
102
+ *
103
+ * Default is false
104
+ */
105
+ allow_customer_editing_business_name?: boolean;
106
+
96
107
  allow_customer_editing_city?: boolean;
97
108
 
98
109
  allow_customer_editing_country?: boolean;
@@ -199,6 +210,13 @@ export interface CheckoutSessionRequest {
199
210
  */
200
211
  customer?: PaymentsAPI.CustomerRequest | null;
201
212
 
213
+ /**
214
+ * Optional business / legal name associated with the tax id. When provided
215
+ * together with a valid tax id for a B2B purchase, this name is rendered on the
216
+ * invoice instead of the customer's personal name.
217
+ */
218
+ customer_business_name?: string | null;
219
+
202
220
  /**
203
221
  * Customization for the checkout session page
204
222
  */
@@ -289,6 +307,26 @@ export interface CheckoutSessionResponse {
289
307
  * Checkout url (None when payment_method_id is provided)
290
308
  */
291
309
  checkout_url?: string | null;
310
+
311
+ /**
312
+ * Client secret used to load the Dodo Payments checkout SDK. Returned when
313
+ * `confirm: true` was passed and a PaymentIntent was created at session-creation
314
+ * time. `None` otherwise.
315
+ */
316
+ client_secret?: string | null;
317
+
318
+ /**
319
+ * Underlying payment id when `confirm: true` was passed and a PaymentIntent was
320
+ * created at session-creation time. `None` otherwise.
321
+ */
322
+ payment_id?: string | null;
323
+
324
+ /**
325
+ * Publishable key for the Dodo Payments checkout SDK. Returned when
326
+ * `confirm: true` was passed and a PaymentIntent was created at session-creation
327
+ * time. `None` otherwise.
328
+ */
329
+ publishable_key?: string | null;
292
330
  }
293
331
 
294
332
  export interface CheckoutSessionStatus {
@@ -867,6 +905,13 @@ export interface CheckoutSessionCreateParams {
867
905
  */
868
906
  customer?: PaymentsAPI.CustomerRequest | null;
869
907
 
908
+ /**
909
+ * Optional business / legal name associated with the tax id. When provided
910
+ * together with a valid tax id for a B2B purchase, this name is rendered on the
911
+ * invoice instead of the customer's personal name.
912
+ */
913
+ customer_business_name?: string | null;
914
+
870
915
  /**
871
916
  * Customization for the checkout session page
872
917
  */
@@ -992,6 +1037,13 @@ export interface CheckoutSessionPreviewParams {
992
1037
  */
993
1038
  customer?: PaymentsAPI.CustomerRequest | null;
994
1039
 
1040
+ /**
1041
+ * Optional business / legal name associated with the tax id. When provided
1042
+ * together with a valid tax id for a B2B purchase, this name is rendered on the
1043
+ * invoice instead of the customer's personal name.
1044
+ */
1045
+ customer_business_name?: string | null;
1046
+
995
1047
  /**
996
1048
  * Customization for the checkout session page
997
1049
  */
@@ -145,6 +145,93 @@ export interface Discount {
145
145
  usage_limit?: number | null;
146
146
  }
147
147
 
148
+ /**
149
+ * Response struct for a discount with its position in a stack and optional
150
+ * cycle-tracking information (for subscriptions).
151
+ */
152
+ export interface DiscountDetail {
153
+ /**
154
+ * The discount amount (basis points for percentage, USD cents for flat)
155
+ */
156
+ amount: number;
157
+
158
+ /**
159
+ * The business this discount belongs to
160
+ */
161
+ business_id: string;
162
+
163
+ /**
164
+ * The discount code
165
+ */
166
+ code: string;
167
+
168
+ /**
169
+ * Timestamp when the discount was created
170
+ */
171
+ created_at: string;
172
+
173
+ /**
174
+ * The unique discount ID
175
+ */
176
+ discount_id: string;
177
+
178
+ /**
179
+ * Additional metadata
180
+ */
181
+ metadata: { [key: string]: string };
182
+
183
+ /**
184
+ * Position of this discount in the stack (0-based)
185
+ */
186
+ position: number;
187
+
188
+ /**
189
+ * Whether this discount should be preserved when a subscription changes plans
190
+ */
191
+ preserve_on_plan_change: boolean;
192
+
193
+ /**
194
+ * List of product IDs to which this discount is restricted
195
+ */
196
+ restricted_to: Array<string>;
197
+
198
+ /**
199
+ * How many times this discount has been used
200
+ */
201
+ times_used: number;
202
+
203
+ /**
204
+ * The type of discount
205
+ */
206
+ type: DiscountType;
207
+
208
+ /**
209
+ * Remaining billing cycles for this discount on this subscription (None for
210
+ * one-time payments)
211
+ */
212
+ cycles_remaining?: number | null;
213
+
214
+ /**
215
+ * Optional date/time after which discount is expired
216
+ */
217
+ expires_at?: string | null;
218
+
219
+ /**
220
+ * Name for the Discount
221
+ */
222
+ name?: string | null;
223
+
224
+ /**
225
+ * Number of subscription billing cycles this discount is valid for
226
+ */
227
+ subscription_cycles?: number | null;
228
+
229
+ /**
230
+ * Usage limit for this discount, if any
231
+ */
232
+ usage_limit?: number | null;
233
+ }
234
+
148
235
  export type DiscountType = 'percentage';
149
236
 
150
237
  export interface DiscountCreateParams {
@@ -287,6 +374,7 @@ export interface DiscountListParams extends DefaultPageNumberPaginationParams {
287
374
  export declare namespace Discounts {
288
375
  export {
289
376
  type Discount as Discount,
377
+ type DiscountDetail as DiscountDetail,
290
378
  type DiscountType as DiscountType,
291
379
  type DiscountsDefaultPageNumberPagination as DiscountsDefaultPageNumberPagination,
292
380
  type DiscountCreateParams as DiscountCreateParams,
@@ -1,6 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
+ import * as EntitlementsAPI from './entitlements';
4
5
  import * as SubscriptionsAPI from '../subscriptions';
5
6
  import * as FilesAPI from './files';
6
7
  import { FileDeleteParams, FileUploadResponse, Files } from './files';
@@ -142,6 +143,11 @@ export type EntitlementIntegrationType =
142
143
  | 'digital_files'
143
144
  | 'license_key';
144
145
 
146
+ /**
147
+ * Repository permission to grant on a `github` entitlement.
148
+ */
149
+ export type GitHubPermission = 'pull' | 'push' | 'admin' | 'maintain' | 'triage';
150
+
145
151
  /**
146
152
  * Integration-specific configuration supplied when creating or updating an
147
153
  * entitlement. The shape required matches the entitlement's `integration_type`.
@@ -161,7 +167,7 @@ export namespace IntegrationConfig {
161
167
  /**
162
168
  * Permission to grant on the repository.
163
169
  */
164
- permission: 'pull' | 'push' | 'admin' | 'maintain' | 'triage';
170
+ permission: EntitlementsAPI.GitHubPermission;
165
171
 
166
172
  /**
167
173
  * Repository or organisation slug to grant access to.
@@ -288,7 +294,7 @@ export namespace IntegrationConfigResponse {
288
294
  /**
289
295
  * Permission to grant on the repository.
290
296
  */
291
- permission: 'pull' | 'push' | 'admin' | 'maintain' | 'triage';
297
+ permission: EntitlementsAPI.GitHubPermission;
292
298
 
293
299
  /**
294
300
  * Repository or organisation slug to grant access to.
@@ -494,6 +500,7 @@ export declare namespace Entitlements {
494
500
  export {
495
501
  type Entitlement as Entitlement,
496
502
  type EntitlementIntegrationType as EntitlementIntegrationType,
503
+ type GitHubPermission as GitHubPermission,
497
504
  type IntegrationConfig as IntegrationConfig,
498
505
  type IntegrationConfigResponse as IntegrationConfigResponse,
499
506
  type EntitlementsDefaultPageNumberPagination as EntitlementsDefaultPageNumberPagination,
@@ -4,6 +4,7 @@ export {
4
4
  Entitlements,
5
5
  type Entitlement,
6
6
  type EntitlementIntegrationType,
7
+ type GitHubPermission,
7
8
  type IntegrationConfig,
8
9
  type IntegrationConfigResponse,
9
10
  type EntitlementCreateParams,
@@ -65,6 +65,7 @@ export {
65
65
  export {
66
66
  Discounts,
67
67
  type Discount,
68
+ type DiscountDetail,
68
69
  type DiscountType,
69
70
  type DiscountCreateParams,
70
71
  type DiscountUpdateParams,
@@ -85,6 +86,7 @@ export {
85
86
  Entitlements,
86
87
  type Entitlement,
87
88
  type EntitlementIntegrationType,
89
+ type GitHubPermission,
88
90
  type IntegrationConfig,
89
91
  type IntegrationConfigResponse,
90
92
  type EntitlementCreateParams,
@@ -121,6 +123,7 @@ export {
121
123
  Meters,
122
124
  type Conjunction,
123
125
  type FilterOperator,
126
+ type FilterType,
124
127
  type Meter,
125
128
  type MeterAggregation,
126
129
  type MeterFilter,
@@ -164,6 +167,18 @@ export {
164
167
  type PayoutListParams,
165
168
  type PayoutListResponsesDefaultPageNumberPagination,
166
169
  } from './payouts/payouts';
170
+ export {
171
+ ProductCollections,
172
+ type ProductCollection,
173
+ type ProductCollectionListResponse,
174
+ type ProductCollectionUnarchiveResponse,
175
+ type ProductCollectionUpdateImagesResponse,
176
+ type ProductCollectionCreateParams,
177
+ type ProductCollectionUpdateParams,
178
+ type ProductCollectionListParams,
179
+ type ProductCollectionUpdateImagesParams,
180
+ type ProductCollectionListResponsesDefaultPageNumberPagination,
181
+ } from './product-collections/product-collections';
167
182
  export {
168
183
  Products,
169
184
  type AddMeterToPrice,
@@ -15,6 +15,14 @@ export class Payments extends APIResource {
15
15
  });
16
16
  }
17
17
 
18
+ retrievePayout(payoutID: string, options?: RequestOptions): APIPromise<Response> {
19
+ return this._client.get(path`/invoices/payouts/${payoutID}`, {
20
+ ...options,
21
+ headers: buildHeaders([{ Accept: 'application/pdf' }, options?.headers]),
22
+ __binaryResponse: true,
23
+ });
24
+ }
25
+
18
26
  retrieveRefund(refundID: string, options?: RequestOptions): APIPromise<Response> {
19
27
  return this._client.get(path`/invoices/refunds/${refundID}`, {
20
28
  ...options,
@@ -57,6 +57,32 @@ export type FilterOperator =
57
57
  | 'contains'
58
58
  | 'does_not_contain';
59
59
 
60
+ /**
61
+ * Filter clauses — either a flat list of `MeterFilterCondition`s or a list of
62
+ * nested `MeterFilter`s. Up to 3 levels of nesting are accepted; the limit is
63
+ * enforced at runtime.
64
+ */
65
+ export type FilterType = Array<FilterType.MeterFilterConditionList> | Array<MeterFilter>;
66
+
67
+ export namespace FilterType {
68
+ export interface MeterFilterConditionList {
69
+ /**
70
+ * Filter key to apply
71
+ */
72
+ key: string;
73
+
74
+ /**
75
+ * Filter operator
76
+ */
77
+ operator: MetersAPI.FilterOperator;
78
+
79
+ /**
80
+ * Filter value - can be string, number, or boolean
81
+ */
82
+ value: string | number | boolean;
83
+ }
84
+ }
85
+
60
86
  export interface Meter {
61
87
  id: string;
62
88
 
@@ -112,7 +138,7 @@ export interface MeterFilter {
112
138
  * Filter clauses - can be direct conditions or nested filters (up to 3 levels
113
139
  * deep)
114
140
  */
115
- clauses: Array<MeterFilter.DirectFilterCondition> | Array<MeterFilter.NestedMeterFilter>;
141
+ clauses: FilterType;
116
142
 
117
143
  /**
118
144
  * Logical conjunction to apply between clauses (and/or)
@@ -120,118 +146,6 @@ export interface MeterFilter {
120
146
  conjunction: Conjunction;
121
147
  }
122
148
 
123
- export namespace MeterFilter {
124
- /**
125
- * Filter condition with key, operator, and value
126
- */
127
- export interface DirectFilterCondition {
128
- /**
129
- * Filter key to apply
130
- */
131
- key: string;
132
-
133
- operator: MetersAPI.FilterOperator;
134
-
135
- /**
136
- * Filter value - can be string, number, or boolean
137
- */
138
- value: string | number | boolean;
139
- }
140
-
141
- /**
142
- * Level 1 nested filter - can contain Level 2 filters
143
- */
144
- export interface NestedMeterFilter {
145
- /**
146
- * Level 1: Can be conditions or nested filters (2 more levels allowed)
147
- */
148
- clauses: Array<NestedMeterFilter.Level1FilterCondition> | Array<NestedMeterFilter.Level1NestedFilter>;
149
-
150
- conjunction: MetersAPI.Conjunction;
151
- }
152
-
153
- export namespace NestedMeterFilter {
154
- /**
155
- * Filter condition with key, operator, and value
156
- */
157
- export interface Level1FilterCondition {
158
- /**
159
- * Filter key to apply
160
- */
161
- key: string;
162
-
163
- operator: MetersAPI.FilterOperator;
164
-
165
- /**
166
- * Filter value - can be string, number, or boolean
167
- */
168
- value: string | number | boolean;
169
- }
170
-
171
- /**
172
- * Level 2 nested filter
173
- */
174
- export interface Level1NestedFilter {
175
- /**
176
- * Level 2: Can be conditions or nested filters (1 more level allowed)
177
- */
178
- clauses: Array<Level1NestedFilter.Level2FilterCondition> | Array<Level1NestedFilter.Level2NestedFilter>;
179
-
180
- conjunction: MetersAPI.Conjunction;
181
- }
182
-
183
- export namespace Level1NestedFilter {
184
- /**
185
- * Filter condition with key, operator, and value
186
- */
187
- export interface Level2FilterCondition {
188
- /**
189
- * Filter key to apply
190
- */
191
- key: string;
192
-
193
- operator: MetersAPI.FilterOperator;
194
-
195
- /**
196
- * Filter value - can be string, number, or boolean
197
- */
198
- value: string | number | boolean;
199
- }
200
-
201
- /**
202
- * Level 3 nested filter (final nesting level)
203
- */
204
- export interface Level2NestedFilter {
205
- /**
206
- * Level 3: Filter conditions only (max depth reached)
207
- */
208
- clauses: Array<Level2NestedFilter.Clause>;
209
-
210
- conjunction: MetersAPI.Conjunction;
211
- }
212
-
213
- export namespace Level2NestedFilter {
214
- /**
215
- * Filter condition with key, operator, and value
216
- */
217
- export interface Clause {
218
- /**
219
- * Filter key to apply
220
- */
221
- key: string;
222
-
223
- operator: MetersAPI.FilterOperator;
224
-
225
- /**
226
- * Filter value - can be string, number, or boolean
227
- */
228
- value: string | number | boolean;
229
- }
230
- }
231
- }
232
- }
233
- }
234
-
235
149
  export interface MeterCreateParams {
236
150
  /**
237
151
  * Aggregation configuration for the meter
@@ -275,6 +189,7 @@ export declare namespace Meters {
275
189
  export {
276
190
  type Conjunction as Conjunction,
277
191
  type FilterOperator as FilterOperator,
192
+ type FilterType as FilterType,
278
193
  type Meter as Meter,
279
194
  type MeterAggregation as MeterAggregation,
280
195
  type MeterFilter as MeterFilter,
@@ -301,7 +301,7 @@ export interface Payment {
301
301
  /**
302
302
  * All stacked discounts applied, ordered by position
303
303
  */
304
- discounts?: Array<Payment.Discount> | null;
304
+ discounts?: Array<DiscountsAPI.DiscountDetail> | null;
305
305
 
306
306
  /**
307
307
  * An error code if the payment failed
@@ -378,93 +378,6 @@ export interface Payment {
378
378
  }
379
379
 
380
380
  export namespace Payment {
381
- /**
382
- * Response struct for a discount with its position in a stack and optional
383
- * cycle-tracking information (for subscriptions).
384
- */
385
- export interface Discount {
386
- /**
387
- * The discount amount (basis points for percentage, USD cents for flat)
388
- */
389
- amount: number;
390
-
391
- /**
392
- * The business this discount belongs to
393
- */
394
- business_id: string;
395
-
396
- /**
397
- * The discount code
398
- */
399
- code: string;
400
-
401
- /**
402
- * Timestamp when the discount was created
403
- */
404
- created_at: string;
405
-
406
- /**
407
- * The unique discount ID
408
- */
409
- discount_id: string;
410
-
411
- /**
412
- * Additional metadata
413
- */
414
- metadata: { [key: string]: string };
415
-
416
- /**
417
- * Position of this discount in the stack (0-based)
418
- */
419
- position: number;
420
-
421
- /**
422
- * Whether this discount should be preserved when a subscription changes plans
423
- */
424
- preserve_on_plan_change: boolean;
425
-
426
- /**
427
- * List of product IDs to which this discount is restricted
428
- */
429
- restricted_to: Array<string>;
430
-
431
- /**
432
- * How many times this discount has been used
433
- */
434
- times_used: number;
435
-
436
- /**
437
- * The type of discount
438
- */
439
- type: DiscountsAPI.DiscountType;
440
-
441
- /**
442
- * Remaining billing cycles for this discount on this subscription (None for
443
- * one-time payments)
444
- */
445
- cycles_remaining?: number | null;
446
-
447
- /**
448
- * Optional date/time after which discount is expired
449
- */
450
- expires_at?: string | null;
451
-
452
- /**
453
- * Name for the Discount
454
- */
455
- name?: string | null;
456
-
457
- /**
458
- * Number of subscription billing cycles this discount is valid for
459
- */
460
- subscription_cycles?: number | null;
461
-
462
- /**
463
- * Usage limit for this discount, if any
464
- */
465
- usage_limit?: number | null;
466
- }
467
-
468
381
  export interface ProductCart {
469
382
  product_id: string;
470
383
 
@@ -555,6 +468,7 @@ export type PaymentMethodTypes =
555
468
  | 'sepa'
556
469
  | 'sepa_bank_transfer'
557
470
  | 'sofort'
471
+ | 'sunbit'
558
472
  | 'swish'
559
473
  | 'touch_n_go'
560
474
  | 'trustly'
@@ -794,6 +708,13 @@ export interface PaymentCreateParams {
794
708
  */
795
709
  billing_currency?: MiscAPI.Currency | null;
796
710
 
711
+ /**
712
+ * Optional business / legal name associated with the tax id. When provided
713
+ * together with a valid tax id for a B2B purchase, this name is rendered on the
714
+ * invoice instead of the customer's personal name.
715
+ */
716
+ customer_business_name?: string | null;
717
+
797
718
  /**
798
719
  * @deprecated Use `discount_id` instead.
799
720
  */