@naturali/sdk 0.96.0 → 0.98.0
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.
- package/dist/index.d.cts +11 -3
- package/dist/index.d.mts +11 -3
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -545,9 +545,9 @@ type CreditEntry = {
|
|
|
545
545
|
*/
|
|
546
546
|
id: string;
|
|
547
547
|
/**
|
|
548
|
-
* Where the credit came from, which is also its accounting line. `included` is a plan's monthly allowance and does not carry past the cycle; `purchased` is a top-up and never expires; `granted` is credit naturali gave away.
|
|
548
|
+
* Where the credit came from, which is also its accounting line. `included` is a plan's monthly allowance and does not carry past the cycle; `purchased` is a top-up and never expires; `granted` is credit naturali gave away. `usage` is managed model spend, debited from the meter — always negative, and the only kind no person writes.
|
|
549
549
|
*/
|
|
550
|
-
kind: 'included' | 'purchased' | 'granted';
|
|
550
|
+
kind: 'included' | 'purchased' | 'granted' | 'usage';
|
|
551
551
|
/**
|
|
552
552
|
* US dollars, signed: positive added credit, negative corrected an earlier line.
|
|
553
553
|
*/
|
|
@@ -556,6 +556,10 @@ type CreditEntry = {
|
|
|
556
556
|
* Why it was granted, as the operator wrote it.
|
|
557
557
|
*/
|
|
558
558
|
reason: string | null;
|
|
559
|
+
/**
|
|
560
|
+
* The project whose metered usage produced this line, for a `usage` debit. Null for every other kind: a grant, a top-up and an allowance are to the account rather than to one of its projects.
|
|
561
|
+
*/
|
|
562
|
+
project_id: string | null;
|
|
559
563
|
/**
|
|
560
564
|
* The operator who authorized it. Null for credit no person granted — a plan's included allowance, or a payer's own top-up.
|
|
561
565
|
*/
|
|
@@ -565,9 +569,13 @@ type CreditEntry = {
|
|
|
565
569
|
type CreditEntryPage = {
|
|
566
570
|
data: Array<CreditEntry>;
|
|
567
571
|
/**
|
|
568
|
-
* The sum of the whole ledger, not only of this page.
|
|
572
|
+
* The sum of the whole ledger, not only of this page. Spend is included as it is reconciled, so read it with `spend_reconciled_at`.
|
|
569
573
|
*/
|
|
570
574
|
credit_balance_usd: number;
|
|
575
|
+
/**
|
|
576
|
+
* When this account's managed spend was last compared against the meter — the oldest such moment across the projects it pays for, so it describes the whole balance. Null when at least one project has never been reconciled, which is also true of an account with none.
|
|
577
|
+
*/
|
|
578
|
+
spend_reconciled_at: Date | null;
|
|
571
579
|
/**
|
|
572
580
|
* Pass as `cursor` for the next page; null on the last one.
|
|
573
581
|
*/
|
package/dist/index.d.mts
CHANGED
|
@@ -545,9 +545,9 @@ type CreditEntry = {
|
|
|
545
545
|
*/
|
|
546
546
|
id: string;
|
|
547
547
|
/**
|
|
548
|
-
* Where the credit came from, which is also its accounting line. `included` is a plan's monthly allowance and does not carry past the cycle; `purchased` is a top-up and never expires; `granted` is credit naturali gave away.
|
|
548
|
+
* Where the credit came from, which is also its accounting line. `included` is a plan's monthly allowance and does not carry past the cycle; `purchased` is a top-up and never expires; `granted` is credit naturali gave away. `usage` is managed model spend, debited from the meter — always negative, and the only kind no person writes.
|
|
549
549
|
*/
|
|
550
|
-
kind: 'included' | 'purchased' | 'granted';
|
|
550
|
+
kind: 'included' | 'purchased' | 'granted' | 'usage';
|
|
551
551
|
/**
|
|
552
552
|
* US dollars, signed: positive added credit, negative corrected an earlier line.
|
|
553
553
|
*/
|
|
@@ -556,6 +556,10 @@ type CreditEntry = {
|
|
|
556
556
|
* Why it was granted, as the operator wrote it.
|
|
557
557
|
*/
|
|
558
558
|
reason: string | null;
|
|
559
|
+
/**
|
|
560
|
+
* The project whose metered usage produced this line, for a `usage` debit. Null for every other kind: a grant, a top-up and an allowance are to the account rather than to one of its projects.
|
|
561
|
+
*/
|
|
562
|
+
project_id: string | null;
|
|
559
563
|
/**
|
|
560
564
|
* The operator who authorized it. Null for credit no person granted — a plan's included allowance, or a payer's own top-up.
|
|
561
565
|
*/
|
|
@@ -565,9 +569,13 @@ type CreditEntry = {
|
|
|
565
569
|
type CreditEntryPage = {
|
|
566
570
|
data: Array<CreditEntry>;
|
|
567
571
|
/**
|
|
568
|
-
* The sum of the whole ledger, not only of this page.
|
|
572
|
+
* The sum of the whole ledger, not only of this page. Spend is included as it is reconciled, so read it with `spend_reconciled_at`.
|
|
569
573
|
*/
|
|
570
574
|
credit_balance_usd: number;
|
|
575
|
+
/**
|
|
576
|
+
* When this account's managed spend was last compared against the meter — the oldest such moment across the projects it pays for, so it describes the whole balance. Null when at least one project has never been reconciled, which is also true of an account with none.
|
|
577
|
+
*/
|
|
578
|
+
spend_reconciled_at: Date | null;
|
|
571
579
|
/**
|
|
572
580
|
* Pass as `cursor` for the next page; null on the last one.
|
|
573
581
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.98.0",
|
|
4
4
|
"description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"tsx": "^4.23.1",
|
|
38
38
|
"typescript": "~6.0.3",
|
|
39
39
|
"vitest": "^4.1.10",
|
|
40
|
-
"@naturali/api": "0.
|
|
40
|
+
"@naturali/api": "0.98.0"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"generate": "tsx scripts/generate.ts",
|