@robylon/whatsapp-react-sdk 1.0.0-staging.1
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/CONTRIBUTING.md +133 -0
- package/README.md +736 -0
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/types/components/ChatWidgetPopup.d.ts +8 -0
- package/dist/cjs/types/components/ChatbotContainer/ChatbotContainer.d.ts +15 -0
- package/dist/cjs/types/components/ChatbotContainer/index.d.ts +1 -0
- package/dist/cjs/types/components/ChatbotFloatingButton.d.ts +19 -0
- package/dist/cjs/types/components/ErrorBoundary.d.ts +15 -0
- package/dist/cjs/types/components/RobylonChatbot.d.ts +28 -0
- package/dist/cjs/types/config.d.ts +5 -0
- package/dist/cjs/types/constants/errorConstants.d.ts +60 -0
- package/dist/cjs/types/constants/fontStyles.d.ts +4 -0
- package/dist/cjs/types/core/api.d.ts +10 -0
- package/dist/cjs/types/core/config.d.ts +41 -0
- package/dist/cjs/types/core/events.d.ts +22 -0
- package/dist/cjs/types/core/index.d.ts +4 -0
- package/dist/cjs/types/core/state.d.ts +34 -0
- package/dist/cjs/types/hooks/useChatbot.d.ts +2 -0
- package/dist/cjs/types/hooks/useChatbotEvents.d.ts +12 -0
- package/dist/cjs/types/hooks/useChatbotState.d.ts +16 -0
- package/dist/cjs/types/hooks/useWhyDidYouUpdate.d.ts +5 -0
- package/dist/cjs/types/index.d.ts +6 -0
- package/dist/cjs/types/services/ErrorTrackingService.d.ts +38 -0
- package/dist/cjs/types/types/events.d.ts +29 -0
- package/dist/cjs/types/types/state.d.ts +5 -0
- package/dist/cjs/types/types.d.ts +137 -0
- package/dist/cjs/types/utils/chatbotSdk.d.ts +23 -0
- package/dist/cjs/types/utils/colorUtils.d.ts +1 -0
- package/dist/cjs/types/utils/cookieUtils.d.ts +6 -0
- package/dist/cjs/types/utils/environment.d.ts +12 -0
- package/dist/cjs/types/utils/fetchData.d.ts +53 -0
- package/dist/cjs/types/utils/launcherInfo.d.ts +11 -0
- package/dist/cjs/types/utils/logger.d.ts +6 -0
- package/dist/cjs/types/utils/misc.d.ts +1 -0
- package/dist/cjs/types/utils/originalFetchDataFile.d.ts +1 -0
- package/dist/cjs/types/utils/proactive.d.ts +25 -0
- package/dist/cjs/types/utils/sanitize.d.ts +4 -0
- package/dist/cjs/types/utils/systemInfo.d.ts +12 -0
- package/dist/cjs/types/utils/textDirection.d.ts +7 -0
- package/dist/cjs/types/utils/url.d.ts +8 -0
- package/dist/cjs/types/utils/version.d.ts +1 -0
- package/dist/cjs/types/vanilla/components/ChatWidgetPopup.d.ts +17 -0
- package/dist/cjs/types/vanilla/components/ChatbotContainer.d.ts +45 -0
- package/dist/cjs/types/vanilla/components/ChatbotFloatingButton.d.ts +83 -0
- package/dist/cjs/types/vanilla/index.d.ts +42 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/types/components/ChatWidgetPopup.d.ts +8 -0
- package/dist/esm/types/components/ChatbotContainer/ChatbotContainer.d.ts +15 -0
- package/dist/esm/types/components/ChatbotContainer/index.d.ts +1 -0
- package/dist/esm/types/components/ChatbotFloatingButton.d.ts +19 -0
- package/dist/esm/types/components/ErrorBoundary.d.ts +15 -0
- package/dist/esm/types/components/RobylonChatbot.d.ts +28 -0
- package/dist/esm/types/config.d.ts +5 -0
- package/dist/esm/types/constants/errorConstants.d.ts +60 -0
- package/dist/esm/types/constants/fontStyles.d.ts +4 -0
- package/dist/esm/types/core/api.d.ts +10 -0
- package/dist/esm/types/core/config.d.ts +41 -0
- package/dist/esm/types/core/events.d.ts +22 -0
- package/dist/esm/types/core/index.d.ts +4 -0
- package/dist/esm/types/core/state.d.ts +34 -0
- package/dist/esm/types/hooks/useChatbot.d.ts +2 -0
- package/dist/esm/types/hooks/useChatbotEvents.d.ts +12 -0
- package/dist/esm/types/hooks/useChatbotState.d.ts +16 -0
- package/dist/esm/types/hooks/useWhyDidYouUpdate.d.ts +5 -0
- package/dist/esm/types/index.d.ts +6 -0
- package/dist/esm/types/services/ErrorTrackingService.d.ts +38 -0
- package/dist/esm/types/types/events.d.ts +29 -0
- package/dist/esm/types/types/state.d.ts +5 -0
- package/dist/esm/types/types.d.ts +137 -0
- package/dist/esm/types/utils/chatbotSdk.d.ts +23 -0
- package/dist/esm/types/utils/colorUtils.d.ts +1 -0
- package/dist/esm/types/utils/cookieUtils.d.ts +6 -0
- package/dist/esm/types/utils/environment.d.ts +12 -0
- package/dist/esm/types/utils/fetchData.d.ts +53 -0
- package/dist/esm/types/utils/launcherInfo.d.ts +11 -0
- package/dist/esm/types/utils/logger.d.ts +6 -0
- package/dist/esm/types/utils/misc.d.ts +1 -0
- package/dist/esm/types/utils/originalFetchDataFile.d.ts +1 -0
- package/dist/esm/types/utils/proactive.d.ts +25 -0
- package/dist/esm/types/utils/sanitize.d.ts +4 -0
- package/dist/esm/types/utils/systemInfo.d.ts +12 -0
- package/dist/esm/types/utils/textDirection.d.ts +7 -0
- package/dist/esm/types/utils/url.d.ts +8 -0
- package/dist/esm/types/utils/version.d.ts +1 -0
- package/dist/esm/types/vanilla/components/ChatWidgetPopup.d.ts +17 -0
- package/dist/esm/types/vanilla/components/ChatbotContainer.d.ts +45 -0
- package/dist/esm/types/vanilla/components/ChatbotFloatingButton.d.ts +83 -0
- package/dist/esm/types/vanilla/index.d.ts +42 -0
- package/dist/index.d.ts +235 -0
- package/dist/umd/robylon-chatbot.js +2 -0
- package/dist/umd/robylon-chatbot.js.map +1 -0
- package/dist/umd/types/components/ChatWidgetPopup.d.ts +8 -0
- package/dist/umd/types/components/ChatbotContainer/ChatbotContainer.d.ts +15 -0
- package/dist/umd/types/components/ChatbotContainer/index.d.ts +1 -0
- package/dist/umd/types/components/ChatbotFloatingButton.d.ts +19 -0
- package/dist/umd/types/components/ErrorBoundary.d.ts +15 -0
- package/dist/umd/types/components/RobylonChatbot.d.ts +28 -0
- package/dist/umd/types/config.d.ts +5 -0
- package/dist/umd/types/constants/errorConstants.d.ts +60 -0
- package/dist/umd/types/constants/fontStyles.d.ts +4 -0
- package/dist/umd/types/core/api.d.ts +10 -0
- package/dist/umd/types/core/config.d.ts +41 -0
- package/dist/umd/types/core/events.d.ts +22 -0
- package/dist/umd/types/core/index.d.ts +4 -0
- package/dist/umd/types/core/state.d.ts +34 -0
- package/dist/umd/types/hooks/useChatbot.d.ts +2 -0
- package/dist/umd/types/hooks/useChatbotEvents.d.ts +12 -0
- package/dist/umd/types/hooks/useChatbotState.d.ts +16 -0
- package/dist/umd/types/hooks/useWhyDidYouUpdate.d.ts +5 -0
- package/dist/umd/types/index.d.ts +6 -0
- package/dist/umd/types/services/ErrorTrackingService.d.ts +38 -0
- package/dist/umd/types/types/events.d.ts +29 -0
- package/dist/umd/types/types/state.d.ts +5 -0
- package/dist/umd/types/types.d.ts +137 -0
- package/dist/umd/types/utils/chatbotSdk.d.ts +23 -0
- package/dist/umd/types/utils/colorUtils.d.ts +1 -0
- package/dist/umd/types/utils/cookieUtils.d.ts +6 -0
- package/dist/umd/types/utils/environment.d.ts +12 -0
- package/dist/umd/types/utils/fetchData.d.ts +53 -0
- package/dist/umd/types/utils/launcherInfo.d.ts +11 -0
- package/dist/umd/types/utils/logger.d.ts +6 -0
- package/dist/umd/types/utils/misc.d.ts +1 -0
- package/dist/umd/types/utils/originalFetchDataFile.d.ts +1 -0
- package/dist/umd/types/utils/proactive.d.ts +25 -0
- package/dist/umd/types/utils/sanitize.d.ts +4 -0
- package/dist/umd/types/utils/systemInfo.d.ts +12 -0
- package/dist/umd/types/utils/textDirection.d.ts +7 -0
- package/dist/umd/types/utils/url.d.ts +8 -0
- package/dist/umd/types/utils/version.d.ts +1 -0
- package/dist/umd/types/vanilla/components/ChatWidgetPopup.d.ts +17 -0
- package/dist/umd/types/vanilla/components/ChatbotContainer.d.ts +45 -0
- package/dist/umd/types/vanilla/components/ChatbotFloatingButton.d.ts +83 -0
- package/dist/umd/types/vanilla/index.d.ts +42 -0
- package/package.json +110 -0
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Contributing to Robylon Web React SDK
|
|
2
|
+
|
|
3
|
+
This guide is for developers contributing to the Robylon Web React SDK.
|
|
4
|
+
|
|
5
|
+
## Development Setup
|
|
6
|
+
|
|
7
|
+
1. Clone the repository
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
git clone https://github.com/OneWorldNation/robylon-whatsapp-sdk.git
|
|
11
|
+
cd robylon-whatsapp-sdk
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
2. Install dependencies
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Branching Strategy
|
|
21
|
+
|
|
22
|
+
We follow a trunk-based development model with the following branches:
|
|
23
|
+
|
|
24
|
+
> ⚠️ **Important**: Always create new branches using `npm run branch`
|
|
25
|
+
> Direct branch creation (git checkout -b) is disabled to ensure version control.
|
|
26
|
+
|
|
27
|
+
### Main Branch
|
|
28
|
+
|
|
29
|
+
- Single source of truth
|
|
30
|
+
- Always contains production-ready code
|
|
31
|
+
- Only receives merges from release branches
|
|
32
|
+
|
|
33
|
+
### Feature Branches: `feature/v{future-version}/{feature-name}`
|
|
34
|
+
|
|
35
|
+
- Used for developing new features
|
|
36
|
+
- Contains work-in-progress code
|
|
37
|
+
- Must be merged into release branch when complete
|
|
38
|
+
- Example: `feature/v1.1.15/add-chat-widget`
|
|
39
|
+
|
|
40
|
+
### Release Branches: `release/v{version}`
|
|
41
|
+
|
|
42
|
+
- Collects all features for a specific version
|
|
43
|
+
- Created when ready to release a new version
|
|
44
|
+
- Used for final testing and preparation
|
|
45
|
+
- Merged into main when ready for production
|
|
46
|
+
- Example: `release/v1.1.15`
|
|
47
|
+
|
|
48
|
+
### Hotfix Branches: `hotfix/v{version}-patch.{number}`
|
|
49
|
+
|
|
50
|
+
- Used for fixing issues in older versions
|
|
51
|
+
- Branched from specific version tags
|
|
52
|
+
- Example: `hotfix/v1.1.14-patch.1`
|
|
53
|
+
|
|
54
|
+
## Git Hooks
|
|
55
|
+
|
|
56
|
+
This project uses Git hooks to enforce branch naming conventions. The hooks are automatically installed when you run `npm install`.
|
|
57
|
+
|
|
58
|
+
If you need to reinstall the hooks manually:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npm run postinstall
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Build and Test
|
|
65
|
+
|
|
66
|
+
- Development build: `npm run build:development`
|
|
67
|
+
- Staging build: `npm run build:staging`
|
|
68
|
+
- Production build: `npm run build:production`
|
|
69
|
+
- Run tests: `npm test`
|
|
70
|
+
- Watch tests: `npm run test:watch`
|
|
71
|
+
- Lint code: `npm run lint`
|
|
72
|
+
- Fix lint issues: `npm run lint:fix`
|
|
73
|
+
|
|
74
|
+
## Publishing
|
|
75
|
+
|
|
76
|
+
### Staging
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
npm run publish:staging
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Production
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
npm run publish:production
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Branch Flow
|
|
89
|
+
|
|
90
|
+
1. Create feature branches for new work
|
|
91
|
+
2. Develop and test features independently
|
|
92
|
+
3. When all features for a version are ready:
|
|
93
|
+
- Create a release branch
|
|
94
|
+
- Merge all related feature branches into it
|
|
95
|
+
4. Test the release branch thoroughly
|
|
96
|
+
5. When ready:
|
|
97
|
+
- Merge release branch into main
|
|
98
|
+
- Run publish:production
|
|
99
|
+
- Tag is automatically created
|
|
100
|
+
|
|
101
|
+
### Publishing Process
|
|
102
|
+
|
|
103
|
+
1. For new versions:
|
|
104
|
+
|
|
105
|
+
Run the release process from your release branch:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
git checkout release/v1.1.15
|
|
109
|
+
npm run release
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
This will automatically:
|
|
113
|
+
|
|
114
|
+
1. Validate the release branch
|
|
115
|
+
2. Check for version conflicts
|
|
116
|
+
3. Publish to npm
|
|
117
|
+
4. Create git tag
|
|
118
|
+
5. Merge to main
|
|
119
|
+
|
|
120
|
+
2. For hotfixes:
|
|
121
|
+
```bash
|
|
122
|
+
# From hotfix branch
|
|
123
|
+
git checkout hotfix/v1.1.14-patch.1
|
|
124
|
+
npm run publish:hotfix
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Version Control
|
|
128
|
+
|
|
129
|
+
### Tags
|
|
130
|
+
|
|
131
|
+
- Each release is tagged (e.g., `v1.1.14`)
|
|
132
|
+
- Tags are created automatically after publishing
|
|
133
|
+
- Use tags to checkout specific versions
|