@stigg/typescript 0.1.0-beta.60 → 0.1.0-beta.62

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 (69) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/package.json +1 -1
  3. package/resources/v1/addons/addons.d.mts +1 -1
  4. package/resources/v1/addons/addons.d.ts +1 -1
  5. package/resources/v1/credits/credits.d.mts +77 -2
  6. package/resources/v1/credits/credits.d.mts.map +1 -1
  7. package/resources/v1/credits/credits.d.ts +77 -2
  8. package/resources/v1/credits/credits.d.ts.map +1 -1
  9. package/resources/v1/credits/credits.js +4 -0
  10. package/resources/v1/credits/credits.js.map +1 -1
  11. package/resources/v1/credits/credits.mjs +4 -0
  12. package/resources/v1/credits/credits.mjs.map +1 -1
  13. package/resources/v1/credits/index.d.mts +1 -0
  14. package/resources/v1/credits/index.d.mts.map +1 -1
  15. package/resources/v1/credits/index.d.ts +1 -0
  16. package/resources/v1/credits/index.d.ts.map +1 -1
  17. package/resources/v1/credits/index.js +3 -1
  18. package/resources/v1/credits/index.js.map +1 -1
  19. package/resources/v1/credits/index.mjs +1 -0
  20. package/resources/v1/credits/index.mjs.map +1 -1
  21. package/resources/v1/credits/reservations.d.mts +128 -0
  22. package/resources/v1/credits/reservations.d.mts.map +1 -0
  23. package/resources/v1/credits/reservations.d.ts +128 -0
  24. package/resources/v1/credits/reservations.d.ts.map +1 -0
  25. package/resources/v1/credits/reservations.js +30 -0
  26. package/resources/v1/credits/reservations.js.map +1 -0
  27. package/resources/v1/credits/reservations.mjs +26 -0
  28. package/resources/v1/credits/reservations.mjs.map +1 -0
  29. package/resources/v1/customers/customers.d.mts +103 -0
  30. package/resources/v1/customers/customers.d.mts.map +1 -1
  31. package/resources/v1/customers/customers.d.ts +103 -0
  32. package/resources/v1/customers/customers.d.ts.map +1 -1
  33. package/resources/v1/customers/customers.js.map +1 -1
  34. package/resources/v1/customers/customers.mjs.map +1 -1
  35. package/resources/v1/plans/plans.d.mts +1 -1
  36. package/resources/v1/plans/plans.d.ts +1 -1
  37. package/resources/v1/subscriptions/subscriptions.d.mts +39 -0
  38. package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
  39. package/resources/v1/subscriptions/subscriptions.d.ts +39 -0
  40. package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
  41. package/resources/v1/subscriptions/subscriptions.js.map +1 -1
  42. package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
  43. package/resources/v1/usage.d.mts +8 -7
  44. package/resources/v1/usage.d.mts.map +1 -1
  45. package/resources/v1/usage.d.ts +8 -7
  46. package/resources/v1/usage.d.ts.map +1 -1
  47. package/resources/v1-beta/customers/entitlements.d.mts +39 -0
  48. package/resources/v1-beta/customers/entitlements.d.mts.map +1 -1
  49. package/resources/v1-beta/customers/entitlements.d.ts +39 -0
  50. package/resources/v1-beta/customers/entitlements.d.ts.map +1 -1
  51. package/resources/v2/usage.d.mts +4 -3
  52. package/resources/v2/usage.d.mts.map +1 -1
  53. package/resources/v2/usage.d.ts +4 -3
  54. package/resources/v2/usage.d.ts.map +1 -1
  55. package/src/resources/v1/addons/addons.ts +1 -1
  56. package/src/resources/v1/credits/credits.ts +109 -2
  57. package/src/resources/v1/credits/index.ts +1 -0
  58. package/src/resources/v1/credits/reservations.ts +172 -0
  59. package/src/resources/v1/customers/customers.ts +122 -0
  60. package/src/resources/v1/plans/plans.ts +1 -1
  61. package/src/resources/v1/subscriptions/subscriptions.ts +46 -0
  62. package/src/resources/v1/usage.ts +8 -7
  63. package/src/resources/v1-beta/customers/entitlements.ts +46 -0
  64. package/src/resources/v2/usage.ts +4 -3
  65. package/src/version.ts +1 -1
  66. package/version.d.mts +1 -1
  67. package/version.d.ts +1 -1
  68. package/version.js +1 -1
  69. package/version.mjs +1 -1
@@ -2939,6 +2939,25 @@ export namespace SubscriptionProvisionResponse {
2939
2939
  */
2940
2940
  entitlementUpdatedAt?: string;
2941
2941
 
2942
+ /**
2943
+ * The reservation created by this request, when it asked to reserve credits and
2944
+ * was granted.
2945
+ */
2946
+ reservation?: UnionObjectVariant1.Reservation | null;
2947
+
2948
+ /**
2949
+ * Credits held by open reservations on active grants. Already included in
2950
+ * currentUsage, so usageLimit - currentUsage is the available balance.
2951
+ */
2952
+ reserved?: number;
2953
+
2954
+ /**
2955
+ * Credits still held by open reservations on grants that expired during the hold.
2956
+ * They can still be released, but are not part of currentUsage or the balance and
2957
+ * must not be subtracted from it.
2958
+ */
2959
+ reservedOnExpiredGrants?: number;
2960
+
2942
2961
  /**
2943
2962
  * The end date of the current billing period for recurring credit grants.
2944
2963
  */
@@ -2985,6 +3004,33 @@ export namespace SubscriptionProvisionResponse {
2985
3004
  */
2986
3005
  unitSingular?: string | null;
2987
3006
  }
3007
+
3008
+ /**
3009
+ * The reservation created by this request, when it asked to reserve credits and
3010
+ * was granted.
3011
+ */
3012
+ export interface Reservation {
3013
+ /**
3014
+ * The client-provided reservation ID.
3015
+ */
3016
+ id: string;
3017
+
3018
+ /**
3019
+ * The amount of credits held.
3020
+ */
3021
+ amount: number;
3022
+
3023
+ /**
3024
+ * When the reservation expires. Unreleased credits return to the balance at this
3025
+ * time.
3026
+ */
3027
+ expiresAt: string;
3028
+
3029
+ /**
3030
+ * The status of the reservation.
3031
+ */
3032
+ status: 'ACTIVE' | 'RELEASED';
3033
+ }
2988
3034
  }
