@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,669 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import { APIPromise } from '../../../core/api-promise';
5
+ import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../../core/pagination';
6
+ import { RequestOptions } from '../../../internal/request-options';
7
+ import { path } from '../../../internal/utils/path';
8
+
9
+ export class PromotionalEntitlements extends APIResource {
10
+ /**
11
+ * Grants promotional entitlements to a customer, providing feature access outside
12
+ * their subscription. Entitlements can be time-limited or permanent.
13
+ */
14
+ create(
15
+ id: string,
16
+ body: PromotionalEntitlementCreateParams,
17
+ options?: RequestOptions,
18
+ ): APIPromise<PromotionalEntitlementCreateResponse> {
19
+ return this._client.post(path`/api/v1/customers/${id}/promotional-entitlements`, { body, ...options });
20
+ }
21
+
22
+ /**
23
+ * Retrieves a paginated list of a customer's promotional entitlements.
24
+ */
25
+ list(
26
+ id: string,
27
+ query: PromotionalEntitlementListParams | null | undefined = {},
28
+ options?: RequestOptions,
29
+ ): PagePromise<PromotionalEntitlementListResponsesMyCursorIDPage, PromotionalEntitlementListResponse> {
30
+ return this._client.getAPIList(
31
+ path`/api/v1/customers/${id}/promotional-entitlements`,
32
+ MyCursorIDPage<PromotionalEntitlementListResponse>,
33
+ { query, ...options },
34
+ );
35
+ }
36
+
37
+ /**
38
+ * Revokes a previously granted promotional entitlement from a customer for a
39
+ * specific feature.
40
+ */
41
+ revoke(
42
+ featureID: string,
43
+ params: PromotionalEntitlementRevokeParams,
44
+ options?: RequestOptions,
45
+ ): APIPromise<PromotionalEntitlementRevokeResponse> {
46
+ const { id } = params;
47
+ return this._client.delete(path`/api/v1/customers/${id}/promotional-entitlements/${featureID}`, options);
48
+ }
49
+ }
50
+
51
+ export type PromotionalEntitlementListResponsesMyCursorIDPage =
52
+ MyCursorIDPage<PromotionalEntitlementListResponse>;
53
+
54
+ /**
55
+ * Response object
56
+ */
57
+ export interface PromotionalEntitlementCreateResponse {
58
+ data: Array<PromotionalEntitlementCreateResponse.Data>;
59
+ }
60
+
61
+ export namespace PromotionalEntitlementCreateResponse {
62
+ /**
63
+ * Granted feature entitlement
64
+ */
65
+ export interface Data {
66
+ /**
67
+ * Unique identifier for the entity
68
+ */
69
+ id: string;
70
+
71
+ /**
72
+ * Timestamp of when the record was created
73
+ */
74
+ createdAt: string;
75
+
76
+ /**
77
+ * The description of the entitlement
78
+ */
79
+ description: string | null;
80
+
81
+ /**
82
+ * The end date of the promotional entitlement
83
+ */
84
+ endDate: string | null;
85
+
86
+ /**
87
+ * The enum values of the entitlement
88
+ */
89
+ enumValues: Array<string> | null;
90
+
91
+ /**
92
+ * The unique identifier for the environment
93
+ */
94
+ environmentId: string;
95
+
96
+ /**
97
+ * Feature group IDs associated with this entitlement
98
+ */
99
+ featureGroupIds: Array<string> | null;
100
+
101
+ /**
102
+ * The unique identifier of the entitlement feature
103
+ */
104
+ featureId: string;
105
+
106
+ /**
107
+ * Whether the entitlement has a soft limit
108
+ */
109
+ hasSoftLimit: boolean | null;
110
+
111
+ /**
112
+ * Whether the entitlement has an unlimited usage
113
+ */
114
+ hasUnlimitedUsage: boolean | null;
115
+
116
+ /**
117
+ * Whether the entitlement is visible
118
+ */
119
+ isVisible: boolean;
120
+
121
+ /**
122
+ * The grant period of the promotional entitlement
123
+ */
124
+ period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom';
125
+
126
+ /**
127
+ * The reset period of the entitlement
128
+ */
129
+ resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | null;
130
+
131
+ /**
132
+ * The reset period configuration of the entitlement
133
+ */
134
+ resetPeriodConfiguration:
135
+ | Data.YearlyResetPeriodConfig
136
+ | Data.MonthlyResetPeriodConfig
137
+ | Data.WeeklyResetPeriodConfig
138
+ | null;
139
+
140
+ /**
141
+ * The start date of the entitlement
142
+ */
143
+ startDate: string;
144
+
145
+ /**
146
+ * The status of the entitlement
147
+ */
148
+ status: 'Active' | 'Expired' | 'Paused';
149
+
150
+ /**
151
+ * Timestamp of when the record was last updated
152
+ */
153
+ updatedAt: string;
154
+
155
+ /**
156
+ * The usage limit of the entitlement
157
+ */
158
+ usageLimit: number | null;
159
+ }
160
+
161
+ export namespace Data {
162
+ /**
163
+ * Yearly reset configuration
164
+ */
165
+ export interface YearlyResetPeriodConfig {
166
+ /**
167
+ * Reset anchor (SubscriptionStart)
168
+ */
169
+ accordingTo: 'SubscriptionStart';
170
+ }
171
+
172
+ /**
173
+ * Monthly reset configuration
174
+ */
175
+ export interface MonthlyResetPeriodConfig {
176
+ /**
177
+ * Reset anchor (SubscriptionStart or StartOfTheMonth)
178
+ */
179
+ accordingTo: 'SubscriptionStart' | 'StartOfTheMonth';
180
+ }
181
+
182
+ /**
183
+ * Weekly reset configuration
184
+ */
185
+ export interface WeeklyResetPeriodConfig {
186
+ /**
187
+ * Reset anchor (SubscriptionStart or specific day)
188
+ */
189
+ accordingTo:
190
+ | 'SubscriptionStart'
191
+ | 'EverySunday'
192
+ | 'EveryMonday'
193
+ | 'EveryTuesday'
194
+ | 'EveryWednesday'
195
+ | 'EveryThursday'
196
+ | 'EveryFriday'
197
+ | 'EverySaturday';
198
+ }
199
+ }
200
+ }
201
+
202
+ /**
203
+ * Granted feature entitlement
204
+ */
205
+ export interface PromotionalEntitlementListResponse {
206
+ /**
207
+ * Unique identifier for the entity
208
+ */
209
+ id: string;
210
+
211
+ /**
212
+ * Timestamp of when the record was created
213
+ */
214
+ createdAt: string;
215
+
216
+ /**
217
+ * The description of the entitlement
218
+ */
219
+ description: string | null;
220
+
221
+ /**
222
+ * The end date of the promotional entitlement
223
+ */
224
+ endDate: string | null;
225
+
226
+ /**
227
+ * The enum values of the entitlement
228
+ */
229
+ enumValues: Array<string> | null;
230
+
231
+ /**
232
+ * The unique identifier for the environment
233
+ */
234
+ environmentId: string;
235
+
236
+ /**
237
+ * Feature group IDs associated with this entitlement
238
+ */
239
+ featureGroupIds: Array<string> | null;
240
+
241
+ /**
242
+ * The unique identifier of the entitlement feature
243
+ */
244
+ featureId: string;
245
+
246
+ /**
247
+ * Whether the entitlement has a soft limit
248
+ */
249
+ hasSoftLimit: boolean | null;
250
+
251
+ /**
252
+ * Whether the entitlement has an unlimited usage
253
+ */
254
+ hasUnlimitedUsage: boolean | null;
255
+
256
+ /**
257
+ * Whether the entitlement is visible
258
+ */
259
+ isVisible: boolean;
260
+
261
+ /**
262
+ * The grant period of the promotional entitlement
263
+ */
264
+ period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom';
265
+
266
+ /**
267
+ * The reset period of the entitlement
268
+ */
269
+ resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | null;
270
+
271
+ /**
272
+ * The reset period configuration of the entitlement
273
+ */
274
+ resetPeriodConfiguration:
275
+ | PromotionalEntitlementListResponse.YearlyResetPeriodConfig
276
+ | PromotionalEntitlementListResponse.MonthlyResetPeriodConfig
277
+ | PromotionalEntitlementListResponse.WeeklyResetPeriodConfig
278
+ | null;
279
+
280
+ /**
281
+ * The start date of the entitlement
282
+ */
283
+ startDate: string;
284
+
285
+ /**
286
+ * The status of the entitlement
287
+ */
288
+ status: 'Active' | 'Expired' | 'Paused';
289
+
290
+ /**
291
+ * Timestamp of when the record was last updated
292
+ */
293
+ updatedAt: string;
294
+
295
+ /**
296
+ * The usage limit of the entitlement
297
+ */
298
+ usageLimit: number | null;
299
+ }
300
+
301
+ export namespace PromotionalEntitlementListResponse {
302
+ /**
303
+ * Yearly reset configuration
304
+ */
305
+ export interface YearlyResetPeriodConfig {
306
+ /**
307
+ * Reset anchor (SubscriptionStart)
308
+ */
309
+ accordingTo: 'SubscriptionStart';
310
+ }
311
+
312
+ /**
313
+ * Monthly reset configuration
314
+ */
315
+ export interface MonthlyResetPeriodConfig {
316
+ /**
317
+ * Reset anchor (SubscriptionStart or StartOfTheMonth)
318
+ */
319
+ accordingTo: 'SubscriptionStart' | 'StartOfTheMonth';
320
+ }
321
+
322
+ /**
323
+ * Weekly reset configuration
324
+ */
325
+ export interface WeeklyResetPeriodConfig {
326
+ /**
327
+ * Reset anchor (SubscriptionStart or specific day)
328
+ */
329
+ accordingTo:
330
+ | 'SubscriptionStart'
331
+ | 'EverySunday'
332
+ | 'EveryMonday'
333
+ | 'EveryTuesday'
334
+ | 'EveryWednesday'
335
+ | 'EveryThursday'
336
+ | 'EveryFriday'
337
+ | 'EverySaturday';
338
+ }
339
+ }
340
+
341
+ /**
342
+ * Response object
343
+ */
344
+ export interface PromotionalEntitlementRevokeResponse {
345
+ /**
346
+ * Granted feature entitlement
347
+ */
348
+ data: PromotionalEntitlementRevokeResponse.Data;
349
+ }
350
+
351
+ export namespace PromotionalEntitlementRevokeResponse {
352
+ /**
353
+ * Granted feature entitlement
354
+ */
355
+ export interface Data {
356
+ /**
357
+ * Unique identifier for the entity
358
+ */
359
+ id: string;
360
+
361
+ /**
362
+ * Timestamp of when the record was created
363
+ */
364
+ createdAt: string;
365
+
366
+ /**
367
+ * The description of the entitlement
368
+ */
369
+ description: string | null;
370
+
371
+ /**
372
+ * The end date of the promotional entitlement
373
+ */
374
+ endDate: string | null;
375
+
376
+ /**
377
+ * The enum values of the entitlement
378
+ */
379
+ enumValues: Array<string> | null;
380
+
381
+ /**
382
+ * The unique identifier for the environment
383
+ */
384
+ environmentId: string;
385
+
386
+ /**
387
+ * Feature group IDs associated with this entitlement
388
+ */
389
+ featureGroupIds: Array<string> | null;
390
+
391
+ /**
392
+ * The unique identifier of the entitlement feature
393
+ */
394
+ featureId: string;
395
+
396
+ /**
397
+ * Whether the entitlement has a soft limit
398
+ */
399
+ hasSoftLimit: boolean | null;
400
+
401
+ /**
402
+ * Whether the entitlement has an unlimited usage
403
+ */
404
+ hasUnlimitedUsage: boolean | null;
405
+
406
+ /**
407
+ * Whether the entitlement is visible
408
+ */
409
+ isVisible: boolean;
410
+
411
+ /**
412
+ * The grant period of the promotional entitlement
413
+ */
414
+ period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom';
415
+
416
+ /**
417
+ * The reset period of the entitlement
418
+ */
419
+ resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | null;
420
+
421
+ /**
422
+ * The reset period configuration of the entitlement
423
+ */
424
+ resetPeriodConfiguration:
425
+ | Data.YearlyResetPeriodConfig
426
+ | Data.MonthlyResetPeriodConfig
427
+ | Data.WeeklyResetPeriodConfig
428
+ | null;
429
+
430
+ /**
431
+ * The start date of the entitlement
432
+ */
433
+ startDate: string;
434
+
435
+ /**
436
+ * The status of the entitlement
437
+ */
438
+ status: 'Active' | 'Expired' | 'Paused';
439
+
440
+ /**
441
+ * Timestamp of when the record was last updated
442
+ */
443
+ updatedAt: string;
444
+
445
+ /**
446
+ * The usage limit of the entitlement
447
+ */
448
+ usageLimit: number | null;
449
+ }
450
+
451
+ export namespace Data {
452
+ /**
453
+ * Yearly reset configuration
454
+ */
455
+ export interface YearlyResetPeriodConfig {
456
+ /**
457
+ * Reset anchor (SubscriptionStart)
458
+ */
459
+ accordingTo: 'SubscriptionStart';
460
+ }
461
+
462
+ /**
463
+ * Monthly reset configuration
464
+ */
465
+ export interface MonthlyResetPeriodConfig {
466
+ /**
467
+ * Reset anchor (SubscriptionStart or StartOfTheMonth)
468
+ */
469
+ accordingTo: 'SubscriptionStart' | 'StartOfTheMonth';
470
+ }
471
+
472
+ /**
473
+ * Weekly reset configuration
474
+ */
475
+ export interface WeeklyResetPeriodConfig {
476
+ /**
477
+ * Reset anchor (SubscriptionStart or specific day)
478
+ */
479
+ accordingTo:
480
+ | 'SubscriptionStart'
481
+ | 'EverySunday'
482
+ | 'EveryMonday'
483
+ | 'EveryTuesday'
484
+ | 'EveryWednesday'
485
+ | 'EveryThursday'
486
+ | 'EveryFriday'
487
+ | 'EverySaturday';
488
+ }
489
+ }
490
+ }
491
+
492
+ export interface PromotionalEntitlementCreateParams {
493
+ /**
494
+ * Promotional entitlements to grant
495
+ */
496
+ promotionalEntitlements: Array<PromotionalEntitlementCreateParams.PromotionalEntitlement>;
497
+ }
498
+
499
+ export namespace PromotionalEntitlementCreateParams {
500
+ /**
501
+ * Single entitlement grant config
502
+ */
503
+ export interface PromotionalEntitlement {
504
+ /**
505
+ * The custom end date of the promotional entitlement
506
+ */
507
+ customEndDate: string | null;
508
+
509
+ /**
510
+ * The enum values of the entitlement
511
+ */
512
+ enumValues: Array<string> | null;
513
+
514
+ /**
515
+ * The unique identifier of the entitlement feature
516
+ */
517
+ featureId: string;
518
+
519
+ /**
520
+ * Whether the entitlement has a soft limit
521
+ */
522
+ hasSoftLimit: boolean | null;
523
+
524
+ /**
525
+ * Whether the entitlement has an unlimited usage
526
+ */
527
+ hasUnlimitedUsage: boolean | null;
528
+
529
+ /**
530
+ * Whether the entitlement is visible
531
+ */
532
+ isVisible: boolean | null;
533
+
534
+ /**
535
+ * The monthly reset period configuration of the entitlement, defined when reset
536
+ * period is monthly
537
+ */
538
+ monthlyResetPeriodConfiguration: PromotionalEntitlement.MonthlyResetPeriodConfiguration | null;
539
+
540
+ /**
541
+ * The grant period of the promotional entitlement
542
+ */
543
+ period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom';
544
+
545
+ /**
546
+ * The reset period of the entitlement
547
+ */
548
+ resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | null;
549
+
550
+ /**
551
+ * The usage limit of the entitlement
552
+ */
553
+ usageLimit: number | null;
554
+
555
+ /**
556
+ * The weekly reset period configuration of the entitlement, defined when reset
557
+ * period is weekly
558
+ */
559
+ weeklyResetPeriodConfiguration: PromotionalEntitlement.WeeklyResetPeriodConfiguration | null;
560
+
561
+ /**
562
+ * The yearly reset period configuration of the entitlement, defined when reset
563
+ * period is yearly
564
+ */
565
+ yearlyResetPeriodConfiguration: PromotionalEntitlement.YearlyResetPeriodConfiguration | null;
566
+ }
567
+
568
+ export namespace PromotionalEntitlement {
569
+ /**
570
+ * The monthly reset period configuration of the entitlement, defined when reset
571
+ * period is monthly
572
+ */
573
+ export interface MonthlyResetPeriodConfiguration {
574
+ /**
575
+ * Reset anchor (SubscriptionStart or StartOfTheMonth)
576
+ */
577
+ accordingTo: 'SubscriptionStart' | 'StartOfTheMonth';
578
+ }
579
+
580
+ /**
581
+ * The weekly reset period configuration of the entitlement, defined when reset
582
+ * period is weekly
583
+ */
584
+ export interface WeeklyResetPeriodConfiguration {
585
+ /**
586
+ * Reset anchor (SubscriptionStart or specific day)
587
+ */
588
+ accordingTo:
589
+ | 'SubscriptionStart'
590
+ | 'EverySunday'
591
+ | 'EveryMonday'
592
+ | 'EveryTuesday'
593
+ | 'EveryWednesday'
594
+ | 'EveryThursday'
595
+ | 'EveryFriday'
596
+ | 'EverySaturday';
597
+ }
598
+
599
+ /**
600
+ * The yearly reset period configuration of the entitlement, defined when reset
601
+ * period is yearly
602
+ */
603
+ export interface YearlyResetPeriodConfiguration {
604
+ /**
605
+ * Reset anchor (SubscriptionStart)
606
+ */
607
+ accordingTo: 'SubscriptionStart';
608
+ }
609
+ }
610
+ }
611
+
612
+ export interface PromotionalEntitlementListParams extends MyCursorIDPageParams {
613
+ /**
614
+ * Filter by creation date using range operators: gt, gte, lt, lte
615
+ */
616
+ createdAt?: PromotionalEntitlementListParams.CreatedAt;
617
+
618
+ /**
619
+ * Filter by promotional entitlement status. Supports comma-separated values for
620
+ * multiple statuses
621
+ */
622
+ status?: string;
623
+ }
624
+
625
+ export namespace PromotionalEntitlementListParams {
626
+ /**
627
+ * Filter by creation date using range operators: gt, gte, lt, lte
628
+ */
629
+ export interface CreatedAt {
630
+ /**
631
+ * Greater than the specified createdAt value
632
+ */
633
+ gt?: string;
634
+
635
+ /**
636
+ * Greater than or equal to the specified createdAt value
637
+ */
638
+ gte?: string;
639
+
640
+ /**
641
+ * Less than the specified createdAt value
642
+ */
643
+ lt?: string;
644
+
645
+ /**
646
+ * Less than or equal to the specified createdAt value
647
+ */
648
+ lte?: string;
649
+ }
650
+ }
651
+
652
+ export interface PromotionalEntitlementRevokeParams {
653
+ /**
654
+ * The unique identifier of the customer
655
+ */
656
+ id: string;
657
+ }
658
+
659
+ export declare namespace PromotionalEntitlements {
660
+ export {
661
+ type PromotionalEntitlementCreateResponse as PromotionalEntitlementCreateResponse,
662
+ type PromotionalEntitlementListResponse as PromotionalEntitlementListResponse,
663
+ type PromotionalEntitlementRevokeResponse as PromotionalEntitlementRevokeResponse,
664
+ type PromotionalEntitlementListResponsesMyCursorIDPage as PromotionalEntitlementListResponsesMyCursorIDPage,
665
+ type PromotionalEntitlementCreateParams as PromotionalEntitlementCreateParams,
666
+ type PromotionalEntitlementListParams as PromotionalEntitlementListParams,
667
+ type PromotionalEntitlementRevokeParams as PromotionalEntitlementRevokeParams,
668
+ };
669
+ }