@naturali/sdk 0.166.0 → 0.168.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.cjs +103 -0
- package/dist/index.d.cts +337 -1
- package/dist/index.d.mts +337 -1
- package/dist/index.mjs +103 -0
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1733,6 +1733,34 @@ var Assistant = class {
|
|
|
1733
1733
|
}
|
|
1734
1734
|
});
|
|
1735
1735
|
}
|
|
1736
|
+
/**
|
|
1737
|
+
* Read the conversation
|
|
1738
|
+
*
|
|
1739
|
+
* The newest 100 messages of your conversation with the Assistant in the app, oldest first. An account that has not messaged it yet has an empty conversation.
|
|
1740
|
+
*
|
|
1741
|
+
*/
|
|
1742
|
+
static listAssistantMessages(options) {
|
|
1743
|
+
return (options?.client ?? client).get({
|
|
1744
|
+
url: "/v1/assistant/messages",
|
|
1745
|
+
...options
|
|
1746
|
+
});
|
|
1747
|
+
}
|
|
1748
|
+
/**
|
|
1749
|
+
* Message the Assistant
|
|
1750
|
+
*
|
|
1751
|
+
* Runs one turn as your account and answers with the messages it added: yours, then the Assistant's reply. The turn is paid from your credit and refused before it runs when the balance is below zero.
|
|
1752
|
+
*
|
|
1753
|
+
*/
|
|
1754
|
+
static sendAssistantMessage(options) {
|
|
1755
|
+
return (options.client ?? client).post({
|
|
1756
|
+
url: "/v1/assistant/messages",
|
|
1757
|
+
...options,
|
|
1758
|
+
headers: {
|
|
1759
|
+
"Content-Type": "application/json",
|
|
1760
|
+
...options.headers
|
|
1761
|
+
}
|
|
1762
|
+
});
|
|
1763
|
+
}
|
|
1736
1764
|
};
|
|
1737
1765
|
var AuditLog = class {
|
|
1738
1766
|
/**
|
|
@@ -5416,6 +5444,81 @@ var Users = class {
|
|
|
5416
5444
|
}
|
|
5417
5445
|
});
|
|
5418
5446
|
}
|
|
5447
|
+
/**
|
|
5448
|
+
* Remove the saved card
|
|
5449
|
+
*
|
|
5450
|
+
* Forgets the saved card and turns auto-recharge off.
|
|
5451
|
+
*/
|
|
5452
|
+
static deleteCurrentUserPaymentMethod(options) {
|
|
5453
|
+
return (options?.client ?? client).delete({
|
|
5454
|
+
url: "/v1/users/me/payment-method",
|
|
5455
|
+
...options
|
|
5456
|
+
});
|
|
5457
|
+
}
|
|
5458
|
+
/**
|
|
5459
|
+
* Get the saved card
|
|
5460
|
+
*
|
|
5461
|
+
* The card auto-recharge and monthly statements are charged to, as the payment provider reports it. Only the brand, last four digits and expiry are kept here.
|
|
5462
|
+
*
|
|
5463
|
+
*/
|
|
5464
|
+
static getCurrentUserPaymentMethod(options) {
|
|
5465
|
+
return (options?.client ?? client).get({
|
|
5466
|
+
url: "/v1/users/me/payment-method",
|
|
5467
|
+
...options
|
|
5468
|
+
});
|
|
5469
|
+
}
|
|
5470
|
+
/**
|
|
5471
|
+
* Start saving a card
|
|
5472
|
+
*
|
|
5473
|
+
* A hosted page that saves a card for charges made without the payer present: auto-recharge and monthly statements. Send the caller to `checkout_url`; nothing is charged. A card saved this way replaces the one already saved.
|
|
5474
|
+
*
|
|
5475
|
+
*/
|
|
5476
|
+
static createCurrentUserPaymentMethod(options) {
|
|
5477
|
+
return (options?.client ?? client).post({
|
|
5478
|
+
url: "/v1/users/me/payment-method",
|
|
5479
|
+
...options
|
|
5480
|
+
});
|
|
5481
|
+
}
|
|
5482
|
+
/**
|
|
5483
|
+
* Turn auto-recharge off
|
|
5484
|
+
*
|
|
5485
|
+
* Stops topping up the balance automatically. The saved card stays saved.
|
|
5486
|
+
*
|
|
5487
|
+
*/
|
|
5488
|
+
static disableCurrentUserAutoRecharge(options) {
|
|
5489
|
+
return (options?.client ?? client).delete({
|
|
5490
|
+
url: "/v1/users/me/auto-recharge",
|
|
5491
|
+
...options
|
|
5492
|
+
});
|
|
5493
|
+
}
|
|
5494
|
+
/**
|
|
5495
|
+
* Get the auto-recharge setting
|
|
5496
|
+
*
|
|
5497
|
+
* Whether the credit balance is topped up on the saved card, by how much and below what balance. `enabled` is false until a card is saved and the setting turned on.
|
|
5498
|
+
*
|
|
5499
|
+
*/
|
|
5500
|
+
static getCurrentUserAutoRecharge(options) {
|
|
5501
|
+
return (options?.client ?? client).get({
|
|
5502
|
+
url: "/v1/users/me/auto-recharge",
|
|
5503
|
+
...options
|
|
5504
|
+
});
|
|
5505
|
+
}
|
|
5506
|
+
/**
|
|
5507
|
+
* Turn auto-recharge on
|
|
5508
|
+
*
|
|
5509
|
+
* Top up `amount_usd` on the saved card whenever the credit balance falls below `below_usd`. Checked every 15 minutes, at most one charge an hour. A declined charge turns it off and emails the account.
|
|
5510
|
+
*
|
|
5511
|
+
*/
|
|
5512
|
+
static setCurrentUserAutoRecharge(options) {
|
|
5513
|
+
return (options.client ?? client).put({
|
|
5514
|
+
url: "/v1/users/me/auto-recharge",
|
|
5515
|
+
...options,
|
|
5516
|
+
headers: {
|
|
5517
|
+
"Content-Type": "application/json",
|
|
5518
|
+
...options.headers
|
|
5519
|
+
}
|
|
5520
|
+
});
|
|
5521
|
+
}
|
|
5419
5522
|
};
|
|
5420
5523
|
var Webhooks = class {
|
|
5421
5524
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.168.0",
|
|
4
4
|
"description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@hey-api/openapi-ts": "^0.99.0",
|
|
34
|
-
"@naturali/api": "0.
|
|
34
|
+
"@naturali/api": "0.168.0",
|
|
35
35
|
"@ttoss/openapi-codegen": "^0.5.0",
|
|
36
36
|
"@types/node": "^26.5.1",
|
|
37
37
|
"tsdown": "^0.23.0",
|