@fedpulse/sdk 1.0.4 → 1.0.5

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 +20 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -44,7 +44,7 @@ const client = new FedPulse({ apiKey: process.env.FEDPULSE_API_KEY! });
44
44
 
45
45
  // Search opportunities
46
46
  const result = await client.opportunities.list({
47
- keyword: 'cybersecurity',
47
+ q: 'cybersecurity',
48
48
  naics: ['541519', '541512'],
49
49
  postedAfter: '2025-01-01',
50
50
  limit: 25,
@@ -74,7 +74,7 @@ Never hard-code keys in source — use environment variables.
74
74
 
75
75
  ```ts
76
76
  // List / search opportunities
77
- await client.opportunities.list({ keyword: 'cloud', naics: ['541512'] });
77
+ await client.opportunities.list({ q: 'cloud', naics: ['541512'] });
78
78
 
79
79
  // Retrieve a single opportunity
80
80
  await client.opportunities.get('abc123-notice-id');
@@ -199,16 +199,30 @@ await client.analytics.logs({ limit: 20 });
199
199
  // List configured webhooks
200
200
  await client.webhooks.list();
201
201
 
202
+ // Get a single webhook
203
+ await client.webhooks.get('wh-uuid');
204
+
202
205
  // Create
203
206
  await client.webhooks.create({ url: 'https://example.com/hook', events: ['opportunity.new'] });
204
207
 
205
208
  // Update / delete
206
- await client.webhooks.update('wh_id', { active: false });
207
- await client.webhooks.delete('wh_id');
209
+ await client.webhooks.update('wh-uuid', { active: false });
210
+ await client.webhooks.delete('wh-uuid');
211
+
212
+ // Send a test event to the endpoint immediately
213
+ await client.webhooks.test('wh-uuid');
214
+
215
+ // Resume a paused webhook (auto-paused after 5 consecutive failures)
216
+ await client.webhooks.resume('wh-uuid');
208
217
 
209
218
  // Deliveries log
210
- await client.webhooks.listDeliveries('wh_id');
211
- await client.webhooks.getDelivery('wh_id', 'delivery-id');
219
+ await client.webhooks.listDeliveries('wh-uuid', { status: 'failed' });
220
+ await client.webhooks.getDelivery('wh-uuid', 'delivery-uuid');
221
+
222
+ // Auto-paginate all delivery history
223
+ for await (const page of client.webhooks.deliveryPages('wh-uuid', { status: 'failed' })) {
224
+ console.log(page.data);
225
+ }
212
226
  ```
213
227
 
214
228
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedpulse/sdk",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Official JavaScript/TypeScript SDK for the FedPulse API — federal contracts, exclusions, entities, assistance listings, and market intelligence.",
5
5
  "keywords": [
6
6
  "fedpulse",