notte-sdk 1.10.5 → 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 +786 -42
- package/dist/index.d.ts +786 -42
- package/dist/index.js +60 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +57 -4
- package/dist/index.mjs.map +1 -1
- package/dist/proxy/core.js +6 -0
- package/dist/proxy/core.js.map +1 -1
- package/dist/proxy/core.mjs +6 -0
- package/dist/proxy/core.mjs.map +1 -1
- package/dist/proxy/next.js +6 -0
- package/dist/proxy/next.js.map +1 -1
- package/dist/proxy/next.mjs +6 -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",
|
|
@@ -2117,11 +2144,26 @@ var NotteManagedAuth = class {
|
|
|
2117
2144
|
function createResources(client2, getApiKey) {
|
|
2118
2145
|
return {
|
|
2119
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
|
+
},
|
|
2120
2152
|
/** sessionAuthReadiness: /sessions/{session_id}/auth. Returns the API response body. */
|
|
2121
2153
|
authReadiness: async (sessionId, requestOptions = {}) => {
|
|
2122
2154
|
const response = await sessionAuthReadiness({ client: client2, throwOnError: true, signal: requestOptions.signal, headers: { ...requestOptions.headers }, path: { "session_id": sessionId } });
|
|
2123
2155
|
return response.data;
|
|
2124
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
|
+
},
|
|
2125
2167
|
/** createPayment: /sessions/{session_id}/payments. Returns the API response body. */
|
|
2126
2168
|
createPayment: async (sessionId, body, query = void 0, requestOptions) => {
|
|
2127
2169
|
const response = await createPayment({ client: client2, throwOnError: true, signal: requestOptions.signal, headers: { ...requestOptions.headers }, path: { "session_id": sessionId }, body, query });
|
|
@@ -4899,14 +4941,22 @@ var NotteFunction = class {
|
|
|
4899
4941
|
return response.data;
|
|
4900
4942
|
}
|
|
4901
4943
|
/**
|
|
4902
|
-
* Delete the function
|
|
4944
|
+
* Delete the function permanently. This cannot be undone, so it must be confirmed.
|
|
4903
4945
|
*
|
|
4946
|
+
* A function with deletion protection on cannot be deleted until it is turned off
|
|
4947
|
+
* with `updateMetadata({ deletion_protected: false })`.
|
|
4948
|
+
*
|
|
4949
|
+
* @param options - Must set `confirm` to `true`.
|
|
4904
4950
|
* @returns The API's function-deletion confirmation.
|
|
4951
|
+
* @throws InvalidRequestError if `confirm` is not `true`.
|
|
4905
4952
|
* @throws NotteAPIError if the function cannot be deleted.
|
|
4906
4953
|
* @example
|
|
4907
|
-
* await fn.delete();
|
|
4954
|
+
* await fn.delete({ confirm: true });
|
|
4908
4955
|
*/
|
|
4909
|
-
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
|
+
}
|
|
4910
4960
|
const functionId = await this.ensureInitialized();
|
|
4911
4961
|
const response = await functionDelete({
|
|
4912
4962
|
client: this.client.getClient(),
|
|
@@ -6514,6 +6564,9 @@ export {
|
|
|
6514
6564
|
mapsSearch,
|
|
6515
6565
|
newsSearch,
|
|
6516
6566
|
observeServerOwnedDialog,
|
|
6567
|
+
pageAct,
|
|
6568
|
+
pageCheck,
|
|
6569
|
+
pageChoose,
|
|
6517
6570
|
pageExecute,
|
|
6518
6571
|
pageObserve,
|
|
6519
6572
|
pageScrape,
|