@mastra/connect 1.3.2-alpha.1 → 1.3.2-alpha.3

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.
@@ -3,7 +3,7 @@ name: mastra-connect
3
3
  description: Documentation for @mastra/connect. Use when working with @mastra/connect APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/connect"
6
- version: "1.3.2-alpha.1"
6
+ version: "1.3.2-alpha.3"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,11 +1,11 @@
1
1
  {
2
- "version": "1.3.2-alpha.1",
2
+ "version": "1.3.2-alpha.3",
3
3
  "package": "@mastra/connect",
4
4
  "exports": {
5
5
  "CHANNELS": {
6
6
  "types": "dist/registry.d.ts",
7
7
  "implementation": "dist/index.js",
8
- "line": 85420
8
+ "line": 85421
9
9
  },
10
10
  "CONNECT_PROMPT_TOOL_KEY": {
11
11
  "types": "dist/connect-prompt-tool.d.ts",
@@ -20,27 +20,27 @@
20
20
  "PROVIDERS": {
21
21
  "types": "dist/registry.d.ts",
22
22
  "implementation": "dist/index.js",
23
- "line": 85377
23
+ "line": 85378
24
24
  },
25
25
  "channels": {
26
26
  "types": "dist/channels.d.ts",
27
27
  "implementation": "dist/index.js",
28
- "line": 86402
28
+ "line": 86403
29
29
  },
30
30
  "credential": {
31
31
  "types": "dist/credential.d.ts",
32
32
  "implementation": "dist/index.js",
33
- "line": 86633
33
+ "line": 86634
34
34
  },
35
35
  "tools": {
36
36
  "types": "dist/tools.d.ts",
37
37
  "implementation": "dist/index.js",
38
- "line": 85848
38
+ "line": 85849
39
39
  },
40
40
  "userConnectRoutes": {
41
41
  "types": "dist/user-connect-routes.d.ts",
42
42
  "implementation": "dist/index.js",
43
- "line": 86938
43
+ "line": 86939
44
44
  }
45
45
  },
46
46
  "modules": {}
@@ -42,7 +42,7 @@ Most applications should prefer [`tools()`](https://mastra.ai/reference/connect/
42
42
 
43
43
  **connectionId** (`string`): ID of the connection to fetch credentials for.
44
44
 
45
- **options** (`{ client?: ConnectClientOptions }`): Optional platform client overrides (accessToken, orgId, baseUrl, fetch). See ConnectClientOptions in tools().
45
+ **options** (`{ client?: ConnectClientOptions; resourceId?: string }`): Optional platform client overrides (accessToken, orgId, baseUrl, fetch; see ConnectClientOptions in tools()) and the end-user resourceId. Pass resourceId when the connection is scoped to an end user. The value is trimmed and must be 1-256 characters, otherwise invalid_options is thrown before any request is sent. The value is sent as the x-mastra-resource-id header, takes precedence over client.resourceId, and the platform returns not found for a resource-scoped connection when it's missing or doesn't match.
46
46
 
47
47
  ## Credential handling
48
48
 
@@ -56,6 +56,7 @@ Throws `MastraConnectError` with a `code` property:
56
56
 
57
57
  | Code | When |
58
58
  | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
59
+ | `invalid_options` | An option is invalid, for example an empty `resourceId` or one longer than 256 characters after trimming |
59
60
  | `missing_access_token` | No platform token configured |
60
61
  | `connection_not_found` | The connection doesn't exist or isn't accessible |
61
62
  | `unsupported_credential_type` | The connection's credential type can't be returned |
package/dist/index.cjs CHANGED
@@ -43109,6 +43109,7 @@ function deleteWorkbookTool(proxy) {
43109
43109
  execute: async (input, { requestContext }) => {
43110
43110
  await proxy.withRequestContext(requestContext).delete({
43111
43111
  endpoint: `/v1.0/drives/${encodeURIComponent(input.driveId)}/items/${encodeURIComponent(input.itemId)}`,
43112
+ headers: { Prefer: "bypass-shared-lock" },
43112
43113
  retries: 3
43113
43114
  });
43114
43115
  return { success: true };