@boostengine/collections 1.0.0 → 1.1.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/README.md CHANGED
@@ -1,111 +1,91 @@
1
- # @boostengine/collections
1
+ # @boostengine/collections 📮
2
2
 
3
- > Production-ready **Postman Collections (v2.1.0)** and **Environment Templates** for Indian eCommerce APIs: **Razorpay Payment Gateway** and **EasyEcom WMS & ERP**.
3
+ [![npm version](https://img.shields.io/npm/v/@boostengine/collections.svg?style=flat-square&color=blue)](https://www.npmjs.com/package/@boostengine/collections)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@boostengine/collections.svg?style=flat-square&color=green)](https://www.npmjs.com/package/@boostengine/collections)
5
+ [![license](https://img.shields.io/npm/l/@boostengine/collections.svg?style=flat-square)](https://github.com/boostengine/boostengine/blob/main/LICENSE)
6
+ [![Postman](https://img.shields.io/badge/Postman%20Schema-v2.1.0-orange.svg?style=flat-square)](https://www.postman.com/)
4
7
 
5
- Includes a zero-install **CLI tool** (`npx @boostengine/collections export`) to dump ready-to-import Postman JSON files into any project in 1 second.
8
+ > **Pre-built, production-ready Postman Collections (Schema v2.1.0) and Environments for Indian and global eCommerce APIs: Razorpay, Cashfree, PhonePe, Paytm, Stripe, EasyEcom WMS, Shiprocket, Delhivery, and Shopify.**
6
9
 
7
- ---
8
-
9
- ## ⚡ Quickstart (CLI)
10
+ Test endpoints, simulate webhook payloads, and verify signatures in Postman with zero manual JSON schema authoring.
10
11
 
11
- Export complete collections and environment variables into your current working directory without installing:
12
+ ---
12
13
 
13
- ```bash
14
- # Export all collections & environments
15
- npx @boostengine/collections export all
14
+ ## 📸 Postman Workspace Hierarchy Preview
15
+
16
+ ```text
17
+ Postman Collections (@boostengine/collections)
18
+ ├── 💳 Payment Gateways
19
+ │ ├── [POST] Cashfree - Create Order Token (UPI / Intent)
20
+ │ ├── [POST] Razorpay - Create Standard Order
21
+ │ ├── [POST] PhonePe - Check Payment Status
22
+ │ ├── [POST] Stripe - Create PaymentIntent
23
+ │ └── [POST] Webhooks - Simulate PAYMENT_SUCCESS
24
+ ├── 🚚 Logistics & Courier APIs
25
+ │ ├── [GET] Shiprocket - Pincode Serviceability & Rate Check
26
+ │ ├── [POST] Delhivery - Generate AWB & Schedule Pickup
27
+ │ └── [GET] Unified Tracking - Multi-Hub Checkpoints
28
+ └── 📦 WMS & Multi-Channel Inventory
29
+ ├── [POST] EasyEcom - Stock Sync by SKU
30
+ └── [GET] Shopify Storefront - Catalog Graph Query
31
+ ```
16
32
 
17
- # Or export individually:
18
- npx @boostengine/collections export razorpay
19
- npx @boostengine/collections export easyecom
33
+ ---
20
34
 
21
- # Inspect available endpoints inside terminal:
22
- npx @boostengine/collections info razorpay
23
- ```
35
+ ## 🌟 Key Highlights
24
36
 
25
- ### 📥 How to Import into Postman / Bruno / Insomnia:
26
- 1. Open **Postman** (or Insomnia / Bruno / ThunderClient).
27
- 2. Click **Import** (Top left).
28
- 3. Drag & drop the exported `*.collection.json` and `*.env.json` files.
29
- 4. Select the imported Environment from top-right dropdown, paste your API keys, and start sending requests!
37
+ - **🎯 1-Click Postman Import**: Import pre-configured collections with dynamic test scripts and pre-request HMAC hashing scripts.
38
+ - **🔐 Environment Variables**: Includes `.postman_environment.json` templates with sandboxes and production endpoints.
39
+ - **⚡ Webhook Simulators**: Pre-configured mock payloads for simulating real-world gateway events.
40
+ - **🛠️ Programmatic Access**: Inspect and export schemas directly inside Node.js scripts or CI/CD pipelines.
30
41
 
31
42
  ---
32
43
 
33
- ## 📦 What's Included
34
-
35
- ### 1. 💳 Razorpay eCommerce API Collection (`razorpay.collection.json`)
36
- Official REST APIs configured with Basic Authentication:
37
- * **Orders API**:
38
- - `POST /v1/orders` (Create order with amount, currency, notes, receipt)
39
- - `GET /v1/orders/:id` (Fetch order details)
40
- - `GET /v1/orders/:id/payments` (Fetch all payments attempted against order)
41
- - `GET /v1/orders` (List recent orders with pagination)
42
- * **Payments API**:
43
- - `GET /v1/payments/:id` (Fetch payment status, UPI VPA, card details)
44
- - `POST /v1/payments/:id/capture` (Manual payment capture)
45
- - `PATCH /v1/payments/:id` (Update custom payment notes)
46
- * **Refunds API**:
47
- - `POST /v1/payments/:id/refund` (Instant & normal customer refunds)
48
- - `GET /v1/refunds/:id` (Check refund status)
49
- - `GET /v1/refunds` (List recent refunds)
50
- * **Webhook Simulator**:
51
- - `order.paid` mock payload
52
- - `payment.failed` mock payload
53
- - `payment.captured` mock payload
54
- - `refund.processed` mock payload
55
- - HMAC SHA256 signature verification guidance
44
+ ## 📦 Installation
56
45
 
57
- ---
46
+ ```bash
47
+ # npm
48
+ npm install @boostengine/collections
58
49
 
59
- ### 2. 🏬 EasyEcom Warehouse & ERP Collection (`easyecom.collection.json`)
60
- Official REST APIs configured with Bearer Token Authentication:
61
- * **Orders API**:
62
- - `GET /orders/v2/getOrders` (Fetch pending & unfulfilled orders)
63
- - `POST /orders/v2/createOrder` (Push new storefront orders into ERP)
64
- - `POST /orders/v2/updateOrderStatus` (Update fulfillment status to Shipped/Delivered)
65
- - `POST /orders/v2/cancelOrder` (Cancel order and auto-restore warehouse inventory)
66
- * **Inventory & Multi-Warehouse Stock**:
67
- - `GET /inventory/v2/getInventoryDetails` (Check sellable stock by SKU)
68
- - `POST /inventory/v2/updateInventory` (Sync warehouse inventory count)
69
- - `GET /inventory/v2/getWarehouses` (List all active fulfillment centers)
70
- * **Master Catalog**:
71
- - `GET /catalog/v2/getMasterProducts` (Fetch product master records)
72
- - `POST /catalog/v2/createProduct` (Register master SKU with HSN code & dimensions)
73
- * **Shipping & Manifests**:
74
- - `POST /shipping/v2/generateAwb` (Generate shipping label & tracking number)
75
- - `POST /shipping/v2/createManifest` (Create courier handover manifest PDF)
50
+ # pnpm
51
+ pnpm add @boostengine/collections
52
+
53
+ # yarn
54
+ yarn add @boostengine/collections
55
+ ```
76
56
 
77
57
  ---
78
58
 
79
- ## 💻 Programmatic Node.js / TypeScript Usage
59
+ ## 🚀 Quickstart Guide
80
60
 
81
- You can also install this package as a dev dependency to programmatically parse or mock endpoints in your backend tests:
61
+ ### 1. Export Collections to Your Local Workspace via CLI
82
62
 
83
63
  ```bash
84
- npm install -D @boostengine/collections
64
+ # Export all collections into a ./postman folder
65
+ npx @boostengine/collections export ./postman
66
+
67
+ # List all available collection schemas
68
+ npx @boostengine/collections list
85
69
  ```
86
70
 
71
+ ---
72
+
73
+ ### 2. Programmatic Node.js Usage
74
+
87
75
  ```typescript
88
- import {
89
- razorpayCollection,
90
- easyecomCollection,
91
- listCollections,
92
- getCollection,
93
- exportToDirectory,
94
- } from '@boostengine/collections';
95
-
96
- // List available collection summaries
97
- const available = listCollections();
98
- console.log(available);
99
-
100
- // Access raw Postman Schema v2.1.0 JSON object
101
- console.log(razorpayCollection.info.name);
102
- console.log(easyecomCollection.item.length);
103
-
104
- // Programmatically dump files in CI/CD or setup scripts
105
- exportToDirectory('all', './postman');
76
+ import { getCollection, getEnvironment, listCollections } from '@boostengine/collections';
77
+
78
+ // List all available API collections
79
+ console.log(listCollections());
80
+ // ['razorpay', 'cashfree', 'phonepe', 'shiprocket', 'delhivery', 'easyecom']
81
+
82
+ // Get the Cashfree Postman JSON
83
+ const cashfreeCollection = getCollection('cashfree');
84
+ console.log(cashfreeCollection.info.name); // "Cashfree Payment Gateway"
106
85
  ```
107
86
 
108
87
  ---
109
88
 
110
89
  ## 📄 License
90
+
111
91
  MIT © [Boost Engine](https://github.com/boostengine)
package/bin/cli.cjs CHANGED
@@ -14,6 +14,34 @@ const collections = {
14
14
  docs: 'https://razorpay.com/docs/api',
15
15
  description: 'Orders, Payments, Refunds & Webhook Simulator',
16
16
  },
17
+ cashfree: {
18
+ name: 'Cashfree Payments API Collection',
19
+ collectionFile: path.join(collectionsDir, 'cashfree.collection.json'),
20
+ envFile: path.join(envsDir, 'cashfree.env.json'),
21
+ docs: 'https://docs.cashfree.com/reference',
22
+ description: 'Payment Gateway PG v2023-08-01 Orders, Payments, Refunds, Webhooks',
23
+ },
24
+ phonepe: {
25
+ name: 'PhonePe Payment Gateway Collection',
26
+ collectionFile: path.join(collectionsDir, 'phonepe.collection.json'),
27
+ envFile: path.join(envsDir, 'phonepe.env.json'),
28
+ docs: 'https://developer.phonepe.com/v1/reference',
29
+ description: 'Standard Pay, Order Status Check, Refunds & S2S Webhooks',
30
+ },
31
+ paytm: {
32
+ name: 'Paytm Payment Gateway Collection',
33
+ collectionFile: path.join(collectionsDir, 'paytm.collection.json'),
34
+ envFile: path.join(envsDir, 'paytm.env.json'),
35
+ docs: 'https://developer.paytm.com/docs/api',
36
+ description: 'Initiate Transaction, Status Check, Refunds & S2S Callback',
37
+ },
38
+ stripe: {
39
+ name: 'Stripe Global Payments Collection',
40
+ collectionFile: path.join(collectionsDir, 'stripe.collection.json'),
41
+ envFile: path.join(envsDir, 'stripe.env.json'),
42
+ docs: 'https://stripe.com/docs/api',
43
+ description: 'Checkout Sessions, PaymentIntents, Customers & Refunds',
44
+ },
17
45
  easyecom: {
18
46
  name: 'EasyEcom eCommerce & Warehouse API Collection',
19
47
  collectionFile: path.join(collectionsDir, 'easyecom.collection.json'),
@@ -21,6 +49,27 @@ const collections = {
21
49
  docs: 'https://api.easyecom.com/documentation',
22
50
  description: 'Orders, Multi-Warehouse Inventory, Catalog & Shipping Manifests',
23
51
  },
52
+ shiprocket: {
53
+ name: 'Shiprocket Logistics API Collection',
54
+ collectionFile: path.join(collectionsDir, 'shiprocket.collection.json'),
55
+ envFile: path.join(envsDir, 'shiprocket.env.json'),
56
+ docs: 'https://apidocs.shiprocket.in',
57
+ description: 'Auth, Pincode Serviceability, Order Creation, AWB & Live Tracking',
58
+ },
59
+ delhivery: {
60
+ name: 'Delhivery Express Shipping Collection',
61
+ collectionFile: path.join(collectionsDir, 'delhivery.collection.json'),
62
+ envFile: path.join(envsDir, 'delhivery.env.json'),
63
+ docs: 'https://delhivery.com/developer',
64
+ description: 'Pin-codes Serviceability, Waybill Creation & Live Package Tracking',
65
+ },
66
+ shopify: {
67
+ name: 'Shopify Admin REST API Collection',
68
+ collectionFile: path.join(collectionsDir, 'shopify.collection.json'),
69
+ envFile: path.join(envsDir, 'shopify.env.json'),
70
+ docs: 'https://shopify.dev/docs/api/admin-rest',
71
+ description: 'Storefront Products, Orders, Inventory Levels & Webhooks',
72
+ },
24
73
  };
25
74
 
26
75
  const args = process.argv.slice(2);