@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 CHANGED
@@ -1734,6 +1734,34 @@ var Assistant = class {
1734
1734
  }
1735
1735
  });
1736
1736
  }
1737
+ /**
1738
+ * Read the conversation
1739
+ *
1740
+ * 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.
1741
+ *
1742
+ */
1743
+ static listAssistantMessages(options) {
1744
+ return (options?.client ?? client).get({
1745
+ url: "/v1/assistant/messages",
1746
+ ...options
1747
+ });
1748
+ }
1749
+ /**
1750
+ * Message the Assistant
1751
+ *
1752
+ * 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.
1753
+ *
1754
+ */
1755
+ static sendAssistantMessage(options) {
1756
+ return (options.client ?? client).post({
1757
+ url: "/v1/assistant/messages",
1758
+ ...options,
1759
+ headers: {
1760
+ "Content-Type": "application/json",
1761
+ ...options.headers
1762
+ }
1763
+ });
1764
+ }
1737
1765
  };
1738
1766
  var AuditLog = class {
1739
1767
  /**
@@ -5417,6 +5445,81 @@ var Users = class {
5417
5445
  }
5418
5446
  });
5419
5447
  }
5448
+ /**
5449
+ * Remove the saved card
5450
+ *
5451
+ * Forgets the saved card and turns auto-recharge off.
5452
+ */
5453
+ static deleteCurrentUserPaymentMethod(options) {
5454
+ return (options?.client ?? client).delete({
5455
+ url: "/v1/users/me/payment-method",
5456
+ ...options
5457
+ });
5458
+ }
5459
+ /**
5460
+ * Get the saved card
5461
+ *
5462
+ * 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.
5463
+ *
5464
+ */
5465
+ static getCurrentUserPaymentMethod(options) {
5466
+ return (options?.client ?? client).get({
5467
+ url: "/v1/users/me/payment-method",
5468
+ ...options
5469
+ });
5470
+ }
5471
+ /**
5472
+ * Start saving a card
5473
+ *
5474
+ * 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.
5475
+ *
5476
+ */
5477
+ static createCurrentUserPaymentMethod(options) {
5478
+ return (options?.client ?? client).post({
5479
+ url: "/v1/users/me/payment-method",
5480
+ ...options
5481
+ });
5482
+ }
5483
+ /**
5484
+ * Turn auto-recharge off
5485
+ *
5486
+ * Stops topping up the balance automatically. The saved card stays saved.
5487
+ *
5488
+ */
5489
+ static disableCurrentUserAutoRecharge(options) {
5490
+ return (options?.client ?? client).delete({
5491
+ url: "/v1/users/me/auto-recharge",
5492
+ ...options
5493
+ });
5494
+ }
5495
+ /**
5496
+ * Get the auto-recharge setting
5497
+ *
5498
+ * 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.
5499
+ *
5500
+ */
5501
+ static getCurrentUserAutoRecharge(options) {
5502
+ return (options?.client ?? client).get({
5503
+ url: "/v1/users/me/auto-recharge",
5504
+ ...options
5505
+ });
5506
+ }
5507
+ /**
5508
+ * Turn auto-recharge on
5509
+ *
5510
+ * 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.
5511
+ *
5512
+ */
5513
+ static setCurrentUserAutoRecharge(options) {
5514
+ return (options.client ?? client).put({
5515
+ url: "/v1/users/me/auto-recharge",
5516
+ ...options,
5517
+ headers: {
5518
+ "Content-Type": "application/json",
5519
+ ...options.headers
5520
+ }
5521
+ });
5522
+ }
5420
5523
  };
5421
5524
  var Webhooks = class {
5422
5525
  /**