@stigg/typescript 0.1.0-alpha.1 → 0.1.0-alpha.11

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 (317) hide show
  1. package/CHANGELOG.md +158 -0
  2. package/README.md +40 -0
  3. package/client.d.mts +6 -8
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +6 -8
  6. package/client.d.ts.map +1 -1
  7. package/client.js +23 -21
  8. package/client.js.map +1 -1
  9. package/client.mjs +24 -22
  10. package/client.mjs.map +1 -1
  11. package/core/pagination.d.mts +11 -5
  12. package/core/pagination.d.mts.map +1 -1
  13. package/core/pagination.d.ts +11 -5
  14. package/core/pagination.d.ts.map +1 -1
  15. package/core/pagination.js +9 -9
  16. package/core/pagination.js.map +1 -1
  17. package/core/pagination.mjs +9 -9
  18. package/core/pagination.mjs.map +1 -1
  19. package/internal/parse.d.mts.map +1 -1
  20. package/internal/parse.d.ts.map +1 -1
  21. package/internal/parse.js +5 -0
  22. package/internal/parse.js.map +1 -1
  23. package/internal/parse.mjs +5 -0
  24. package/internal/parse.mjs.map +1 -1
  25. package/internal/qs/formats.d.mts +7 -0
  26. package/internal/qs/formats.d.mts.map +1 -0
  27. package/internal/qs/formats.d.ts +7 -0
  28. package/internal/qs/formats.d.ts.map +1 -0
  29. package/internal/qs/formats.js +13 -0
  30. package/internal/qs/formats.js.map +1 -0
  31. package/internal/qs/formats.mjs +9 -0
  32. package/internal/qs/formats.mjs.map +1 -0
  33. package/internal/qs/index.d.mts +10 -0
  34. package/internal/qs/index.d.mts.map +1 -0
  35. package/internal/qs/index.d.ts +10 -0
  36. package/internal/qs/index.d.ts.map +1 -0
  37. package/internal/qs/index.js +14 -0
  38. package/internal/qs/index.js.map +1 -0
  39. package/internal/qs/index.mjs +10 -0
  40. package/internal/qs/index.mjs.map +1 -0
  41. package/internal/qs/stringify.d.mts +3 -0
  42. package/internal/qs/stringify.d.mts.map +1 -0
  43. package/internal/qs/stringify.d.ts +3 -0
  44. package/internal/qs/stringify.d.ts.map +1 -0
  45. package/internal/qs/stringify.js +277 -0
  46. package/internal/qs/stringify.js.map +1 -0
  47. package/internal/qs/stringify.mjs +274 -0
  48. package/internal/qs/stringify.mjs.map +1 -0
  49. package/internal/qs/types.d.mts +57 -0
  50. package/internal/qs/types.d.mts.map +1 -0
  51. package/internal/qs/types.d.ts +57 -0
  52. package/internal/qs/types.d.ts.map +1 -0
  53. package/internal/qs/types.js +3 -0
  54. package/internal/qs/types.js.map +1 -0
  55. package/internal/qs/types.mjs +2 -0
  56. package/internal/qs/types.mjs.map +1 -0
  57. package/internal/qs/utils.d.mts +15 -0
  58. package/internal/qs/utils.d.mts.map +1 -0
  59. package/internal/qs/utils.d.ts +15 -0
  60. package/internal/qs/utils.d.ts.map +1 -0
  61. package/internal/qs/utils.js +230 -0
  62. package/internal/qs/utils.js.map +1 -0
  63. package/internal/qs/utils.mjs +217 -0
  64. package/internal/qs/utils.mjs.map +1 -0
  65. package/package.json +1 -1
  66. package/resources/index.d.mts +1 -1
  67. package/resources/index.d.mts.map +1 -1
  68. package/resources/index.d.ts +1 -1
  69. package/resources/index.d.ts.map +1 -1
  70. package/resources/index.js.map +1 -1
  71. package/resources/index.mjs +1 -1
  72. package/resources/index.mjs.map +1 -1
  73. package/resources/v1/addons/addons.d.mts +1298 -0
  74. package/resources/v1/addons/addons.d.mts.map +1 -0
  75. package/resources/v1/addons/addons.d.ts +1298 -0
  76. package/resources/v1/addons/addons.d.ts.map +1 -0
  77. package/resources/v1/addons/addons.js +78 -0
  78. package/resources/v1/addons/addons.js.map +1 -0
  79. package/resources/v1/addons/addons.mjs +73 -0
  80. package/resources/v1/addons/addons.mjs.map +1 -0
  81. package/resources/v1/addons/entitlements.d.mts +747 -0
  82. package/resources/v1/addons/entitlements.d.mts.map +1 -0
  83. package/resources/v1/addons/entitlements.d.ts +747 -0
  84. package/resources/v1/addons/entitlements.d.ts.map +1 -0
  85. package/resources/v1/addons/entitlements.js +36 -0
  86. package/resources/v1/addons/entitlements.js.map +1 -0
  87. package/resources/v1/addons/entitlements.mjs +32 -0
  88. package/resources/v1/addons/entitlements.mjs.map +1 -0
  89. package/resources/v1/addons/index.d.mts +3 -0
  90. package/resources/v1/addons/index.d.mts.map +1 -0
  91. package/resources/v1/addons/index.d.ts +3 -0
  92. package/resources/v1/addons/index.d.ts.map +1 -0
  93. package/resources/v1/addons/index.js +9 -0
  94. package/resources/v1/addons/index.js.map +1 -0
  95. package/resources/v1/addons/index.mjs +4 -0
  96. package/resources/v1/addons/index.mjs.map +1 -0
  97. package/resources/v1/addons.d.mts +2 -0
  98. package/resources/v1/addons.d.mts.map +1 -0
  99. package/resources/v1/addons.d.ts +2 -0
  100. package/resources/v1/addons.d.ts.map +1 -0
  101. package/resources/v1/addons.js +6 -0
  102. package/resources/v1/addons.js.map +1 -0
  103. package/resources/v1/addons.mjs +3 -0
  104. package/resources/v1/addons.mjs.map +1 -0
  105. package/resources/v1/coupons.d.mts +154 -157
  106. package/resources/v1/coupons.d.mts.map +1 -1
  107. package/resources/v1/coupons.d.ts +154 -157
  108. package/resources/v1/coupons.d.ts.map +1 -1
  109. package/resources/v1/coupons.js +21 -4
  110. package/resources/v1/coupons.js.map +1 -1
  111. package/resources/v1/coupons.mjs +21 -4
  112. package/resources/v1/coupons.mjs.map +1 -1
  113. package/resources/v1/customers/customers.d.mts +247 -118
  114. package/resources/v1/customers/customers.d.mts.map +1 -1
  115. package/resources/v1/customers/customers.d.ts +247 -118
  116. package/resources/v1/customers/customers.d.ts.map +1 -1
  117. package/resources/v1/customers/customers.js +37 -16
  118. package/resources/v1/customers/customers.js.map +1 -1
  119. package/resources/v1/customers/customers.mjs +37 -16
  120. package/resources/v1/customers/customers.mjs.map +1 -1
  121. package/resources/v1/customers/index.d.mts +2 -2
  122. package/resources/v1/customers/index.d.mts.map +1 -1
  123. package/resources/v1/customers/index.d.ts +2 -2
  124. package/resources/v1/customers/index.d.ts.map +1 -1
  125. package/resources/v1/customers/index.js +3 -3
  126. package/resources/v1/customers/index.js.map +1 -1
  127. package/resources/v1/customers/index.mjs +1 -1
  128. package/resources/v1/customers/index.mjs.map +1 -1
  129. package/resources/v1/customers/payment-method.d.mts +7 -2
  130. package/resources/v1/customers/payment-method.d.mts.map +1 -1
  131. package/resources/v1/customers/payment-method.d.ts +7 -2
  132. package/resources/v1/customers/payment-method.d.ts.map +1 -1
  133. package/resources/v1/customers/payment-method.js +4 -2
  134. package/resources/v1/customers/payment-method.js.map +1 -1
  135. package/resources/v1/customers/payment-method.mjs +4 -2
  136. package/resources/v1/customers/payment-method.mjs.map +1 -1
  137. package/resources/v1/customers/promotional-entitlements.d.mts +498 -0
  138. package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -0
  139. package/resources/v1/customers/promotional-entitlements.d.ts +498 -0
  140. package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -0
  141. package/resources/v1/customers/promotional-entitlements.js +32 -0
  142. package/resources/v1/customers/promotional-entitlements.js.map +1 -0
  143. package/resources/v1/customers/promotional-entitlements.mjs +28 -0
  144. package/resources/v1/customers/promotional-entitlements.mjs.map +1 -0
  145. package/resources/v1/events.d.mts +63 -0
  146. package/resources/v1/events.d.mts.map +1 -0
  147. package/resources/v1/events.d.ts +63 -0
  148. package/resources/v1/events.d.ts.map +1 -0
  149. package/resources/v1/events.js +16 -0
  150. package/resources/v1/events.js.map +1 -0
  151. package/resources/v1/events.mjs +12 -0
  152. package/resources/v1/events.mjs.map +1 -0
  153. package/resources/v1/features.d.mts +444 -0
  154. package/resources/v1/features.d.mts.map +1 -0
  155. package/resources/v1/features.d.ts +444 -0
  156. package/resources/v1/features.d.ts.map +1 -0
  157. package/resources/v1/features.js +51 -0
  158. package/resources/v1/features.js.map +1 -0
  159. package/resources/v1/features.mjs +47 -0
  160. package/resources/v1/features.mjs.map +1 -0
  161. package/resources/v1/index.d.mts +10 -4
  162. package/resources/v1/index.d.mts.map +1 -1
  163. package/resources/v1/index.d.ts +10 -4
  164. package/resources/v1/index.d.ts.map +1 -1
  165. package/resources/v1/index.js +17 -5
  166. package/resources/v1/index.js.map +1 -1
  167. package/resources/v1/index.mjs +7 -1
  168. package/resources/v1/index.mjs.map +1 -1
  169. package/resources/v1/plans/entitlements.d.mts +747 -0
  170. package/resources/v1/plans/entitlements.d.mts.map +1 -0
  171. package/resources/v1/plans/entitlements.d.ts +747 -0
  172. package/resources/v1/plans/entitlements.d.ts.map +1 -0
  173. package/resources/v1/plans/entitlements.js +36 -0
  174. package/resources/v1/plans/entitlements.js.map +1 -0
  175. package/resources/v1/plans/entitlements.mjs +32 -0
  176. package/resources/v1/plans/entitlements.mjs.map +1 -0
  177. package/resources/v1/plans/index.d.mts +3 -0
  178. package/resources/v1/plans/index.d.mts.map +1 -0
  179. package/resources/v1/plans/index.d.ts +3 -0
  180. package/resources/v1/plans/index.d.ts.map +1 -0
  181. package/resources/v1/plans/index.js +9 -0
  182. package/resources/v1/plans/index.js.map +1 -0
  183. package/resources/v1/plans/index.mjs +4 -0
  184. package/resources/v1/plans/index.mjs.map +1 -0
  185. package/resources/v1/plans/plans.d.mts +973 -0
  186. package/resources/v1/plans/plans.d.mts.map +1 -0
  187. package/resources/v1/plans/plans.d.ts +973 -0
  188. package/resources/v1/plans/plans.d.ts.map +1 -0
  189. package/resources/v1/plans/plans.js +76 -0
  190. package/resources/v1/plans/plans.js.map +1 -0
  191. package/resources/v1/plans/plans.mjs +71 -0
  192. package/resources/v1/plans/plans.mjs.map +1 -0
  193. package/resources/v1/plans.d.mts +2 -0
  194. package/resources/v1/plans.d.mts.map +1 -0
  195. package/resources/v1/plans.d.ts +2 -0
  196. package/resources/v1/plans.d.ts.map +1 -0
  197. package/resources/v1/plans.js +6 -0
  198. package/resources/v1/plans.js.map +1 -0
  199. package/resources/v1/plans.mjs +3 -0
  200. package/resources/v1/plans.mjs.map +1 -0
  201. package/resources/v1/products.d.mts +332 -0
  202. package/resources/v1/products.d.mts.map +1 -0
  203. package/resources/v1/products.d.ts +332 -0
  204. package/resources/v1/products.d.ts.map +1 -0
  205. package/resources/v1/products.js +52 -0
  206. package/resources/v1/products.js.map +1 -0
  207. package/resources/v1/products.mjs +48 -0
  208. package/resources/v1/products.mjs.map +1 -0
  209. package/resources/v1/subscriptions/future-update.d.mts +12 -19
  210. package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
  211. package/resources/v1/subscriptions/future-update.d.ts +12 -19
  212. package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
  213. package/resources/v1/subscriptions/future-update.js +3 -2
  214. package/resources/v1/subscriptions/future-update.js.map +1 -1
  215. package/resources/v1/subscriptions/future-update.mjs +3 -2
  216. package/resources/v1/subscriptions/future-update.mjs.map +1 -1
  217. package/resources/v1/subscriptions/index.d.mts +4 -2
  218. package/resources/v1/subscriptions/index.d.mts.map +1 -1
  219. package/resources/v1/subscriptions/index.d.ts +4 -2
  220. package/resources/v1/subscriptions/index.d.ts.map +1 -1
  221. package/resources/v1/subscriptions/index.js +5 -1
  222. package/resources/v1/subscriptions/index.js.map +1 -1
  223. package/resources/v1/subscriptions/index.mjs +3 -1
  224. package/resources/v1/subscriptions/index.mjs.map +1 -1
  225. package/resources/v1/subscriptions/invoice.d.mts +34 -0
  226. package/resources/v1/subscriptions/invoice.d.mts.map +1 -0
  227. package/resources/v1/subscriptions/invoice.d.ts +34 -0
  228. package/resources/v1/subscriptions/invoice.d.ts.map +1 -0
  229. package/resources/v1/subscriptions/invoice.js +17 -0
  230. package/resources/v1/subscriptions/invoice.js.map +1 -0
  231. package/resources/v1/subscriptions/invoice.mjs +13 -0
  232. package/resources/v1/subscriptions/invoice.mjs.map +1 -0
  233. package/resources/v1/subscriptions/subscriptions.d.mts +1565 -518
  234. package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
  235. package/resources/v1/subscriptions/subscriptions.d.ts +1565 -518
  236. package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
  237. package/resources/v1/subscriptions/subscriptions.js +52 -12
  238. package/resources/v1/subscriptions/subscriptions.js.map +1 -1
  239. package/resources/v1/subscriptions/subscriptions.mjs +53 -13
  240. package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
  241. package/resources/v1/subscriptions/usage.d.mts +98 -0
  242. package/resources/v1/subscriptions/usage.d.mts.map +1 -0
  243. package/resources/v1/subscriptions/usage.d.ts +98 -0
  244. package/resources/v1/subscriptions/usage.d.ts.map +1 -0
  245. package/resources/v1/subscriptions/usage.js +24 -0
  246. package/resources/v1/subscriptions/usage.js.map +1 -0
  247. package/resources/v1/subscriptions/usage.mjs +20 -0
  248. package/resources/v1/subscriptions/usage.mjs.map +1 -0
  249. package/resources/v1/usage.d.mts +230 -0
  250. package/resources/v1/usage.d.mts.map +1 -0
  251. package/resources/v1/usage.d.ts +230 -0
  252. package/resources/v1/usage.d.ts.map +1 -0
  253. package/resources/v1/usage.js +24 -0
  254. package/resources/v1/usage.js.map +1 -0
  255. package/resources/v1/usage.mjs +20 -0
  256. package/resources/v1/usage.mjs.map +1 -0
  257. package/resources/v1/v1.d.mts +30 -149
  258. package/resources/v1/v1.d.mts.map +1 -1
  259. package/resources/v1/v1.d.ts +30 -149
  260. package/resources/v1/v1.d.ts.map +1 -1
  261. package/resources/v1/v1.js +24 -12
  262. package/resources/v1/v1.js.map +1 -1
  263. package/resources/v1/v1.mjs +24 -12
  264. package/resources/v1/v1.mjs.map +1 -1
  265. package/src/client.ts +33 -40
  266. package/src/core/pagination.ts +24 -18
  267. package/src/internal/parse.ts +6 -0
  268. package/src/internal/qs/LICENSE.md +13 -0
  269. package/src/internal/qs/README.md +3 -0
  270. package/src/internal/qs/formats.ts +10 -0
  271. package/src/internal/qs/index.ts +13 -0
  272. package/src/internal/qs/stringify.ts +385 -0
  273. package/src/internal/qs/types.ts +71 -0
  274. package/src/internal/qs/utils.ts +265 -0
  275. package/src/resources/index.ts +1 -7
  276. package/src/resources/v1/addons/addons.ts +3245 -0
  277. package/src/resources/v1/addons/entitlements.ts +976 -0
  278. package/src/resources/v1/addons/index.ts +26 -0
  279. package/src/resources/v1/addons.ts +3 -0
  280. package/src/resources/v1/coupons.ts +311 -436
  281. package/src/resources/v1/customers/customers.ts +334 -153
  282. package/src/resources/v1/customers/index.ts +17 -2
  283. package/src/resources/v1/customers/payment-method.ts +7 -2
  284. package/src/resources/v1/customers/promotional-entitlements.ts +669 -0
  285. package/src/resources/v1/events.ts +74 -0
  286. package/src/resources/v1/features.ts +571 -0
  287. package/src/resources/v1/index.ts +73 -15
  288. package/src/resources/v1/plans/entitlements.ts +968 -0
  289. package/src/resources/v1/plans/index.ts +24 -0
  290. package/src/resources/v1/plans/plans.ts +2032 -0
  291. package/src/resources/v1/plans.ts +3 -0
  292. package/src/resources/v1/products.ts +423 -0
  293. package/src/resources/v1/subscriptions/future-update.ts +12 -27
  294. package/src/resources/v1/subscriptions/index.ts +16 -11
  295. package/src/resources/v1/subscriptions/invoice.ts +42 -0
  296. package/src/resources/v1/subscriptions/subscriptions.ts +3341 -832
  297. package/src/resources/v1/subscriptions/usage.ts +126 -0
  298. package/src/resources/v1/usage.ts +284 -0
  299. package/src/resources/v1/v1.ts +174 -197
  300. package/src/version.ts +1 -1
  301. package/version.d.mts +1 -1
  302. package/version.d.mts.map +1 -1
  303. package/version.d.ts +1 -1
  304. package/version.d.ts.map +1 -1
  305. package/version.js +1 -1
  306. package/version.js.map +1 -1
  307. package/version.mjs +1 -1
  308. package/version.mjs.map +1 -1
  309. package/resources/v1/customers/usage.d.mts +0 -98
  310. package/resources/v1/customers/usage.d.mts.map +0 -1
  311. package/resources/v1/customers/usage.d.ts +0 -98
  312. package/resources/v1/customers/usage.d.ts.map +0 -1
  313. package/resources/v1/customers/usage.js +0 -20
  314. package/resources/v1/customers/usage.js.map +0 -1
  315. package/resources/v1/customers/usage.mjs +0 -16
  316. package/resources/v1/customers/usage.mjs.map +0 -1
  317. package/src/resources/v1/customers/usage.ts +0 -132
