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