Commit 704de20
fix: remove unsafe type assertions in subscription credits (#6536)
## Summary
Removes unsafe `as any` type assertions from subscription credits
composable now that the OpenAPI spec has been updated with the missing
balance breakdown fields.
The `GetCustomerBalance` API response now includes:
- `cloud_credit_balance_micros` - Monthly subscription credits
- `prepaid_balance_micros` - Pre-paid top-up credits
These fields were previously accessed with `as any` because they weren't
in the TypeScript type definitions. With the OpenAPI spec update (PR
#6531), these fields are now properly typed.
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6536-fix-remove-unsafe-type-assertions-in-subscription-credits-29f6d73d365081ffae52cc85c01c139b)
by [Unito](https://www.unito.io)
Co-authored-by: Christian Byrne <c.byrne@comfy.org>1 parent feda2d4 commit 704de20
File tree
1 file changed
+10
-6
lines changed- src/platform/cloud/subscription/composables
1 file changed
+10
-6
lines changedLines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
| 26 | + | |
28 | 27 | | |
29 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
40 | | - | |
41 | | - | |
| 42 | + | |
42 | 43 | | |
43 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
| |||
0 commit comments