notte-sdk 0.0.20 → 0.0.21
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.d.mts +751 -5
- package/dist/index.d.ts +751 -5
- package/dist/index.js +111 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +102 -1
- package/dist/index.mjs.map +1 -1
- package/dist/proxy/core.js +19 -0
- package/dist/proxy/core.js.map +1 -1
- package/dist/proxy/core.mjs +19 -0
- package/dist/proxy/core.mjs.map +1 -1
- package/dist/proxy/next.js +19 -0
- package/dist/proxy/next.js.map +1 -1
- package/dist/proxy/next.mjs +19 -0
- package/dist/proxy/next.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -43,6 +43,12 @@ __export(index_exports, {
|
|
|
43
43
|
agentStop: () => agentStop,
|
|
44
44
|
anythingStart: () => anythingStart,
|
|
45
45
|
client: () => client,
|
|
46
|
+
connectLinkContext: () => connectLinkContext,
|
|
47
|
+
connectLinkMailboxConnect: () => connectLinkMailboxConnect,
|
|
48
|
+
connectLinkMailboxSync: () => connectLinkMailboxSync,
|
|
49
|
+
connectLinkMailboxes: () => connectLinkMailboxes,
|
|
50
|
+
connectLinkStatus: () => connectLinkStatus,
|
|
51
|
+
connectLinkSubmit: () => connectLinkSubmit,
|
|
46
52
|
createClient: () => createClient2,
|
|
47
53
|
default: () => NotteClient,
|
|
48
54
|
deleteSecret: () => deleteSecret,
|
|
@@ -57,10 +63,12 @@ __export(index_exports, {
|
|
|
57
63
|
functionDownloadUrl: () => functionDownloadUrl,
|
|
58
64
|
functionFork: () => functionFork,
|
|
59
65
|
functionMetadataUpdate: () => functionMetadataUpdate,
|
|
66
|
+
functionRollback: () => functionRollback,
|
|
60
67
|
functionRunGetMetadata: () => functionRunGetMetadata,
|
|
61
68
|
functionRunStart: () => functionRunStart,
|
|
62
69
|
functionRunStop: () => functionRunStop,
|
|
63
70
|
functionRunUpdateMetadata: () => functionRunUpdateMetadata,
|
|
71
|
+
functionRuntimeHealth: () => functionRuntimeHealth,
|
|
64
72
|
functionScheduleDelete: () => functionScheduleDelete,
|
|
65
73
|
functionScheduleSet: () => functionScheduleSet,
|
|
66
74
|
functionUpdate: () => functionUpdate,
|
|
@@ -84,6 +92,7 @@ __export(index_exports, {
|
|
|
84
92
|
mailboxList: () => mailboxList,
|
|
85
93
|
mailboxSync: () => mailboxSync,
|
|
86
94
|
mailboxUpdate: () => mailboxUpdate,
|
|
95
|
+
managedAuthConnectLinkCreate: () => managedAuthConnectLinkCreate,
|
|
87
96
|
nudgePrompt: () => nudgePrompt,
|
|
88
97
|
pageExecute: () => pageExecute,
|
|
89
98
|
pageObserve: () => pageObserve,
|
|
@@ -130,7 +139,7 @@ __export(index_exports, {
|
|
|
130
139
|
module.exports = __toCommonJS(index_exports);
|
|
131
140
|
|
|
132
141
|
// src/version.ts
|
|
133
|
-
var SDK_VERSION = true ? "0.0.
|
|
142
|
+
var SDK_VERSION = true ? "0.0.21" : "dev";
|
|
134
143
|
var SDK_PACKAGE_NAME = true ? "notte-sdk" : "notte-sdk";
|
|
135
144
|
|
|
136
145
|
// src/version-check.ts
|
|
@@ -1167,6 +1176,11 @@ var listAgents = (options) => (options?.client ?? client).get({
|
|
|
1167
1176
|
url: "/agents",
|
|
1168
1177
|
...options
|
|
1169
1178
|
});
|
|
1179
|
+
var functionRuntimeHealth = (options) => (options?.client ?? client).get({
|
|
1180
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1181
|
+
url: "/functions/health",
|
|
1182
|
+
...options
|
|
1183
|
+
});
|
|
1170
1184
|
var listFunctions = (options) => (options?.client ?? client).get({
|
|
1171
1185
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1172
1186
|
url: "/functions",
|
|
@@ -1216,6 +1230,15 @@ var functionFork = (options) => (options.client ?? client).post({
|
|
|
1216
1230
|
url: "/functions/{function_id}/fork",
|
|
1217
1231
|
...options
|
|
1218
1232
|
});
|
|
1233
|
+
var functionRollback = (options) => (options.client ?? client).post({
|
|
1234
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1235
|
+
url: "/functions/{function_id}/rollback",
|
|
1236
|
+
...options,
|
|
1237
|
+
headers: {
|
|
1238
|
+
"Content-Type": "application/json",
|
|
1239
|
+
...options.headers
|
|
1240
|
+
}
|
|
1241
|
+
});
|
|
1219
1242
|
var functionScheduleDelete = (options) => (options.client ?? client).delete({
|
|
1220
1243
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1221
1244
|
url: "/functions/{function_id}/schedule",
|
|
@@ -1466,6 +1489,42 @@ var mailboxUpdate = (options) => (options.client ?? client).patch({
|
|
|
1466
1489
|
...options.headers
|
|
1467
1490
|
}
|
|
1468
1491
|
});
|
|
1492
|
+
var managedAuthConnectLinkCreate = (options) => (options.client ?? client).post({
|
|
1493
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1494
|
+
url: "/managed-auth/connect-links",
|
|
1495
|
+
...options,
|
|
1496
|
+
headers: {
|
|
1497
|
+
"Content-Type": "application/json",
|
|
1498
|
+
...options.headers
|
|
1499
|
+
}
|
|
1500
|
+
});
|
|
1501
|
+
var connectLinkContext = (options) => (options.client ?? client).post({ url: "/managed-auth/connect-links/context", ...options });
|
|
1502
|
+
var connectLinkMailboxes = (options) => (options.client ?? client).post({ url: "/managed-auth/connect-links/mailboxes", ...options });
|
|
1503
|
+
var connectLinkMailboxConnect = (options) => (options.client ?? client).post({
|
|
1504
|
+
url: "/managed-auth/connect-links/mailboxes/connect",
|
|
1505
|
+
...options,
|
|
1506
|
+
headers: {
|
|
1507
|
+
"Content-Type": "application/json",
|
|
1508
|
+
...options.headers
|
|
1509
|
+
}
|
|
1510
|
+
});
|
|
1511
|
+
var connectLinkMailboxSync = (options) => (options.client ?? client).post({
|
|
1512
|
+
url: "/managed-auth/connect-links/mailboxes/sync",
|
|
1513
|
+
...options,
|
|
1514
|
+
headers: {
|
|
1515
|
+
"Content-Type": "application/json",
|
|
1516
|
+
...options.headers
|
|
1517
|
+
}
|
|
1518
|
+
});
|
|
1519
|
+
var connectLinkSubmit = (options) => (options.client ?? client).post({
|
|
1520
|
+
url: "/managed-auth/connect-links/submit",
|
|
1521
|
+
...options,
|
|
1522
|
+
headers: {
|
|
1523
|
+
"Content-Type": "application/json",
|
|
1524
|
+
...options.headers
|
|
1525
|
+
}
|
|
1526
|
+
});
|
|
1527
|
+
var connectLinkStatus = (options) => (options.client ?? client).get({ url: "/managed-auth/connect-links/status", ...options });
|
|
1469
1528
|
var improvePrompt = (options) => (options.client ?? client).post({
|
|
1470
1529
|
url: "/prompts/improve",
|
|
1471
1530
|
...options,
|
|
@@ -2981,6 +3040,48 @@ var NotteFunction = class {
|
|
|
2981
3040
|
throw new Error(`Failed to get function run metadata: ${error instanceof Error ? error.message : String(error)}`);
|
|
2982
3041
|
}
|
|
2983
3042
|
}
|
|
3043
|
+
/**
|
|
3044
|
+
* List the runs of this function.
|
|
3045
|
+
*
|
|
3046
|
+
* `only_active` is sent as `false` unless the caller says otherwise, and that
|
|
3047
|
+
* is deliberate rather than redundant. `GET /functions/{function_id}/runs`
|
|
3048
|
+
* now defaults it to `false` server-side as well, but it used to default to
|
|
3049
|
+
* `true`: the request model was a bare subclass of the session one, where
|
|
3050
|
+
* "only active" reads sensibly as "list my running sessions" and, for "list
|
|
3051
|
+
* this function's runs", was a trap. Hitting the endpoint with no query
|
|
3052
|
+
* parameters returned only the runs executing right now - an empty list for
|
|
3053
|
+
* any function that had finished. That cost us a bug in the anything-api
|
|
3054
|
+
* console, where a function with 15 recorded runs displayed "Nothing has run
|
|
3055
|
+
* this endpoint yet".
|
|
3056
|
+
*
|
|
3057
|
+
* Sending it explicitly pins this method to the documented behaviour against
|
|
3058
|
+
* whichever API version it is talking to, including deployments that predate
|
|
3059
|
+
* the server-side change. Callers who want only in-flight runs pass
|
|
3060
|
+
* `only_active: true`.
|
|
3061
|
+
*/
|
|
3062
|
+
async runs(options = {}) {
|
|
3063
|
+
try {
|
|
3064
|
+
const response = await listFunctionRunsByFunctionId({
|
|
3065
|
+
client: this.client.getClient(),
|
|
3066
|
+
path: {
|
|
3067
|
+
function_id: this.functionId
|
|
3068
|
+
},
|
|
3069
|
+
query: {
|
|
3070
|
+
...options,
|
|
3071
|
+
only_active: options.only_active ?? false
|
|
3072
|
+
}
|
|
3073
|
+
});
|
|
3074
|
+
if (response?.error) {
|
|
3075
|
+
throw new Error(`Failed to list function runs: ${formatError(response.error)}`);
|
|
3076
|
+
}
|
|
3077
|
+
return response.data;
|
|
3078
|
+
} catch (error) {
|
|
3079
|
+
if (error instanceof Error && error.message.startsWith("Failed to list function runs:")) {
|
|
3080
|
+
throw error;
|
|
3081
|
+
}
|
|
3082
|
+
throw new Error(`Failed to list function runs: ${error instanceof Error ? error.message : String(error)}`);
|
|
3083
|
+
}
|
|
3084
|
+
}
|
|
2984
3085
|
/**
|
|
2985
3086
|
* Start a function run
|
|
2986
3087
|
*/
|
|
@@ -3278,6 +3379,12 @@ var createClient2 = (config) => {
|
|
|
3278
3379
|
agentStop,
|
|
3279
3380
|
anythingStart,
|
|
3280
3381
|
client,
|
|
3382
|
+
connectLinkContext,
|
|
3383
|
+
connectLinkMailboxConnect,
|
|
3384
|
+
connectLinkMailboxSync,
|
|
3385
|
+
connectLinkMailboxes,
|
|
3386
|
+
connectLinkStatus,
|
|
3387
|
+
connectLinkSubmit,
|
|
3281
3388
|
createClient,
|
|
3282
3389
|
deleteSecret,
|
|
3283
3390
|
fileDownload,
|
|
@@ -3291,10 +3398,12 @@ var createClient2 = (config) => {
|
|
|
3291
3398
|
functionDownloadUrl,
|
|
3292
3399
|
functionFork,
|
|
3293
3400
|
functionMetadataUpdate,
|
|
3401
|
+
functionRollback,
|
|
3294
3402
|
functionRunGetMetadata,
|
|
3295
3403
|
functionRunStart,
|
|
3296
3404
|
functionRunStop,
|
|
3297
3405
|
functionRunUpdateMetadata,
|
|
3406
|
+
functionRuntimeHealth,
|
|
3298
3407
|
functionScheduleDelete,
|
|
3299
3408
|
functionScheduleSet,
|
|
3300
3409
|
functionUpdate,
|
|
@@ -3318,6 +3427,7 @@ var createClient2 = (config) => {
|
|
|
3318
3427
|
mailboxList,
|
|
3319
3428
|
mailboxSync,
|
|
3320
3429
|
mailboxUpdate,
|
|
3430
|
+
managedAuthConnectLinkCreate,
|
|
3321
3431
|
nudgePrompt,
|
|
3322
3432
|
pageExecute,
|
|
3323
3433
|
pageObserve,
|