colacloud 1.1.0 → 1.2.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 CHANGED
@@ -165,9 +165,10 @@ for (const cola of result.colas) {
165
165
  const usage = await client.usage.get();
166
166
 
167
167
  console.log(`Tier: ${usage.tier}`);
168
- console.log(`Used: ${usage.requests_used} / ${usage.monthly_limit}`);
169
- console.log(`Remaining: ${usage.requests_remaining}`);
170
- console.log(`Rate limit: ${usage.per_minute_limit} req/min`);
168
+ console.log(`Period: ${usage.current_period}`);
169
+ console.log(`Detail views: ${usage.detail_views.used} / ${usage.detail_views.limit}`);
170
+ console.log(`List records: ${usage.list_records.used} / ${usage.list_records.limit}`);
171
+ console.log(`Burst limit: ${usage.per_minute_limit} req/min`);
171
172
  ```
172
173
 
173
174
  ### Rate Limit Information
package/dist/index.d.mts CHANGED
@@ -78,34 +78,14 @@ interface ColaSummary {
78
78
  class_name: string | null;
79
79
  /** Origin/country of the product */
80
80
  origin_name: string | null;
81
- /** "Domestic" or "Imported" */
82
- domestic_or_imported: string | null;
83
81
  /** Permit number of the applicant */
84
82
  permit_number: string | null;
85
- /** Type of application (e.g., "CERTIFICATE OF LABEL APPROVAL") */
86
- application_type: string | null;
87
- /** Status of the application (e.g., "APPROVED") */
88
- application_status: string | null;
89
- /** Date the application was submitted (ISO date string) */
90
- application_date: string | null;
91
83
  /** Date the COLA was approved (ISO date string) */
92
84
  approval_date: string | null;
93
- /** Date the COLA expires (ISO date string) */
94
- expiration_date: string | null;
95
- /** Alcohol by volume percentage */
96
- abv: number | null;
97
- /** Container volume */
98
- volume: string | null;
99
- /** Volume unit (e.g., "ml", "L") */
100
- volume_unit: string | null;
101
- /** LLM-assigned category (e.g., "Bourbon") */
102
- llm_category: string | null;
103
- /** LLM-assigned category path (e.g., "Spirits > Whiskey > Bourbon") */
104
- llm_category_path: string | null;
105
85
  /** Number of images associated with this COLA */
106
86
  image_count: number;
107
- /** URL to the main/primary image */
108
- main_image_url: string | null;
87
+ /** Whether any barcode was extracted from label images */
88
+ has_barcode: boolean;
109
89
  }
110
90
  /**
111
91
  * Image associated with a COLA
@@ -313,21 +293,33 @@ interface BarcodeLookupResult {
313
293
  /** Total number of COLAs with this barcode */
314
294
  total_colas: number;
315
295
  }
296
+ /**
297
+ * API usage statistics for the current account
298
+ */
299
+ /**
300
+ * Usage quota for a single meter (detail views or list records)
301
+ */
302
+ interface UsageQuota {
303
+ /** Number used this period */
304
+ used: number;
305
+ /** Maximum allowed this period */
306
+ limit: number;
307
+ /** Remaining this period */
308
+ remaining: number;
309
+ }
316
310
  /**
317
311
  * API usage statistics for the current account
318
312
  */
319
313
  interface UsageStats {
320
- /** Account tier (e.g., "free", "pro", "enterprise") */
314
+ /** Account tier (e.g., "free", "starter", "pro") */
321
315
  tier: string;
322
- /** Monthly request limit */
323
- monthly_limit: number;
324
- /** Current billing period (ISO date string) */
316
+ /** Current billing period (YYYY-MM) */
325
317
  current_period: string;
326
- /** Number of requests used this period */
327
- requests_used: number;
328
- /** Number of requests remaining this period */
329
- requests_remaining: number;
330
- /** Per-minute rate limit */
318
+ /** Detail view usage and limits */
319
+ detail_views: UsageQuota;
320
+ /** List record usage and limits */
321
+ list_records: UsageQuota;
322
+ /** Per-minute burst limit */
331
323
  per_minute_limit: number;
332
324
  }
333
325
  /**
package/dist/index.d.ts CHANGED
@@ -78,34 +78,14 @@ interface ColaSummary {
78
78
  class_name: string | null;
79
79
  /** Origin/country of the product */
80
80
  origin_name: string | null;
81
- /** "Domestic" or "Imported" */
82
- domestic_or_imported: string | null;
83
81
  /** Permit number of the applicant */
84
82
  permit_number: string | null;
85
- /** Type of application (e.g., "CERTIFICATE OF LABEL APPROVAL") */
86
- application_type: string | null;
87
- /** Status of the application (e.g., "APPROVED") */
88
- application_status: string | null;
89
- /** Date the application was submitted (ISO date string) */
90
- application_date: string | null;
91
83
  /** Date the COLA was approved (ISO date string) */
92
84
  approval_date: string | null;
93
- /** Date the COLA expires (ISO date string) */
94
- expiration_date: string | null;
95
- /** Alcohol by volume percentage */
96
- abv: number | null;
97
- /** Container volume */
98
- volume: string | null;
99
- /** Volume unit (e.g., "ml", "L") */
100
- volume_unit: string | null;
101
- /** LLM-assigned category (e.g., "Bourbon") */
102
- llm_category: string | null;
103
- /** LLM-assigned category path (e.g., "Spirits > Whiskey > Bourbon") */
104
- llm_category_path: string | null;
105
85
  /** Number of images associated with this COLA */
106
86
  image_count: number;
107
- /** URL to the main/primary image */
108
- main_image_url: string | null;
87
+ /** Whether any barcode was extracted from label images */
88
+ has_barcode: boolean;
109
89
  }
110
90
  /**
111
91
  * Image associated with a COLA
@@ -313,21 +293,33 @@ interface BarcodeLookupResult {
313
293
  /** Total number of COLAs with this barcode */
314
294
  total_colas: number;
315
295
  }
296
+ /**
297
+ * API usage statistics for the current account
298
+ */
299
+ /**
300
+ * Usage quota for a single meter (detail views or list records)
301
+ */
302
+ interface UsageQuota {
303
+ /** Number used this period */
304
+ used: number;
305
+ /** Maximum allowed this period */
306
+ limit: number;
307
+ /** Remaining this period */
308
+ remaining: number;
309
+ }
316
310
  /**
317
311
  * API usage statistics for the current account
318
312
  */
319
313
  interface UsageStats {
320
- /** Account tier (e.g., "free", "pro", "enterprise") */
314
+ /** Account tier (e.g., "free", "starter", "pro") */
321
315
  tier: string;
322
- /** Monthly request limit */
323
- monthly_limit: number;
324
- /** Current billing period (ISO date string) */
316
+ /** Current billing period (YYYY-MM) */
325
317
  current_period: string;
326
- /** Number of requests used this period */
327
- requests_used: number;
328
- /** Number of requests remaining this period */
329
- requests_remaining: number;
330
- /** Per-minute rate limit */
318
+ /** Detail view usage and limits */
319
+ detail_views: UsageQuota;
320
+ /** List record usage and limits */
321
+ list_records: UsageQuota;
322
+ /** Per-minute burst limit */
331
323
  per_minute_limit: number;
332
324
  }
333
325
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "colacloud",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Official JavaScript/TypeScript SDK for the COLA Cloud API - access the TTB COLA Registry of alcohol product label approvals",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",