crisp-im / crisp-sdk-web

:package: Include the Crisp chat widget from using frameworks such as React, VueJS, Angular...
https://www.npmjs.com/package/crisp-sdk-web
MIT License
40 stars 13 forks source link

Carousel message type mismatch between docs & typings #16

Closed anisabboud closed 1 year ago

anisabboud commented 1 year ago

SDK docs for carousel message use "description": "...string...", while message.ts typings define description: boolean. Also, typings include a required label field, while the docs example is missing that field. Which is the correct code to use?

https://docs.crisp.chat/guides/chatbox-sdks/web-sdk/npm/#show-a-carousel-message image

https://github.com/crisp-im/crisp-sdk-web/blob/master/src/message.ts#L42 image

baptistejamin commented 1 year ago

This is clearly a bug with the TS definition. Let me fix this

baptistejamin commented 1 year ago

v1.0.17 is now released :)

anisabboud commented 1 year ago

Thank you for the quick response @baptistejamin!

I think the description field should be marked as optional. The label field doesn't seem to do anything, so could probably be removed.

image

baptistejamin commented 1 year ago

Updated :)