oilpriceapi 0.5.3 → 0.7.0
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 +395 -110
- package/dist/client.d.ts +83 -3
- package/dist/client.js +118 -38
- package/dist/index.d.ts +31 -6
- package/dist/index.js +17 -3
- package/dist/resources/alerts.d.ts +52 -15
- package/dist/resources/alerts.js +143 -85
- package/dist/resources/analytics.d.ts +325 -0
- package/dist/resources/analytics.js +221 -0
- package/dist/resources/bunker-fuels.d.ts +270 -0
- package/dist/resources/bunker-fuels.js +191 -0
- package/dist/resources/commodities.d.ts +148 -0
- package/dist/resources/commodities.js +110 -0
- package/dist/resources/data-quality.d.ts +229 -0
- package/dist/resources/data-quality.js +139 -0
- package/dist/resources/data-sources.d.ts +365 -0
- package/dist/resources/data-sources.js +349 -0
- package/dist/resources/drilling.d.ts +403 -0
- package/dist/resources/drilling.js +264 -0
- package/dist/resources/ei/drilling-productivity.d.ts +173 -0
- package/dist/resources/ei/drilling-productivity.js +103 -0
- package/dist/resources/ei/forecasts.d.ts +177 -0
- package/dist/resources/ei/forecasts.js +101 -0
- package/dist/resources/ei/frac-focus.d.ts +212 -0
- package/dist/resources/ei/frac-focus.js +150 -0
- package/dist/resources/ei/index.d.ts +140 -0
- package/dist/resources/ei/index.js +87 -0
- package/dist/resources/ei/oil-inventories.d.ts +155 -0
- package/dist/resources/ei/oil-inventories.js +92 -0
- package/dist/resources/ei/opec-production.d.ts +146 -0
- package/dist/resources/ei/opec-production.js +92 -0
- package/dist/resources/ei/rig-counts.d.ts +131 -0
- package/dist/resources/ei/rig-counts.js +88 -0
- package/dist/resources/ei/well-permits.d.ts +178 -0
- package/dist/resources/ei/well-permits.js +119 -0
- package/dist/resources/forecasts.d.ts +200 -0
- package/dist/resources/forecasts.js +157 -0
- package/dist/resources/futures.d.ts +322 -0
- package/dist/resources/futures.js +228 -0
- package/dist/resources/rig-counts.d.ts +221 -0
- package/dist/resources/rig-counts.js +157 -0
- package/dist/resources/storage.d.ts +182 -0
- package/dist/resources/storage.js +161 -0
- package/dist/resources/webhooks.d.ts +290 -0
- package/dist/resources/webhooks.js +297 -0
- package/dist/types.d.ts +106 -6
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drilling Intelligence Resource
|
|
3
|
+
*
|
|
4
|
+
* Access US onshore drilling activity data including rig counts, well permits,
|
|
5
|
+
* frac spreads, DUC wells, completions, and production trends by basin.
|
|
6
|
+
*/
|
|
7
|
+
import type { OilPriceAPI } from "../client.js";
|
|
8
|
+
/**
|
|
9
|
+
* Drilling intelligence data point
|
|
10
|
+
*/
|
|
11
|
+
export interface DrillingIntelligenceData {
|
|
12
|
+
/** Record ID */
|
|
13
|
+
id: string;
|
|
14
|
+
/** Basin name */
|
|
15
|
+
basin?: string;
|
|
16
|
+
/** State */
|
|
17
|
+
state?: string;
|
|
18
|
+
/** Operator name */
|
|
19
|
+
operator?: string;
|
|
20
|
+
/** Metric type */
|
|
21
|
+
metric_type: string;
|
|
22
|
+
/** Metric value */
|
|
23
|
+
value: number;
|
|
24
|
+
/** Unit of measurement */
|
|
25
|
+
unit?: string;
|
|
26
|
+
/** Report date */
|
|
27
|
+
date: string;
|
|
28
|
+
/** Week number */
|
|
29
|
+
week?: number;
|
|
30
|
+
/** ISO timestamp when data was recorded */
|
|
31
|
+
timestamp: string;
|
|
32
|
+
/** Additional metadata */
|
|
33
|
+
metadata?: Record<string, unknown>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Latest drilling intelligence summary
|
|
37
|
+
*/
|
|
38
|
+
export interface LatestDrillingData {
|
|
39
|
+
/** Total active rigs */
|
|
40
|
+
total_rigs: number;
|
|
41
|
+
/** Total frac spreads */
|
|
42
|
+
total_frac_spreads: number;
|
|
43
|
+
/** Total well permits */
|
|
44
|
+
total_permits: number;
|
|
45
|
+
/** Total DUC wells */
|
|
46
|
+
total_duc_wells: number;
|
|
47
|
+
/** Total completions */
|
|
48
|
+
total_completions: number;
|
|
49
|
+
/** As of date */
|
|
50
|
+
as_of_date: string;
|
|
51
|
+
/** Additional metrics */
|
|
52
|
+
metrics?: Record<string, unknown>;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Drilling intelligence summary by metric
|
|
56
|
+
*/
|
|
57
|
+
export interface DrillingSummary {
|
|
58
|
+
/** Metric type */
|
|
59
|
+
metric: string;
|
|
60
|
+
/** Total count/value */
|
|
61
|
+
total: number;
|
|
62
|
+
/** Change from previous period */
|
|
63
|
+
change?: number;
|
|
64
|
+
/** Percentage change */
|
|
65
|
+
change_percent?: number;
|
|
66
|
+
/** Breakdown by basin or state */
|
|
67
|
+
breakdown?: Array<{
|
|
68
|
+
name: string;
|
|
69
|
+
value: number;
|
|
70
|
+
percentage?: number;
|
|
71
|
+
}>;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Drilling trend data
|
|
75
|
+
*/
|
|
76
|
+
export interface DrillingTrend {
|
|
77
|
+
/** Date */
|
|
78
|
+
date: string;
|
|
79
|
+
/** Metric type */
|
|
80
|
+
metric: string;
|
|
81
|
+
/** Value */
|
|
82
|
+
value: number;
|
|
83
|
+
/** Moving average (if applicable) */
|
|
84
|
+
moving_average?: number;
|
|
85
|
+
/** Trend direction */
|
|
86
|
+
trend?: "up" | "down" | "flat";
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Frac spread data
|
|
90
|
+
*/
|
|
91
|
+
export interface FracSpreadData {
|
|
92
|
+
/** Basin name */
|
|
93
|
+
basin: string;
|
|
94
|
+
/** Number of active frac spreads */
|
|
95
|
+
active_spreads: number;
|
|
96
|
+
/** Change from previous week */
|
|
97
|
+
change?: number;
|
|
98
|
+
/** Date */
|
|
99
|
+
date: string;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Well permit data
|
|
103
|
+
*/
|
|
104
|
+
export interface WellPermitData {
|
|
105
|
+
/** State */
|
|
106
|
+
state: string;
|
|
107
|
+
/** Basin */
|
|
108
|
+
basin?: string;
|
|
109
|
+
/** Number of permits issued */
|
|
110
|
+
permits: number;
|
|
111
|
+
/** Change from previous period */
|
|
112
|
+
change?: number;
|
|
113
|
+
/** Date */
|
|
114
|
+
date: string;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* DUC (Drilled but Uncompleted) well data
|
|
118
|
+
*/
|
|
119
|
+
export interface DUCWellData {
|
|
120
|
+
/** Basin name */
|
|
121
|
+
basin: string;
|
|
122
|
+
/** Number of DUC wells */
|
|
123
|
+
duc_count: number;
|
|
124
|
+
/** Change from previous month */
|
|
125
|
+
change?: number;
|
|
126
|
+
/** Date */
|
|
127
|
+
date: string;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Well completion data
|
|
131
|
+
*/
|
|
132
|
+
export interface CompletionData {
|
|
133
|
+
/** Basin name */
|
|
134
|
+
basin: string;
|
|
135
|
+
/** Number of completions */
|
|
136
|
+
completions: number;
|
|
137
|
+
/** Change from previous period */
|
|
138
|
+
change?: number;
|
|
139
|
+
/** Date */
|
|
140
|
+
date: string;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Wells drilled data
|
|
144
|
+
*/
|
|
145
|
+
export interface WellsDrilledData {
|
|
146
|
+
/** Basin name */
|
|
147
|
+
basin: string;
|
|
148
|
+
/** Number of wells drilled */
|
|
149
|
+
wells_drilled: number;
|
|
150
|
+
/** Change from previous period */
|
|
151
|
+
change?: number;
|
|
152
|
+
/** Date */
|
|
153
|
+
date: string;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Basin-specific drilling intelligence
|
|
157
|
+
*/
|
|
158
|
+
export interface BasinDrillingData {
|
|
159
|
+
/** Basin name */
|
|
160
|
+
basin: string;
|
|
161
|
+
/** Active rigs */
|
|
162
|
+
active_rigs?: number;
|
|
163
|
+
/** Frac spreads */
|
|
164
|
+
frac_spreads?: number;
|
|
165
|
+
/** Well permits */
|
|
166
|
+
permits?: number;
|
|
167
|
+
/** DUC wells */
|
|
168
|
+
duc_wells?: number;
|
|
169
|
+
/** Completions */
|
|
170
|
+
completions?: number;
|
|
171
|
+
/** Wells drilled */
|
|
172
|
+
wells_drilled?: number;
|
|
173
|
+
/** As of date */
|
|
174
|
+
as_of_date: string;
|
|
175
|
+
/** Historical trend */
|
|
176
|
+
trend?: DrillingTrend[];
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Drilling Intelligence Resource
|
|
180
|
+
*
|
|
181
|
+
* Access US onshore drilling activity data from EIA and Baker Hughes.
|
|
182
|
+
* Includes rig counts, well permits, frac spreads, DUC wells, completions,
|
|
183
|
+
* and basin-level breakdowns.
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* ```typescript
|
|
187
|
+
* import { OilPriceAPI } from 'oilpriceapi';
|
|
188
|
+
*
|
|
189
|
+
* const client = new OilPriceAPI({ apiKey: 'your_key' });
|
|
190
|
+
*
|
|
191
|
+
* // Get latest drilling intelligence
|
|
192
|
+
* const latest = await client.drilling.latest();
|
|
193
|
+
* console.log(`Active rigs: ${latest.total_rigs}`);
|
|
194
|
+
*
|
|
195
|
+
* // Get drilling trends
|
|
196
|
+
* const trends = await client.drilling.trends();
|
|
197
|
+
* trends.forEach(trend => {
|
|
198
|
+
* console.log(`${trend.date}: ${trend.metric} = ${trend.value}`);
|
|
199
|
+
* });
|
|
200
|
+
*
|
|
201
|
+
* // Get basin-specific data
|
|
202
|
+
* const permian = await client.drilling.basin('Permian');
|
|
203
|
+
* console.log(`Permian rigs: ${permian.active_rigs}`);
|
|
204
|
+
* ```
|
|
205
|
+
*/
|
|
206
|
+
export declare class DrillingIntelligenceResource {
|
|
207
|
+
private client;
|
|
208
|
+
constructor(client: OilPriceAPI);
|
|
209
|
+
/**
|
|
210
|
+
* List all drilling intelligence records
|
|
211
|
+
*
|
|
212
|
+
* Returns all available drilling intelligence data points.
|
|
213
|
+
*
|
|
214
|
+
* @returns Array of drilling intelligence data
|
|
215
|
+
*
|
|
216
|
+
* @throws {OilPriceAPIError} If API request fails
|
|
217
|
+
* @throws {AuthenticationError} If API key is invalid
|
|
218
|
+
*
|
|
219
|
+
* @example
|
|
220
|
+
* ```typescript
|
|
221
|
+
* const data = await client.drilling.list();
|
|
222
|
+
* console.log(`${data.length} records found`);
|
|
223
|
+
* ```
|
|
224
|
+
*/
|
|
225
|
+
list(): Promise<DrillingIntelligenceData[]>;
|
|
226
|
+
/**
|
|
227
|
+
* Get latest drilling intelligence summary
|
|
228
|
+
*
|
|
229
|
+
* Returns the most recent snapshot of drilling activity metrics.
|
|
230
|
+
*
|
|
231
|
+
* @returns Latest drilling intelligence data
|
|
232
|
+
*
|
|
233
|
+
* @throws {OilPriceAPIError} If API request fails
|
|
234
|
+
* @throws {AuthenticationError} If API key is invalid
|
|
235
|
+
*
|
|
236
|
+
* @example
|
|
237
|
+
* ```typescript
|
|
238
|
+
* const latest = await client.drilling.latest();
|
|
239
|
+
* console.log(`Total active rigs: ${latest.total_rigs}`);
|
|
240
|
+
* console.log(`Frac spreads: ${latest.total_frac_spreads}`);
|
|
241
|
+
* console.log(`As of: ${latest.as_of_date}`);
|
|
242
|
+
* ```
|
|
243
|
+
*/
|
|
244
|
+
latest(): Promise<LatestDrillingData>;
|
|
245
|
+
/**
|
|
246
|
+
* Get drilling intelligence summary
|
|
247
|
+
*
|
|
248
|
+
* Returns aggregated summary of drilling metrics by type.
|
|
249
|
+
*
|
|
250
|
+
* @returns Array of drilling summaries by metric
|
|
251
|
+
*
|
|
252
|
+
* @throws {OilPriceAPIError} If API request fails
|
|
253
|
+
* @throws {AuthenticationError} If API key is invalid
|
|
254
|
+
*
|
|
255
|
+
* @example
|
|
256
|
+
* ```typescript
|
|
257
|
+
* const summary = await client.drilling.summary();
|
|
258
|
+
* summary.forEach(metric => {
|
|
259
|
+
* console.log(`${metric.metric}: ${metric.total}`);
|
|
260
|
+
* if (metric.change_percent) {
|
|
261
|
+
* console.log(` Change: ${metric.change_percent}%`);
|
|
262
|
+
* }
|
|
263
|
+
* });
|
|
264
|
+
* ```
|
|
265
|
+
*/
|
|
266
|
+
summary(): Promise<DrillingSummary[]>;
|
|
267
|
+
/**
|
|
268
|
+
* Get drilling activity trends
|
|
269
|
+
*
|
|
270
|
+
* Returns time series data showing trends in drilling metrics.
|
|
271
|
+
*
|
|
272
|
+
* @returns Array of drilling trend data points
|
|
273
|
+
*
|
|
274
|
+
* @throws {OilPriceAPIError} If API request fails
|
|
275
|
+
* @throws {AuthenticationError} If API key is invalid
|
|
276
|
+
*
|
|
277
|
+
* @example
|
|
278
|
+
* ```typescript
|
|
279
|
+
* const trends = await client.drilling.trends();
|
|
280
|
+
* trends.forEach(point => {
|
|
281
|
+
* console.log(`${point.date}: ${point.metric} = ${point.value} (${point.trend})`);
|
|
282
|
+
* });
|
|
283
|
+
* ```
|
|
284
|
+
*/
|
|
285
|
+
trends(): Promise<DrillingTrend[]>;
|
|
286
|
+
/**
|
|
287
|
+
* Get frac spread data
|
|
288
|
+
*
|
|
289
|
+
* Returns active frac spread counts by basin.
|
|
290
|
+
*
|
|
291
|
+
* @returns Array of frac spread data by basin
|
|
292
|
+
*
|
|
293
|
+
* @throws {OilPriceAPIError} If API request fails
|
|
294
|
+
* @throws {AuthenticationError} If API key is invalid
|
|
295
|
+
*
|
|
296
|
+
* @example
|
|
297
|
+
* ```typescript
|
|
298
|
+
* const fracSpreads = await client.drilling.fracSpreads();
|
|
299
|
+
* fracSpreads.forEach(spread => {
|
|
300
|
+
* console.log(`${spread.basin}: ${spread.active_spreads} spreads`);
|
|
301
|
+
* });
|
|
302
|
+
* ```
|
|
303
|
+
*/
|
|
304
|
+
fracSpreads(): Promise<FracSpreadData[]>;
|
|
305
|
+
/**
|
|
306
|
+
* Get well permit data
|
|
307
|
+
*
|
|
308
|
+
* Returns well permits issued by state and basin.
|
|
309
|
+
*
|
|
310
|
+
* @returns Array of well permit data
|
|
311
|
+
*
|
|
312
|
+
* @throws {OilPriceAPIError} If API request fails
|
|
313
|
+
* @throws {AuthenticationError} If API key is invalid
|
|
314
|
+
*
|
|
315
|
+
* @example
|
|
316
|
+
* ```typescript
|
|
317
|
+
* const permits = await client.drilling.wellPermits();
|
|
318
|
+
* permits.forEach(permit => {
|
|
319
|
+
* console.log(`${permit.state}: ${permit.permits} permits`);
|
|
320
|
+
* });
|
|
321
|
+
* ```
|
|
322
|
+
*/
|
|
323
|
+
wellPermits(): Promise<WellPermitData[]>;
|
|
324
|
+
/**
|
|
325
|
+
* Get DUC well data
|
|
326
|
+
*
|
|
327
|
+
* Returns drilled but uncompleted (DUC) well counts by basin.
|
|
328
|
+
*
|
|
329
|
+
* @returns Array of DUC well data
|
|
330
|
+
*
|
|
331
|
+
* @throws {OilPriceAPIError} If API request fails
|
|
332
|
+
* @throws {AuthenticationError} If API key is invalid
|
|
333
|
+
*
|
|
334
|
+
* @example
|
|
335
|
+
* ```typescript
|
|
336
|
+
* const ducWells = await client.drilling.ducWells();
|
|
337
|
+
* ducWells.forEach(duc => {
|
|
338
|
+
* console.log(`${duc.basin}: ${duc.duc_count} DUC wells`);
|
|
339
|
+
* });
|
|
340
|
+
* ```
|
|
341
|
+
*/
|
|
342
|
+
ducWells(): Promise<DUCWellData[]>;
|
|
343
|
+
/**
|
|
344
|
+
* Get well completion data
|
|
345
|
+
*
|
|
346
|
+
* Returns well completion counts by basin.
|
|
347
|
+
*
|
|
348
|
+
* @returns Array of completion data
|
|
349
|
+
*
|
|
350
|
+
* @throws {OilPriceAPIError} If API request fails
|
|
351
|
+
* @throws {AuthenticationError} If API key is invalid
|
|
352
|
+
*
|
|
353
|
+
* @example
|
|
354
|
+
* ```typescript
|
|
355
|
+
* const completions = await client.drilling.completions();
|
|
356
|
+
* completions.forEach(comp => {
|
|
357
|
+
* console.log(`${comp.basin}: ${comp.completions} completions`);
|
|
358
|
+
* });
|
|
359
|
+
* ```
|
|
360
|
+
*/
|
|
361
|
+
completions(): Promise<CompletionData[]>;
|
|
362
|
+
/**
|
|
363
|
+
* Get wells drilled data
|
|
364
|
+
*
|
|
365
|
+
* Returns wells drilled counts by basin.
|
|
366
|
+
*
|
|
367
|
+
* @returns Array of wells drilled data
|
|
368
|
+
*
|
|
369
|
+
* @throws {OilPriceAPIError} If API request fails
|
|
370
|
+
* @throws {AuthenticationError} If API key is invalid
|
|
371
|
+
*
|
|
372
|
+
* @example
|
|
373
|
+
* ```typescript
|
|
374
|
+
* const drilled = await client.drilling.wellsDrilled();
|
|
375
|
+
* drilled.forEach(data => {
|
|
376
|
+
* console.log(`${data.basin}: ${data.wells_drilled} wells drilled`);
|
|
377
|
+
* });
|
|
378
|
+
* ```
|
|
379
|
+
*/
|
|
380
|
+
wellsDrilled(): Promise<WellsDrilledData[]>;
|
|
381
|
+
/**
|
|
382
|
+
* Get basin-specific drilling intelligence
|
|
383
|
+
*
|
|
384
|
+
* Returns comprehensive drilling data for a specific basin.
|
|
385
|
+
*
|
|
386
|
+
* @param name - Basin name (e.g., "Permian", "Eagle Ford", "Bakken")
|
|
387
|
+
* @returns Basin drilling intelligence data
|
|
388
|
+
*
|
|
389
|
+
* @throws {NotFoundError} If basin not found
|
|
390
|
+
* @throws {OilPriceAPIError} If API request fails
|
|
391
|
+
* @throws {AuthenticationError} If API key is invalid
|
|
392
|
+
*
|
|
393
|
+
* @example
|
|
394
|
+
* ```typescript
|
|
395
|
+
* const permian = await client.drilling.basin('Permian');
|
|
396
|
+
* console.log(`Permian Basin as of ${permian.as_of_date}:`);
|
|
397
|
+
* console.log(` Active rigs: ${permian.active_rigs}`);
|
|
398
|
+
* console.log(` Frac spreads: ${permian.frac_spreads}`);
|
|
399
|
+
* console.log(` DUC wells: ${permian.duc_wells}`);
|
|
400
|
+
* ```
|
|
401
|
+
*/
|
|
402
|
+
basin(name: string): Promise<BasinDrillingData>;
|
|
403
|
+
}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drilling Intelligence Resource
|
|
3
|
+
*
|
|
4
|
+
* Access US onshore drilling activity data including rig counts, well permits,
|
|
5
|
+
* frac spreads, DUC wells, completions, and production trends by basin.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Drilling Intelligence Resource
|
|
9
|
+
*
|
|
10
|
+
* Access US onshore drilling activity data from EIA and Baker Hughes.
|
|
11
|
+
* Includes rig counts, well permits, frac spreads, DUC wells, completions,
|
|
12
|
+
* and basin-level breakdowns.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import { OilPriceAPI } from 'oilpriceapi';
|
|
17
|
+
*
|
|
18
|
+
* const client = new OilPriceAPI({ apiKey: 'your_key' });
|
|
19
|
+
*
|
|
20
|
+
* // Get latest drilling intelligence
|
|
21
|
+
* const latest = await client.drilling.latest();
|
|
22
|
+
* console.log(`Active rigs: ${latest.total_rigs}`);
|
|
23
|
+
*
|
|
24
|
+
* // Get drilling trends
|
|
25
|
+
* const trends = await client.drilling.trends();
|
|
26
|
+
* trends.forEach(trend => {
|
|
27
|
+
* console.log(`${trend.date}: ${trend.metric} = ${trend.value}`);
|
|
28
|
+
* });
|
|
29
|
+
*
|
|
30
|
+
* // Get basin-specific data
|
|
31
|
+
* const permian = await client.drilling.basin('Permian');
|
|
32
|
+
* console.log(`Permian rigs: ${permian.active_rigs}`);
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export class DrillingIntelligenceResource {
|
|
36
|
+
constructor(client) {
|
|
37
|
+
this.client = client;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* List all drilling intelligence records
|
|
41
|
+
*
|
|
42
|
+
* Returns all available drilling intelligence data points.
|
|
43
|
+
*
|
|
44
|
+
* @returns Array of drilling intelligence data
|
|
45
|
+
*
|
|
46
|
+
* @throws {OilPriceAPIError} If API request fails
|
|
47
|
+
* @throws {AuthenticationError} If API key is invalid
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```typescript
|
|
51
|
+
* const data = await client.drilling.list();
|
|
52
|
+
* console.log(`${data.length} records found`);
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
async list() {
|
|
56
|
+
const response = await this.client["request"]("/v1/drilling-intelligence", {});
|
|
57
|
+
return Array.isArray(response) ? response : response.data;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Get latest drilling intelligence summary
|
|
61
|
+
*
|
|
62
|
+
* Returns the most recent snapshot of drilling activity metrics.
|
|
63
|
+
*
|
|
64
|
+
* @returns Latest drilling intelligence data
|
|
65
|
+
*
|
|
66
|
+
* @throws {OilPriceAPIError} If API request fails
|
|
67
|
+
* @throws {AuthenticationError} If API key is invalid
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```typescript
|
|
71
|
+
* const latest = await client.drilling.latest();
|
|
72
|
+
* console.log(`Total active rigs: ${latest.total_rigs}`);
|
|
73
|
+
* console.log(`Frac spreads: ${latest.total_frac_spreads}`);
|
|
74
|
+
* console.log(`As of: ${latest.as_of_date}`);
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
async latest() {
|
|
78
|
+
return this.client["request"]("/v1/drilling-intelligence/latest", {});
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Get drilling intelligence summary
|
|
82
|
+
*
|
|
83
|
+
* Returns aggregated summary of drilling metrics by type.
|
|
84
|
+
*
|
|
85
|
+
* @returns Array of drilling summaries by metric
|
|
86
|
+
*
|
|
87
|
+
* @throws {OilPriceAPIError} If API request fails
|
|
88
|
+
* @throws {AuthenticationError} If API key is invalid
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```typescript
|
|
92
|
+
* const summary = await client.drilling.summary();
|
|
93
|
+
* summary.forEach(metric => {
|
|
94
|
+
* console.log(`${metric.metric}: ${metric.total}`);
|
|
95
|
+
* if (metric.change_percent) {
|
|
96
|
+
* console.log(` Change: ${metric.change_percent}%`);
|
|
97
|
+
* }
|
|
98
|
+
* });
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
async summary() {
|
|
102
|
+
const response = await this.client["request"]("/v1/drilling-intelligence/summary", {});
|
|
103
|
+
return Array.isArray(response) ? response : response.summary;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Get drilling activity trends
|
|
107
|
+
*
|
|
108
|
+
* Returns time series data showing trends in drilling metrics.
|
|
109
|
+
*
|
|
110
|
+
* @returns Array of drilling trend data points
|
|
111
|
+
*
|
|
112
|
+
* @throws {OilPriceAPIError} If API request fails
|
|
113
|
+
* @throws {AuthenticationError} If API key is invalid
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```typescript
|
|
117
|
+
* const trends = await client.drilling.trends();
|
|
118
|
+
* trends.forEach(point => {
|
|
119
|
+
* console.log(`${point.date}: ${point.metric} = ${point.value} (${point.trend})`);
|
|
120
|
+
* });
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
async trends() {
|
|
124
|
+
const response = await this.client["request"]("/v1/drilling-intelligence/trends", {});
|
|
125
|
+
return Array.isArray(response) ? response : response.trends;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Get frac spread data
|
|
129
|
+
*
|
|
130
|
+
* Returns active frac spread counts by basin.
|
|
131
|
+
*
|
|
132
|
+
* @returns Array of frac spread data by basin
|
|
133
|
+
*
|
|
134
|
+
* @throws {OilPriceAPIError} If API request fails
|
|
135
|
+
* @throws {AuthenticationError} If API key is invalid
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* ```typescript
|
|
139
|
+
* const fracSpreads = await client.drilling.fracSpreads();
|
|
140
|
+
* fracSpreads.forEach(spread => {
|
|
141
|
+
* console.log(`${spread.basin}: ${spread.active_spreads} spreads`);
|
|
142
|
+
* });
|
|
143
|
+
* ```
|
|
144
|
+
*/
|
|
145
|
+
async fracSpreads() {
|
|
146
|
+
const response = await this.client["request"]("/v1/drilling-intelligence/frac-spreads", {});
|
|
147
|
+
return Array.isArray(response) ? response : response.data;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Get well permit data
|
|
151
|
+
*
|
|
152
|
+
* Returns well permits issued by state and basin.
|
|
153
|
+
*
|
|
154
|
+
* @returns Array of well permit data
|
|
155
|
+
*
|
|
156
|
+
* @throws {OilPriceAPIError} If API request fails
|
|
157
|
+
* @throws {AuthenticationError} If API key is invalid
|
|
158
|
+
*
|
|
159
|
+
* @example
|
|
160
|
+
* ```typescript
|
|
161
|
+
* const permits = await client.drilling.wellPermits();
|
|
162
|
+
* permits.forEach(permit => {
|
|
163
|
+
* console.log(`${permit.state}: ${permit.permits} permits`);
|
|
164
|
+
* });
|
|
165
|
+
* ```
|
|
166
|
+
*/
|
|
167
|
+
async wellPermits() {
|
|
168
|
+
const response = await this.client["request"]("/v1/drilling-intelligence/well-permits", {});
|
|
169
|
+
return Array.isArray(response) ? response : response.data;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Get DUC well data
|
|
173
|
+
*
|
|
174
|
+
* Returns drilled but uncompleted (DUC) well counts by basin.
|
|
175
|
+
*
|
|
176
|
+
* @returns Array of DUC well data
|
|
177
|
+
*
|
|
178
|
+
* @throws {OilPriceAPIError} If API request fails
|
|
179
|
+
* @throws {AuthenticationError} If API key is invalid
|
|
180
|
+
*
|
|
181
|
+
* @example
|
|
182
|
+
* ```typescript
|
|
183
|
+
* const ducWells = await client.drilling.ducWells();
|
|
184
|
+
* ducWells.forEach(duc => {
|
|
185
|
+
* console.log(`${duc.basin}: ${duc.duc_count} DUC wells`);
|
|
186
|
+
* });
|
|
187
|
+
* ```
|
|
188
|
+
*/
|
|
189
|
+
async ducWells() {
|
|
190
|
+
const response = await this.client["request"]("/v1/drilling-intelligence/duc-wells", {});
|
|
191
|
+
return Array.isArray(response) ? response : response.data;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Get well completion data
|
|
195
|
+
*
|
|
196
|
+
* Returns well completion counts by basin.
|
|
197
|
+
*
|
|
198
|
+
* @returns Array of completion data
|
|
199
|
+
*
|
|
200
|
+
* @throws {OilPriceAPIError} If API request fails
|
|
201
|
+
* @throws {AuthenticationError} If API key is invalid
|
|
202
|
+
*
|
|
203
|
+
* @example
|
|
204
|
+
* ```typescript
|
|
205
|
+
* const completions = await client.drilling.completions();
|
|
206
|
+
* completions.forEach(comp => {
|
|
207
|
+
* console.log(`${comp.basin}: ${comp.completions} completions`);
|
|
208
|
+
* });
|
|
209
|
+
* ```
|
|
210
|
+
*/
|
|
211
|
+
async completions() {
|
|
212
|
+
const response = await this.client["request"]("/v1/drilling-intelligence/completions", {});
|
|
213
|
+
return Array.isArray(response) ? response : response.data;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Get wells drilled data
|
|
217
|
+
*
|
|
218
|
+
* Returns wells drilled counts by basin.
|
|
219
|
+
*
|
|
220
|
+
* @returns Array of wells drilled data
|
|
221
|
+
*
|
|
222
|
+
* @throws {OilPriceAPIError} If API request fails
|
|
223
|
+
* @throws {AuthenticationError} If API key is invalid
|
|
224
|
+
*
|
|
225
|
+
* @example
|
|
226
|
+
* ```typescript
|
|
227
|
+
* const drilled = await client.drilling.wellsDrilled();
|
|
228
|
+
* drilled.forEach(data => {
|
|
229
|
+
* console.log(`${data.basin}: ${data.wells_drilled} wells drilled`);
|
|
230
|
+
* });
|
|
231
|
+
* ```
|
|
232
|
+
*/
|
|
233
|
+
async wellsDrilled() {
|
|
234
|
+
const response = await this.client["request"]("/v1/drilling-intelligence/wells-drilled", {});
|
|
235
|
+
return Array.isArray(response) ? response : response.data;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Get basin-specific drilling intelligence
|
|
239
|
+
*
|
|
240
|
+
* Returns comprehensive drilling data for a specific basin.
|
|
241
|
+
*
|
|
242
|
+
* @param name - Basin name (e.g., "Permian", "Eagle Ford", "Bakken")
|
|
243
|
+
* @returns Basin drilling intelligence data
|
|
244
|
+
*
|
|
245
|
+
* @throws {NotFoundError} If basin not found
|
|
246
|
+
* @throws {OilPriceAPIError} If API request fails
|
|
247
|
+
* @throws {AuthenticationError} If API key is invalid
|
|
248
|
+
*
|
|
249
|
+
* @example
|
|
250
|
+
* ```typescript
|
|
251
|
+
* const permian = await client.drilling.basin('Permian');
|
|
252
|
+
* console.log(`Permian Basin as of ${permian.as_of_date}:`);
|
|
253
|
+
* console.log(` Active rigs: ${permian.active_rigs}`);
|
|
254
|
+
* console.log(` Frac spreads: ${permian.frac_spreads}`);
|
|
255
|
+
* console.log(` DUC wells: ${permian.duc_wells}`);
|
|
256
|
+
* ```
|
|
257
|
+
*/
|
|
258
|
+
async basin(name) {
|
|
259
|
+
if (!name || typeof name !== "string") {
|
|
260
|
+
throw new Error("Basin name must be a non-empty string");
|
|
261
|
+
}
|
|
262
|
+
return this.client["request"](`/v1/drilling-intelligence/basin/${name}`, {});
|
|
263
|
+
}
|
|
264
|
+
}
|