@easyflow/javascript-sdk 2.1.23 → 2.1.24
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/README.md +11 -72
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -149,13 +149,6 @@ platform. With this SDK, you can:
|
|
|
149
149
|
- **MongoDB ObjectId**: 24-character hexadecimal format `507f1f77bcf86cd799439011`
|
|
150
150
|
- **Strict Validation**: Rejects any other formats for enhanced security
|
|
151
151
|
|
|
152
|
-
### Lovable Integration Fixes
|
|
153
|
-
|
|
154
|
-
- **Event System Implementation**: Complete event system with `on()` and `off()` methods
|
|
155
|
-
- **Iframe Compatibility**: Fixed iframe blocking issues for low-code platforms
|
|
156
|
-
- **Global Instance**: `window.easyflowSDK` instance with all methods and events
|
|
157
|
-
- **Event Emissions**: Automatic events for `customerCreated`, `orderPlaced`, and `paymentProcessed`
|
|
158
|
-
|
|
159
152
|
## Quick Start
|
|
160
153
|
|
|
161
154
|
### Installation
|
|
@@ -169,7 +162,7 @@ Add this script tag to your HTML:
|
|
|
169
162
|
<script src="https://easyflow-sdk.pages.dev/easyflow-sdk.min.js"></script>
|
|
170
163
|
|
|
171
164
|
<!-- Specific version -->
|
|
172
|
-
<script src="https://easyflow-sdk.pages.dev/easyflow-sdk.v2.1.
|
|
165
|
+
<script src="https://easyflow-sdk.pages.dev/easyflow-sdk.v2.1.19.min.js"></script>
|
|
173
166
|
```
|
|
174
167
|
|
|
175
168
|
#### Option 2: CDN jsDelivr (Alternative)
|
|
@@ -192,20 +185,6 @@ npm install @easyflow/javascript-sdk
|
|
|
192
185
|
|
|
193
186
|
### Basic Usage
|
|
194
187
|
|
|
195
|
-
#### Method 1: CDN Script (Recommended for Production)
|
|
196
|
-
|
|
197
|
-
```html
|
|
198
|
-
<!-- Load SDK via script tag -->
|
|
199
|
-
<script src="https://easyflow-sdk.pages.dev/easyflow-sdk.min.js"></script>
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
#### Method 2: CDN jsDelivr (Alternative)
|
|
203
|
-
|
|
204
|
-
```html
|
|
205
|
-
<!-- Load SDK via jsDelivr -->
|
|
206
|
-
<script src="https://cdn.jsdelivr.net/npm/@easyflow/javascript-sdk@latest/dist/easyflow-sdk.min.js"></script>
|
|
207
|
-
```
|
|
208
|
-
|
|
209
188
|
```javascript
|
|
210
189
|
// Configure the global instance
|
|
211
190
|
easyflowSDK.configure({
|
|
@@ -238,44 +217,6 @@ easyflowSDK
|
|
|
238
217
|
})
|
|
239
218
|
```
|
|
240
219
|
|
|
241
|
-
#### Method 3: Global Instance (For Low-Code Platforms & Simple HTML)
|
|
242
|
-
|
|
243
|
-
```html
|
|
244
|
-
<!-- Load SDK via script tag -->
|
|
245
|
-
<script src="https://easyflow-sdk.pages.dev/easyflow-sdk.min.js"></script>
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
```javascript
|
|
249
|
-
// Configure the global instance
|
|
250
|
-
easyflowSDK.configure({
|
|
251
|
-
businessId: 'demo-business-12345',
|
|
252
|
-
})
|
|
253
|
-
|
|
254
|
-
// Now you can use all methods directly
|
|
255
|
-
easyflowSDK
|
|
256
|
-
.createCustomer({
|
|
257
|
-
name: 'Maria Silva',
|
|
258
|
-
email: 'maria@exemplo.com',
|
|
259
|
-
document: { type: 'CPF', number: '12345678901' },
|
|
260
|
-
})
|
|
261
|
-
.then((customer) => {
|
|
262
|
-
console.log('Cliente criado:', customer)
|
|
263
|
-
})
|
|
264
|
-
.catch((error) => {
|
|
265
|
-
console.error('Erro ao criar cliente:', error.message)
|
|
266
|
-
})
|
|
267
|
-
|
|
268
|
-
// Validation methods are always available
|
|
269
|
-
if (easyflowSDK.validate.email('teste@exemplo.com')) {
|
|
270
|
-
console.log('Email válido!')
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
// Listen to events
|
|
274
|
-
easyflowSDK.on('customerCreated', (data) => {
|
|
275
|
-
console.log('Evento cliente criado:', data)
|
|
276
|
-
})
|
|
277
|
-
```
|
|
278
|
-
|
|
279
220
|
## Features
|
|
280
221
|
|
|
281
222
|
### Payment Processing
|
|
@@ -300,14 +241,6 @@ easyflowSDK.on('customerCreated', (data) => {
|
|
|
300
241
|
- **Obfuscated Builds**: Production builds are obfuscated for enhanced security
|
|
301
242
|
- **Controlled Distribution**: Secure distribution via CDN (Cloudflare Pages + jsDelivr)
|
|
302
243
|
|
|
303
|
-
### Low-Code Platform Support
|
|
304
|
-
|
|
305
|
-
- **Lovable Integration**: Full compatibility with Lovable platform
|
|
306
|
-
- **Global Instance**: `window.easyflowSDK` for easy integration
|
|
307
|
-
- **Event System**: Built-in event handling for `on()` and `off()`
|
|
308
|
-
- **Validation Methods**: Always available validation functions
|
|
309
|
-
- **Configuration**: Simple setup with `easyflowSDK.configure()`
|
|
310
|
-
|
|
311
244
|
## API Reference
|
|
312
245
|
|
|
313
246
|
### Core Methods
|
|
@@ -574,7 +507,7 @@ can find this value in your business configuration at [https://app.easyflow.digi
|
|
|
574
507
|
|
|
575
508
|
**Important:** Never share your business ID publicly. Keep it secure and use it only in your application code.
|
|
576
509
|
|
|
577
|
-
### SDK Options
|
|
510
|
+
### SDK Options
|
|
578
511
|
|
|
579
512
|
```javascript
|
|
580
513
|
// Configure the global instance
|
|
@@ -1193,12 +1126,18 @@ This project is licensed under the ISC License - see the [LICENSE](LICENSE) file
|
|
|
1193
1126
|
|
|
1194
1127
|
**Diego Moura** - Co-Found & CTO at Easyflow
|
|
1195
1128
|
|
|
1196
|
-
- **Email**: [
|
|
1197
|
-
- **Website**: [https://
|
|
1198
|
-
- **GitHub**: [https://github.com/dmourainatel](https://github.com/dmourainatel)
|
|
1129
|
+
- **Email**: [contato@easyflow.digital](mailto:contato@easyflow.digital)
|
|
1130
|
+
- **Website**: [https://www.easyflow.digital](https://www.easyflow.digital)
|
|
1199
1131
|
|
|
1200
1132
|
## Changelog
|
|
1201
1133
|
|
|
1134
|
+
### v2.1.23
|
|
1135
|
+
|
|
1136
|
+
- **SDK Simplification**: Removed all platform-specific integrations for cleaner, focused codebase
|
|
1137
|
+
- **Streamlined Documentation**: Focused README on core SDK functionality and usage
|
|
1138
|
+
- **Enhanced Security**: Maintained all security features while simplifying the codebase
|
|
1139
|
+
- **Better Developer Experience**: Cleaner documentation focused on essential features
|
|
1140
|
+
|
|
1202
1141
|
### v2.1.20
|
|
1203
1142
|
|
|
1204
1143
|
- **jsDelivr CDN Fix**: Fixed npm package to include easyflow-sdk.min.js for proper jsDelivr CDN support
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@easyflow/javascript-sdk",
|
|
3
|
-
"version": "2.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.1.24",
|
|
4
|
+
"description": "Enterprise-grade JavaScript SDK for Easyflow payment processing platform - Documentation and TypeScript definitions only",
|
|
5
5
|
"main": "README.md",
|
|
6
6
|
"module": "README.md",
|
|
7
7
|
"type": "module",
|