@easyflow/javascript-sdk 2.1.17 → 2.1.19

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.
Files changed (2) hide show
  1. package/README.md +118 -98
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,10 +1,9 @@
1
1
  # Easyflow JavaScript SDK
2
2
 
3
- [![Build Status](https://github.com/easyflow-cash/easyflow-javascript-sdk/workflows/Build%20&%20Deploy%20Easyflow%20SDK/badge.svg)](https://github.com/easyflow-cash/easyflow-javascript-sdk/actions)
4
- [![Version](https://img.shields.io/badge/version-2.1.14-blue.svg)](https://easyflow-sdk.pages.dev)
5
- [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
6
- [![Tests](https://img.shields.io/badge/tests-250%20passing-brightgreen.svg)](https://github.com/easyflow-cash/easyflow-javascript-sdk)
7
- [![Coverage](https://img.shields.io/badge/coverage-95%25-brightgreen.svg)](https://github.com/easyflow-cash/easyflow-javascript-sdk)
3
+ [![Version](https://img.shields.io/badge/version-2.1.19-blue.svg)](https://easyflow-sdk.pages.dev)
4
+ [![License](https://img.shields.io/badge/license-ISC-green.svg)](LICENSE)
5
+ [![Tests](https://img.shields.io/badge/tests-251%20passing-brightgreen.svg)](https://easyflow-sdk.pages.dev)
6
+ [![Coverage](https://img.shields.io/badge/coverage-95%25-brightgreen.svg)](https://easyflow-sdk.pages.dev)
8
7
 
9
8
  <div align="center">
10
9
 
@@ -88,7 +87,7 @@ platform. With this SDK, you can:
88
87
  - **High Performance**: Optimized for production
89
88
  - **Complete Documentation**: Practical examples for all use cases
90
89
 
91
- ## What's New in v2.1.14
90
+ ## What's New in v2.1.19
92
91
 
93
92
  ### Complete Implementation Examples
94
93
 
@@ -181,11 +180,6 @@ npm install @easyflow/javascript-sdk
181
180
 
182
181
  **Note**: The NPM package contains only documentation. For production use, use the CDN script above.
183
182
 
184
- #### Option 3: Direct Download
185
-
186
- Download the latest obfuscated build
187
- from [GitHub Releases](https://github.com/easyflow-cash/easyflow-javascript-sdk/releases).
188
-
189
183
  ### Basic Usage
190
184
 
191
185
  #### Method 1: CDN Script (Recommended for Production)
@@ -309,38 +303,37 @@ Creates an order using an existing offer.
309
303
  const orderId = await easyflowSDK.placeOrder('demo-offer-67890', {
310
304
  buyer: {
311
305
  customerId: customer.id,
312
- name: "E. R.",
313
- email: "e***o@gmail.com",
306
+ name: 'E. R.',
307
+ email: 'e***o@gmail.com',
314
308
  document: {
315
- number: "***202266**",
316
- type: "CPF"
309
+ number: '***202266**',
310
+ type: 'CPF',
317
311
  },
318
312
  phone: {
319
- areaCode: "+55",
320
- ddd: "92",
321
- number: "*****2191",
322
- isMobile: true
313
+ areaCode: '+55',
314
+ ddd: '92',
315
+ number: '*****2191',
316
+ isMobile: true,
323
317
  },
324
318
  address: {
325
- zipCode: "37537***",
326
- street: "Rua R. C. M. de A.",
327
- complement: "",
328
- neighborhood: "M. do S.",
329
- city: "Santa Rita do Sapucaí",
330
- state: "MG",
331
- number: "***"
332
- }
319
+ zipCode: '37537***',
320
+ street: 'Rua R. C. M. de A.',
321
+ complement: '',
322
+ neighborhood: 'M. do S.',
323
+ city: 'Santa Rita do Sapucaí',
324
+ state: 'MG',
325
+ number: '***',
326
+ },
333
327
  },
334
- payments:
335
- [
336
- {
337
- method: 'credit-card',
338
- creditCard: {
339
- token: 'valid token here',
340
- },
341
- numberInstallments: 1,
328
+ payments: [
329
+ {
330
+ method: 'credit-card',
331
+ creditCard: {
332
+ token: 'valid token here',
342
333
  },
343
- ],
334
+ numberInstallments: 1,
335
+ },
336
+ ],
344
337
  metadata: [],
345
338
  })
346
339
  ```
@@ -557,6 +550,13 @@ try {
557
550
 
558
551
  ## Configuration
559
552
 
553
+ ### Business ID
554
+
555
+ The `businessId` parameter is a required configuration that identifies your business within the Easyflow platform. You
556
+ can find this value in your business configuration at [https://app.easyflow.digital/](https://app.easyflow.digital/).
557
+
558
+ **Important:** Never share your business ID publicly. Keep it secure and use it only in your application code.
559
+
560
560
  ### SDK Options (CDN Implementation)
561
561
 
562
562
  ```javascript
@@ -605,38 +605,37 @@ const creditCard = await easyflowSDK.addCreditCard(customer.id, token)
605
605
  const orderId = await easyflowSDK.placeOrder('demo-offer-67890', {
606
606
  buyer: {
607
607
  customerId: customer.id,
608
- name: "E. R.",
609
- email: "e***o@gmail.com",
608
+ name: 'E. R.',
609
+ email: 'e***o@gmail.com',
610
610
  document: {
611
- number: "***202266**",
612
- type: "CPF"
611
+ number: '***202266**',
612
+ type: 'CPF',
613
613
  },
614
614
  phone: {
615
- areaCode: "+55",
616
- ddd: "92",
617
- number: "*****2191",
618
- isMobile: true
615
+ areaCode: '+55',
616
+ ddd: '92',
617
+ number: '*****2191',
618
+ isMobile: true,
619
619
  },
620
620
  address: {
621
- zipCode: "37537***",
622
- street: "Rua R. C. M. de A.",
623
- complement: "",
624
- neighborhood: "M. do S.",
625
- city: "Santa Rita do Sapucaí",
626
- state: "MG",
627
- number: "***"
628
- }
621
+ zipCode: '37537***',
622
+ street: 'Rua R. C. M. de A.',
623
+ complement: '',
624
+ neighborhood: 'M. do S.',
625
+ city: 'Santa Rita do Sapucaí',
626
+ state: 'MG',
627
+ number: '***',
628
+ },
629
629
  },
630
- payments:
631
- [
632
- {
633
- method: 'credit-card',
634
- creditCard: {
635
- cardId: creditCard.id,
636
- },
637
- numberInstallments: 1,
630
+ payments: [
631
+ {
632
+ method: 'credit-card',
633
+ creditCard: {
634
+ cardId: creditCard.id,
638
635
  },
639
- ],
636
+ numberInstallments: 1,
637
+ },
638
+ ],
640
639
  metadata: [],
641
640
  })
642
641
  ```
@@ -646,34 +645,34 @@ const orderId = await easyflowSDK.placeOrder('demo-offer-67890', {
646
645
  ```javascript
647
646
  const orderId = await easyflowSDK.placeOrder('demo-offer-67890', {
648
647
  buyer: {
649
- name: "E. R.",
650
- email: "e***o@gmail.com",
648
+ name: 'E. R.',
649
+ email: 'e***o@gmail.com',
651
650
  document: {
652
- number: "***202266**",
653
- type: "CPF"
651
+ number: '***202266**',
652
+ type: 'CPF',
654
653
  },
655
654
  phone: {
656
- areaCode: "+55",
657
- ddd: "92",
658
- number: "*****2191",
659
- isMobile: true
655
+ areaCode: '+55',
656
+ ddd: '92',
657
+ number: '*****2191',
658
+ isMobile: true,
660
659
  },
661
660
  address: {
662
- zipCode: "37537***",
663
- street: "Rua R. C. M. de A.",
664
- complement: "",
665
- neighborhood: "M. do S.",
666
- city: "Santa Rita do Sapucaí",
667
- state: "MG",
668
- number: "***"
669
- }
661
+ zipCode: '37537***',
662
+ street: 'Rua R. C. M. de A.',
663
+ complement: '',
664
+ neighborhood: 'M. do S.',
665
+ city: 'Santa Rita do Sapucaí',
666
+ state: 'MG',
667
+ number: '***',
668
+ },
670
669
  },
671
670
  payments: [
672
671
  {
673
672
  method: 'pix',
674
673
  numberInstallments: 1,
675
674
  },
676
- ]
675
+ ],
677
676
  })
678
677
 
679
678
  // Get PIX data
@@ -686,27 +685,27 @@ console.log('PIX QR Code:', pixData.qrCode)
686
685
  ```javascript
687
686
  const orderId = await easyflowSDK.placeOrder('demo-offer-67890', {
688
687
  buyer: {
689
- name: "E. R.",
690
- email: "e***o@gmail.com",
688
+ name: 'E. R.',
689
+ email: 'e***o@gmail.com',
691
690
  document: {
692
- number: "***202266**",
693
- type: "CPF"
691
+ number: '***202266**',
692
+ type: 'CPF',
694
693
  },
695
694
  phone: {
696
- areaCode: "+55",
697
- ddd: "92",
698
- number: "*****2191",
699
- isMobile: true
695
+ areaCode: '+55',
696
+ ddd: '92',
697
+ number: '*****2191',
698
+ isMobile: true,
700
699
  },
701
700
  address: {
702
- zipCode: "37537***",
703
- street: "Rua R. C. M. de A.",
704
- complement: "",
705
- neighborhood: "M. do S.",
706
- city: "Santa Rita do Sapucaí",
707
- state: "MG",
708
- number: "***"
709
- }
701
+ zipCode: '37537***',
702
+ street: 'Rua R. C. M. de A.',
703
+ complement: '',
704
+ neighborhood: 'M. do S.',
705
+ city: 'Santa Rita do Sapucaí',
706
+ state: 'MG',
707
+ number: '***',
708
+ },
710
709
  },
711
710
  metadata: [],
712
711
  payments: [
@@ -875,7 +874,7 @@ const orderId = await easyflowSDK.charge({
875
874
  quantity: 1,
876
875
  priceInCents: 500,
877
876
  },
878
- ]
877
+ ],
879
878
  })
880
879
 
881
880
  console.log('Charge processed with credit card:', orderId)
@@ -1154,16 +1153,37 @@ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) f
1154
1153
  ## Support
1155
1154
 
1156
1155
  - **Documentation**: [https://docs.easyflow.digital](https://docs.easyflow.digital)
1157
- - **GitHub Issues
1158
- **: [https://github.com/easyflow-cash/easyflow-javascript-sdk/issues](https://github.com/easyflow-cash/easyflow-javascript-sdk/issues)
1159
1156
  - **Website**: [https://www.easyflow.digital](https://www.easyflow.digital)
1157
+ - **Contact**: [contato@easyflow.digital](mailto:contato@easyflow.digital)
1160
1158
 
1161
1159
  ## License
1162
1160
 
1163
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
1161
+ This project is licensed under the ISC License - see the [LICENSE](LICENSE) file for details.
1162
+
1163
+ ## Author
1164
+
1165
+ **Diego Moura** - Co-Found & CTO at Easyflow
1166
+
1167
+ - **Email**: [diego@easyflow.digital](mailto:diego@easyflow.digital)
1168
+ - **Website**: [https://diegomoura.pro](https://diegomoura.pro)
1169
+ - **GitHub**: [https://github.com/dmourainatel](https://github.com/dmourainatel)
1164
1170
 
1165
1171
  ## Changelog
1166
1172
 
1173
+ ### v2.1.19
1174
+
1175
+ - **Documentation Updates**: Removed all references to private repository
1176
+ - **Business ID Information**: Added clear guidance on where to find BUSINESS_ID parameter
1177
+ - **Contact Information**: Added official contact email for support
1178
+ - **Author Information**: Updated author details and role information
1179
+ - **Repository Cleanup**: Cleaned up all private repository references
1180
+
1181
+ ### v2.1.18
1182
+
1183
+ - **Version Update**: Patch release for latest improvements
1184
+ - **Documentation**: Updated version references and CDN URLs
1185
+ - **Consistency**: All version references aligned to v2.1.18
1186
+
1167
1187
  ### v2.1.17
1168
1188
 
1169
1189
  - **Complete Implementation Examples**: Added comprehensive examples for all major methods
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyflow/javascript-sdk",
3
- "version": "2.1.17",
3
+ "version": "2.1.19",
4
4
  "description": "Easyflow JavaScript SDK - Documentation and TypeScript definitions. For production use, use the CDN script: https://easyflow-sdk.pages.dev/easyflow-sdk.min.js",
5
5
  "main": "README.md",
6
6
  "module": "README.md",