-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding context types to get and listen methods #131
adding context types to get and listen methods #131
Conversation
package.json
Outdated
@@ -16,6 +16,7 @@ | |||
"server-sdk.js" | |||
], | |||
"dependencies": { | |||
"monday-ui-react-core": "^2.63.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this SDK is also used by nodejs servers, so we better only get the types from this package and also move this to devDependencies
types/client-context.type.ts
Outdated
@@ -0,0 +1,238 @@ | |||
import { Theme } from "monday-ui-react-core/dist/types/components/ThemeProvider/ThemeProviderConstants"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { Theme } from "monday-ui-react-core/dist/types/components/ThemeProvider/ThemeProviderConstants"; | |
import type { Theme } from "monday-ui-react-core/dist/types/components/ThemeProvider/ThemeProviderConstants"; |
package.json
Outdated
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "monday-sdk-js", | |||
"version": "0.4.12", | |||
"version": "0.4.13", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a big change, let's bump to 0.5.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing job 👏
overriding settings type depending on you app settings configured in dev center
![Screen Shot 2023-11-30 at 13 01 25](https://private-user-images.githubusercontent.com/105207523/286998937-caf2eaa4-028c-4603-82a6-3a4b86776ef1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM2MDA0OTMsIm5iZiI6MTcyMzYwMDE5MywicGF0aCI6Ii8xMDUyMDc1MjMvMjg2OTk4OTM3LWNhZjJlYWE0LTAyOGMtNDYwMy04MmE2LTNhNGI4Njc3NmVmMS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxNFQwMTQ5NTNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yYzhmZjIxNzdjODMxNjA5NzRkZjZmN2NjNmRkMzIzZTIwNmY4Yzg2OTY2OGNlNDY1NmRlOTE4ODAxZGI5YTdjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.w1U3Vu-BBHExiz6LnCfYoNEc2tDjGZ7KQib04zgWQ5M)
LISTEN: Typescript override the context with AppFeature[type]Context
![Screen Shot 2023-11-30 at 12 59 08](https://private-user-images.githubusercontent.com/105207523/286999060-4d26e2be-f2bb-4941-b829-364152fbb6bd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM2MDA0OTMsIm5iZiI6MTcyMzYwMDE5MywicGF0aCI6Ii8xMDUyMDc1MjMvMjg2OTk5MDYwLTRkMjZlMmJlLWYyYmItNDk0MS1iODI5LTM2NDE1MmZiYjZiZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxNFQwMTQ5NTNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jZDRiMmZlNTQwZDE3OTE5ZGNjNGVjYjMwOWFlNWJlMGU4NmZjYWNlOGNlMjgzYWY3Zjc1MWIwN2QyMGE0YzFlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.R-nYcitAah29uxnCDdEHQMsN1CgKGBuTl6yi7dScddc)
GET: Context type without overriding well show the common context type for all feature types
![Screen Shot 2023-11-30 at 12 58 54](https://private-user-images.githubusercontent.com/105207523/286999075-2bf15253-45a0-439a-9032-3396014693d4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM2MDA0OTMsIm5iZiI6MTcyMzYwMDE5MywicGF0aCI6Ii8xMDUyMDc1MjMvMjg2OTk5MDc1LTJiZjE1MjUzLTQ1YTAtNDM5YS05MDMyLTMzOTYwMTQ2OTNkNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxNFQwMTQ5NTNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02YmIwZjgzMWNmYTQyNjQ5YmJlZGE3NDdhODFhNmVhZGE2ZDMwOWRjYTRlZTU1YjEzNGZlMmE0MjJlYTVmZGIyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.CR0837vuqXeD4I6QBONxHDipbENAfzjuRlntJPIL7Uc)
LISTEN: Context type without overriding well show the common context type for all feature types
![Screen Shot 2023-11-30 at 12 58 06](https://private-user-images.githubusercontent.com/105207523/286999092-749b1622-5dd6-4331-b3bd-1ed6867a98c9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM2MDA0OTMsIm5iZiI6MTcyMzYwMDE5MywicGF0aCI6Ii8xMDUyMDc1MjMvMjg2OTk5MDkyLTc0OWIxNjIyLTVkZDYtNDMzMS1iM2JkLTFlZDY4NjdhOThjOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxNFQwMTQ5NTNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iYTc1MjZjZDgxMmUzMzYwZWEyMjQ5MjE5MGZjNWE0ZTI3NzMwOTE1NDYxYzdhYzNlZDBlNGMyMWY5YjFkZjAzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.sqLsOA3t3I6_p4DmeLVFa0Eso8REGuiG7-iZ5MHKBWs)
GET: javascript overriding context type by passing appFeatureType as an option
![Screen Shot 2023-11-30 at 12 57 54](https://private-user-images.githubusercontent.com/105207523/286999124-742215c8-5a71-4b4e-8a01-9505aaf6386c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM2MDA0OTMsIm5iZiI6MTcyMzYwMDE5MywicGF0aCI6Ii8xMDUyMDc1MjMvMjg2OTk5MTI0LTc0MjIxNWM4LTVhNzEtNGI0ZS04YTAxLTk1MDVhYWY2Mzg2Yy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxNFQwMTQ5NTNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kNjVmOTgyZTAxZjViYTVlMGU3ZTRiNGQ4NGE2OGRhZjkxZWI5NDQzZjliMDk0ZjgzZGE1MGEyMDg3MDRmMWUwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.5DvSuAmvADNuxnYDbVx6BmgfF-b6ul1oPpaOEWkzJso)
GET: javascript list of app feature types to get context type based on
![Screen Shot 2023-11-30 at 12 57 41](https://private-user-images.githubusercontent.com/105207523/286999160-c96c9e6b-b337-4ff3-b091-5b3aeeb081ef.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM2MDA0OTMsIm5iZiI6MTcyMzYwMDE5MywicGF0aCI6Ii8xMDUyMDc1MjMvMjg2OTk5MTYwLWM5NmM5ZTZiLWIzMzctNGZmMy1iMDkxLTViM2FlZWIwODFlZi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxNFQwMTQ5NTNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jMGRiOGU2NmQ2ZDE2MWU1YTZiYWZhNmE1ZDYwOGM2MjU5NzdlNjhjMjcwYzg2Y2M3N2JjNmMxYTZkNzhjMmVkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.-PJlM1CRTjb7WtotSl7NVLfWnPOQZZ9NzzCtY4dC6gs)