@commandable/mcp 0.12.1 → 0.12.2
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/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{D_Ecm3JY.js → BD6mASiY.js} +1 -1
- package/.output/public/_nuxt/{bOjQRRUc.js → BUmYUDQu.js} +3 -3
- package/.output/public/_nuxt/{Vt66r6sN.js → CjAs3eBq.js} +1 -1
- package/.output/public/_nuxt/{CiSdBjBt.js → D9wFDhac.js} +1 -1
- package/.output/public/_nuxt/{B6ti3873.js → DRfk9W3W.js} +1 -1
- package/.output/public/_nuxt/{BuJvZwTh.js → DSWYWRXT.js} +9 -9
- package/.output/public/_nuxt/{BZ8athzM.js → VvnbcAzZ.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/acb5884f-261b-465e-ad96-149a30400776.json +1 -0
- package/.output/server/chunks/build/{_id_-BIPuj6eI.mjs → _id_-DA3Q8jun.mjs} +4 -4
- package/.output/server/chunks/build/{_id_-BIPuj6eI.mjs.map → _id_-DA3Q8jun.mjs.map} +1 -1
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/{error-404-BHlLSgAJ.mjs → error-404-D1k2kWid.mjs} +1 -1
- package/.output/server/chunks/build/error-404-D1k2kWid.mjs.map +1 -0
- package/.output/server/chunks/build/{error-500-D4rqaBv3.mjs → error-500-D2K2rAfl.mjs} +1 -1
- package/.output/server/chunks/build/error-500-D2K2rAfl.mjs.map +1 -0
- package/.output/server/chunks/build/{fetch-DJGu_p4i.mjs → fetch-aDh21opM.mjs} +1 -1
- package/.output/server/chunks/build/fetch-aDh21opM.mjs.map +1 -0
- package/.output/server/chunks/build/{index-DvzWme19.mjs → index-F5lAFSQk.mjs} +4 -4
- package/.output/server/chunks/build/index-F5lAFSQk.mjs.map +1 -0
- package/.output/server/chunks/build/{index-DUjkeeyt.mjs → index-ycGPozML.mjs} +1 -1
- package/.output/server/chunks/build/index-ycGPozML.mjs.map +1 -0
- package/.output/server/chunks/build/server.mjs +5 -5
- package/.output/server/chunks/build/styles.mjs +2 -2
- package/.output/server/chunks/nitro/nitro.mjs +2713 -407
- package/.output/server/package.json +1 -1
- package/package.json +2 -2
- package/.output/public/_nuxt/builds/meta/6152dcdc-6d3b-4e0a-8c56-4584c72c8765.json +0 -1
- package/.output/server/chunks/build/error-404-BHlLSgAJ.mjs.map +0 -1
- package/.output/server/chunks/build/error-500-D4rqaBv3.mjs.map +0 -1
- package/.output/server/chunks/build/fetch-DJGu_p4i.mjs.map +0 -1
- package/.output/server/chunks/build/index-DUjkeeyt.mjs.map +0 -1
- package/.output/server/chunks/build/index-DvzWme19.mjs.map +0 -1
|
@@ -4431,7 +4431,7 @@ function _expandFromEnv(value) {
|
|
|
4431
4431
|
const _inlineRuntimeConfig = {
|
|
4432
4432
|
"app": {
|
|
4433
4433
|
"baseURL": "/",
|
|
4434
|
-
"buildId": "
|
|
4434
|
+
"buildId": "acb5884f-261b-465e-ad96-149a30400776",
|
|
4435
4435
|
"buildAssetsDir": "/_nuxt/",
|
|
4436
4436
|
"cdnURL": ""
|
|
4437
4437
|
},
|
|
@@ -4900,7 +4900,7 @@ async function errorHandler(error, event) {
|
|
|
4900
4900
|
|
|
4901
4901
|
const script = "\"use strict\";(()=>{const t=window,e=document.documentElement,c=[\"dark\",\"light\"],n=getStorageValue(\"localStorage\",\"nuxt-color-mode\")||\"system\";let i=n===\"system\"?u():n;const r=e.getAttribute(\"data-color-mode-forced\");r&&(i=r),l(i),t[\"__NUXT_COLOR_MODE__\"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=\"\"+o+\"\",a=\"\";e.classList?e.classList.add(s):e.className+=\" \"+s,a&&e.setAttribute(\"data-\"+a,o)}function d(o){const s=\"\"+o+\"\",a=\"\";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,\"g\"),\"\"),a&&e.removeAttribute(\"data-\"+a)}function f(o){return t.matchMedia(\"(prefers-color-scheme\"+o+\")\")}function u(){if(t.matchMedia&&f(\"\").media!==\"not all\"){for(const o of c)if(f(\":\"+o).matches)return o}return\"light\"}})();function getStorageValue(t,e){switch(t){case\"localStorage\":return window.localStorage.getItem(e);case\"sessionStorage\":return window.sessionStorage.getItem(e);case\"cookie\":return getCookie(e);default:return null}}function getCookie(t){const c=(\"; \"+window.document.cookie).split(\"; \"+t+\"=\");if(c.length===2)return c.pop()?.split(\";\").shift()}";
|
|
4902
4902
|
|
|
4903
|
-
const
|
|
4903
|
+
const _z25E5bI6lxolM40nRjOSnV7rTGIEhhG_oLaxlR5RK0I = (function(nitro) {
|
|
4904
4904
|
nitro.hooks.hook("render:html", (htmlContext) => {
|
|
4905
4905
|
htmlContext.head.push(`<script>${script}<\/script>`);
|
|
4906
4906
|
});
|
|
@@ -10296,7 +10296,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
10296
10296
|
"google-workspace": {
|
|
10297
10297
|
"manifest": {
|
|
10298
10298
|
"name": "google-workspace",
|
|
10299
|
-
"version": "0.1.
|
|
10299
|
+
"version": "0.1.1",
|
|
10300
10300
|
"baseUrl": "https://www.googleapis.com/drive/v3",
|
|
10301
10301
|
"allowedOrigins": [
|
|
10302
10302
|
"https://*.googleapis.com"
|
|
@@ -10729,7 +10729,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
10729
10729
|
},
|
|
10730
10730
|
"preprocess": "google_service_account",
|
|
10731
10731
|
"healthCheck": {
|
|
10732
|
-
"path": "/about?fields=user",
|
|
10732
|
+
"path": "https://www.googleapis.com/drive/v3/about?fields=user",
|
|
10733
10733
|
"description": "Validates that the service account can mint a Google access token and call the Drive API."
|
|
10734
10734
|
}
|
|
10735
10735
|
},
|
|
@@ -10755,7 +10755,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
10755
10755
|
}
|
|
10756
10756
|
},
|
|
10757
10757
|
"healthCheck": {
|
|
10758
|
-
"path": "/about?fields=user",
|
|
10758
|
+
"path": "https://www.googleapis.com/drive/v3/about?fields=user",
|
|
10759
10759
|
"description": "Validates that the OAuth token can call the Drive API."
|
|
10760
10760
|
}
|
|
10761
10761
|
}
|
|
@@ -10801,7 +10801,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
10801
10801
|
},
|
|
10802
10802
|
"additionalProperties": false
|
|
10803
10803
|
},
|
|
10804
|
-
"handlerCode": "async (input) => {\n const params = new URLSearchParams()\n const qParts = ['trashed = false']\n if (input.folderId)\n qParts.push(`'${input.folderId}' in parents`)\n params.set('q', qParts.join(' and '))\n params.set('fields', input.fields || 'nextPageToken,files(id,name,mimeType,modifiedTime,size,parents)')\n params.set('pageSize', String(input.pageSize || 50))\n if (input.pageToken)\n params.set('pageToken', input.pageToken)\n if (input.orderBy)\n params.set('orderBy', input.orderBy)\n const res = await integration.fetch(
|
|
10804
|
+
"handlerCode": "async (input) => {\n const params = new URLSearchParams()\n const qParts = ['trashed = false']\n if (input.folderId)\n qParts.push(`'${input.folderId}' in parents`)\n params.set('q', qParts.join(' and '))\n params.set('fields', input.fields || 'nextPageToken,files(id,name,mimeType,modifiedTime,size,parents)')\n params.set('pageSize', String(input.pageSize || 50))\n if (input.pageToken)\n params.set('pageToken', input.pageToken)\n if (input.orderBy)\n params.set('orderBy', input.orderBy)\n const res = await integration.fetch(`https://www.googleapis.com/drive/v3/files?${params.toString()}`)\n return await res.json()\n}",
|
|
10805
10805
|
"scope": "read",
|
|
10806
10806
|
"toolset": "drive"
|
|
10807
10807
|
},
|
|
@@ -10846,7 +10846,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
10846
10846
|
},
|
|
10847
10847
|
"additionalProperties": false
|
|
10848
10848
|
},
|
|
10849
|
-
"handlerCode": "async (input) => {\n const params = new URLSearchParams()\n const qParts = []\n if (input.query)\n qParts.push(input.query)\n if (input.name)\n qParts.push(`name contains '${input.name.replace(/\\\\/g, '\\\\\\\\').replace(/'/g, \"\\\\'\")}'`)\n if (input.mimeType)\n qParts.push(`mimeType = '${input.mimeType}'`)\n if (!input.includeTrashed)\n qParts.push('trashed = false')\n if (qParts.length > 0)\n params.set('q', qParts.join(' and '))\n params.set('fields', input.fields || 'nextPageToken,files(id,name,mimeType,modifiedTime,size,parents)')\n params.set('pageSize', String(input.pageSize || 20))\n if (input.pageToken)\n params.set('pageToken', input.pageToken)\n const res = await integration.fetch(
|
|
10849
|
+
"handlerCode": "async (input) => {\n const params = new URLSearchParams()\n const qParts = []\n if (input.query)\n qParts.push(input.query)\n if (input.name)\n qParts.push(`name contains '${input.name.replace(/\\\\/g, '\\\\\\\\').replace(/'/g, \"\\\\'\")}'`)\n if (input.mimeType)\n qParts.push(`mimeType = '${input.mimeType}'`)\n if (!input.includeTrashed)\n qParts.push('trashed = false')\n if (qParts.length > 0)\n params.set('q', qParts.join(' and '))\n params.set('fields', input.fields || 'nextPageToken,files(id,name,mimeType,modifiedTime,size,parents)')\n params.set('pageSize', String(input.pageSize || 20))\n if (input.pageToken)\n params.set('pageToken', input.pageToken)\n const res = await integration.fetch(`https://www.googleapis.com/drive/v3/files?${params.toString()}`)\n return await res.json()\n}",
|
|
10850
10850
|
"scope": "read",
|
|
10851
10851
|
"toolset": "drive"
|
|
10852
10852
|
},
|
|
@@ -10871,7 +10871,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
10871
10871
|
}
|
|
10872
10872
|
}
|
|
10873
10873
|
},
|
|
10874
|
-
"handlerCode": "async (input) => {\n const fields = input.fields || 'id,name,mimeType,modifiedTime,createdTime,size,parents,trashed,webViewLink'\n const res = await integration.fetch(
|
|
10874
|
+
"handlerCode": "async (input) => {\n const fields = input.fields || 'id,name,mimeType,modifiedTime,createdTime,size,parents,trashed,webViewLink'\n const res = await integration.fetch(`https://www.googleapis.com/drive/v3/files/${encodeURIComponent(input.fileId)}?fields=${encodeURIComponent(fields)}`)\n return await res.json()\n}",
|
|
10875
10875
|
"scope": "read",
|
|
10876
10876
|
"toolset": "drive"
|
|
10877
10877
|
},
|
|
@@ -10902,7 +10902,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
10902
10902
|
},
|
|
10903
10903
|
"additionalProperties": false
|
|
10904
10904
|
},
|
|
10905
|
-
"handlerCode": "async (input) => {\n const googleNativeExports = {\n 'application/vnd.google-apps.document': 'text/markdown',\n 'application/vnd.google-apps.spreadsheet': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n 'application/vnd.google-apps.presentation': 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n 'application/vnd.google-apps.drawing': 'image/svg+xml',\n 'application/vnd.google-apps.script': 'application/vnd.google-apps.script+json',\n }\n const isTextLikeMimeType = (value) => {\n const mimeType = String(value || '').split(';', 1)[0].trim().toLowerCase()\n return mimeType.startsWith('text/')\n || mimeType.includes('json')\n || mimeType.includes('csv')\n || mimeType === 'application/xml'\n || mimeType === 'text/xml'\n || mimeType.endsWith('+xml')\n || mimeType.includes('javascript')\n || mimeType.includes('svg')\n }\n const resolveMimeType = async () => {\n if (typeof input.mimeType === 'string' && input.mimeType.trim())\n return input.mimeType.trim()\n\n const metaRes = await integration.fetch(
|
|
10905
|
+
"handlerCode": "async (input) => {\n const googleNativeExports = {\n 'application/vnd.google-apps.document': 'text/markdown',\n 'application/vnd.google-apps.spreadsheet': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n 'application/vnd.google-apps.presentation': 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n 'application/vnd.google-apps.drawing': 'image/svg+xml',\n 'application/vnd.google-apps.script': 'application/vnd.google-apps.script+json',\n }\n const isTextLikeMimeType = (value) => {\n const mimeType = String(value || '').split(';', 1)[0].trim().toLowerCase()\n return mimeType.startsWith('text/')\n || mimeType.includes('json')\n || mimeType.includes('csv')\n || mimeType === 'application/xml'\n || mimeType === 'text/xml'\n || mimeType.endsWith('+xml')\n || mimeType.includes('javascript')\n || mimeType.includes('svg')\n }\n const resolveMimeType = async () => {\n if (typeof input.mimeType === 'string' && input.mimeType.trim())\n return input.mimeType.trim()\n\n const metaRes = await integration.fetch(`https://www.googleapis.com/drive/v3/files/${fileId}?fields=id,name,mimeType`)\n const meta = await metaRes.json()\n return meta?.mimeType || ''\n }\n const readTextContent = async (source) => {\n const res = await integration.fetch(source)\n const contentMimeType = res.headers?.get?.('content-type') || ''\n const content = await res.text()\n return { contentMimeType, content }\n }\n\n const fileId = encodeURIComponent(input.fileId)\n const mimeType = await resolveMimeType()\n\n if (!mimeType) {\n return {\n fileId: input.fileId,\n mimeType: null,\n content: null,\n message: 'Could not determine the Drive file MIME type.',\n }\n }\n\n if (mimeType === 'application/vnd.google-apps.folder') {\n return {\n fileId: input.fileId,\n mimeType,\n content: null,\n message: 'Folders do not have readable file content.',\n }\n }\n\n const isGoogleNative = mimeType.startsWith('application/vnd.google-apps.')\n const exportMimeType = isGoogleNative\n ? (typeof input.exportMimeType === 'string' && input.exportMimeType.trim())\n ? input.exportMimeType.trim()\n : googleNativeExports[mimeType] || null\n : null\n\n if (isGoogleNative && !exportMimeType) {\n return {\n fileId: input.fileId,\n mimeType,\n content: null,\n message: 'This Google-native file type does not have a configured export path for read_file_content.',\n }\n }\n\n const source = isGoogleNative\n ? `https://www.googleapis.com/drive/v3/files/${fileId}/export?mimeType=${encodeURIComponent(exportMimeType)}`\n : `https://www.googleapis.com/drive/v3/files/${fileId}?alt=media`\n\n if (isTextLikeMimeType(exportMimeType || mimeType)) {\n const textResult = await readTextContent(source)\n return {\n fileId: input.fileId,\n mimeType,\n contentMimeType: textResult.contentMimeType || exportMimeType || mimeType,\n content: textResult.content,\n }\n }\n\n const extracted = await utils.extractFileContent({\n auth: true,\n source,\n previewPages: input.previewPages || 0,\n })\n\n return {\n fileId: input.fileId,\n mimeType,\n contentMimeType: exportMimeType || mimeType,\n ...extracted,\n }\n}",
|
|
10906
10906
|
"scope": "read",
|
|
10907
10907
|
"toolset": "drive"
|
|
10908
10908
|
},
|
|
@@ -10926,7 +10926,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
10926
10926
|
}
|
|
10927
10927
|
}
|
|
10928
10928
|
},
|
|
10929
|
-
"handlerCode": "async (input) => {\n const body = {\n name: input.name,\n mimeType: 'application/vnd.google-apps.folder',\n }\n if (input.parentId)\n body.parents = [input.parentId]\n\n const res = await integration.fetch('/files', {\n method: 'POST',\n body,\n })\n return await res.json()\n}",
|
|
10929
|
+
"handlerCode": "async (input) => {\n const body = {\n name: input.name,\n mimeType: 'application/vnd.google-apps.folder',\n }\n if (input.parentId)\n body.parents = [input.parentId]\n\n const res = await integration.fetch('https://www.googleapis.com/drive/v3/files', {\n method: 'POST',\n body,\n })\n return await res.json()\n}",
|
|
10930
10930
|
"scope": "write",
|
|
10931
10931
|
"toolset": "drive"
|
|
10932
10932
|
},
|
|
@@ -10955,7 +10955,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
10955
10955
|
}
|
|
10956
10956
|
}
|
|
10957
10957
|
},
|
|
10958
|
-
"handlerCode": "async (input) => {\n const body = {\n name: input.name,\n mimeType: input.mimeType,\n }\n if (input.parentId)\n body.parents = [input.parentId]\n\n const res = await integration.fetch('/files', {\n method: 'POST',\n body,\n })\n return await res.json()\n}",
|
|
10958
|
+
"handlerCode": "async (input) => {\n const body = {\n name: input.name,\n mimeType: input.mimeType,\n }\n if (input.parentId)\n body.parents = [input.parentId]\n\n const res = await integration.fetch('https://www.googleapis.com/drive/v3/files', {\n method: 'POST',\n body,\n })\n return await res.json()\n}",
|
|
10959
10959
|
"scope": "write",
|
|
10960
10960
|
"toolset": "drive"
|
|
10961
10961
|
},
|
|
@@ -10984,7 +10984,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
10984
10984
|
}
|
|
10985
10985
|
}
|
|
10986
10986
|
},
|
|
10987
|
-
"handlerCode": "async (input) => {\n const params = new URLSearchParams()\n params.set('addParents', input.addParents)\n if (input.removeParents)\n params.set('removeParents', input.removeParents)\n\n const res = await integration.fetch(
|
|
10987
|
+
"handlerCode": "async (input) => {\n const params = new URLSearchParams()\n params.set('addParents', input.addParents)\n if (input.removeParents)\n params.set('removeParents', input.removeParents)\n\n const res = await integration.fetch(`https://www.googleapis.com/drive/v3/files/${encodeURIComponent(input.fileId)}?${params.toString()}`, {\n method: 'PATCH',\n })\n return await res.json()\n}",
|
|
10988
10988
|
"scope": "write",
|
|
10989
10989
|
"toolset": "drive"
|
|
10990
10990
|
},
|
|
@@ -11044,7 +11044,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11044
11044
|
},
|
|
11045
11045
|
"additionalProperties": false
|
|
11046
11046
|
},
|
|
11047
|
-
"handlerCode": "async (input) => {\n const fileId = encodeURIComponent(input.fileId)\n const params = new URLSearchParams()\n if (input.sendNotificationEmail !== undefined)\n params.set('sendNotificationEmail', String(input.sendNotificationEmail))\n if (input.emailMessage)\n params.set('emailMessage', input.emailMessage)\n const body = {\n role: input.role,\n type: input.type,\n }\n if (input.emailAddress) body.emailAddress = input.emailAddress\n if (input.domain) body.domain = input.domain\n const qs = params.toString()\n const res = await integration.fetch(
|
|
11047
|
+
"handlerCode": "async (input) => {\n const fileId = encodeURIComponent(input.fileId)\n const params = new URLSearchParams()\n if (input.sendNotificationEmail !== undefined)\n params.set('sendNotificationEmail', String(input.sendNotificationEmail))\n if (input.emailMessage)\n params.set('emailMessage', input.emailMessage)\n const body = {\n role: input.role,\n type: input.type,\n }\n if (input.emailAddress) body.emailAddress = input.emailAddress\n if (input.domain) body.domain = input.domain\n const qs = params.toString()\n const res = await integration.fetch(`https://www.googleapis.com/drive/v3/files/${fileId}/permissions${qs ? `?${qs}` : ''}`, {\n method: 'POST',\n body,\n })\n return await res.json()\n}",
|
|
11048
11048
|
"scope": "write",
|
|
11049
11049
|
"toolset": "drive"
|
|
11050
11050
|
},
|
|
@@ -11064,7 +11064,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11064
11064
|
}
|
|
11065
11065
|
}
|
|
11066
11066
|
},
|
|
11067
|
-
"handlerCode": "async (input) => {\n const res = await integration.fetch(
|
|
11067
|
+
"handlerCode": "async (input) => {\n const res = await integration.fetch(`https://www.googleapis.com/drive/v3/files/${encodeURIComponent(input.fileId)}`, {\n method: 'DELETE',\n })\n if (res.status === 204)\n return { success: true, status: 204 }\n try {\n return await res.json()\n }\n catch {\n return { success: res.ok, status: res.status }\n }\n}",
|
|
11068
11068
|
"scope": "write",
|
|
11069
11069
|
"toolset": "drive"
|
|
11070
11070
|
},
|
|
@@ -11085,7 +11085,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11085
11085
|
},
|
|
11086
11086
|
"additionalProperties": false
|
|
11087
11087
|
},
|
|
11088
|
-
"handlerCode": "async (input) => {\n const MONO_FONTS = new Set([\n 'Courier',\n 'Courier New',\n 'Consolas',\n 'Menlo',\n 'Monaco',\n 'Roboto Mono',\n 'Source Code Pro',\n ])\n\n const HEADING_MAP = {\n TITLE: '#',\n SUBTITLE: '##',\n HEADING_1: '#',\n HEADING_2: '##',\n HEADING_3: '###',\n HEADING_4: '####',\n HEADING_5: '#####',\n HEADING_6: '######',\n }\n\n const BULLET_GLYPHS = new Set([\n 'BULLET_DISC_CIRCLE_SQUARE',\n 'BULLET_DIAMONDX_ARROW3D_SQUARE',\n 'BULLET_CHECKBOX',\n 'BULLET_ARROW_DIAMOND_DISC',\n 'BULLET_STAR_CIRCLE_SQUARE',\n ])\n\n const LIST_NUMBER_GLYPHS = new Set([\n 'DECIMAL',\n 'ZERO_DECIMAL',\n 'UPPER_ALPHA',\n 'ALPHA',\n 'UPPER_ROMAN',\n 'ROMAN',\n ])\n\n const trimEndWhitespace = (value) => (value || '').replace(/[ \\t]+$/g, '')\n\n const escapeCell = (value) =>\n String(value ?? '')\n .replace(/\\|/g, '\\\\|')\n .replace(/\\r?\\n/g, '<br>')\n\n const extractPlainTextFromParagraph = (paragraph) => {\n let text = ''\n for (const element of paragraph?.elements || []) {\n text += element?.textRun?.content || ''\n }\n return trimEndWhitespace(text)\n }\n\n const applyTextStyle = (text, textStyle = {}) => {\n const raw = (text || '').replace(/\\n/g, '')\n if (!raw) return ''\n\n let out = raw\n if (textStyle.link?.url) out = `[${out}](${textStyle.link.url})`\n\n const fontFamily = textStyle.weightedFontFamily?.fontFamily || ''\n const isMono = textStyle.smallCaps || MONO_FONTS.has(fontFamily)\n\n if (isMono) out = `\\`${out}\\``\n if (textStyle.bold) out = `**${out}**`\n if (textStyle.italic) out = `*${out}*`\n if (textStyle.strikethrough) out = `~~${out}~~`\n\n return out\n }\n\n const paragraphToMarkdown = (paragraph, docLists) => {\n const styleType = paragraph?.paragraphStyle?.namedStyleType\n const headingPrefix = HEADING_MAP[styleType] || ''\n\n let line = ''\n for (const element of paragraph?.elements || []) {\n line += applyTextStyle(element?.textRun?.content || '', element?.textRun?.textStyle || {})\n }\n line = trimEndWhitespace(line)\n\n if (!line) return ''\n\n const bullet = paragraph?.bullet\n if (bullet) {\n const nestingLevel = bullet.nestingLevel || 0\n const listMeta = docLists?.[bullet.listId]\n const nesting = listMeta?.listProperties?.nestingLevels?.[nestingLevel]\n const glyphType = nesting?.glyphType || ''\n const isNumbered = LIST_NUMBER_GLYPHS.has(glyphType) && !BULLET_GLYPHS.has(glyphType)\n const indent = ' '.repeat(Math.max(0, nestingLevel))\n return `${indent}${isNumbered ? '1.' : '-'} ${line}`\n }\n\n if (headingPrefix) return `${headingPrefix} ${line}`\n return line\n }\n\n const tableToMarkdown = (table, docLists) => {\n const rows = table?.tableRows || []\n if (!rows.length) return ''\n\n const normalized = rows.map((row) =>\n (row?.tableCells || []).map((cell) => {\n const parts = []\n for (const c of cell?.content || []) {\n if (c?.paragraph) {\n const p = paragraphToMarkdown(c.paragraph, docLists)\n if (p) parts.push(p)\n }\n }\n return escapeCell(parts.join('<br>'))\n }),\n )\n\n const width = Math.max(...normalized.map((r) => r.length), 1)\n const padded = normalized.map((r) => [...r, ...Array(width - r.length).fill('')])\n const header = padded[0] || Array(width).fill('')\n const separator = Array(width).fill('---')\n const body = padded.slice(1)\n\n const lines = [\n `| ${header.join(' | ')} |`,\n `| ${separator.join(' | ')} |`,\n ...body.map((r) => `| ${r.join(' | ')} |`),\n ]\n return lines.join('\\n')\n }\n\n const docToPlainText = (docBodyContent) => {\n const lines = []\n for (const item of docBodyContent || []) {\n if (item?.paragraph) {\n const text = extractPlainTextFromParagraph(item.paragraph)\n if (text) lines.push(text)\n } else if (item?.table) {\n for (const row of item.table.tableRows || []) {\n const cells = (row.tableCells || []).map((cell) => {\n const pieces = []\n for (const contentItem of cell.content || []) {\n if (contentItem?.paragraph) {\n const text = extractPlainTextFromParagraph(contentItem.paragraph)\n if (text) pieces.push(text)\n }\n }\n return pieces.join(' ')\n })\n if (cells.some(Boolean)) lines.push(cells.join(' | '))\n }\n }\n }\n return lines.join('\\n\\n').trim()\n }\n\n const { documentId } = input\n const res = await integration.fetch(
|
|
11088
|
+
"handlerCode": "async (input) => {\n const MONO_FONTS = new Set([\n 'Courier',\n 'Courier New',\n 'Consolas',\n 'Menlo',\n 'Monaco',\n 'Roboto Mono',\n 'Source Code Pro',\n ])\n\n const HEADING_MAP = {\n TITLE: '#',\n SUBTITLE: '##',\n HEADING_1: '#',\n HEADING_2: '##',\n HEADING_3: '###',\n HEADING_4: '####',\n HEADING_5: '#####',\n HEADING_6: '######',\n }\n\n const BULLET_GLYPHS = new Set([\n 'BULLET_DISC_CIRCLE_SQUARE',\n 'BULLET_DIAMONDX_ARROW3D_SQUARE',\n 'BULLET_CHECKBOX',\n 'BULLET_ARROW_DIAMOND_DISC',\n 'BULLET_STAR_CIRCLE_SQUARE',\n ])\n\n const LIST_NUMBER_GLYPHS = new Set([\n 'DECIMAL',\n 'ZERO_DECIMAL',\n 'UPPER_ALPHA',\n 'ALPHA',\n 'UPPER_ROMAN',\n 'ROMAN',\n ])\n\n const trimEndWhitespace = (value) => (value || '').replace(/[ \\t]+$/g, '')\n\n const escapeCell = (value) =>\n String(value ?? '')\n .replace(/\\|/g, '\\\\|')\n .replace(/\\r?\\n/g, '<br>')\n\n const extractPlainTextFromParagraph = (paragraph) => {\n let text = ''\n for (const element of paragraph?.elements || []) {\n text += element?.textRun?.content || ''\n }\n return trimEndWhitespace(text)\n }\n\n const applyTextStyle = (text, textStyle = {}) => {\n const raw = (text || '').replace(/\\n/g, '')\n if (!raw) return ''\n\n let out = raw\n if (textStyle.link?.url) out = `[${out}](${textStyle.link.url})`\n\n const fontFamily = textStyle.weightedFontFamily?.fontFamily || ''\n const isMono = textStyle.smallCaps || MONO_FONTS.has(fontFamily)\n\n if (isMono) out = `\\`${out}\\``\n if (textStyle.bold) out = `**${out}**`\n if (textStyle.italic) out = `*${out}*`\n if (textStyle.strikethrough) out = `~~${out}~~`\n\n return out\n }\n\n const paragraphToMarkdown = (paragraph, docLists) => {\n const styleType = paragraph?.paragraphStyle?.namedStyleType\n const headingPrefix = HEADING_MAP[styleType] || ''\n\n let line = ''\n for (const element of paragraph?.elements || []) {\n line += applyTextStyle(element?.textRun?.content || '', element?.textRun?.textStyle || {})\n }\n line = trimEndWhitespace(line)\n\n if (!line) return ''\n\n const bullet = paragraph?.bullet\n if (bullet) {\n const nestingLevel = bullet.nestingLevel || 0\n const listMeta = docLists?.[bullet.listId]\n const nesting = listMeta?.listProperties?.nestingLevels?.[nestingLevel]\n const glyphType = nesting?.glyphType || ''\n const isNumbered = LIST_NUMBER_GLYPHS.has(glyphType) && !BULLET_GLYPHS.has(glyphType)\n const indent = ' '.repeat(Math.max(0, nestingLevel))\n return `${indent}${isNumbered ? '1.' : '-'} ${line}`\n }\n\n if (headingPrefix) return `${headingPrefix} ${line}`\n return line\n }\n\n const tableToMarkdown = (table, docLists) => {\n const rows = table?.tableRows || []\n if (!rows.length) return ''\n\n const normalized = rows.map((row) =>\n (row?.tableCells || []).map((cell) => {\n const parts = []\n for (const c of cell?.content || []) {\n if (c?.paragraph) {\n const p = paragraphToMarkdown(c.paragraph, docLists)\n if (p) parts.push(p)\n }\n }\n return escapeCell(parts.join('<br>'))\n }),\n )\n\n const width = Math.max(...normalized.map((r) => r.length), 1)\n const padded = normalized.map((r) => [...r, ...Array(width - r.length).fill('')])\n const header = padded[0] || Array(width).fill('')\n const separator = Array(width).fill('---')\n const body = padded.slice(1)\n\n const lines = [\n `| ${header.join(' | ')} |`,\n `| ${separator.join(' | ')} |`,\n ...body.map((r) => `| ${r.join(' | ')} |`),\n ]\n return lines.join('\\n')\n }\n\n const docToPlainText = (docBodyContent) => {\n const lines = []\n for (const item of docBodyContent || []) {\n if (item?.paragraph) {\n const text = extractPlainTextFromParagraph(item.paragraph)\n if (text) lines.push(text)\n } else if (item?.table) {\n for (const row of item.table.tableRows || []) {\n const cells = (row.tableCells || []).map((cell) => {\n const pieces = []\n for (const contentItem of cell.content || []) {\n if (contentItem?.paragraph) {\n const text = extractPlainTextFromParagraph(contentItem.paragraph)\n if (text) pieces.push(text)\n }\n }\n return pieces.join(' ')\n })\n if (cells.some(Boolean)) lines.push(cells.join(' | '))\n }\n }\n }\n return lines.join('\\n\\n').trim()\n }\n\n const { documentId } = input\n const res = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}`)\n const doc = await res.json()\n\n const content = doc?.body?.content || []\n const lists = doc?.lists || {}\n\n const blocks = []\n for (const item of content) {\n if (item?.paragraph) {\n const line = paragraphToMarkdown(item.paragraph, lists)\n if (line) blocks.push(line)\n } else if (item?.table) {\n const table = tableToMarkdown(item.table, lists)\n if (table) blocks.push(table)\n }\n }\n\n const markdown = blocks.join('\\n\\n').trim()\n if (markdown) {\n return {\n documentId: doc?.documentId || documentId,\n title: doc?.title || '',\n markdown,\n }\n }\n\n // Escape hatch: return plain text if markdown conversion produced nothing.\n return {\n documentId: doc?.documentId || documentId,\n title: doc?.title || '',\n markdown: docToPlainText(content),\n }\n}",
|
|
11089
11089
|
"scope": "read",
|
|
11090
11090
|
"toolset": "docs"
|
|
11091
11091
|
},
|
|
@@ -11126,7 +11126,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11126
11126
|
},
|
|
11127
11127
|
"additionalProperties": false
|
|
11128
11128
|
},
|
|
11129
|
-
"handlerCode": "async (input) => {\n const params = new URLSearchParams()\n const qParts = [`mimeType = 'application/vnd.google-apps.document'`]\n if (input.query)\n qParts.push(input.query)\n if (input.name)\n qParts.push(`name contains '${input.name.replace(/\\\\/g, '\\\\\\\\').replace(/'/g, \"\\\\'\")}'`)\n if (!input.includeTrashed)\n qParts.push('trashed = false')\n if (qParts.length > 0)\n params.set('q', qParts.join(' and '))\n params.set('fields', input.fields || 'nextPageToken,files(id,name,mimeType,modifiedTime,size,parents)')\n params.set('pageSize', String(input.pageSize || 20))\n if (input.pageToken)\n params.set('pageToken', input.pageToken)\n const res = await integration.fetch(
|
|
11129
|
+
"handlerCode": "async (input) => {\n const params = new URLSearchParams()\n const qParts = [`mimeType = 'application/vnd.google-apps.document'`]\n if (input.query)\n qParts.push(input.query)\n if (input.name)\n qParts.push(`name contains '${input.name.replace(/\\\\/g, '\\\\\\\\').replace(/'/g, \"\\\\'\")}'`)\n if (!input.includeTrashed)\n qParts.push('trashed = false')\n if (qParts.length > 0)\n params.set('q', qParts.join(' and '))\n params.set('fields', input.fields || 'nextPageToken,files(id,name,mimeType,modifiedTime,size,parents)')\n params.set('pageSize', String(input.pageSize || 20))\n if (input.pageToken)\n params.set('pageToken', input.pageToken)\n const res = await integration.fetch(`https://www.googleapis.com/drive/v3/files?${params.toString()}`)\n return await res.json()\n}",
|
|
11130
11130
|
"scope": "read",
|
|
11131
11131
|
"toolset": "docs"
|
|
11132
11132
|
},
|
|
@@ -11144,7 +11144,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11144
11144
|
},
|
|
11145
11145
|
"additionalProperties": true
|
|
11146
11146
|
},
|
|
11147
|
-
"handlerCode": "async (input) => {\n const { title, ...rest } = input\n const body = {}\n if (title !== undefined)\n body.title = title\n Object.assign(body, rest)\n const res = await integration.fetch(
|
|
11147
|
+
"handlerCode": "async (input) => {\n const { title, ...rest } = input\n const body = {}\n if (title !== undefined)\n body.title = title\n Object.assign(body, rest)\n const res = await integration.fetch(`https://docs.googleapis.com/v1/documents`, { method: 'POST', body })\n return await res.json()\n}",
|
|
11148
11148
|
"scope": "write",
|
|
11149
11149
|
"toolset": "docs"
|
|
11150
11150
|
},
|
|
@@ -11181,7 +11181,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11181
11181
|
],
|
|
11182
11182
|
"additionalProperties": true
|
|
11183
11183
|
},
|
|
11184
|
-
"handlerCode": "async (input) => {\n const { documentId, requests, writeControl, includeTabStops } = input\n const params = new URLSearchParams()\n if (includeTabStops !== undefined)\n params.set('includeTabStops', String(includeTabStops))\n const qs = params.toString()\n const path =
|
|
11184
|
+
"handlerCode": "async (input) => {\n const { documentId, requests, writeControl, includeTabStops } = input\n const params = new URLSearchParams()\n if (includeTabStops !== undefined)\n params.set('includeTabStops', String(includeTabStops))\n const qs = params.toString()\n const path = `https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}:batchUpdate${qs ? `?${qs}` : ''}`\n const body = { requests }\n if (writeControl)\n body.writeControl = writeControl\n const res = await integration.fetch(path, { method: 'POST', body })\n return await res.json()\n}",
|
|
11185
11185
|
"scope": "write",
|
|
11186
11186
|
"toolset": "docs"
|
|
11187
11187
|
},
|
|
@@ -11205,7 +11205,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11205
11205
|
],
|
|
11206
11206
|
"additionalProperties": false
|
|
11207
11207
|
},
|
|
11208
|
-
"handlerCode": "async (input) => {\n const { documentId, text } = input\n // Get doc to find end index\n const metaRes = await integration.fetch(
|
|
11208
|
+
"handlerCode": "async (input) => {\n const { documentId, text } = input\n // Get doc to find end index\n const metaRes = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}`)\n const meta = await metaRes.json()\n const endIndex = meta?.body?.content?.[meta.body.content.length - 1]?.endIndex || 1\n const res = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}:batchUpdate`, {\n method: 'POST',\n body: { requests: [{ insertText: { text, location: { index: endIndex - 1 } } }] },\n })\n return await res.json()\n}",
|
|
11209
11209
|
"scope": "write",
|
|
11210
11210
|
"toolset": "docs"
|
|
11211
11211
|
},
|
|
@@ -11236,7 +11236,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11236
11236
|
],
|
|
11237
11237
|
"additionalProperties": false
|
|
11238
11238
|
},
|
|
11239
|
-
"handlerCode": "async (input) => {\n const { documentId, findText, replaceText, matchCase } = input\n const res = await integration.fetch(
|
|
11239
|
+
"handlerCode": "async (input) => {\n const { documentId, findText, replaceText, matchCase } = input\n const res = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}:batchUpdate`, {\n method: 'POST',\n body: { requests: [{ replaceAllText: { containsText: { text: findText, matchCase: Boolean(matchCase) }, replaceText } }] },\n })\n return await res.json()\n}",
|
|
11240
11240
|
"scope": "write",
|
|
11241
11241
|
"toolset": "docs"
|
|
11242
11242
|
},
|
|
@@ -11267,7 +11267,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11267
11267
|
],
|
|
11268
11268
|
"additionalProperties": false
|
|
11269
11269
|
},
|
|
11270
|
-
"handlerCode": "async (input) => {\n const { documentId, findText, textStyle, fields } = input\n // 1) Find first match via replaceAllText with unique marker\n const marker = `__CMD_MARK_${Date.now()}__`\n const replaceRes = await integration.fetch(
|
|
11270
|
+
"handlerCode": "async (input) => {\n const { documentId, findText, textStyle, fields } = input\n // 1) Find first match via replaceAllText with unique marker\n const marker = `__CMD_MARK_${Date.now()}__`\n const replaceRes = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}:batchUpdate`, {\n method: 'POST',\n body: { requests: [{ replaceAllText: { containsText: { text: findText, matchCase: false }, replaceText: marker } }] },\n })\n const rep = await replaceRes.json()\n // 2) Get doc, locate marker, compute indices\n const getRes = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}`)\n const doc = await getRes.json()\n let startIndex = -1\n let endIndex = -1\n for (const el of (doc?.body?.content || [])) {\n const p = el.paragraph\n if (!p)\n continue\n for (const e of (p.elements || [])) {\n const t = e?.textRun?.content\n if (!t)\n continue\n const idx = t.indexOf(marker)\n if (idx >= 0) {\n const elStart = e.startIndex || 1\n startIndex = elStart + idx\n endIndex = startIndex + marker.length\n break\n }\n }\n if (startIndex >= 0)\n break\n }\n if (startIndex < 0)\n return rep\n // 3) Apply style and restore original text\n const requests = []\n requests.push({ updateTextStyle: { range: { startIndex, endIndex }, textStyle, fields: fields || Object.keys(textStyle || {}).join(',') } })\n requests.push({ replaceAllText: { containsText: { text: marker, matchCase: true }, replaceText: findText } })\n const res = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}:batchUpdate`, { method: 'POST', body: { requests } })\n return await res.json()\n}",
|
|
11271
11271
|
"scope": "write",
|
|
11272
11272
|
"toolset": "docs"
|
|
11273
11273
|
},
|
|
@@ -11303,7 +11303,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11303
11303
|
],
|
|
11304
11304
|
"additionalProperties": false
|
|
11305
11305
|
},
|
|
11306
|
-
"handlerCode": "async (input) => {\n const { documentId, findText, insertText, position } = input\n const marker = `__CMD_MARK_${Date.now()}__`\n // Replace first occurrence by marker only (simulate single by replacing all, then revert later to first span)\n const replaceRes = await integration.fetch(
|
|
11306
|
+
"handlerCode": "async (input) => {\n const { documentId, findText, insertText, position } = input\n const marker = `__CMD_MARK_${Date.now()}__`\n // Replace first occurrence by marker only (simulate single by replacing all, then revert later to first span)\n const replaceRes = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}:batchUpdate`, {\n method: 'POST',\n body: { requests: [{ replaceAllText: { containsText: { text: findText, matchCase: false }, replaceText: marker } }] },\n })\n await replaceRes.json()\n\n const getRes = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}`)\n const doc = await getRes.json()\n let insertIndex = -1\n for (const el of (doc?.body?.content || [])) {\n const p = el.paragraph\n if (!p)\n continue\n for (const e of (p.elements || [])) {\n const t = e?.textRun?.content\n if (!t)\n continue\n const idx = t.indexOf(marker)\n if (idx >= 0) {\n const elStart = e.startIndex || 1\n const startIndex = elStart + idx\n const endIndex = startIndex + marker.length\n insertIndex = position === 'before' ? startIndex : endIndex\n break\n }\n }\n if (insertIndex >= 0)\n break\n }\n if (insertIndex < 0) {\n const confirm = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}`)\n const got = await confirm.json()\n return { documentId: got?.documentId || documentId, applied: false, replies: [] }\n }\n\n const requests = []\n requests.push({ insertText: { text: insertText, location: { index: insertIndex } } })\n // restore marker back to original findText everywhere\n requests.push({ replaceAllText: { containsText: { text: marker, matchCase: true }, replaceText: findText } })\n const res = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}:batchUpdate`, { method: 'POST', body: { requests } })\n const out = await res.json()\n if (out?.documentId || Array.isArray(out?.replies))\n return { ...out, applied: true }\n const confirm = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}`)\n const got = await confirm.json()\n return { documentId: got?.documentId || documentId, applied: true, replies: Array.isArray(out?.replies) ? out.replies : [] }\n}",
|
|
11307
11307
|
"scope": "write",
|
|
11308
11308
|
"toolset": "docs"
|
|
11309
11309
|
},
|
|
@@ -11345,7 +11345,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11345
11345
|
],
|
|
11346
11346
|
"additionalProperties": false
|
|
11347
11347
|
},
|
|
11348
|
-
"handlerCode": "async (input) => {\n const { documentId, findText, rows, columns, position } = input\n const marker = `__CMD_MARK_${Date.now()}__`\n const replaceRes = await integration.fetch(
|
|
11348
|
+
"handlerCode": "async (input) => {\n const { documentId, findText, rows, columns, position } = input\n const marker = `__CMD_MARK_${Date.now()}__`\n const replaceRes = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}:batchUpdate`, {\n method: 'POST',\n body: { requests: [{ replaceAllText: { containsText: { text: findText, matchCase: false }, replaceText: marker } }] },\n })\n await replaceRes.json()\n\n const getRes = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}`)\n const doc = await getRes.json()\n let baseIndex = -1\n for (const el of (doc?.body?.content || [])) {\n const p = el.paragraph\n if (!p)\n continue\n for (const e of (p.elements || [])) {\n const t = e?.textRun?.content\n if (!t)\n continue\n const idx = t.indexOf(marker)\n if (idx >= 0) {\n const elStart = e.startIndex || 1\n const startIndex = elStart + idx\n const endIndex = startIndex + marker.length\n baseIndex = position === 'before' ? startIndex : endIndex\n break\n }\n }\n if (baseIndex >= 0)\n break\n }\n if (baseIndex < 0) {\n const confirm = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}`)\n const got = await confirm.json()\n return { documentId: got?.documentId || documentId, applied: false, replies: [] }\n }\n\n const requests = []\n requests.push({ insertTable: { location: { index: baseIndex }, rows, columns } })\n requests.push({ replaceAllText: { containsText: { text: marker, matchCase: true }, replaceText: findText } })\n const res = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}:batchUpdate`, { method: 'POST', body: { requests } })\n const out = await res.json()\n if (out?.documentId || Array.isArray(out?.replies))\n return { ...out, applied: true }\n const confirm = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}`)\n const got = await confirm.json()\n return { documentId: got?.documentId || documentId, applied: true, replies: Array.isArray(out?.replies) ? out.replies : [] }\n}",
|
|
11349
11349
|
"scope": "write",
|
|
11350
11350
|
"toolset": "docs"
|
|
11351
11351
|
},
|
|
@@ -11377,7 +11377,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11377
11377
|
],
|
|
11378
11378
|
"additionalProperties": false
|
|
11379
11379
|
},
|
|
11380
|
-
"handlerCode": "async (input) => {\n const { documentId, findText, position } = input\n const marker = `__CMD_MARK_${Date.now()}__`\n const replaceRes = await integration.fetch(
|
|
11380
|
+
"handlerCode": "async (input) => {\n const { documentId, findText, position } = input\n const marker = `__CMD_MARK_${Date.now()}__`\n const replaceRes = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}:batchUpdate`, {\n method: 'POST',\n body: { requests: [{ replaceAllText: { containsText: { text: findText, matchCase: false }, replaceText: marker } }] },\n })\n await replaceRes.json()\n\n const getRes = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}`)\n const doc = await getRes.json()\n let baseIndex = -1\n for (const el of (doc?.body?.content || [])) {\n const p = el.paragraph\n if (!p)\n continue\n for (const e of (p.elements || [])) {\n const t = e?.textRun?.content\n if (!t)\n continue\n const idx = t.indexOf(marker)\n if (idx >= 0) {\n const elStart = e.startIndex || 1\n const startIndex = elStart + idx\n const endIndex = startIndex + marker.length\n baseIndex = position === 'before' ? startIndex : endIndex\n break\n }\n }\n if (baseIndex >= 0)\n break\n }\n if (baseIndex < 0) {\n const confirm = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}`)\n const got = await confirm.json()\n return { documentId: got?.documentId || documentId, applied: false, replies: [] }\n }\n\n const requests = []\n requests.push({ insertPageBreak: { location: { index: baseIndex } } })\n requests.push({ replaceAllText: { containsText: { text: marker, matchCase: true }, replaceText: findText } })\n const res = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}:batchUpdate`, { method: 'POST', body: { requests } })\n const out = await res.json()\n if (out?.documentId || Array.isArray(out?.replies))\n return { ...out, applied: true }\n const confirm = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}`)\n const got = await confirm.json()\n return { documentId: got?.documentId || documentId, applied: true, replies: Array.isArray(out?.replies) ? out.replies : [] }\n}",
|
|
11381
11381
|
"scope": "write",
|
|
11382
11382
|
"toolset": "docs"
|
|
11383
11383
|
},
|
|
@@ -11413,7 +11413,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11413
11413
|
],
|
|
11414
11414
|
"additionalProperties": false
|
|
11415
11415
|
},
|
|
11416
|
-
"handlerCode": "async (input) => {\n const { documentId, findText, uri, altText, position } = input\n const marker = `__CMD_MARK_${Date.now()}__`\n const replaceRes = await integration.fetch(
|
|
11416
|
+
"handlerCode": "async (input) => {\n const { documentId, findText, uri, altText, position } = input\n const marker = `__CMD_MARK_${Date.now()}__`\n const replaceRes = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}:batchUpdate`, {\n method: 'POST',\n body: { requests: [{ replaceAllText: { containsText: { text: findText, matchCase: false }, replaceText: marker } }] },\n })\n await replaceRes.json()\n\n const getRes = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}`)\n const doc = await getRes.json()\n let baseIndex = -1\n for (const el of (doc?.body?.content || [])) {\n const p = el.paragraph\n if (!p)\n continue\n for (const e of (p.elements || [])) {\n const t = e?.textRun?.content\n if (!t)\n continue\n const idx = t.indexOf(marker)\n if (idx >= 0) {\n const elStart = e.startIndex || 1\n const startIndex = elStart + idx\n const endIndex = startIndex + marker.length\n baseIndex = position === 'before' ? startIndex : endIndex\n break\n }\n }\n if (baseIndex >= 0)\n break\n }\n if (baseIndex < 0)\n return { ok: true }\n\n const requests = []\n requests.push({ insertInlineImage: { location: { index: baseIndex }, uri } })\n requests.push({ replaceAllText: { containsText: { text: marker, matchCase: true }, replaceText: findText } })\n const res = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}:batchUpdate`, { method: 'POST', body: { requests } })\n return await res.json()\n}",
|
|
11417
11417
|
"scope": "write",
|
|
11418
11418
|
"toolset": "docs"
|
|
11419
11419
|
},
|
|
@@ -11437,7 +11437,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11437
11437
|
],
|
|
11438
11438
|
"additionalProperties": false
|
|
11439
11439
|
},
|
|
11440
|
-
"handlerCode": "async (input) => {\n const { documentId, findText } = input\n const marker = `__CMD_MARK_${Date.now()}__`\n const replaceRes = await integration.fetch(
|
|
11440
|
+
"handlerCode": "async (input) => {\n const { documentId, findText } = input\n const marker = `__CMD_MARK_${Date.now()}__`\n const replaceRes = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}:batchUpdate`, {\n method: 'POST',\n body: { requests: [{ replaceAllText: { containsText: { text: findText, matchCase: false }, replaceText: marker } }] },\n })\n await replaceRes.json()\n\n const getRes = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}`)\n const doc = await getRes.json()\n let startIndex = -1\n let endIndex = -1\n for (const el of (doc?.body?.content || [])) {\n const p = el.paragraph\n if (!p)\n continue\n for (const e of (p.elements || [])) {\n const t = e?.textRun?.content\n if (!t)\n continue\n const idx = t.indexOf(marker)\n if (idx >= 0) {\n const elStart = e.startIndex || 1\n startIndex = elStart + idx\n endIndex = startIndex + marker.length\n break\n }\n }\n if (startIndex >= 0)\n break\n }\n if (startIndex < 0) {\n const confirm = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}`)\n const got = await confirm.json()\n return { documentId: got?.documentId || documentId, applied: false, replies: [] }\n }\n\n const requests = []\n requests.push({ deleteContentRange: { range: { startIndex, endIndex } } })\n // also clean any remaining markers\n requests.push({ replaceAllText: { containsText: { text: marker, matchCase: true }, replaceText: '' } })\n const res = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}:batchUpdate`, { method: 'POST', body: { requests } })\n const out = await res.json()\n if (out?.documentId || Array.isArray(out?.replies))\n return { ...out, applied: true }\n const confirm = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}`)\n const got = await confirm.json()\n return { documentId: got?.documentId || documentId, applied: true, replies: Array.isArray(out?.replies) ? out.replies : [] }\n}",
|
|
11441
11441
|
"scope": "write",
|
|
11442
11442
|
"toolset": "docs"
|
|
11443
11443
|
},
|
|
@@ -11468,7 +11468,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11468
11468
|
],
|
|
11469
11469
|
"additionalProperties": false
|
|
11470
11470
|
},
|
|
11471
|
-
"handlerCode": "async (input) => {\n const { documentId, findText, paragraphStyle, fields } = input\n const marker = `__CMD_MARK_${Date.now()}__`\n const replaceRes = await integration.fetch(
|
|
11471
|
+
"handlerCode": "async (input) => {\n const { documentId, findText, paragraphStyle, fields } = input\n const marker = `__CMD_MARK_${Date.now()}__`\n const replaceRes = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}:batchUpdate`, {\n method: 'POST',\n body: { requests: [{ replaceAllText: { containsText: { text: findText, matchCase: false }, replaceText: marker } }] },\n })\n await replaceRes.json()\n\n const getRes = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}`)\n const doc = await getRes.json()\n let paragraphStart = -1\n let paragraphEnd = -1\n for (const el of (doc?.body?.content || [])) {\n const p = el.paragraph\n if (!p)\n continue\n for (const e of (p.elements || [])) {\n const t = e?.textRun?.content\n if (!t)\n continue\n const idx = t.indexOf(marker)\n if (idx >= 0) {\n paragraphStart = p.elements?.[0]?.startIndex || e.startIndex || 1\n paragraphEnd = (p.elements?.[p.elements.length - 1]?.endIndex) || (e.endIndex) || (paragraphStart + marker.length)\n break\n }\n }\n if (paragraphStart >= 0)\n break\n }\n if (paragraphStart < 0) {\n const confirm = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}`)\n const got = await confirm.json()\n return { documentId: got?.documentId || documentId, applied: false, replies: [] }\n }\n\n const requests = []\n requests.push({ updateParagraphStyle: { range: { startIndex: paragraphStart, endIndex: paragraphEnd }, paragraphStyle, fields: fields || Object.keys(paragraphStyle || {}).join(',') } })\n requests.push({ replaceAllText: { containsText: { text: marker, matchCase: true }, replaceText: findText } })\n const res = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}:batchUpdate`, { method: 'POST', body: { requests } })\n const out = await res.json()\n if (out?.documentId || Array.isArray(out?.replies))\n return { ...out, applied: true }\n const confirm = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}`)\n const got = await confirm.json()\n return { documentId: got?.documentId || documentId, applied: true, replies: Array.isArray(out?.replies) ? out.replies : [] }\n}",
|
|
11472
11472
|
"scope": "write",
|
|
11473
11473
|
"toolset": "docs"
|
|
11474
11474
|
},
|
|
@@ -11496,7 +11496,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11496
11496
|
],
|
|
11497
11497
|
"additionalProperties": false
|
|
11498
11498
|
},
|
|
11499
|
-
"handlerCode": "async (input) => {\n const { documentId, documentStyle, fields } = input\n const res = await integration.fetch(
|
|
11499
|
+
"handlerCode": "async (input) => {\n const { documentId, documentStyle, fields } = input\n const res = await integration.fetch(`https://docs.googleapis.com/v1/documents/${encodeURIComponent(documentId)}:batchUpdate`, {\n method: 'POST',\n body: { requests: [{ updateDocumentStyle: { documentStyle, fields: fields || Object.keys(documentStyle || {}).join(',') } }] },\n })\n return await res.json()\n}",
|
|
11500
11500
|
"scope": "write",
|
|
11501
11501
|
"toolset": "docs"
|
|
11502
11502
|
},
|
|
@@ -11532,7 +11532,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11532
11532
|
},
|
|
11533
11533
|
"additionalProperties": false
|
|
11534
11534
|
},
|
|
11535
|
-
"handlerCode": "async (input) => {\n const { spreadsheetId, includeGridData, ranges } = input\n const params = new URLSearchParams()\n if (includeGridData !== undefined)\n params.set('includeGridData', String(includeGridData))\n if (Array.isArray(ranges))\n ranges.forEach(r => params.append('ranges', String(r)))\n if (input.fields)\n params.set('fields', input.fields)\n const qs = params.toString()\n const path =
|
|
11535
|
+
"handlerCode": "async (input) => {\n const { spreadsheetId, includeGridData, ranges } = input\n const params = new URLSearchParams()\n if (includeGridData !== undefined)\n params.set('includeGridData', String(includeGridData))\n if (Array.isArray(ranges))\n ranges.forEach(r => params.append('ranges', String(r)))\n if (input.fields)\n params.set('fields', input.fields)\n const qs = params.toString()\n const path = `https://sheets.googleapis.com/v4/spreadsheets/${encodeURIComponent(spreadsheetId)}${qs ? `?${qs}` : ''}`\n const res = await integration.fetch(path)\n return await res.json()\n}",
|
|
11536
11536
|
"scope": "read",
|
|
11537
11537
|
"toolset": "sheets"
|
|
11538
11538
|
},
|
|
@@ -11573,7 +11573,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11573
11573
|
},
|
|
11574
11574
|
"additionalProperties": false
|
|
11575
11575
|
},
|
|
11576
|
-
"handlerCode": "async (input) => {\n const params = new URLSearchParams()\n const qParts = [`mimeType = 'application/vnd.google-apps.spreadsheet'`]\n if (input.query)\n qParts.push(input.query)\n if (input.name)\n qParts.push(`name contains '${input.name.replace(/\\\\/g, '\\\\\\\\').replace(/'/g, \"\\\\'\")}'`)\n if (!input.includeTrashed)\n qParts.push('trashed = false')\n if (qParts.length > 0)\n params.set('q', qParts.join(' and '))\n params.set('fields', input.fields || 'nextPageToken,files(id,name,mimeType,modifiedTime,size,parents)')\n params.set('pageSize', String(input.pageSize || 20))\n if (input.pageToken)\n params.set('pageToken', input.pageToken)\n const res = await integration.fetch(
|
|
11576
|
+
"handlerCode": "async (input) => {\n const params = new URLSearchParams()\n const qParts = [`mimeType = 'application/vnd.google-apps.spreadsheet'`]\n if (input.query)\n qParts.push(input.query)\n if (input.name)\n qParts.push(`name contains '${input.name.replace(/\\\\/g, '\\\\\\\\').replace(/'/g, \"\\\\'\")}'`)\n if (!input.includeTrashed)\n qParts.push('trashed = false')\n if (qParts.length > 0)\n params.set('q', qParts.join(' and '))\n params.set('fields', input.fields || 'nextPageToken,files(id,name,mimeType,modifiedTime,size,parents)')\n params.set('pageSize', String(input.pageSize || 20))\n if (input.pageToken)\n params.set('pageToken', input.pageToken)\n const res = await integration.fetch(`https://www.googleapis.com/drive/v3/files?${params.toString()}`)\n return await res.json()\n}",
|
|
11577
11577
|
"scope": "read",
|
|
11578
11578
|
"toolset": "sheets"
|
|
11579
11579
|
},
|
|
@@ -11607,7 +11607,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11607
11607
|
},
|
|
11608
11608
|
"additionalProperties": false
|
|
11609
11609
|
},
|
|
11610
|
-
"handlerCode": "async (input) => {\n const toColumnName = (index) => {\n let n = index + 1\n let out = ''\n while (n > 0) {\n const rem = (n - 1) % 26\n out = String.fromCharCode(65 + rem) + out\n n = Math.floor((n - 1) / 26)\n }\n return out\n }\n\n const columnNameToIndex = (name) => {\n let value = 0\n for (const ch of name.toUpperCase()) {\n const code = ch.charCodeAt(0)\n if (code < 65 || code > 90) continue\n value = value * 26 + (code - 64)\n }\n return Math.max(0, value - 1)\n }\n\n const parseResolvedRange = (resolvedRange) => {\n // Examples: \"Sheet1!A1:D5\", \"Sheet1!B:B\", \"Sheet1!2:9\"\n const a1 = String(resolvedRange || '').split('!')[1] || ''\n const [start = 'A1'] = a1.split(':')\n const letters = (start.match(/[A-Za-z]+/) || ['A'])[0]\n const rowDigits = (start.match(/\\d+/) || ['1'])[0]\n return {\n startColumn: columnNameToIndex(letters),\n startRow: Math.max(1, parseInt(rowDigits, 10) || 1),\n }\n }\n\n const escapeCell = (value) =>\n String(value ?? '')\n .replace(/\\|/g, '\\\\|')\n .replace(/\\r?\\n/g, '<br>')\n\n const spreadsheetId = input.spreadsheetId\n const range = input.range || 'A1:Z1000'\n const params = new URLSearchParams()\n if (input.valueRenderOption) params.set('valueRenderOption', input.valueRenderOption)\n\n const qs = params.toString()\n const path =
|
|
11610
|
+
"handlerCode": "async (input) => {\n const toColumnName = (index) => {\n let n = index + 1\n let out = ''\n while (n > 0) {\n const rem = (n - 1) % 26\n out = String.fromCharCode(65 + rem) + out\n n = Math.floor((n - 1) / 26)\n }\n return out\n }\n\n const columnNameToIndex = (name) => {\n let value = 0\n for (const ch of name.toUpperCase()) {\n const code = ch.charCodeAt(0)\n if (code < 65 || code > 90) continue\n value = value * 26 + (code - 64)\n }\n return Math.max(0, value - 1)\n }\n\n const parseResolvedRange = (resolvedRange) => {\n // Examples: \"Sheet1!A1:D5\", \"Sheet1!B:B\", \"Sheet1!2:9\"\n const a1 = String(resolvedRange || '').split('!')[1] || ''\n const [start = 'A1'] = a1.split(':')\n const letters = (start.match(/[A-Za-z]+/) || ['A'])[0]\n const rowDigits = (start.match(/\\d+/) || ['1'])[0]\n return {\n startColumn: columnNameToIndex(letters),\n startRow: Math.max(1, parseInt(rowDigits, 10) || 1),\n }\n }\n\n const escapeCell = (value) =>\n String(value ?? '')\n .replace(/\\|/g, '\\\\|')\n .replace(/\\r?\\n/g, '<br>')\n\n const spreadsheetId = input.spreadsheetId\n const range = input.range || 'A1:Z1000'\n const params = new URLSearchParams()\n if (input.valueRenderOption) params.set('valueRenderOption', input.valueRenderOption)\n\n const qs = params.toString()\n const path = `https://sheets.googleapis.com/v4/spreadsheets/${encodeURIComponent(spreadsheetId)}/values/${encodeURIComponent(range)}${qs ? `?${qs}` : ''}`\n const res = await integration.fetch(path)\n const payload = await res.json()\n\n const values = Array.isArray(payload?.values) ? payload.values : []\n const resolvedRange = payload?.range || range\n const { startColumn, startRow } = parseResolvedRange(resolvedRange)\n\n const width = Math.max(1, ...values.map((row) => (Array.isArray(row) ? row.length : 0)))\n const headerCells = Array.from({ length: width }, (_, i) => toColumnName(startColumn + i))\n const lines = [\n `| | ${headerCells.join(' | ')} |`,\n `|---|${Array(width).fill('---').join('|')}|`,\n ]\n\n for (let i = 0; i < values.length; i += 1) {\n const row = Array.isArray(values[i]) ? values[i] : []\n const padded = [...row, ...Array(width - row.length).fill('')]\n const escaped = padded.map((cell) => escapeCell(cell))\n lines.push(`| ${startRow + i} | ${escaped.join(' | ')} |`)\n }\n\n return {\n spreadsheetId,\n range: resolvedRange,\n rowCount: values.length,\n columnCount: width,\n markdown: lines.join('\\n'),\n }\n}",
|
|
11611
11611
|
"scope": "read",
|
|
11612
11612
|
"toolset": "sheets"
|
|
11613
11613
|
},
|
|
@@ -11643,7 +11643,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11643
11643
|
},
|
|
11644
11644
|
"additionalProperties": true
|
|
11645
11645
|
},
|
|
11646
|
-
"handlerCode": "async (input) => {\n const path =
|
|
11646
|
+
"handlerCode": "async (input) => {\n const path = 'https://sheets.googleapis.com/v4/spreadsheets'\n const res = await integration.fetch(path, { method: 'POST', body: input })\n return await res.json()\n}",
|
|
11647
11647
|
"scope": "write",
|
|
11648
11648
|
"toolset": "sheets"
|
|
11649
11649
|
},
|
|
@@ -11700,7 +11700,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11700
11700
|
},
|
|
11701
11701
|
"additionalProperties": false
|
|
11702
11702
|
},
|
|
11703
|
-
"handlerCode": "async (input) => {\n const { spreadsheetId, range, values, valueInputOption, includeValuesInResponse, responseValueRenderOption, responseDateTimeRenderOption } = input\n const params = new URLSearchParams()\n if (valueInputOption)\n params.set('valueInputOption', valueInputOption)\n if (includeValuesInResponse !== undefined)\n params.set('includeValuesInResponse', String(includeValuesInResponse))\n if (responseValueRenderOption)\n params.set('responseValueRenderOption', responseValueRenderOption)\n if (responseDateTimeRenderOption)\n params.set('responseDateTimeRenderOption', responseDateTimeRenderOption)\n const qs = params.toString()\n const path =
|
|
11703
|
+
"handlerCode": "async (input) => {\n const { spreadsheetId, range, values, valueInputOption, includeValuesInResponse, responseValueRenderOption, responseDateTimeRenderOption } = input\n const params = new URLSearchParams()\n if (valueInputOption)\n params.set('valueInputOption', valueInputOption)\n if (includeValuesInResponse !== undefined)\n params.set('includeValuesInResponse', String(includeValuesInResponse))\n if (responseValueRenderOption)\n params.set('responseValueRenderOption', responseValueRenderOption)\n if (responseDateTimeRenderOption)\n params.set('responseDateTimeRenderOption', responseDateTimeRenderOption)\n const qs = params.toString()\n const path = `https://sheets.googleapis.com/v4/spreadsheets/${encodeURIComponent(spreadsheetId)}/values/${encodeURIComponent(range)}${qs ? `?${qs}` : ''}`\n const res = await integration.fetch(path, { method: 'PUT', body: { values } })\n return await res.json()\n}",
|
|
11704
11704
|
"scope": "write",
|
|
11705
11705
|
"toolset": "sheets"
|
|
11706
11706
|
},
|
|
@@ -11764,7 +11764,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11764
11764
|
},
|
|
11765
11765
|
"additionalProperties": false
|
|
11766
11766
|
},
|
|
11767
|
-
"handlerCode": "async (input) => {\n const { spreadsheetId, range, values, valueInputOption, insertDataOption, includeValuesInResponse, responseValueRenderOption, responseDateTimeRenderOption } = input\n const params = new URLSearchParams()\n if (valueInputOption)\n params.set('valueInputOption', valueInputOption)\n if (insertDataOption)\n params.set('insertDataOption', insertDataOption)\n if (includeValuesInResponse !== undefined)\n params.set('includeValuesInResponse', String(includeValuesInResponse))\n if (responseValueRenderOption)\n params.set('responseValueRenderOption', responseValueRenderOption)\n if (responseDateTimeRenderOption)\n params.set('responseDateTimeRenderOption', responseDateTimeRenderOption)\n const qs = params.toString()\n const path =
|
|
11767
|
+
"handlerCode": "async (input) => {\n const { spreadsheetId, range, values, valueInputOption, insertDataOption, includeValuesInResponse, responseValueRenderOption, responseDateTimeRenderOption } = input\n const params = new URLSearchParams()\n if (valueInputOption)\n params.set('valueInputOption', valueInputOption)\n if (insertDataOption)\n params.set('insertDataOption', insertDataOption)\n if (includeValuesInResponse !== undefined)\n params.set('includeValuesInResponse', String(includeValuesInResponse))\n if (responseValueRenderOption)\n params.set('responseValueRenderOption', responseValueRenderOption)\n if (responseDateTimeRenderOption)\n params.set('responseDateTimeRenderOption', responseDateTimeRenderOption)\n const qs = params.toString()\n const path = `https://sheets.googleapis.com/v4/spreadsheets/${encodeURIComponent(spreadsheetId)}/values/${encodeURIComponent(range)}:append${qs ? `?${qs}` : ''}`\n const res = await integration.fetch(path, { method: 'POST', body: { values } })\n return await res.json()\n}",
|
|
11768
11768
|
"scope": "write",
|
|
11769
11769
|
"toolset": "sheets"
|
|
11770
11770
|
},
|
|
@@ -11839,7 +11839,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11839
11839
|
},
|
|
11840
11840
|
"additionalProperties": false
|
|
11841
11841
|
},
|
|
11842
|
-
"handlerCode": "async (input) => {\n const { spreadsheetId, data, valueInputOption, includeValuesInResponse, responseValueRenderOption, responseDateTimeRenderOption } = input\n const params = new URLSearchParams()\n if (valueInputOption)\n params.set('valueInputOption', valueInputOption)\n if (includeValuesInResponse !== undefined)\n params.set('includeValuesInResponse', String(includeValuesInResponse))\n if (responseValueRenderOption)\n params.set('responseValueRenderOption', responseValueRenderOption)\n if (responseDateTimeRenderOption)\n params.set('responseDateTimeRenderOption', responseDateTimeRenderOption)\n const qs = params.toString()\n const path =
|
|
11842
|
+
"handlerCode": "async (input) => {\n const { spreadsheetId, data, valueInputOption, includeValuesInResponse, responseValueRenderOption, responseDateTimeRenderOption } = input\n const params = new URLSearchParams()\n if (valueInputOption)\n params.set('valueInputOption', valueInputOption)\n if (includeValuesInResponse !== undefined)\n params.set('includeValuesInResponse', String(includeValuesInResponse))\n if (responseValueRenderOption)\n params.set('responseValueRenderOption', responseValueRenderOption)\n if (responseDateTimeRenderOption)\n params.set('responseDateTimeRenderOption', responseDateTimeRenderOption)\n const qs = params.toString()\n const path = `https://sheets.googleapis.com/v4/spreadsheets/${encodeURIComponent(spreadsheetId)}/values:batchUpdate${qs ? `?${qs}` : ''}`\n const res = await integration.fetch(path, { method: 'POST', body: { data } })\n return await res.json()\n}",
|
|
11843
11843
|
"scope": "write",
|
|
11844
11844
|
"toolset": "sheets"
|
|
11845
11845
|
},
|
|
@@ -11863,7 +11863,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11863
11863
|
},
|
|
11864
11864
|
"additionalProperties": false
|
|
11865
11865
|
},
|
|
11866
|
-
"handlerCode": "async (input) => {\n const { spreadsheetId, range } = input\n const path =
|
|
11866
|
+
"handlerCode": "async (input) => {\n const { spreadsheetId, range } = input\n const path = `https://sheets.googleapis.com/v4/spreadsheets/${encodeURIComponent(spreadsheetId)}/values/${encodeURIComponent(range)}:clear`\n const res = await integration.fetch(path, { method: 'POST', body: {} })\n return await res.json()\n}",
|
|
11867
11867
|
"scope": "write",
|
|
11868
11868
|
"toolset": "sheets"
|
|
11869
11869
|
},
|
|
@@ -11890,7 +11890,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11890
11890
|
},
|
|
11891
11891
|
"additionalProperties": false
|
|
11892
11892
|
},
|
|
11893
|
-
"handlerCode": "async (input) => {\n const { spreadsheetId, ranges } = input\n const path =
|
|
11893
|
+
"handlerCode": "async (input) => {\n const { spreadsheetId, ranges } = input\n const path = `https://sheets.googleapis.com/v4/spreadsheets/${encodeURIComponent(spreadsheetId)}/values:batchClear`\n const res = await integration.fetch(path, { method: 'POST', body: { ranges } })\n return await res.json()\n}",
|
|
11894
11894
|
"scope": "write",
|
|
11895
11895
|
"toolset": "sheets"
|
|
11896
11896
|
},
|
|
@@ -11929,7 +11929,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11929
11929
|
},
|
|
11930
11930
|
"additionalProperties": true
|
|
11931
11931
|
},
|
|
11932
|
-
"handlerCode": "async (input) => {\n const { spreadsheetId, requests, includeSpreadsheetInResponse, responseRanges, responseIncludeGridData } = input\n const params = new URLSearchParams()\n if (includeSpreadsheetInResponse !== undefined)\n params.set('includeSpreadsheetInResponse', String(includeSpreadsheetInResponse))\n if (Array.isArray(responseRanges))\n responseRanges.forEach(r => params.append('responseRanges', String(r)))\n if (responseIncludeGridData !== undefined)\n params.set('responseIncludeGridData', String(responseIncludeGridData))\n const qs = params.toString()\n const path =
|
|
11932
|
+
"handlerCode": "async (input) => {\n const { spreadsheetId, requests, includeSpreadsheetInResponse, responseRanges, responseIncludeGridData } = input\n const params = new URLSearchParams()\n if (includeSpreadsheetInResponse !== undefined)\n params.set('includeSpreadsheetInResponse', String(includeSpreadsheetInResponse))\n if (Array.isArray(responseRanges))\n responseRanges.forEach(r => params.append('responseRanges', String(r)))\n if (responseIncludeGridData !== undefined)\n params.set('responseIncludeGridData', String(responseIncludeGridData))\n const qs = params.toString()\n const path = `https://sheets.googleapis.com/v4/spreadsheets/${encodeURIComponent(spreadsheetId)}:batchUpdate${qs ? `?${qs}` : ''}`\n const res = await integration.fetch(path, { method: 'POST', body: { requests } })\n return await res.json()\n}",
|
|
11933
11933
|
"scope": "write",
|
|
11934
11934
|
"toolset": "sheets"
|
|
11935
11935
|
},
|
|
@@ -11960,7 +11960,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11960
11960
|
},
|
|
11961
11961
|
"additionalProperties": false
|
|
11962
11962
|
},
|
|
11963
|
-
"handlerCode": "async (input) => {\n const { spreadsheetId, sheetId, destinationSpreadsheetId } = input\n const path =
|
|
11963
|
+
"handlerCode": "async (input) => {\n const { spreadsheetId, sheetId, destinationSpreadsheetId } = input\n const path = `https://sheets.googleapis.com/v4/spreadsheets/${encodeURIComponent(spreadsheetId)}/sheets/${encodeURIComponent(sheetId)}:copyTo`\n const res = await integration.fetch(path, { method: 'POST', body: { destinationSpreadsheetId } })\n return await res.json()\n}",
|
|
11964
11964
|
"scope": "write",
|
|
11965
11965
|
"toolset": "sheets"
|
|
11966
11966
|
},
|
|
@@ -11981,7 +11981,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
11981
11981
|
},
|
|
11982
11982
|
"additionalProperties": false
|
|
11983
11983
|
},
|
|
11984
|
-
"handlerCode": "async (input) => {\n const extractSlideText = (slide) => {\n const lines = []\n for (const element of slide?.pageElements || []) {\n const textElements = element?.shape?.text?.textElements || []\n let combined = ''\n for (const t of textElements) {\n combined += t?.textRun?.content || ''\n }\n const trimmed = combined\n .split('\\n')\n .map((line) => line.trim())\n .filter(Boolean)\n lines.push(...trimmed)\n }\n return lines\n }\n\n const { presentationId } = input\n const path =
|
|
11984
|
+
"handlerCode": "async (input) => {\n const extractSlideText = (slide) => {\n const lines = []\n for (const element of slide?.pageElements || []) {\n const textElements = element?.shape?.text?.textElements || []\n let combined = ''\n for (const t of textElements) {\n combined += t?.textRun?.content || ''\n }\n const trimmed = combined\n .split('\\n')\n .map((line) => line.trim())\n .filter(Boolean)\n lines.push(...trimmed)\n }\n return lines\n }\n\n const { presentationId } = input\n const path = `https://slides.googleapis.com/v1/presentations/${encodeURIComponent(presentationId)}`\n const res = await integration.fetch(path)\n const presentation = await res.json()\n\n const title = presentation?.title || 'Untitled presentation'\n const deckId = presentation?.presentationId || presentationId\n const slides = presentation?.slides || []\n\n const lines = [\n `Presentation: \"${title}\" (ID: ${deckId})`,\n `URL: https://docs.google.com/presentation/d/${deckId}/edit`,\n `Total Slides: ${slides.length}`,\n '',\n ]\n\n for (let i = 0; i < slides.length; i += 1) {\n const slide = slides[i]\n const slideId = slide?.objectId || `slide_${i + 1}`\n const elementCount = (slide?.pageElements || []).length\n lines.push(`Slide ${i + 1}: ID ${slideId}, ${elementCount} element(s)`)\n\n const textLines = extractSlideText(slide)\n if (!textLines.length) {\n lines.push(' > (No text content)')\n } else {\n for (const text of textLines) lines.push(` > ${text}`)\n }\n lines.push('')\n }\n\n return lines.join('\\n').trim()\n}",
|
|
11985
11985
|
"scope": "read",
|
|
11986
11986
|
"toolset": "slides"
|
|
11987
11987
|
},
|
|
@@ -12022,7 +12022,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
12022
12022
|
},
|
|
12023
12023
|
"additionalProperties": false
|
|
12024
12024
|
},
|
|
12025
|
-
"handlerCode": "async (input) => {\n const params = new URLSearchParams()\n const qParts = [`mimeType = 'application/vnd.google-apps.presentation'`]\n if (input.query)\n qParts.push(input.query)\n if (input.name)\n qParts.push(`name contains '${input.name.replace(/\\\\/g, '\\\\\\\\').replace(/'/g, \"\\\\'\")}'`)\n if (!input.includeTrashed)\n qParts.push('trashed = false')\n if (qParts.length > 0)\n params.set('q', qParts.join(' and '))\n params.set('fields', input.fields || 'nextPageToken,files(id,name,mimeType,modifiedTime,size,parents)')\n params.set('pageSize', String(input.pageSize || 20))\n if (input.pageToken)\n params.set('pageToken', input.pageToken)\n const res = await integration.fetch(
|
|
12025
|
+
"handlerCode": "async (input) => {\n const params = new URLSearchParams()\n const qParts = [`mimeType = 'application/vnd.google-apps.presentation'`]\n if (input.query)\n qParts.push(input.query)\n if (input.name)\n qParts.push(`name contains '${input.name.replace(/\\\\/g, '\\\\\\\\').replace(/'/g, \"\\\\'\")}'`)\n if (!input.includeTrashed)\n qParts.push('trashed = false')\n if (qParts.length > 0)\n params.set('q', qParts.join(' and '))\n params.set('fields', input.fields || 'nextPageToken,files(id,name,mimeType,modifiedTime,size,parents)')\n params.set('pageSize', String(input.pageSize || 20))\n if (input.pageToken)\n params.set('pageToken', input.pageToken)\n const res = await integration.fetch(`https://www.googleapis.com/drive/v3/files?${params.toString()}`)\n return await res.json()\n}",
|
|
12026
12026
|
"scope": "read",
|
|
12027
12027
|
"toolset": "slides"
|
|
12028
12028
|
},
|
|
@@ -12066,7 +12066,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
12066
12066
|
},
|
|
12067
12067
|
"additionalProperties": false
|
|
12068
12068
|
},
|
|
12069
|
-
"handlerCode": "async (input) => {\n const { presentationId, pageObjectId } = input\n const params = new URLSearchParams()\n if (input['thumbnailProperties.thumbnailSize'])\n params.set('thumbnailProperties.thumbnailSize', String(input['thumbnailProperties.thumbnailSize']))\n if (input['thumbnailProperties.mimeType'])\n params.set('thumbnailProperties.mimeType', String(input['thumbnailProperties.mimeType']))\n const qs = params.toString()\n const path =
|
|
12069
|
+
"handlerCode": "async (input) => {\n const { presentationId, pageObjectId } = input\n const params = new URLSearchParams()\n if (input['thumbnailProperties.thumbnailSize'])\n params.set('thumbnailProperties.thumbnailSize', String(input['thumbnailProperties.thumbnailSize']))\n if (input['thumbnailProperties.mimeType'])\n params.set('thumbnailProperties.mimeType', String(input['thumbnailProperties.mimeType']))\n const qs = params.toString()\n const path = `https://slides.googleapis.com/v1/presentations/${encodeURIComponent(presentationId)}/pages/${encodeURIComponent(pageObjectId)}/thumbnail${qs ? `?${qs}` : ''}`\n const res = await integration.fetch(path)\n return await res.json()\n}",
|
|
12070
12070
|
"scope": "read",
|
|
12071
12071
|
"toolset": "slides"
|
|
12072
12072
|
},
|
|
@@ -12084,7 +12084,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
12084
12084
|
},
|
|
12085
12085
|
"additionalProperties": false
|
|
12086
12086
|
},
|
|
12087
|
-
"handlerCode": "async (input) => {\n const body = {}\n if (input && typeof input.title === 'string') {\n body.title = input.title\n }\n const res = await integration.fetch('/presentations', { method: 'POST', body })\n return await res.json()\n}",
|
|
12087
|
+
"handlerCode": "async (input) => {\n const body = {}\n if (input && typeof input.title === 'string') {\n body.title = input.title\n }\n const res = await integration.fetch('https://slides.googleapis.com/v1/presentations', { method: 'POST', body })\n return await res.json()\n}",
|
|
12088
12088
|
"scope": "write",
|
|
12089
12089
|
"toolset": "slides"
|
|
12090
12090
|
},
|
|
@@ -12126,7 +12126,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
12126
12126
|
},
|
|
12127
12127
|
"additionalProperties": false
|
|
12128
12128
|
},
|
|
12129
|
-
"handlerCode": "async (input) => {\n const { presentationId, requests, includePresentationInResponse, responsePageObjectIds, writeControl } = input\n const params = new URLSearchParams()\n if (includePresentationInResponse !== undefined)\n params.set('includePresentationInResponse', String(includePresentationInResponse))\n if (Array.isArray(responsePageObjectIds))\n responsePageObjectIds.forEach(id => params.append('responsePageObjectIds', String(id)))\n const qs = params.toString()\n const path =
|
|
12129
|
+
"handlerCode": "async (input) => {\n const { presentationId, requests, includePresentationInResponse, responsePageObjectIds, writeControl } = input\n const params = new URLSearchParams()\n if (includePresentationInResponse !== undefined)\n params.set('includePresentationInResponse', String(includePresentationInResponse))\n if (Array.isArray(responsePageObjectIds))\n responsePageObjectIds.forEach(id => params.append('responsePageObjectIds', String(id)))\n const qs = params.toString()\n const path = `https://slides.googleapis.com/v1/presentations/${encodeURIComponent(presentationId)}:batchUpdate${qs ? `?${qs}` : ''}`\n const body = { requests }\n if (writeControl)\n body.writeControl = writeControl\n const res = await integration.fetch(path, { method: 'POST', body })\n return await res.json()\n}",
|
|
12130
12130
|
"scope": "write",
|
|
12131
12131
|
"toolset": "slides"
|
|
12132
12132
|
},
|
|
@@ -12155,7 +12155,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
12155
12155
|
],
|
|
12156
12156
|
"additionalProperties": false
|
|
12157
12157
|
},
|
|
12158
|
-
"handlerCode": "async (input) => {\n const { presentationId, text, slideIndex = 0 } = input\n const presRes = await integration.fetch(
|
|
12158
|
+
"handlerCode": "async (input) => {\n const { presentationId, text, slideIndex = 0 } = input\n const presRes = await integration.fetch(`https://slides.googleapis.com/v1/presentations/${encodeURIComponent(presentationId)}`)\n const pres = await presRes.json()\n const slide = (pres?.slides || [])[slideIndex]\n if (!slide)\n return { presentationId, applied: false, replies: [] }\n const titleShape = (slide.pageElements || []).find(el => el.shape?.placeholder?.type === 'TITLE')\n if (!titleShape?.objectId)\n return { presentationId, applied: false, replies: [] }\n const res = await integration.fetch(`https://slides.googleapis.com/v1/presentations/${encodeURIComponent(presentationId)}:batchUpdate`, {\n method: 'POST',\n body: { requests: [{ insertText: { objectId: titleShape.objectId, insertionIndex: -1, text } }] },\n })\n const out = await res.json()\n return out?.presentationId ? { ...out, applied: true } : { presentationId, applied: true, replies: out?.replies || [] }\n}",
|
|
12159
12159
|
"scope": "write",
|
|
12160
12160
|
"toolset": "slides"
|
|
12161
12161
|
},
|
|
@@ -12186,7 +12186,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
12186
12186
|
],
|
|
12187
12187
|
"additionalProperties": false
|
|
12188
12188
|
},
|
|
12189
|
-
"handlerCode": "async (input) => {\n const { presentationId, findText, replaceText, matchCase } = input\n const res = await integration.fetch(
|
|
12189
|
+
"handlerCode": "async (input) => {\n const { presentationId, findText, replaceText, matchCase } = input\n const res = await integration.fetch(`https://slides.googleapis.com/v1/presentations/${encodeURIComponent(presentationId)}:batchUpdate`, {\n method: 'POST',\n body: { requests: [{ replaceAllText: { containsText: { text: findText, matchCase: Boolean(matchCase) }, replaceText } }] },\n })\n const out = await res.json()\n return out?.presentationId ? { ...out, applied: true } : { presentationId, applied: true, replies: out?.replies || [] }\n}",
|
|
12190
12190
|
"scope": "write",
|
|
12191
12191
|
"toolset": "slides"
|
|
12192
12192
|
},
|
|
@@ -12217,7 +12217,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
12217
12217
|
],
|
|
12218
12218
|
"additionalProperties": false
|
|
12219
12219
|
},
|
|
12220
|
-
"handlerCode": "async (input) => {\n const { presentationId, findText, textStyle, fields } = input\n // Replace first match with a marker to derive objectId/range\n const marker = `__CMD_MARK_${Date.now()}__`\n const rep = await integration.fetch(
|
|
12220
|
+
"handlerCode": "async (input) => {\n const { presentationId, findText, textStyle, fields } = input\n // Replace first match with a marker to derive objectId/range\n const marker = `__CMD_MARK_${Date.now()}__`\n const rep = await integration.fetch(`https://slides.googleapis.com/v1/presentations/${encodeURIComponent(presentationId)}:batchUpdate`, {\n method: 'POST',\n body: { requests: [{ replaceAllText: { containsText: { text: findText, matchCase: false }, replaceText: marker } }] },\n })\n await rep.json()\n // Scan pages for marker and apply style to that range on the text element\n const presRes = await integration.fetch(`https://slides.googleapis.com/v1/presentations/${encodeURIComponent(presentationId)}`)\n const pres = await presRes.json()\n let targetObjectId = null\n let startIndex = -1\n let endIndex = -1\n for (const slide of (pres?.slides || [])) {\n for (const el of (slide.pageElements || [])) {\n const text = el.shape?.text\n if (!text)\n continue\n for (const pe of (text.textElements || [])) {\n const t = pe.textRun?.content\n if (!t)\n continue\n const idx = t.indexOf(marker)\n if (idx >= 0) {\n targetObjectId = el.objectId\n startIndex = (pe.startIndex || 0) + idx\n endIndex = startIndex + marker.length\n break\n }\n }\n if (targetObjectId)\n break\n }\n if (targetObjectId)\n break\n }\n if (!targetObjectId)\n return { presentationId, applied: false, replies: [] }\n const requests = [\n { updateTextStyle: { objectId: targetObjectId, style: textStyle, textRange: { type: 'FIXED_RANGE', startIndex, endIndex }, fields: fields || Object.keys(textStyle || {}).join(',') } },\n { replaceAllText: { containsText: { text: marker, matchCase: true }, replaceText: findText } },\n ]\n const res = await integration.fetch(`https://slides.googleapis.com/v1/presentations/${encodeURIComponent(presentationId)}:batchUpdate`, { method: 'POST', body: { requests } })\n const out = await res.json()\n return out?.presentationId ? { ...out, applied: true } : { presentationId, applied: true, replies: out?.replies || [] }\n}",
|
|
12221
12221
|
"scope": "write",
|
|
12222
12222
|
"toolset": "slides"
|
|
12223
12223
|
},
|
|
@@ -12253,7 +12253,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
12253
12253
|
],
|
|
12254
12254
|
"additionalProperties": false
|
|
12255
12255
|
},
|
|
12256
|
-
"handlerCode": "async (input) => {\n const { presentationId, findText, shapeType = 'RECTANGLE', width = 2000000, height = 1000000 } = input\n const presRes = await integration.fetch(
|
|
12256
|
+
"handlerCode": "async (input) => {\n const { presentationId, findText, shapeType = 'RECTANGLE', width = 2000000, height = 1000000 } = input\n const presRes = await integration.fetch(`https://slides.googleapis.com/v1/presentations/${encodeURIComponent(presentationId)}`)\n const pres = await presRes.json()\n // Find slide with first text match\n let targetSlideId = null\n for (const slide of (pres?.slides || [])) {\n const text = JSON.stringify(slide)\n if (text && text.includes(findText)) { targetSlideId = slide.objectId; break }\n }\n if (!targetSlideId)\n return { presentationId, applied: false, replies: [] }\n // Insert a shape at a default position near center\n const elementId = `shape_${Date.now()}`\n const requests = [\n { createShape: { objectId: elementId, shapeType, elementProperties: { pageObjectId: targetSlideId, size: { width: { magnitude: width, unit: 'EMU' }, height: { magnitude: height, unit: 'EMU' } }, transform: { scaleX: 1, scaleY: 1, translateX: 1000000, translateY: 1000000, unit: 'EMU' } } } },\n ]\n const res = await integration.fetch(`https://slides.googleapis.com/v1/presentations/${encodeURIComponent(presentationId)}:batchUpdate`, { method: 'POST', body: { requests } })\n const out = await res.json()\n return out?.presentationId ? { ...out, applied: true } : { presentationId, applied: true, replies: out?.replies || [] }\n}",
|
|
12257
12257
|
"scope": "write",
|
|
12258
12258
|
"toolset": "slides"
|
|
12259
12259
|
},
|
|
@@ -12289,7 +12289,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
12289
12289
|
],
|
|
12290
12290
|
"additionalProperties": false
|
|
12291
12291
|
},
|
|
12292
|
-
"handlerCode": "async (input) => {\n const { presentationId, findText, uri, width = 2000000, height = 2000000 } = input\n const presRes = await integration.fetch(
|
|
12292
|
+
"handlerCode": "async (input) => {\n const { presentationId, findText, uri, width = 2000000, height = 2000000 } = input\n const presRes = await integration.fetch(`https://slides.googleapis.com/v1/presentations/${encodeURIComponent(presentationId)}`)\n const pres = await presRes.json()\n let targetSlideId = null\n for (const slide of (pres?.slides || [])) {\n const text = JSON.stringify(slide)\n if (text && text.includes(findText)) { targetSlideId = slide.objectId; break }\n }\n if (!targetSlideId)\n return { presentationId, applied: false, replies: [] }\n const elementId = `image_${Date.now()}`\n const requests = [\n { createImage: { objectId: elementId, url: uri, elementProperties: { pageObjectId: targetSlideId, size: { width: { magnitude: width, unit: 'EMU' }, height: { magnitude: height, unit: 'EMU' } }, transform: { scaleX: 1, scaleY: 1, translateX: 1000000, translateY: 1000000, unit: 'EMU' } } } },\n ]\n const res = await integration.fetch(`https://slides.googleapis.com/v1/presentations/${encodeURIComponent(presentationId)}:batchUpdate`, { method: 'POST', body: { requests } })\n const out = await res.json()\n return out?.presentationId ? { ...out, applied: true } : { presentationId, applied: true, replies: out?.replies || [] }\n}",
|
|
12293
12293
|
"scope": "write",
|
|
12294
12294
|
"toolset": "slides"
|
|
12295
12295
|
},
|
|
@@ -12317,7 +12317,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
12317
12317
|
],
|
|
12318
12318
|
"additionalProperties": false
|
|
12319
12319
|
},
|
|
12320
|
-
"handlerCode": "async (input) => {\n const { presentationId, findText, layout = 'BLANK' } = input\n const presRes = await integration.fetch(
|
|
12320
|
+
"handlerCode": "async (input) => {\n const { presentationId, findText, layout = 'BLANK' } = input\n const presRes = await integration.fetch(`https://slides.googleapis.com/v1/presentations/${encodeURIComponent(presentationId)}`)\n const pres = await presRes.json()\n let targetSlideId = null\n for (const slide of (pres?.slides || [])) {\n const text = JSON.stringify(slide)\n if (text && text.includes(findText)) { targetSlideId = slide.objectId; break }\n }\n if (!targetSlideId)\n return { presentationId, applied: false, replies: [] }\n const newSlideId = `slide_${Date.now()}`\n const currentIndex = (pres?.slides || []).findIndex(s => s.objectId === targetSlideId)\n const requests = [\n { createSlide: { objectId: newSlideId, insertionIndex: currentIndex >= 0 ? currentIndex + 1 : (pres?.slides?.length || 0), slideLayoutReference: { predefinedLayout: layout } } },\n ]\n const res = await integration.fetch(`https://slides.googleapis.com/v1/presentations/${encodeURIComponent(presentationId)}:batchUpdate`, { method: 'POST', body: { requests } })\n const out = await res.json()\n return out?.presentationId ? { ...out, applied: true } : { presentationId, applied: true, replies: out?.replies || [] }\n}",
|
|
12321
12321
|
"scope": "write",
|
|
12322
12322
|
"toolset": "slides"
|
|
12323
12323
|
},
|
|
@@ -12362,7 +12362,7 @@ const GENERATED_INTEGRATIONS = {
|
|
|
12362
12362
|
],
|
|
12363
12363
|
"additionalProperties": false
|
|
12364
12364
|
},
|
|
12365
|
-
"handlerCode": "async (input) => {\n const { presentationId, slideIndex, rgbColor } = input\n const presRes = await integration.fetch(
|
|
12365
|
+
"handlerCode": "async (input) => {\n const { presentationId, slideIndex, rgbColor } = input\n const presRes = await integration.fetch(`https://slides.googleapis.com/v1/presentations/${encodeURIComponent(presentationId)}`)\n const pres = await presRes.json()\n const slide = (pres?.slides || [])[slideIndex]\n if (!slide?.objectId)\n return { presentationId, applied: false, replies: [] }\n const color = { color: { rgbColor } }\n const res = await integration.fetch(`https://slides.googleapis.com/v1/presentations/${encodeURIComponent(presentationId)}:batchUpdate`, {\n method: 'POST',\n body: { requests: [{ updatePageProperties: { objectId: slide.objectId, pageProperties: { pageBackgroundFill: { solidFill: color } }, fields: 'pageBackgroundFill.solidFill.color' } }] },\n })\n const out = await res.json()\n return out?.presentationId ? { ...out, applied: true } : { presentationId, applied: true, replies: out?.replies || [] }\n}",
|
|
12366
12366
|
"scope": "write",
|
|
12367
12367
|
"toolset": "slides"
|
|
12368
12368
|
}
|
|
@@ -18709,306 +18709,2623 @@ const GENERATED_INTEGRATIONS = {
|
|
|
18709
18709
|
],
|
|
18710
18710
|
"variantOwnerType": "trello"
|
|
18711
18711
|
},
|
|
18712
|
-
"
|
|
18712
|
+
"wise": {
|
|
18713
18713
|
"manifest": {
|
|
18714
|
-
"name": "
|
|
18714
|
+
"name": "wise",
|
|
18715
18715
|
"version": "0.1.0",
|
|
18716
|
-
"baseUrl": "https://api.
|
|
18716
|
+
"baseUrl": "https://api.wise.com",
|
|
18717
18717
|
"toolsets": {
|
|
18718
|
-
"
|
|
18719
|
-
"label": "
|
|
18720
|
-
"description": "
|
|
18718
|
+
"send_money": {
|
|
18719
|
+
"label": "Send Money",
|
|
18720
|
+
"description": "Prepare Wise money transfers by creating quotes, recipients, and transfer orders for the user to fund in Wise"
|
|
18721
18721
|
},
|
|
18722
|
-
"
|
|
18723
|
-
"label": "
|
|
18724
|
-
"description": "Read
|
|
18722
|
+
"balances": {
|
|
18723
|
+
"label": "Balances",
|
|
18724
|
+
"description": "Read and manage Wise multi-currency balances and balance movements"
|
|
18725
|
+
},
|
|
18726
|
+
"receive_money": {
|
|
18727
|
+
"label": "Receive Money",
|
|
18728
|
+
"description": "Read and order Wise account details for receiving local or international payments"
|
|
18725
18729
|
}
|
|
18726
18730
|
},
|
|
18727
18731
|
"tools": [
|
|
18728
18732
|
{
|
|
18729
|
-
"name": "
|
|
18730
|
-
"description": "List
|
|
18733
|
+
"name": "list_profiles",
|
|
18734
|
+
"description": "List Wise profiles available to the personal API token. Use this first to choose the personal or business profileId required by most other tools.",
|
|
18731
18735
|
"inputSchema": "schemas/empty.json",
|
|
18732
|
-
"handler": "handlers/
|
|
18733
|
-
"scope": "read"
|
|
18734
|
-
},
|
|
18735
|
-
{
|
|
18736
|
-
"name": "get_organisation",
|
|
18737
|
-
"description": "Get the connected Xero organisation profile and settings. For public OAuth, provide tenantId from list_connections; for Custom Connections omit tenantId.",
|
|
18738
|
-
"inputSchema": "schemas/tenant_optional.json",
|
|
18739
|
-
"handler": "handlers/get_organisation.js",
|
|
18740
|
-
"scope": "read"
|
|
18741
|
-
},
|
|
18742
|
-
{
|
|
18743
|
-
"name": "list_accounts",
|
|
18744
|
-
"description": "List chart of accounts with account IDs, codes, names, types, status, and tax type. Use this before creating payments, bank transactions, or journals.",
|
|
18745
|
-
"inputSchema": "schemas/list_accounts.json",
|
|
18746
|
-
"handler": "handlers/list_accounts.js",
|
|
18747
|
-
"scope": "read"
|
|
18748
|
-
},
|
|
18749
|
-
{
|
|
18750
|
-
"name": "list_tax_rates",
|
|
18751
|
-
"description": "List tax rates available in the connected organisation. Use this to discover valid tax type values for invoice, item, and bank transaction lines.",
|
|
18752
|
-
"inputSchema": "schemas/tenant_optional.json",
|
|
18753
|
-
"handler": "handlers/list_tax_rates.js",
|
|
18736
|
+
"handler": "handlers/list_profiles.js",
|
|
18754
18737
|
"scope": "read"
|
|
18755
18738
|
},
|
|
18756
18739
|
{
|
|
18757
|
-
"name": "
|
|
18758
|
-
"description": "
|
|
18759
|
-
"inputSchema": "schemas/
|
|
18760
|
-
"handler": "handlers/
|
|
18740
|
+
"name": "get_exchange_rate",
|
|
18741
|
+
"description": "Get the current Wise exchange rate for a currency pair. Use this for quick rate checks; use create_quote when you need fees, delivery estimates, or a locked rate for a transfer.",
|
|
18742
|
+
"inputSchema": "schemas/exchange_rate.json",
|
|
18743
|
+
"handler": "handlers/get_exchange_rate.js",
|
|
18761
18744
|
"scope": "read"
|
|
18762
18745
|
},
|
|
18763
18746
|
{
|
|
18764
|
-
"name": "
|
|
18765
|
-
"description": "
|
|
18766
|
-
"inputSchema": "schemas/
|
|
18767
|
-
"handler": "handlers/
|
|
18768
|
-
"scope": "read",
|
|
18769
|
-
"toolset": "accounting"
|
|
18770
|
-
},
|
|
18771
|
-
{
|
|
18772
|
-
"name": "create_tracking_category",
|
|
18773
|
-
"description": "Create a tracking category. Use list_tracking_categories first to avoid duplicates.",
|
|
18774
|
-
"inputSchema": "schemas/tracking_category_write.json",
|
|
18775
|
-
"handler": "handlers/create_tracking_category.js",
|
|
18776
|
-
"scope": "write",
|
|
18777
|
-
"toolset": "accounting"
|
|
18778
|
-
},
|
|
18779
|
-
{
|
|
18780
|
-
"name": "create_tracking_options",
|
|
18781
|
-
"description": "Create up to 10 tracking options in a tracking category. Get trackingCategoryId from list_tracking_categories.",
|
|
18782
|
-
"inputSchema": "schemas/tracking_options_write.json",
|
|
18783
|
-
"handler": "handlers/create_tracking_options.js",
|
|
18747
|
+
"name": "create_quote",
|
|
18748
|
+
"description": "Create an authenticated Wise quote for a profile. Provide source/target currencies and either sourceAmount or targetAmount. The rate is locked for about 30 minutes and the quoteId is used by create_transfer.",
|
|
18749
|
+
"inputSchema": "schemas/quote_create.json",
|
|
18750
|
+
"handler": "handlers/create_quote.js",
|
|
18784
18751
|
"scope": "write",
|
|
18785
|
-
"toolset": "
|
|
18752
|
+
"toolset": "send_money"
|
|
18786
18753
|
},
|
|
18787
18754
|
{
|
|
18788
|
-
"name": "
|
|
18789
|
-
"description": "
|
|
18790
|
-
"inputSchema": "schemas/
|
|
18791
|
-
"handler": "handlers/
|
|
18792
|
-
"scope": "
|
|
18793
|
-
"toolset": "
|
|
18755
|
+
"name": "get_quote",
|
|
18756
|
+
"description": "Get a Wise quote by quoteId for a profile, including rate, fees, delivery estimates, and pay-in/pay-out options.",
|
|
18757
|
+
"inputSchema": "schemas/quote_id.json",
|
|
18758
|
+
"handler": "handlers/get_quote.js",
|
|
18759
|
+
"scope": "read",
|
|
18760
|
+
"toolset": "send_money"
|
|
18794
18761
|
},
|
|
18795
18762
|
{
|
|
18796
|
-
"name": "
|
|
18797
|
-
"description": "
|
|
18798
|
-
"inputSchema": "schemas/
|
|
18799
|
-
"handler": "handlers/
|
|
18763
|
+
"name": "update_quote",
|
|
18764
|
+
"description": "Update a Wise quote, usually to attach targetAccount after creating or selecting a recipient. Use get_recipient or create_recipient_simple first to get targetAccount.",
|
|
18765
|
+
"inputSchema": "schemas/quote_update.json",
|
|
18766
|
+
"handler": "handlers/update_quote.js",
|
|
18800
18767
|
"scope": "write",
|
|
18801
|
-
"toolset": "
|
|
18802
|
-
},
|
|
18803
|
-
{
|
|
18804
|
-
"name": "list_currencies",
|
|
18805
|
-
"description": "List currencies configured in the connected Xero organisation.",
|
|
18806
|
-
"inputSchema": "schemas/tenant_optional.json",
|
|
18807
|
-
"handler": "handlers/list_currencies.js",
|
|
18808
|
-
"scope": "read"
|
|
18768
|
+
"toolset": "send_money"
|
|
18809
18769
|
},
|
|
18810
18770
|
{
|
|
18811
|
-
"name": "
|
|
18812
|
-
"description": "List
|
|
18813
|
-
"inputSchema": "schemas/
|
|
18814
|
-
"handler": "handlers/
|
|
18771
|
+
"name": "list_recipients",
|
|
18772
|
+
"description": "List Wise recipient accounts with compact identity, currency, and account-summary fields. Filter by profileId and currency when possible; use get_recipient for full details.",
|
|
18773
|
+
"inputSchema": "schemas/recipient_list.json",
|
|
18774
|
+
"handler": "handlers/list_recipients.js",
|
|
18815
18775
|
"scope": "read",
|
|
18816
|
-
"toolset": "
|
|
18776
|
+
"toolset": "send_money"
|
|
18817
18777
|
},
|
|
18818
18778
|
{
|
|
18819
|
-
"name": "
|
|
18820
|
-
"description": "Get a
|
|
18821
|
-
"inputSchema": "schemas/
|
|
18822
|
-
"handler": "handlers/
|
|
18779
|
+
"name": "get_recipient",
|
|
18780
|
+
"description": "Get full details for a Wise recipient account by recipientId. Use this before creating a transfer when you need to confirm bank details or ownership.",
|
|
18781
|
+
"inputSchema": "schemas/recipient_id.json",
|
|
18782
|
+
"handler": "handlers/get_recipient.js",
|
|
18823
18783
|
"scope": "read",
|
|
18824
|
-
"toolset": "
|
|
18825
|
-
},
|
|
18826
|
-
{
|
|
18827
|
-
"name": "create_contact",
|
|
18828
|
-
"description": "Create a contact from flat fields. Use extraFields only for advanced Xero fields; returns a compact summary and Xero link when available.",
|
|
18829
|
-
"inputSchema": "schemas/contact_write.json",
|
|
18830
|
-
"handler": "handlers/create_contact.js",
|
|
18831
|
-
"scope": "write",
|
|
18832
|
-
"toolset": "accounting"
|
|
18833
|
-
},
|
|
18834
|
-
{
|
|
18835
|
-
"name": "update_contact",
|
|
18836
|
-
"description": "Update a contact by contactId. Provide only fields to change; use get_contact first when preserving existing values matters.",
|
|
18837
|
-
"inputSchema": "schemas/contact_write.json",
|
|
18838
|
-
"handler": "handlers/update_contact.js",
|
|
18839
|
-
"scope": "write",
|
|
18840
|
-
"toolset": "accounting"
|
|
18784
|
+
"toolset": "send_money"
|
|
18841
18785
|
},
|
|
18842
18786
|
{
|
|
18843
|
-
"name": "
|
|
18844
|
-
"description": "
|
|
18845
|
-
"inputSchema": "schemas/
|
|
18846
|
-
"handler": "handlers/
|
|
18787
|
+
"name": "get_recipient_requirements",
|
|
18788
|
+
"description": "Get Wise's dynamic recipient-account requirements for a quote. Use this when create_recipient_simple needs uncommon banking fields for a country/currency route.",
|
|
18789
|
+
"inputSchema": "schemas/recipient_requirements.json",
|
|
18790
|
+
"handler": "handlers/get_recipient_requirements.js",
|
|
18847
18791
|
"scope": "read",
|
|
18848
|
-
"toolset": "
|
|
18792
|
+
"toolset": "send_money"
|
|
18849
18793
|
},
|
|
18850
18794
|
{
|
|
18851
|
-
"name": "
|
|
18852
|
-
"description": "
|
|
18853
|
-
"inputSchema": "schemas/
|
|
18854
|
-
"handler": "handlers/
|
|
18855
|
-
"scope": "
|
|
18856
|
-
"toolset": "
|
|
18795
|
+
"name": "create_recipient_simple",
|
|
18796
|
+
"description": "Create a Wise recipient from flat common banking fields such as IBAN, BIC/SWIFT, sort code, account number, routing number, email, or phone. Use extraFields for uncommon fields returned by get_recipient_requirements.",
|
|
18797
|
+
"inputSchema": "schemas/recipient_create.json",
|
|
18798
|
+
"handler": "handlers/create_recipient_simple.js",
|
|
18799
|
+
"scope": "write",
|
|
18800
|
+
"toolset": "send_money"
|
|
18857
18801
|
},
|
|
18858
18802
|
{
|
|
18859
|
-
"name": "
|
|
18860
|
-
"description": "
|
|
18861
|
-
"inputSchema": "schemas/
|
|
18862
|
-
"handler": "handlers/
|
|
18803
|
+
"name": "deactivate_recipient",
|
|
18804
|
+
"description": "Deactivate a Wise recipient account by recipientId. This removes it from active recipient lists but does not affect historical transfers.",
|
|
18805
|
+
"inputSchema": "schemas/recipient_id.json",
|
|
18806
|
+
"handler": "handlers/deactivate_recipient.js",
|
|
18863
18807
|
"scope": "write",
|
|
18864
|
-
"toolset": "
|
|
18808
|
+
"toolset": "send_money"
|
|
18865
18809
|
},
|
|
18866
18810
|
{
|
|
18867
|
-
"name": "
|
|
18868
|
-
"description": "
|
|
18869
|
-
"inputSchema": "schemas/
|
|
18870
|
-
"handler": "handlers/
|
|
18811
|
+
"name": "create_transfer",
|
|
18812
|
+
"description": "Create a Wise transfer order from a quoteId and targetAccountId. This does not send money; it prepares a transfer for the user to fund in Wise within 14 days.",
|
|
18813
|
+
"inputSchema": "schemas/transfer_create.json",
|
|
18814
|
+
"handler": "handlers/create_transfer.js",
|
|
18871
18815
|
"scope": "write",
|
|
18872
|
-
"toolset": "
|
|
18816
|
+
"toolset": "send_money"
|
|
18873
18817
|
},
|
|
18874
18818
|
{
|
|
18875
|
-
"name": "
|
|
18876
|
-
"description": "
|
|
18877
|
-
"inputSchema": "schemas/
|
|
18878
|
-
"handler": "handlers/
|
|
18819
|
+
"name": "get_transfer",
|
|
18820
|
+
"description": "Get Wise transfer status and tracking details by transferId. Use this to check whether a prepared or funded transfer is waiting, processing, completed, cancelled, or failed.",
|
|
18821
|
+
"inputSchema": "schemas/transfer_id.json",
|
|
18822
|
+
"handler": "handlers/get_transfer.js",
|
|
18879
18823
|
"scope": "read",
|
|
18880
|
-
"toolset": "
|
|
18824
|
+
"toolset": "send_money"
|
|
18881
18825
|
},
|
|
18882
18826
|
{
|
|
18883
|
-
"name": "
|
|
18884
|
-
"description": "
|
|
18885
|
-
"inputSchema": "schemas/
|
|
18886
|
-
"handler": "handlers/
|
|
18827
|
+
"name": "list_transfers",
|
|
18828
|
+
"description": "List Wise transfers with compact status, amount, currency, recipient, and date fields. Filter by profileId, status, currency, or date range when possible.",
|
|
18829
|
+
"inputSchema": "schemas/transfer_list.json",
|
|
18830
|
+
"handler": "handlers/list_transfers.js",
|
|
18887
18831
|
"scope": "read",
|
|
18888
|
-
"toolset": "
|
|
18889
|
-
},
|
|
18890
|
-
{
|
|
18891
|
-
"name": "create_invoice",
|
|
18892
|
-
"description": "Create an invoice or bill from flat fields. Get contactId from list_contacts, accountCode from list_accounts, taxType from list_tax_rates, and tracking from list_tracking_categories. Returns a compact summary and Xero link.",
|
|
18893
|
-
"inputSchema": "schemas/invoice_write.json",
|
|
18894
|
-
"handler": "handlers/create_invoice.js",
|
|
18895
|
-
"scope": "write",
|
|
18896
|
-
"toolset": "accounting"
|
|
18832
|
+
"toolset": "send_money"
|
|
18897
18833
|
},
|
|
18898
18834
|
{
|
|
18899
|
-
"name": "
|
|
18900
|
-
"description": "
|
|
18901
|
-
"inputSchema": "schemas/
|
|
18902
|
-
"handler": "handlers/
|
|
18835
|
+
"name": "cancel_transfer",
|
|
18836
|
+
"description": "Cancel a Wise transfer that is still in a cancellable state. Use get_transfer first to confirm the current status.",
|
|
18837
|
+
"inputSchema": "schemas/transfer_id.json",
|
|
18838
|
+
"handler": "handlers/cancel_transfer.js",
|
|
18903
18839
|
"scope": "write",
|
|
18904
|
-
"toolset": "
|
|
18905
|
-
},
|
|
18906
|
-
{
|
|
18907
|
-
"name": "list_credit_notes",
|
|
18908
|
-
"description": "List credit notes with compact status, contact, date, total, and remaining credit fields.",
|
|
18909
|
-
"inputSchema": "schemas/list_records.json",
|
|
18910
|
-
"handler": "handlers/list_credit_notes.js",
|
|
18911
|
-
"scope": "read",
|
|
18912
|
-
"toolset": "accounting"
|
|
18840
|
+
"toolset": "send_money"
|
|
18913
18841
|
},
|
|
18914
18842
|
{
|
|
18915
|
-
"name": "
|
|
18916
|
-
"description": "
|
|
18917
|
-
"inputSchema": "schemas/
|
|
18918
|
-
"handler": "handlers/
|
|
18843
|
+
"name": "send_money",
|
|
18844
|
+
"description": "High-level Wise send-money preparation flow: creates or selects a recipient, creates a quote, creates a transfer order, and returns the Wise funding next step. It intentionally does not fund the transfer or move money.",
|
|
18845
|
+
"inputSchema": "schemas/send_money.json",
|
|
18846
|
+
"handler": "handlers/send_money.js",
|
|
18919
18847
|
"scope": "write",
|
|
18920
|
-
"toolset": "
|
|
18848
|
+
"toolset": "send_money"
|
|
18921
18849
|
},
|
|
18922
18850
|
{
|
|
18923
|
-
"name": "
|
|
18924
|
-
"description": "List
|
|
18925
|
-
"inputSchema": "schemas/
|
|
18926
|
-
"handler": "handlers/
|
|
18851
|
+
"name": "list_balances",
|
|
18852
|
+
"description": "List Wise multi-currency balances for a profile, including standard balances and savings jars. Use this before balance movements or to check available funds.",
|
|
18853
|
+
"inputSchema": "schemas/balance_list.json",
|
|
18854
|
+
"handler": "handlers/list_balances.js",
|
|
18927
18855
|
"scope": "read",
|
|
18928
|
-
"toolset": "
|
|
18929
|
-
},
|
|
18930
|
-
{
|
|
18931
|
-
"name": "create_quote",
|
|
18932
|
-
"description": "Create a quote from flat fields. Get contactId from list_contacts, accountCode from list_accounts, and taxType from list_tax_rates. Returns a compact summary and Xero link.",
|
|
18933
|
-
"inputSchema": "schemas/quote_write.json",
|
|
18934
|
-
"handler": "handlers/create_quote.js",
|
|
18935
|
-
"scope": "write",
|
|
18936
|
-
"toolset": "accounting"
|
|
18856
|
+
"toolset": "balances"
|
|
18937
18857
|
},
|
|
18938
18858
|
{
|
|
18939
|
-
"name": "
|
|
18940
|
-
"description": "
|
|
18941
|
-
"inputSchema": "schemas/
|
|
18942
|
-
"handler": "handlers/
|
|
18859
|
+
"name": "get_balance",
|
|
18860
|
+
"description": "Get a Wise balance by profileId and balanceId, including currency, type, name, and available amount.",
|
|
18861
|
+
"inputSchema": "schemas/balance_id.json",
|
|
18862
|
+
"handler": "handlers/get_balance.js",
|
|
18943
18863
|
"scope": "read",
|
|
18944
|
-
"toolset": "
|
|
18864
|
+
"toolset": "balances"
|
|
18945
18865
|
},
|
|
18946
18866
|
{
|
|
18947
|
-
"name": "
|
|
18948
|
-
"description": "
|
|
18949
|
-
"inputSchema": "schemas/
|
|
18950
|
-
"handler": "handlers/
|
|
18867
|
+
"name": "create_balance",
|
|
18868
|
+
"description": "Open a Wise balance for a currency or create a named savings jar. Standard balances are limited to one per currency.",
|
|
18869
|
+
"inputSchema": "schemas/balance_create.json",
|
|
18870
|
+
"handler": "handlers/create_balance.js",
|
|
18951
18871
|
"scope": "write",
|
|
18952
|
-
"toolset": "
|
|
18953
|
-
},
|
|
18954
|
-
{
|
|
18955
|
-
"name": "list_payments",
|
|
18956
|
-
"description": "List payments with compact payment ID, date, amount, status, account, and invoice references.",
|
|
18957
|
-
"inputSchema": "schemas/list_records.json",
|
|
18958
|
-
"handler": "handlers/list_payments.js",
|
|
18959
|
-
"scope": "read",
|
|
18960
|
-
"toolset": "accounting"
|
|
18872
|
+
"toolset": "balances"
|
|
18961
18873
|
},
|
|
18962
18874
|
{
|
|
18963
|
-
"name": "
|
|
18964
|
-
"description": "
|
|
18965
|
-
"inputSchema": "schemas/
|
|
18966
|
-
"handler": "handlers/
|
|
18875
|
+
"name": "move_money_between_balances",
|
|
18876
|
+
"description": "Move or convert money between Wise balances. For cross-currency moves, create a BALANCE payOut quote first and provide quoteId.",
|
|
18877
|
+
"inputSchema": "schemas/balance_movement.json",
|
|
18878
|
+
"handler": "handlers/move_money_between_balances.js",
|
|
18967
18879
|
"scope": "write",
|
|
18968
|
-
"toolset": "
|
|
18880
|
+
"toolset": "balances"
|
|
18969
18881
|
},
|
|
18970
18882
|
{
|
|
18971
|
-
"name": "
|
|
18972
|
-
"description": "
|
|
18973
|
-
"inputSchema": "schemas/
|
|
18974
|
-
"handler": "handlers/
|
|
18883
|
+
"name": "get_total_funds",
|
|
18884
|
+
"description": "Get total account funds across Wise balances valued in a target currency. Use this for an account-level liquidity snapshot.",
|
|
18885
|
+
"inputSchema": "schemas/total_funds.json",
|
|
18886
|
+
"handler": "handlers/get_total_funds.js",
|
|
18975
18887
|
"scope": "read",
|
|
18976
|
-
"toolset": "
|
|
18977
|
-
},
|
|
18978
|
-
{
|
|
18979
|
-
"name": "create_bank_transaction",
|
|
18980
|
-
"description": "Create a spend or receive bank transaction. Use list_accounts for valid bank/account codes and tax rates before calling this.",
|
|
18981
|
-
"inputSchema": "schemas/bank_transaction_write.json",
|
|
18982
|
-
"handler": "handlers/create_bank_transaction.js",
|
|
18983
|
-
"scope": "write",
|
|
18984
|
-
"toolset": "accounting"
|
|
18888
|
+
"toolset": "balances"
|
|
18985
18889
|
},
|
|
18986
18890
|
{
|
|
18987
|
-
"name": "
|
|
18988
|
-
"description": "List
|
|
18989
|
-
"inputSchema": "schemas/
|
|
18990
|
-
"handler": "handlers/
|
|
18891
|
+
"name": "list_account_details",
|
|
18892
|
+
"description": "List Wise local and international account details for a profile, including receive options and example details where available.",
|
|
18893
|
+
"inputSchema": "schemas/profile_id.json",
|
|
18894
|
+
"handler": "handlers/list_account_details.js",
|
|
18991
18895
|
"scope": "read",
|
|
18992
|
-
"toolset": "
|
|
18896
|
+
"toolset": "receive_money"
|
|
18993
18897
|
},
|
|
18994
18898
|
{
|
|
18995
|
-
"name": "
|
|
18996
|
-
"description": "
|
|
18997
|
-
"inputSchema": "schemas/
|
|
18998
|
-
"handler": "handlers/
|
|
18899
|
+
"name": "create_account_details_order",
|
|
18900
|
+
"description": "Order Wise account details for a currency and profile. The resulting order may require verification or top-up steps in Wise.",
|
|
18901
|
+
"inputSchema": "schemas/account_details_order.json",
|
|
18902
|
+
"handler": "handlers/create_account_details_order.js",
|
|
18999
18903
|
"scope": "write",
|
|
19000
|
-
"toolset": "
|
|
18904
|
+
"toolset": "receive_money"
|
|
19001
18905
|
},
|
|
19002
18906
|
{
|
|
19003
|
-
"name": "
|
|
19004
|
-
"description": "List
|
|
19005
|
-
"inputSchema": "schemas/
|
|
19006
|
-
"handler": "handlers/
|
|
18907
|
+
"name": "list_account_details_orders",
|
|
18908
|
+
"description": "List Wise account-details orders for a profile and currency so the agent can track pending, waiting, or completed receive-details setup.",
|
|
18909
|
+
"inputSchema": "schemas/account_details_orders_list.json",
|
|
18910
|
+
"handler": "handlers/list_account_details_orders.js",
|
|
19007
18911
|
"scope": "read",
|
|
19008
|
-
"toolset": "
|
|
18912
|
+
"toolset": "receive_money"
|
|
18913
|
+
}
|
|
18914
|
+
]
|
|
18915
|
+
},
|
|
18916
|
+
"usageGuide": '## Wise workflow\n\nMost Wise API operations require a `profileId`. Start with `list_profiles` and choose the intended personal or business profile before creating quotes, recipients, transfers, balances, or account details.\n\nFor sending money, use this sequence:\n\n1. `list_profiles` to choose the profile.\n2. `list_recipients` or `create_recipient_simple` to choose or create the beneficiary.\n3. `create_quote` to lock the exchange rate and fees for about 30 minutes.\n4. `create_transfer` to prepare the transfer order.\n5. Ask the user to fund the transfer in Wise using the returned funding link or by opening Wise.\n\nThe `send_money` tool performs steps 2-4 in one call. It does not fund the transfer. It returns `requiresAction: "FUND_IN_WISE_UI"` and a `fundingUrl` when a transfer order is created.\n\n## Funding caveat\n\nCreating a transfer is not the same as sending money. Wise only starts processing when the transfer is funded. API funding is SCA-protected and is not available through this v1 integration. Prepared transfers normally expire if they are not funded within 14 days.\n\n## Recipient requirements\n\nWise recipient fields vary by country, currency, and payout route. Prefer `create_recipient_simple` for common routes such as IBAN, SWIFT/BIC, UK sort code, US routing number, account number, email, or phone. If Wise rejects a recipient as missing route-specific details, call `get_recipient_requirements` for the quote and retry with the needed fields in `extraFields` or an explicit `type`.\n\n## Quotes and idempotency\n\nUse `create_quote` when you need Wise\'s exact fee, delivery estimate, and locked exchange rate. `get_exchange_rate` is only for quick rate checks.\n\n`create_transfer` and `send_money` accept `customerTransactionId` for idempotency. If omitted, the handler generates one. Reuse the same value when retrying the same transfer request after a network failure.\n\n## Balances and account details\n\nUse `list_balances` before moving money between balances so you can choose valid `balanceId` values. Cross-currency balance movements usually need a quote created with `payOut: "BALANCE"`.\n\nUse `list_account_details` to see local and international receiving details that already exist. `create_account_details_order` may return requirements that must be completed in Wise before the account details become active.\n',
|
|
18917
|
+
"variants": {
|
|
18918
|
+
"variants": {
|
|
18919
|
+
"personal_token": {
|
|
18920
|
+
"label": "Production Personal API Token",
|
|
18921
|
+
"schema": {
|
|
18922
|
+
"type": "object",
|
|
18923
|
+
"properties": {
|
|
18924
|
+
"apiToken": {
|
|
18925
|
+
"type": "string",
|
|
18926
|
+
"title": "Personal API Token",
|
|
18927
|
+
"description": "Wise personal API token for your Wise business account.",
|
|
18928
|
+
"format": "password"
|
|
18929
|
+
}
|
|
18930
|
+
},
|
|
18931
|
+
"required": [
|
|
18932
|
+
"apiToken"
|
|
18933
|
+
],
|
|
18934
|
+
"additionalProperties": false
|
|
18935
|
+
},
|
|
18936
|
+
"injection": {
|
|
18937
|
+
"headers": {
|
|
18938
|
+
"Authorization": "Bearer {{apiToken}}",
|
|
18939
|
+
"Accept": "application/json"
|
|
18940
|
+
}
|
|
18941
|
+
},
|
|
18942
|
+
"healthCheck": {
|
|
18943
|
+
"path": "/v2/profiles",
|
|
18944
|
+
"description": "Validates that the Wise personal API token can list available profiles."
|
|
18945
|
+
}
|
|
19009
18946
|
},
|
|
19010
|
-
{
|
|
19011
|
-
"
|
|
18947
|
+
"personal_token_sandbox": {
|
|
18948
|
+
"label": "Sandbox Personal API Token",
|
|
18949
|
+
"baseUrlTemplate": "https://api.wise-sandbox.com",
|
|
18950
|
+
"schema": {
|
|
18951
|
+
"type": "object",
|
|
18952
|
+
"properties": {
|
|
18953
|
+
"apiToken": {
|
|
18954
|
+
"type": "string",
|
|
18955
|
+
"title": "Sandbox Personal API Token",
|
|
18956
|
+
"description": "Wise sandbox personal API token. Production tokens do not work against the sandbox API.",
|
|
18957
|
+
"format": "password"
|
|
18958
|
+
}
|
|
18959
|
+
},
|
|
18960
|
+
"required": [
|
|
18961
|
+
"apiToken"
|
|
18962
|
+
],
|
|
18963
|
+
"additionalProperties": false
|
|
18964
|
+
},
|
|
18965
|
+
"injection": {
|
|
18966
|
+
"headers": {
|
|
18967
|
+
"Authorization": "Bearer {{apiToken}}",
|
|
18968
|
+
"Accept": "application/json"
|
|
18969
|
+
}
|
|
18970
|
+
},
|
|
18971
|
+
"healthCheck": {
|
|
18972
|
+
"path": "/v2/profiles",
|
|
18973
|
+
"description": "Validates that the Wise sandbox token can list available sandbox profiles."
|
|
18974
|
+
}
|
|
18975
|
+
}
|
|
18976
|
+
},
|
|
18977
|
+
"default": "personal_token"
|
|
18978
|
+
},
|
|
18979
|
+
"hint": "1. Choose the credential variant that matches the environment you want to connect: Production Personal API Token for https://api.wise.com, or Sandbox Personal API Token for https://api.wise-sandbox.com.\n2. For production, log in to your Wise business account at https://wise.com/. For sandbox, log in to the Wise sandbox at https://wise-sandbox.com/.\n3. Go to Your Account > Connect and manage apps > API tokens.\n4. Click Add new token and complete Wise's two-step verification prompt.\n5. Copy the token when Wise shows it. It is only displayed once.\n6. Paste the token into Commandable. Production tokens only work with the production variant; sandbox tokens only work with the sandbox variant.\n7. Personal API tokens can prepare transfers, manage recipients, and read transfer status, but this integration does not fund transfers via API.",
|
|
18980
|
+
"hintsByVariant": {},
|
|
18981
|
+
"tools": [
|
|
18982
|
+
{
|
|
18983
|
+
"name": "list_profiles",
|
|
18984
|
+
"description": "List Wise profiles available to the personal API token. Use this first to choose the personal or business profileId required by most other tools.",
|
|
18985
|
+
"inputSchema": {
|
|
18986
|
+
"type": "object",
|
|
18987
|
+
"properties": {},
|
|
18988
|
+
"additionalProperties": false
|
|
18989
|
+
},
|
|
18990
|
+
"handlerCode": "async () => {\n const res = await integration.get('/v2/profiles')\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const profiles = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n const list = Array.isArray(profiles) ? profiles : []\n\n return {\n profiles: list.map(profile => ({\n profileId: profile.id,\n type: profile.type,\n name: profile.fullName || profile.name || profile.businessName,\n firstName: profile.firstName,\n lastName: profile.lastName,\n businessName: profile.businessName,\n email: profile.email,\n country: profile.address?.country,\n currency: profile.currency,\n })),\n count: list.length,\n }\n}",
|
|
18991
|
+
"scope": "read"
|
|
18992
|
+
},
|
|
18993
|
+
{
|
|
18994
|
+
"name": "get_exchange_rate",
|
|
18995
|
+
"description": "Get the current Wise exchange rate for a currency pair. Use this for quick rate checks; use create_quote when you need fees, delivery estimates, or a locked rate for a transfer.",
|
|
18996
|
+
"inputSchema": {
|
|
18997
|
+
"type": "object",
|
|
18998
|
+
"properties": {
|
|
18999
|
+
"sourceCurrency": {
|
|
19000
|
+
"type": "string",
|
|
19001
|
+
"description": "Source currency code, such as GBP."
|
|
19002
|
+
},
|
|
19003
|
+
"targetCurrency": {
|
|
19004
|
+
"type": "string",
|
|
19005
|
+
"description": "Target currency code, such as EUR."
|
|
19006
|
+
},
|
|
19007
|
+
"time": {
|
|
19008
|
+
"type": "string",
|
|
19009
|
+
"description": "Optional ISO timestamp for a historical rate."
|
|
19010
|
+
}
|
|
19011
|
+
},
|
|
19012
|
+
"required": [
|
|
19013
|
+
"sourceCurrency",
|
|
19014
|
+
"targetCurrency"
|
|
19015
|
+
],
|
|
19016
|
+
"additionalProperties": false
|
|
19017
|
+
},
|
|
19018
|
+
"handlerCode": "async (input) => {\n const params = new URLSearchParams()\n params.set('source', String(input.sourceCurrency).toUpperCase())\n params.set('target', String(input.targetCurrency).toUpperCase())\n if (input.time) params.set('time', input.time)\n\n const res = await integration.get(`/v1/rates?${params}`)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const data = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n const rates = Array.isArray(data) ? data : []\n const rate = rates[0] || null\n\n return {\n sourceCurrency: String(input.sourceCurrency).toUpperCase(),\n targetCurrency: String(input.targetCurrency).toUpperCase(),\n rate: rate?.rate ?? null,\n time: rate?.time ?? input.time ?? null,\n rawCount: rates.length,\n }\n}",
|
|
19019
|
+
"scope": "read"
|
|
19020
|
+
},
|
|
19021
|
+
{
|
|
19022
|
+
"name": "create_quote",
|
|
19023
|
+
"description": "Create an authenticated Wise quote for a profile. Provide source/target currencies and either sourceAmount or targetAmount. The rate is locked for about 30 minutes and the quoteId is used by create_transfer.",
|
|
19024
|
+
"inputSchema": {
|
|
19025
|
+
"type": "object",
|
|
19026
|
+
"properties": {
|
|
19027
|
+
"profileId": {
|
|
19028
|
+
"type": [
|
|
19029
|
+
"integer",
|
|
19030
|
+
"string"
|
|
19031
|
+
],
|
|
19032
|
+
"description": "Wise profile ID that owns the quote."
|
|
19033
|
+
},
|
|
19034
|
+
"sourceCurrency": {
|
|
19035
|
+
"type": "string",
|
|
19036
|
+
"description": "Currency the sender pays from."
|
|
19037
|
+
},
|
|
19038
|
+
"targetCurrency": {
|
|
19039
|
+
"type": "string",
|
|
19040
|
+
"description": "Currency the recipient receives."
|
|
19041
|
+
},
|
|
19042
|
+
"sourceAmount": {
|
|
19043
|
+
"type": "number",
|
|
19044
|
+
"description": "Amount in sourceCurrency. Provide either sourceAmount or targetAmount."
|
|
19045
|
+
},
|
|
19046
|
+
"targetAmount": {
|
|
19047
|
+
"type": "number",
|
|
19048
|
+
"description": "Amount in targetCurrency. Provide either sourceAmount or targetAmount."
|
|
19049
|
+
},
|
|
19050
|
+
"payOut": {
|
|
19051
|
+
"type": "string",
|
|
19052
|
+
"description": "Wise payout method such as BANK_TRANSFER or BALANCE."
|
|
19053
|
+
},
|
|
19054
|
+
"preferredPayIn": {
|
|
19055
|
+
"type": "string",
|
|
19056
|
+
"description": "Optional preferred pay-in method such as BALANCE."
|
|
19057
|
+
},
|
|
19058
|
+
"targetAccount": {
|
|
19059
|
+
"type": [
|
|
19060
|
+
"integer",
|
|
19061
|
+
"string"
|
|
19062
|
+
],
|
|
19063
|
+
"description": "Optional recipient account ID to attach to the quote."
|
|
19064
|
+
}
|
|
19065
|
+
},
|
|
19066
|
+
"required": [
|
|
19067
|
+
"profileId",
|
|
19068
|
+
"sourceCurrency",
|
|
19069
|
+
"targetCurrency"
|
|
19070
|
+
],
|
|
19071
|
+
"additionalProperties": false
|
|
19072
|
+
},
|
|
19073
|
+
"handlerCode": "async (input) => {\n if (input.sourceAmount === undefined && input.targetAmount === undefined)\n throw new Error('Provide sourceAmount or targetAmount')\n\n const summarizeQuote = quote => ({\n quoteId: quote?.id,\n profileId: quote?.profile,\n sourceCurrency: quote?.sourceCurrency,\n targetCurrency: quote?.targetCurrency,\n sourceAmount: quote?.sourceAmount,\n targetAmount: quote?.targetAmount,\n payOut: quote?.payOut,\n rate: quote?.rate,\n fee: quote?.fee,\n targetAccount: quote?.targetAccount,\n rateExpirationTime: quote?.rateExpirationTime,\n paymentOptions: Array.isArray(quote?.paymentOptions)\n ? quote.paymentOptions.map(option => ({\n payIn: option.payIn,\n payOut: option.payOut,\n sourceAmount: option.sourceAmount,\n targetAmount: option.targetAmount,\n fee: option.fee,\n estimatedDelivery: option.estimatedDelivery,\n }))\n : [],\n createdTime: quote?.createdTime,\n })\n\n const body = {\n sourceCurrency: String(input.sourceCurrency).toUpperCase(),\n targetCurrency: String(input.targetCurrency).toUpperCase(),\n ...(input.sourceAmount !== undefined ? { sourceAmount: input.sourceAmount } : {}),\n ...(input.targetAmount !== undefined ? { targetAmount: input.targetAmount } : {}),\n ...(input.payOut ? { payOut: input.payOut } : {}),\n ...(input.preferredPayIn ? { preferredPayIn: input.preferredPayIn } : {}),\n ...(input.targetAccount !== undefined ? { targetAccount: input.targetAccount } : {}),\n }\n\n const res = await integration.post(`/v3/profiles/${encodeURIComponent(input.profileId)}/quotes`, body)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const quote = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n return { quote: summarizeQuote(quote) }\n}",
|
|
19074
|
+
"scope": "write",
|
|
19075
|
+
"toolset": "send_money"
|
|
19076
|
+
},
|
|
19077
|
+
{
|
|
19078
|
+
"name": "get_quote",
|
|
19079
|
+
"description": "Get a Wise quote by quoteId for a profile, including rate, fees, delivery estimates, and pay-in/pay-out options.",
|
|
19080
|
+
"inputSchema": {
|
|
19081
|
+
"type": "object",
|
|
19082
|
+
"properties": {
|
|
19083
|
+
"profileId": {
|
|
19084
|
+
"type": [
|
|
19085
|
+
"integer",
|
|
19086
|
+
"string"
|
|
19087
|
+
],
|
|
19088
|
+
"description": "Wise profile ID that owns the quote."
|
|
19089
|
+
},
|
|
19090
|
+
"quoteId": {
|
|
19091
|
+
"type": "string",
|
|
19092
|
+
"description": "Wise quote UUID."
|
|
19093
|
+
}
|
|
19094
|
+
},
|
|
19095
|
+
"required": [
|
|
19096
|
+
"profileId",
|
|
19097
|
+
"quoteId"
|
|
19098
|
+
],
|
|
19099
|
+
"additionalProperties": false
|
|
19100
|
+
},
|
|
19101
|
+
"handlerCode": "async (input) => {\n const summarizeQuote = quote => ({\n quoteId: quote?.id,\n profileId: quote?.profile,\n sourceCurrency: quote?.sourceCurrency,\n targetCurrency: quote?.targetCurrency,\n sourceAmount: quote?.sourceAmount,\n targetAmount: quote?.targetAmount,\n payOut: quote?.payOut,\n rate: quote?.rate,\n fee: quote?.fee,\n targetAccount: quote?.targetAccount,\n rateExpirationTime: quote?.rateExpirationTime,\n paymentOptions: Array.isArray(quote?.paymentOptions)\n ? quote.paymentOptions.map(option => ({\n payIn: option.payIn,\n payOut: option.payOut,\n sourceAmount: option.sourceAmount,\n targetAmount: option.targetAmount,\n fee: option.fee,\n estimatedDelivery: option.estimatedDelivery,\n }))\n : [],\n createdTime: quote?.createdTime,\n })\n\n const res = await integration.get(`/v3/profiles/${encodeURIComponent(input.profileId)}/quotes/${encodeURIComponent(input.quoteId)}`)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const quote = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n return { quote: summarizeQuote(quote) }\n}",
|
|
19102
|
+
"scope": "read",
|
|
19103
|
+
"toolset": "send_money"
|
|
19104
|
+
},
|
|
19105
|
+
{
|
|
19106
|
+
"name": "update_quote",
|
|
19107
|
+
"description": "Update a Wise quote, usually to attach targetAccount after creating or selecting a recipient. Use get_recipient or create_recipient_simple first to get targetAccount.",
|
|
19108
|
+
"inputSchema": {
|
|
19109
|
+
"type": "object",
|
|
19110
|
+
"properties": {
|
|
19111
|
+
"profileId": {
|
|
19112
|
+
"type": [
|
|
19113
|
+
"integer",
|
|
19114
|
+
"string"
|
|
19115
|
+
],
|
|
19116
|
+
"description": "Wise profile ID that owns the quote."
|
|
19117
|
+
},
|
|
19118
|
+
"quoteId": {
|
|
19119
|
+
"type": "string",
|
|
19120
|
+
"description": "Wise quote UUID."
|
|
19121
|
+
},
|
|
19122
|
+
"targetAccount": {
|
|
19123
|
+
"type": [
|
|
19124
|
+
"integer",
|
|
19125
|
+
"string"
|
|
19126
|
+
],
|
|
19127
|
+
"description": "Recipient account ID to attach to the quote."
|
|
19128
|
+
},
|
|
19129
|
+
"payOut": {
|
|
19130
|
+
"type": "string",
|
|
19131
|
+
"description": "Optional payout method override."
|
|
19132
|
+
},
|
|
19133
|
+
"preferredPayIn": {
|
|
19134
|
+
"type": "string",
|
|
19135
|
+
"description": "Optional pay-in method override."
|
|
19136
|
+
}
|
|
19137
|
+
},
|
|
19138
|
+
"required": [
|
|
19139
|
+
"profileId",
|
|
19140
|
+
"quoteId"
|
|
19141
|
+
],
|
|
19142
|
+
"additionalProperties": false
|
|
19143
|
+
},
|
|
19144
|
+
"handlerCode": "async (input) => {\n const summarizeQuote = quote => ({\n quoteId: quote?.id,\n profileId: quote?.profile,\n sourceCurrency: quote?.sourceCurrency,\n targetCurrency: quote?.targetCurrency,\n sourceAmount: quote?.sourceAmount,\n targetAmount: quote?.targetAmount,\n payOut: quote?.payOut,\n rate: quote?.rate,\n fee: quote?.fee,\n targetAccount: quote?.targetAccount,\n rateExpirationTime: quote?.rateExpirationTime,\n paymentOptions: Array.isArray(quote?.paymentOptions)\n ? quote.paymentOptions.map(option => ({\n payIn: option.payIn,\n payOut: option.payOut,\n sourceAmount: option.sourceAmount,\n targetAmount: option.targetAmount,\n fee: option.fee,\n estimatedDelivery: option.estimatedDelivery,\n }))\n : [],\n })\n\n const body = {\n ...(input.targetAccount !== undefined ? { targetAccount: input.targetAccount } : {}),\n ...(input.payOut ? { payOut: input.payOut } : {}),\n ...(input.preferredPayIn ? { preferredPayIn: input.preferredPayIn } : {}),\n }\n const res = await integration.patch(`/v3/profiles/${encodeURIComponent(input.profileId)}/quotes/${encodeURIComponent(input.quoteId)}`, body)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const quote = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n return { quote: summarizeQuote(quote) }\n}",
|
|
19145
|
+
"scope": "write",
|
|
19146
|
+
"toolset": "send_money"
|
|
19147
|
+
},
|
|
19148
|
+
{
|
|
19149
|
+
"name": "list_recipients",
|
|
19150
|
+
"description": "List Wise recipient accounts with compact identity, currency, and account-summary fields. Filter by profileId and currency when possible; use get_recipient for full details.",
|
|
19151
|
+
"inputSchema": {
|
|
19152
|
+
"type": "object",
|
|
19153
|
+
"properties": {
|
|
19154
|
+
"profileId": {
|
|
19155
|
+
"type": [
|
|
19156
|
+
"integer",
|
|
19157
|
+
"string"
|
|
19158
|
+
],
|
|
19159
|
+
"description": "Optional Wise profile ID to filter recipients."
|
|
19160
|
+
},
|
|
19161
|
+
"currency": {
|
|
19162
|
+
"type": "string",
|
|
19163
|
+
"description": "Optional recipient currency filter."
|
|
19164
|
+
},
|
|
19165
|
+
"size": {
|
|
19166
|
+
"type": "integer",
|
|
19167
|
+
"description": "Optional maximum number of recipients to return."
|
|
19168
|
+
},
|
|
19169
|
+
"seekPosition": {
|
|
19170
|
+
"type": "integer",
|
|
19171
|
+
"description": "Optional pagination cursor used by Wise."
|
|
19172
|
+
}
|
|
19173
|
+
},
|
|
19174
|
+
"additionalProperties": false
|
|
19175
|
+
},
|
|
19176
|
+
"handlerCode": "async (input) => {\n const params = new URLSearchParams()\n if (input.profileId !== undefined) params.set('profile', String(input.profileId))\n if (input.currency) params.set('currency', String(input.currency).toUpperCase())\n if (input.size) params.set('size', String(input.size))\n if (input.seekPosition !== undefined) params.set('seekPosition', String(input.seekPosition))\n\n const res = await integration.get(`/v2/accounts${params.toString() ? `?${params}` : ''}`)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const data = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n const recipients = Array.isArray(data?.content) ? data.content : (Array.isArray(data) ? data : [])\n\n const summarizeRecipient = account => ({\n recipientId: account?.id,\n profileId: account?.profile,\n accountHolderName: account?.accountHolderName,\n currency: account?.currency,\n country: account?.country,\n type: account?.type,\n active: account?.active,\n ownedByCustomer: account?.ownedByCustomer,\n legalType: account?.legalType,\n bankName: account?.details?.bankName,\n accountSummary: account?.details?.accountNumber\n ? `...${String(account.details.accountNumber).slice(-4)}`\n : (account?.details?.iban ? `${String(account.details.iban).slice(0, 4)}...${String(account.details.iban).slice(-4)}` : undefined),\n })\n\n return {\n recipients: recipients.map(summarizeRecipient),\n count: recipients.length,\n seekPositionForNext: data?.seekPositionForNext,\n }\n}",
|
|
19177
|
+
"scope": "read",
|
|
19178
|
+
"toolset": "send_money"
|
|
19179
|
+
},
|
|
19180
|
+
{
|
|
19181
|
+
"name": "get_recipient",
|
|
19182
|
+
"description": "Get full details for a Wise recipient account by recipientId. Use this before creating a transfer when you need to confirm bank details or ownership.",
|
|
19183
|
+
"inputSchema": {
|
|
19184
|
+
"type": "object",
|
|
19185
|
+
"properties": {
|
|
19186
|
+
"recipientId": {
|
|
19187
|
+
"type": [
|
|
19188
|
+
"integer",
|
|
19189
|
+
"string"
|
|
19190
|
+
],
|
|
19191
|
+
"description": "Wise recipient account ID."
|
|
19192
|
+
}
|
|
19193
|
+
},
|
|
19194
|
+
"required": [
|
|
19195
|
+
"recipientId"
|
|
19196
|
+
],
|
|
19197
|
+
"additionalProperties": false
|
|
19198
|
+
},
|
|
19199
|
+
"handlerCode": "async (input) => {\n const res = await integration.get(`/v2/accounts/${encodeURIComponent(input.recipientId)}`)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const account = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n\n return {\n recipient: {\n recipientId: account?.id,\n profileId: account?.profile,\n accountHolderName: account?.accountHolderName,\n currency: account?.currency,\n country: account?.country,\n type: account?.type,\n active: account?.active,\n ownedByCustomer: account?.ownedByCustomer,\n legalType: account?.legalType,\n details: account?.details,\n requirements: account?.requirements,\n created: account?.created,\n updated: account?.updated,\n },\n }\n}",
|
|
19200
|
+
"scope": "read",
|
|
19201
|
+
"toolset": "send_money"
|
|
19202
|
+
},
|
|
19203
|
+
{
|
|
19204
|
+
"name": "get_recipient_requirements",
|
|
19205
|
+
"description": "Get Wise's dynamic recipient-account requirements for a quote. Use this when create_recipient_simple needs uncommon banking fields for a country/currency route.",
|
|
19206
|
+
"inputSchema": {
|
|
19207
|
+
"type": "object",
|
|
19208
|
+
"properties": {
|
|
19209
|
+
"quoteId": {
|
|
19210
|
+
"type": "string",
|
|
19211
|
+
"description": "Wise quote UUID whose route determines recipient requirements."
|
|
19212
|
+
}
|
|
19213
|
+
},
|
|
19214
|
+
"required": [
|
|
19215
|
+
"quoteId"
|
|
19216
|
+
],
|
|
19217
|
+
"additionalProperties": false
|
|
19218
|
+
},
|
|
19219
|
+
"handlerCode": "async (input) => {\n const res = await integration.get(`/v1/quotes/${encodeURIComponent(input.quoteId)}/account-requirements`)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const requirements = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n\n return {\n quoteId: input.quoteId,\n requirements,\n }\n}",
|
|
19220
|
+
"scope": "read",
|
|
19221
|
+
"toolset": "send_money"
|
|
19222
|
+
},
|
|
19223
|
+
{
|
|
19224
|
+
"name": "create_recipient_simple",
|
|
19225
|
+
"description": "Create a Wise recipient from flat common banking fields such as IBAN, BIC/SWIFT, sort code, account number, routing number, email, or phone. Use extraFields for uncommon fields returned by get_recipient_requirements.",
|
|
19226
|
+
"inputSchema": {
|
|
19227
|
+
"type": "object",
|
|
19228
|
+
"properties": {
|
|
19229
|
+
"profileId": {
|
|
19230
|
+
"type": [
|
|
19231
|
+
"integer",
|
|
19232
|
+
"string"
|
|
19233
|
+
],
|
|
19234
|
+
"description": "Wise profile ID that owns the recipient."
|
|
19235
|
+
},
|
|
19236
|
+
"accountHolderName": {
|
|
19237
|
+
"type": "string",
|
|
19238
|
+
"description": "Recipient account holder name."
|
|
19239
|
+
},
|
|
19240
|
+
"currency": {
|
|
19241
|
+
"type": "string",
|
|
19242
|
+
"description": "Recipient currency."
|
|
19243
|
+
},
|
|
19244
|
+
"country": {
|
|
19245
|
+
"type": "string",
|
|
19246
|
+
"description": "Recipient bank country code."
|
|
19247
|
+
},
|
|
19248
|
+
"type": {
|
|
19249
|
+
"type": "string",
|
|
19250
|
+
"description": "Optional explicit Wise recipient type. If omitted, the handler infers a common type from supplied fields."
|
|
19251
|
+
},
|
|
19252
|
+
"ownedByCustomer": {
|
|
19253
|
+
"type": "boolean",
|
|
19254
|
+
"description": "Whether this recipient account is owned by the Wise customer."
|
|
19255
|
+
},
|
|
19256
|
+
"legalType": {
|
|
19257
|
+
"type": "string",
|
|
19258
|
+
"enum": [
|
|
19259
|
+
"PRIVATE",
|
|
19260
|
+
"BUSINESS"
|
|
19261
|
+
],
|
|
19262
|
+
"description": "Recipient legal type."
|
|
19263
|
+
},
|
|
19264
|
+
"iban": {
|
|
19265
|
+
"type": "string"
|
|
19266
|
+
},
|
|
19267
|
+
"bic": {
|
|
19268
|
+
"type": "string"
|
|
19269
|
+
},
|
|
19270
|
+
"swiftCode": {
|
|
19271
|
+
"type": "string"
|
|
19272
|
+
},
|
|
19273
|
+
"accountNumber": {
|
|
19274
|
+
"type": "string"
|
|
19275
|
+
},
|
|
19276
|
+
"sortCode": {
|
|
19277
|
+
"type": "string"
|
|
19278
|
+
},
|
|
19279
|
+
"routingNumber": {
|
|
19280
|
+
"type": "string"
|
|
19281
|
+
},
|
|
19282
|
+
"aba": {
|
|
19283
|
+
"type": "string"
|
|
19284
|
+
},
|
|
19285
|
+
"bsbCode": {
|
|
19286
|
+
"type": "string"
|
|
19287
|
+
},
|
|
19288
|
+
"institutionNumber": {
|
|
19289
|
+
"type": "string"
|
|
19290
|
+
},
|
|
19291
|
+
"transitNumber": {
|
|
19292
|
+
"type": "string"
|
|
19293
|
+
},
|
|
19294
|
+
"branchCode": {
|
|
19295
|
+
"type": "string"
|
|
19296
|
+
},
|
|
19297
|
+
"bankCode": {
|
|
19298
|
+
"type": "string"
|
|
19299
|
+
},
|
|
19300
|
+
"clabe": {
|
|
19301
|
+
"type": "string"
|
|
19302
|
+
},
|
|
19303
|
+
"ifscCode": {
|
|
19304
|
+
"type": "string"
|
|
19305
|
+
},
|
|
19306
|
+
"email": {
|
|
19307
|
+
"type": "string"
|
|
19308
|
+
},
|
|
19309
|
+
"phoneNumber": {
|
|
19310
|
+
"type": "string"
|
|
19311
|
+
},
|
|
19312
|
+
"address": {
|
|
19313
|
+
"type": "object",
|
|
19314
|
+
"description": "Optional address fields accepted by Wise for routes that require them.",
|
|
19315
|
+
"additionalProperties": true
|
|
19316
|
+
},
|
|
19317
|
+
"extraFields": {
|
|
19318
|
+
"type": "object",
|
|
19319
|
+
"description": "Additional Wise recipient details fields returned by get_recipient_requirements.",
|
|
19320
|
+
"additionalProperties": true
|
|
19321
|
+
}
|
|
19322
|
+
},
|
|
19323
|
+
"required": [
|
|
19324
|
+
"profileId",
|
|
19325
|
+
"accountHolderName",
|
|
19326
|
+
"currency"
|
|
19327
|
+
],
|
|
19328
|
+
"additionalProperties": false
|
|
19329
|
+
},
|
|
19330
|
+
"handlerCode": "async (input) => {\n const compact = value => typeof value === 'string' ? value.replace(/[\\s-]/g, '') : value\n const currency = String(input.currency).toUpperCase()\n const country = input.country ? String(input.country).toUpperCase() : undefined\n\n const inferType = () => {\n if (input.type) return input.type\n if (input.iban) return 'iban'\n if (currency === 'GBP' && input.sortCode && input.accountNumber) return 'sort_code'\n if (currency === 'USD' && (input.routingNumber || input.aba) && input.accountNumber) return 'aba'\n if (currency === 'AUD' && input.bsbCode && input.accountNumber) return 'australian'\n if (currency === 'CAD' && input.institutionNumber && input.transitNumber && input.accountNumber) return 'canadian'\n if (currency === 'MXN' && input.clabe) return 'clabe'\n if (currency === 'INR' && input.ifscCode && input.accountNumber) return 'indian'\n if (input.swiftCode || input.bic) return 'swift_code'\n if (input.email) return 'email'\n if (input.phoneNumber) return 'mobile_wallet'\n return undefined\n }\n\n const type = inferType()\n if (!type)\n throw new Error('Could not infer Wise recipient type. Provide type or common banking fields such as iban, sortCode+accountNumber, routingNumber+accountNumber, or swiftCode.')\n\n const details = {\n ...(country ? { country } : {}),\n ...(input.legalType ? { legalType: input.legalType } : {}),\n ...(input.iban ? { IBAN: compact(input.iban) } : {}),\n ...(input.bic ? { BIC: compact(input.bic) } : {}),\n ...(input.swiftCode ? { swiftCode: compact(input.swiftCode) } : {}),\n ...(input.accountNumber ? { accountNumber: compact(input.accountNumber) } : {}),\n ...(input.sortCode ? { sortCode: compact(input.sortCode) } : {}),\n ...(input.routingNumber ? { routingNumber: compact(input.routingNumber) } : {}),\n ...(input.aba ? { abartn: compact(input.aba), aba: compact(input.aba) } : {}),\n ...(input.bsbCode ? { bsbCode: compact(input.bsbCode) } : {}),\n ...(input.institutionNumber ? { institutionNumber: compact(input.institutionNumber) } : {}),\n ...(input.transitNumber ? { transitNumber: compact(input.transitNumber) } : {}),\n ...(input.branchCode ? { branchCode: compact(input.branchCode) } : {}),\n ...(input.bankCode ? { bankCode: compact(input.bankCode) } : {}),\n ...(input.clabe ? { clabe: compact(input.clabe) } : {}),\n ...(input.ifscCode ? { ifscCode: compact(input.ifscCode) } : {}),\n ...(input.email ? { email: input.email } : {}),\n ...(input.phoneNumber ? { phoneNumber: input.phoneNumber } : {}),\n ...(input.address ? { address: input.address } : {}),\n ...(input.extraFields || {}),\n }\n\n const body = {\n profile: input.profileId,\n accountHolderName: input.accountHolderName,\n currency,\n type,\n details,\n ...(input.ownedByCustomer !== undefined ? { ownedByCustomer: input.ownedByCustomer } : {}),\n }\n\n const res = await integration.post('/v1/accounts', body)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const account = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n\n return {\n recipient: {\n recipientId: account?.id,\n profileId: account?.profile,\n accountHolderName: account?.accountHolderName,\n currency: account?.currency,\n country: account?.country,\n type: account?.type,\n active: account?.active,\n ownedByCustomer: account?.ownedByCustomer,\n legalType: account?.legalType,\n details: account?.details,\n },\n }\n}",
|
|
19331
|
+
"scope": "write",
|
|
19332
|
+
"toolset": "send_money"
|
|
19333
|
+
},
|
|
19334
|
+
{
|
|
19335
|
+
"name": "deactivate_recipient",
|
|
19336
|
+
"description": "Deactivate a Wise recipient account by recipientId. This removes it from active recipient lists but does not affect historical transfers.",
|
|
19337
|
+
"inputSchema": {
|
|
19338
|
+
"type": "object",
|
|
19339
|
+
"properties": {
|
|
19340
|
+
"recipientId": {
|
|
19341
|
+
"type": [
|
|
19342
|
+
"integer",
|
|
19343
|
+
"string"
|
|
19344
|
+
],
|
|
19345
|
+
"description": "Wise recipient account ID."
|
|
19346
|
+
}
|
|
19347
|
+
},
|
|
19348
|
+
"required": [
|
|
19349
|
+
"recipientId"
|
|
19350
|
+
],
|
|
19351
|
+
"additionalProperties": false
|
|
19352
|
+
},
|
|
19353
|
+
"handlerCode": "async (input) => {\n const res = await integration.delete(`/v1/accounts/${encodeURIComponent(input.recipientId)}`)\n let data = null\n if (res.status !== 204) {\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n if (responseBodyTrimmed)\n data = JSON.parse(responseBodyTrimmed)\n }\n return {\n recipientId: input.recipientId,\n deactivated: res.ok,\n result: data,\n }\n}",
|
|
19354
|
+
"scope": "write",
|
|
19355
|
+
"toolset": "send_money"
|
|
19356
|
+
},
|
|
19357
|
+
{
|
|
19358
|
+
"name": "create_transfer",
|
|
19359
|
+
"description": "Create a Wise transfer order from a quoteId and targetAccountId. This does not send money; it prepares a transfer for the user to fund in Wise within 14 days.",
|
|
19360
|
+
"inputSchema": {
|
|
19361
|
+
"type": "object",
|
|
19362
|
+
"properties": {
|
|
19363
|
+
"targetAccountId": {
|
|
19364
|
+
"type": [
|
|
19365
|
+
"integer",
|
|
19366
|
+
"string"
|
|
19367
|
+
],
|
|
19368
|
+
"description": "Wise recipient account ID."
|
|
19369
|
+
},
|
|
19370
|
+
"quoteId": {
|
|
19371
|
+
"type": "string",
|
|
19372
|
+
"description": "Wise quote UUID."
|
|
19373
|
+
},
|
|
19374
|
+
"reference": {
|
|
19375
|
+
"type": "string",
|
|
19376
|
+
"description": "Payment reference shown to the recipient where supported."
|
|
19377
|
+
},
|
|
19378
|
+
"sourceOfFunds": {
|
|
19379
|
+
"type": "string",
|
|
19380
|
+
"description": "Optional Wise source-of-funds value when required."
|
|
19381
|
+
},
|
|
19382
|
+
"transferPurpose": {
|
|
19383
|
+
"type": "string",
|
|
19384
|
+
"description": "Optional Wise transfer-purpose value when required."
|
|
19385
|
+
},
|
|
19386
|
+
"extraDetails": {
|
|
19387
|
+
"type": "object",
|
|
19388
|
+
"description": "Additional Wise transfer details.",
|
|
19389
|
+
"additionalProperties": true
|
|
19390
|
+
}
|
|
19391
|
+
},
|
|
19392
|
+
"required": [
|
|
19393
|
+
"targetAccountId",
|
|
19394
|
+
"quoteId"
|
|
19395
|
+
],
|
|
19396
|
+
"additionalProperties": false
|
|
19397
|
+
},
|
|
19398
|
+
"handlerCode": "async (input) => {\n const summarizeTransfer = transfer => {\n const transferId = transfer?.id\n return {\n transferId,\n status: transfer?.status,\n targetAccountId: transfer?.targetAccount,\n quoteId: transfer?.quoteUuid,\n customerTransactionId: transfer?.customerTransactionId,\n reference: transfer?.details?.reference,\n sourceCurrency: transfer?.sourceCurrency,\n targetCurrency: transfer?.targetCurrency,\n sourceValue: transfer?.sourceValue,\n targetValue: transfer?.targetValue,\n rate: transfer?.rate,\n created: transfer?.created,\n estimatedDelivery: transfer?.estimatedDelivery,\n fundingUrl: transferId ? `https://wise.com/transfer/${encodeURIComponent(transferId)}` : null,\n requiresAction: 'FUND_IN_WISE_UI',\n nextStep: 'Open Wise to fund this prepared transfer. The Wise API funding endpoint is intentionally not used by this integration.',\n }\n }\n\n const details = {\n ...(input.reference ? { reference: input.reference } : {}),\n ...(input.sourceOfFunds ? { sourceOfFunds: input.sourceOfFunds } : {}),\n ...(input.transferPurpose ? { transferPurpose: input.transferPurpose } : {}),\n ...(input.extraDetails || {}),\n }\n const body = {\n targetAccount: input.targetAccountId,\n quoteUuid: input.quoteId,\n customerTransactionId: uuid.v4(),\n ...(Object.keys(details).length ? { details } : {}),\n }\n\n const res = await integration.post('/v1/transfers', body)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const transfer = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n return { transfer: summarizeTransfer(transfer) }\n}",
|
|
19399
|
+
"scope": "write",
|
|
19400
|
+
"toolset": "send_money"
|
|
19401
|
+
},
|
|
19402
|
+
{
|
|
19403
|
+
"name": "get_transfer",
|
|
19404
|
+
"description": "Get Wise transfer status and tracking details by transferId. Use this to check whether a prepared or funded transfer is waiting, processing, completed, cancelled, or failed.",
|
|
19405
|
+
"inputSchema": {
|
|
19406
|
+
"type": "object",
|
|
19407
|
+
"properties": {
|
|
19408
|
+
"transferId": {
|
|
19409
|
+
"type": [
|
|
19410
|
+
"integer",
|
|
19411
|
+
"string"
|
|
19412
|
+
],
|
|
19413
|
+
"description": "Wise transfer ID."
|
|
19414
|
+
}
|
|
19415
|
+
},
|
|
19416
|
+
"required": [
|
|
19417
|
+
"transferId"
|
|
19418
|
+
],
|
|
19419
|
+
"additionalProperties": false
|
|
19420
|
+
},
|
|
19421
|
+
"handlerCode": "async (input) => {\n const res = await integration.get(`/v1/transfers/${encodeURIComponent(input.transferId)}`)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const transfer = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n const transferId = transfer?.id || input.transferId\n\n return {\n transfer: {\n transferId,\n status: transfer?.status,\n targetAccountId: transfer?.targetAccount,\n quoteId: transfer?.quoteUuid,\n customerTransactionId: transfer?.customerTransactionId,\n reference: transfer?.details?.reference,\n sourceCurrency: transfer?.sourceCurrency,\n targetCurrency: transfer?.targetCurrency,\n sourceValue: transfer?.sourceValue,\n targetValue: transfer?.targetValue,\n rate: transfer?.rate,\n created: transfer?.created,\n estimatedDelivery: transfer?.estimatedDelivery,\n fundingUrl: `https://wise.com/transfer/${encodeURIComponent(transferId)}`,\n },\n }\n}",
|
|
19422
|
+
"scope": "read",
|
|
19423
|
+
"toolset": "send_money"
|
|
19424
|
+
},
|
|
19425
|
+
{
|
|
19426
|
+
"name": "list_transfers",
|
|
19427
|
+
"description": "List Wise transfers with compact status, amount, currency, recipient, and date fields. Filter by profileId, status, currency, or date range when possible.",
|
|
19428
|
+
"inputSchema": {
|
|
19429
|
+
"type": "object",
|
|
19430
|
+
"properties": {
|
|
19431
|
+
"profileId": {
|
|
19432
|
+
"type": [
|
|
19433
|
+
"integer",
|
|
19434
|
+
"string"
|
|
19435
|
+
],
|
|
19436
|
+
"description": "Optional profile ID to filter transfers."
|
|
19437
|
+
},
|
|
19438
|
+
"status": {
|
|
19439
|
+
"type": "string",
|
|
19440
|
+
"description": "Optional Wise transfer status filter."
|
|
19441
|
+
},
|
|
19442
|
+
"sourceCurrency": {
|
|
19443
|
+
"type": "string",
|
|
19444
|
+
"description": "Optional source currency filter."
|
|
19445
|
+
},
|
|
19446
|
+
"targetCurrency": {
|
|
19447
|
+
"type": "string",
|
|
19448
|
+
"description": "Optional target currency filter."
|
|
19449
|
+
},
|
|
19450
|
+
"createdDateStart": {
|
|
19451
|
+
"type": "string",
|
|
19452
|
+
"description": "Optional ISO date/time lower bound."
|
|
19453
|
+
},
|
|
19454
|
+
"createdDateEnd": {
|
|
19455
|
+
"type": "string",
|
|
19456
|
+
"description": "Optional ISO date/time upper bound."
|
|
19457
|
+
},
|
|
19458
|
+
"limit": {
|
|
19459
|
+
"type": "integer",
|
|
19460
|
+
"description": "Optional maximum transfers to return."
|
|
19461
|
+
},
|
|
19462
|
+
"offset": {
|
|
19463
|
+
"type": "integer",
|
|
19464
|
+
"description": "Optional pagination offset."
|
|
19465
|
+
}
|
|
19466
|
+
},
|
|
19467
|
+
"additionalProperties": false
|
|
19468
|
+
},
|
|
19469
|
+
"handlerCode": "async (input) => {\n const params = new URLSearchParams()\n if (input.profileId !== undefined) params.set('profile', String(input.profileId))\n if (input.status) params.set('status', input.status)\n if (input.sourceCurrency) params.set('sourceCurrency', String(input.sourceCurrency).toUpperCase())\n if (input.targetCurrency) params.set('targetCurrency', String(input.targetCurrency).toUpperCase())\n if (input.createdDateStart) params.set('createdDateStart', input.createdDateStart)\n if (input.createdDateEnd) params.set('createdDateEnd', input.createdDateEnd)\n if (input.limit) params.set('limit', String(input.limit))\n if (input.offset) params.set('offset', String(input.offset))\n\n const res = await integration.get(`/v1/transfers${params.toString() ? `?${params}` : ''}`)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const data = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n const transfers = Array.isArray(data) ? data : (Array.isArray(data?.content) ? data.content : [])\n\n return {\n transfers: transfers.map(transfer => ({\n transferId: transfer?.id,\n status: transfer?.status,\n targetAccountId: transfer?.targetAccount,\n quoteId: transfer?.quoteUuid,\n customerTransactionId: transfer?.customerTransactionId,\n reference: transfer?.details?.reference,\n sourceCurrency: transfer?.sourceCurrency,\n targetCurrency: transfer?.targetCurrency,\n sourceValue: transfer?.sourceValue,\n targetValue: transfer?.targetValue,\n created: transfer?.created,\n estimatedDelivery: transfer?.estimatedDelivery,\n })),\n count: transfers.length,\n }\n}",
|
|
19470
|
+
"scope": "read",
|
|
19471
|
+
"toolset": "send_money"
|
|
19472
|
+
},
|
|
19473
|
+
{
|
|
19474
|
+
"name": "cancel_transfer",
|
|
19475
|
+
"description": "Cancel a Wise transfer that is still in a cancellable state. Use get_transfer first to confirm the current status.",
|
|
19476
|
+
"inputSchema": {
|
|
19477
|
+
"type": "object",
|
|
19478
|
+
"properties": {
|
|
19479
|
+
"transferId": {
|
|
19480
|
+
"type": [
|
|
19481
|
+
"integer",
|
|
19482
|
+
"string"
|
|
19483
|
+
],
|
|
19484
|
+
"description": "Wise transfer ID."
|
|
19485
|
+
}
|
|
19486
|
+
},
|
|
19487
|
+
"required": [
|
|
19488
|
+
"transferId"
|
|
19489
|
+
],
|
|
19490
|
+
"additionalProperties": false
|
|
19491
|
+
},
|
|
19492
|
+
"handlerCode": "async (input) => {\n const res = await integration.put(`/v1/transfers/${encodeURIComponent(input.transferId)}/cancel`, {})\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const transfer = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : {}\n\n return {\n transfer: {\n transferId: transfer?.id || input.transferId,\n status: transfer?.status,\n targetAccountId: transfer?.targetAccount,\n quoteId: transfer?.quoteUuid,\n customerTransactionId: transfer?.customerTransactionId,\n cancelled: transfer?.status === 'cancelled' || transfer?.status === 'cancelled_by_user',\n },\n }\n}",
|
|
19493
|
+
"scope": "write",
|
|
19494
|
+
"toolset": "send_money"
|
|
19495
|
+
},
|
|
19496
|
+
{
|
|
19497
|
+
"name": "send_money",
|
|
19498
|
+
"description": "High-level Wise send-money preparation flow: creates or selects a recipient, creates a quote, creates a transfer order, and returns the Wise funding next step. It intentionally does not fund the transfer or move money.",
|
|
19499
|
+
"inputSchema": {
|
|
19500
|
+
"type": "object",
|
|
19501
|
+
"properties": {
|
|
19502
|
+
"profileId": {
|
|
19503
|
+
"type": [
|
|
19504
|
+
"integer",
|
|
19505
|
+
"string"
|
|
19506
|
+
],
|
|
19507
|
+
"description": "Wise profile ID that owns the quote and transfer."
|
|
19508
|
+
},
|
|
19509
|
+
"sourceCurrency": {
|
|
19510
|
+
"type": "string"
|
|
19511
|
+
},
|
|
19512
|
+
"targetCurrency": {
|
|
19513
|
+
"type": "string"
|
|
19514
|
+
},
|
|
19515
|
+
"sourceAmount": {
|
|
19516
|
+
"type": "number",
|
|
19517
|
+
"description": "Amount in sourceCurrency. Provide either sourceAmount or targetAmount."
|
|
19518
|
+
},
|
|
19519
|
+
"targetAmount": {
|
|
19520
|
+
"type": "number",
|
|
19521
|
+
"description": "Amount in targetCurrency. Provide either sourceAmount or targetAmount."
|
|
19522
|
+
},
|
|
19523
|
+
"recipientId": {
|
|
19524
|
+
"type": [
|
|
19525
|
+
"integer",
|
|
19526
|
+
"string"
|
|
19527
|
+
],
|
|
19528
|
+
"description": "Existing recipient account ID. If omitted, recipient fields are used to create one."
|
|
19529
|
+
},
|
|
19530
|
+
"recipient": {
|
|
19531
|
+
"type": "object",
|
|
19532
|
+
"description": "Flat recipient fields matching create_recipient_simple when recipientId is omitted.",
|
|
19533
|
+
"additionalProperties": true
|
|
19534
|
+
},
|
|
19535
|
+
"reference": {
|
|
19536
|
+
"type": "string",
|
|
19537
|
+
"description": "Payment reference shown to the recipient where supported."
|
|
19538
|
+
},
|
|
19539
|
+
"payOut": {
|
|
19540
|
+
"type": "string",
|
|
19541
|
+
"description": "Wise payout method. Defaults to BANK_TRANSFER when omitted."
|
|
19542
|
+
},
|
|
19543
|
+
"preferredPayIn": {
|
|
19544
|
+
"type": "string",
|
|
19545
|
+
"description": "Optional preferred pay-in method."
|
|
19546
|
+
}
|
|
19547
|
+
},
|
|
19548
|
+
"required": [
|
|
19549
|
+
"profileId",
|
|
19550
|
+
"sourceCurrency",
|
|
19551
|
+
"targetCurrency"
|
|
19552
|
+
],
|
|
19553
|
+
"additionalProperties": false
|
|
19554
|
+
},
|
|
19555
|
+
"handlerCode": "async (input) => {\n if (input.sourceAmount === undefined && input.targetAmount === undefined)\n throw new Error('Provide sourceAmount or targetAmount')\n if (!input.recipientId && !input.recipient)\n throw new Error('Provide recipientId or recipient fields')\n\n const summarizeQuote = quote => ({\n quoteId: quote?.id,\n sourceCurrency: quote?.sourceCurrency,\n targetCurrency: quote?.targetCurrency,\n sourceAmount: quote?.sourceAmount,\n targetAmount: quote?.targetAmount,\n rate: quote?.rate,\n fee: quote?.fee,\n rateExpirationTime: quote?.rateExpirationTime,\n })\n const summarizeRecipient = account => ({\n recipientId: account?.id,\n accountHolderName: account?.accountHolderName,\n currency: account?.currency,\n type: account?.type,\n active: account?.active,\n accountSummary: account?.details?.accountNumber\n ? `...${String(account.details.accountNumber).slice(-4)}`\n : (account?.details?.iban ? `${String(account.details.iban).slice(0, 4)}...${String(account.details.iban).slice(-4)}` : undefined),\n })\n const summarizeTransfer = transfer => {\n const transferId = transfer?.id\n return {\n transferId,\n status: transfer?.status,\n targetAccountId: transfer?.targetAccount,\n quoteId: transfer?.quoteUuid,\n customerTransactionId: transfer?.customerTransactionId,\n reference: transfer?.details?.reference,\n sourceCurrency: transfer?.sourceCurrency,\n targetCurrency: transfer?.targetCurrency,\n sourceValue: transfer?.sourceValue,\n targetValue: transfer?.targetValue,\n created: transfer?.created,\n estimatedDelivery: transfer?.estimatedDelivery,\n fundingUrl: transferId ? `https://wise.com/transfer/${encodeURIComponent(transferId)}` : null,\n requiresAction: 'FUND_IN_WISE_UI',\n nextStep: 'Open Wise to fund this prepared transfer. This integration intentionally does not call Wise API funding endpoints.',\n }\n }\n\n const quoteBody = {\n sourceCurrency: String(input.sourceCurrency).toUpperCase(),\n targetCurrency: String(input.targetCurrency).toUpperCase(),\n ...(input.sourceAmount !== undefined ? { sourceAmount: input.sourceAmount } : {}),\n ...(input.targetAmount !== undefined ? { targetAmount: input.targetAmount } : {}),\n ...(input.payOut ? { payOut: input.payOut } : {}),\n ...(input.preferredPayIn ? { preferredPayIn: input.preferredPayIn } : {}),\n ...(input.recipientId !== undefined ? { targetAccount: input.recipientId } : {}),\n }\n const quoteRes = await integration.post(`/v3/profiles/${encodeURIComponent(input.profileId)}/quotes`, quoteBody)\n const quoteResponseBodyText = await quoteRes.text()\n const quoteResponseBodyTrimmed = quoteResponseBodyText.trim()\n let quote = quoteResponseBodyTrimmed ? JSON.parse(quoteResponseBodyTrimmed) : null\n if (!quote?.id)\n throw new Error(`Wise quote creation returned no usable quote (HTTP ${typeof quoteRes.status === 'number' ? quoteRes.status : 'unknown'})`)\n\n let recipientId = input.recipientId\n let recipient = null\n if (!recipientId) {\n const data = input.recipient || {}\n const compact = value => typeof value === 'string' ? value.replace(/[\\s-]/g, '') : value\n const currency = String(data.currency || input.targetCurrency).toUpperCase()\n const inferType = () => {\n if (data.type) return data.type\n if (data.iban) return 'iban'\n if (currency === 'GBP' && data.sortCode && data.accountNumber) return 'sort_code'\n if (currency === 'USD' && (data.routingNumber || data.aba) && data.accountNumber) return 'aba'\n if (currency === 'AUD' && data.bsbCode && data.accountNumber) return 'australian'\n if (currency === 'CAD' && data.institutionNumber && data.transitNumber && data.accountNumber) return 'canadian'\n if (currency === 'MXN' && data.clabe) return 'clabe'\n if (currency === 'INR' && data.ifscCode && data.accountNumber) return 'indian'\n if (data.swiftCode || data.bic) return 'swift_code'\n if (data.email) return 'email'\n if (data.phoneNumber) return 'mobile_wallet'\n return undefined\n }\n const type = inferType()\n if (!type)\n throw new Error('Could not infer recipient type. Provide recipient.type or common banking fields.')\n\n const details = {\n ...(data.country ? { country: String(data.country).toUpperCase() } : {}),\n ...(data.legalType ? { legalType: data.legalType } : {}),\n ...(data.iban ? { IBAN: compact(data.iban) } : {}),\n ...(data.bic ? { BIC: compact(data.bic) } : {}),\n ...(data.swiftCode ? { swiftCode: compact(data.swiftCode) } : {}),\n ...(data.accountNumber ? { accountNumber: compact(data.accountNumber) } : {}),\n ...(data.sortCode ? { sortCode: compact(data.sortCode) } : {}),\n ...(data.routingNumber ? { routingNumber: compact(data.routingNumber) } : {}),\n ...(data.aba ? { abartn: compact(data.aba), aba: compact(data.aba) } : {}),\n ...(data.bsbCode ? { bsbCode: compact(data.bsbCode) } : {}),\n ...(data.institutionNumber ? { institutionNumber: compact(data.institutionNumber) } : {}),\n ...(data.transitNumber ? { transitNumber: compact(data.transitNumber) } : {}),\n ...(data.branchCode ? { branchCode: compact(data.branchCode) } : {}),\n ...(data.bankCode ? { bankCode: compact(data.bankCode) } : {}),\n ...(data.clabe ? { clabe: compact(data.clabe) } : {}),\n ...(data.ifscCode ? { ifscCode: compact(data.ifscCode) } : {}),\n ...(data.email ? { email: data.email } : {}),\n ...(data.phoneNumber ? { phoneNumber: data.phoneNumber } : {}),\n ...(data.address ? { address: data.address } : {}),\n ...(data.extraFields || {}),\n }\n const recipientBody = {\n profile: input.profileId,\n accountHolderName: data.accountHolderName,\n currency,\n type,\n details,\n ...(data.ownedByCustomer !== undefined ? { ownedByCustomer: data.ownedByCustomer } : {}),\n }\n const recipientRes = await integration.post('/v1/accounts', recipientBody)\n const recipientResponseBodyText = await recipientRes.text()\n const recipientResponseBodyTrimmed = recipientResponseBodyText.trim()\n recipient = recipientResponseBodyTrimmed ? JSON.parse(recipientResponseBodyTrimmed) : null\n recipientId = recipient?.id\n if (!recipientId)\n throw new Error('Wise recipient creation did not return an id')\n\n const updateRes = await integration.patch(`/v3/profiles/${encodeURIComponent(input.profileId)}/quotes/${encodeURIComponent(quote.id)}`, {\n targetAccount: recipientId,\n })\n const quoteUpdateResponseBodyText = await updateRes.text()\n const quoteUpdateResponseBodyTrimmed = quoteUpdateResponseBodyText.trim()\n quote = quoteUpdateResponseBodyTrimmed ? JSON.parse(quoteUpdateResponseBodyTrimmed) : null\n if (!quote?.id)\n throw new Error(`Wise quote update returned no usable quote (HTTP ${typeof updateRes.status === 'number' ? updateRes.status : 'unknown'})`)\n }\n else {\n const recipientRes = await integration.get(`/v2/accounts/${encodeURIComponent(recipientId)}`)\n const existingRecipientResponseBodyText = await recipientRes.text()\n const existingRecipientResponseBodyTrimmed = existingRecipientResponseBodyText.trim()\n recipient = existingRecipientResponseBodyTrimmed ? JSON.parse(existingRecipientResponseBodyTrimmed) : null\n }\n\n const transferDetails = input.reference ? { reference: input.reference } : {}\n const transferBody = {\n targetAccount: recipientId,\n quoteUuid: quote.id,\n customerTransactionId: uuid.v4(),\n ...(Object.keys(transferDetails).length ? { details: transferDetails } : {}),\n }\n const transferRes = await integration.post('/v1/transfers', transferBody)\n const transferResponseBodyText = await transferRes.text()\n const transferResponseBodyTrimmed = transferResponseBodyText.trim()\n const transfer = transferResponseBodyTrimmed ? JSON.parse(transferResponseBodyTrimmed) : null\n if (!transfer?.id)\n throw new Error(`Wise transfer creation returned no usable transfer (HTTP ${typeof transferRes.status === 'number' ? transferRes.status : 'unknown'})`)\n\n return {\n quote: summarizeQuote(quote),\n recipient: summarizeRecipient(recipient),\n transfer: summarizeTransfer(transfer),\n funding: {\n required: true,\n method: 'WISE_UI',\n url: transfer?.id ? `https://wise.com/transfer/${encodeURIComponent(transfer.id)}` : null,\n note: 'The transfer has been prepared but not funded. The user must approve and fund it in Wise.',\n },\n }\n}",
|
|
19556
|
+
"scope": "write",
|
|
19557
|
+
"toolset": "send_money"
|
|
19558
|
+
},
|
|
19559
|
+
{
|
|
19560
|
+
"name": "list_balances",
|
|
19561
|
+
"description": "List Wise multi-currency balances for a profile, including standard balances and savings jars. Use this before balance movements or to check available funds.",
|
|
19562
|
+
"inputSchema": {
|
|
19563
|
+
"type": "object",
|
|
19564
|
+
"properties": {
|
|
19565
|
+
"profileId": {
|
|
19566
|
+
"type": [
|
|
19567
|
+
"integer",
|
|
19568
|
+
"string"
|
|
19569
|
+
],
|
|
19570
|
+
"description": "Wise profile ID."
|
|
19571
|
+
},
|
|
19572
|
+
"types": {
|
|
19573
|
+
"type": "array",
|
|
19574
|
+
"items": {
|
|
19575
|
+
"type": "string",
|
|
19576
|
+
"enum": [
|
|
19577
|
+
"STANDARD",
|
|
19578
|
+
"SAVINGS"
|
|
19579
|
+
]
|
|
19580
|
+
},
|
|
19581
|
+
"description": "Balance types to include. Defaults to STANDARD and SAVINGS."
|
|
19582
|
+
}
|
|
19583
|
+
},
|
|
19584
|
+
"required": [
|
|
19585
|
+
"profileId"
|
|
19586
|
+
],
|
|
19587
|
+
"additionalProperties": false
|
|
19588
|
+
},
|
|
19589
|
+
"handlerCode": "async (input) => {\n const params = new URLSearchParams()\n const types = Array.isArray(input.types) && input.types.length ? input.types : ['STANDARD', 'SAVINGS']\n params.set('types', types.join(','))\n\n const res = await integration.get(`/v4/profiles/${encodeURIComponent(input.profileId)}/balances?${params}`)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const data = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n const balances = Array.isArray(data) ? data : []\n\n return {\n balances: balances.map(balance => ({\n balanceId: balance?.id,\n currency: balance?.currency,\n type: balance?.type,\n name: balance?.name,\n amount: balance?.amount?.value ?? balance?.amount,\n reservedAmount: balance?.reservedAmount?.value ?? balance?.reservedAmount,\n cashAmount: balance?.cashAmount?.value ?? balance?.cashAmount,\n totalWorth: balance?.totalWorth?.value ?? balance?.totalWorth,\n investmentState: balance?.investmentState,\n creationTime: balance?.creationTime,\n modificationTime: balance?.modificationTime,\n })),\n count: balances.length,\n }\n}",
|
|
19590
|
+
"scope": "read",
|
|
19591
|
+
"toolset": "balances"
|
|
19592
|
+
},
|
|
19593
|
+
{
|
|
19594
|
+
"name": "get_balance",
|
|
19595
|
+
"description": "Get a Wise balance by profileId and balanceId, including currency, type, name, and available amount.",
|
|
19596
|
+
"inputSchema": {
|
|
19597
|
+
"type": "object",
|
|
19598
|
+
"properties": {
|
|
19599
|
+
"profileId": {
|
|
19600
|
+
"type": [
|
|
19601
|
+
"integer",
|
|
19602
|
+
"string"
|
|
19603
|
+
],
|
|
19604
|
+
"description": "Wise profile ID."
|
|
19605
|
+
},
|
|
19606
|
+
"balanceId": {
|
|
19607
|
+
"type": [
|
|
19608
|
+
"integer",
|
|
19609
|
+
"string"
|
|
19610
|
+
],
|
|
19611
|
+
"description": "Wise balance ID."
|
|
19612
|
+
}
|
|
19613
|
+
},
|
|
19614
|
+
"required": [
|
|
19615
|
+
"profileId",
|
|
19616
|
+
"balanceId"
|
|
19617
|
+
],
|
|
19618
|
+
"additionalProperties": false
|
|
19619
|
+
},
|
|
19620
|
+
"handlerCode": "async (input) => {\n const res = await integration.get(`/v4/profiles/${encodeURIComponent(input.profileId)}/balances/${encodeURIComponent(input.balanceId)}`)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const balance = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n\n return {\n balance: {\n balanceId: balance?.id,\n currency: balance?.currency,\n type: balance?.type,\n name: balance?.name,\n amount: balance?.amount?.value ?? balance?.amount,\n reservedAmount: balance?.reservedAmount?.value ?? balance?.reservedAmount,\n cashAmount: balance?.cashAmount?.value ?? balance?.cashAmount,\n totalWorth: balance?.totalWorth?.value ?? balance?.totalWorth,\n investmentState: balance?.investmentState,\n creationTime: balance?.creationTime,\n modificationTime: balance?.modificationTime,\n details: balance,\n },\n }\n}",
|
|
19621
|
+
"scope": "read",
|
|
19622
|
+
"toolset": "balances"
|
|
19623
|
+
},
|
|
19624
|
+
{
|
|
19625
|
+
"name": "create_balance",
|
|
19626
|
+
"description": "Open a Wise balance for a currency or create a named savings jar. Standard balances are limited to one per currency.",
|
|
19627
|
+
"inputSchema": {
|
|
19628
|
+
"type": "object",
|
|
19629
|
+
"properties": {
|
|
19630
|
+
"profileId": {
|
|
19631
|
+
"type": [
|
|
19632
|
+
"integer",
|
|
19633
|
+
"string"
|
|
19634
|
+
],
|
|
19635
|
+
"description": "Wise profile ID."
|
|
19636
|
+
},
|
|
19637
|
+
"currency": {
|
|
19638
|
+
"type": "string",
|
|
19639
|
+
"description": "Currency code for the new balance."
|
|
19640
|
+
},
|
|
19641
|
+
"type": {
|
|
19642
|
+
"type": "string",
|
|
19643
|
+
"enum": [
|
|
19644
|
+
"STANDARD",
|
|
19645
|
+
"SAVINGS"
|
|
19646
|
+
],
|
|
19647
|
+
"description": "Balance type. STANDARD is the default account; SAVINGS is a jar."
|
|
19648
|
+
},
|
|
19649
|
+
"name": {
|
|
19650
|
+
"type": "string",
|
|
19651
|
+
"description": "Required by Wise for SAVINGS balances."
|
|
19652
|
+
}
|
|
19653
|
+
},
|
|
19654
|
+
"required": [
|
|
19655
|
+
"profileId",
|
|
19656
|
+
"currency",
|
|
19657
|
+
"type"
|
|
19658
|
+
],
|
|
19659
|
+
"additionalProperties": false
|
|
19660
|
+
},
|
|
19661
|
+
"handlerCode": "async (input) => {\n const body = {\n currency: String(input.currency).toUpperCase(),\n type: input.type,\n ...(input.name ? { name: input.name } : {}),\n }\n const res = await integration.post(`/v4/profiles/${encodeURIComponent(input.profileId)}/balances`, body, {\n headers: {\n 'X-idempotence-uuid': uuid.v4(),\n },\n })\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const balance = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n\n return {\n balance: {\n balanceId: balance?.id,\n currency: balance?.currency,\n type: balance?.type,\n name: balance?.name,\n amount: balance?.amount?.value ?? balance?.amount,\n investmentState: balance?.investmentState,\n creationTime: balance?.creationTime,\n },\n }\n}",
|
|
19662
|
+
"scope": "write",
|
|
19663
|
+
"toolset": "balances"
|
|
19664
|
+
},
|
|
19665
|
+
{
|
|
19666
|
+
"name": "move_money_between_balances",
|
|
19667
|
+
"description": "Move or convert money between Wise balances. For cross-currency moves, create a BALANCE payOut quote first and provide quoteId.",
|
|
19668
|
+
"inputSchema": {
|
|
19669
|
+
"type": "object",
|
|
19670
|
+
"properties": {
|
|
19671
|
+
"profileId": {
|
|
19672
|
+
"type": [
|
|
19673
|
+
"integer",
|
|
19674
|
+
"string"
|
|
19675
|
+
],
|
|
19676
|
+
"description": "Wise profile ID."
|
|
19677
|
+
},
|
|
19678
|
+
"sourceBalanceId": {
|
|
19679
|
+
"type": [
|
|
19680
|
+
"integer",
|
|
19681
|
+
"string"
|
|
19682
|
+
],
|
|
19683
|
+
"description": "Balance ID to move money from."
|
|
19684
|
+
},
|
|
19685
|
+
"targetBalanceId": {
|
|
19686
|
+
"type": [
|
|
19687
|
+
"integer",
|
|
19688
|
+
"string"
|
|
19689
|
+
],
|
|
19690
|
+
"description": "Balance ID to move money to."
|
|
19691
|
+
},
|
|
19692
|
+
"amount": {
|
|
19693
|
+
"type": "number",
|
|
19694
|
+
"description": "Amount to move when not using quoteId."
|
|
19695
|
+
},
|
|
19696
|
+
"currency": {
|
|
19697
|
+
"type": "string",
|
|
19698
|
+
"description": "Currency for amount when not using quoteId."
|
|
19699
|
+
},
|
|
19700
|
+
"quoteId": {
|
|
19701
|
+
"type": "string",
|
|
19702
|
+
"description": "Quote ID for cross-currency balance movement."
|
|
19703
|
+
},
|
|
19704
|
+
"reference": {
|
|
19705
|
+
"type": "string",
|
|
19706
|
+
"description": "Optional movement reference."
|
|
19707
|
+
}
|
|
19708
|
+
},
|
|
19709
|
+
"required": [
|
|
19710
|
+
"profileId",
|
|
19711
|
+
"sourceBalanceId",
|
|
19712
|
+
"targetBalanceId"
|
|
19713
|
+
],
|
|
19714
|
+
"additionalProperties": false
|
|
19715
|
+
},
|
|
19716
|
+
"handlerCode": "async (input) => {\n if (!input.quoteId && (input.amount === undefined || !input.currency))\n throw new Error('Provide quoteId for cross-currency movement, or amount and currency for same-currency movement')\n\n const body = {\n sourceBalanceId: input.sourceBalanceId,\n targetBalanceId: input.targetBalanceId,\n ...(input.quoteId ? { quoteId: input.quoteId } : {}),\n ...(input.amount !== undefined ? { amount: { value: input.amount, currency: String(input.currency).toUpperCase() } } : {}),\n ...(input.reference ? { reference: input.reference } : {}),\n }\n\n const res = await integration.post(`/v2/profiles/${encodeURIComponent(input.profileId)}/balance-movements`, body, {\n headers: {\n 'X-idempotence-uuid': uuid.v4(),\n },\n })\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const movement = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n\n return {\n movement: {\n movementId: movement?.id,\n status: movement?.status,\n sourceBalanceId: movement?.sourceBalanceId ?? input.sourceBalanceId,\n targetBalanceId: movement?.targetBalanceId ?? input.targetBalanceId,\n quoteId: movement?.quoteId ?? input.quoteId,\n amount: movement?.amount,\n createdTime: movement?.createdTime,\n details: movement,\n },\n }\n}",
|
|
19717
|
+
"scope": "write",
|
|
19718
|
+
"toolset": "balances"
|
|
19719
|
+
},
|
|
19720
|
+
{
|
|
19721
|
+
"name": "get_total_funds",
|
|
19722
|
+
"description": "Get total account funds across Wise balances valued in a target currency. Use this for an account-level liquidity snapshot.",
|
|
19723
|
+
"inputSchema": {
|
|
19724
|
+
"type": "object",
|
|
19725
|
+
"properties": {
|
|
19726
|
+
"profileId": {
|
|
19727
|
+
"type": [
|
|
19728
|
+
"integer",
|
|
19729
|
+
"string"
|
|
19730
|
+
],
|
|
19731
|
+
"description": "Wise profile ID."
|
|
19732
|
+
},
|
|
19733
|
+
"currency": {
|
|
19734
|
+
"type": "string",
|
|
19735
|
+
"description": "Currency to value total funds in."
|
|
19736
|
+
}
|
|
19737
|
+
},
|
|
19738
|
+
"required": [
|
|
19739
|
+
"profileId",
|
|
19740
|
+
"currency"
|
|
19741
|
+
],
|
|
19742
|
+
"additionalProperties": false
|
|
19743
|
+
},
|
|
19744
|
+
"handlerCode": "async (input) => {\n const res = await integration.get(`/v1/profiles/${encodeURIComponent(input.profileId)}/total-funds/${encodeURIComponent(String(input.currency).toUpperCase())}`)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const funds = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n\n return {\n profileId: input.profileId,\n currency: String(input.currency).toUpperCase(),\n totalWorth: funds?.totalWorth,\n totalAvailable: funds?.totalAvailable,\n totalCash: funds?.totalCash,\n overdraft: funds?.overdraft,\n details: funds,\n }\n}",
|
|
19745
|
+
"scope": "read",
|
|
19746
|
+
"toolset": "balances"
|
|
19747
|
+
},
|
|
19748
|
+
{
|
|
19749
|
+
"name": "list_account_details",
|
|
19750
|
+
"description": "List Wise local and international account details for a profile, including receive options and example details where available.",
|
|
19751
|
+
"inputSchema": {
|
|
19752
|
+
"type": "object",
|
|
19753
|
+
"properties": {
|
|
19754
|
+
"profileId": {
|
|
19755
|
+
"type": [
|
|
19756
|
+
"integer",
|
|
19757
|
+
"string"
|
|
19758
|
+
],
|
|
19759
|
+
"description": "Wise personal or business profile ID."
|
|
19760
|
+
}
|
|
19761
|
+
},
|
|
19762
|
+
"required": [
|
|
19763
|
+
"profileId"
|
|
19764
|
+
],
|
|
19765
|
+
"additionalProperties": false
|
|
19766
|
+
},
|
|
19767
|
+
"handlerCode": "async (input) => {\n const res = await integration.get(`/v1/profiles/${encodeURIComponent(input.profileId)}/account-details`)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const data = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n const details = Array.isArray(data) ? data : []\n\n return {\n accountDetails: details.map(item => ({\n id: item?.id,\n currency: item?.currency,\n title: item?.title,\n type: item?.type,\n status: item?.status,\n active: item?.active,\n accountHolderName: item?.accountHolderName,\n receiveOptions: item?.receiveOptions,\n details: item?.details,\n })),\n count: details.length,\n }\n}",
|
|
19768
|
+
"scope": "read",
|
|
19769
|
+
"toolset": "receive_money"
|
|
19770
|
+
},
|
|
19771
|
+
{
|
|
19772
|
+
"name": "create_account_details_order",
|
|
19773
|
+
"description": "Order Wise account details for a currency and profile. The resulting order may require verification or top-up steps in Wise.",
|
|
19774
|
+
"inputSchema": {
|
|
19775
|
+
"type": "object",
|
|
19776
|
+
"properties": {
|
|
19777
|
+
"profileId": {
|
|
19778
|
+
"type": [
|
|
19779
|
+
"integer",
|
|
19780
|
+
"string"
|
|
19781
|
+
],
|
|
19782
|
+
"description": "Wise profile ID."
|
|
19783
|
+
},
|
|
19784
|
+
"currency": {
|
|
19785
|
+
"type": "string",
|
|
19786
|
+
"description": "Currency to order receiving account details for."
|
|
19787
|
+
}
|
|
19788
|
+
},
|
|
19789
|
+
"required": [
|
|
19790
|
+
"profileId",
|
|
19791
|
+
"currency"
|
|
19792
|
+
],
|
|
19793
|
+
"additionalProperties": false
|
|
19794
|
+
},
|
|
19795
|
+
"handlerCode": "async (input) => {\n const res = await integration.post(`/v1/profiles/${encodeURIComponent(input.profileId)}/account-details-orders`, {\n currency: String(input.currency).toUpperCase(),\n })\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const order = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n\n return {\n order: {\n orderId: order?.id,\n currency: order?.currency,\n status: order?.status,\n requirements: order?.requirements,\n details: order,\n },\n }\n}",
|
|
19796
|
+
"scope": "write",
|
|
19797
|
+
"toolset": "receive_money"
|
|
19798
|
+
},
|
|
19799
|
+
{
|
|
19800
|
+
"name": "list_account_details_orders",
|
|
19801
|
+
"description": "List Wise account-details orders for a profile and currency so the agent can track pending, waiting, or completed receive-details setup.",
|
|
19802
|
+
"inputSchema": {
|
|
19803
|
+
"type": "object",
|
|
19804
|
+
"properties": {
|
|
19805
|
+
"profileId": {
|
|
19806
|
+
"type": [
|
|
19807
|
+
"integer",
|
|
19808
|
+
"string"
|
|
19809
|
+
],
|
|
19810
|
+
"description": "Wise personal or business profile ID."
|
|
19811
|
+
},
|
|
19812
|
+
"currency": {
|
|
19813
|
+
"type": "string",
|
|
19814
|
+
"description": "ISO currency code; Wise requires this query parameter when listing account-details orders (e.g. GBP, EUR)."
|
|
19815
|
+
}
|
|
19816
|
+
},
|
|
19817
|
+
"required": [
|
|
19818
|
+
"profileId",
|
|
19819
|
+
"currency"
|
|
19820
|
+
],
|
|
19821
|
+
"additionalProperties": false
|
|
19822
|
+
},
|
|
19823
|
+
"handlerCode": "async (input) => {\n const currency = encodeURIComponent(String(input.currency).toUpperCase())\n const res = await integration.get(`/v3/profiles/${encodeURIComponent(input.profileId)}/account-details-orders?currency=${currency}`)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const data = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n const orders = Array.isArray(data) ? data : []\n\n return {\n orders: orders.map(order => ({\n orderId: order?.id,\n currency: order?.currency,\n status: order?.status,\n requirements: order?.requirements,\n createdTime: order?.createdTime,\n updatedTime: order?.updatedTime,\n })),\n count: orders.length,\n }\n}",
|
|
19824
|
+
"scope": "read",
|
|
19825
|
+
"toolset": "receive_money"
|
|
19826
|
+
}
|
|
19827
|
+
],
|
|
19828
|
+
"variantOwnerType": null
|
|
19829
|
+
},
|
|
19830
|
+
"wise-profile": {
|
|
19831
|
+
"manifest": {
|
|
19832
|
+
"name": "wise",
|
|
19833
|
+
"version": "0.1.0",
|
|
19834
|
+
"baseUrl": "https://api.wise.com",
|
|
19835
|
+
"toolsets": {
|
|
19836
|
+
"send_money": {
|
|
19837
|
+
"label": "Send Money",
|
|
19838
|
+
"description": "Prepare Wise money transfers by creating quotes, recipients, and transfer orders for the user to fund in Wise"
|
|
19839
|
+
},
|
|
19840
|
+
"balances": {
|
|
19841
|
+
"label": "Balances",
|
|
19842
|
+
"description": "Read and manage Wise multi-currency balances and balance movements"
|
|
19843
|
+
},
|
|
19844
|
+
"receive_money": {
|
|
19845
|
+
"label": "Receive Money",
|
|
19846
|
+
"description": "Read and order Wise account details for receiving local or international payments"
|
|
19847
|
+
}
|
|
19848
|
+
},
|
|
19849
|
+
"variantLabel": "Single Profile",
|
|
19850
|
+
"variantConfig": [
|
|
19851
|
+
{
|
|
19852
|
+
"key": "profile",
|
|
19853
|
+
"label": "Profile",
|
|
19854
|
+
"selectionMode": "single",
|
|
19855
|
+
"listHandler": "async (config) => {\n const res = await integration.fetch('/v2/profiles')\n const profiles = await res.json()\n if (!Array.isArray(profiles))\n return []\n\n return profiles\n .map(profile => {\n const id = profile?.id == null ? '' : String(profile.id)\n const type = profile?.type ? String(profile.type) : ''\n const name = profile?.businessName || profile?.fullName || profile?.name || [profile?.firstName, profile?.lastName].filter(Boolean).join(' ') || id\n const label = type ? `${name} (${type})` : name\n return { id, name: label }\n })\n .filter(profile => profile.id && profile.name)\n}"
|
|
19856
|
+
}
|
|
19857
|
+
],
|
|
19858
|
+
"tools": [
|
|
19859
|
+
{
|
|
19860
|
+
"name": "get_exchange_rate",
|
|
19861
|
+
"description": "Get the current Wise exchange rate for a currency pair. Use this for quick rate checks; use create_quote when you need fees, delivery estimates, or a locked rate for a transfer.",
|
|
19862
|
+
"inputSchema": "../../schemas/exchange_rate.json",
|
|
19863
|
+
"handler": "../../handlers/get_exchange_rate.js",
|
|
19864
|
+
"scope": "read"
|
|
19865
|
+
},
|
|
19866
|
+
{
|
|
19867
|
+
"name": "create_quote",
|
|
19868
|
+
"description": "Create an authenticated Wise quote for the connected profile. Provide source/target currencies and either sourceAmount or targetAmount. The rate is locked for about 30 minutes and the quoteId is used by create_transfer.",
|
|
19869
|
+
"inputSchema": "../../schemas/quote_create.json",
|
|
19870
|
+
"handler": "../../handlers/create_quote.js",
|
|
19871
|
+
"scope": "write",
|
|
19872
|
+
"toolset": "send_money",
|
|
19873
|
+
"injectFromConfig": {
|
|
19874
|
+
"profileId": "profileId"
|
|
19875
|
+
}
|
|
19876
|
+
},
|
|
19877
|
+
{
|
|
19878
|
+
"name": "get_quote",
|
|
19879
|
+
"description": "Get a Wise quote by quoteId for the connected profile, including rate, fees, delivery estimates, and pay-in/pay-out options.",
|
|
19880
|
+
"inputSchema": "../../schemas/quote_id.json",
|
|
19881
|
+
"handler": "../../handlers/get_quote.js",
|
|
19882
|
+
"scope": "read",
|
|
19883
|
+
"toolset": "send_money",
|
|
19884
|
+
"injectFromConfig": {
|
|
19885
|
+
"profileId": "profileId"
|
|
19886
|
+
}
|
|
19887
|
+
},
|
|
19888
|
+
{
|
|
19889
|
+
"name": "update_quote",
|
|
19890
|
+
"description": "Update a Wise quote for the connected profile, usually to attach targetAccount after creating or selecting a recipient.",
|
|
19891
|
+
"inputSchema": "../../schemas/quote_update.json",
|
|
19892
|
+
"handler": "../../handlers/update_quote.js",
|
|
19893
|
+
"scope": "write",
|
|
19894
|
+
"toolset": "send_money",
|
|
19895
|
+
"injectFromConfig": {
|
|
19896
|
+
"profileId": "profileId"
|
|
19897
|
+
}
|
|
19898
|
+
},
|
|
19899
|
+
{
|
|
19900
|
+
"name": "list_recipients",
|
|
19901
|
+
"description": "List Wise recipient accounts for the connected profile with compact identity, currency, and account-summary fields. Filter by currency when possible; use get_recipient for full details.",
|
|
19902
|
+
"inputSchema": "../../schemas/recipient_list.json",
|
|
19903
|
+
"handler": "../../handlers/list_recipients.js",
|
|
19904
|
+
"scope": "read",
|
|
19905
|
+
"toolset": "send_money",
|
|
19906
|
+
"injectFromConfig": {
|
|
19907
|
+
"profileId": "profileId"
|
|
19908
|
+
}
|
|
19909
|
+
},
|
|
19910
|
+
{
|
|
19911
|
+
"name": "get_recipient",
|
|
19912
|
+
"description": "Get full details for a Wise recipient account by recipientId. Use this before creating a transfer when you need to confirm bank details or ownership.",
|
|
19913
|
+
"inputSchema": "../../schemas/recipient_id.json",
|
|
19914
|
+
"handler": "../../handlers/get_recipient.js",
|
|
19915
|
+
"scope": "read",
|
|
19916
|
+
"toolset": "send_money"
|
|
19917
|
+
},
|
|
19918
|
+
{
|
|
19919
|
+
"name": "get_recipient_requirements",
|
|
19920
|
+
"description": "Get Wise's dynamic recipient-account requirements for a quote. Use this when create_recipient_simple needs uncommon banking fields for a country/currency route.",
|
|
19921
|
+
"inputSchema": "../../schemas/recipient_requirements.json",
|
|
19922
|
+
"handler": "../../handlers/get_recipient_requirements.js",
|
|
19923
|
+
"scope": "read",
|
|
19924
|
+
"toolset": "send_money"
|
|
19925
|
+
},
|
|
19926
|
+
{
|
|
19927
|
+
"name": "create_recipient_simple",
|
|
19928
|
+
"description": "Create a Wise recipient owned by the connected profile from flat common banking fields such as IBAN, BIC/SWIFT, sort code, account number, routing number, email, or phone.",
|
|
19929
|
+
"inputSchema": "../../schemas/recipient_create.json",
|
|
19930
|
+
"handler": "../../handlers/create_recipient_simple.js",
|
|
19931
|
+
"scope": "write",
|
|
19932
|
+
"toolset": "send_money",
|
|
19933
|
+
"injectFromConfig": {
|
|
19934
|
+
"profileId": "profileId"
|
|
19935
|
+
}
|
|
19936
|
+
},
|
|
19937
|
+
{
|
|
19938
|
+
"name": "deactivate_recipient",
|
|
19939
|
+
"description": "Deactivate a Wise recipient account by recipientId. This removes it from active recipient lists but does not affect historical transfers.",
|
|
19940
|
+
"inputSchema": "../../schemas/recipient_id.json",
|
|
19941
|
+
"handler": "../../handlers/deactivate_recipient.js",
|
|
19942
|
+
"scope": "write",
|
|
19943
|
+
"toolset": "send_money"
|
|
19944
|
+
},
|
|
19945
|
+
{
|
|
19946
|
+
"name": "create_transfer",
|
|
19947
|
+
"description": "Create a Wise transfer order from a quoteId and targetAccountId. This does not send money; it prepares a transfer for the user to fund in Wise within 14 days.",
|
|
19948
|
+
"inputSchema": "../../schemas/transfer_create.json",
|
|
19949
|
+
"handler": "../../handlers/create_transfer.js",
|
|
19950
|
+
"scope": "write",
|
|
19951
|
+
"toolset": "send_money"
|
|
19952
|
+
},
|
|
19953
|
+
{
|
|
19954
|
+
"name": "get_transfer",
|
|
19955
|
+
"description": "Get Wise transfer status and tracking details by transferId. Use this to check whether a prepared or funded transfer is waiting, processing, completed, cancelled, or failed.",
|
|
19956
|
+
"inputSchema": "../../schemas/transfer_id.json",
|
|
19957
|
+
"handler": "../../handlers/get_transfer.js",
|
|
19958
|
+
"scope": "read",
|
|
19959
|
+
"toolset": "send_money"
|
|
19960
|
+
},
|
|
19961
|
+
{
|
|
19962
|
+
"name": "list_transfers",
|
|
19963
|
+
"description": "List Wise transfers for the connected profile with compact status, amount, currency, recipient, and date fields.",
|
|
19964
|
+
"inputSchema": "../../schemas/transfer_list.json",
|
|
19965
|
+
"handler": "../../handlers/list_transfers.js",
|
|
19966
|
+
"scope": "read",
|
|
19967
|
+
"toolset": "send_money",
|
|
19968
|
+
"injectFromConfig": {
|
|
19969
|
+
"profileId": "profileId"
|
|
19970
|
+
}
|
|
19971
|
+
},
|
|
19972
|
+
{
|
|
19973
|
+
"name": "cancel_transfer",
|
|
19974
|
+
"description": "Cancel a Wise transfer that is still in a cancellable state. Use get_transfer first to confirm the current status.",
|
|
19975
|
+
"inputSchema": "../../schemas/transfer_id.json",
|
|
19976
|
+
"handler": "../../handlers/cancel_transfer.js",
|
|
19977
|
+
"scope": "write",
|
|
19978
|
+
"toolset": "send_money"
|
|
19979
|
+
},
|
|
19980
|
+
{
|
|
19981
|
+
"name": "send_money",
|
|
19982
|
+
"description": "High-level Wise send-money preparation flow for the connected profile: creates or selects a recipient, creates a quote, creates a transfer order, and returns the Wise funding next step.",
|
|
19983
|
+
"inputSchema": "../../schemas/send_money.json",
|
|
19984
|
+
"handler": "../../handlers/send_money.js",
|
|
19985
|
+
"scope": "write",
|
|
19986
|
+
"toolset": "send_money",
|
|
19987
|
+
"injectFromConfig": {
|
|
19988
|
+
"profileId": "profileId"
|
|
19989
|
+
}
|
|
19990
|
+
},
|
|
19991
|
+
{
|
|
19992
|
+
"name": "list_balances",
|
|
19993
|
+
"description": "List Wise multi-currency balances for the connected profile, including standard balances and savings jars.",
|
|
19994
|
+
"inputSchema": "../../schemas/balance_list.json",
|
|
19995
|
+
"handler": "../../handlers/list_balances.js",
|
|
19996
|
+
"scope": "read",
|
|
19997
|
+
"toolset": "balances",
|
|
19998
|
+
"injectFromConfig": {
|
|
19999
|
+
"profileId": "profileId"
|
|
20000
|
+
}
|
|
20001
|
+
},
|
|
20002
|
+
{
|
|
20003
|
+
"name": "get_balance",
|
|
20004
|
+
"description": "Get a Wise balance by balanceId for the connected profile, including currency, type, name, and available amount.",
|
|
20005
|
+
"inputSchema": "../../schemas/balance_id.json",
|
|
20006
|
+
"handler": "../../handlers/get_balance.js",
|
|
20007
|
+
"scope": "read",
|
|
20008
|
+
"toolset": "balances",
|
|
20009
|
+
"injectFromConfig": {
|
|
20010
|
+
"profileId": "profileId"
|
|
20011
|
+
}
|
|
20012
|
+
},
|
|
20013
|
+
{
|
|
20014
|
+
"name": "create_balance",
|
|
20015
|
+
"description": "Open a Wise balance for a currency or create a named savings jar on the connected profile.",
|
|
20016
|
+
"inputSchema": "../../schemas/balance_create.json",
|
|
20017
|
+
"handler": "../../handlers/create_balance.js",
|
|
20018
|
+
"scope": "write",
|
|
20019
|
+
"toolset": "balances",
|
|
20020
|
+
"injectFromConfig": {
|
|
20021
|
+
"profileId": "profileId"
|
|
20022
|
+
}
|
|
20023
|
+
},
|
|
20024
|
+
{
|
|
20025
|
+
"name": "move_money_between_balances",
|
|
20026
|
+
"description": "Move or convert money between Wise balances on the connected profile. For cross-currency moves, create a BALANCE payOut quote first and provide quoteId.",
|
|
20027
|
+
"inputSchema": "../../schemas/balance_movement.json",
|
|
20028
|
+
"handler": "../../handlers/move_money_between_balances.js",
|
|
20029
|
+
"scope": "write",
|
|
20030
|
+
"toolset": "balances",
|
|
20031
|
+
"injectFromConfig": {
|
|
20032
|
+
"profileId": "profileId"
|
|
20033
|
+
}
|
|
20034
|
+
},
|
|
20035
|
+
{
|
|
20036
|
+
"name": "get_total_funds",
|
|
20037
|
+
"description": "Get total account funds across Wise balances for the connected profile valued in a target currency.",
|
|
20038
|
+
"inputSchema": "../../schemas/total_funds.json",
|
|
20039
|
+
"handler": "../../handlers/get_total_funds.js",
|
|
20040
|
+
"scope": "read",
|
|
20041
|
+
"toolset": "balances",
|
|
20042
|
+
"injectFromConfig": {
|
|
20043
|
+
"profileId": "profileId"
|
|
20044
|
+
}
|
|
20045
|
+
},
|
|
20046
|
+
{
|
|
20047
|
+
"name": "list_account_details",
|
|
20048
|
+
"description": "List Wise local and international account details for the connected profile, including receive options and example details where available.",
|
|
20049
|
+
"inputSchema": "../../schemas/profile_id.json",
|
|
20050
|
+
"handler": "../../handlers/list_account_details.js",
|
|
20051
|
+
"scope": "read",
|
|
20052
|
+
"toolset": "receive_money",
|
|
20053
|
+
"injectFromConfig": {
|
|
20054
|
+
"profileId": "profileId"
|
|
20055
|
+
}
|
|
20056
|
+
},
|
|
20057
|
+
{
|
|
20058
|
+
"name": "create_account_details_order",
|
|
20059
|
+
"description": "Order Wise account details for a currency on the connected profile. The resulting order may require verification or top-up steps in Wise.",
|
|
20060
|
+
"inputSchema": "../../schemas/account_details_order.json",
|
|
20061
|
+
"handler": "../../handlers/create_account_details_order.js",
|
|
20062
|
+
"scope": "write",
|
|
20063
|
+
"toolset": "receive_money",
|
|
20064
|
+
"injectFromConfig": {
|
|
20065
|
+
"profileId": "profileId"
|
|
20066
|
+
}
|
|
20067
|
+
},
|
|
20068
|
+
{
|
|
20069
|
+
"name": "list_account_details_orders",
|
|
20070
|
+
"description": "List Wise account-details orders for the connected profile and a currency (Wise requires the currency query parameter).",
|
|
20071
|
+
"inputSchema": "../../schemas/account_details_orders_list.json",
|
|
20072
|
+
"handler": "../../handlers/list_account_details_orders.js",
|
|
20073
|
+
"scope": "read",
|
|
20074
|
+
"toolset": "receive_money",
|
|
20075
|
+
"injectFromConfig": {
|
|
20076
|
+
"profileId": "profileId"
|
|
20077
|
+
}
|
|
20078
|
+
}
|
|
20079
|
+
]
|
|
20080
|
+
},
|
|
20081
|
+
"usageGuide": '## Wise workflow\n\nMost Wise API operations require a `profileId`. Start with `list_profiles` and choose the intended personal or business profile before creating quotes, recipients, transfers, balances, or account details.\n\nFor sending money, use this sequence:\n\n1. `list_profiles` to choose the profile.\n2. `list_recipients` or `create_recipient_simple` to choose or create the beneficiary.\n3. `create_quote` to lock the exchange rate and fees for about 30 minutes.\n4. `create_transfer` to prepare the transfer order.\n5. Ask the user to fund the transfer in Wise using the returned funding link or by opening Wise.\n\nThe `send_money` tool performs steps 2-4 in one call. It does not fund the transfer. It returns `requiresAction: "FUND_IN_WISE_UI"` and a `fundingUrl` when a transfer order is created.\n\n## Funding caveat\n\nCreating a transfer is not the same as sending money. Wise only starts processing when the transfer is funded. API funding is SCA-protected and is not available through this v1 integration. Prepared transfers normally expire if they are not funded within 14 days.\n\n## Recipient requirements\n\nWise recipient fields vary by country, currency, and payout route. Prefer `create_recipient_simple` for common routes such as IBAN, SWIFT/BIC, UK sort code, US routing number, account number, email, or phone. If Wise rejects a recipient as missing route-specific details, call `get_recipient_requirements` for the quote and retry with the needed fields in `extraFields` or an explicit `type`.\n\n## Quotes and idempotency\n\nUse `create_quote` when you need Wise\'s exact fee, delivery estimate, and locked exchange rate. `get_exchange_rate` is only for quick rate checks.\n\n`create_transfer` and `send_money` accept `customerTransactionId` for idempotency. If omitted, the handler generates one. Reuse the same value when retrying the same transfer request after a network failure.\n\n## Balances and account details\n\nUse `list_balances` before moving money between balances so you can choose valid `balanceId` values. Cross-currency balance movements usually need a quote created with `payOut: "BALANCE"`.\n\nUse `list_account_details` to see local and international receiving details that already exist. `create_account_details_order` may return requirements that must be completed in Wise before the account details become active.\n',
|
|
20082
|
+
"variants": {
|
|
20083
|
+
"variants": {
|
|
20084
|
+
"personal_token": {
|
|
20085
|
+
"label": "Production Personal API Token",
|
|
20086
|
+
"schema": {
|
|
20087
|
+
"type": "object",
|
|
20088
|
+
"properties": {
|
|
20089
|
+
"apiToken": {
|
|
20090
|
+
"type": "string",
|
|
20091
|
+
"title": "Personal API Token",
|
|
20092
|
+
"description": "Wise personal API token for your Wise business account.",
|
|
20093
|
+
"format": "password"
|
|
20094
|
+
}
|
|
20095
|
+
},
|
|
20096
|
+
"required": [
|
|
20097
|
+
"apiToken"
|
|
20098
|
+
],
|
|
20099
|
+
"additionalProperties": false
|
|
20100
|
+
},
|
|
20101
|
+
"injection": {
|
|
20102
|
+
"headers": {
|
|
20103
|
+
"Authorization": "Bearer {{apiToken}}",
|
|
20104
|
+
"Accept": "application/json"
|
|
20105
|
+
}
|
|
20106
|
+
},
|
|
20107
|
+
"healthCheck": {
|
|
20108
|
+
"path": "/v2/profiles",
|
|
20109
|
+
"description": "Validates that the Wise personal API token can list available profiles."
|
|
20110
|
+
}
|
|
20111
|
+
},
|
|
20112
|
+
"personal_token_sandbox": {
|
|
20113
|
+
"label": "Sandbox Personal API Token",
|
|
20114
|
+
"baseUrlTemplate": "https://api.wise-sandbox.com",
|
|
20115
|
+
"schema": {
|
|
20116
|
+
"type": "object",
|
|
20117
|
+
"properties": {
|
|
20118
|
+
"apiToken": {
|
|
20119
|
+
"type": "string",
|
|
20120
|
+
"title": "Sandbox Personal API Token",
|
|
20121
|
+
"description": "Wise sandbox personal API token. Production tokens do not work against the sandbox API.",
|
|
20122
|
+
"format": "password"
|
|
20123
|
+
}
|
|
20124
|
+
},
|
|
20125
|
+
"required": [
|
|
20126
|
+
"apiToken"
|
|
20127
|
+
],
|
|
20128
|
+
"additionalProperties": false
|
|
20129
|
+
},
|
|
20130
|
+
"injection": {
|
|
20131
|
+
"headers": {
|
|
20132
|
+
"Authorization": "Bearer {{apiToken}}",
|
|
20133
|
+
"Accept": "application/json"
|
|
20134
|
+
}
|
|
20135
|
+
},
|
|
20136
|
+
"healthCheck": {
|
|
20137
|
+
"path": "/v2/profiles",
|
|
20138
|
+
"description": "Validates that the Wise sandbox token can list available sandbox profiles."
|
|
20139
|
+
}
|
|
20140
|
+
}
|
|
20141
|
+
},
|
|
20142
|
+
"default": "personal_token"
|
|
20143
|
+
},
|
|
20144
|
+
"hint": "1. Choose the credential variant that matches the environment you want to connect: Production Personal API Token for https://api.wise.com, or Sandbox Personal API Token for https://api.wise-sandbox.com.\n2. For production, log in to your Wise business account at https://wise.com/. For sandbox, log in to the Wise sandbox at https://wise-sandbox.com/.\n3. Go to Your Account > Connect and manage apps > API tokens.\n4. Click Add new token and complete Wise's two-step verification prompt.\n5. Copy the token when Wise shows it. It is only displayed once.\n6. Paste the token into Commandable. Production tokens only work with the production variant; sandbox tokens only work with the sandbox variant.\n7. Personal API tokens can prepare transfers, manage recipients, and read transfer status, but this integration does not fund transfers via API.",
|
|
20145
|
+
"hintsByVariant": {},
|
|
20146
|
+
"tools": [
|
|
20147
|
+
{
|
|
20148
|
+
"name": "get_exchange_rate",
|
|
20149
|
+
"description": "Get the current Wise exchange rate for a currency pair. Use this for quick rate checks; use create_quote when you need fees, delivery estimates, or a locked rate for a transfer.",
|
|
20150
|
+
"inputSchema": {
|
|
20151
|
+
"type": "object",
|
|
20152
|
+
"properties": {
|
|
20153
|
+
"sourceCurrency": {
|
|
20154
|
+
"type": "string",
|
|
20155
|
+
"description": "Source currency code, such as GBP."
|
|
20156
|
+
},
|
|
20157
|
+
"targetCurrency": {
|
|
20158
|
+
"type": "string",
|
|
20159
|
+
"description": "Target currency code, such as EUR."
|
|
20160
|
+
},
|
|
20161
|
+
"time": {
|
|
20162
|
+
"type": "string",
|
|
20163
|
+
"description": "Optional ISO timestamp for a historical rate."
|
|
20164
|
+
}
|
|
20165
|
+
},
|
|
20166
|
+
"required": [
|
|
20167
|
+
"sourceCurrency",
|
|
20168
|
+
"targetCurrency"
|
|
20169
|
+
],
|
|
20170
|
+
"additionalProperties": false
|
|
20171
|
+
},
|
|
20172
|
+
"handlerCode": "async (input) => {\n const params = new URLSearchParams()\n params.set('source', String(input.sourceCurrency).toUpperCase())\n params.set('target', String(input.targetCurrency).toUpperCase())\n if (input.time) params.set('time', input.time)\n\n const res = await integration.get(`/v1/rates?${params}`)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const data = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n const rates = Array.isArray(data) ? data : []\n const rate = rates[0] || null\n\n return {\n sourceCurrency: String(input.sourceCurrency).toUpperCase(),\n targetCurrency: String(input.targetCurrency).toUpperCase(),\n rate: rate?.rate ?? null,\n time: rate?.time ?? input.time ?? null,\n rawCount: rates.length,\n }\n}",
|
|
20173
|
+
"scope": "read"
|
|
20174
|
+
},
|
|
20175
|
+
{
|
|
20176
|
+
"name": "create_quote",
|
|
20177
|
+
"description": "Create an authenticated Wise quote for the connected profile. Provide source/target currencies and either sourceAmount or targetAmount. The rate is locked for about 30 minutes and the quoteId is used by create_transfer.",
|
|
20178
|
+
"inputSchema": {
|
|
20179
|
+
"type": "object",
|
|
20180
|
+
"properties": {
|
|
20181
|
+
"profileId": {
|
|
20182
|
+
"type": [
|
|
20183
|
+
"integer",
|
|
20184
|
+
"string"
|
|
20185
|
+
],
|
|
20186
|
+
"description": "Wise profile ID that owns the quote."
|
|
20187
|
+
},
|
|
20188
|
+
"sourceCurrency": {
|
|
20189
|
+
"type": "string",
|
|
20190
|
+
"description": "Currency the sender pays from."
|
|
20191
|
+
},
|
|
20192
|
+
"targetCurrency": {
|
|
20193
|
+
"type": "string",
|
|
20194
|
+
"description": "Currency the recipient receives."
|
|
20195
|
+
},
|
|
20196
|
+
"sourceAmount": {
|
|
20197
|
+
"type": "number",
|
|
20198
|
+
"description": "Amount in sourceCurrency. Provide either sourceAmount or targetAmount."
|
|
20199
|
+
},
|
|
20200
|
+
"targetAmount": {
|
|
20201
|
+
"type": "number",
|
|
20202
|
+
"description": "Amount in targetCurrency. Provide either sourceAmount or targetAmount."
|
|
20203
|
+
},
|
|
20204
|
+
"payOut": {
|
|
20205
|
+
"type": "string",
|
|
20206
|
+
"description": "Wise payout method such as BANK_TRANSFER or BALANCE."
|
|
20207
|
+
},
|
|
20208
|
+
"preferredPayIn": {
|
|
20209
|
+
"type": "string",
|
|
20210
|
+
"description": "Optional preferred pay-in method such as BALANCE."
|
|
20211
|
+
},
|
|
20212
|
+
"targetAccount": {
|
|
20213
|
+
"type": [
|
|
20214
|
+
"integer",
|
|
20215
|
+
"string"
|
|
20216
|
+
],
|
|
20217
|
+
"description": "Optional recipient account ID to attach to the quote."
|
|
20218
|
+
}
|
|
20219
|
+
},
|
|
20220
|
+
"required": [
|
|
20221
|
+
"profileId",
|
|
20222
|
+
"sourceCurrency",
|
|
20223
|
+
"targetCurrency"
|
|
20224
|
+
],
|
|
20225
|
+
"additionalProperties": false
|
|
20226
|
+
},
|
|
20227
|
+
"handlerCode": "async (input) => {\n if (input.sourceAmount === undefined && input.targetAmount === undefined)\n throw new Error('Provide sourceAmount or targetAmount')\n\n const summarizeQuote = quote => ({\n quoteId: quote?.id,\n profileId: quote?.profile,\n sourceCurrency: quote?.sourceCurrency,\n targetCurrency: quote?.targetCurrency,\n sourceAmount: quote?.sourceAmount,\n targetAmount: quote?.targetAmount,\n payOut: quote?.payOut,\n rate: quote?.rate,\n fee: quote?.fee,\n targetAccount: quote?.targetAccount,\n rateExpirationTime: quote?.rateExpirationTime,\n paymentOptions: Array.isArray(quote?.paymentOptions)\n ? quote.paymentOptions.map(option => ({\n payIn: option.payIn,\n payOut: option.payOut,\n sourceAmount: option.sourceAmount,\n targetAmount: option.targetAmount,\n fee: option.fee,\n estimatedDelivery: option.estimatedDelivery,\n }))\n : [],\n createdTime: quote?.createdTime,\n })\n\n const body = {\n sourceCurrency: String(input.sourceCurrency).toUpperCase(),\n targetCurrency: String(input.targetCurrency).toUpperCase(),\n ...(input.sourceAmount !== undefined ? { sourceAmount: input.sourceAmount } : {}),\n ...(input.targetAmount !== undefined ? { targetAmount: input.targetAmount } : {}),\n ...(input.payOut ? { payOut: input.payOut } : {}),\n ...(input.preferredPayIn ? { preferredPayIn: input.preferredPayIn } : {}),\n ...(input.targetAccount !== undefined ? { targetAccount: input.targetAccount } : {}),\n }\n\n const res = await integration.post(`/v3/profiles/${encodeURIComponent(input.profileId)}/quotes`, body)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const quote = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n return { quote: summarizeQuote(quote) }\n}",
|
|
20228
|
+
"scope": "write",
|
|
20229
|
+
"toolset": "send_money",
|
|
20230
|
+
"injectFromConfig": {
|
|
20231
|
+
"profileId": "profileId"
|
|
20232
|
+
}
|
|
20233
|
+
},
|
|
20234
|
+
{
|
|
20235
|
+
"name": "get_quote",
|
|
20236
|
+
"description": "Get a Wise quote by quoteId for the connected profile, including rate, fees, delivery estimates, and pay-in/pay-out options.",
|
|
20237
|
+
"inputSchema": {
|
|
20238
|
+
"type": "object",
|
|
20239
|
+
"properties": {
|
|
20240
|
+
"profileId": {
|
|
20241
|
+
"type": [
|
|
20242
|
+
"integer",
|
|
20243
|
+
"string"
|
|
20244
|
+
],
|
|
20245
|
+
"description": "Wise profile ID that owns the quote."
|
|
20246
|
+
},
|
|
20247
|
+
"quoteId": {
|
|
20248
|
+
"type": "string",
|
|
20249
|
+
"description": "Wise quote UUID."
|
|
20250
|
+
}
|
|
20251
|
+
},
|
|
20252
|
+
"required": [
|
|
20253
|
+
"profileId",
|
|
20254
|
+
"quoteId"
|
|
20255
|
+
],
|
|
20256
|
+
"additionalProperties": false
|
|
20257
|
+
},
|
|
20258
|
+
"handlerCode": "async (input) => {\n const summarizeQuote = quote => ({\n quoteId: quote?.id,\n profileId: quote?.profile,\n sourceCurrency: quote?.sourceCurrency,\n targetCurrency: quote?.targetCurrency,\n sourceAmount: quote?.sourceAmount,\n targetAmount: quote?.targetAmount,\n payOut: quote?.payOut,\n rate: quote?.rate,\n fee: quote?.fee,\n targetAccount: quote?.targetAccount,\n rateExpirationTime: quote?.rateExpirationTime,\n paymentOptions: Array.isArray(quote?.paymentOptions)\n ? quote.paymentOptions.map(option => ({\n payIn: option.payIn,\n payOut: option.payOut,\n sourceAmount: option.sourceAmount,\n targetAmount: option.targetAmount,\n fee: option.fee,\n estimatedDelivery: option.estimatedDelivery,\n }))\n : [],\n createdTime: quote?.createdTime,\n })\n\n const res = await integration.get(`/v3/profiles/${encodeURIComponent(input.profileId)}/quotes/${encodeURIComponent(input.quoteId)}`)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const quote = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n return { quote: summarizeQuote(quote) }\n}",
|
|
20259
|
+
"scope": "read",
|
|
20260
|
+
"toolset": "send_money",
|
|
20261
|
+
"injectFromConfig": {
|
|
20262
|
+
"profileId": "profileId"
|
|
20263
|
+
}
|
|
20264
|
+
},
|
|
20265
|
+
{
|
|
20266
|
+
"name": "update_quote",
|
|
20267
|
+
"description": "Update a Wise quote for the connected profile, usually to attach targetAccount after creating or selecting a recipient.",
|
|
20268
|
+
"inputSchema": {
|
|
20269
|
+
"type": "object",
|
|
20270
|
+
"properties": {
|
|
20271
|
+
"profileId": {
|
|
20272
|
+
"type": [
|
|
20273
|
+
"integer",
|
|
20274
|
+
"string"
|
|
20275
|
+
],
|
|
20276
|
+
"description": "Wise profile ID that owns the quote."
|
|
20277
|
+
},
|
|
20278
|
+
"quoteId": {
|
|
20279
|
+
"type": "string",
|
|
20280
|
+
"description": "Wise quote UUID."
|
|
20281
|
+
},
|
|
20282
|
+
"targetAccount": {
|
|
20283
|
+
"type": [
|
|
20284
|
+
"integer",
|
|
20285
|
+
"string"
|
|
20286
|
+
],
|
|
20287
|
+
"description": "Recipient account ID to attach to the quote."
|
|
20288
|
+
},
|
|
20289
|
+
"payOut": {
|
|
20290
|
+
"type": "string",
|
|
20291
|
+
"description": "Optional payout method override."
|
|
20292
|
+
},
|
|
20293
|
+
"preferredPayIn": {
|
|
20294
|
+
"type": "string",
|
|
20295
|
+
"description": "Optional pay-in method override."
|
|
20296
|
+
}
|
|
20297
|
+
},
|
|
20298
|
+
"required": [
|
|
20299
|
+
"profileId",
|
|
20300
|
+
"quoteId"
|
|
20301
|
+
],
|
|
20302
|
+
"additionalProperties": false
|
|
20303
|
+
},
|
|
20304
|
+
"handlerCode": "async (input) => {\n const summarizeQuote = quote => ({\n quoteId: quote?.id,\n profileId: quote?.profile,\n sourceCurrency: quote?.sourceCurrency,\n targetCurrency: quote?.targetCurrency,\n sourceAmount: quote?.sourceAmount,\n targetAmount: quote?.targetAmount,\n payOut: quote?.payOut,\n rate: quote?.rate,\n fee: quote?.fee,\n targetAccount: quote?.targetAccount,\n rateExpirationTime: quote?.rateExpirationTime,\n paymentOptions: Array.isArray(quote?.paymentOptions)\n ? quote.paymentOptions.map(option => ({\n payIn: option.payIn,\n payOut: option.payOut,\n sourceAmount: option.sourceAmount,\n targetAmount: option.targetAmount,\n fee: option.fee,\n estimatedDelivery: option.estimatedDelivery,\n }))\n : [],\n })\n\n const body = {\n ...(input.targetAccount !== undefined ? { targetAccount: input.targetAccount } : {}),\n ...(input.payOut ? { payOut: input.payOut } : {}),\n ...(input.preferredPayIn ? { preferredPayIn: input.preferredPayIn } : {}),\n }\n const res = await integration.patch(`/v3/profiles/${encodeURIComponent(input.profileId)}/quotes/${encodeURIComponent(input.quoteId)}`, body)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const quote = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n return { quote: summarizeQuote(quote) }\n}",
|
|
20305
|
+
"scope": "write",
|
|
20306
|
+
"toolset": "send_money",
|
|
20307
|
+
"injectFromConfig": {
|
|
20308
|
+
"profileId": "profileId"
|
|
20309
|
+
}
|
|
20310
|
+
},
|
|
20311
|
+
{
|
|
20312
|
+
"name": "list_recipients",
|
|
20313
|
+
"description": "List Wise recipient accounts for the connected profile with compact identity, currency, and account-summary fields. Filter by currency when possible; use get_recipient for full details.",
|
|
20314
|
+
"inputSchema": {
|
|
20315
|
+
"type": "object",
|
|
20316
|
+
"properties": {
|
|
20317
|
+
"profileId": {
|
|
20318
|
+
"type": [
|
|
20319
|
+
"integer",
|
|
20320
|
+
"string"
|
|
20321
|
+
],
|
|
20322
|
+
"description": "Optional Wise profile ID to filter recipients."
|
|
20323
|
+
},
|
|
20324
|
+
"currency": {
|
|
20325
|
+
"type": "string",
|
|
20326
|
+
"description": "Optional recipient currency filter."
|
|
20327
|
+
},
|
|
20328
|
+
"size": {
|
|
20329
|
+
"type": "integer",
|
|
20330
|
+
"description": "Optional maximum number of recipients to return."
|
|
20331
|
+
},
|
|
20332
|
+
"seekPosition": {
|
|
20333
|
+
"type": "integer",
|
|
20334
|
+
"description": "Optional pagination cursor used by Wise."
|
|
20335
|
+
}
|
|
20336
|
+
},
|
|
20337
|
+
"additionalProperties": false
|
|
20338
|
+
},
|
|
20339
|
+
"handlerCode": "async (input) => {\n const params = new URLSearchParams()\n if (input.profileId !== undefined) params.set('profile', String(input.profileId))\n if (input.currency) params.set('currency', String(input.currency).toUpperCase())\n if (input.size) params.set('size', String(input.size))\n if (input.seekPosition !== undefined) params.set('seekPosition', String(input.seekPosition))\n\n const res = await integration.get(`/v2/accounts${params.toString() ? `?${params}` : ''}`)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const data = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n const recipients = Array.isArray(data?.content) ? data.content : (Array.isArray(data) ? data : [])\n\n const summarizeRecipient = account => ({\n recipientId: account?.id,\n profileId: account?.profile,\n accountHolderName: account?.accountHolderName,\n currency: account?.currency,\n country: account?.country,\n type: account?.type,\n active: account?.active,\n ownedByCustomer: account?.ownedByCustomer,\n legalType: account?.legalType,\n bankName: account?.details?.bankName,\n accountSummary: account?.details?.accountNumber\n ? `...${String(account.details.accountNumber).slice(-4)}`\n : (account?.details?.iban ? `${String(account.details.iban).slice(0, 4)}...${String(account.details.iban).slice(-4)}` : undefined),\n })\n\n return {\n recipients: recipients.map(summarizeRecipient),\n count: recipients.length,\n seekPositionForNext: data?.seekPositionForNext,\n }\n}",
|
|
20340
|
+
"scope": "read",
|
|
20341
|
+
"toolset": "send_money",
|
|
20342
|
+
"injectFromConfig": {
|
|
20343
|
+
"profileId": "profileId"
|
|
20344
|
+
}
|
|
20345
|
+
},
|
|
20346
|
+
{
|
|
20347
|
+
"name": "get_recipient",
|
|
20348
|
+
"description": "Get full details for a Wise recipient account by recipientId. Use this before creating a transfer when you need to confirm bank details or ownership.",
|
|
20349
|
+
"inputSchema": {
|
|
20350
|
+
"type": "object",
|
|
20351
|
+
"properties": {
|
|
20352
|
+
"recipientId": {
|
|
20353
|
+
"type": [
|
|
20354
|
+
"integer",
|
|
20355
|
+
"string"
|
|
20356
|
+
],
|
|
20357
|
+
"description": "Wise recipient account ID."
|
|
20358
|
+
}
|
|
20359
|
+
},
|
|
20360
|
+
"required": [
|
|
20361
|
+
"recipientId"
|
|
20362
|
+
],
|
|
20363
|
+
"additionalProperties": false
|
|
20364
|
+
},
|
|
20365
|
+
"handlerCode": "async (input) => {\n const res = await integration.get(`/v2/accounts/${encodeURIComponent(input.recipientId)}`)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const account = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n\n return {\n recipient: {\n recipientId: account?.id,\n profileId: account?.profile,\n accountHolderName: account?.accountHolderName,\n currency: account?.currency,\n country: account?.country,\n type: account?.type,\n active: account?.active,\n ownedByCustomer: account?.ownedByCustomer,\n legalType: account?.legalType,\n details: account?.details,\n requirements: account?.requirements,\n created: account?.created,\n updated: account?.updated,\n },\n }\n}",
|
|
20366
|
+
"scope": "read",
|
|
20367
|
+
"toolset": "send_money"
|
|
20368
|
+
},
|
|
20369
|
+
{
|
|
20370
|
+
"name": "get_recipient_requirements",
|
|
20371
|
+
"description": "Get Wise's dynamic recipient-account requirements for a quote. Use this when create_recipient_simple needs uncommon banking fields for a country/currency route.",
|
|
20372
|
+
"inputSchema": {
|
|
20373
|
+
"type": "object",
|
|
20374
|
+
"properties": {
|
|
20375
|
+
"quoteId": {
|
|
20376
|
+
"type": "string",
|
|
20377
|
+
"description": "Wise quote UUID whose route determines recipient requirements."
|
|
20378
|
+
}
|
|
20379
|
+
},
|
|
20380
|
+
"required": [
|
|
20381
|
+
"quoteId"
|
|
20382
|
+
],
|
|
20383
|
+
"additionalProperties": false
|
|
20384
|
+
},
|
|
20385
|
+
"handlerCode": "async (input) => {\n const res = await integration.get(`/v1/quotes/${encodeURIComponent(input.quoteId)}/account-requirements`)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const requirements = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n\n return {\n quoteId: input.quoteId,\n requirements,\n }\n}",
|
|
20386
|
+
"scope": "read",
|
|
20387
|
+
"toolset": "send_money"
|
|
20388
|
+
},
|
|
20389
|
+
{
|
|
20390
|
+
"name": "create_recipient_simple",
|
|
20391
|
+
"description": "Create a Wise recipient owned by the connected profile from flat common banking fields such as IBAN, BIC/SWIFT, sort code, account number, routing number, email, or phone.",
|
|
20392
|
+
"inputSchema": {
|
|
20393
|
+
"type": "object",
|
|
20394
|
+
"properties": {
|
|
20395
|
+
"profileId": {
|
|
20396
|
+
"type": [
|
|
20397
|
+
"integer",
|
|
20398
|
+
"string"
|
|
20399
|
+
],
|
|
20400
|
+
"description": "Wise profile ID that owns the recipient."
|
|
20401
|
+
},
|
|
20402
|
+
"accountHolderName": {
|
|
20403
|
+
"type": "string",
|
|
20404
|
+
"description": "Recipient account holder name."
|
|
20405
|
+
},
|
|
20406
|
+
"currency": {
|
|
20407
|
+
"type": "string",
|
|
20408
|
+
"description": "Recipient currency."
|
|
20409
|
+
},
|
|
20410
|
+
"country": {
|
|
20411
|
+
"type": "string",
|
|
20412
|
+
"description": "Recipient bank country code."
|
|
20413
|
+
},
|
|
20414
|
+
"type": {
|
|
20415
|
+
"type": "string",
|
|
20416
|
+
"description": "Optional explicit Wise recipient type. If omitted, the handler infers a common type from supplied fields."
|
|
20417
|
+
},
|
|
20418
|
+
"ownedByCustomer": {
|
|
20419
|
+
"type": "boolean",
|
|
20420
|
+
"description": "Whether this recipient account is owned by the Wise customer."
|
|
20421
|
+
},
|
|
20422
|
+
"legalType": {
|
|
20423
|
+
"type": "string",
|
|
20424
|
+
"enum": [
|
|
20425
|
+
"PRIVATE",
|
|
20426
|
+
"BUSINESS"
|
|
20427
|
+
],
|
|
20428
|
+
"description": "Recipient legal type."
|
|
20429
|
+
},
|
|
20430
|
+
"iban": {
|
|
20431
|
+
"type": "string"
|
|
20432
|
+
},
|
|
20433
|
+
"bic": {
|
|
20434
|
+
"type": "string"
|
|
20435
|
+
},
|
|
20436
|
+
"swiftCode": {
|
|
20437
|
+
"type": "string"
|
|
20438
|
+
},
|
|
20439
|
+
"accountNumber": {
|
|
20440
|
+
"type": "string"
|
|
20441
|
+
},
|
|
20442
|
+
"sortCode": {
|
|
20443
|
+
"type": "string"
|
|
20444
|
+
},
|
|
20445
|
+
"routingNumber": {
|
|
20446
|
+
"type": "string"
|
|
20447
|
+
},
|
|
20448
|
+
"aba": {
|
|
20449
|
+
"type": "string"
|
|
20450
|
+
},
|
|
20451
|
+
"bsbCode": {
|
|
20452
|
+
"type": "string"
|
|
20453
|
+
},
|
|
20454
|
+
"institutionNumber": {
|
|
20455
|
+
"type": "string"
|
|
20456
|
+
},
|
|
20457
|
+
"transitNumber": {
|
|
20458
|
+
"type": "string"
|
|
20459
|
+
},
|
|
20460
|
+
"branchCode": {
|
|
20461
|
+
"type": "string"
|
|
20462
|
+
},
|
|
20463
|
+
"bankCode": {
|
|
20464
|
+
"type": "string"
|
|
20465
|
+
},
|
|
20466
|
+
"clabe": {
|
|
20467
|
+
"type": "string"
|
|
20468
|
+
},
|
|
20469
|
+
"ifscCode": {
|
|
20470
|
+
"type": "string"
|
|
20471
|
+
},
|
|
20472
|
+
"email": {
|
|
20473
|
+
"type": "string"
|
|
20474
|
+
},
|
|
20475
|
+
"phoneNumber": {
|
|
20476
|
+
"type": "string"
|
|
20477
|
+
},
|
|
20478
|
+
"address": {
|
|
20479
|
+
"type": "object",
|
|
20480
|
+
"description": "Optional address fields accepted by Wise for routes that require them.",
|
|
20481
|
+
"additionalProperties": true
|
|
20482
|
+
},
|
|
20483
|
+
"extraFields": {
|
|
20484
|
+
"type": "object",
|
|
20485
|
+
"description": "Additional Wise recipient details fields returned by get_recipient_requirements.",
|
|
20486
|
+
"additionalProperties": true
|
|
20487
|
+
}
|
|
20488
|
+
},
|
|
20489
|
+
"required": [
|
|
20490
|
+
"profileId",
|
|
20491
|
+
"accountHolderName",
|
|
20492
|
+
"currency"
|
|
20493
|
+
],
|
|
20494
|
+
"additionalProperties": false
|
|
20495
|
+
},
|
|
20496
|
+
"handlerCode": "async (input) => {\n const compact = value => typeof value === 'string' ? value.replace(/[\\s-]/g, '') : value\n const currency = String(input.currency).toUpperCase()\n const country = input.country ? String(input.country).toUpperCase() : undefined\n\n const inferType = () => {\n if (input.type) return input.type\n if (input.iban) return 'iban'\n if (currency === 'GBP' && input.sortCode && input.accountNumber) return 'sort_code'\n if (currency === 'USD' && (input.routingNumber || input.aba) && input.accountNumber) return 'aba'\n if (currency === 'AUD' && input.bsbCode && input.accountNumber) return 'australian'\n if (currency === 'CAD' && input.institutionNumber && input.transitNumber && input.accountNumber) return 'canadian'\n if (currency === 'MXN' && input.clabe) return 'clabe'\n if (currency === 'INR' && input.ifscCode && input.accountNumber) return 'indian'\n if (input.swiftCode || input.bic) return 'swift_code'\n if (input.email) return 'email'\n if (input.phoneNumber) return 'mobile_wallet'\n return undefined\n }\n\n const type = inferType()\n if (!type)\n throw new Error('Could not infer Wise recipient type. Provide type or common banking fields such as iban, sortCode+accountNumber, routingNumber+accountNumber, or swiftCode.')\n\n const details = {\n ...(country ? { country } : {}),\n ...(input.legalType ? { legalType: input.legalType } : {}),\n ...(input.iban ? { IBAN: compact(input.iban) } : {}),\n ...(input.bic ? { BIC: compact(input.bic) } : {}),\n ...(input.swiftCode ? { swiftCode: compact(input.swiftCode) } : {}),\n ...(input.accountNumber ? { accountNumber: compact(input.accountNumber) } : {}),\n ...(input.sortCode ? { sortCode: compact(input.sortCode) } : {}),\n ...(input.routingNumber ? { routingNumber: compact(input.routingNumber) } : {}),\n ...(input.aba ? { abartn: compact(input.aba), aba: compact(input.aba) } : {}),\n ...(input.bsbCode ? { bsbCode: compact(input.bsbCode) } : {}),\n ...(input.institutionNumber ? { institutionNumber: compact(input.institutionNumber) } : {}),\n ...(input.transitNumber ? { transitNumber: compact(input.transitNumber) } : {}),\n ...(input.branchCode ? { branchCode: compact(input.branchCode) } : {}),\n ...(input.bankCode ? { bankCode: compact(input.bankCode) } : {}),\n ...(input.clabe ? { clabe: compact(input.clabe) } : {}),\n ...(input.ifscCode ? { ifscCode: compact(input.ifscCode) } : {}),\n ...(input.email ? { email: input.email } : {}),\n ...(input.phoneNumber ? { phoneNumber: input.phoneNumber } : {}),\n ...(input.address ? { address: input.address } : {}),\n ...(input.extraFields || {}),\n }\n\n const body = {\n profile: input.profileId,\n accountHolderName: input.accountHolderName,\n currency,\n type,\n details,\n ...(input.ownedByCustomer !== undefined ? { ownedByCustomer: input.ownedByCustomer } : {}),\n }\n\n const res = await integration.post('/v1/accounts', body)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const account = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n\n return {\n recipient: {\n recipientId: account?.id,\n profileId: account?.profile,\n accountHolderName: account?.accountHolderName,\n currency: account?.currency,\n country: account?.country,\n type: account?.type,\n active: account?.active,\n ownedByCustomer: account?.ownedByCustomer,\n legalType: account?.legalType,\n details: account?.details,\n },\n }\n}",
|
|
20497
|
+
"scope": "write",
|
|
20498
|
+
"toolset": "send_money",
|
|
20499
|
+
"injectFromConfig": {
|
|
20500
|
+
"profileId": "profileId"
|
|
20501
|
+
}
|
|
20502
|
+
},
|
|
20503
|
+
{
|
|
20504
|
+
"name": "deactivate_recipient",
|
|
20505
|
+
"description": "Deactivate a Wise recipient account by recipientId. This removes it from active recipient lists but does not affect historical transfers.",
|
|
20506
|
+
"inputSchema": {
|
|
20507
|
+
"type": "object",
|
|
20508
|
+
"properties": {
|
|
20509
|
+
"recipientId": {
|
|
20510
|
+
"type": [
|
|
20511
|
+
"integer",
|
|
20512
|
+
"string"
|
|
20513
|
+
],
|
|
20514
|
+
"description": "Wise recipient account ID."
|
|
20515
|
+
}
|
|
20516
|
+
},
|
|
20517
|
+
"required": [
|
|
20518
|
+
"recipientId"
|
|
20519
|
+
],
|
|
20520
|
+
"additionalProperties": false
|
|
20521
|
+
},
|
|
20522
|
+
"handlerCode": "async (input) => {\n const res = await integration.delete(`/v1/accounts/${encodeURIComponent(input.recipientId)}`)\n let data = null\n if (res.status !== 204) {\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n if (responseBodyTrimmed)\n data = JSON.parse(responseBodyTrimmed)\n }\n return {\n recipientId: input.recipientId,\n deactivated: res.ok,\n result: data,\n }\n}",
|
|
20523
|
+
"scope": "write",
|
|
20524
|
+
"toolset": "send_money"
|
|
20525
|
+
},
|
|
20526
|
+
{
|
|
20527
|
+
"name": "create_transfer",
|
|
20528
|
+
"description": "Create a Wise transfer order from a quoteId and targetAccountId. This does not send money; it prepares a transfer for the user to fund in Wise within 14 days.",
|
|
20529
|
+
"inputSchema": {
|
|
20530
|
+
"type": "object",
|
|
20531
|
+
"properties": {
|
|
20532
|
+
"targetAccountId": {
|
|
20533
|
+
"type": [
|
|
20534
|
+
"integer",
|
|
20535
|
+
"string"
|
|
20536
|
+
],
|
|
20537
|
+
"description": "Wise recipient account ID."
|
|
20538
|
+
},
|
|
20539
|
+
"quoteId": {
|
|
20540
|
+
"type": "string",
|
|
20541
|
+
"description": "Wise quote UUID."
|
|
20542
|
+
},
|
|
20543
|
+
"reference": {
|
|
20544
|
+
"type": "string",
|
|
20545
|
+
"description": "Payment reference shown to the recipient where supported."
|
|
20546
|
+
},
|
|
20547
|
+
"sourceOfFunds": {
|
|
20548
|
+
"type": "string",
|
|
20549
|
+
"description": "Optional Wise source-of-funds value when required."
|
|
20550
|
+
},
|
|
20551
|
+
"transferPurpose": {
|
|
20552
|
+
"type": "string",
|
|
20553
|
+
"description": "Optional Wise transfer-purpose value when required."
|
|
20554
|
+
},
|
|
20555
|
+
"extraDetails": {
|
|
20556
|
+
"type": "object",
|
|
20557
|
+
"description": "Additional Wise transfer details.",
|
|
20558
|
+
"additionalProperties": true
|
|
20559
|
+
}
|
|
20560
|
+
},
|
|
20561
|
+
"required": [
|
|
20562
|
+
"targetAccountId",
|
|
20563
|
+
"quoteId"
|
|
20564
|
+
],
|
|
20565
|
+
"additionalProperties": false
|
|
20566
|
+
},
|
|
20567
|
+
"handlerCode": "async (input) => {\n const summarizeTransfer = transfer => {\n const transferId = transfer?.id\n return {\n transferId,\n status: transfer?.status,\n targetAccountId: transfer?.targetAccount,\n quoteId: transfer?.quoteUuid,\n customerTransactionId: transfer?.customerTransactionId,\n reference: transfer?.details?.reference,\n sourceCurrency: transfer?.sourceCurrency,\n targetCurrency: transfer?.targetCurrency,\n sourceValue: transfer?.sourceValue,\n targetValue: transfer?.targetValue,\n rate: transfer?.rate,\n created: transfer?.created,\n estimatedDelivery: transfer?.estimatedDelivery,\n fundingUrl: transferId ? `https://wise.com/transfer/${encodeURIComponent(transferId)}` : null,\n requiresAction: 'FUND_IN_WISE_UI',\n nextStep: 'Open Wise to fund this prepared transfer. The Wise API funding endpoint is intentionally not used by this integration.',\n }\n }\n\n const details = {\n ...(input.reference ? { reference: input.reference } : {}),\n ...(input.sourceOfFunds ? { sourceOfFunds: input.sourceOfFunds } : {}),\n ...(input.transferPurpose ? { transferPurpose: input.transferPurpose } : {}),\n ...(input.extraDetails || {}),\n }\n const body = {\n targetAccount: input.targetAccountId,\n quoteUuid: input.quoteId,\n customerTransactionId: uuid.v4(),\n ...(Object.keys(details).length ? { details } : {}),\n }\n\n const res = await integration.post('/v1/transfers', body)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const transfer = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n return { transfer: summarizeTransfer(transfer) }\n}",
|
|
20568
|
+
"scope": "write",
|
|
20569
|
+
"toolset": "send_money"
|
|
20570
|
+
},
|
|
20571
|
+
{
|
|
20572
|
+
"name": "get_transfer",
|
|
20573
|
+
"description": "Get Wise transfer status and tracking details by transferId. Use this to check whether a prepared or funded transfer is waiting, processing, completed, cancelled, or failed.",
|
|
20574
|
+
"inputSchema": {
|
|
20575
|
+
"type": "object",
|
|
20576
|
+
"properties": {
|
|
20577
|
+
"transferId": {
|
|
20578
|
+
"type": [
|
|
20579
|
+
"integer",
|
|
20580
|
+
"string"
|
|
20581
|
+
],
|
|
20582
|
+
"description": "Wise transfer ID."
|
|
20583
|
+
}
|
|
20584
|
+
},
|
|
20585
|
+
"required": [
|
|
20586
|
+
"transferId"
|
|
20587
|
+
],
|
|
20588
|
+
"additionalProperties": false
|
|
20589
|
+
},
|
|
20590
|
+
"handlerCode": "async (input) => {\n const res = await integration.get(`/v1/transfers/${encodeURIComponent(input.transferId)}`)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const transfer = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n const transferId = transfer?.id || input.transferId\n\n return {\n transfer: {\n transferId,\n status: transfer?.status,\n targetAccountId: transfer?.targetAccount,\n quoteId: transfer?.quoteUuid,\n customerTransactionId: transfer?.customerTransactionId,\n reference: transfer?.details?.reference,\n sourceCurrency: transfer?.sourceCurrency,\n targetCurrency: transfer?.targetCurrency,\n sourceValue: transfer?.sourceValue,\n targetValue: transfer?.targetValue,\n rate: transfer?.rate,\n created: transfer?.created,\n estimatedDelivery: transfer?.estimatedDelivery,\n fundingUrl: `https://wise.com/transfer/${encodeURIComponent(transferId)}`,\n },\n }\n}",
|
|
20591
|
+
"scope": "read",
|
|
20592
|
+
"toolset": "send_money"
|
|
20593
|
+
},
|
|
20594
|
+
{
|
|
20595
|
+
"name": "list_transfers",
|
|
20596
|
+
"description": "List Wise transfers for the connected profile with compact status, amount, currency, recipient, and date fields.",
|
|
20597
|
+
"inputSchema": {
|
|
20598
|
+
"type": "object",
|
|
20599
|
+
"properties": {
|
|
20600
|
+
"profileId": {
|
|
20601
|
+
"type": [
|
|
20602
|
+
"integer",
|
|
20603
|
+
"string"
|
|
20604
|
+
],
|
|
20605
|
+
"description": "Optional profile ID to filter transfers."
|
|
20606
|
+
},
|
|
20607
|
+
"status": {
|
|
20608
|
+
"type": "string",
|
|
20609
|
+
"description": "Optional Wise transfer status filter."
|
|
20610
|
+
},
|
|
20611
|
+
"sourceCurrency": {
|
|
20612
|
+
"type": "string",
|
|
20613
|
+
"description": "Optional source currency filter."
|
|
20614
|
+
},
|
|
20615
|
+
"targetCurrency": {
|
|
20616
|
+
"type": "string",
|
|
20617
|
+
"description": "Optional target currency filter."
|
|
20618
|
+
},
|
|
20619
|
+
"createdDateStart": {
|
|
20620
|
+
"type": "string",
|
|
20621
|
+
"description": "Optional ISO date/time lower bound."
|
|
20622
|
+
},
|
|
20623
|
+
"createdDateEnd": {
|
|
20624
|
+
"type": "string",
|
|
20625
|
+
"description": "Optional ISO date/time upper bound."
|
|
20626
|
+
},
|
|
20627
|
+
"limit": {
|
|
20628
|
+
"type": "integer",
|
|
20629
|
+
"description": "Optional maximum transfers to return."
|
|
20630
|
+
},
|
|
20631
|
+
"offset": {
|
|
20632
|
+
"type": "integer",
|
|
20633
|
+
"description": "Optional pagination offset."
|
|
20634
|
+
}
|
|
20635
|
+
},
|
|
20636
|
+
"additionalProperties": false
|
|
20637
|
+
},
|
|
20638
|
+
"handlerCode": "async (input) => {\n const params = new URLSearchParams()\n if (input.profileId !== undefined) params.set('profile', String(input.profileId))\n if (input.status) params.set('status', input.status)\n if (input.sourceCurrency) params.set('sourceCurrency', String(input.sourceCurrency).toUpperCase())\n if (input.targetCurrency) params.set('targetCurrency', String(input.targetCurrency).toUpperCase())\n if (input.createdDateStart) params.set('createdDateStart', input.createdDateStart)\n if (input.createdDateEnd) params.set('createdDateEnd', input.createdDateEnd)\n if (input.limit) params.set('limit', String(input.limit))\n if (input.offset) params.set('offset', String(input.offset))\n\n const res = await integration.get(`/v1/transfers${params.toString() ? `?${params}` : ''}`)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const data = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n const transfers = Array.isArray(data) ? data : (Array.isArray(data?.content) ? data.content : [])\n\n return {\n transfers: transfers.map(transfer => ({\n transferId: transfer?.id,\n status: transfer?.status,\n targetAccountId: transfer?.targetAccount,\n quoteId: transfer?.quoteUuid,\n customerTransactionId: transfer?.customerTransactionId,\n reference: transfer?.details?.reference,\n sourceCurrency: transfer?.sourceCurrency,\n targetCurrency: transfer?.targetCurrency,\n sourceValue: transfer?.sourceValue,\n targetValue: transfer?.targetValue,\n created: transfer?.created,\n estimatedDelivery: transfer?.estimatedDelivery,\n })),\n count: transfers.length,\n }\n}",
|
|
20639
|
+
"scope": "read",
|
|
20640
|
+
"toolset": "send_money",
|
|
20641
|
+
"injectFromConfig": {
|
|
20642
|
+
"profileId": "profileId"
|
|
20643
|
+
}
|
|
20644
|
+
},
|
|
20645
|
+
{
|
|
20646
|
+
"name": "cancel_transfer",
|
|
20647
|
+
"description": "Cancel a Wise transfer that is still in a cancellable state. Use get_transfer first to confirm the current status.",
|
|
20648
|
+
"inputSchema": {
|
|
20649
|
+
"type": "object",
|
|
20650
|
+
"properties": {
|
|
20651
|
+
"transferId": {
|
|
20652
|
+
"type": [
|
|
20653
|
+
"integer",
|
|
20654
|
+
"string"
|
|
20655
|
+
],
|
|
20656
|
+
"description": "Wise transfer ID."
|
|
20657
|
+
}
|
|
20658
|
+
},
|
|
20659
|
+
"required": [
|
|
20660
|
+
"transferId"
|
|
20661
|
+
],
|
|
20662
|
+
"additionalProperties": false
|
|
20663
|
+
},
|
|
20664
|
+
"handlerCode": "async (input) => {\n const res = await integration.put(`/v1/transfers/${encodeURIComponent(input.transferId)}/cancel`, {})\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const transfer = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : {}\n\n return {\n transfer: {\n transferId: transfer?.id || input.transferId,\n status: transfer?.status,\n targetAccountId: transfer?.targetAccount,\n quoteId: transfer?.quoteUuid,\n customerTransactionId: transfer?.customerTransactionId,\n cancelled: transfer?.status === 'cancelled' || transfer?.status === 'cancelled_by_user',\n },\n }\n}",
|
|
20665
|
+
"scope": "write",
|
|
20666
|
+
"toolset": "send_money"
|
|
20667
|
+
},
|
|
20668
|
+
{
|
|
20669
|
+
"name": "send_money",
|
|
20670
|
+
"description": "High-level Wise send-money preparation flow for the connected profile: creates or selects a recipient, creates a quote, creates a transfer order, and returns the Wise funding next step.",
|
|
20671
|
+
"inputSchema": {
|
|
20672
|
+
"type": "object",
|
|
20673
|
+
"properties": {
|
|
20674
|
+
"profileId": {
|
|
20675
|
+
"type": [
|
|
20676
|
+
"integer",
|
|
20677
|
+
"string"
|
|
20678
|
+
],
|
|
20679
|
+
"description": "Wise profile ID that owns the quote and transfer."
|
|
20680
|
+
},
|
|
20681
|
+
"sourceCurrency": {
|
|
20682
|
+
"type": "string"
|
|
20683
|
+
},
|
|
20684
|
+
"targetCurrency": {
|
|
20685
|
+
"type": "string"
|
|
20686
|
+
},
|
|
20687
|
+
"sourceAmount": {
|
|
20688
|
+
"type": "number",
|
|
20689
|
+
"description": "Amount in sourceCurrency. Provide either sourceAmount or targetAmount."
|
|
20690
|
+
},
|
|
20691
|
+
"targetAmount": {
|
|
20692
|
+
"type": "number",
|
|
20693
|
+
"description": "Amount in targetCurrency. Provide either sourceAmount or targetAmount."
|
|
20694
|
+
},
|
|
20695
|
+
"recipientId": {
|
|
20696
|
+
"type": [
|
|
20697
|
+
"integer",
|
|
20698
|
+
"string"
|
|
20699
|
+
],
|
|
20700
|
+
"description": "Existing recipient account ID. If omitted, recipient fields are used to create one."
|
|
20701
|
+
},
|
|
20702
|
+
"recipient": {
|
|
20703
|
+
"type": "object",
|
|
20704
|
+
"description": "Flat recipient fields matching create_recipient_simple when recipientId is omitted.",
|
|
20705
|
+
"additionalProperties": true
|
|
20706
|
+
},
|
|
20707
|
+
"reference": {
|
|
20708
|
+
"type": "string",
|
|
20709
|
+
"description": "Payment reference shown to the recipient where supported."
|
|
20710
|
+
},
|
|
20711
|
+
"payOut": {
|
|
20712
|
+
"type": "string",
|
|
20713
|
+
"description": "Wise payout method. Defaults to BANK_TRANSFER when omitted."
|
|
20714
|
+
},
|
|
20715
|
+
"preferredPayIn": {
|
|
20716
|
+
"type": "string",
|
|
20717
|
+
"description": "Optional preferred pay-in method."
|
|
20718
|
+
}
|
|
20719
|
+
},
|
|
20720
|
+
"required": [
|
|
20721
|
+
"profileId",
|
|
20722
|
+
"sourceCurrency",
|
|
20723
|
+
"targetCurrency"
|
|
20724
|
+
],
|
|
20725
|
+
"additionalProperties": false
|
|
20726
|
+
},
|
|
20727
|
+
"handlerCode": "async (input) => {\n if (input.sourceAmount === undefined && input.targetAmount === undefined)\n throw new Error('Provide sourceAmount or targetAmount')\n if (!input.recipientId && !input.recipient)\n throw new Error('Provide recipientId or recipient fields')\n\n const summarizeQuote = quote => ({\n quoteId: quote?.id,\n sourceCurrency: quote?.sourceCurrency,\n targetCurrency: quote?.targetCurrency,\n sourceAmount: quote?.sourceAmount,\n targetAmount: quote?.targetAmount,\n rate: quote?.rate,\n fee: quote?.fee,\n rateExpirationTime: quote?.rateExpirationTime,\n })\n const summarizeRecipient = account => ({\n recipientId: account?.id,\n accountHolderName: account?.accountHolderName,\n currency: account?.currency,\n type: account?.type,\n active: account?.active,\n accountSummary: account?.details?.accountNumber\n ? `...${String(account.details.accountNumber).slice(-4)}`\n : (account?.details?.iban ? `${String(account.details.iban).slice(0, 4)}...${String(account.details.iban).slice(-4)}` : undefined),\n })\n const summarizeTransfer = transfer => {\n const transferId = transfer?.id\n return {\n transferId,\n status: transfer?.status,\n targetAccountId: transfer?.targetAccount,\n quoteId: transfer?.quoteUuid,\n customerTransactionId: transfer?.customerTransactionId,\n reference: transfer?.details?.reference,\n sourceCurrency: transfer?.sourceCurrency,\n targetCurrency: transfer?.targetCurrency,\n sourceValue: transfer?.sourceValue,\n targetValue: transfer?.targetValue,\n created: transfer?.created,\n estimatedDelivery: transfer?.estimatedDelivery,\n fundingUrl: transferId ? `https://wise.com/transfer/${encodeURIComponent(transferId)}` : null,\n requiresAction: 'FUND_IN_WISE_UI',\n nextStep: 'Open Wise to fund this prepared transfer. This integration intentionally does not call Wise API funding endpoints.',\n }\n }\n\n const quoteBody = {\n sourceCurrency: String(input.sourceCurrency).toUpperCase(),\n targetCurrency: String(input.targetCurrency).toUpperCase(),\n ...(input.sourceAmount !== undefined ? { sourceAmount: input.sourceAmount } : {}),\n ...(input.targetAmount !== undefined ? { targetAmount: input.targetAmount } : {}),\n ...(input.payOut ? { payOut: input.payOut } : {}),\n ...(input.preferredPayIn ? { preferredPayIn: input.preferredPayIn } : {}),\n ...(input.recipientId !== undefined ? { targetAccount: input.recipientId } : {}),\n }\n const quoteRes = await integration.post(`/v3/profiles/${encodeURIComponent(input.profileId)}/quotes`, quoteBody)\n const quoteResponseBodyText = await quoteRes.text()\n const quoteResponseBodyTrimmed = quoteResponseBodyText.trim()\n let quote = quoteResponseBodyTrimmed ? JSON.parse(quoteResponseBodyTrimmed) : null\n if (!quote?.id)\n throw new Error(`Wise quote creation returned no usable quote (HTTP ${typeof quoteRes.status === 'number' ? quoteRes.status : 'unknown'})`)\n\n let recipientId = input.recipientId\n let recipient = null\n if (!recipientId) {\n const data = input.recipient || {}\n const compact = value => typeof value === 'string' ? value.replace(/[\\s-]/g, '') : value\n const currency = String(data.currency || input.targetCurrency).toUpperCase()\n const inferType = () => {\n if (data.type) return data.type\n if (data.iban) return 'iban'\n if (currency === 'GBP' && data.sortCode && data.accountNumber) return 'sort_code'\n if (currency === 'USD' && (data.routingNumber || data.aba) && data.accountNumber) return 'aba'\n if (currency === 'AUD' && data.bsbCode && data.accountNumber) return 'australian'\n if (currency === 'CAD' && data.institutionNumber && data.transitNumber && data.accountNumber) return 'canadian'\n if (currency === 'MXN' && data.clabe) return 'clabe'\n if (currency === 'INR' && data.ifscCode && data.accountNumber) return 'indian'\n if (data.swiftCode || data.bic) return 'swift_code'\n if (data.email) return 'email'\n if (data.phoneNumber) return 'mobile_wallet'\n return undefined\n }\n const type = inferType()\n if (!type)\n throw new Error('Could not infer recipient type. Provide recipient.type or common banking fields.')\n\n const details = {\n ...(data.country ? { country: String(data.country).toUpperCase() } : {}),\n ...(data.legalType ? { legalType: data.legalType } : {}),\n ...(data.iban ? { IBAN: compact(data.iban) } : {}),\n ...(data.bic ? { BIC: compact(data.bic) } : {}),\n ...(data.swiftCode ? { swiftCode: compact(data.swiftCode) } : {}),\n ...(data.accountNumber ? { accountNumber: compact(data.accountNumber) } : {}),\n ...(data.sortCode ? { sortCode: compact(data.sortCode) } : {}),\n ...(data.routingNumber ? { routingNumber: compact(data.routingNumber) } : {}),\n ...(data.aba ? { abartn: compact(data.aba), aba: compact(data.aba) } : {}),\n ...(data.bsbCode ? { bsbCode: compact(data.bsbCode) } : {}),\n ...(data.institutionNumber ? { institutionNumber: compact(data.institutionNumber) } : {}),\n ...(data.transitNumber ? { transitNumber: compact(data.transitNumber) } : {}),\n ...(data.branchCode ? { branchCode: compact(data.branchCode) } : {}),\n ...(data.bankCode ? { bankCode: compact(data.bankCode) } : {}),\n ...(data.clabe ? { clabe: compact(data.clabe) } : {}),\n ...(data.ifscCode ? { ifscCode: compact(data.ifscCode) } : {}),\n ...(data.email ? { email: data.email } : {}),\n ...(data.phoneNumber ? { phoneNumber: data.phoneNumber } : {}),\n ...(data.address ? { address: data.address } : {}),\n ...(data.extraFields || {}),\n }\n const recipientBody = {\n profile: input.profileId,\n accountHolderName: data.accountHolderName,\n currency,\n type,\n details,\n ...(data.ownedByCustomer !== undefined ? { ownedByCustomer: data.ownedByCustomer } : {}),\n }\n const recipientRes = await integration.post('/v1/accounts', recipientBody)\n const recipientResponseBodyText = await recipientRes.text()\n const recipientResponseBodyTrimmed = recipientResponseBodyText.trim()\n recipient = recipientResponseBodyTrimmed ? JSON.parse(recipientResponseBodyTrimmed) : null\n recipientId = recipient?.id\n if (!recipientId)\n throw new Error('Wise recipient creation did not return an id')\n\n const updateRes = await integration.patch(`/v3/profiles/${encodeURIComponent(input.profileId)}/quotes/${encodeURIComponent(quote.id)}`, {\n targetAccount: recipientId,\n })\n const quoteUpdateResponseBodyText = await updateRes.text()\n const quoteUpdateResponseBodyTrimmed = quoteUpdateResponseBodyText.trim()\n quote = quoteUpdateResponseBodyTrimmed ? JSON.parse(quoteUpdateResponseBodyTrimmed) : null\n if (!quote?.id)\n throw new Error(`Wise quote update returned no usable quote (HTTP ${typeof updateRes.status === 'number' ? updateRes.status : 'unknown'})`)\n }\n else {\n const recipientRes = await integration.get(`/v2/accounts/${encodeURIComponent(recipientId)}`)\n const existingRecipientResponseBodyText = await recipientRes.text()\n const existingRecipientResponseBodyTrimmed = existingRecipientResponseBodyText.trim()\n recipient = existingRecipientResponseBodyTrimmed ? JSON.parse(existingRecipientResponseBodyTrimmed) : null\n }\n\n const transferDetails = input.reference ? { reference: input.reference } : {}\n const transferBody = {\n targetAccount: recipientId,\n quoteUuid: quote.id,\n customerTransactionId: uuid.v4(),\n ...(Object.keys(transferDetails).length ? { details: transferDetails } : {}),\n }\n const transferRes = await integration.post('/v1/transfers', transferBody)\n const transferResponseBodyText = await transferRes.text()\n const transferResponseBodyTrimmed = transferResponseBodyText.trim()\n const transfer = transferResponseBodyTrimmed ? JSON.parse(transferResponseBodyTrimmed) : null\n if (!transfer?.id)\n throw new Error(`Wise transfer creation returned no usable transfer (HTTP ${typeof transferRes.status === 'number' ? transferRes.status : 'unknown'})`)\n\n return {\n quote: summarizeQuote(quote),\n recipient: summarizeRecipient(recipient),\n transfer: summarizeTransfer(transfer),\n funding: {\n required: true,\n method: 'WISE_UI',\n url: transfer?.id ? `https://wise.com/transfer/${encodeURIComponent(transfer.id)}` : null,\n note: 'The transfer has been prepared but not funded. The user must approve and fund it in Wise.',\n },\n }\n}",
|
|
20728
|
+
"scope": "write",
|
|
20729
|
+
"toolset": "send_money",
|
|
20730
|
+
"injectFromConfig": {
|
|
20731
|
+
"profileId": "profileId"
|
|
20732
|
+
}
|
|
20733
|
+
},
|
|
20734
|
+
{
|
|
20735
|
+
"name": "list_balances",
|
|
20736
|
+
"description": "List Wise multi-currency balances for the connected profile, including standard balances and savings jars.",
|
|
20737
|
+
"inputSchema": {
|
|
20738
|
+
"type": "object",
|
|
20739
|
+
"properties": {
|
|
20740
|
+
"profileId": {
|
|
20741
|
+
"type": [
|
|
20742
|
+
"integer",
|
|
20743
|
+
"string"
|
|
20744
|
+
],
|
|
20745
|
+
"description": "Wise profile ID."
|
|
20746
|
+
},
|
|
20747
|
+
"types": {
|
|
20748
|
+
"type": "array",
|
|
20749
|
+
"items": {
|
|
20750
|
+
"type": "string",
|
|
20751
|
+
"enum": [
|
|
20752
|
+
"STANDARD",
|
|
20753
|
+
"SAVINGS"
|
|
20754
|
+
]
|
|
20755
|
+
},
|
|
20756
|
+
"description": "Balance types to include. Defaults to STANDARD and SAVINGS."
|
|
20757
|
+
}
|
|
20758
|
+
},
|
|
20759
|
+
"required": [
|
|
20760
|
+
"profileId"
|
|
20761
|
+
],
|
|
20762
|
+
"additionalProperties": false
|
|
20763
|
+
},
|
|
20764
|
+
"handlerCode": "async (input) => {\n const params = new URLSearchParams()\n const types = Array.isArray(input.types) && input.types.length ? input.types : ['STANDARD', 'SAVINGS']\n params.set('types', types.join(','))\n\n const res = await integration.get(`/v4/profiles/${encodeURIComponent(input.profileId)}/balances?${params}`)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const data = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n const balances = Array.isArray(data) ? data : []\n\n return {\n balances: balances.map(balance => ({\n balanceId: balance?.id,\n currency: balance?.currency,\n type: balance?.type,\n name: balance?.name,\n amount: balance?.amount?.value ?? balance?.amount,\n reservedAmount: balance?.reservedAmount?.value ?? balance?.reservedAmount,\n cashAmount: balance?.cashAmount?.value ?? balance?.cashAmount,\n totalWorth: balance?.totalWorth?.value ?? balance?.totalWorth,\n investmentState: balance?.investmentState,\n creationTime: balance?.creationTime,\n modificationTime: balance?.modificationTime,\n })),\n count: balances.length,\n }\n}",
|
|
20765
|
+
"scope": "read",
|
|
20766
|
+
"toolset": "balances",
|
|
20767
|
+
"injectFromConfig": {
|
|
20768
|
+
"profileId": "profileId"
|
|
20769
|
+
}
|
|
20770
|
+
},
|
|
20771
|
+
{
|
|
20772
|
+
"name": "get_balance",
|
|
20773
|
+
"description": "Get a Wise balance by balanceId for the connected profile, including currency, type, name, and available amount.",
|
|
20774
|
+
"inputSchema": {
|
|
20775
|
+
"type": "object",
|
|
20776
|
+
"properties": {
|
|
20777
|
+
"profileId": {
|
|
20778
|
+
"type": [
|
|
20779
|
+
"integer",
|
|
20780
|
+
"string"
|
|
20781
|
+
],
|
|
20782
|
+
"description": "Wise profile ID."
|
|
20783
|
+
},
|
|
20784
|
+
"balanceId": {
|
|
20785
|
+
"type": [
|
|
20786
|
+
"integer",
|
|
20787
|
+
"string"
|
|
20788
|
+
],
|
|
20789
|
+
"description": "Wise balance ID."
|
|
20790
|
+
}
|
|
20791
|
+
},
|
|
20792
|
+
"required": [
|
|
20793
|
+
"profileId",
|
|
20794
|
+
"balanceId"
|
|
20795
|
+
],
|
|
20796
|
+
"additionalProperties": false
|
|
20797
|
+
},
|
|
20798
|
+
"handlerCode": "async (input) => {\n const res = await integration.get(`/v4/profiles/${encodeURIComponent(input.profileId)}/balances/${encodeURIComponent(input.balanceId)}`)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const balance = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n\n return {\n balance: {\n balanceId: balance?.id,\n currency: balance?.currency,\n type: balance?.type,\n name: balance?.name,\n amount: balance?.amount?.value ?? balance?.amount,\n reservedAmount: balance?.reservedAmount?.value ?? balance?.reservedAmount,\n cashAmount: balance?.cashAmount?.value ?? balance?.cashAmount,\n totalWorth: balance?.totalWorth?.value ?? balance?.totalWorth,\n investmentState: balance?.investmentState,\n creationTime: balance?.creationTime,\n modificationTime: balance?.modificationTime,\n details: balance,\n },\n }\n}",
|
|
20799
|
+
"scope": "read",
|
|
20800
|
+
"toolset": "balances",
|
|
20801
|
+
"injectFromConfig": {
|
|
20802
|
+
"profileId": "profileId"
|
|
20803
|
+
}
|
|
20804
|
+
},
|
|
20805
|
+
{
|
|
20806
|
+
"name": "create_balance",
|
|
20807
|
+
"description": "Open a Wise balance for a currency or create a named savings jar on the connected profile.",
|
|
20808
|
+
"inputSchema": {
|
|
20809
|
+
"type": "object",
|
|
20810
|
+
"properties": {
|
|
20811
|
+
"profileId": {
|
|
20812
|
+
"type": [
|
|
20813
|
+
"integer",
|
|
20814
|
+
"string"
|
|
20815
|
+
],
|
|
20816
|
+
"description": "Wise profile ID."
|
|
20817
|
+
},
|
|
20818
|
+
"currency": {
|
|
20819
|
+
"type": "string",
|
|
20820
|
+
"description": "Currency code for the new balance."
|
|
20821
|
+
},
|
|
20822
|
+
"type": {
|
|
20823
|
+
"type": "string",
|
|
20824
|
+
"enum": [
|
|
20825
|
+
"STANDARD",
|
|
20826
|
+
"SAVINGS"
|
|
20827
|
+
],
|
|
20828
|
+
"description": "Balance type. STANDARD is the default account; SAVINGS is a jar."
|
|
20829
|
+
},
|
|
20830
|
+
"name": {
|
|
20831
|
+
"type": "string",
|
|
20832
|
+
"description": "Required by Wise for SAVINGS balances."
|
|
20833
|
+
}
|
|
20834
|
+
},
|
|
20835
|
+
"required": [
|
|
20836
|
+
"profileId",
|
|
20837
|
+
"currency",
|
|
20838
|
+
"type"
|
|
20839
|
+
],
|
|
20840
|
+
"additionalProperties": false
|
|
20841
|
+
},
|
|
20842
|
+
"handlerCode": "async (input) => {\n const body = {\n currency: String(input.currency).toUpperCase(),\n type: input.type,\n ...(input.name ? { name: input.name } : {}),\n }\n const res = await integration.post(`/v4/profiles/${encodeURIComponent(input.profileId)}/balances`, body, {\n headers: {\n 'X-idempotence-uuid': uuid.v4(),\n },\n })\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const balance = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n\n return {\n balance: {\n balanceId: balance?.id,\n currency: balance?.currency,\n type: balance?.type,\n name: balance?.name,\n amount: balance?.amount?.value ?? balance?.amount,\n investmentState: balance?.investmentState,\n creationTime: balance?.creationTime,\n },\n }\n}",
|
|
20843
|
+
"scope": "write",
|
|
20844
|
+
"toolset": "balances",
|
|
20845
|
+
"injectFromConfig": {
|
|
20846
|
+
"profileId": "profileId"
|
|
20847
|
+
}
|
|
20848
|
+
},
|
|
20849
|
+
{
|
|
20850
|
+
"name": "move_money_between_balances",
|
|
20851
|
+
"description": "Move or convert money between Wise balances on the connected profile. For cross-currency moves, create a BALANCE payOut quote first and provide quoteId.",
|
|
20852
|
+
"inputSchema": {
|
|
20853
|
+
"type": "object",
|
|
20854
|
+
"properties": {
|
|
20855
|
+
"profileId": {
|
|
20856
|
+
"type": [
|
|
20857
|
+
"integer",
|
|
20858
|
+
"string"
|
|
20859
|
+
],
|
|
20860
|
+
"description": "Wise profile ID."
|
|
20861
|
+
},
|
|
20862
|
+
"sourceBalanceId": {
|
|
20863
|
+
"type": [
|
|
20864
|
+
"integer",
|
|
20865
|
+
"string"
|
|
20866
|
+
],
|
|
20867
|
+
"description": "Balance ID to move money from."
|
|
20868
|
+
},
|
|
20869
|
+
"targetBalanceId": {
|
|
20870
|
+
"type": [
|
|
20871
|
+
"integer",
|
|
20872
|
+
"string"
|
|
20873
|
+
],
|
|
20874
|
+
"description": "Balance ID to move money to."
|
|
20875
|
+
},
|
|
20876
|
+
"amount": {
|
|
20877
|
+
"type": "number",
|
|
20878
|
+
"description": "Amount to move when not using quoteId."
|
|
20879
|
+
},
|
|
20880
|
+
"currency": {
|
|
20881
|
+
"type": "string",
|
|
20882
|
+
"description": "Currency for amount when not using quoteId."
|
|
20883
|
+
},
|
|
20884
|
+
"quoteId": {
|
|
20885
|
+
"type": "string",
|
|
20886
|
+
"description": "Quote ID for cross-currency balance movement."
|
|
20887
|
+
},
|
|
20888
|
+
"reference": {
|
|
20889
|
+
"type": "string",
|
|
20890
|
+
"description": "Optional movement reference."
|
|
20891
|
+
}
|
|
20892
|
+
},
|
|
20893
|
+
"required": [
|
|
20894
|
+
"profileId",
|
|
20895
|
+
"sourceBalanceId",
|
|
20896
|
+
"targetBalanceId"
|
|
20897
|
+
],
|
|
20898
|
+
"additionalProperties": false
|
|
20899
|
+
},
|
|
20900
|
+
"handlerCode": "async (input) => {\n if (!input.quoteId && (input.amount === undefined || !input.currency))\n throw new Error('Provide quoteId for cross-currency movement, or amount and currency for same-currency movement')\n\n const body = {\n sourceBalanceId: input.sourceBalanceId,\n targetBalanceId: input.targetBalanceId,\n ...(input.quoteId ? { quoteId: input.quoteId } : {}),\n ...(input.amount !== undefined ? { amount: { value: input.amount, currency: String(input.currency).toUpperCase() } } : {}),\n ...(input.reference ? { reference: input.reference } : {}),\n }\n\n const res = await integration.post(`/v2/profiles/${encodeURIComponent(input.profileId)}/balance-movements`, body, {\n headers: {\n 'X-idempotence-uuid': uuid.v4(),\n },\n })\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const movement = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n\n return {\n movement: {\n movementId: movement?.id,\n status: movement?.status,\n sourceBalanceId: movement?.sourceBalanceId ?? input.sourceBalanceId,\n targetBalanceId: movement?.targetBalanceId ?? input.targetBalanceId,\n quoteId: movement?.quoteId ?? input.quoteId,\n amount: movement?.amount,\n createdTime: movement?.createdTime,\n details: movement,\n },\n }\n}",
|
|
20901
|
+
"scope": "write",
|
|
20902
|
+
"toolset": "balances",
|
|
20903
|
+
"injectFromConfig": {
|
|
20904
|
+
"profileId": "profileId"
|
|
20905
|
+
}
|
|
20906
|
+
},
|
|
20907
|
+
{
|
|
20908
|
+
"name": "get_total_funds",
|
|
20909
|
+
"description": "Get total account funds across Wise balances for the connected profile valued in a target currency.",
|
|
20910
|
+
"inputSchema": {
|
|
20911
|
+
"type": "object",
|
|
20912
|
+
"properties": {
|
|
20913
|
+
"profileId": {
|
|
20914
|
+
"type": [
|
|
20915
|
+
"integer",
|
|
20916
|
+
"string"
|
|
20917
|
+
],
|
|
20918
|
+
"description": "Wise profile ID."
|
|
20919
|
+
},
|
|
20920
|
+
"currency": {
|
|
20921
|
+
"type": "string",
|
|
20922
|
+
"description": "Currency to value total funds in."
|
|
20923
|
+
}
|
|
20924
|
+
},
|
|
20925
|
+
"required": [
|
|
20926
|
+
"profileId",
|
|
20927
|
+
"currency"
|
|
20928
|
+
],
|
|
20929
|
+
"additionalProperties": false
|
|
20930
|
+
},
|
|
20931
|
+
"handlerCode": "async (input) => {\n const res = await integration.get(`/v1/profiles/${encodeURIComponent(input.profileId)}/total-funds/${encodeURIComponent(String(input.currency).toUpperCase())}`)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const funds = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n\n return {\n profileId: input.profileId,\n currency: String(input.currency).toUpperCase(),\n totalWorth: funds?.totalWorth,\n totalAvailable: funds?.totalAvailable,\n totalCash: funds?.totalCash,\n overdraft: funds?.overdraft,\n details: funds,\n }\n}",
|
|
20932
|
+
"scope": "read",
|
|
20933
|
+
"toolset": "balances",
|
|
20934
|
+
"injectFromConfig": {
|
|
20935
|
+
"profileId": "profileId"
|
|
20936
|
+
}
|
|
20937
|
+
},
|
|
20938
|
+
{
|
|
20939
|
+
"name": "list_account_details",
|
|
20940
|
+
"description": "List Wise local and international account details for the connected profile, including receive options and example details where available.",
|
|
20941
|
+
"inputSchema": {
|
|
20942
|
+
"type": "object",
|
|
20943
|
+
"properties": {
|
|
20944
|
+
"profileId": {
|
|
20945
|
+
"type": [
|
|
20946
|
+
"integer",
|
|
20947
|
+
"string"
|
|
20948
|
+
],
|
|
20949
|
+
"description": "Wise personal or business profile ID."
|
|
20950
|
+
}
|
|
20951
|
+
},
|
|
20952
|
+
"required": [
|
|
20953
|
+
"profileId"
|
|
20954
|
+
],
|
|
20955
|
+
"additionalProperties": false
|
|
20956
|
+
},
|
|
20957
|
+
"handlerCode": "async (input) => {\n const res = await integration.get(`/v1/profiles/${encodeURIComponent(input.profileId)}/account-details`)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const data = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n const details = Array.isArray(data) ? data : []\n\n return {\n accountDetails: details.map(item => ({\n id: item?.id,\n currency: item?.currency,\n title: item?.title,\n type: item?.type,\n status: item?.status,\n active: item?.active,\n accountHolderName: item?.accountHolderName,\n receiveOptions: item?.receiveOptions,\n details: item?.details,\n })),\n count: details.length,\n }\n}",
|
|
20958
|
+
"scope": "read",
|
|
20959
|
+
"toolset": "receive_money",
|
|
20960
|
+
"injectFromConfig": {
|
|
20961
|
+
"profileId": "profileId"
|
|
20962
|
+
}
|
|
20963
|
+
},
|
|
20964
|
+
{
|
|
20965
|
+
"name": "create_account_details_order",
|
|
20966
|
+
"description": "Order Wise account details for a currency on the connected profile. The resulting order may require verification or top-up steps in Wise.",
|
|
20967
|
+
"inputSchema": {
|
|
20968
|
+
"type": "object",
|
|
20969
|
+
"properties": {
|
|
20970
|
+
"profileId": {
|
|
20971
|
+
"type": [
|
|
20972
|
+
"integer",
|
|
20973
|
+
"string"
|
|
20974
|
+
],
|
|
20975
|
+
"description": "Wise profile ID."
|
|
20976
|
+
},
|
|
20977
|
+
"currency": {
|
|
20978
|
+
"type": "string",
|
|
20979
|
+
"description": "Currency to order receiving account details for."
|
|
20980
|
+
}
|
|
20981
|
+
},
|
|
20982
|
+
"required": [
|
|
20983
|
+
"profileId",
|
|
20984
|
+
"currency"
|
|
20985
|
+
],
|
|
20986
|
+
"additionalProperties": false
|
|
20987
|
+
},
|
|
20988
|
+
"handlerCode": "async (input) => {\n const res = await integration.post(`/v1/profiles/${encodeURIComponent(input.profileId)}/account-details-orders`, {\n currency: String(input.currency).toUpperCase(),\n })\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const order = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n\n return {\n order: {\n orderId: order?.id,\n currency: order?.currency,\n status: order?.status,\n requirements: order?.requirements,\n details: order,\n },\n }\n}",
|
|
20989
|
+
"scope": "write",
|
|
20990
|
+
"toolset": "receive_money",
|
|
20991
|
+
"injectFromConfig": {
|
|
20992
|
+
"profileId": "profileId"
|
|
20993
|
+
}
|
|
20994
|
+
},
|
|
20995
|
+
{
|
|
20996
|
+
"name": "list_account_details_orders",
|
|
20997
|
+
"description": "List Wise account-details orders for the connected profile and a currency (Wise requires the currency query parameter).",
|
|
20998
|
+
"inputSchema": {
|
|
20999
|
+
"type": "object",
|
|
21000
|
+
"properties": {
|
|
21001
|
+
"profileId": {
|
|
21002
|
+
"type": [
|
|
21003
|
+
"integer",
|
|
21004
|
+
"string"
|
|
21005
|
+
],
|
|
21006
|
+
"description": "Wise personal or business profile ID."
|
|
21007
|
+
},
|
|
21008
|
+
"currency": {
|
|
21009
|
+
"type": "string",
|
|
21010
|
+
"description": "ISO currency code; Wise requires this query parameter when listing account-details orders (e.g. GBP, EUR)."
|
|
21011
|
+
}
|
|
21012
|
+
},
|
|
21013
|
+
"required": [
|
|
21014
|
+
"profileId",
|
|
21015
|
+
"currency"
|
|
21016
|
+
],
|
|
21017
|
+
"additionalProperties": false
|
|
21018
|
+
},
|
|
21019
|
+
"handlerCode": "async (input) => {\n const currency = encodeURIComponent(String(input.currency).toUpperCase())\n const res = await integration.get(`/v3/profiles/${encodeURIComponent(input.profileId)}/account-details-orders?currency=${currency}`)\n const responseBodyText = await res.text()\n const responseBodyTrimmed = responseBodyText.trim()\n const data = responseBodyTrimmed ? JSON.parse(responseBodyTrimmed) : null\n const orders = Array.isArray(data) ? data : []\n\n return {\n orders: orders.map(order => ({\n orderId: order?.id,\n currency: order?.currency,\n status: order?.status,\n requirements: order?.requirements,\n createdTime: order?.createdTime,\n updatedTime: order?.updatedTime,\n })),\n count: orders.length,\n }\n}",
|
|
21020
|
+
"scope": "read",
|
|
21021
|
+
"toolset": "receive_money",
|
|
21022
|
+
"injectFromConfig": {
|
|
21023
|
+
"profileId": "profileId"
|
|
21024
|
+
}
|
|
21025
|
+
}
|
|
21026
|
+
],
|
|
21027
|
+
"variantOwnerType": "wise"
|
|
21028
|
+
},
|
|
21029
|
+
"xero": {
|
|
21030
|
+
"manifest": {
|
|
21031
|
+
"name": "xero",
|
|
21032
|
+
"version": "0.1.0",
|
|
21033
|
+
"baseUrl": "https://api.xero.com",
|
|
21034
|
+
"toolsets": {
|
|
21035
|
+
"accounting": {
|
|
21036
|
+
"label": "Accounting",
|
|
21037
|
+
"description": "Work with Xero contacts, items, invoices, payments, bank transactions, journals, and attachments"
|
|
21038
|
+
},
|
|
21039
|
+
"reports": {
|
|
21040
|
+
"label": "Reports",
|
|
21041
|
+
"description": "Read Xero financial reports such as profit and loss, balance sheet, trial balance, and aged reports"
|
|
21042
|
+
}
|
|
21043
|
+
},
|
|
21044
|
+
"tools": [
|
|
21045
|
+
{
|
|
21046
|
+
"name": "list_connections",
|
|
21047
|
+
"description": "List Xero tenant connections available to the current token. Use this for public OAuth integrations to discover tenantId values; Custom Connections are single-organisation and usually do not require tenantId.",
|
|
21048
|
+
"inputSchema": "schemas/empty.json",
|
|
21049
|
+
"handler": "handlers/list_connections.js",
|
|
21050
|
+
"scope": "read"
|
|
21051
|
+
},
|
|
21052
|
+
{
|
|
21053
|
+
"name": "get_organisation",
|
|
21054
|
+
"description": "Get the connected Xero organisation profile and settings. For public OAuth, provide tenantId from list_connections; for Custom Connections omit tenantId.",
|
|
21055
|
+
"inputSchema": "schemas/tenant_optional.json",
|
|
21056
|
+
"handler": "handlers/get_organisation.js",
|
|
21057
|
+
"scope": "read"
|
|
21058
|
+
},
|
|
21059
|
+
{
|
|
21060
|
+
"name": "list_accounts",
|
|
21061
|
+
"description": "List chart of accounts with account IDs, codes, names, types, status, and tax type. Use this before creating payments, bank transactions, or journals.",
|
|
21062
|
+
"inputSchema": "schemas/list_accounts.json",
|
|
21063
|
+
"handler": "handlers/list_accounts.js",
|
|
21064
|
+
"scope": "read"
|
|
21065
|
+
},
|
|
21066
|
+
{
|
|
21067
|
+
"name": "list_tax_rates",
|
|
21068
|
+
"description": "List tax rates available in the connected organisation. Use this to discover valid tax type values for invoice, item, and bank transaction lines.",
|
|
21069
|
+
"inputSchema": "schemas/tenant_optional.json",
|
|
21070
|
+
"handler": "handlers/list_tax_rates.js",
|
|
21071
|
+
"scope": "read"
|
|
21072
|
+
},
|
|
21073
|
+
{
|
|
21074
|
+
"name": "list_tracking_categories",
|
|
21075
|
+
"description": "List tracking categories and active options. Use this before adding tracking to invoice, journal, or bank transaction lines.",
|
|
21076
|
+
"inputSchema": "schemas/tenant_optional.json",
|
|
21077
|
+
"handler": "handlers/list_tracking_categories.js",
|
|
21078
|
+
"scope": "read"
|
|
21079
|
+
},
|
|
21080
|
+
{
|
|
21081
|
+
"name": "list_contact_groups",
|
|
21082
|
+
"description": "List contact groups, or provide contactGroupId to fetch one group with contacts. Use this when users ask about Xero customer/supplier groupings.",
|
|
21083
|
+
"inputSchema": "schemas/contact_group_list.json",
|
|
21084
|
+
"handler": "handlers/list_contact_groups.js",
|
|
21085
|
+
"scope": "read",
|
|
21086
|
+
"toolset": "accounting"
|
|
21087
|
+
},
|
|
21088
|
+
{
|
|
21089
|
+
"name": "create_tracking_category",
|
|
21090
|
+
"description": "Create a tracking category. Use list_tracking_categories first to avoid duplicates.",
|
|
21091
|
+
"inputSchema": "schemas/tracking_category_write.json",
|
|
21092
|
+
"handler": "handlers/create_tracking_category.js",
|
|
21093
|
+
"scope": "write",
|
|
21094
|
+
"toolset": "accounting"
|
|
21095
|
+
},
|
|
21096
|
+
{
|
|
21097
|
+
"name": "create_tracking_options",
|
|
21098
|
+
"description": "Create up to 10 tracking options in a tracking category. Get trackingCategoryId from list_tracking_categories.",
|
|
21099
|
+
"inputSchema": "schemas/tracking_options_write.json",
|
|
21100
|
+
"handler": "handlers/create_tracking_options.js",
|
|
21101
|
+
"scope": "write",
|
|
21102
|
+
"toolset": "accounting"
|
|
21103
|
+
},
|
|
21104
|
+
{
|
|
21105
|
+
"name": "update_tracking_category",
|
|
21106
|
+
"description": "Rename or archive a tracking category. Get trackingCategoryId from list_tracking_categories.",
|
|
21107
|
+
"inputSchema": "schemas/tracking_category_write.json",
|
|
21108
|
+
"handler": "handlers/update_tracking_category.js",
|
|
21109
|
+
"scope": "write",
|
|
21110
|
+
"toolset": "accounting"
|
|
21111
|
+
},
|
|
21112
|
+
{
|
|
21113
|
+
"name": "update_tracking_options",
|
|
21114
|
+
"description": "Rename or archive a tracking option. Get trackingCategoryId and trackingOptionId from list_tracking_categories.",
|
|
21115
|
+
"inputSchema": "schemas/tracking_options_write.json",
|
|
21116
|
+
"handler": "handlers/update_tracking_options.js",
|
|
21117
|
+
"scope": "write",
|
|
21118
|
+
"toolset": "accounting"
|
|
21119
|
+
},
|
|
21120
|
+
{
|
|
21121
|
+
"name": "list_currencies",
|
|
21122
|
+
"description": "List currencies configured in the connected Xero organisation.",
|
|
21123
|
+
"inputSchema": "schemas/tenant_optional.json",
|
|
21124
|
+
"handler": "handlers/list_currencies.js",
|
|
21125
|
+
"scope": "read"
|
|
21126
|
+
},
|
|
21127
|
+
{
|
|
21128
|
+
"name": "list_contacts",
|
|
21129
|
+
"description": "List contacts with compact identity and balance fields. Filter with where/order/page when needed; use get_contact for full details before updating.",
|
|
21130
|
+
"inputSchema": "schemas/list_records.json",
|
|
21131
|
+
"handler": "handlers/list_contacts.js",
|
|
21132
|
+
"scope": "read",
|
|
21133
|
+
"toolset": "accounting"
|
|
21134
|
+
},
|
|
21135
|
+
{
|
|
21136
|
+
"name": "get_contact",
|
|
21137
|
+
"description": "Get a Xero contact by contactId. Use this before update_contact to avoid overwriting important fields.",
|
|
21138
|
+
"inputSchema": "schemas/id_record.json",
|
|
21139
|
+
"handler": "handlers/get_contact.js",
|
|
21140
|
+
"scope": "read",
|
|
21141
|
+
"toolset": "accounting"
|
|
21142
|
+
},
|
|
21143
|
+
{
|
|
21144
|
+
"name": "create_contact",
|
|
21145
|
+
"description": "Create a contact from flat fields. Use extraFields only for advanced Xero fields; returns a compact summary and Xero link when available.",
|
|
21146
|
+
"inputSchema": "schemas/contact_write.json",
|
|
21147
|
+
"handler": "handlers/create_contact.js",
|
|
21148
|
+
"scope": "write",
|
|
21149
|
+
"toolset": "accounting"
|
|
21150
|
+
},
|
|
21151
|
+
{
|
|
21152
|
+
"name": "update_contact",
|
|
21153
|
+
"description": "Update a contact by contactId. Provide only fields to change; use get_contact first when preserving existing values matters.",
|
|
21154
|
+
"inputSchema": "schemas/contact_write.json",
|
|
21155
|
+
"handler": "handlers/update_contact.js",
|
|
21156
|
+
"scope": "write",
|
|
21157
|
+
"toolset": "accounting"
|
|
21158
|
+
},
|
|
21159
|
+
{
|
|
21160
|
+
"name": "list_items",
|
|
21161
|
+
"description": "List inventory/service items with IDs, codes, names, status, and sale/purchase details. Use get_item for full details.",
|
|
21162
|
+
"inputSchema": "schemas/list_records.json",
|
|
21163
|
+
"handler": "handlers/list_items.js",
|
|
21164
|
+
"scope": "read",
|
|
21165
|
+
"toolset": "accounting"
|
|
21166
|
+
},
|
|
21167
|
+
{
|
|
21168
|
+
"name": "get_item",
|
|
21169
|
+
"description": "Get a Xero item by itemId.",
|
|
21170
|
+
"inputSchema": "schemas/id_record.json",
|
|
21171
|
+
"handler": "handlers/get_item.js",
|
|
21172
|
+
"scope": "read",
|
|
21173
|
+
"toolset": "accounting"
|
|
21174
|
+
},
|
|
21175
|
+
{
|
|
21176
|
+
"name": "create_item",
|
|
21177
|
+
"description": "Create an item from flat fields. Use extraFields only for advanced Xero fields.",
|
|
21178
|
+
"inputSchema": "schemas/item_write.json",
|
|
21179
|
+
"handler": "handlers/create_item.js",
|
|
21180
|
+
"scope": "write",
|
|
21181
|
+
"toolset": "accounting"
|
|
21182
|
+
},
|
|
21183
|
+
{
|
|
21184
|
+
"name": "update_item",
|
|
21185
|
+
"description": "Update an item by itemId. Provide only fields to change.",
|
|
21186
|
+
"inputSchema": "schemas/item_write.json",
|
|
21187
|
+
"handler": "handlers/update_item.js",
|
|
21188
|
+
"scope": "write",
|
|
21189
|
+
"toolset": "accounting"
|
|
21190
|
+
},
|
|
21191
|
+
{
|
|
21192
|
+
"name": "list_invoices",
|
|
21193
|
+
"description": "List invoices with compact totals, status, contact, dates, and invoice number. Prefer explicit filters like status, contactIds, invoiceNumbers, fromDate/toDate; use get_invoice for line items.",
|
|
21194
|
+
"inputSchema": "schemas/list_records.json",
|
|
21195
|
+
"handler": "handlers/list_invoices.js",
|
|
21196
|
+
"scope": "read",
|
|
21197
|
+
"toolset": "accounting"
|
|
21198
|
+
},
|
|
21199
|
+
{
|
|
21200
|
+
"name": "get_invoice",
|
|
21201
|
+
"description": "Get an invoice by invoiceId, including line items and payment summary.",
|
|
21202
|
+
"inputSchema": "schemas/id_record.json",
|
|
21203
|
+
"handler": "handlers/get_invoice.js",
|
|
21204
|
+
"scope": "read",
|
|
21205
|
+
"toolset": "accounting"
|
|
21206
|
+
},
|
|
21207
|
+
{
|
|
21208
|
+
"name": "create_invoice",
|
|
21209
|
+
"description": "Create an invoice or bill from flat fields. Get contactId from list_contacts, accountCode from list_accounts, taxType from list_tax_rates, and tracking from list_tracking_categories. Returns a compact summary and Xero link.",
|
|
21210
|
+
"inputSchema": "schemas/invoice_write.json",
|
|
21211
|
+
"handler": "handlers/create_invoice.js",
|
|
21212
|
+
"scope": "write",
|
|
21213
|
+
"toolset": "accounting"
|
|
21214
|
+
},
|
|
21215
|
+
{
|
|
21216
|
+
"name": "update_invoice",
|
|
21217
|
+
"description": "Update an invoice by invoiceId. Use this for draft changes or allowed status transitions; prefer get_invoice first.",
|
|
21218
|
+
"inputSchema": "schemas/invoice_write.json",
|
|
21219
|
+
"handler": "handlers/update_invoice.js",
|
|
21220
|
+
"scope": "write",
|
|
21221
|
+
"toolset": "accounting"
|
|
21222
|
+
},
|
|
21223
|
+
{
|
|
21224
|
+
"name": "list_credit_notes",
|
|
21225
|
+
"description": "List credit notes with compact status, contact, date, total, and remaining credit fields.",
|
|
21226
|
+
"inputSchema": "schemas/list_records.json",
|
|
21227
|
+
"handler": "handlers/list_credit_notes.js",
|
|
21228
|
+
"scope": "read",
|
|
21229
|
+
"toolset": "accounting"
|
|
21230
|
+
},
|
|
21231
|
+
{
|
|
21232
|
+
"name": "create_credit_note",
|
|
21233
|
+
"description": "Create a credit note from flat fields. Get contactId from list_contacts, accountCode from list_accounts, and taxType from list_tax_rates. Returns a compact summary and Xero link.",
|
|
21234
|
+
"inputSchema": "schemas/credit_note_write.json",
|
|
21235
|
+
"handler": "handlers/create_credit_note.js",
|
|
21236
|
+
"scope": "write",
|
|
21237
|
+
"toolset": "accounting"
|
|
21238
|
+
},
|
|
21239
|
+
{
|
|
21240
|
+
"name": "list_quotes",
|
|
21241
|
+
"description": "List quotes with compact quote number, status, contact, dates, and totals.",
|
|
21242
|
+
"inputSchema": "schemas/list_records.json",
|
|
21243
|
+
"handler": "handlers/list_quotes.js",
|
|
21244
|
+
"scope": "read",
|
|
21245
|
+
"toolset": "accounting"
|
|
21246
|
+
},
|
|
21247
|
+
{
|
|
21248
|
+
"name": "create_quote",
|
|
21249
|
+
"description": "Create a quote from flat fields. Get contactId from list_contacts, accountCode from list_accounts, and taxType from list_tax_rates. Returns a compact summary and Xero link.",
|
|
21250
|
+
"inputSchema": "schemas/quote_write.json",
|
|
21251
|
+
"handler": "handlers/create_quote.js",
|
|
21252
|
+
"scope": "write",
|
|
21253
|
+
"toolset": "accounting"
|
|
21254
|
+
},
|
|
21255
|
+
{
|
|
21256
|
+
"name": "list_purchase_orders",
|
|
21257
|
+
"description": "List purchase orders with compact purchase order number, status, contact, delivery date, and totals.",
|
|
21258
|
+
"inputSchema": "schemas/list_records.json",
|
|
21259
|
+
"handler": "handlers/list_purchase_orders.js",
|
|
21260
|
+
"scope": "read",
|
|
21261
|
+
"toolset": "accounting"
|
|
21262
|
+
},
|
|
21263
|
+
{
|
|
21264
|
+
"name": "create_purchase_order",
|
|
21265
|
+
"description": "Create a purchase order from flat fields. Get supplier contactId from list_contacts and line account/tax values from list_accounts/list_tax_rates.",
|
|
21266
|
+
"inputSchema": "schemas/purchase_order_write.json",
|
|
21267
|
+
"handler": "handlers/create_purchase_order.js",
|
|
21268
|
+
"scope": "write",
|
|
21269
|
+
"toolset": "accounting"
|
|
21270
|
+
},
|
|
21271
|
+
{
|
|
21272
|
+
"name": "list_payments",
|
|
21273
|
+
"description": "List payments with compact payment ID, date, amount, status, account, and invoice references.",
|
|
21274
|
+
"inputSchema": "schemas/list_records.json",
|
|
21275
|
+
"handler": "handlers/list_payments.js",
|
|
21276
|
+
"scope": "read",
|
|
21277
|
+
"toolset": "accounting"
|
|
21278
|
+
},
|
|
21279
|
+
{
|
|
21280
|
+
"name": "create_payment",
|
|
21281
|
+
"description": "Create a payment against an invoice. Use get_invoice for invoiceId/amount due and list_accounts for the payment accountId. Returns a compact summary and Xero link.",
|
|
21282
|
+
"inputSchema": "schemas/payment_write.json",
|
|
21283
|
+
"handler": "handlers/create_payment.js",
|
|
21284
|
+
"scope": "write",
|
|
21285
|
+
"toolset": "accounting"
|
|
21286
|
+
},
|
|
21287
|
+
{
|
|
21288
|
+
"name": "list_bank_transactions",
|
|
21289
|
+
"description": "List bank transactions with compact type, status, contact, date, total, and bank account details.",
|
|
21290
|
+
"inputSchema": "schemas/list_records.json",
|
|
21291
|
+
"handler": "handlers/list_bank_transactions.js",
|
|
21292
|
+
"scope": "read",
|
|
21293
|
+
"toolset": "accounting"
|
|
21294
|
+
},
|
|
21295
|
+
{
|
|
21296
|
+
"name": "create_bank_transaction",
|
|
21297
|
+
"description": "Create a spend or receive bank transaction. Use list_accounts for valid bank/account codes and tax rates before calling this.",
|
|
21298
|
+
"inputSchema": "schemas/bank_transaction_write.json",
|
|
21299
|
+
"handler": "handlers/create_bank_transaction.js",
|
|
21300
|
+
"scope": "write",
|
|
21301
|
+
"toolset": "accounting"
|
|
21302
|
+
},
|
|
21303
|
+
{
|
|
21304
|
+
"name": "list_manual_journals",
|
|
21305
|
+
"description": "List manual journals with compact status, narration, date, journal ID, and line count.",
|
|
21306
|
+
"inputSchema": "schemas/list_records.json",
|
|
21307
|
+
"handler": "handlers/list_manual_journals.js",
|
|
21308
|
+
"scope": "read",
|
|
21309
|
+
"toolset": "accounting"
|
|
21310
|
+
},
|
|
21311
|
+
{
|
|
21312
|
+
"name": "create_manual_journal",
|
|
21313
|
+
"description": "Create a manual journal. Use this carefully; discover account codes with list_accounts and prefer DRAFT when supported by the organisation workflow.",
|
|
21314
|
+
"inputSchema": "schemas/manual_journal_write.json",
|
|
21315
|
+
"handler": "handlers/create_manual_journal.js",
|
|
21316
|
+
"scope": "write",
|
|
21317
|
+
"toolset": "accounting"
|
|
21318
|
+
},
|
|
21319
|
+
{
|
|
21320
|
+
"name": "list_attachments",
|
|
21321
|
+
"description": "List attachments for a supported Xero resource such as Invoices, Contacts, BankTransactions, CreditNotes, PurchaseOrders, or ManualJournals.",
|
|
21322
|
+
"inputSchema": "schemas/attachments.json",
|
|
21323
|
+
"handler": "handlers/list_attachments.js",
|
|
21324
|
+
"scope": "read",
|
|
21325
|
+
"toolset": "accounting"
|
|
21326
|
+
},
|
|
21327
|
+
{
|
|
21328
|
+
"name": "read_attachment_content",
|
|
19012
21329
|
"description": "Extract readable text from an attachment on a supported Xero resource. Uses the shared file extractor for PDFs, Office files, CSV, text, HTML, and similar formats.",
|
|
19013
21330
|
"inputSchema": "schemas/read_attachment_content.json",
|
|
19014
21331
|
"handler": "handlers/read_attachment_content.js",
|
|
@@ -21758,6 +24075,7 @@ function createSafeHandlerFromString(handlerString, getIntegration, utils) {
|
|
|
21758
24075
|
const context = vm.createContext({
|
|
21759
24076
|
console: isolatedConsole,
|
|
21760
24077
|
getIntegration,
|
|
24078
|
+
uuid: { v4: randomUUID },
|
|
21761
24079
|
utils: utils || {},
|
|
21762
24080
|
module: {},
|
|
21763
24081
|
URL: URL$1,
|
|
@@ -22357,7 +24675,7 @@ function createGetIntegration(integrations, proxy) {
|
|
|
22357
24675
|
credential_url: credentialUrl
|
|
22358
24676
|
});
|
|
22359
24677
|
}
|
|
22360
|
-
const verbWithBody = (method) => (path, body, init = {}) => proxy.call(integration, path, { ...init, method, body
|
|
24678
|
+
const verbWithBody = (method) => (path, body, init = {}) => proxy.call(integration, path, { ...init, method, body });
|
|
22361
24679
|
const verbNoBody = (method) => (path, init = {}) => proxy.call(integration, path, { ...init, method });
|
|
22362
24680
|
return {
|
|
22363
24681
|
referenceId: integration.referenceId,
|
|
@@ -23658,18 +25976,6 @@ function assertAbsoluteUrlIsAllowed(absolutePath, baseUrl, allowedOrigins = [])
|
|
|
23658
25976
|
throw new HttpError(400, `Absolute request URL origin must match the integration API origin (${baseOrigin}) or a configured allowed origin.`);
|
|
23659
25977
|
}
|
|
23660
25978
|
}
|
|
23661
|
-
function resolveRelativeBaseUrl(provider, baseUrl, rawPath) {
|
|
23662
|
-
if (provider !== "google-workspace")
|
|
23663
|
-
return baseUrl;
|
|
23664
|
-
const pathOnly = String(rawPath || "").split("?", 1)[0] || "";
|
|
23665
|
-
if (pathOnly === "/documents" || pathOnly.startsWith("/documents/"))
|
|
23666
|
-
return "https://docs.googleapis.com/v1";
|
|
23667
|
-
if (pathOnly === "/spreadsheets" || pathOnly.startsWith("/spreadsheets/"))
|
|
23668
|
-
return "https://sheets.googleapis.com/v4";
|
|
23669
|
-
if (pathOnly === "/presentations" || pathOnly.startsWith("/presentations/"))
|
|
23670
|
-
return "https://slides.googleapis.com/v1";
|
|
23671
|
-
return baseUrl;
|
|
23672
|
-
}
|
|
23673
25979
|
function joinWithoutDuplicateSegments(baseUrl, rawPath) {
|
|
23674
25980
|
let pathOnly = rawPath || "";
|
|
23675
25981
|
let queryPart = "";
|
|
@@ -23951,7 +26257,7 @@ class IntegrationProxy {
|
|
|
23951
26257
|
assertAbsoluteUrlIsAllowed(path, typeConfig.baseUrl, typeConfig.allowedOrigins);
|
|
23952
26258
|
finalUrl = path;
|
|
23953
26259
|
} else {
|
|
23954
|
-
finalUrl = joinWithoutDuplicateSegments(
|
|
26260
|
+
finalUrl = joinWithoutDuplicateSegments(typeConfig.baseUrl, path);
|
|
23955
26261
|
}
|
|
23956
26262
|
const queryString = resolvedQuery.toString();
|
|
23957
26263
|
if (queryString)
|
|
@@ -26364,7 +28670,7 @@ function hasAutoConfigFile() {
|
|
|
26364
28670
|
].map((f) => resolve$1(base, f));
|
|
26365
28671
|
return candidates.some((p) => existsSync(p) && statSync(p).isFile());
|
|
26366
28672
|
}
|
|
26367
|
-
const
|
|
28673
|
+
const _M_TVKJFSaqgo9E7nGBulJC6Bj53qbW6Kmjg2BjXUCEw = defineNitroPlugin(async () => {
|
|
26368
28674
|
const explicit = process.env.COMMANDABLE_CONFIG_FILE;
|
|
26369
28675
|
if (!explicit && !hasAutoConfigFile())
|
|
26370
28676
|
return;
|
|
@@ -26383,7 +28689,7 @@ const _AquVwiIVM7a1K2p3HKZndtheEQgWg5MseXxRS5CsE6E = defineNitroPlugin(async ()
|
|
|
26383
28689
|
}
|
|
26384
28690
|
});
|
|
26385
28691
|
|
|
26386
|
-
const
|
|
28692
|
+
const _ZP9JqzcUWiqZ00FMxCGYad0cri1qDPlZLfZD4ElgrrI = defineNitroPlugin(async () => {
|
|
26387
28693
|
try {
|
|
26388
28694
|
const capability = await warmFileProcessingCapability();
|
|
26389
28695
|
if (!capability.enabled)
|
|
@@ -26395,157 +28701,157 @@ const _lVWhYLiBO2LPJ2uGgGmGMgzdCSfVXfio7QJNE3KXLWg = defineNitroPlugin(async ()
|
|
|
26395
28701
|
}
|
|
26396
28702
|
});
|
|
26397
28703
|
|
|
26398
|
-
const
|
|
28704
|
+
const _yMUFGVAX_r3fg7CMgx97QTG6uaKiBwq9aOXHWvCclw = defineNitroPlugin(() => {
|
|
26399
28705
|
getOrCreateEncryptionSecret();
|
|
26400
28706
|
});
|
|
26401
28707
|
|
|
26402
28708
|
const plugins = [
|
|
26403
|
-
|
|
26404
|
-
|
|
26405
|
-
|
|
26406
|
-
|
|
28709
|
+
_z25E5bI6lxolM40nRjOSnV7rTGIEhhG_oLaxlR5RK0I,
|
|
28710
|
+
_M_TVKJFSaqgo9E7nGBulJC6Bj53qbW6Kmjg2BjXUCEw,
|
|
28711
|
+
_ZP9JqzcUWiqZ00FMxCGYad0cri1qDPlZLfZD4ElgrrI,
|
|
28712
|
+
_yMUFGVAX_r3fg7CMgx97QTG6uaKiBwq9aOXHWvCclw
|
|
26407
28713
|
];
|
|
26408
28714
|
|
|
26409
28715
|
const assets = {
|
|
26410
28716
|
"/favicon.ico": {
|
|
26411
28717
|
"type": "image/vnd.microsoft.icon",
|
|
26412
28718
|
"etag": "\"10be-n8egyE9tcb7sKGr/pYCaQ4uWqxI\"",
|
|
26413
|
-
"mtime": "2026-
|
|
28719
|
+
"mtime": "2026-05-15T19:57:37.000Z",
|
|
26414
28720
|
"size": 4286,
|
|
26415
28721
|
"path": "../public/favicon.ico"
|
|
26416
28722
|
},
|
|
26417
28723
|
"/_fonts/57NSSoFy1VLVs2gqly8Ls9awBnZMFyXGrefpmqvdqmc-zJfbBtpgM4cDmcXBsqZNW79_kFnlpPd62b48glgdydA.woff2": {
|
|
26418
28724
|
"type": "font/woff2",
|
|
26419
28725
|
"etag": "\"4b5c-TAo9mx7r3xQs52+HbHcHJ52z8Qo\"",
|
|
26420
|
-
"mtime": "2026-
|
|
28726
|
+
"mtime": "2026-05-15T19:57:36.995Z",
|
|
26421
28727
|
"size": 19292,
|
|
26422
28728
|
"path": "../public/_fonts/57NSSoFy1VLVs2gqly8Ls9awBnZMFyXGrefpmqvdqmc-zJfbBtpgM4cDmcXBsqZNW79_kFnlpPd62b48glgdydA.woff2"
|
|
26423
28729
|
},
|
|
26424
28730
|
"/_fonts/8VR2wSMN-3U4NbWAVYXlkRV6hA0jFBXP-0RtL3X7fko-x2gYI4qfmkRdxyQQUPaBZdZdgl1TeVrquF_TxHeM4lM.woff2": {
|
|
26425
28731
|
"type": "font/woff2",
|
|
26426
28732
|
"etag": "\"212c-FshXJibFzNhd2HEIMP8C3JR5PYg\"",
|
|
26427
|
-
"mtime": "2026-
|
|
28733
|
+
"mtime": "2026-05-15T19:57:36.995Z",
|
|
26428
28734
|
"size": 8492,
|
|
26429
28735
|
"path": "../public/_fonts/8VR2wSMN-3U4NbWAVYXlkRV6hA0jFBXP-0RtL3X7fko-x2gYI4qfmkRdxyQQUPaBZdZdgl1TeVrquF_TxHeM4lM.woff2"
|
|
26430
28736
|
},
|
|
26431
28737
|
"/_fonts/GsKUclqeNLJ96g5AU593ug6yanivOiwjW_7zESNPChw-jHA4tBeM1bjF7LATGUpfBuSTyomIFrWBTzjF7txVYfg.woff2": {
|
|
26432
28738
|
"type": "font/woff2",
|
|
26433
28739
|
"etag": "\"680c-mJtsV33lkTAKSmfq5k3lKHSllcU\"",
|
|
26434
|
-
"mtime": "2026-
|
|
28740
|
+
"mtime": "2026-05-15T19:57:36.996Z",
|
|
26435
28741
|
"size": 26636,
|
|
26436
28742
|
"path": "../public/_fonts/GsKUclqeNLJ96g5AU593ug6yanivOiwjW_7zESNPChw-jHA4tBeM1bjF7LATGUpfBuSTyomIFrWBTzjF7txVYfg.woff2"
|
|
26437
28743
|
},
|
|
26438
28744
|
"/_fonts/Ld1FnTo3yTIwDyGfTQ5-Fws9AWsCbKfMvgxduXr7JcY-W25bL8NF1fjpLRSOgJb7RoZPHqGQNwMTM7S9tHVoxx8.woff2": {
|
|
26439
28745
|
"type": "font/woff2",
|
|
26440
28746
|
"etag": "\"6ec4-8OoFFPZKF1grqmfGVjh5JDE6DOU\"",
|
|
26441
|
-
"mtime": "2026-
|
|
28747
|
+
"mtime": "2026-05-15T19:57:36.995Z",
|
|
26442
28748
|
"size": 28356,
|
|
26443
28749
|
"path": "../public/_fonts/Ld1FnTo3yTIwDyGfTQ5-Fws9AWsCbKfMvgxduXr7JcY-W25bL8NF1fjpLRSOgJb7RoZPHqGQNwMTM7S9tHVoxx8.woff2"
|
|
26444
28750
|
},
|
|
26445
28751
|
"/_fonts/NdzqRASp2bovDUhQT1IRE_EMqKJ2KYQdTCfFcBvL8yw-KhwZiS86o3fErOe5GGMExHUemmI_dBfaEFxjISZrBd0.woff2": {
|
|
26446
28752
|
"type": "font/woff2",
|
|
26447
28753
|
"etag": "\"1d98-cDZfMibtk4T04FTTAmlfhWDpkN0\"",
|
|
26448
|
-
"mtime": "2026-
|
|
28754
|
+
"mtime": "2026-05-15T19:57:36.995Z",
|
|
26449
28755
|
"size": 7576,
|
|
26450
28756
|
"path": "../public/_fonts/NdzqRASp2bovDUhQT1IRE_EMqKJ2KYQdTCfFcBvL8yw-KhwZiS86o3fErOe5GGMExHUemmI_dBfaEFxjISZrBd0.woff2"
|
|
26451
28757
|
},
|
|
28758
|
+
"/_nuxt/BD6mASiY.js": {
|
|
28759
|
+
"type": "text/javascript; charset=utf-8",
|
|
28760
|
+
"etag": "\"ab-ScyLcA/4r5aOxEv1YY+kqXazCHI\"",
|
|
28761
|
+
"mtime": "2026-05-15T19:57:36.998Z",
|
|
28762
|
+
"size": 171,
|
|
28763
|
+
"path": "../public/_nuxt/BD6mASiY.js"
|
|
28764
|
+
},
|
|
26452
28765
|
"/_fonts/iTkrULNFJJkTvihIg1Vqi5IODRH_9btXCioVF5l98I8-AndUyau2HR2felA_ra8V2mutQgschhasE5FD1dXGJX8.woff2": {
|
|
26453
28766
|
"type": "font/woff2",
|
|
26454
28767
|
"etag": "\"47c4-5xyngHnzzhetUee74tMx9OTgqNQ\"",
|
|
26455
|
-
"mtime": "2026-
|
|
28768
|
+
"mtime": "2026-05-15T19:57:36.996Z",
|
|
26456
28769
|
"size": 18372,
|
|
26457
28770
|
"path": "../public/_fonts/iTkrULNFJJkTvihIg1Vqi5IODRH_9btXCioVF5l98I8-AndUyau2HR2felA_ra8V2mutQgschhasE5FD1dXGJX8.woff2"
|
|
26458
28771
|
},
|
|
26459
|
-
"/_nuxt/
|
|
28772
|
+
"/_nuxt/CjAs3eBq.js": {
|
|
26460
28773
|
"type": "text/javascript; charset=utf-8",
|
|
26461
|
-
"etag": "\"
|
|
26462
|
-
"mtime": "2026-
|
|
26463
|
-
"size":
|
|
26464
|
-
"path": "../public/_nuxt/
|
|
28774
|
+
"etag": "\"1df7-cTFKdH9K34T9NixeUm/CLQ8lWUc\"",
|
|
28775
|
+
"mtime": "2026-05-15T19:57:36.998Z",
|
|
28776
|
+
"size": 7671,
|
|
28777
|
+
"path": "../public/_nuxt/CjAs3eBq.js"
|
|
26465
28778
|
},
|
|
26466
|
-
"/_nuxt/
|
|
28779
|
+
"/_nuxt/D9wFDhac.js": {
|
|
26467
28780
|
"type": "text/javascript; charset=utf-8",
|
|
26468
|
-
"etag": "\"e99-
|
|
26469
|
-
"mtime": "2026-
|
|
28781
|
+
"etag": "\"e99-sUFV1wmMOK2XGfzDXJyP2NA8TG4\"",
|
|
28782
|
+
"mtime": "2026-05-15T19:57:36.998Z",
|
|
26470
28783
|
"size": 3737,
|
|
26471
|
-
"path": "../public/_nuxt/
|
|
28784
|
+
"path": "../public/_nuxt/D9wFDhac.js"
|
|
26472
28785
|
},
|
|
26473
|
-
"/_nuxt/
|
|
28786
|
+
"/_nuxt/DSWYWRXT.js": {
|
|
26474
28787
|
"type": "text/javascript; charset=utf-8",
|
|
26475
|
-
"etag": "\"
|
|
26476
|
-
"mtime": "2026-
|
|
26477
|
-
"size":
|
|
26478
|
-
"path": "../public/_nuxt/
|
|
28788
|
+
"etag": "\"10875-8b+YwIvP6QkcBFnHXqxd+WeZ05o\"",
|
|
28789
|
+
"mtime": "2026-05-15T19:57:36.998Z",
|
|
28790
|
+
"size": 67701,
|
|
28791
|
+
"path": "../public/_nuxt/DSWYWRXT.js"
|
|
26479
28792
|
},
|
|
26480
|
-
"/_nuxt/
|
|
28793
|
+
"/_nuxt/VvnbcAzZ.js": {
|
|
26481
28794
|
"type": "text/javascript; charset=utf-8",
|
|
26482
|
-
"etag": "\"
|
|
26483
|
-
"mtime": "2026-
|
|
26484
|
-
"size":
|
|
26485
|
-
"path": "../public/_nuxt/
|
|
28795
|
+
"etag": "\"d7b-hU4O5jppM7Ou3kZAYy3iYXlgoa8\"",
|
|
28796
|
+
"mtime": "2026-05-15T19:57:36.998Z",
|
|
28797
|
+
"size": 3451,
|
|
28798
|
+
"path": "../public/_nuxt/VvnbcAzZ.js"
|
|
26486
28799
|
},
|
|
26487
|
-
"/_nuxt/
|
|
28800
|
+
"/_nuxt/DRfk9W3W.js": {
|
|
26488
28801
|
"type": "text/javascript; charset=utf-8",
|
|
26489
|
-
"etag": "\"
|
|
26490
|
-
"mtime": "2026-
|
|
26491
|
-
"size":
|
|
26492
|
-
"path": "../public/_nuxt/
|
|
28802
|
+
"etag": "\"194dc-Oj5Ixz12+pq4yqDtF/N+YAPzoWw\"",
|
|
28803
|
+
"mtime": "2026-05-15T19:57:36.998Z",
|
|
28804
|
+
"size": 103644,
|
|
28805
|
+
"path": "../public/_nuxt/DRfk9W3W.js"
|
|
26493
28806
|
},
|
|
26494
28807
|
"/_nuxt/_id_.DhlLK-mY.css": {
|
|
26495
28808
|
"type": "text/css; charset=utf-8",
|
|
26496
28809
|
"etag": "\"2f4-xtV37kE566jU74wpZnFHA29RoAY\"",
|
|
26497
|
-
"mtime": "2026-
|
|
28810
|
+
"mtime": "2026-05-15T19:57:36.998Z",
|
|
26498
28811
|
"size": 756,
|
|
26499
28812
|
"path": "../public/_nuxt/_id_.DhlLK-mY.css"
|
|
26500
28813
|
},
|
|
26501
|
-
"/_nuxt/
|
|
28814
|
+
"/_nuxt/BUmYUDQu.js": {
|
|
26502
28815
|
"type": "text/javascript; charset=utf-8",
|
|
26503
|
-
"etag": "\"
|
|
26504
|
-
"mtime": "2026-
|
|
26505
|
-
"size":
|
|
26506
|
-
"path": "../public/_nuxt/
|
|
26507
|
-
},
|
|
26508
|
-
"/_nuxt/error-404.C7fg894-.css": {
|
|
26509
|
-
"type": "text/css; charset=utf-8",
|
|
26510
|
-
"etag": "\"97e-fiQ3o7A11L9BuXRBr0GJldkx0AU\"",
|
|
26511
|
-
"mtime": "2026-04-28T17:57:48.321Z",
|
|
26512
|
-
"size": 2430,
|
|
26513
|
-
"path": "../public/_nuxt/error-404.C7fg894-.css"
|
|
28816
|
+
"etag": "\"66cba-d/pdEXVc78H3VlgFN3kVzKpvD1Q\"",
|
|
28817
|
+
"mtime": "2026-05-15T19:57:36.998Z",
|
|
28818
|
+
"size": 421050,
|
|
28819
|
+
"path": "../public/_nuxt/BUmYUDQu.js"
|
|
26514
28820
|
},
|
|
26515
28821
|
"/_nuxt/error-500.DjUK_N2Y.css": {
|
|
26516
28822
|
"type": "text/css; charset=utf-8",
|
|
26517
28823
|
"etag": "\"773-Qf61bSDos4KtmZDaA06FmZyUYNo\"",
|
|
26518
|
-
"mtime": "2026-
|
|
28824
|
+
"mtime": "2026-05-15T19:57:36.999Z",
|
|
26519
28825
|
"size": 1907,
|
|
26520
28826
|
"path": "../public/_nuxt/error-500.DjUK_N2Y.css"
|
|
26521
28827
|
},
|
|
28828
|
+
"/_nuxt/error-404.C7fg894-.css": {
|
|
28829
|
+
"type": "text/css; charset=utf-8",
|
|
28830
|
+
"etag": "\"97e-fiQ3o7A11L9BuXRBr0GJldkx0AU\"",
|
|
28831
|
+
"mtime": "2026-05-15T19:57:36.998Z",
|
|
28832
|
+
"size": 2430,
|
|
28833
|
+
"path": "../public/_nuxt/error-404.C7fg894-.css"
|
|
28834
|
+
},
|
|
26522
28835
|
"/_nuxt/builds/latest.json": {
|
|
26523
28836
|
"type": "application/json",
|
|
26524
|
-
"etag": "\"47-
|
|
26525
|
-
"mtime": "2026-
|
|
28837
|
+
"etag": "\"47-Rk5kvShlvitcAr5r6BRRBljhbpY\"",
|
|
28838
|
+
"mtime": "2026-05-15T19:57:36.994Z",
|
|
26526
28839
|
"size": 71,
|
|
26527
28840
|
"path": "../public/_nuxt/builds/latest.json"
|
|
26528
28841
|
},
|
|
26529
|
-
"/_nuxt/builds/meta/
|
|
28842
|
+
"/_nuxt/builds/meta/acb5884f-261b-465e-ad96-149a30400776.json": {
|
|
26530
28843
|
"type": "application/json",
|
|
26531
|
-
"etag": "\"58-
|
|
26532
|
-
"mtime": "2026-
|
|
28844
|
+
"etag": "\"58-7e15ZLf9exGX+z3vQV8b28JBlpk\"",
|
|
28845
|
+
"mtime": "2026-05-15T19:57:36.991Z",
|
|
26533
28846
|
"size": 88,
|
|
26534
|
-
"path": "../public/_nuxt/builds/meta/
|
|
28847
|
+
"path": "../public/_nuxt/builds/meta/acb5884f-261b-465e-ad96-149a30400776.json"
|
|
26535
28848
|
},
|
|
26536
28849
|
"/_nuxt/entry.Y3mA4bzA.css": {
|
|
26537
28850
|
"type": "text/css; charset=utf-8",
|
|
26538
28851
|
"etag": "\"2d46b-zfrD3Ny9WW6qm4fCXAfX5eIAxPA\"",
|
|
26539
|
-
"mtime": "2026-
|
|
28852
|
+
"mtime": "2026-05-15T19:57:36.999Z",
|
|
26540
28853
|
"size": 185451,
|
|
26541
28854
|
"path": "../public/_nuxt/entry.Y3mA4bzA.css"
|
|
26542
|
-
},
|
|
26543
|
-
"/_nuxt/bOjQRRUc.js": {
|
|
26544
|
-
"type": "text/javascript; charset=utf-8",
|
|
26545
|
-
"etag": "\"66cba-ROXbp6pQG1qRn50SMispE0HMqw0\"",
|
|
26546
|
-
"mtime": "2026-04-28T17:57:48.322Z",
|
|
26547
|
-
"size": 421050,
|
|
26548
|
-
"path": "../public/_nuxt/bOjQRRUc.js"
|
|
26549
28855
|
}
|
|
26550
28856
|
};
|
|
26551
28857
|
|
|
@@ -26687,7 +28993,7 @@ function getAsset (id) {
|
|
|
26687
28993
|
|
|
26688
28994
|
const METHODS = /* @__PURE__ */ new Set(["HEAD", "GET"]);
|
|
26689
28995
|
const EncodingMap = { gzip: ".gz", br: ".br" };
|
|
26690
|
-
const
|
|
28996
|
+
const _uVCD2E = eventHandler((event) => {
|
|
26691
28997
|
if (event.method && !METHODS.has(event.method)) {
|
|
26692
28998
|
return;
|
|
26693
28999
|
}
|
|
@@ -26755,7 +29061,7 @@ const BEARER_PREFIX_RE = /^Bearer[ \t]+/i;
|
|
|
26755
29061
|
function isMcpPath(pathname) {
|
|
26756
29062
|
return pathname === "/mcp" || pathname.startsWith("/mcp/");
|
|
26757
29063
|
}
|
|
26758
|
-
const
|
|
29064
|
+
const _8MEaQo = defineEventHandler(async (event) => {
|
|
26759
29065
|
var _a, _b;
|
|
26760
29066
|
if (!isMcpPath(event.path))
|
|
26761
29067
|
return;
|
|
@@ -27092,7 +29398,7 @@ const collections = {
|
|
|
27092
29398
|
};
|
|
27093
29399
|
|
|
27094
29400
|
const DEFAULT_ENDPOINT = "https://api.iconify.design";
|
|
27095
|
-
const
|
|
29401
|
+
const _qZilHW = defineCachedEventHandler(async (event) => {
|
|
27096
29402
|
const url = getRequestURL(event);
|
|
27097
29403
|
if (!url)
|
|
27098
29404
|
return createError$1({ status: 400, message: "Invalid icon request" });
|
|
@@ -27142,57 +29448,57 @@ const _07evdj = defineCachedEventHandler(async (event) => {
|
|
|
27142
29448
|
// 1 week
|
|
27143
29449
|
});
|
|
27144
29450
|
|
|
27145
|
-
const
|
|
27146
|
-
const
|
|
27147
|
-
const
|
|
27148
|
-
const
|
|
27149
|
-
const
|
|
27150
|
-
const
|
|
27151
|
-
const
|
|
27152
|
-
const
|
|
27153
|
-
const
|
|
27154
|
-
const
|
|
27155
|
-
const
|
|
27156
|
-
const
|
|
27157
|
-
const
|
|
27158
|
-
const
|
|
27159
|
-
const
|
|
27160
|
-
const
|
|
27161
|
-
const
|
|
27162
|
-
const
|
|
27163
|
-
const
|
|
27164
|
-
const
|
|
27165
|
-
const
|
|
27166
|
-
const
|
|
29451
|
+
const _lazy_9UBi6Z = () => import('../routes/api/_commandable/status.get.mjs');
|
|
29452
|
+
const _lazy_L27xgp = () => import('../routes/api/catalog.get.mjs');
|
|
29453
|
+
const _lazy_Qb7c8O = () => import('../routes/api/catalog/_type/tools.get.mjs');
|
|
29454
|
+
const _lazy_6zs_jK = () => import('../routes/api/catalog/_type/toolsets.get.mjs');
|
|
29455
|
+
const _lazy_fHARHm = () => import('../routes/api/integrations/_id_.delete.mjs');
|
|
29456
|
+
const _lazy_9jDGT8 = () => import('../routes/api/integrations/_id/credentials-config.get.mjs');
|
|
29457
|
+
const _lazy_L7hEAa = () => import('../routes/api/integrations/_id/credentials-status.get.mjs');
|
|
29458
|
+
const _lazy_YnK3y3 = () => import('../routes/api/integrations/_id/credentials.delete.mjs');
|
|
29459
|
+
const _lazy_Pjbjhf = () => import('../routes/api/integrations/_id/credentials.post.mjs');
|
|
29460
|
+
const _lazy_NxrILm = () => import('../routes/api/integrations/_id/permissions.post.mjs');
|
|
29461
|
+
const _lazy_tZWrQN = () => import('../routes/api/integrations/_id/tools.delete.mjs');
|
|
29462
|
+
const _lazy_zaazLC = () => import('../routes/api/integrations/_id/tools.get.mjs');
|
|
29463
|
+
const _lazy_9iz_Is = () => import('../routes/api/integrations/_id/toolsets.get.mjs');
|
|
29464
|
+
const _lazy_Klwsdp = () => import('../routes/api/integrations/_id/toolsets.post.mjs');
|
|
29465
|
+
const _lazy_Wj3Kn6 = () => import('../routes/api/integrations/_id/variant-options.post.mjs');
|
|
29466
|
+
const _lazy_FcbHxS = () => import('../routes/api/index.get.mjs');
|
|
29467
|
+
const _lazy_0b9jj9 = () => import('../routes/api/index.post.mjs');
|
|
29468
|
+
const _lazy_g_ZIqQ = () => import('../routes/health.get.mjs');
|
|
29469
|
+
const _lazy_t96RTY = () => import('../routes/mcp.mjs');
|
|
29470
|
+
const _lazy_j73HEu = () => import('../routes/mcp/create.mjs');
|
|
29471
|
+
const _lazy_rOVVft = () => import('../routes/mcp/static.mjs');
|
|
29472
|
+
const _lazy_8kkCeS = () => import('../routes/renderer.mjs').then(function (n) { return n.r; });
|
|
27167
29473
|
|
|
27168
29474
|
const handlers = [
|
|
27169
|
-
{ route: '', handler:
|
|
27170
|
-
{ route: '', handler:
|
|
27171
|
-
{ route: '/api/_commandable/status', handler:
|
|
27172
|
-
{ route: '/api/catalog', handler:
|
|
27173
|
-
{ route: '/api/catalog/:type/tools', handler:
|
|
27174
|
-
{ route: '/api/catalog/:type/toolsets', handler:
|
|
27175
|
-
{ route: '/api/integrations/:id', handler:
|
|
27176
|
-
{ route: '/api/integrations/:id/credentials-config', handler:
|
|
27177
|
-
{ route: '/api/integrations/:id/credentials-status', handler:
|
|
27178
|
-
{ route: '/api/integrations/:id/credentials', handler:
|
|
27179
|
-
{ route: '/api/integrations/:id/credentials', handler:
|
|
27180
|
-
{ route: '/api/integrations/:id/permissions', handler:
|
|
27181
|
-
{ route: '/api/integrations/:id/tools', handler:
|
|
27182
|
-
{ route: '/api/integrations/:id/tools', handler:
|
|
27183
|
-
{ route: '/api/integrations/:id/toolsets', handler:
|
|
27184
|
-
{ route: '/api/integrations/:id/toolsets', handler:
|
|
27185
|
-
{ route: '/api/integrations/:id/variant-options', handler:
|
|
27186
|
-
{ route: '/api/integrations', handler:
|
|
27187
|
-
{ route: '/api/integrations', handler:
|
|
27188
|
-
{ route: '/health', handler:
|
|
27189
|
-
{ route: '/mcp', handler:
|
|
27190
|
-
{ route: '/mcp/create', handler:
|
|
27191
|
-
{ route: '/mcp/static', handler:
|
|
27192
|
-
{ route: '/__nuxt_error', handler:
|
|
29475
|
+
{ route: '', handler: _uVCD2E, lazy: false, middleware: true, method: undefined },
|
|
29476
|
+
{ route: '', handler: _8MEaQo, lazy: false, middleware: true, method: undefined },
|
|
29477
|
+
{ route: '/api/_commandable/status', handler: _lazy_9UBi6Z, lazy: true, middleware: false, method: "get" },
|
|
29478
|
+
{ route: '/api/catalog', handler: _lazy_L27xgp, lazy: true, middleware: false, method: "get" },
|
|
29479
|
+
{ route: '/api/catalog/:type/tools', handler: _lazy_Qb7c8O, lazy: true, middleware: false, method: "get" },
|
|
29480
|
+
{ route: '/api/catalog/:type/toolsets', handler: _lazy_6zs_jK, lazy: true, middleware: false, method: "get" },
|
|
29481
|
+
{ route: '/api/integrations/:id', handler: _lazy_fHARHm, lazy: true, middleware: false, method: "delete" },
|
|
29482
|
+
{ route: '/api/integrations/:id/credentials-config', handler: _lazy_9jDGT8, lazy: true, middleware: false, method: "get" },
|
|
29483
|
+
{ route: '/api/integrations/:id/credentials-status', handler: _lazy_L7hEAa, lazy: true, middleware: false, method: "get" },
|
|
29484
|
+
{ route: '/api/integrations/:id/credentials', handler: _lazy_YnK3y3, lazy: true, middleware: false, method: "delete" },
|
|
29485
|
+
{ route: '/api/integrations/:id/credentials', handler: _lazy_Pjbjhf, lazy: true, middleware: false, method: "post" },
|
|
29486
|
+
{ route: '/api/integrations/:id/permissions', handler: _lazy_NxrILm, lazy: true, middleware: false, method: "post" },
|
|
29487
|
+
{ route: '/api/integrations/:id/tools', handler: _lazy_tZWrQN, lazy: true, middleware: false, method: "delete" },
|
|
29488
|
+
{ route: '/api/integrations/:id/tools', handler: _lazy_zaazLC, lazy: true, middleware: false, method: "get" },
|
|
29489
|
+
{ route: '/api/integrations/:id/toolsets', handler: _lazy_9iz_Is, lazy: true, middleware: false, method: "get" },
|
|
29490
|
+
{ route: '/api/integrations/:id/toolsets', handler: _lazy_Klwsdp, lazy: true, middleware: false, method: "post" },
|
|
29491
|
+
{ route: '/api/integrations/:id/variant-options', handler: _lazy_Wj3Kn6, lazy: true, middleware: false, method: "post" },
|
|
29492
|
+
{ route: '/api/integrations', handler: _lazy_FcbHxS, lazy: true, middleware: false, method: "get" },
|
|
29493
|
+
{ route: '/api/integrations', handler: _lazy_0b9jj9, lazy: true, middleware: false, method: "post" },
|
|
29494
|
+
{ route: '/health', handler: _lazy_g_ZIqQ, lazy: true, middleware: false, method: "get" },
|
|
29495
|
+
{ route: '/mcp', handler: _lazy_t96RTY, lazy: true, middleware: false, method: undefined },
|
|
29496
|
+
{ route: '/mcp/create', handler: _lazy_j73HEu, lazy: true, middleware: false, method: undefined },
|
|
29497
|
+
{ route: '/mcp/static', handler: _lazy_rOVVft, lazy: true, middleware: false, method: undefined },
|
|
29498
|
+
{ route: '/__nuxt_error', handler: _lazy_8kkCeS, lazy: true, middleware: false, method: undefined },
|
|
27193
29499
|
{ route: '/__nuxt_island/**', handler: _SxA8c9, lazy: false, middleware: false, method: undefined },
|
|
27194
|
-
{ route: '/api/_nuxt_icon/:collection', handler:
|
|
27195
|
-
{ route: '/**', handler:
|
|
29500
|
+
{ route: '/api/_nuxt_icon/:collection', handler: _qZilHW, lazy: false, middleware: false, method: undefined },
|
|
29501
|
+
{ route: '/**', handler: _lazy_8kkCeS, lazy: true, middleware: false, method: undefined }
|
|
27196
29502
|
];
|
|
27197
29503
|
|
|
27198
29504
|
function createNitroApp() {
|