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.js
CHANGED
|
@@ -165,6 +165,9 @@ __export(index_exports, {
|
|
|
165
165
|
mapsSearch: () => mapsSearch,
|
|
166
166
|
newsSearch: () => newsSearch,
|
|
167
167
|
observeServerOwnedDialog: () => observeServerOwnedDialog,
|
|
168
|
+
pageAct: () => pageAct,
|
|
169
|
+
pageCheck: () => pageCheck,
|
|
170
|
+
pageChoose: () => pageChoose,
|
|
168
171
|
pageExecute: () => pageExecute,
|
|
169
172
|
pageObserve: () => pageObserve,
|
|
170
173
|
pageScrape: () => pageScrape,
|
|
@@ -240,7 +243,7 @@ __export(index_exports, {
|
|
|
240
243
|
module.exports = __toCommonJS(index_exports);
|
|
241
244
|
|
|
242
245
|
// src/version.ts
|
|
243
|
-
var SDK_VERSION = true ? "1.10.
|
|
246
|
+
var SDK_VERSION = true ? "1.10.6" : "dev";
|
|
244
247
|
var SDK_PACKAGE_NAME = true ? "notte-sdk" : "notte-sdk";
|
|
245
248
|
|
|
246
249
|
// src/version-check.ts
|
|
@@ -1277,6 +1280,33 @@ var pageScrape = (options) => (options.client ?? client).post({
|
|
|
1277
1280
|
...options.headers
|
|
1278
1281
|
}
|
|
1279
1282
|
});
|
|
1283
|
+
var pageAct = (options) => (options.client ?? client).post({
|
|
1284
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1285
|
+
url: "/sessions/{session_id}/page/act",
|
|
1286
|
+
...options,
|
|
1287
|
+
headers: {
|
|
1288
|
+
"Content-Type": "application/json",
|
|
1289
|
+
...options.headers
|
|
1290
|
+
}
|
|
1291
|
+
});
|
|
1292
|
+
var pageChoose = (options) => (options.client ?? client).post({
|
|
1293
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1294
|
+
url: "/sessions/{session_id}/page/choose",
|
|
1295
|
+
...options,
|
|
1296
|
+
headers: {
|
|
1297
|
+
"Content-Type": "application/json",
|
|
1298
|
+
...options.headers
|
|
1299
|
+
}
|
|
1300
|
+
});
|
|
1301
|
+
var pageCheck = (options) => (options.client ?? client).post({
|
|
1302
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1303
|
+
url: "/sessions/{session_id}/page/check",
|
|
1304
|
+
...options,
|
|
1305
|
+
headers: {
|
|
1306
|
+
"Content-Type": "application/json",
|
|
1307
|
+
...options.headers
|
|
1308
|
+
}
|
|
1309
|
+
});
|
|
1280
1310
|
var sessionNetworkLogs = (options) => (options.client ?? client).get({
|
|
1281
1311
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1282
1312
|
url: "/sessions/{session_id}/network/logs",
|
|
@@ -2358,11 +2388,26 @@ var NotteManagedAuth = class {
|
|
|
2358
2388
|
function createResources(client2, getApiKey) {
|
|
2359
2389
|
return {
|
|
2360
2390
|
sessions: {
|
|
2391
|
+
/** pageAct: /sessions/{session_id}/page/act. Returns the API response body. */
|
|
2392
|
+
act: async (sessionId, body, query = void 0, requestOptions = {}) => {
|
|
2393
|
+
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 });
|
|
2394
|
+
return response.data;
|
|
2395
|
+
},
|
|
2361
2396
|
/** sessionAuthReadiness: /sessions/{session_id}/auth. Returns the API response body. */
|
|
2362
2397
|
authReadiness: async (sessionId, requestOptions = {}) => {
|
|
2363
2398
|
const response = await sessionAuthReadiness({ client: client2, throwOnError: true, signal: requestOptions.signal, headers: { ...requestOptions.headers }, path: { "session_id": sessionId } });
|
|
2364
2399
|
return response.data;
|
|
2365
2400
|
},
|
|
2401
|
+
/** pageCheck: /sessions/{session_id}/page/check. Returns the API response body. */
|
|
2402
|
+
check: async (sessionId, body, query = void 0, requestOptions = {}) => {
|
|
2403
|
+
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 });
|
|
2404
|
+
return response.data;
|
|
2405
|
+
},
|
|
2406
|
+
/** pageChoose: /sessions/{session_id}/page/choose. Returns the API response body. */
|
|
2407
|
+
choose: async (sessionId, body, query = void 0, requestOptions = {}) => {
|
|
2408
|
+
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 });
|
|
2409
|
+
return response.data;
|
|
2410
|
+
},
|
|
2366
2411
|
/** createPayment: /sessions/{session_id}/payments. Returns the API response body. */
|
|
2367
2412
|
createPayment: async (sessionId, body, query = void 0, requestOptions) => {
|
|
2368
2413
|
const response = await createPayment({ client: client2, throwOnError: true, signal: requestOptions.signal, headers: { ...requestOptions.headers }, path: { "session_id": sessionId }, body, query });
|
|
@@ -5140,14 +5185,22 @@ var NotteFunction = class {
|
|
|
5140
5185
|
return response.data;
|
|
5141
5186
|
}
|
|
5142
5187
|
/**
|
|
5143
|
-
* Delete the function
|
|
5188
|
+
* Delete the function permanently. This cannot be undone, so it must be confirmed.
|
|
5144
5189
|
*
|
|
5190
|
+
* A function with deletion protection on cannot be deleted until it is turned off
|
|
5191
|
+
* with `updateMetadata({ deletion_protected: false })`.
|
|
5192
|
+
*
|
|
5193
|
+
* @param options - Must set `confirm` to `true`.
|
|
5145
5194
|
* @returns The API's function-deletion confirmation.
|
|
5195
|
+
* @throws InvalidRequestError if `confirm` is not `true`.
|
|
5146
5196
|
* @throws NotteAPIError if the function cannot be deleted.
|
|
5147
5197
|
* @example
|
|
5148
|
-
* await fn.delete();
|
|
5198
|
+
* await fn.delete({ confirm: true });
|
|
5149
5199
|
*/
|
|
5150
|
-
async delete() {
|
|
5200
|
+
async delete(options) {
|
|
5201
|
+
if (options?.confirm !== true) {
|
|
5202
|
+
throw new InvalidRequestError("Deleting a function is permanent. Call delete({ confirm: true }) to proceed.");
|
|
5203
|
+
}
|
|
5151
5204
|
const functionId = await this.ensureInitialized();
|
|
5152
5205
|
const response = await functionDelete({
|
|
5153
5206
|
client: this.client.getClient(),
|
|
@@ -6755,6 +6808,9 @@ var createClient2 = (config) => {
|
|
|
6755
6808
|
mapsSearch,
|
|
6756
6809
|
newsSearch,
|
|
6757
6810
|
observeServerOwnedDialog,
|
|
6811
|
+
pageAct,
|
|
6812
|
+
pageCheck,
|
|
6813
|
+
pageChoose,
|
|
6758
6814
|
pageExecute,
|
|
6759
6815
|
pageObserve,
|
|
6760
6816
|
pageScrape,
|