2989
3035
 
2990
3036
  /**
@@ -391,10 +391,10 @@ export interface UsageEstimateParams {
391
391
  featureId: string;
392
392
 
393
393
  /**
394
- * Body param: The value to report for usage. Must be a whole number — the REST API
395
- * does not accept fractional (float) usage values; scale up (e.g. report cents
396
- * instead of dollars, or milliseconds instead of seconds) if you need sub-unit
397
- * precision.
394
+ * Body param: The value to report for usage. Fractional values are accepted and
395
+ * rounded half away from zero to 5 decimal places. A value with a fractional part
396
+ * must have an absolute value below 34,359,738,368 (2^35); whole numbers are
397
+ * accepted up to ±9,007,199,254,740,991.
398
398
  */
399
399
  value: number;
400
400
 
@@ -511,9 +511,10 @@ export namespace UsageReportParams {
511
511
  featureId: string;
512
512
 
513
513
  /**
514
- * The value to report for usage. Must be a whole number — the REST API does not
515
- * accept fractional (float) usage values; scale up (e.g. report cents instead of
516
- * dollars, or milliseconds instead of seconds) if you need sub-unit precision.
514
+ * The value to report for usage. Fractional values are accepted and rounded half
515
+ * away from zero to 5 decimal places. A value with a fractional part must have an
516
+ * absolute value below 34,359,738,368 (2^35); whole numbers are accepted up to
517
+ * ±9,007,199,254,740,991.
517
518
  */
518
519
  value: number;
519
520
 
@@ -226,6 +226,25 @@ export namespace EntitlementCheckResponse {
226
226
  */
227
227
  entitlementUpdatedAt?: string;
228
228
 
229
+ /**
230
+ * The reservation created by this request, when it asked to reserve credits and
231
+ * was granted.
232
+ */
233
+ reservation?: Credit.Reservation | null;
234
+
235
+ /**
236
+ * Credits held by open reservations on active grants. Already included in
237
+ * currentUsage, so usageLimit - currentUsage is the available balance.
238
+ */
239
+ reserved?: number;
240
+
241
+ /**
242
+ * Credits still held by open reservations on grants that expired during the hold.
243
+ * They can still be released, but are not part of currentUsage or the balance and
244
+ * must not be subtracted from it.
245
+ */
246
+ reservedOnExpiredGrants?: number;
247
+
229
248
  /**
230
249
  * The end date of the current billing period for recurring credit grants.
231
250
  */
@@ -305,6 +324,33 @@ export namespace EntitlementCheckResponse {
305
324
  */
306
325
  usageLimit: number | null;
307
326
  }
327
+
328
+ /**
329
+ * The reservation created by this request, when it asked to reserve credits and
330
+ * was granted.
331
+ */
332
+ export interface Reservation {
333
+ /**
334
+ * The client-provided reservation ID.
335
+ */
336
+ id: string;
337
+
338
+ /**
339
+ * The amount of credits held.
340
+ */
341
+ amount: number;
342
+
343
+ /**
344
+ * When the reservation expires. Unreleased credits return to the balance at this
345
+ * time.
346
+ */
347
+ expiresAt: string;
348
+
349
+ /**
350
+ * The status of the reservation.
351
+ */
352
+ status: 'ACTIVE' | 'RELEASED';
353
+ }
308
354
  }
309
355
  }
310
356
 
@@ -299,9 +299,10 @@ export namespace UsageReportParams {
299
299
  featureId: string;
300
300
 
301
301
  /**
302
- * The value to report for usage. Must be a whole number — the REST API does not
303
- * accept fractional (float) usage values; scale up (e.g. report cents instead of
304
- * dollars, or milliseconds instead of seconds) if you need sub-unit precision.
302
+ * The value to report for usage. Fractional values are accepted and rounded half
303
+ * away from zero to 5 decimal places. A value with a fractional part must have an
304
+ * absolute value below 34,359,738,368 (2^35); whole numbers are accepted up to
305
+ * ±9,007,199,254,740,991.
305
306
  */
306
307
  value: number;
307
308
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.1.0-beta.60'; // x-release-please-version
1
+ export const VERSION = '0.1.0-beta.62'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0-beta.60";
1
+ export declare const VERSION = "0.1.0-beta.62";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0-beta.60";
1
+ export declare const VERSION = "0.1.0-beta.62";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.1.0-beta.60'; // x-release-please-version
4
+ exports.VERSION = '0.1.0-beta.62'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.1.0-beta.60'; // x-release-please-version
1
+ export const VERSION = '0.1.0-beta.62'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map