@@ -0,0 +1,973 @@
1
+ import { APIResource } from "../../../core/resource.js";
2
+ import * as AddonsAPI from "../addons/addons.js";
3
+ import * as EntitlementsAPI from "./entitlements.js";
4
+ import { EntitlementCreateParams, EntitlementCreateResponse, EntitlementDeleteParams, EntitlementListResponse, EntitlementUpdateParams, Entitlements, PlanEntitlement } from "./entitlements.js";
5
+ import { APIPromise } from "../../../core/api-promise.js";
6
+ import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from "../../../core/pagination.js";
7
+ import { RequestOptions } from "../../../internal/request-options.js";
8
+ export declare class Plans extends APIResource {
9
+ entitlements: EntitlementsAPI.Entitlements;
10
+ /**
11
+ * Creates a new plan in draft status.
12
+ */
13
+ create(body: PlanCreateParams, options?: RequestOptions): APIPromise<Plan>;
14
+ /**
15
+ * Retrieves a plan by its unique identifier, including entitlements and pricing
16
+ * details.
17
+ */
18
+ retrieve(id: string, options?: RequestOptions): APIPromise<Plan>;
19
+ /**
20
+ * Updates an existing plan's properties such as display name, description, and
21
+ * metadata.
22
+ */
23
+ update(id: string, body: PlanUpdateParams, options?: RequestOptions): APIPromise<Plan>;
24
+ /**
25
+ * Retrieves a paginated list of plans in the environment.
26
+ */
27
+ list(query?: PlanListParams | null | undefined, options?: RequestOptions): PagePromise<PlanListResponsesMyCursorIDPage, PlanListResponse>;
28
+ /**
29
+ * Archives a plan, preventing it from being used in new subscriptions.
30
+ */
31
+ archive(id: string, options?: RequestOptions): APIPromise<Plan>;
32
+ /**
33
+ * Creates a draft version of an existing plan for modification before publishing.
34
+ */
35
+ createDraft(id: string, options?: RequestOptions): APIPromise<Plan>;
36
+ /**
37
+ * Publishes a draft plan, making it available for use in subscriptions.
38
+ */
39
+ publish(id: string, body: PlanPublishParams, options?: RequestOptions): APIPromise<PlanPublishResponse>;
40
+ /**
41
+ * Removes a draft version of a plan.
42
+ */
43
+ removeDraft(id: string, options?: RequestOptions): APIPromise<PlanRemoveDraftResponse>;
44
+ /**
45
+ * Sets the pricing configuration for a plan, including pricing models, overage
46
+ * pricing, and minimum spend.
47
+ */
48
+ setPricing(id: string, body: PlanSetPricingParams, options?: RequestOptions): APIPromise<AddonsAPI.SetPackagePricingResponse>;
49
+ }
50
+ export type PlanListResponsesMyCursorIDPage = MyCursorIDPage<PlanListResponse>;
51
+ /**
52
+ * Response object
53
+ */
54
+ export interface Plan {
55
+ /**
56
+ * Plan configuration object
57
+ */
58
+ data: Plan.Data;
59
+ }
60
+ export declare namespace Plan {
61
+ /**
62
+ * Plan configuration object
63
+ */
64
+ interface Data {
65
+ /**
66
+ * The unique identifier for the entity
67
+ */
68
+ id: string;
69
+ /**
70
+ * The unique identifier for the entity in the billing provider
71
+ */
72
+ billingId: string | null;
73
+ compatibleAddonIds: Array<string> | null;
74
+ /**
75
+ * Timestamp of when the record was created
76
+ */
77
+ createdAt: string;
78
+ /**
79
+ * Default trial configuration for the plan
80
+ */
81
+ defaultTrialConfig: Data.DefaultTrialConfig | null;
82
+ /**
83
+ * The description of the package
84
+ */
85
+ description: string | null;
86
+ /**
87
+ * The display name of the package
88
+ */
89
+ displayName: string;
90
+ /**
91
+ * List of entitlements of the package
92
+ */
93
+ entitlements: Array<Data.Entitlement>;
94
+ /**
95
+ * Indicates if the package is the latest version
96
+ */
97
+ isLatest: boolean | null;
98
+ /**
99
+ * Metadata associated with the entity
100
+ */
101
+ metadata: {
102
+ [key: string]: string;
103
+ };
104
+ /**
105
+ * The ID of the parent plan, if applicable
106
+ */
107
+ parentPlanId: string | null;
108
+ /**
109
+ * The pricing type of the package
110
+ */
111
+ pricingType: 'FREE' | 'PAID' | 'CUSTOM' | null;
112
+ /**
113
+ * The product id of the package
114
+ */
115
+ productId: string;
116
+ /**
117
+ * The status of the package
118
+ */
119
+ status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED';
120
+ /**
121
+ * Timestamp of when the record was last updated
122
+ */
123
+ updatedAt: string;
124
+ /**
125
+ * The version number of the package
126
+ */
127
+ versionNumber: number;
128
+ }
129
+ namespace Data {
130
+ /**
131
+ * Default trial configuration for the plan
132
+ */
133
+ interface DefaultTrialConfig {
134
+ /**
135
+ * The duration of the trial in the specified units
136
+ */
137
+ duration: number;
138
+ /**
139
+ * The time unit for the trial duration (DAY or MONTH)
140
+ */
141
+ units: 'DAY' | 'MONTH';
142
+ /**
143
+ * Budget configuration for the trial
144
+ */
145
+ budget?: DefaultTrialConfig.Budget | null;
146
+ /**
147
+ * Behavior when the trial ends (CONVERT_TO_PAID or CANCEL_SUBSCRIPTION)
148
+ */
149
+ trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION' | null;
150
+ }
151
+ namespace DefaultTrialConfig {
152
+ /**
153
+ * Budget configuration for the trial
154
+ */
155
+ interface Budget {
156
+ /**
157
+ * Whether the budget limit is a soft limit (allows overage) or hard limit
158
+ */
159
+ hasSoftLimit: boolean;
160
+ /**
161
+ * The budget limit amount
162
+ */
163
+ limit: number;
164
+ }
165
+ }
166
+ /**
167
+ * Entitlement reference with type and identifier
168
+ */
169
+ interface Entitlement {
170
+ /**
171
+ * The unique identifier for the entity
172
+ */
173
+ id: string;
174
+ type: 'FEATURE' | 'CREDIT';
175
+ }
176
+ }
177
+ }
178
+ /**
179
+ * Plan configuration object
180
+ */
181
+ export interface PlanListResponse {
182
+ /**
183
+ * The unique identifier for the entity
184
+ */
185
+ id: string;
186
+ /**
187
+ * The unique identifier for the entity in the billing provider
188
+ */
189
+ billingId: string | null;
190
+ compatibleAddonIds: Array<string> | null;
191
+ /**
192
+ * Timestamp of when the record was created
193
+ */
194
+ createdAt: string;
195
+ /**
196
+ * Default trial configuration for the plan
197
+ */
198
+ defaultTrialConfig: PlanListResponse.DefaultTrialConfig | null;
199
+ /**
200
+ * The description of the package
201
+ */
202
+ description: string | null;
203
+ /**
204
+ * The display name of the package
205
+ */
206
+ displayName: string;
207
+ /**
208
+ * List of entitlements of the package
209
+ */
210
+ entitlements: Array<PlanListResponse.Entitlement>;
211
+ /**
212
+ * Indicates if the package is the latest version
213
+ */
214
+ isLatest: boolean | null;
215
+ /**
216
+ * Metadata associated with the entity
217
+ */
218
+ metadata: {
219
+ [key: string]: string;
220
+ };
221
+ /**
222
+ * The ID of the parent plan, if applicable
223
+ */
224
+ parentPlanId: string | null;
225
+ /**
226
+ * The pricing type of the package
227
+ */
228
+ pricingType: 'FREE' | 'PAID' | 'CUSTOM' | null;
229
+ /**
230
+ * The product id of the package
231
+ */
232
+ productId: string;
233
+ /**
234
+ * The status of the package
235
+ */
236
+ status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED';
237
+ /**
238
+ * Timestamp of when the record was last updated
239
+ */
240
+ updatedAt: string;
241
+ /**
242
+ * The version number of the package
243
+ */
244
+ versionNumber: number;
245
+ }
246
+ export declare namespace PlanListResponse {
247
+ /**
248
+ * Default trial configuration for the plan
249
+ */
250
+ interface DefaultTrialConfig {
251
+ /**
252
+ * The duration of the trial in the specified units
253
+ */
254
+ duration: number;
255
+ /**
256
+ * The time unit for the trial duration (DAY or MONTH)
257
+ */
258
+ units: 'DAY' | 'MONTH';
259
+ /**
260
+ * Budget configuration for the trial
261
+ */
262
+ budget?: DefaultTrialConfig.Budget | null;
263
+ /**
264
+ * Behavior when the trial ends (CONVERT_TO_PAID or CANCEL_SUBSCRIPTION)
265
+ */
266
+ trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION' | null;
267
+ }
268
+ namespace DefaultTrialConfig {
269
+ /**
270
+ * Budget configuration for the trial
271
+ */
272
+ interface Budget {
273
+ /**
274
+ * Whether the budget limit is a soft limit (allows overage) or hard limit
275
+ */
276
+ hasSoftLimit: boolean;
277
+ /**
278
+ * The budget limit amount
279
+ */
280
+ limit: number;
281
+ }
282
+ }
283
+ /**
284
+ * Entitlement reference with type and identifier
285
+ */
286
+ interface Entitlement {
287
+ /**
288
+ * The unique identifier for the entity
289
+ */
290
+ id: string;
291
+ type: 'FEATURE' | 'CREDIT';
292
+ }
293
+ }
294
+ /**
295
+ * Response containing task ID for publish operation
296
+ */
297
+ export interface PlanPublishResponse {
298
+ data: PlanPublishResponse.Data;
299
+ }
300
+ export declare namespace PlanPublishResponse {
301
+ interface Data {
302
+ /**
303
+ * Task ID for tracking the async publish operation
304
+ */
305
+ taskId: string | null;
306
+ }
307
+ }
308
+ /**
309
+ * Response confirming the plan draft was removed.
310
+ */
311
+ export interface PlanRemoveDraftResponse {
312
+ data: PlanRemoveDraftResponse.Data;
313
+ }
314
+ export declare namespace PlanRemoveDraftResponse {
315
+ interface Data {
316
+ /**
317
+ * The unique identifier for the entity
318
+ */
319
+ id: string;
320
+ }
321
+ }
322
+ export interface PlanCreateParams {
323
+ /**
324
+ * The unique identifier for the entity
325
+ */
326
+ id: string;
327
+ /**
328
+ * The display name of the package
329
+ */
330
+ displayName: string;
331
+ /**
332
+ * The product ID to associate the plan with
333
+ */
334
+ productId: string;
335
+ /**
336
+ * The unique identifier for the entity in the billing provider
337
+ */
338
+ billingId?: string | null;
339
+ /**
340
+ * Default trial configuration for the plan
341
+ */
342
+ defaultTrialConfig?: PlanCreateParams.DefaultTrialConfig | null;
343
+ /**
344
+ * The description of the package
345
+ */
346
+ description?: string | null;
347
+ /**
348
+ * Metadata associated with the entity
349
+ */
350
+ metadata?: {
351
+ [key: string]: string;
352
+ };
353
+ /**
354
+ * The ID of the parent plan, if applicable
355
+ */
356
+ parentPlanId?: string | null;
357
+ /**
358
+ * The pricing type of the package
359
+ */
360
+ pricingType?: 'FREE' | 'PAID' | 'CUSTOM' | null;
361
+ /**
362
+ * The status of the package
363
+ */
364
+ status?: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED';
365
+ }
366
+ export declare namespace PlanCreateParams {
367
+ /**
368
+ * Default trial configuration for the plan
369
+ */
370
+ interface DefaultTrialConfig {
371
+ /**
372
+ * The duration of the trial in the specified units
373
+ */
374
+ duration: number;
375
+ /**
376
+ * The time unit for the trial duration (DAY or MONTH)
377
+ */
378
+ units: 'DAY' | 'MONTH';
379
+ /**
380
+ * Budget configuration for the trial
381
+ */
382
+ budget?: DefaultTrialConfig.Budget | null;
383
+ /**
384
+ * Behavior when the trial ends (CONVERT_TO_PAID or CANCEL_SUBSCRIPTION)
385
+ */
386
+ trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION' | null;
387
+ }
388
+ namespace DefaultTrialConfig {
389
+ /**
390
+ * Budget configuration for the trial
391
+ */
392
+ interface Budget {
393
+ /**
394
+ * Whether the budget limit is a soft limit (allows overage) or hard limit
395
+ */
396
+ hasSoftLimit: boolean;
397
+ /**
398
+ * The budget limit amount
399
+ */
400
+ limit: number;
401
+ }
402
+ }
403
+ }
404
+ export interface PlanUpdateParams {
405
+ /**
406
+ * The unique identifier for the entity in the billing provider
407
+ */
408
+ billingId?: string | null;
409
+ compatibleAddonIds?: Array<string> | null;
410
+ /**
411
+ * Default trial configuration for the plan
412
+ */
413
+ defaultTrialConfig?: PlanUpdateParams.DefaultTrialConfig | null;
414
+ /**
415
+ * The description of the package
416
+ */
417
+ description?: string | null;
418
+ /**
419
+ * The display name of the package
420
+ */
421
+ displayName?: string;
422
+ /**
423
+ * Metadata associated with the entity
424
+ */
425
+ metadata?: {
426
+ [key: string]: string;
427
+ };
428
+ /**
429
+ * The ID of the parent plan, if applicable
430
+ */
431
+ parentPlanId?: string | null;
432
+ }
433
+ export declare namespace PlanUpdateParams {
434
+ /**
435
+ * Default trial configuration for the plan
436
+ */
437
+ interface DefaultTrialConfig {
438
+ /**
439
+ * The duration of the trial in the specified units
440
+ */
441
+ duration: number;
442
+ /**
443
+ * The time unit for the trial duration (DAY or MONTH)
444
+ */
445
+ units: 'DAY' | 'MONTH';
446
+ /**
447
+ * Budget configuration for the trial
448
+ */
449
+ budget?: DefaultTrialConfig.Budget | null;
450
+ /**
451
+ * Behavior when the trial ends (CONVERT_TO_PAID or CANCEL_SUBSCRIPTION)
452
+ */
453
+ trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION' | null;
454
+ }
455
+ namespace DefaultTrialConfig {
456
+ /**
457
+ * Budget configuration for the trial
458
+ */
459
+ interface Budget {
460
+ /**
461
+ * Whether the budget limit is a soft limit (allows overage) or hard limit
462
+ */
463
+ hasSoftLimit: boolean;
464
+ /**
465
+ * The budget limit amount
466
+ */
467
+ limit: number;
468
+ }
469
+ }
470
+ }
471
+ export interface PlanListParams extends MyCursorIDPageParams {
472
+ /**
473
+ * Filter by creation date using range operators: gt, gte, lt, lte
474
+ */
475
+ createdAt?: PlanListParams.CreatedAt;
476
+ /**
477
+ * Filter by product ID
478
+ */
479
+ productId?: string;
480
+ /**
481
+ * Filter by status. Supports comma-separated values for multiple statuses
482
+ */
483
+ status?: string;
484
+ }
485
+ export declare namespace PlanListParams {
486
+ /**
487
+ * Filter by creation date using range operators: gt, gte, lt, lte
488
+ */
489
+ interface CreatedAt {
490
+ /**
491
+ * Greater than the specified createdAt value
492
+ */
493
+ gt?: string;
494
+ /**
495
+ * Greater than or equal to the specified createdAt value
496
+ */
497
+ gte?: string;
498
+ /**
499
+ * Less than the specified createdAt value
500
+ */
501
+ lt?: string;
502
+ /**
503
+ * Less than or equal to the specified createdAt value
504
+ */
505
+ lte?: string;
506
+ }
507
+ }
508
+ export interface PlanPublishParams {
509
+ /**
510
+ * The migration type of the package
511
+ */
512
+ migrationType: 'NEW_CUSTOMERS' | 'ALL_CUSTOMERS';
513
+ }
514
+ export interface PlanSetPricingParams {
515
+ /**
516
+ * The pricing type (FREE, PAID, or CUSTOM)
517
+ */
518
+ pricingType: 'FREE' | 'PAID' | 'CUSTOM';
519
+ /**
520
+ * Deprecated: billing integration ID
521
+ */
522
+ billingId?: string;
523
+ /**
524
+ * Minimum spend configuration per billing period
525
+ */
526
+ minimumSpend?: Array<PlanSetPricingParams.MinimumSpend> | null;
527
+ /**
528
+ * When overage charges are billed
529
+ */
530
+ overageBillingPeriod?: 'ON_SUBSCRIPTION_RENEWAL' | 'MONTHLY';
531
+ /**
532
+ * Array of overage pricing model configurations
533
+ */
534
+ overagePricingModels?: Array<PlanSetPricingParams.OveragePricingModel>;
535
+ /**
536
+ * Array of pricing model configurations
537
+ */
538
+ pricingModels?: Array<PlanSetPricingParams.PricingModel>;
539
+ }
540
+ export declare namespace PlanSetPricingParams {
541
+ /**
542
+ * Minimum spend configuration for a billing period.
543
+ */
544
+ interface MinimumSpend {
545
+ /**
546
+ * The billing period
547
+ */
548
+ billingPeriod: 'MONTHLY' | 'ANNUALLY';
549
+ /**
550
+ * The minimum spend amount
551
+ */
552
+ minimum: MinimumSpend.Minimum;
553
+ }
554
+ namespace MinimumSpend {
555
+ /**
556
+ * The minimum spend amount
557
+ */
558
+ interface Minimum {
559
+ /**
560
+ * The price amount
561
+ */
562
+ amount: number;
563
+ /**
564
+ * The price currency
565
+ */
566
+ currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
567
+ }
568
+ }
569
+ /**
570
+ * Overage pricing model configuration.
571
+ */
572
+ interface OveragePricingModel {
573
+ /**
574
+ * The billing model for overages
575
+ */
576
+ billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED';
577
+ /**
578
+ * Price periods for overage pricing
579
+ */
580
+ pricePeriods: Array<OveragePricingModel.PricePeriod>;
581
+ /**
582
+ * The billing cadence for overages
583
+ */
584
+ billingCadence?: 'RECURRING' | 'ONE_OFF';
585
+ /**
586
+ * Entitlement configuration for the overage feature
587
+ */
588
+ entitlement?: OveragePricingModel.Entitlement;
589
+ /**
590
+ * The feature ID for overage pricing
591
+ */
592
+ featureId?: string;
593
+ /**
594
+ * Custom currency ID for overage top-up
595
+ */
596
+ topUpCustomCurrencyId?: string;
597
+ }
598
+ namespace OveragePricingModel {
599
+ /**
600
+ * Price configuration for a specific billing period.
601
+ */
602
+ interface PricePeriod {
603
+ /**
604
+ * The billing period (MONTHLY or ANNUALLY)
605
+ */
606
+ billingPeriod: 'MONTHLY' | 'ANNUALLY';
607
+ /**
608
+ * ISO country code for localized pricing
609
+ */
610
+ billingCountryCode?: string;
611
+ /**
612
+ * Block size for usage-based pricing
613
+ */
614
+ blockSize?: number;
615
+ /**
616
+ * When credits are granted
617
+ */
618
+ creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY';
619
+ /**
620
+ * Credit rate configuration for credit-based pricing
621
+ */
622
+ creditRate?: PricePeriod.CreditRate;
623
+ /**
624
+ * The price amount and currency
625
+ */
626
+ price?: PricePeriod.Price;
627
+ /**
628
+ * Tiered pricing configuration
629
+ */
630
+ tiers?: Array<PricePeriod.Tier>;
631
+ }
632
+ namespace PricePeriod {
633
+ /**
634
+ * Credit rate configuration for credit-based pricing
635
+ */
636
+ interface CreditRate {
637
+ /**
638
+ * The credit rate amount
639
+ */
640
+ amount: number;
641
+ /**
642
+ * The custom currency ID
643
+ */
644
+ currencyId: string;
645
+ /**
646
+ * Optional cost formula expression
647
+ */
648
+ costFormula?: string;
649
+ }
650
+ /**
651
+ * The price amount and currency
652
+ */
653
+ interface Price {
654
+ /**
655
+ * The price amount
656
+ */
657
+ amount: number;
658
+ /**
659
+ * The price currency
660
+ */
661
+ currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
662
+ }
663
+ /**
664
+ * A tier in tiered pricing.
665
+ */
666
+ interface Tier {
667
+ /**
668
+ * Flat price for this tier
669
+ */
670
+ flatPrice?: Tier.FlatPrice;
671
+ /**
672
+ * Per-unit price in this tier
673
+ */
674
+ unitPrice?: Tier.UnitPrice;
675
+ /**
676
+ * Upper bound of this tier (null for unlimited)
677
+ */
678
+ upTo?: number;
679
+ }
680
+ namespace Tier {
681
+ /**
682
+ * Flat price for this tier
683
+ */
684
+ interface FlatPrice {
685
+ /**
686
+ * The price amount
687
+ */
688
+ amount: number;
689
+ /**
690
+ * The price currency
691
+ */
692
+ currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
693
+ }
694
+ /**
695
+ * Per-unit price in this tier
696
+ */
697
+ interface UnitPrice {
698
+ /**
699
+ * The price amount
700
+ */
701
+ amount: number;
702
+ /**
703
+ * The price currency
704
+ */
705
+ currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
706
+ }
707
+ }
708
+ }
709
+ /**
710
+ * Entitlement configuration for the overage feature
711
+ */
712
+ interface Entitlement {
713
+ /**
714
+ * The feature ID for the entitlement
715
+ */
716
+ featureId: string;
717
+ /**
718
+ * Whether the limit is soft (allows overage)
719
+ */
720
+ hasSoftLimit?: boolean;
721
+ /**
722
+ * Whether usage is unlimited
723
+ */
724
+ hasUnlimitedUsage?: boolean;
725
+ /**
726
+ * Monthly reset configuration
727
+ */
728
+ monthlyResetPeriodConfiguration?: Entitlement.MonthlyResetPeriodConfiguration;
729
+ /**
730
+ * The usage reset period
731
+ */
732
+ resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR';
733
+ /**
734
+ * The usage limit before overage kicks in
735
+ */
736
+ usageLimit?: number;
737
+ /**
738
+ * Weekly reset configuration
739
+ */
740
+ weeklyResetPeriodConfiguration?: Entitlement.WeeklyResetPeriodConfiguration;
741
+ /**
742
+ * Yearly reset configuration
743
+ */
744
+ yearlyResetPeriodConfiguration?: Entitlement.YearlyResetPeriodConfiguration;
745
+ }
746
+ namespace Entitlement {
747
+ /**
748
+ * Monthly reset configuration
749
+ */
750
+ interface MonthlyResetPeriodConfiguration {
751
+ /**
752
+ * Reset anchor (SubscriptionStart or StartOfTheMonth)
753
+ */
754
+ accordingTo: 'SubscriptionStart' | 'StartOfTheMonth';
755
+ }
756
+ /**
757
+ * Weekly reset configuration
758
+ */
759
+ interface WeeklyResetPeriodConfiguration {
760
+ /**
761
+ * Reset anchor (SubscriptionStart or specific day)
762
+ */
763
+ accordingTo: 'SubscriptionStart' | 'EverySunday' | 'EveryMonday' | 'EveryTuesday' | 'EveryWednesday' | 'EveryThursday' | 'EveryFriday' | 'EverySaturday';
764
+ }
765
+ /**
766
+ * Yearly reset configuration
767
+ */
768
+ interface YearlyResetPeriodConfiguration {
769
+ /**
770
+ * Reset anchor (SubscriptionStart)
771
+ */
772
+ accordingTo: 'SubscriptionStart';
773
+ }
774
+ }
775
+ }
776
+ /**
777
+ * A pricing model configuration with billing details and price periods.
778
+ */
779
+ interface PricingModel {
780
+ /**
781
+ * The billing model (FLAT_FEE, PER_UNIT, USAGE_BASED, CREDIT_BASED)
782
+ */
783
+ billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED';
784
+ /**
785
+ * Array of price period configurations (at least one required)
786
+ */
787
+ pricePeriods: Array<PricingModel.PricePeriod>;
788
+ /**
789
+ * The billing cadence (RECURRING or ONE_OFF)
790
+ */
791
+ billingCadence?: 'RECURRING' | 'ONE_OFF';
792
+ /**
793
+ * The feature ID this pricing model is associated with
794
+ */
795
+ featureId?: string;
796
+ /**
797
+ * Maximum number of units (max 999999)
798
+ */
799
+ maxUnitQuantity?: number;
800
+ /**
801
+ * Minimum number of units
802
+ */
803
+ minUnitQuantity?: number;
804
+ /**
805
+ * Monthly reset period configuration
806
+ */
807
+ monthlyResetPeriodConfiguration?: PricingModel.MonthlyResetPeriodConfiguration;
808
+ /**
809
+ * The usage reset period
810
+ */
811
+ resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR';
812
+ /**
813
+ * The tiered pricing mode (VOLUME or GRADUATED)
814
+ */
815
+ tiersMode?: 'VOLUME' | 'GRADUATED';
816
+ /**
817
+ * The custom currency ID for top-up pricing
818
+ */
819
+ topUpCustomCurrencyId?: string;
820
+ /**
821
+ * Weekly reset period configuration
822
+ */
823
+ weeklyResetPeriodConfiguration?: PricingModel.WeeklyResetPeriodConfiguration;
824
+ /**
825
+ * Yearly reset period configuration
826
+ */
827
+ yearlyResetPeriodConfiguration?: PricingModel.YearlyResetPeriodConfiguration;
828
+ }
829
+ namespace PricingModel {
830
+ /**
831
+ * Price configuration for a specific billing period.
832
+ */
833
+ interface PricePeriod {
834
+ /**
835
+ * The billing period (MONTHLY or ANNUALLY)
836
+ */
837
+ billingPeriod: 'MONTHLY' | 'ANNUALLY';
838
+ /**
839
+ * ISO country code for localized pricing
840
+ */
841
+ billingCountryCode?: string;
842
+ /**
843
+ * Block size for usage-based pricing
844
+ */
845
+ blockSize?: number;
846
+ /**
847
+ * When credits are granted
848
+ */
849
+ creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY';
850
+ /**
851
+ * Credit rate configuration for credit-based pricing
852
+ */
853
+ creditRate?: PricePeriod.CreditRate;
854
+ /**
855
+ * The price amount and currency
856
+ */
857
+ price?: PricePeriod.Price;
858
+ /**
859
+ * Tiered pricing configuration
860
+ */
861
+ tiers?: Array<PricePeriod.Tier>;
862
+ }
863
+ namespace PricePeriod {
864
+ /**
865
+ * Credit rate configuration for credit-based pricing
866
+ */
867
+ interface CreditRate {
868
+ /**
869
+ * The credit rate amount
870
+ */
871
+ amount: number;
872
+ /**
873
+ * The custom currency ID
874
+ */
875
+ currencyId: string;
876
+ /**
877
+ * Optional cost formula expression
878
+ */
879
+ costFormula?: string;
880
+ }
881
+ /**
882
+ * The price amount and currency
883
+ */
884
+ interface Price {
885
+ /**
886
+ * The price amount
887
+ */
888
+ amount: number;
889
+ /**
890
+ * The price currency
891
+ */
892
+ currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
893
+ }
894
+ /**
895
+ * A tier in tiered pricing.
896
+ */
897
+ interface Tier {
898
+ /**
899
+ * Flat price for this tier
900
+ */
901
+ flatPrice?: Tier.FlatPrice;
902
+ /**
903
+ * Per-unit price in this tier
904
+ */
905
+ unitPrice?: Tier.UnitPrice;
906
+ /**
907
+ * Upper bound of this tier (null for unlimited)
908
+ */
909
+ upTo?: number;
910
+ }
911
+ namespace Tier {
912
+ /**
913
+ * Flat price for this tier
914
+ */
915
+ interface FlatPrice {
916
+ /**
917
+ * The price amount
918
+ */
919
+ amount: number;
920
+ /**
921
+ * The price currency
922
+ */
923
+ currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
924
+ }
925
+ /**
926
+ * Per-unit price in this tier
927
+ */
928
+ interface UnitPrice {
929
+ /**
930
+ * The price amount
931
+ */
932
+ amount: number;
933
+ /**
934
+ * The price currency
935
+ */
936
+ currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
937
+ }
938
+ }
939
+ }
940
+ /**
941
+ * Monthly reset period configuration
942
+ */
943
+ interface MonthlyResetPeriodConfiguration {
944
+ /**
945
+ * Reset anchor (SubscriptionStart or StartOfTheMonth)
946
+ */
947
+ accordingTo: 'SubscriptionStart' | 'StartOfTheMonth';
948
+ }
949
+ /**
950
+ * Weekly reset period configuration
951
+ */
952
+ interface WeeklyResetPeriodConfiguration {
953
+ /**
954
+ * Reset anchor (SubscriptionStart or specific day)
955
+ */
956
+ accordingTo: 'SubscriptionStart' | 'EverySunday' | 'EveryMonday' | 'EveryTuesday' | 'EveryWednesday' | 'EveryThursday' | 'EveryFriday' | 'EverySaturday';
957
+ }
958
+ /**
959
+ * Yearly reset period configuration
960
+ */
961
+ interface YearlyResetPeriodConfiguration {
962
+ /**
963
+ * Reset anchor (SubscriptionStart)
964
+ */
965
+ accordingTo: 'SubscriptionStart';
966
+ }
967
+ }
968
+ }
969
+ export declare namespace Plans {
970
+ export { type Plan as Plan, type PlanListResponse as PlanListResponse, type PlanPublishResponse as PlanPublishResponse, type PlanRemoveDraftResponse as PlanRemoveDraftResponse, type PlanListResponsesMyCursorIDPage as PlanListResponsesMyCursorIDPage, type PlanCreateParams as PlanCreateParams, type PlanUpdateParams as PlanUpdateParams, type PlanListParams as PlanListParams, type PlanPublishParams as PlanPublishParams, type PlanSetPricingParams as PlanSetPricingParams, };
971
+ export { Entitlements as Entitlements, type PlanEntitlement as PlanEntitlement, type EntitlementCreateResponse as EntitlementCreateResponse, type EntitlementListResponse as EntitlementListResponse, type EntitlementCreateParams as EntitlementCreateParams, type EntitlementUpdateParams as EntitlementUpdateParams, type EntitlementDeleteParams as EntitlementDeleteParams, };
972
+ }
973
+ //# sourceMappingURL=plans.d.ts.map