@mastra/connect 1.2.0-alpha.2 → 1.2.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.js
CHANGED
|
@@ -26252,28 +26252,27 @@ function upsertRowTool(proxy) {
|
|
|
26252
26252
|
updatedRange: updateResponse.data.updatedRange,
|
|
26253
26253
|
updatedRows: updateResponse.data.updatedRows
|
|
26254
26254
|
};
|
|
26255
|
-
} else {
|
|
26256
|
-
const appendResponse = await platformProxy.post({
|
|
26257
|
-
endpoint: `/v4/spreadsheets/${spreadsheetId}/values/${range}:append`,
|
|
26258
|
-
params: {
|
|
26259
|
-
valueInputOption: "USER_ENTERED",
|
|
26260
|
-
insertDataOption: "INSERT_ROWS"
|
|
26261
|
-
},
|
|
26262
|
-
data: {
|
|
26263
|
-
range,
|
|
26264
|
-
majorDimension: "ROWS",
|
|
26265
|
-
values: [values]
|
|
26266
|
-
},
|
|
26267
|
-
retries: 3
|
|
26268
|
-
});
|
|
26269
|
-
return {
|
|
26270
|
-
success: true,
|
|
26271
|
-
operation: "appended",
|
|
26272
|
-
spreadsheetId: appendResponse.data.spreadsheetId,
|
|
26273
|
-
updatedRange: appendResponse.data.updates?.updatedRange || "",
|
|
26274
|
-
updatedRows: appendResponse.data.updates?.updatedRows || 1
|
|
26275
|
-
};
|
|
26276
26255
|
}
|
|
26256
|
+
const appendResponse = await platformProxy.post({
|
|
26257
|
+
endpoint: `/v4/spreadsheets/${spreadsheetId}/values/${range}:append`,
|
|
26258
|
+
params: {
|
|
26259
|
+
valueInputOption: "USER_ENTERED",
|
|
26260
|
+
insertDataOption: "INSERT_ROWS"
|
|
26261
|
+
},
|
|
26262
|
+
data: {
|
|
26263
|
+
range,
|
|
26264
|
+
majorDimension: "ROWS",
|
|
26265
|
+
values: [values]
|
|
26266
|
+
},
|
|
26267
|
+
retries: 3
|
|
26268
|
+
});
|
|
26269
|
+
return {
|
|
26270
|
+
success: true,
|
|
26271
|
+
operation: "appended",
|
|
26272
|
+
spreadsheetId: appendResponse.data.spreadsheetId,
|
|
26273
|
+
updatedRange: appendResponse.data.updates?.updatedRange || "",
|
|
26274
|
+
updatedRows: appendResponse.data.updates?.updatedRows || 1
|
|
26275
|
+
};
|
|
26277
26276
|
}
|
|
26278
26277
|
});
|
|
26279
26278
|
}
|
|
@@ -47113,7 +47112,8 @@ function getPagePropertyItemTool(proxy) {
|
|
|
47113
47112
|
errors: parsed.error.issues
|
|
47114
47113
|
});
|
|
47115
47114
|
return parsed.data;
|
|
47116
|
-
}
|
|
47115
|
+
}
|
|
47116
|
+
throw new platformProxy.ActionError({
|
|
47117
47117
|
type: "unexpected_response",
|
|
47118
47118
|
message: "Unexpected response object type from Notion API",
|
|
47119
47119
|
object_type: String(objectType)
|
|
@@ -64743,7 +64743,7 @@ async function fetchAllRows(platformProxy, resultSet) {
|
|
|
64743
64743
|
const partitionInfo = resultSet.resultSetMetaData?.partitionInfo ?? [];
|
|
64744
64744
|
const statementHandle = resultSet.statementHandle;
|
|
64745
64745
|
let allData = initialData.map((row) => rowToRecord(row, columns));
|
|
64746
|
-
for (let partitionIndex = 1; partitionIndex < partitionInfo.length; partitionIndex
|
|
64746
|
+
for (let partitionIndex = 1; partitionIndex < partitionInfo.length; partitionIndex += 1) {
|
|
64747
64747
|
const partitionResponse = await platformProxy.get({
|
|
64748
64748
|
endpoint: `/api/v2/statements/${encodeURIComponent(statementHandle)}`,
|
|
64749
64749
|
params: { partition: String(partitionIndex) },
|
|
@@ -64811,7 +64811,7 @@ function listRolesTool(proxy) {
|
|
|
64811
64811
|
const maxPollAttempts = 30;
|
|
64812
64812
|
while (pollResponse.status === 202 && pollAttempts < maxPollAttempts) {
|
|
64813
64813
|
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
64814
|
-
pollAttempts
|
|
64814
|
+
pollAttempts += 1;
|
|
64815
64815
|
pollResponse = await platformProxy.get({
|
|
64816
64816
|
endpoint: `/api/v2/statements/${encodeURIComponent(statementHandle)}`,
|
|
64817
64817
|
retries: 3
|