notte-sdk 1.10.4 → 1.10.6
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/README.md +5 -2
- package/dist/index.d.mts +1090 -65
- package/dist/index.d.ts +1090 -65
- package/dist/index.js +74 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +69 -4
- package/dist/index.mjs.map +1 -1
- package/dist/proxy/core.js +10 -0
- package/dist/proxy/core.js.map +1 -1
- package/dist/proxy/core.mjs +10 -0
- package/dist/proxy/core.mjs.map +1 -1
- package/dist/proxy/next.js +10 -0
- package/dist/proxy/next.js.map +1 -1
- package/dist/proxy/next.mjs +10 -0
- package/dist/proxy/next.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/version.ts
|
|
2
|
-
var SDK_VERSION = true ? "1.10.
|
|
2
|
+
var SDK_VERSION = true ? "1.10.6" : "dev";
|
|
3
3
|
var SDK_PACKAGE_NAME = true ? "notte-sdk" : "notte-sdk";
|
|
4
4
|
|
|
5
5
|
// src/version-check.ts
|
|
@@ -1036,6 +1036,33 @@ var pageScrape = (options) => (options.client ?? client).post({
|
|
|
1036
1036
|
...options.headers
|
|
1037
1037
|
}
|
|
1038
1038
|
});
|
|
1039
|
+
var pageAct = (options) => (options.client ?? client).post({
|
|
1040
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1041
|
+
url: "/sessions/{session_id}/page/act",
|
|
1042
|
+
...options,
|
|
1043
|
+
headers: {
|
|
1044
|
+
"Content-Type": "application/json",
|
|
1045
|
+
...options.headers
|
|
1046
|
+
}
|
|
1047
|
+
});
|
|
1048
|
+
var pageChoose = (options) => (options.client ?? client).post({
|
|
1049
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1050
|
+
url: "/sessions/{session_id}/page/choose",
|
|
1051
|
+
...options,
|
|
1052
|
+
headers: {
|
|
1053
|
+
"Content-Type": "application/json",
|
|
1054
|
+
...options.headers
|
|
1055
|
+
}
|
|
1056
|
+
});
|
|
1057
|
+
var pageCheck = (options) => (options.client ?? client).post({
|
|
1058
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1059
|
+
url: "/sessions/{session_id}/page/check",
|
|
1060
|
+
...options,
|
|
1061
|
+
headers: {
|
|
1062
|
+
"Content-Type": "application/json",
|
|
1063
|
+
...options.headers
|
|
1064
|
+
}
|
|
1065
|
+
});
|
|
1039
1066
|
var sessionNetworkLogs = (options) => (options.client ?? client).get({
|
|
1040
1067
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1041
1068
|
url: "/sessions/{session_id}/network/logs",
|
|
@@ -1349,6 +1376,16 @@ var createPayment = (options) => (options.client ?? client).post({
|
|
|
1349
1376
|
...options.headers
|
|
1350
1377
|
}
|
|
1351
1378
|
});
|
|
1379
|
+
var listPaymentRequests = (options) => (options?.client ?? client).get({
|
|
1380
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1381
|
+
url: "/payments",
|
|
1382
|
+
...options
|
|
1383
|
+
});
|
|
1384
|
+
var getPaymentWalletConnection = (options) => (options?.client ?? client).get({
|
|
1385
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1386
|
+
url: "/payments/connection",
|
|
1387
|
+
...options
|
|
1388
|
+
});
|
|
1352
1389
|
var getPayment = (options) => (options.client ?? client).get({
|
|
1353
1390
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1354
1391
|
url: "/payments/{payment_id}",
|
|
@@ -2107,11 +2144,26 @@ var NotteManagedAuth = class {
|
|
|
2107
2144
|
function createResources(client2, getApiKey) {
|
|
2108
2145
|
return {
|
|
2109
2146
|
sessions: {
|
|
2147
|
+
/** pageAct: /sessions/{session_id}/page/act. Returns the API response body. */
|
|
2148
|
+
act: async (sessionId, body, query = void 0, requestOptions = {}) => {
|
|
2149
|
+
const response = await pageAct({ client: client2, throwOnError: true, signal: requestOptions.signal, headers: { "x-notte-timeout-ms": "200000", ...requestOptions.headers }, path: { "session_id": sessionId }, body, query });
|
|
2150
|
+
return response.data;
|
|
2151
|
+
},
|
|
2110
2152
|
/** sessionAuthReadiness: /sessions/{session_id}/auth. Returns the API response body. */
|
|
2111
2153
|
authReadiness: async (sessionId, requestOptions = {}) => {
|
|
2112
2154
|
const response = await sessionAuthReadiness({ client: client2, throwOnError: true, signal: requestOptions.signal, headers: { ...requestOptions.headers }, path: { "session_id": sessionId } });
|
|
2113
2155
|
return response.data;
|
|
2114
2156
|
},
|
|
2157
|
+
/** pageCheck: /sessions/{session_id}/page/check. Returns the API response body. */
|
|
2158
|
+
check: async (sessionId, body, query = void 0, requestOptions = {}) => {
|
|
2159
|
+
const response = await pageCheck({ client: client2, throwOnError: true, signal: requestOptions.signal, headers: { "x-notte-timeout-ms": "200000", ...requestOptions.headers }, path: { "session_id": sessionId }, body, query });
|
|
2160
|
+
return response.data;
|
|
2161
|
+
},
|
|
2162
|
+
/** pageChoose: /sessions/{session_id}/page/choose. Returns the API response body. */
|
|
2163
|
+
choose: async (sessionId, body, query = void 0, requestOptions = {}) => {
|
|
2164
|
+
const response = await pageChoose({ client: client2, throwOnError: true, signal: requestOptions.signal, headers: { "x-notte-timeout-ms": "200000", ...requestOptions.headers }, path: { "session_id": sessionId }, body, query });
|
|
2165
|
+
return response.data;
|
|
2166
|
+
},
|
|
2115
2167
|
/** createPayment: /sessions/{session_id}/payments. Returns the API response body. */
|
|
2116
2168
|
createPayment: async (sessionId, body, query = void 0, requestOptions) => {
|
|
2117
2169
|
const response = await createPayment({ client: client2, throwOnError: true, signal: requestOptions.signal, headers: { ...requestOptions.headers }, path: { "session_id": sessionId }, body, query });
|
|
@@ -4889,14 +4941,22 @@ var NotteFunction = class {
|
|
|
4889
4941
|
return response.data;
|
|
4890
4942
|
}
|
|
4891
4943
|
/**
|
|
4892
|
-
* Delete the function
|
|
4944
|
+
* Delete the function permanently. This cannot be undone, so it must be confirmed.
|
|
4945
|
+
*
|
|
4946
|
+
* A function with deletion protection on cannot be deleted until it is turned off
|
|
4947
|
+
* with `updateMetadata({ deletion_protected: false })`.
|
|
4893
4948
|
*
|
|
4949
|
+
* @param options - Must set `confirm` to `true`.
|
|
4894
4950
|
* @returns The API's function-deletion confirmation.
|
|
4951
|
+
* @throws InvalidRequestError if `confirm` is not `true`.
|
|
4895
4952
|
* @throws NotteAPIError if the function cannot be deleted.
|
|
4896
4953
|
* @example
|
|
4897
|
-
* await fn.delete();
|
|
4954
|
+
* await fn.delete({ confirm: true });
|
|
4898
4955
|
*/
|
|
4899
|
-
async delete() {
|
|
4956
|
+
async delete(options) {
|
|
4957
|
+
if (options?.confirm !== true) {
|
|
4958
|
+
throw new InvalidRequestError("Deleting a function is permanent. Call delete({ confirm: true }) to proceed.");
|
|
4959
|
+
}
|
|
4900
4960
|
const functionId = await this.ensureInitialized();
|
|
4901
4961
|
const response = await functionDelete({
|
|
4902
4962
|
client: this.client.getClient(),
|
|
@@ -6467,6 +6527,7 @@ export {
|
|
|
6467
6527
|
functionSchedulesUpdate,
|
|
6468
6528
|
functionUpdate,
|
|
6469
6529
|
getPayment,
|
|
6530
|
+
getPaymentWalletConnection,
|
|
6470
6531
|
getPolicy,
|
|
6471
6532
|
getRootDomain,
|
|
6472
6533
|
getScript,
|
|
@@ -6487,6 +6548,7 @@ export {
|
|
|
6487
6548
|
listFunctionRunsByFunctionId,
|
|
6488
6549
|
listFunctions,
|
|
6489
6550
|
listMonitors,
|
|
6551
|
+
listPaymentRequests,
|
|
6490
6552
|
listPersonas,
|
|
6491
6553
|
listSecrets,
|
|
6492
6554
|
listSessionFiles,
|
|
@@ -6502,6 +6564,9 @@ export {
|
|
|
6502
6564
|
mapsSearch,
|
|
6503
6565
|
newsSearch,
|
|
6504
6566
|
observeServerOwnedDialog,
|
|
6567
|
+
pageAct,
|
|
6568
|
+
pageCheck,
|
|
6569
|
+
pageChoose,
|
|
6505
6570
|
pageExecute,
|
|
6506
6571
|
pageObserve,
|
|
6507
6572
|
pageScrape,
|