Comments (5)
Hey @NatoBoram thanks for filing this issue. For context, Courier's SDK is generated with automation so this will involve updaating their API Definition and regenerating the SDK. We should be able to get to this today!
from courier-node.
I just updated to @trycourier/[email protected]
, reset my node_modules and lockfiles and restarted my CLIs but it doesn't seem to have changed anything
import { CourierClient } from "@trycourier/courier"
const courier = new CourierClient({ authorizationToken: "courier_auth_token" })
await courier.send({
message: {
to: {
slack: { access_token: "slack_access_token", channel: "channel_id" },
},
data: { message: "this is a message" },
},
})
src/courier/slack.ts:8:4 - error TS2353: Object literal may only specify known properties, and 'slack' does not exist in type 'MessageRecipient'.
8 slack: { access_token: "slack_access_token", channel: "channel_id" },
~~~~~
node_modules/@trycourier/courier/api/resources/send/types/ContentMessage.d.ts:16:5
16 to: Courier.MessageRecipient;
~~
The expected type comes from property 'to' which is declared here on type 'Message'
Found 1 error in src/courier/slack.ts:8
Have you managed to make it work with that version?
from courier-node.
@NatoBoram cc @bwebs @dsinghvi this should be live with the latest release - please let us know if you have any questions/feedback :)
from courier-node.
I think I spotted it. We are re-using this type in a couple of places, but it looks like we missed the "slack" property in Recipient that already existed in UserProfile. We tested with UserProfile, hence the miss.
from courier-node.
v6.0.7 will be released shortly; tested the typing for courier.send({to:{slack: ...}})
upstream as well.
from courier-node.
Related Issues (19)
- Please can idempotency be published HOT 2
- Request: support idempotencyKey in automations client
- Implement GET /messages api
- Support for Cloudflare Workers HOT 1
- Add some examples in ReadMe for enhanced send api HOT 2
- Support types for the "new" send step in the invoke automations API HOT 1
- Support /users/:user_id/tokens HOT 4
- courier.send returns empty response HOT 1
- Need courier.postProfile() method need HOT 1
- This is more of an improvement, is it possible to insert hyperlinks ( just like anchor tag in html ) in the message body to redirect to a url. HOT 1
- Example in repo no longer working since v5.0 HOT 1
- Type signature not matching server expected response HOT 1
- Feature request: REST endpoint for counting member of audience and number of subscribers
- [Feature request] Fetch all courier profiles
- Documentation update needed for courier.issueToken HOT 5
- Use a `fetch` obtained from the constructor HOT 1
- [Feature request]: Add DELETE token api to this SDK and docs HOT 1
- Courier 6.0.0 not published to npm HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from courier-node.