@naturali/cli 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.mjs +218 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -17,7 +17,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region package.json
|
|
20
|
-
var version = "0.
|
|
20
|
+
var version = "0.168.0";
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region ../sdk/src/generated/core/bodySerializer.gen.ts
|
|
23
23
|
const serializeFormDataPair = (data, key, value) => {
|
|
@@ -1754,6 +1754,34 @@ var Assistant = class {
|
|
|
1754
1754
|
}
|
|
1755
1755
|
});
|
|
1756
1756
|
}
|
|
1757
|
+
/**
|
|
1758
|
+
* Read the conversation
|
|
1759
|
+
*
|
|
1760
|
+
* 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.
|
|
1761
|
+
*
|
|
1762
|
+
*/
|
|
1763
|
+
static listAssistantMessages(options) {
|
|
1764
|
+
return (options?.client ?? client).get({
|
|
1765
|
+
url: "/v1/assistant/messages",
|
|
1766
|
+
...options
|
|
1767
|
+
});
|
|
1768
|
+
}
|
|
1769
|
+
/**
|
|
1770
|
+
* Message the Assistant
|
|
1771
|
+
*
|
|
1772
|
+
* 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.
|
|
1773
|
+
*
|
|
1774
|
+
*/
|
|
1775
|
+
static sendAssistantMessage(options) {
|
|
1776
|
+
return (options.client ?? client).post({
|
|
1777
|
+
url: "/v1/assistant/messages",
|
|
1778
|
+
...options,
|
|
1779
|
+
headers: {
|
|
1780
|
+
"Content-Type": "application/json",
|
|
1781
|
+
...options.headers
|
|
1782
|
+
}
|
|
1783
|
+
});
|
|
1784
|
+
}
|
|
1757
1785
|
};
|
|
1758
1786
|
var AuditLog = class {
|
|
1759
1787
|
/**
|
|
@@ -5437,6 +5465,81 @@ var Users = class {
|
|
|
5437
5465
|
}
|
|
5438
5466
|
});
|
|
5439
5467
|
}
|
|
5468
|
+
/**
|
|
5469
|
+
* Remove the saved card
|
|
5470
|
+
*
|
|
5471
|
+
* Forgets the saved card and turns auto-recharge off.
|
|
5472
|
+
*/
|
|
5473
|
+
static deleteCurrentUserPaymentMethod(options) {
|
|
5474
|
+
return (options?.client ?? client).delete({
|
|
5475
|
+
url: "/v1/users/me/payment-method",
|
|
5476
|
+
...options
|
|
5477
|
+
});
|
|
5478
|
+
}
|
|
5479
|
+
/**
|
|
5480
|
+
* Get the saved card
|
|
5481
|
+
*
|
|
5482
|
+
* 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.
|
|
5483
|
+
*
|
|
5484
|
+
*/
|
|
5485
|
+
static getCurrentUserPaymentMethod(options) {
|
|
5486
|
+
return (options?.client ?? client).get({
|
|
5487
|
+
url: "/v1/users/me/payment-method",
|
|
5488
|
+
...options
|
|
5489
|
+
});
|
|
5490
|
+
}
|
|
5491
|
+
/**
|
|
5492
|
+
* Start saving a card
|
|
5493
|
+
*
|
|
5494
|
+
* 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.
|
|
5495
|
+
*
|
|
5496
|
+
*/
|
|
5497
|
+
static createCurrentUserPaymentMethod(options) {
|
|
5498
|
+
return (options?.client ?? client).post({
|
|
5499
|
+
url: "/v1/users/me/payment-method",
|
|
5500
|
+
...options
|
|
5501
|
+
});
|
|
5502
|
+
}
|
|
5503
|
+
/**
|
|
5504
|
+
* Turn auto-recharge off
|
|
5505
|
+
*
|
|
5506
|
+
* Stops topping up the balance automatically. The saved card stays saved.
|
|
5507
|
+
*
|
|
5508
|
+
*/
|
|
5509
|
+
static disableCurrentUserAutoRecharge(options) {
|
|
5510
|
+
return (options?.client ?? client).delete({
|
|
5511
|
+
url: "/v1/users/me/auto-recharge",
|
|
5512
|
+
...options
|
|
5513
|
+
});
|
|
5514
|
+
}
|
|
5515
|
+
/**
|
|
5516
|
+
* Get the auto-recharge setting
|
|
5517
|
+
*
|
|
5518
|
+
* 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.
|
|
5519
|
+
*
|
|
5520
|
+
*/
|
|
5521
|
+
static getCurrentUserAutoRecharge(options) {
|
|
5522
|
+
return (options?.client ?? client).get({
|
|
5523
|
+
url: "/v1/users/me/auto-recharge",
|
|
5524
|
+
...options
|
|
5525
|
+
});
|
|
5526
|
+
}
|
|
5527
|
+
/**
|
|
5528
|
+
* Turn auto-recharge on
|
|
5529
|
+
*
|
|
5530
|
+
* 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.
|
|
5531
|
+
*
|
|
5532
|
+
*/
|
|
5533
|
+
static setCurrentUserAutoRecharge(options) {
|
|
5534
|
+
return (options.client ?? client).put({
|
|
5535
|
+
url: "/v1/users/me/auto-recharge",
|
|
5536
|
+
...options,
|
|
5537
|
+
headers: {
|
|
5538
|
+
"Content-Type": "application/json",
|
|
5539
|
+
...options.headers
|
|
5540
|
+
}
|
|
5541
|
+
});
|
|
5542
|
+
}
|
|
5440
5543
|
};
|
|
5441
5544
|
var Webhooks = class {
|
|
5442
5545
|
/**
|
|
@@ -9281,6 +9384,36 @@ const routes = {
|
|
|
9281
9384
|
"in": "body"
|
|
9282
9385
|
}]
|
|
9283
9386
|
},
|
|
9387
|
+
"list-assistant-messages": {
|
|
9388
|
+
serviceClass: "Assistant",
|
|
9389
|
+
operationId: "listAssistantMessages",
|
|
9390
|
+
description: "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.",
|
|
9391
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/assistant",
|
|
9392
|
+
httpMethod: "get",
|
|
9393
|
+
pathParams: [],
|
|
9394
|
+
queryParams: [],
|
|
9395
|
+
headerParams: [],
|
|
9396
|
+
cookieParams: [],
|
|
9397
|
+
flags: []
|
|
9398
|
+
},
|
|
9399
|
+
"send-assistant-message": {
|
|
9400
|
+
serviceClass: "Assistant",
|
|
9401
|
+
operationId: "sendAssistantMessage",
|
|
9402
|
+
description: "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.",
|
|
9403
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/assistant",
|
|
9404
|
+
httpMethod: "post",
|
|
9405
|
+
pathParams: [],
|
|
9406
|
+
queryParams: [],
|
|
9407
|
+
headerParams: [],
|
|
9408
|
+
cookieParams: [],
|
|
9409
|
+
flags: [{
|
|
9410
|
+
"name": "text",
|
|
9411
|
+
"description": "",
|
|
9412
|
+
"required": true,
|
|
9413
|
+
"type": "string",
|
|
9414
|
+
"in": "body"
|
|
9415
|
+
}]
|
|
9416
|
+
},
|
|
9284
9417
|
"list-audit-entries": {
|
|
9285
9418
|
serviceClass: "AuditLog",
|
|
9286
9419
|
operationId: "listAuditEntries",
|
|
@@ -20962,6 +21095,90 @@ const routes = {
|
|
|
20962
21095
|
"in": "body"
|
|
20963
21096
|
}]
|
|
20964
21097
|
},
|
|
21098
|
+
"get-current-user-payment-method": {
|
|
21099
|
+
serviceClass: "Users",
|
|
21100
|
+
operationId: "getCurrentUserPaymentMethod",
|
|
21101
|
+
description: "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.",
|
|
21102
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
21103
|
+
httpMethod: "get",
|
|
21104
|
+
pathParams: [],
|
|
21105
|
+
queryParams: [],
|
|
21106
|
+
headerParams: [],
|
|
21107
|
+
cookieParams: [],
|
|
21108
|
+
flags: []
|
|
21109
|
+
},
|
|
21110
|
+
"create-current-user-payment-method": {
|
|
21111
|
+
serviceClass: "Users",
|
|
21112
|
+
operationId: "createCurrentUserPaymentMethod",
|
|
21113
|
+
description: "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.",
|
|
21114
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
21115
|
+
httpMethod: "post",
|
|
21116
|
+
pathParams: [],
|
|
21117
|
+
queryParams: [],
|
|
21118
|
+
headerParams: [],
|
|
21119
|
+
cookieParams: [],
|
|
21120
|
+
flags: []
|
|
21121
|
+
},
|
|
21122
|
+
"delete-current-user-payment-method": {
|
|
21123
|
+
serviceClass: "Users",
|
|
21124
|
+
operationId: "deleteCurrentUserPaymentMethod",
|
|
21125
|
+
description: "Forgets the saved card and turns auto-recharge off.",
|
|
21126
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
21127
|
+
httpMethod: "delete",
|
|
21128
|
+
pathParams: [],
|
|
21129
|
+
queryParams: [],
|
|
21130
|
+
headerParams: [],
|
|
21131
|
+
cookieParams: [],
|
|
21132
|
+
flags: []
|
|
21133
|
+
},
|
|
21134
|
+
"get-current-user-auto-recharge": {
|
|
21135
|
+
serviceClass: "Users",
|
|
21136
|
+
operationId: "getCurrentUserAutoRecharge",
|
|
21137
|
+
description: "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.",
|
|
21138
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
21139
|
+
httpMethod: "get",
|
|
21140
|
+
pathParams: [],
|
|
21141
|
+
queryParams: [],
|
|
21142
|
+
headerParams: [],
|
|
21143
|
+
cookieParams: [],
|
|
21144
|
+
flags: []
|
|
21145
|
+
},
|
|
21146
|
+
"set-current-user-auto-recharge": {
|
|
21147
|
+
serviceClass: "Users",
|
|
21148
|
+
operationId: "setCurrentUserAutoRecharge",
|
|
21149
|
+
description: "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.",
|
|
21150
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
21151
|
+
httpMethod: "put",
|
|
21152
|
+
pathParams: [],
|
|
21153
|
+
queryParams: [],
|
|
21154
|
+
headerParams: [],
|
|
21155
|
+
cookieParams: [],
|
|
21156
|
+
flags: [{
|
|
21157
|
+
"name": "amount_usd",
|
|
21158
|
+
"description": "US dollars per recharge, in whole cents.",
|
|
21159
|
+
"required": true,
|
|
21160
|
+
"type": "number",
|
|
21161
|
+
"in": "body"
|
|
21162
|
+
}, {
|
|
21163
|
+
"name": "below_usd",
|
|
21164
|
+
"description": "Recharge when the balance falls below this, in whole cents.",
|
|
21165
|
+
"required": true,
|
|
21166
|
+
"type": "number",
|
|
21167
|
+
"in": "body"
|
|
21168
|
+
}]
|
|
21169
|
+
},
|
|
21170
|
+
"disable-current-user-auto-recharge": {
|
|
21171
|
+
serviceClass: "Users",
|
|
21172
|
+
operationId: "disableCurrentUserAutoRecharge",
|
|
21173
|
+
description: "Stops topping up the balance automatically. The saved card stays saved.",
|
|
21174
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
21175
|
+
httpMethod: "delete",
|
|
21176
|
+
pathParams: [],
|
|
21177
|
+
queryParams: [],
|
|
21178
|
+
headerParams: [],
|
|
21179
|
+
cookieParams: [],
|
|
21180
|
+
flags: []
|
|
21181
|
+
},
|
|
20965
21182
|
"list-webhooks": {
|
|
20966
21183
|
serviceClass: "Webhooks",
|
|
20967
21184
|
operationId: "listWebhooks",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.168.0",
|
|
4
4
|
"description": "Command-line interface for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"yaml": "^2.9.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@naturali/sdk": "0.
|
|
28
|
+
"@naturali/sdk": "0.168.0",
|
|
29
29
|
"@ttoss/openapi-codegen": "^0.5.0",
|
|
30
30
|
"@types/node": "^26.5.1",
|
|
31
31
|
"tsdown": "^0.23.0",
|