@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,74 @@
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 { RequestOptions } from '../../internal/request-options';
6
+
7
+ export class Events extends APIResource {
8
+ /**
9
+ * Reports raw usage events for event-based metering. Events are ingested
10
+ * asynchronously and aggregated into usage totals.
11
+ */
12
+ report(body: EventReportParams, options?: RequestOptions): APIPromise<EventReportResponse> {
13
+ return this._client.post('/api/v1/events', { body, ...options });
14
+ }
15
+ }
16
+
17
+ /**
18
+ * Response object
19
+ */
20
+ export interface EventReportResponse {
21
+ /**
22
+ * Empty success response confirming that events were successfully ingested and
23
+ * queued for processing by Stigg's metering system.
24
+ */
25
+ data: unknown;
26
+ }
27
+
28
+ export interface EventReportParams {
29
+ /**
30
+ * A list of usage events to report
31
+ */
32
+ events: Array<EventReportParams.Event>;
33
+ }
34
+
35
+ export namespace EventReportParams {
36
+ /**
37
+ * Raw usage event
38
+ */
39
+ export interface Event {
40
+ /**
41
+ * Customer id
42
+ */
43
+ customerId: string;
44
+
45
+ /**
46
+ * The name of the usage event
47
+ */
48
+ eventName: string;
49
+
50
+ /**
51
+ * Idempotency key
52
+ */
53
+ idempotencyKey: string;
54
+
55
+ /**
56
+ * Dimensions associated with the usage event
57
+ */
58
+ dimensions?: { [key: string]: string | number | boolean };
59
+
60
+ /**
61
+ * Resource id
62
+ */
63
+ resourceId?: string | null;
64
+
65
+ /**
66
+ * Timestamp
67
+ */
68
+ timestamp?: string;
69
+ }
70
+ }
71
+
72
+ export declare namespace Events {
73
+ export { type EventReportResponse as EventReportResponse, type EventReportParams as EventReportParams };
74
+ }
@@ -0,0 +1,571 @@
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 Features extends APIResource {
10
+ /**
11
+ * Archives a feature, preventing it from being used in new entitlements.
12
+ */
13
+ archiveFeature(id: string, options?: RequestOptions): APIPromise<Feature> {
14
+ return this._client.post(path`/api/v1/features/${id}/archive`, options);
15
+ }
16
+
17
+ /**
18
+ * Creates a new feature with the specified type, metering, and configuration.
19
+ */
20
+ createFeature(body: FeatureCreateFeatureParams, options?: RequestOptions): APIPromise<Feature> {
21
+ return this._client.post('/api/v1/features', { body, ...options });
22
+ }
23
+
24
+ /**
25
+ * Retrieves a paginated list of features in the environment.
26
+ */
27
+ listFeatures(
28
+ query: FeatureListFeaturesParams | null | undefined = {},
29
+ options?: RequestOptions,
30
+ ): PagePromise<FeatureListFeaturesResponsesMyCursorIDPage, FeatureListFeaturesResponse> {
31
+ return this._client.getAPIList('/api/v1/features', MyCursorIDPage<FeatureListFeaturesResponse>, {
32
+ query,
33
+ ...options,
34
+ });
35
+ }
36
+
37
+ /**
38
+ * Retrieves a feature by its unique identifier.
39
+ */
40
+ retrieveFeature(id: string, options?: RequestOptions): APIPromise<Feature> {
41
+ return this._client.get(path`/api/v1/features/${id}`, options);
42
+ }
43
+
44
+ /**
45
+ * Restores an archived feature, allowing it to be used in entitlements again.
46
+ */
47
+ unarchiveFeature(id: string, options?: RequestOptions): APIPromise<Feature> {
48
+ return this._client.post(path`/api/v1/features/${id}/unarchive`, options);
49
+ }
50
+
51
+ /**
52
+ * Updates an existing feature's properties such as display name, description, and
53
+ * configuration.
54
+ */
55
+ updateFeature(id: string, body: FeatureUpdateFeatureParams, options?: RequestOptions): APIPromise<Feature> {
56
+ return this._client.patch(path`/api/v1/features/${id}`, { body, ...options });
57
+ }
58
+ }
59
+
60
+ export type FeatureListFeaturesResponsesMyCursorIDPage = MyCursorIDPage<FeatureListFeaturesResponse>;
61
+
62
+ /**
63
+ * Response object
64
+ */
65
+ export interface Feature {
66
+ /**
67
+ * Feature configuration object
68
+ */
69
+ data: Feature.Data;
70
+ }
71
+
72
+ export namespace Feature {
73
+ /**
74
+ * Feature configuration object
75
+ */
76
+ export interface Data {
77
+ /**
78
+ * The unique identifier for the feature
79
+ */
80
+ id: string;
81
+
82
+ /**
83
+ * Timestamp of when the record was created
84
+ */
85
+ createdAt: string;
86
+
87
+ /**
88
+ * The description for the feature
89
+ */
90
+ description: string | null;
91
+
92
+ /**
93
+ * The display name for the feature
94
+ */
95
+ displayName: string;
96
+
97
+ /**
98
+ * The configuration data for the feature
99
+ */
100
+ enumConfiguration: Array<Data.EnumConfiguration> | null;
101
+
102
+ /**
103
+ * The status of the feature
104
+ */
105
+ featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE';
106
+
107
+ /**
108
+ * The type of the feature
109
+ */
110
+ featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM';
111
+
112
+ /**
113
+ * The units for the feature
114
+ */
115
+ featureUnits: string | null;
116
+
117
+ /**
118
+ * The plural units for the feature
119
+ */
120
+ featureUnitsPlural: string | null;
121
+
122
+ /**
123
+ * The additional metadata for the feature
124
+ */
125
+ metadata: { [key: string]: string };
126
+
127
+ /**
128
+ * The meter type for the feature
129
+ */
130
+ meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL';
131
+
132
+ /**
133
+ * Unit transformation to be applied to the reported usage
134
+ */
135
+ unitTransformation: Data.UnitTransformation | null;
136
+
137
+ /**
138
+ * Timestamp of when the record was last updated
139
+ */
140
+ updatedAt: string;
141
+ }
142
+
143
+ export namespace Data {
144
+ export interface EnumConfiguration {
145
+ /**
146
+ * The display name for the enum configuration entity
147
+ */
148
+ displayName: string;
149
+
150
+ /**
151
+ * The unique value identifier for the enum configuration entity
152
+ */
153
+ value: string;
154
+ }
155
+
156
+ /**
157
+ * Unit transformation to be applied to the reported usage
158
+ */
159
+ export interface UnitTransformation {
160
+ /**
161
+ * Divide usage by this number
162
+ */
163
+ divide: number;
164
+
165
+ /**
166
+ * Singular feature units after the transformation
167
+ */
168
+ featureUnits: string | null;
169
+
170
+ /**
171
+ * Plural feature units after the transformation
172
+ */
173
+ featureUnitsPlural: string | null;
174
+
175
+ /**
176
+ * After division, either round the result up or down
177
+ */
178
+ round: 'UP' | 'DOWN';
179
+ }
180
+ }
181
+ }
182
+
183
+ /**
184
+ * Feature configuration object
185
+ */
186
+ export interface FeatureListFeaturesResponse {
187
+ /**
188
+ * The unique identifier for the feature
189
+ */
190
+ id: string;
191
+
192
+ /**
193
+ * Timestamp of when the record was created
194
+ */
195
+ createdAt: string;
196
+
197
+ /**
198
+ * The description for the feature
199
+ */
200
+ description: string | null;
201
+
202
+ /**
203
+ * The display name for the feature
204
+ */
205
+ displayName: string;
206
+
207
+ /**
208
+ * The configuration data for the feature
209
+ */
210
+ enumConfiguration: Array<FeatureListFeaturesResponse.EnumConfiguration> | null;
211
+
212
+ /**
213
+ * The status of the feature
214
+ */
215
+ featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE';
216
+
217
+ /**
218
+ * The type of the feature
219
+ */
220
+ featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM';
221
+
222
+ /**
223
+ * The units for the feature
224
+ */
225
+ featureUnits: string | null;
226
+
227
+ /**
228
+ * The plural units for the feature
229
+ */
230
+ featureUnitsPlural: string | null;
231
+
232
+ /**
233
+ * The additional metadata for the feature
234
+ */
235
+ metadata: { [key: string]: string };
236
+
237
+ /**
238
+ * The meter type for the feature
239
+ */
240
+ meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL';
241
+
242
+ /**
243
+ * Unit transformation to be applied to the reported usage
244
+ */
245
+ unitTransformation: FeatureListFeaturesResponse.UnitTransformation | null;
246
+
247
+ /**
248
+ * Timestamp of when the record was last updated
249
+ */
250
+ updatedAt: string;
251
+ }
252
+
253
+ export namespace FeatureListFeaturesResponse {
254
+ export interface EnumConfiguration {
255
+ /**
256
+ * The display name for the enum configuration entity
257
+ */
258
+ displayName: string;
259
+
260
+ /**
261
+ * The unique value identifier for the enum configuration entity
262
+ */
263
+ value: string;
264
+ }
265
+
266
+ /**
267
+ * Unit transformation to be applied to the reported usage
268
+ */
269
+ export interface UnitTransformation {
270
+ /**
271
+ * Divide usage by this number
272
+ */
273
+ divide: number;
274
+
275
+ /**
276
+ * Singular feature units after the transformation
277
+ */
278
+ featureUnits: string | null;
279
+
280
+ /**
281
+ * Plural feature units after the transformation
282
+ */
283
+ featureUnitsPlural: string | null;
284
+
285
+ /**
286
+ * After division, either round the result up or down
287
+ */
288
+ round: 'UP' | 'DOWN';
289
+ }
290
+ }
291
+
292
+ export interface FeatureCreateFeatureParams {
293
+ /**
294
+ * The unique identifier for the feature
295
+ */
296
+ id: string;
297
+
298
+ /**
299
+ * The display name for the feature
300
+ */
301
+ displayName: string;
302
+
303
+ /**
304
+ * The type of the feature
305
+ */
306
+ featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM';
307
+
308
+ /**
309
+ * The description for the feature
310
+ */
311
+ description?: string;
312
+
313
+ /**
314
+ * The configuration data for the feature
315
+ */
316
+ enumConfiguration?: Array<FeatureCreateFeatureParams.EnumConfiguration>;
317
+
318
+ /**
319
+ * The status of the feature
320
+ */
321
+ featureStatus?: 'NEW' | 'SUSPENDED' | 'ACTIVE';
322
+
323
+ /**
324
+ * The units for the feature
325
+ */
326
+ featureUnits?: string;
327
+
328
+ /**
329
+ * The plural units for the feature
330
+ */
331
+ featureUnitsPlural?: string;
332
+
333
+ /**
334
+ * The additional metadata for the feature
335
+ */
336
+ metadata?: { [key: string]: string };
337
+
338
+ /**
339
+ * The meter type for the feature
340
+ */
341
+ meterType?: 'None' | 'FLUCTUATING' | 'INCREMENTAL';
342
+
343
+ /**
344
+ * Unit transformation to be applied to the reported usage
345
+ */
346
+ unitTransformation?: FeatureCreateFeatureParams.UnitTransformation | null;
347
+ }
348
+
349
+ export namespace FeatureCreateFeatureParams {
350
+ export interface EnumConfiguration {
351
+ /**
352
+ * The display name for the enum configuration entity
353
+ */
354
+ displayName: string;
355
+
356
+ /**
357
+ * The unique value identifier for the enum configuration entity
358
+ */
359
+ value: string;
360
+ }
361
+
362
+ /**
363
+ * Unit transformation to be applied to the reported usage
364
+ */
365
+ export interface UnitTransformation {
366
+ /**
367
+ * Divide usage by this number
368
+ */
369
+ divide: number;
370
+
371
+ /**
372
+ * Singular feature units after the transformation
373
+ */
374
+ featureUnits?: string;
375
+
376
+ /**
377
+ * Plural feature units after the transformation
378
+ */
379
+ featureUnitsPlural?: string;
380
+
381
+ /**
382
+ * After division, either round the result up or down
383
+ */
384
+ round?: 'UP' | 'DOWN';
385
+ }
386
+ }
387
+
388
+ export interface FeatureListFeaturesParams extends MyCursorIDPageParams {
389
+ /**
390
+ * Filter by entity ID
391
+ */
392
+ id?: string;
393
+
394
+ /**
395
+ * Filter by creation date using range operators: gt, gte, lt, lte
396
+ */
397
+ createdAt?: FeatureListFeaturesParams.CreatedAt;
398
+
399
+ /**
400
+ * Filter by feature type. Supports comma-separated values for multiple types
401
+ */
402
+ featureType?: string;
403
+
404
+ /**
405
+ * Filter by meter type. Supports comma-separated values for multiple types
406
+ */
407
+ meterType?: string;
408
+
409
+ /**
410
+ * Filter by feature status. Supports comma-separated values for multiple statuses
411
+ */
412
+ status?: string;
413
+ }
414
+
415
+ export namespace FeatureListFeaturesParams {
416
+ /**
417
+ * Filter by creation date using range operators: gt, gte, lt, lte
418
+ */
419
+ export interface CreatedAt {
420
+ /**
421
+ * Greater than the specified createdAt value
422
+ */
423
+ gt?: string;
424
+
425
+ /**
426
+ * Greater than or equal to the specified createdAt value
427
+ */
428
+ gte?: string;
429
+
430
+ /**
431
+ * Less than the specified createdAt value
432
+ */
433
+ lt?: string;
434
+
435
+ /**
436
+ * Less than or equal to the specified createdAt value
437
+ */
438
+ lte?: string;
439
+ }
440
+ }
441
+
442
+ export interface FeatureUpdateFeatureParams {
443
+ /**
444
+ * The description for the feature
445
+ */
446
+ description?: string;
447
+
448
+ /**
449
+ * The display name for the feature
450
+ */
451
+ displayName?: string;
452
+
453
+ /**
454
+ * The configuration data for the feature
455
+ */
456
+ enumConfiguration?: Array<FeatureUpdateFeatureParams.EnumConfiguration>;
457
+
458
+ /**
459
+ * The units for the feature
460
+ */
461
+ featureUnits?: string;
462
+
463
+ /**
464
+ * The plural units for the feature
465
+ */
466
+ featureUnitsPlural?: string;
467
+
468
+ /**
469
+ * The additional metadata for the feature
470
+ */
471
+ metadata?: { [key: string]: string };
472
+
473
+ meter?: FeatureUpdateFeatureParams.Meter;
474
+
475
+ /**
476
+ * Unit transformation to be applied to the reported usage
477
+ */
478
+ unitTransformation?: FeatureUpdateFeatureParams.UnitTransformation | null;
479
+ }
480
+
481
+ export namespace FeatureUpdateFeatureParams {
482
+ export interface EnumConfiguration {
483
+ /**
484
+ * The display name for the enum configuration entity
485
+ */
486
+ displayName: string;
487
+
488
+ /**
489
+ * The unique value identifier for the enum configuration entity
490
+ */
491
+ value: string;
492
+ }
493
+
494
+ export interface Meter {
495
+ aggregation: Meter.Aggregation;
496
+
497
+ filters: Array<Meter.Filter>;
498
+ }
499
+
500
+ export namespace Meter {
501
+ export interface Aggregation {
502
+ function: 'SUM' | 'MAX' | 'MIN' | 'AVG' | 'COUNT' | 'UNIQUE';
503
+
504
+ field?: string;
505
+ }
506
+
507
+ export interface Filter {
508
+ conditions: Array<Filter.Condition>;
509
+ }
510
+
511
+ export namespace Filter {
512
+ export interface Condition {
513
+ field: string;
514
+
515
+ operation:
516
+ | 'EQUALS'
517
+ | 'NOT_EQUALS'
518
+ | 'GREATER_THAN'
519
+ | 'GREATER_THAN_OR_EQUAL'
520
+ | 'LESS_THAN'
521
+ | 'LESS_THAN_OR_EQUAL'
522
+ | 'IS_NULL'
523
+ | 'IS_NOT_NULL'
524
+ | 'CONTAINS'
525
+ | 'STARTS_WITH'
526
+ | 'ENDS_WITH'
527
+ | 'IN';
528
+
529
+ value?: string;
530
+
531
+ values?: Array<string>;
532
+ }
533
+ }
534
+ }
535
+
536
+ /**
537
+ * Unit transformation to be applied to the reported usage
538
+ */
539
+ export interface UnitTransformation {
540
+ /**
541
+ * Divide usage by this number
542
+ */
543
+ divide: number;
544
+
545
+ /**
546
+ * Singular feature units after the transformation
547
+ */
548
+ featureUnits?: string;
549
+
550
+ /**
551
+ * Plural feature units after the transformation
552
+ */
553
+ featureUnitsPlural?: string;
554
+
555
+ /**
556
+ * After division, either round the result up or down
557
+ */
558
+ round?: 'UP' | 'DOWN';
559
+ }
560
+ }
561
+
562
+ export declare namespace Features {
563
+ export {
564
+ type Feature as Feature,
565
+ type FeatureListFeaturesResponse as FeatureListFeaturesResponse,
566
+ type FeatureListFeaturesResponsesMyCursorIDPage as FeatureListFeaturesResponsesMyCursorIDPage,
567
+ type FeatureCreateFeatureParams as FeatureCreateFeatureParams,
568
+ type FeatureListFeaturesParams as FeatureListFeaturesParams,
569
+ type FeatureUpdateFeatureParams as FeatureUpdateFeatureParams,
570
+ };
571
+ }