@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 +63 -83
- package/bin/cli.cjs +49 -0
- package/collections/cashfree.collection.json +651 -0
- package/collections/delhivery.collection.json +270 -0
- package/collections/easyecom.collection.json +84 -82
- package/collections/paytm.collection.json +161 -0
- package/collections/phonepe.collection.json +359 -0
- package/collections/razorpay.collection.json +527 -90
- package/collections/shiprocket.collection.json +490 -0
- package/collections/shopify.collection.json +351 -0
- package/collections/stripe.collection.json +322 -0
- package/dist/index.cjs +602 -66
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +16 -2
- package/dist/index.d.ts +16 -2
- package/dist/index.mjs +602 -66
- package/dist/index.mjs.map +1 -1
- package/environments/cashfree.env.json +67 -0
- package/environments/delhivery.env.json +31 -0
- package/environments/paytm.env.json +49 -0
- package/environments/phonepe.env.json +85 -0
- package/environments/razorpay.env.json +12 -0
- package/environments/shiprocket.env.json +61 -0
- package/environments/shopify.env.json +31 -0
- package/environments/stripe.env.json +31 -0
- package/package.json +22 -3
package/README.md
CHANGED
|
@@ -1,111 +1,91 @@
|
|
|
1
|
-
# @boostengine/collections
|
|
1
|
+
# @boostengine/collections 📮
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@boostengine/collections)
|
|
4
|
+
[](https://www.npmjs.com/package/@boostengine/collections)
|
|
5
|
+
[](https://github.com/boostengine/boostengine/blob/main/LICENSE)
|
|
6
|
+
[](https://www.postman.com/)
|
|
4
7
|
|
|
5
|
-
|
|
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
|
-
|
|
12
|
+
---
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
18
|
-
npx @boostengine/collections export razorpay
|
|
19
|
-
npx @boostengine/collections export easyecom
|
|
33
|
+
---
|
|
20
34
|
|
|
21
|
-
|
|
22
|
-
npx @boostengine/collections info razorpay
|
|
23
|
-
```
|
|
35
|
+
## 🌟 Key Highlights
|
|
24
36
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
## 📦
|
|
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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
-
##
|
|
59
|
+
## 🚀 Quickstart Guide
|
|
80
60
|
|
|
81
|
-
|
|
61
|
+
### 1. Export Collections to Your Local Workspace via CLI
|
|
82
62
|
|
|
83
63
|
```bash
|
|
84
|
-
|
|
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
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
//
|
|
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);
|