@zavudev/sdk-mcp 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +313 -0
- package/code-tool-types.d.mts +16 -0
- package/code-tool-types.d.mts.map +1 -0
- package/code-tool-types.d.ts +16 -0
- package/code-tool-types.d.ts.map +1 -0
- package/code-tool-types.js +4 -0
- package/code-tool-types.js.map +1 -0
- package/code-tool-types.mjs +3 -0
- package/code-tool-types.mjs.map +1 -0
- package/code-tool.d.mts +54 -0
- package/code-tool.d.mts.map +1 -0
- package/code-tool.d.ts +54 -0
- package/code-tool.d.ts.map +1 -0
- package/code-tool.js +49 -0
- package/code-tool.js.map +1 -0
- package/code-tool.mjs +46 -0
- package/code-tool.mjs.map +1 -0
- package/compat.d.mts +58 -0
- package/compat.d.mts.map +1 -0
- package/compat.d.ts +58 -0
- package/compat.d.ts.map +1 -0
- package/compat.js +387 -0
- package/compat.js.map +1 -0
- package/compat.mjs +378 -0
- package/compat.mjs.map +1 -0
- package/docs-search-tool.d.mts +50 -0
- package/docs-search-tool.d.mts.map +1 -0
- package/docs-search-tool.d.ts +50 -0
- package/docs-search-tool.d.ts.map +1 -0
- package/docs-search-tool.js +51 -0
- package/docs-search-tool.js.map +1 -0
- package/docs-search-tool.mjs +47 -0
- package/docs-search-tool.mjs.map +1 -0
- package/dynamic-tools.d.mts +12 -0
- package/dynamic-tools.d.mts.map +1 -0
- package/dynamic-tools.d.ts +12 -0
- package/dynamic-tools.d.ts.map +1 -0
- package/dynamic-tools.js +135 -0
- package/dynamic-tools.js.map +1 -0
- package/dynamic-tools.mjs +132 -0
- package/dynamic-tools.mjs.map +1 -0
- package/filtering.d.mts +3 -0
- package/filtering.d.mts.map +1 -0
- package/filtering.d.ts +3 -0
- package/filtering.d.ts.map +1 -0
- package/filtering.js +24 -0
- package/filtering.js.map +1 -0
- package/filtering.mjs +16 -0
- package/filtering.mjs.map +1 -0
- package/headers.d.mts +4 -0
- package/headers.d.mts.map +1 -0
- package/headers.d.ts +4 -0
- package/headers.d.ts.map +1 -0
- package/headers.js +22 -0
- package/headers.js.map +1 -0
- package/headers.mjs +18 -0
- package/headers.mjs.map +1 -0
- package/http.d.mts +9 -0
- package/http.d.mts.map +1 -0
- package/http.d.ts +9 -0
- package/http.d.ts.map +1 -0
- package/http.js +108 -0
- package/http.js.map +1 -0
- package/http.mjs +100 -0
- package/http.mjs.map +1 -0
- package/index.d.mts +3 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +3 -0
- package/index.d.ts.map +1 -0
- package/index.js +91 -0
- package/index.js.map +1 -0
- package/index.mjs +89 -0
- package/index.mjs.map +1 -0
- package/options.d.mts +20 -0
- package/options.d.mts.map +1 -0
- package/options.d.ts +20 -0
- package/options.d.ts.map +1 -0
- package/options.js +427 -0
- package/options.js.map +1 -0
- package/options.mjs +420 -0
- package/options.mjs.map +1 -0
- package/package.json +201 -0
- package/server.d.mts +35 -0
- package/server.d.mts.map +1 -0
- package/server.d.ts +35 -0
- package/server.d.ts.map +1 -0
- package/server.js +174 -0
- package/server.js.map +1 -0
- package/server.mjs +160 -0
- package/server.mjs.map +1 -0
- package/src/code-tool-types.ts +18 -0
- package/src/code-tool.ts +59 -0
- package/src/compat.ts +483 -0
- package/src/docs-search-tool.ts +59 -0
- package/src/dynamic-tools.ts +153 -0
- package/src/filtering.ts +18 -0
- package/src/headers.ts +25 -0
- package/src/http.ts +127 -0
- package/src/index.ts +108 -0
- package/src/options.ts +473 -0
- package/src/server.ts +207 -0
- package/src/stdio.ts +13 -0
- package/src/tools/broadcasts/cancel-broadcasts.ts +52 -0
- package/src/tools/broadcasts/contacts/add-broadcasts-contacts.ts +73 -0
- package/src/tools/broadcasts/contacts/list-broadcasts-contacts.ts +71 -0
- package/src/tools/broadcasts/contacts/remove-broadcasts-contacts.ts +43 -0
- package/src/tools/broadcasts/create-broadcasts.ts +134 -0
- package/src/tools/broadcasts/delete-broadcasts.ts +40 -0
- package/src/tools/broadcasts/list-broadcasts.ts +68 -0
- package/src/tools/broadcasts/progress-broadcasts.ts +54 -0
- package/src/tools/broadcasts/retrieve-broadcasts.ts +54 -0
- package/src/tools/broadcasts/send-broadcasts.ts +57 -0
- package/src/tools/broadcasts/update-broadcasts.ts +106 -0
- package/src/tools/contacts/list-contacts.ts +61 -0
- package/src/tools/contacts/retrieve-by-phone-contacts.ts +56 -0
- package/src/tools/contacts/retrieve-contacts.ts +54 -0
- package/src/tools/contacts/update-contacts.ts +61 -0
- package/src/tools/index.ts +143 -0
- package/src/tools/introspect/validate-phone-introspect.ts +52 -0
- package/src/tools/messages/list-messages.ts +78 -0
- package/src/tools/messages/react-messages.ts +59 -0
- package/src/tools/messages/retrieve-messages.ts +54 -0
- package/src/tools/messages/send-messages.ts +233 -0
- package/src/tools/phone-numbers/list-phone-numbers.ts +68 -0
- package/src/tools/phone-numbers/purchase-phone-numbers.ts +57 -0
- package/src/tools/phone-numbers/release-phone-numbers.ts +40 -0
- package/src/tools/phone-numbers/retrieve-phone-numbers.ts +56 -0
- package/src/tools/phone-numbers/search-available-phone-numbers.ts +72 -0
- package/src/tools/phone-numbers/update-phone-numbers.ts +62 -0
- package/src/tools/senders/create-senders.ts +86 -0
- package/src/tools/senders/delete-senders.ts +40 -0
- package/src/tools/senders/list-senders.ts +58 -0
- package/src/tools/senders/regenerate-webhook-secret-senders.ts +54 -0
- package/src/tools/senders/retrieve-senders.ts +54 -0
- package/src/tools/senders/update-senders.ts +90 -0
- package/src/tools/templates/create-templates.ts +74 -0
- package/src/tools/templates/delete-templates.ts +40 -0
- package/src/tools/templates/list-templates.ts +58 -0
- package/src/tools/templates/retrieve-templates.ts +54 -0
- package/src/tools/templates/submit-templates.ts +66 -0
- package/src/tools/types.ts +115 -0
- package/src/tools.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/stdio.d.mts +3 -0
- package/stdio.d.mts.map +1 -0
- package/stdio.d.ts +3 -0
- package/stdio.d.ts.map +1 -0
- package/stdio.js +14 -0
- package/stdio.js.map +1 -0
- package/stdio.mjs +10 -0
- package/stdio.mjs.map +1 -0
- package/tools/broadcasts/cancel-broadcasts.d.mts +51 -0
- package/tools/broadcasts/cancel-broadcasts.d.mts.map +1 -0
- package/tools/broadcasts/cancel-broadcasts.d.ts +51 -0
- package/tools/broadcasts/cancel-broadcasts.d.ts.map +1 -0
- package/tools/broadcasts/cancel-broadcasts.js +52 -0
- package/tools/broadcasts/cancel-broadcasts.js.map +1 -0
- package/tools/broadcasts/cancel-broadcasts.mjs +45 -0
- package/tools/broadcasts/cancel-broadcasts.mjs.map +1 -0
- package/tools/broadcasts/contacts/add-broadcasts-contacts.d.mts +51 -0
- package/tools/broadcasts/contacts/add-broadcasts-contacts.d.mts.map +1 -0
- package/tools/broadcasts/contacts/add-broadcasts-contacts.d.ts +51 -0
- package/tools/broadcasts/contacts/add-broadcasts-contacts.d.ts.map +1 -0
- package/tools/broadcasts/contacts/add-broadcasts-contacts.js +71 -0
- package/tools/broadcasts/contacts/add-broadcasts-contacts.js.map +1 -0
- package/tools/broadcasts/contacts/add-broadcasts-contacts.mjs +64 -0
- package/tools/broadcasts/contacts/add-broadcasts-contacts.mjs.map +1 -0
- package/tools/broadcasts/contacts/list-broadcasts-contacts.d.mts +51 -0
- package/tools/broadcasts/contacts/list-broadcasts-contacts.d.mts.map +1 -0
- package/tools/broadcasts/contacts/list-broadcasts-contacts.d.ts +51 -0
- package/tools/broadcasts/contacts/list-broadcasts-contacts.d.ts.map +1 -0
- package/tools/broadcasts/contacts/list-broadcasts-contacts.js +71 -0
- package/tools/broadcasts/contacts/list-broadcasts-contacts.js.map +1 -0
- package/tools/broadcasts/contacts/list-broadcasts-contacts.mjs +64 -0
- package/tools/broadcasts/contacts/list-broadcasts-contacts.mjs.map +1 -0
- package/tools/broadcasts/contacts/remove-broadcasts-contacts.d.mts +51 -0
- package/tools/broadcasts/contacts/remove-broadcasts-contacts.d.mts.map +1 -0
- package/tools/broadcasts/contacts/remove-broadcasts-contacts.d.ts +51 -0
- package/tools/broadcasts/contacts/remove-broadcasts-contacts.d.ts.map +1 -0
- package/tools/broadcasts/contacts/remove-broadcasts-contacts.js +40 -0
- package/tools/broadcasts/contacts/remove-broadcasts-contacts.js.map +1 -0
- package/tools/broadcasts/contacts/remove-broadcasts-contacts.mjs +36 -0
- package/tools/broadcasts/contacts/remove-broadcasts-contacts.mjs.map +1 -0
- package/tools/broadcasts/create-broadcasts.d.mts +51 -0
- package/tools/broadcasts/create-broadcasts.d.mts.map +1 -0
- package/tools/broadcasts/create-broadcasts.d.ts +51 -0
- package/tools/broadcasts/create-broadcasts.d.ts.map +1 -0
- package/tools/broadcasts/create-broadcasts.js +134 -0
- package/tools/broadcasts/create-broadcasts.js.map +1 -0
- package/tools/broadcasts/create-broadcasts.mjs +127 -0
- package/tools/broadcasts/create-broadcasts.mjs.map +1 -0
- package/tools/broadcasts/delete-broadcasts.d.mts +51 -0
- package/tools/broadcasts/delete-broadcasts.d.mts.map +1 -0
- package/tools/broadcasts/delete-broadcasts.d.ts +51 -0
- package/tools/broadcasts/delete-broadcasts.d.ts.map +1 -0
- package/tools/broadcasts/delete-broadcasts.js +37 -0
- package/tools/broadcasts/delete-broadcasts.js.map +1 -0
- package/tools/broadcasts/delete-broadcasts.mjs +33 -0
- package/tools/broadcasts/delete-broadcasts.mjs.map +1 -0
- package/tools/broadcasts/list-broadcasts.d.mts +51 -0
- package/tools/broadcasts/list-broadcasts.d.mts.map +1 -0
- package/tools/broadcasts/list-broadcasts.d.ts +51 -0
- package/tools/broadcasts/list-broadcasts.d.ts.map +1 -0
- package/tools/broadcasts/list-broadcasts.js +68 -0
- package/tools/broadcasts/list-broadcasts.js.map +1 -0
- package/tools/broadcasts/list-broadcasts.mjs +61 -0
- package/tools/broadcasts/list-broadcasts.mjs.map +1 -0
- package/tools/broadcasts/progress-broadcasts.d.mts +51 -0
- package/tools/broadcasts/progress-broadcasts.d.mts.map +1 -0
- package/tools/broadcasts/progress-broadcasts.d.ts +51 -0
- package/tools/broadcasts/progress-broadcasts.d.ts.map +1 -0
- package/tools/broadcasts/progress-broadcasts.js +54 -0
- package/tools/broadcasts/progress-broadcasts.js.map +1 -0
- package/tools/broadcasts/progress-broadcasts.mjs +47 -0
- package/tools/broadcasts/progress-broadcasts.mjs.map +1 -0
- package/tools/broadcasts/retrieve-broadcasts.d.mts +51 -0
- package/tools/broadcasts/retrieve-broadcasts.d.mts.map +1 -0
- package/tools/broadcasts/retrieve-broadcasts.d.ts +51 -0
- package/tools/broadcasts/retrieve-broadcasts.d.ts.map +1 -0
- package/tools/broadcasts/retrieve-broadcasts.js +54 -0
- package/tools/broadcasts/retrieve-broadcasts.js.map +1 -0
- package/tools/broadcasts/retrieve-broadcasts.mjs +47 -0
- package/tools/broadcasts/retrieve-broadcasts.mjs.map +1 -0
- package/tools/broadcasts/send-broadcasts.d.mts +51 -0
- package/tools/broadcasts/send-broadcasts.d.mts.map +1 -0
- package/tools/broadcasts/send-broadcasts.d.ts +51 -0
- package/tools/broadcasts/send-broadcasts.d.ts.map +1 -0
- package/tools/broadcasts/send-broadcasts.js +57 -0
- package/tools/broadcasts/send-broadcasts.js.map +1 -0
- package/tools/broadcasts/send-broadcasts.mjs +50 -0
- package/tools/broadcasts/send-broadcasts.mjs.map +1 -0
- package/tools/broadcasts/update-broadcasts.d.mts +51 -0
- package/tools/broadcasts/update-broadcasts.d.mts.map +1 -0
- package/tools/broadcasts/update-broadcasts.d.ts +51 -0
- package/tools/broadcasts/update-broadcasts.d.ts.map +1 -0
- package/tools/broadcasts/update-broadcasts.js +104 -0
- package/tools/broadcasts/update-broadcasts.js.map +1 -0
- package/tools/broadcasts/update-broadcasts.mjs +97 -0
- package/tools/broadcasts/update-broadcasts.mjs.map +1 -0
- package/tools/contacts/list-contacts.d.mts +51 -0
- package/tools/contacts/list-contacts.d.mts.map +1 -0
- package/tools/contacts/list-contacts.d.ts +51 -0
- package/tools/contacts/list-contacts.d.ts.map +1 -0
- package/tools/contacts/list-contacts.js +61 -0
- package/tools/contacts/list-contacts.js.map +1 -0
- package/tools/contacts/list-contacts.mjs +54 -0
- package/tools/contacts/list-contacts.mjs.map +1 -0
- package/tools/contacts/retrieve-by-phone-contacts.d.mts +51 -0
- package/tools/contacts/retrieve-by-phone-contacts.d.mts.map +1 -0
- package/tools/contacts/retrieve-by-phone-contacts.d.ts +51 -0
- package/tools/contacts/retrieve-by-phone-contacts.d.ts.map +1 -0
- package/tools/contacts/retrieve-by-phone-contacts.js +54 -0
- package/tools/contacts/retrieve-by-phone-contacts.js.map +1 -0
- package/tools/contacts/retrieve-by-phone-contacts.mjs +47 -0
- package/tools/contacts/retrieve-by-phone-contacts.mjs.map +1 -0
- package/tools/contacts/retrieve-contacts.d.mts +51 -0
- package/tools/contacts/retrieve-contacts.d.mts.map +1 -0
- package/tools/contacts/retrieve-contacts.d.ts +51 -0
- package/tools/contacts/retrieve-contacts.d.ts.map +1 -0
- package/tools/contacts/retrieve-contacts.js +54 -0
- package/tools/contacts/retrieve-contacts.js.map +1 -0
- package/tools/contacts/retrieve-contacts.mjs +47 -0
- package/tools/contacts/retrieve-contacts.mjs.map +1 -0
- package/tools/contacts/update-contacts.d.mts +51 -0
- package/tools/contacts/update-contacts.d.mts.map +1 -0
- package/tools/contacts/update-contacts.d.ts +51 -0
- package/tools/contacts/update-contacts.d.ts.map +1 -0
- package/tools/contacts/update-contacts.js +61 -0
- package/tools/contacts/update-contacts.js.map +1 -0
- package/tools/contacts/update-contacts.mjs +54 -0
- package/tools/contacts/update-contacts.mjs.map +1 -0
- package/tools/index.d.mts +10 -0
- package/tools/index.d.mts.map +1 -0
- package/tools/index.d.ts +10 -0
- package/tools/index.d.ts.map +1 -0
- package/tools/index.js +127 -0
- package/tools/index.js.map +1 -0
- package/tools/index.mjs +120 -0
- package/tools/index.mjs.map +1 -0
- package/tools/introspect/validate-phone-introspect.d.mts +51 -0
- package/tools/introspect/validate-phone-introspect.d.mts.map +1 -0
- package/tools/introspect/validate-phone-introspect.d.ts +51 -0
- package/tools/introspect/validate-phone-introspect.d.ts.map +1 -0
- package/tools/introspect/validate-phone-introspect.js +52 -0
- package/tools/introspect/validate-phone-introspect.js.map +1 -0
- package/tools/introspect/validate-phone-introspect.mjs +45 -0
- package/tools/introspect/validate-phone-introspect.mjs.map +1 -0
- package/tools/messages/list-messages.d.mts +51 -0
- package/tools/messages/list-messages.d.mts.map +1 -0
- package/tools/messages/list-messages.d.ts +51 -0
- package/tools/messages/list-messages.d.ts.map +1 -0
- package/tools/messages/list-messages.js +78 -0
- package/tools/messages/list-messages.js.map +1 -0
- package/tools/messages/list-messages.mjs +71 -0
- package/tools/messages/list-messages.mjs.map +1 -0
- package/tools/messages/react-messages.d.mts +51 -0
- package/tools/messages/react-messages.d.mts.map +1 -0
- package/tools/messages/react-messages.d.ts +51 -0
- package/tools/messages/react-messages.d.ts.map +1 -0
- package/tools/messages/react-messages.js +59 -0
- package/tools/messages/react-messages.js.map +1 -0
- package/tools/messages/react-messages.mjs +52 -0
- package/tools/messages/react-messages.mjs.map +1 -0
- package/tools/messages/retrieve-messages.d.mts +51 -0
- package/tools/messages/retrieve-messages.d.mts.map +1 -0
- package/tools/messages/retrieve-messages.d.ts +51 -0
- package/tools/messages/retrieve-messages.d.ts.map +1 -0
- package/tools/messages/retrieve-messages.js +54 -0
- package/tools/messages/retrieve-messages.js.map +1 -0
- package/tools/messages/retrieve-messages.mjs +47 -0
- package/tools/messages/retrieve-messages.mjs.map +1 -0
- package/tools/messages/send-messages.d.mts +51 -0
- package/tools/messages/send-messages.d.mts.map +1 -0
- package/tools/messages/send-messages.d.ts +51 -0
- package/tools/messages/send-messages.d.ts.map +1 -0
- package/tools/messages/send-messages.js +233 -0
- package/tools/messages/send-messages.js.map +1 -0
- package/tools/messages/send-messages.mjs +226 -0
- package/tools/messages/send-messages.mjs.map +1 -0
- package/tools/phone-numbers/list-phone-numbers.d.mts +51 -0
- package/tools/phone-numbers/list-phone-numbers.d.mts.map +1 -0
- package/tools/phone-numbers/list-phone-numbers.d.ts +51 -0
- package/tools/phone-numbers/list-phone-numbers.d.ts.map +1 -0
- package/tools/phone-numbers/list-phone-numbers.js +68 -0
- package/tools/phone-numbers/list-phone-numbers.js.map +1 -0
- package/tools/phone-numbers/list-phone-numbers.mjs +61 -0
- package/tools/phone-numbers/list-phone-numbers.mjs.map +1 -0
- package/tools/phone-numbers/purchase-phone-numbers.d.mts +51 -0
- package/tools/phone-numbers/purchase-phone-numbers.d.mts.map +1 -0
- package/tools/phone-numbers/purchase-phone-numbers.d.ts +51 -0
- package/tools/phone-numbers/purchase-phone-numbers.d.ts.map +1 -0
- package/tools/phone-numbers/purchase-phone-numbers.js +57 -0
- package/tools/phone-numbers/purchase-phone-numbers.js.map +1 -0
- package/tools/phone-numbers/purchase-phone-numbers.mjs +50 -0
- package/tools/phone-numbers/purchase-phone-numbers.mjs.map +1 -0
- package/tools/phone-numbers/release-phone-numbers.d.mts +51 -0
- package/tools/phone-numbers/release-phone-numbers.d.mts.map +1 -0
- package/tools/phone-numbers/release-phone-numbers.d.ts +51 -0
- package/tools/phone-numbers/release-phone-numbers.d.ts.map +1 -0
- package/tools/phone-numbers/release-phone-numbers.js +37 -0
- package/tools/phone-numbers/release-phone-numbers.js.map +1 -0
- package/tools/phone-numbers/release-phone-numbers.mjs +33 -0
- package/tools/phone-numbers/release-phone-numbers.mjs.map +1 -0
- package/tools/phone-numbers/retrieve-phone-numbers.d.mts +51 -0
- package/tools/phone-numbers/retrieve-phone-numbers.d.mts.map +1 -0
- package/tools/phone-numbers/retrieve-phone-numbers.d.ts +51 -0
- package/tools/phone-numbers/retrieve-phone-numbers.d.ts.map +1 -0
- package/tools/phone-numbers/retrieve-phone-numbers.js +54 -0
- package/tools/phone-numbers/retrieve-phone-numbers.js.map +1 -0
- package/tools/phone-numbers/retrieve-phone-numbers.mjs +47 -0
- package/tools/phone-numbers/retrieve-phone-numbers.mjs.map +1 -0
- package/tools/phone-numbers/search-available-phone-numbers.d.mts +51 -0
- package/tools/phone-numbers/search-available-phone-numbers.d.mts.map +1 -0
- package/tools/phone-numbers/search-available-phone-numbers.d.ts +51 -0
- package/tools/phone-numbers/search-available-phone-numbers.d.ts.map +1 -0
- package/tools/phone-numbers/search-available-phone-numbers.js +72 -0
- package/tools/phone-numbers/search-available-phone-numbers.js.map +1 -0
- package/tools/phone-numbers/search-available-phone-numbers.mjs +65 -0
- package/tools/phone-numbers/search-available-phone-numbers.mjs.map +1 -0
- package/tools/phone-numbers/update-phone-numbers.d.mts +51 -0
- package/tools/phone-numbers/update-phone-numbers.d.mts.map +1 -0
- package/tools/phone-numbers/update-phone-numbers.d.ts +51 -0
- package/tools/phone-numbers/update-phone-numbers.d.ts.map +1 -0
- package/tools/phone-numbers/update-phone-numbers.js +60 -0
- package/tools/phone-numbers/update-phone-numbers.js.map +1 -0
- package/tools/phone-numbers/update-phone-numbers.mjs +53 -0
- package/tools/phone-numbers/update-phone-numbers.mjs.map +1 -0
- package/tools/senders/create-senders.d.mts +51 -0
- package/tools/senders/create-senders.d.mts.map +1 -0
- package/tools/senders/create-senders.d.ts +51 -0
- package/tools/senders/create-senders.d.ts.map +1 -0
- package/tools/senders/create-senders.js +85 -0
- package/tools/senders/create-senders.js.map +1 -0
- package/tools/senders/create-senders.mjs +78 -0
- package/tools/senders/create-senders.mjs.map +1 -0
- package/tools/senders/delete-senders.d.mts +51 -0
- package/tools/senders/delete-senders.d.mts.map +1 -0
- package/tools/senders/delete-senders.d.ts +51 -0
- package/tools/senders/delete-senders.d.ts.map +1 -0
- package/tools/senders/delete-senders.js +37 -0
- package/tools/senders/delete-senders.js.map +1 -0
- package/tools/senders/delete-senders.mjs +33 -0
- package/tools/senders/delete-senders.mjs.map +1 -0
- package/tools/senders/list-senders.d.mts +51 -0
- package/tools/senders/list-senders.d.mts.map +1 -0
- package/tools/senders/list-senders.d.ts +51 -0
- package/tools/senders/list-senders.d.ts.map +1 -0
- package/tools/senders/list-senders.js +58 -0
- package/tools/senders/list-senders.js.map +1 -0
- package/tools/senders/list-senders.mjs +51 -0
- package/tools/senders/list-senders.mjs.map +1 -0
- package/tools/senders/regenerate-webhook-secret-senders.d.mts +51 -0
- package/tools/senders/regenerate-webhook-secret-senders.d.mts.map +1 -0
- package/tools/senders/regenerate-webhook-secret-senders.d.ts +51 -0
- package/tools/senders/regenerate-webhook-secret-senders.d.ts.map +1 -0
- package/tools/senders/regenerate-webhook-secret-senders.js +52 -0
- package/tools/senders/regenerate-webhook-secret-senders.js.map +1 -0
- package/tools/senders/regenerate-webhook-secret-senders.mjs +45 -0
- package/tools/senders/regenerate-webhook-secret-senders.mjs.map +1 -0
- package/tools/senders/retrieve-senders.d.mts +51 -0
- package/tools/senders/retrieve-senders.d.mts.map +1 -0
- package/tools/senders/retrieve-senders.d.ts +51 -0
- package/tools/senders/retrieve-senders.d.ts.map +1 -0
- package/tools/senders/retrieve-senders.js +54 -0
- package/tools/senders/retrieve-senders.js.map +1 -0
- package/tools/senders/retrieve-senders.mjs +47 -0
- package/tools/senders/retrieve-senders.mjs.map +1 -0
- package/tools/senders/update-senders.d.mts +51 -0
- package/tools/senders/update-senders.d.mts.map +1 -0
- package/tools/senders/update-senders.d.ts +51 -0
- package/tools/senders/update-senders.d.ts.map +1 -0
- package/tools/senders/update-senders.js +89 -0
- package/tools/senders/update-senders.js.map +1 -0
- package/tools/senders/update-senders.mjs +82 -0
- package/tools/senders/update-senders.mjs.map +1 -0
- package/tools/templates/create-templates.d.mts +51 -0
- package/tools/templates/create-templates.d.mts.map +1 -0
- package/tools/templates/create-templates.d.ts +51 -0
- package/tools/templates/create-templates.d.ts.map +1 -0
- package/tools/templates/create-templates.js +74 -0
- package/tools/templates/create-templates.js.map +1 -0
- package/tools/templates/create-templates.mjs +67 -0
- package/tools/templates/create-templates.mjs.map +1 -0
- package/tools/templates/delete-templates.d.mts +51 -0
- package/tools/templates/delete-templates.d.mts.map +1 -0
- package/tools/templates/delete-templates.d.ts +51 -0
- package/tools/templates/delete-templates.d.ts.map +1 -0
- package/tools/templates/delete-templates.js +37 -0
- package/tools/templates/delete-templates.js.map +1 -0
- package/tools/templates/delete-templates.mjs +33 -0
- package/tools/templates/delete-templates.mjs.map +1 -0
- package/tools/templates/list-templates.d.mts +51 -0
- package/tools/templates/list-templates.d.mts.map +1 -0
- package/tools/templates/list-templates.d.ts +51 -0
- package/tools/templates/list-templates.d.ts.map +1 -0
- package/tools/templates/list-templates.js +58 -0
- package/tools/templates/list-templates.js.map +1 -0
- package/tools/templates/list-templates.mjs +51 -0
- package/tools/templates/list-templates.mjs.map +1 -0
- package/tools/templates/retrieve-templates.d.mts +51 -0
- package/tools/templates/retrieve-templates.d.mts.map +1 -0
- package/tools/templates/retrieve-templates.d.ts +51 -0
- package/tools/templates/retrieve-templates.d.ts.map +1 -0
- package/tools/templates/retrieve-templates.js +54 -0
- package/tools/templates/retrieve-templates.js.map +1 -0
- package/tools/templates/retrieve-templates.mjs +47 -0
- package/tools/templates/retrieve-templates.mjs.map +1 -0
- package/tools/templates/submit-templates.d.mts +51 -0
- package/tools/templates/submit-templates.d.mts.map +1 -0
- package/tools/templates/submit-templates.d.ts +51 -0
- package/tools/templates/submit-templates.d.ts.map +1 -0
- package/tools/templates/submit-templates.js +66 -0
- package/tools/templates/submit-templates.js.map +1 -0
- package/tools/templates/submit-templates.mjs +59 -0
- package/tools/templates/submit-templates.mjs.map +1 -0
- package/tools/types.d.mts +52 -0
- package/tools/types.d.mts.map +1 -0
- package/tools/types.d.ts +52 -0
- package/tools/types.d.ts.map +1 -0
- package/tools/types.js +58 -0
- package/tools/types.js.map +1 -0
- package/tools/types.mjs +53 -0
- package/tools/types.mjs.map +1 -0
- package/tools.d.mts +2 -0
- package/tools.d.mts.map +1 -0
- package/tools.d.ts +2 -0
- package/tools.d.ts.map +1 -0
- package/tools.js +18 -0
- package/tools.js.map +1 -0
- package/tools.mjs +2 -0
- package/tools.mjs.map +1 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.handler = exports.tool = exports.metadata = void 0;
|
|
8
|
+
const types_1 = require("@zavudev/sdk-mcp/tools/types");
|
|
9
|
+
const sdk_1 = __importDefault(require("@zavudev/sdk"));
|
|
10
|
+
exports.metadata = {
|
|
11
|
+
resource: 'messages',
|
|
12
|
+
operation: 'write',
|
|
13
|
+
tags: [],
|
|
14
|
+
httpMethod: 'post',
|
|
15
|
+
httpPath: '/v1/messages',
|
|
16
|
+
operationId: 'sendMessage',
|
|
17
|
+
};
|
|
18
|
+
exports.tool = {
|
|
19
|
+
name: 'send_messages',
|
|
20
|
+
description: 'Send a message to a recipient via SMS or WhatsApp.\n\n**Channel selection:**\n- If `channel` is omitted and `messageType` is `text`, defaults to SMS\n- If `messageType` is anything other than `text`, WhatsApp is used automatically\n\n**WhatsApp 24-hour window:**\n- Free-form messages (non-template) require an open 24h window\n- Window opens when the user messages you first\n- Use template messages to initiate conversations outside the window',
|
|
21
|
+
inputSchema: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
properties: {
|
|
24
|
+
to: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'Recipient phone number in E.164 format or email address.',
|
|
27
|
+
},
|
|
28
|
+
channel: {
|
|
29
|
+
$ref: '#/$defs/channel',
|
|
30
|
+
},
|
|
31
|
+
content: {
|
|
32
|
+
$ref: '#/$defs/message_content',
|
|
33
|
+
},
|
|
34
|
+
htmlBody: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
description: 'HTML body for email messages. If provided, email will be sent as multipart with both text and HTML.',
|
|
37
|
+
},
|
|
38
|
+
idempotencyKey: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
description: 'Optional idempotency key to avoid duplicate sends.',
|
|
41
|
+
},
|
|
42
|
+
messageType: {
|
|
43
|
+
$ref: '#/$defs/message_type',
|
|
44
|
+
},
|
|
45
|
+
metadata: {
|
|
46
|
+
type: 'object',
|
|
47
|
+
description: 'Arbitrary metadata to associate with the message.',
|
|
48
|
+
additionalProperties: true,
|
|
49
|
+
},
|
|
50
|
+
replyTo: {
|
|
51
|
+
type: 'string',
|
|
52
|
+
description: 'Reply-To email address for email messages.',
|
|
53
|
+
},
|
|
54
|
+
subject: {
|
|
55
|
+
type: 'string',
|
|
56
|
+
description: "Email subject line. Required when channel is 'email' or recipient is an email address.",
|
|
57
|
+
},
|
|
58
|
+
text: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
description: 'Text body for text messages or caption for media messages.',
|
|
61
|
+
},
|
|
62
|
+
'Zavu-Sender': {
|
|
63
|
+
type: 'string',
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
required: ['to'],
|
|
67
|
+
$defs: {
|
|
68
|
+
channel: {
|
|
69
|
+
type: 'string',
|
|
70
|
+
description: "Delivery channel. Use 'auto' for intelligent routing.",
|
|
71
|
+
enum: ['auto', 'sms', 'whatsapp', 'email'],
|
|
72
|
+
},
|
|
73
|
+
message_content: {
|
|
74
|
+
type: 'object',
|
|
75
|
+
description: 'Content for non-text message types (WhatsApp only).',
|
|
76
|
+
properties: {
|
|
77
|
+
buttons: {
|
|
78
|
+
type: 'array',
|
|
79
|
+
description: 'Interactive buttons (max 3).',
|
|
80
|
+
items: {
|
|
81
|
+
type: 'object',
|
|
82
|
+
properties: {
|
|
83
|
+
id: {
|
|
84
|
+
type: 'string',
|
|
85
|
+
},
|
|
86
|
+
title: {
|
|
87
|
+
type: 'string',
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
required: ['id', 'title'],
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
contacts: {
|
|
94
|
+
type: 'array',
|
|
95
|
+
description: 'Contact cards for contact messages.',
|
|
96
|
+
items: {
|
|
97
|
+
type: 'object',
|
|
98
|
+
properties: {
|
|
99
|
+
name: {
|
|
100
|
+
type: 'string',
|
|
101
|
+
},
|
|
102
|
+
phones: {
|
|
103
|
+
type: 'array',
|
|
104
|
+
items: {
|
|
105
|
+
type: 'string',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
emoji: {
|
|
112
|
+
type: 'string',
|
|
113
|
+
description: 'Emoji for reaction messages.',
|
|
114
|
+
},
|
|
115
|
+
filename: {
|
|
116
|
+
type: 'string',
|
|
117
|
+
description: 'Filename for documents.',
|
|
118
|
+
},
|
|
119
|
+
latitude: {
|
|
120
|
+
type: 'number',
|
|
121
|
+
description: 'Latitude for location messages.',
|
|
122
|
+
},
|
|
123
|
+
listButton: {
|
|
124
|
+
type: 'string',
|
|
125
|
+
description: 'Button text for list messages.',
|
|
126
|
+
},
|
|
127
|
+
locationAddress: {
|
|
128
|
+
type: 'string',
|
|
129
|
+
description: 'Address of the location.',
|
|
130
|
+
},
|
|
131
|
+
locationName: {
|
|
132
|
+
type: 'string',
|
|
133
|
+
description: 'Name of the location.',
|
|
134
|
+
},
|
|
135
|
+
longitude: {
|
|
136
|
+
type: 'number',
|
|
137
|
+
description: 'Longitude for location messages.',
|
|
138
|
+
},
|
|
139
|
+
mediaId: {
|
|
140
|
+
type: 'string',
|
|
141
|
+
description: 'WhatsApp media ID if already uploaded.',
|
|
142
|
+
},
|
|
143
|
+
mediaUrl: {
|
|
144
|
+
type: 'string',
|
|
145
|
+
description: 'URL of the media file (for image, video, audio, document, sticker).',
|
|
146
|
+
},
|
|
147
|
+
mimeType: {
|
|
148
|
+
type: 'string',
|
|
149
|
+
description: 'MIME type of the media.',
|
|
150
|
+
},
|
|
151
|
+
reactToMessageId: {
|
|
152
|
+
type: 'string',
|
|
153
|
+
description: 'Message ID to react to.',
|
|
154
|
+
},
|
|
155
|
+
sections: {
|
|
156
|
+
type: 'array',
|
|
157
|
+
description: 'Sections for list messages.',
|
|
158
|
+
items: {
|
|
159
|
+
type: 'object',
|
|
160
|
+
properties: {
|
|
161
|
+
rows: {
|
|
162
|
+
type: 'array',
|
|
163
|
+
items: {
|
|
164
|
+
type: 'object',
|
|
165
|
+
properties: {
|
|
166
|
+
id: {
|
|
167
|
+
type: 'string',
|
|
168
|
+
},
|
|
169
|
+
title: {
|
|
170
|
+
type: 'string',
|
|
171
|
+
},
|
|
172
|
+
description: {
|
|
173
|
+
type: 'string',
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
required: ['id', 'title'],
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
title: {
|
|
180
|
+
type: 'string',
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
required: ['rows', 'title'],
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
templateId: {
|
|
187
|
+
type: 'string',
|
|
188
|
+
description: 'Template ID for template messages.',
|
|
189
|
+
},
|
|
190
|
+
templateVariables: {
|
|
191
|
+
type: 'object',
|
|
192
|
+
description: 'Variables for template rendering. Keys are variable positions (1, 2, 3...).',
|
|
193
|
+
additionalProperties: true,
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
message_type: {
|
|
198
|
+
type: 'string',
|
|
199
|
+
description: 'Type of message. Non-text types are WhatsApp only.',
|
|
200
|
+
enum: [
|
|
201
|
+
'text',
|
|
202
|
+
'image',
|
|
203
|
+
'video',
|
|
204
|
+
'audio',
|
|
205
|
+
'document',
|
|
206
|
+
'sticker',
|
|
207
|
+
'location',
|
|
208
|
+
'contact',
|
|
209
|
+
'buttons',
|
|
210
|
+
'list',
|
|
211
|
+
'reaction',
|
|
212
|
+
'template',
|
|
213
|
+
],
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
annotations: {},
|
|
218
|
+
};
|
|
219
|
+
const handler = async (client, args) => {
|
|
220
|
+
const body = args;
|
|
221
|
+
try {
|
|
222
|
+
return (0, types_1.asTextContentResult)(await client.messages.send(body));
|
|
223
|
+
}
|
|
224
|
+
catch (error) {
|
|
225
|
+
if (error instanceof sdk_1.default.APIError) {
|
|
226
|
+
return (0, types_1.asErrorResult)(error.message);
|
|
227
|
+
}
|
|
228
|
+
throw error;
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
exports.handler = handler;
|
|
232
|
+
exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
|
|
233
|
+
//# sourceMappingURL=send-messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-messages.js","sourceRoot":"","sources":["../../src/tools/messages/send-messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;AAEtF,wDAA4F;AAG5F,uDAAmC;AAEtB,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,cAAc;IACxB,WAAW,EAAE,aAAa;CAC3B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,eAAe;IACrB,WAAW,EACT,+bAA+b;IACjc,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,EAAE,EAAE;gBACF,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0DAA0D;aACxE;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,iBAAiB;aACxB;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,yBAAyB;aAChC;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,qGAAqG;aACxG;YACD,cAAc,EAAE;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oDAAoD;aAClE;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,sBAAsB;aAC7B;YACD,QAAQ,EAAE;gBACR,IAAI,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YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { asErrorResult, asTextContentResult } from '@zavudev/sdk-mcp/tools/types';
|
|
3
|
+
import Zavudev from '@zavudev/sdk';
|
|
4
|
+
export const metadata = {
|
|
5
|
+
resource: 'messages',
|
|
6
|
+
operation: 'write',
|
|
7
|
+
tags: [],
|
|
8
|
+
httpMethod: 'post',
|
|
9
|
+
httpPath: '/v1/messages',
|
|
10
|
+
operationId: 'sendMessage',
|
|
11
|
+
};
|
|
12
|
+
export const tool = {
|
|
13
|
+
name: 'send_messages',
|
|
14
|
+
description: 'Send a message to a recipient via SMS or WhatsApp.\n\n**Channel selection:**\n- If `channel` is omitted and `messageType` is `text`, defaults to SMS\n- If `messageType` is anything other than `text`, WhatsApp is used automatically\n\n**WhatsApp 24-hour window:**\n- Free-form messages (non-template) require an open 24h window\n- Window opens when the user messages you first\n- Use template messages to initiate conversations outside the window',
|
|
15
|
+
inputSchema: {
|
|
16
|
+
type: 'object',
|
|
17
|
+
properties: {
|
|
18
|
+
to: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
description: 'Recipient phone number in E.164 format or email address.',
|
|
21
|
+
},
|
|
22
|
+
channel: {
|
|
23
|
+
$ref: '#/$defs/channel',
|
|
24
|
+
},
|
|
25
|
+
content: {
|
|
26
|
+
$ref: '#/$defs/message_content',
|
|
27
|
+
},
|
|
28
|
+
htmlBody: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
description: 'HTML body for email messages. If provided, email will be sent as multipart with both text and HTML.',
|
|
31
|
+
},
|
|
32
|
+
idempotencyKey: {
|
|
33
|
+
type: 'string',
|
|
34
|
+
description: 'Optional idempotency key to avoid duplicate sends.',
|
|
35
|
+
},
|
|
36
|
+
messageType: {
|
|
37
|
+
$ref: '#/$defs/message_type',
|
|
38
|
+
},
|
|
39
|
+
metadata: {
|
|
40
|
+
type: 'object',
|
|
41
|
+
description: 'Arbitrary metadata to associate with the message.',
|
|
42
|
+
additionalProperties: true,
|
|
43
|
+
},
|
|
44
|
+
replyTo: {
|
|
45
|
+
type: 'string',
|
|
46
|
+
description: 'Reply-To email address for email messages.',
|
|
47
|
+
},
|
|
48
|
+
subject: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
description: "Email subject line. Required when channel is 'email' or recipient is an email address.",
|
|
51
|
+
},
|
|
52
|
+
text: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
description: 'Text body for text messages or caption for media messages.',
|
|
55
|
+
},
|
|
56
|
+
'Zavu-Sender': {
|
|
57
|
+
type: 'string',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
required: ['to'],
|
|
61
|
+
$defs: {
|
|
62
|
+
channel: {
|
|
63
|
+
type: 'string',
|
|
64
|
+
description: "Delivery channel. Use 'auto' for intelligent routing.",
|
|
65
|
+
enum: ['auto', 'sms', 'whatsapp', 'email'],
|
|
66
|
+
},
|
|
67
|
+
message_content: {
|
|
68
|
+
type: 'object',
|
|
69
|
+
description: 'Content for non-text message types (WhatsApp only).',
|
|
70
|
+
properties: {
|
|
71
|
+
buttons: {
|
|
72
|
+
type: 'array',
|
|
73
|
+
description: 'Interactive buttons (max 3).',
|
|
74
|
+
items: {
|
|
75
|
+
type: 'object',
|
|
76
|
+
properties: {
|
|
77
|
+
id: {
|
|
78
|
+
type: 'string',
|
|
79
|
+
},
|
|
80
|
+
title: {
|
|
81
|
+
type: 'string',
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
required: ['id', 'title'],
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
contacts: {
|
|
88
|
+
type: 'array',
|
|
89
|
+
description: 'Contact cards for contact messages.',
|
|
90
|
+
items: {
|
|
91
|
+
type: 'object',
|
|
92
|
+
properties: {
|
|
93
|
+
name: {
|
|
94
|
+
type: 'string',
|
|
95
|
+
},
|
|
96
|
+
phones: {
|
|
97
|
+
type: 'array',
|
|
98
|
+
items: {
|
|
99
|
+
type: 'string',
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
emoji: {
|
|
106
|
+
type: 'string',
|
|
107
|
+
description: 'Emoji for reaction messages.',
|
|
108
|
+
},
|
|
109
|
+
filename: {
|
|
110
|
+
type: 'string',
|
|
111
|
+
description: 'Filename for documents.',
|
|
112
|
+
},
|
|
113
|
+
latitude: {
|
|
114
|
+
type: 'number',
|
|
115
|
+
description: 'Latitude for location messages.',
|
|
116
|
+
},
|
|
117
|
+
listButton: {
|
|
118
|
+
type: 'string',
|
|
119
|
+
description: 'Button text for list messages.',
|
|
120
|
+
},
|
|
121
|
+
locationAddress: {
|
|
122
|
+
type: 'string',
|
|
123
|
+
description: 'Address of the location.',
|
|
124
|
+
},
|
|
125
|
+
locationName: {
|
|
126
|
+
type: 'string',
|
|
127
|
+
description: 'Name of the location.',
|
|
128
|
+
},
|
|
129
|
+
longitude: {
|
|
130
|
+
type: 'number',
|
|
131
|
+
description: 'Longitude for location messages.',
|
|
132
|
+
},
|
|
133
|
+
mediaId: {
|
|
134
|
+
type: 'string',
|
|
135
|
+
description: 'WhatsApp media ID if already uploaded.',
|
|
136
|
+
},
|
|
137
|
+
mediaUrl: {
|
|
138
|
+
type: 'string',
|
|
139
|
+
description: 'URL of the media file (for image, video, audio, document, sticker).',
|
|
140
|
+
},
|
|
141
|
+
mimeType: {
|
|
142
|
+
type: 'string',
|
|
143
|
+
description: 'MIME type of the media.',
|
|
144
|
+
},
|
|
145
|
+
reactToMessageId: {
|
|
146
|
+
type: 'string',
|
|
147
|
+
description: 'Message ID to react to.',
|
|
148
|
+
},
|
|
149
|
+
sections: {
|
|
150
|
+
type: 'array',
|
|
151
|
+
description: 'Sections for list messages.',
|
|
152
|
+
items: {
|
|
153
|
+
type: 'object',
|
|
154
|
+
properties: {
|
|
155
|
+
rows: {
|
|
156
|
+
type: 'array',
|
|
157
|
+
items: {
|
|
158
|
+
type: 'object',
|
|
159
|
+
properties: {
|
|
160
|
+
id: {
|
|
161
|
+
type: 'string',
|
|
162
|
+
},
|
|
163
|
+
title: {
|
|
164
|
+
type: 'string',
|
|
165
|
+
},
|
|
166
|
+
description: {
|
|
167
|
+
type: 'string',
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
required: ['id', 'title'],
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
title: {
|
|
174
|
+
type: 'string',
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
required: ['rows', 'title'],
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
templateId: {
|
|
181
|
+
type: 'string',
|
|
182
|
+
description: 'Template ID for template messages.',
|
|
183
|
+
},
|
|
184
|
+
templateVariables: {
|
|
185
|
+
type: 'object',
|
|
186
|
+
description: 'Variables for template rendering. Keys are variable positions (1, 2, 3...).',
|
|
187
|
+
additionalProperties: true,
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
message_type: {
|
|
192
|
+
type: 'string',
|
|
193
|
+
description: 'Type of message. Non-text types are WhatsApp only.',
|
|
194
|
+
enum: [
|
|
195
|
+
'text',
|
|
196
|
+
'image',
|
|
197
|
+
'video',
|
|
198
|
+
'audio',
|
|
199
|
+
'document',
|
|
200
|
+
'sticker',
|
|
201
|
+
'location',
|
|
202
|
+
'contact',
|
|
203
|
+
'buttons',
|
|
204
|
+
'list',
|
|
205
|
+
'reaction',
|
|
206
|
+
'template',
|
|
207
|
+
],
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
annotations: {},
|
|
212
|
+
};
|
|
213
|
+
export const handler = async (client, args) => {
|
|
214
|
+
const body = args;
|
|
215
|
+
try {
|
|
216
|
+
return asTextContentResult(await client.messages.send(body));
|
|
217
|
+
}
|
|
218
|
+
catch (error) {
|
|
219
|
+
if (error instanceof Zavudev.APIError) {
|
|
220
|
+
return asErrorResult(error.message);
|
|
221
|
+
}
|
|
222
|
+
throw error;
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
export default { metadata, tool, handler };
|
|
226
|
+
//# sourceMappingURL=send-messages.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-messages.mjs","sourceRoot":"","sources":["../../src/tools/messages/send-messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAY,aAAa,EAAE,mBAAmB,EAAE,MAAM,8BAA8B;OAGpF,OAAO,MAAM,cAAc;AAElC,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,cAAc;IACxB,WAAW,EAAE,aAAa;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,eAAe;IACrB,WAAW,EACT,+bAA+b;IACjc,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,EAAE,EAAE;gBACF,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0DAA0D;aACxE;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,iBAAiB;aACxB;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,yBAAyB;aAChC;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,qGAAqG;aACxG;YACD,cAAc,EAAE;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oDAAoD;aAClE;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,sBAAsB;aAC7B;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,mDAAmD;gBAChE,oBAAoB,EAAE,IAAI;aAC3B;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd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AAI,EAAE,QAAQ;iCACf;6BACF;4BACD,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;yBAC5B;qBACF;oBACD,UAAU,EAAE;wBACV,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,oCAAoC;qBAClD;oBACD,iBAAiB,EAAE;wBACjB,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,6EAA6E;wBAC1F,oBAAoB,EAAE,IAAI;qBAC3B;iBACF;aACF;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oDAAoD;gBACjE,IAAI,EAAE;oBACJ,MAAM;oBACN,OAAO;oBACP,OAAO;oBACP,OAAO;oBACP,UAAU;oBACV,SAAS;oBACT,UAAU;oBACV,SAAS;oBACT,SAAS;oBACT,MAAM;oBACN,UAAU;oBACV,UAAU;iBACX;aACF;SACF;KACF;IACD,WAAW,EAAE,EAAE;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAe,EAAE,IAAyC,EAAE,EAAE;IAC1F,MAAM,IAAI,GAAG,IAAW,CAAC;IACzB,IAAI,CAAC;QACH,OAAO,mBAAmB,CAAC,MAAM,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,OAAO,CAAC,QAAQ,EAAE,CAAC;YACtC,OAAO,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Metadata } from '@zavudev/sdk-mcp/tools/types';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import Zavudev from '@zavudev/sdk';
|
|
4
|
+
export declare const metadata: Metadata;
|
|
5
|
+
export declare const tool: Tool;
|
|
6
|
+
export declare const handler: (client: Zavudev, args: Record<string, unknown> | undefined) => Promise<import("@zavudev/sdk-mcp/tools/types").ToolCallResult>;
|
|
7
|
+
declare const _default: {
|
|
8
|
+
metadata: Metadata;
|
|
9
|
+
tool: {
|
|
10
|
+
inputSchema: {
|
|
11
|
+
[x: string]: unknown;
|
|
12
|
+
type: "object";
|
|
13
|
+
properties?: {
|
|
14
|
+
[x: string]: object;
|
|
15
|
+
} | undefined;
|
|
16
|
+
required?: string[] | undefined;
|
|
17
|
+
};
|
|
18
|
+
name: string;
|
|
19
|
+
description?: string | undefined;
|
|
20
|
+
outputSchema?: {
|
|
21
|
+
[x: string]: unknown;
|
|
22
|
+
type: "object";
|
|
23
|
+
properties?: {
|
|
24
|
+
[x: string]: object;
|
|
25
|
+
} | undefined;
|
|
26
|
+
required?: string[] | undefined;
|
|
27
|
+
} | undefined;
|
|
28
|
+
annotations?: {
|
|
29
|
+
title?: string | undefined;
|
|
30
|
+
readOnlyHint?: boolean | undefined;
|
|
31
|
+
destructiveHint?: boolean | undefined;
|
|
32
|
+
idempotentHint?: boolean | undefined;
|
|
33
|
+
openWorldHint?: boolean | undefined;
|
|
34
|
+
} | undefined;
|
|
35
|
+
execution?: {
|
|
36
|
+
taskSupport?: "optional" | "required" | "forbidden" | undefined;
|
|
37
|
+
} | undefined;
|
|
38
|
+
_meta?: {
|
|
39
|
+
[x: string]: unknown;
|
|
40
|
+
} | undefined;
|
|
41
|
+
icons?: {
|
|
42
|
+
src: string;
|
|
43
|
+
mimeType?: string | undefined;
|
|
44
|
+
sizes?: string[] | undefined;
|
|
45
|
+
}[] | undefined;
|
|
46
|
+
title?: string | undefined;
|
|
47
|
+
};
|
|
48
|
+
handler: (client: Zavudev, args: Record<string, unknown> | undefined) => Promise<import("@zavudev/sdk-mcp/tools/types").ToolCallResult>;
|
|
49
|
+
};
|
|
50
|
+
export default _default;
|
|
51
|
+
//# sourceMappingURL=list-phone-numbers.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-phone-numbers.d.mts","sourceRoot":"","sources":["../../src/tools/phone-numbers/list-phone-numbers.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAsC,MAAM,8BAA8B;OAEpF,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,OAAO,MAAM,cAAc;AAElC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAmClB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,OAAO,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAWvF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAXoC,OAAO,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAaxF,wBAA2C"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Metadata } from '@zavudev/sdk-mcp/tools/types';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import Zavudev from '@zavudev/sdk';
|
|
4
|
+
export declare const metadata: Metadata;
|
|
5
|
+
export declare const tool: Tool;
|
|
6
|
+
export declare const handler: (client: Zavudev, args: Record<string, unknown> | undefined) => Promise<import("@zavudev/sdk-mcp/tools/types").ToolCallResult>;
|
|
7
|
+
declare const _default: {
|
|
8
|
+
metadata: Metadata;
|
|
9
|
+
tool: {
|
|
10
|
+
inputSchema: {
|
|
11
|
+
[x: string]: unknown;
|
|
12
|
+
type: "object";
|
|
13
|
+
properties?: {
|
|
14
|
+
[x: string]: object;
|
|
15
|
+
} | undefined;
|
|
16
|
+
required?: string[] | undefined;
|
|
17
|
+
};
|
|
18
|
+
name: string;
|
|
19
|
+
description?: string | undefined;
|
|
20
|
+
outputSchema?: {
|
|
21
|
+
[x: string]: unknown;
|
|
22
|
+
type: "object";
|
|
23
|
+
properties?: {
|
|
24
|
+
[x: string]: object;
|
|
25
|
+
} | undefined;
|
|
26
|
+
required?: string[] | undefined;
|
|
27
|
+
} | undefined;
|
|
28
|
+
annotations?: {
|
|
29
|
+
title?: string | undefined;
|
|
30
|
+
readOnlyHint?: boolean | undefined;
|
|
31
|
+
destructiveHint?: boolean | undefined;
|
|
32
|
+
idempotentHint?: boolean | undefined;
|
|
33
|
+
openWorldHint?: boolean | undefined;
|
|
34
|
+
} | undefined;
|
|
35
|
+
execution?: {
|
|
36
|
+
taskSupport?: "optional" | "required" | "forbidden" | undefined;
|
|
37
|
+
} | undefined;
|
|
38
|
+
_meta?: {
|
|
39
|
+
[x: string]: unknown;
|
|
40
|
+
} | undefined;
|
|
41
|
+
icons?: {
|
|
42
|
+
src: string;
|
|
43
|
+
mimeType?: string | undefined;
|
|
44
|
+
sizes?: string[] | undefined;
|
|
45
|
+
}[] | undefined;
|
|
46
|
+
title?: string | undefined;
|
|
47
|
+
};
|
|
48
|
+
handler: (client: Zavudev, args: Record<string, unknown> | undefined) => Promise<import("@zavudev/sdk-mcp/tools/types").ToolCallResult>;
|
|
49
|
+
};
|
|
50
|
+
export default _default;
|
|
51
|
+
//# sourceMappingURL=list-phone-numbers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-phone-numbers.d.ts","sourceRoot":"","sources":["../../src/tools/phone-numbers/list-phone-numbers.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAsC,MAAM,8BAA8B;OAEpF,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,OAAO,MAAM,cAAc;AAElC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAmClB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,OAAO,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,mEAWvF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAXoC,OAAO,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAaxF,wBAA2C"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.handler = exports.tool = exports.metadata = void 0;
|
|
8
|
+
const filtering_1 = require("@zavudev/sdk-mcp/filtering");
|
|
9
|
+
const types_1 = require("@zavudev/sdk-mcp/tools/types");
|
|
10
|
+
const sdk_1 = __importDefault(require("@zavudev/sdk"));
|
|
11
|
+
exports.metadata = {
|
|
12
|
+
resource: 'phone_numbers',
|
|
13
|
+
operation: 'read',
|
|
14
|
+
tags: [],
|
|
15
|
+
httpMethod: 'get',
|
|
16
|
+
httpPath: '/v1/phone-numbers',
|
|
17
|
+
operationId: 'listPhoneNumbers',
|
|
18
|
+
};
|
|
19
|
+
exports.tool = {
|
|
20
|
+
name: 'list_phone_numbers',
|
|
21
|
+
description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList all phone numbers owned by this project.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n items: {\n type: 'array',\n items: {\n $ref: '#/$defs/owned_phone_number'\n }\n },\n nextCursor: {\n type: 'string'\n }\n },\n required: [ 'items'\n ],\n $defs: {\n owned_phone_number: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n capabilities: {\n type: 'array',\n items: {\n type: 'string'\n }\n },\n createdAt: {\n type: 'string',\n format: 'date-time'\n },\n phoneNumber: {\n type: 'string'\n },\n pricing: {\n $ref: '#/$defs/owned_phone_number_pricing'\n },\n status: {\n $ref: '#/$defs/phone_number_status'\n },\n name: {\n type: 'string',\n description: 'Optional custom name for the phone number.'\n },\n nextRenewalDate: {\n type: 'string',\n format: 'date-time'\n },\n senderId: {\n type: 'string',\n description: 'Sender ID if the phone number is assigned to a sender.'\n },\n updatedAt: {\n type: 'string',\n format: 'date-time'\n }\n },\n required: [ 'id',\n 'capabilities',\n 'createdAt',\n 'phoneNumber',\n 'pricing',\n 'status'\n ]\n },\n owned_phone_number_pricing: {\n type: 'object',\n properties: {\n isFreeNumber: {\n type: 'boolean',\n description: 'Whether this is a free number.'\n },\n monthlyCost: {\n type: 'number',\n description: 'Monthly cost in cents.'\n },\n monthlyPrice: {\n type: 'number',\n description: 'Monthly price in USD.'\n },\n upfrontCost: {\n type: 'number',\n description: 'One-time purchase cost in cents.'\n }\n }\n },\n phone_number_status: {\n type: 'string',\n enum: [ 'active',\n 'suspended',\n 'pending'\n ]\n }\n }\n}\n```",
|
|
22
|
+
inputSchema: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
properties: {
|
|
25
|
+
cursor: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
description: 'Pagination cursor.',
|
|
28
|
+
},
|
|
29
|
+
limit: {
|
|
30
|
+
type: 'integer',
|
|
31
|
+
},
|
|
32
|
+
status: {
|
|
33
|
+
$ref: '#/$defs/phone_number_status',
|
|
34
|
+
},
|
|
35
|
+
jq_filter: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
title: 'jq Filter',
|
|
38
|
+
description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
required: [],
|
|
42
|
+
$defs: {
|
|
43
|
+
phone_number_status: {
|
|
44
|
+
type: 'string',
|
|
45
|
+
enum: ['active', 'suspended', 'pending'],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
annotations: {
|
|
50
|
+
readOnlyHint: true,
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
const handler = async (client, args) => {
|
|
54
|
+
const { jq_filter, ...body } = args;
|
|
55
|
+
const response = await client.phoneNumbers.list(body).asResponse();
|
|
56
|
+
try {
|
|
57
|
+
return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await response.json()));
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
if (error instanceof sdk_1.default.APIError || (0, filtering_1.isJqError)(error)) {
|
|
61
|
+
return (0, types_1.asErrorResult)(error.message);
|
|
62
|
+
}
|
|
63
|
+
throw error;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
exports.handler = handler;
|
|
67
|
+
exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
|
|
68
|
+
//# sourceMappingURL=list-phone-numbers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-phone-numbers.js","sourceRoot":"","sources":["../../src/tools/phone-numbers/list-phone-numbers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;AAEtF,0DAAoE;AACpE,wDAA4F;AAG5F,uDAAmC;AAEtB,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,eAAe;IACzB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,mBAAmB;IAC7B,WAAW,EAAE,kBAAkB;CAChC,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EACT,g2EAAg2E;IACl2E,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oBAAoB;aAClC;YACD,KAAK,E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