colacloud 1.3.0 → 1.4.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 +1 -1
- package/dist/index.d.mts +204 -7
- package/dist/index.d.ts +204 -7
- package/dist/index.js +89 -0
- package/dist/index.mjs +89 -0
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -257,12 +257,12 @@ interface PermitteeSummary {
|
|
|
257
257
|
is_active: boolean;
|
|
258
258
|
/** Reason for active/inactive status */
|
|
259
259
|
active_reason: string | null;
|
|
260
|
-
/** Total number of COLAs */
|
|
261
|
-
colas
|
|
262
|
-
/** Number of approved COLAs */
|
|
263
|
-
colas_approved
|
|
264
|
-
/** Date of most recent COLA application (ISO date string) */
|
|
265
|
-
last_cola_application_date
|
|
260
|
+
/** Total number of COLAs. Paid plans only (starter/pro). */
|
|
261
|
+
colas?: number;
|
|
262
|
+
/** Number of approved COLAs. Paid plans only (starter/pro). */
|
|
263
|
+
colas_approved?: number;
|
|
264
|
+
/** Date of most recent COLA application (ISO date string). Paid plans only (starter/pro). */
|
|
265
|
+
last_cola_application_date?: string | null;
|
|
266
266
|
}
|
|
267
267
|
/**
|
|
268
268
|
* Full details for a permittee including recent COLAs
|
|
@@ -328,6 +328,140 @@ interface UsageStats {
|
|
|
328
328
|
/** Per-minute burst limit */
|
|
329
329
|
per_minute_limit: number;
|
|
330
330
|
}
|
|
331
|
+
/**
|
|
332
|
+
* Metadata for reference data list responses
|
|
333
|
+
*/
|
|
334
|
+
interface ReferenceListMeta {
|
|
335
|
+
/** Total number of items */
|
|
336
|
+
total: number;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Metadata for paginated reference data responses
|
|
340
|
+
*/
|
|
341
|
+
interface ReferenceListPaginatedMeta {
|
|
342
|
+
/** Total number of items */
|
|
343
|
+
total: number;
|
|
344
|
+
/** Current page number */
|
|
345
|
+
page: number;
|
|
346
|
+
/** Items per page */
|
|
347
|
+
per_page: number;
|
|
348
|
+
/** Whether there are more results */
|
|
349
|
+
has_more: boolean;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Response wrapper for reference data list endpoints
|
|
353
|
+
*/
|
|
354
|
+
interface ReferenceListResponse<T> {
|
|
355
|
+
/** Array of items */
|
|
356
|
+
data: T[];
|
|
357
|
+
/** Response metadata */
|
|
358
|
+
meta: ReferenceListMeta;
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Response wrapper for paginated reference data list endpoints
|
|
362
|
+
*/
|
|
363
|
+
interface ReferencePaginatedResponse<T> {
|
|
364
|
+
/** Array of items */
|
|
365
|
+
data: T[];
|
|
366
|
+
/** Response metadata with pagination */
|
|
367
|
+
meta: ReferenceListPaginatedMeta;
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Response wrapper for single reference data endpoints
|
|
371
|
+
*/
|
|
372
|
+
interface ReferenceSingleResponse<T> {
|
|
373
|
+
/** The requested item */
|
|
374
|
+
data: T;
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* Query parameters for processing times overview
|
|
378
|
+
*/
|
|
379
|
+
interface ProcessingTimesParams {
|
|
380
|
+
/** Filter by commodity type */
|
|
381
|
+
commodity?: string;
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Query parameters for formula processing times
|
|
385
|
+
*/
|
|
386
|
+
interface FormulaProcessingTimesParams {
|
|
387
|
+
/** Filter by formula type */
|
|
388
|
+
formulaType?: string;
|
|
389
|
+
/** Filter by commodity type */
|
|
390
|
+
commodity?: string;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Query parameters for registration processing times
|
|
394
|
+
*/
|
|
395
|
+
interface RegistrationProcessingTimesParams {
|
|
396
|
+
/** Filter by category */
|
|
397
|
+
category?: string;
|
|
398
|
+
/** Filter by application type */
|
|
399
|
+
applicationType?: string;
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Query parameters for production reports
|
|
403
|
+
*/
|
|
404
|
+
interface ProductionReportsParams {
|
|
405
|
+
/** Filter by commodity type */
|
|
406
|
+
commodity?: string;
|
|
407
|
+
/** Filter by year */
|
|
408
|
+
year?: number;
|
|
409
|
+
/** Filter by month */
|
|
410
|
+
month?: number;
|
|
411
|
+
/** Filter by report type */
|
|
412
|
+
reportType?: string;
|
|
413
|
+
/** Filter by statistical group */
|
|
414
|
+
statisticalGroup?: string;
|
|
415
|
+
/** Page number (1-indexed, default 1) */
|
|
416
|
+
page?: number;
|
|
417
|
+
/** Items per page (default 100, max 100) */
|
|
418
|
+
perPage?: number;
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Query parameters for AVA (American Viticultural Area) list
|
|
422
|
+
*/
|
|
423
|
+
interface AvaListParams {
|
|
424
|
+
/** Filter by state */
|
|
425
|
+
state?: string;
|
|
426
|
+
/** Search by name */
|
|
427
|
+
q?: string;
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* A processing time record
|
|
431
|
+
*/
|
|
432
|
+
interface ProcessingTime {
|
|
433
|
+
[key: string]: unknown;
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* A formula processing time record
|
|
437
|
+
*/
|
|
438
|
+
interface FormulaProcessingTime {
|
|
439
|
+
[key: string]: unknown;
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* A registration processing time record
|
|
443
|
+
*/
|
|
444
|
+
interface RegistrationProcessingTime {
|
|
445
|
+
[key: string]: unknown;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* A production report record
|
|
449
|
+
*/
|
|
450
|
+
interface ProductionReport {
|
|
451
|
+
[key: string]: unknown;
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* An AVA (American Viticultural Area) summary record
|
|
455
|
+
*/
|
|
456
|
+
interface AvaSummary {
|
|
457
|
+
[key: string]: unknown;
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* Full AVA (American Viticultural Area) detail record
|
|
461
|
+
*/
|
|
462
|
+
interface AvaDetail {
|
|
463
|
+
[key: string]: unknown;
|
|
464
|
+
}
|
|
331
465
|
/**
|
|
332
466
|
* Error response structure from the API
|
|
333
467
|
*/
|
|
@@ -379,6 +513,12 @@ declare class ColaCloud {
|
|
|
379
513
|
readonly barcodes: BarcodesResource;
|
|
380
514
|
/** Usage statistics endpoint */
|
|
381
515
|
readonly usage: UsageResource;
|
|
516
|
+
/** Processing times reference data endpoints */
|
|
517
|
+
readonly processingTimes: ProcessingTimesResource;
|
|
518
|
+
/** Production reports reference data endpoints */
|
|
519
|
+
readonly productionReports: ProductionReportsResource;
|
|
520
|
+
/** AVA (American Viticultural Area) reference data endpoints */
|
|
521
|
+
readonly avas: AvasResource;
|
|
382
522
|
/**
|
|
383
523
|
* Create a new COLA Cloud API client
|
|
384
524
|
* @param config Configuration options
|
|
@@ -518,6 +658,63 @@ declare class UsageResource {
|
|
|
518
658
|
*/
|
|
519
659
|
getWithQuota(): Promise<ResponseWithQuota<UsageStats>>;
|
|
520
660
|
}
|
|
661
|
+
/**
|
|
662
|
+
* Processing times reference data resource handler
|
|
663
|
+
*/
|
|
664
|
+
declare class ProcessingTimesResource {
|
|
665
|
+
private readonly client;
|
|
666
|
+
constructor(client: ColaCloud);
|
|
667
|
+
/**
|
|
668
|
+
* Get processing times overview
|
|
669
|
+
* @param params Optional filter parameters
|
|
670
|
+
* @returns Processing times data with total count
|
|
671
|
+
*/
|
|
672
|
+
list(params?: ProcessingTimesParams): Promise<ReferenceListResponse<ProcessingTime>>;
|
|
673
|
+
/**
|
|
674
|
+
* Get formula processing times
|
|
675
|
+
* @param params Optional filter parameters
|
|
676
|
+
* @returns Formula processing times data with total count
|
|
677
|
+
*/
|
|
678
|
+
formula(params?: FormulaProcessingTimesParams): Promise<ReferenceListResponse<FormulaProcessingTime>>;
|
|
679
|
+
/**
|
|
680
|
+
* Get registration processing times
|
|
681
|
+
* @param params Optional filter parameters
|
|
682
|
+
* @returns Registration processing times data with total count
|
|
683
|
+
*/
|
|
684
|
+
registration(params?: RegistrationProcessingTimesParams): Promise<ReferenceListResponse<RegistrationProcessingTime>>;
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* Production reports reference data resource handler
|
|
688
|
+
*/
|
|
689
|
+
declare class ProductionReportsResource {
|
|
690
|
+
private readonly client;
|
|
691
|
+
constructor(client: ColaCloud);
|
|
692
|
+
/**
|
|
693
|
+
* List production reports with pagination
|
|
694
|
+
* @param params Filter and pagination parameters
|
|
695
|
+
* @returns Paginated production reports data
|
|
696
|
+
*/
|
|
697
|
+
list(params?: ProductionReportsParams): Promise<ReferencePaginatedResponse<ProductionReport>>;
|
|
698
|
+
}
|
|
699
|
+
/**
|
|
700
|
+
* AVA (American Viticultural Area) reference data resource handler
|
|
701
|
+
*/
|
|
702
|
+
declare class AvasResource {
|
|
703
|
+
private readonly client;
|
|
704
|
+
constructor(client: ColaCloud);
|
|
705
|
+
/**
|
|
706
|
+
* List and search AVAs
|
|
707
|
+
* @param params Optional filter parameters
|
|
708
|
+
* @returns AVA data with total count
|
|
709
|
+
*/
|
|
710
|
+
list(params?: AvaListParams): Promise<ReferenceListResponse<AvaSummary>>;
|
|
711
|
+
/**
|
|
712
|
+
* Get a single AVA by ID
|
|
713
|
+
* @param avaId The unique AVA identifier
|
|
714
|
+
* @returns Full AVA details
|
|
715
|
+
*/
|
|
716
|
+
get(avaId: string): Promise<AvaDetail>;
|
|
717
|
+
}
|
|
521
718
|
|
|
522
719
|
/**
|
|
523
720
|
* COLA Cloud SDK Custom Error Classes
|
|
@@ -661,4 +858,4 @@ declare function collectAll<T>(iterator: AsyncIterable<T>, maxItems?: number): P
|
|
|
661
858
|
*/
|
|
662
859
|
declare function take<T>(iterator: AsyncIterable<T>, count: number): Promise<T[]>;
|
|
663
860
|
|
|
664
|
-
export { type ApiErrorResponse, AuthenticationError, type BarcodeLookupResult, type ColaBarcode, ColaCloud, type ColaCloudConfig, ColaCloudError, type ColaDetail, type ColaImage, type ColaListParams, type ColaSummary, NetworkError, NotFoundError, type PaginatedIteratorOptions, type PaginatedIteratorResult, type PaginatedResponse, type Pagination, type PermitteeDetail, type PermitteeListParams, type PermitteeSummary, type QuotaInfo, RateLimitError, type ResponseWithQuota, ServerError, type SingleResponse, TimeoutError, type UsageStats, ValidationError, collectAll, createPaginatedIterator, createPaginatedIteratorWithMetadata, take };
|
|
861
|
+
export { type ApiErrorResponse, AuthenticationError, type AvaDetail, type AvaListParams, type AvaSummary, type BarcodeLookupResult, type ColaBarcode, ColaCloud, type ColaCloudConfig, ColaCloudError, type ColaDetail, type ColaImage, type ColaListParams, type ColaSummary, type FormulaProcessingTime, type FormulaProcessingTimesParams, NetworkError, NotFoundError, type PaginatedIteratorOptions, type PaginatedIteratorResult, type PaginatedResponse, type Pagination, type PermitteeDetail, type PermitteeListParams, type PermitteeSummary, type ProcessingTime, type ProcessingTimesParams, type ProductionReport, type ProductionReportsParams, type QuotaInfo, RateLimitError, type ReferenceListMeta, type ReferenceListPaginatedMeta, type ReferenceListResponse, type ReferencePaginatedResponse, type ReferenceSingleResponse, type RegistrationProcessingTime, type RegistrationProcessingTimesParams, type ResponseWithQuota, ServerError, type SingleResponse, TimeoutError, type UsageStats, ValidationError, collectAll, createPaginatedIterator, createPaginatedIteratorWithMetadata, take };
|
package/dist/index.d.ts
CHANGED
|
@@ -257,12 +257,12 @@ interface PermitteeSummary {
|
|
|
257
257
|
is_active: boolean;
|
|
258
258
|
/** Reason for active/inactive status */
|
|
259
259
|
active_reason: string | null;
|
|
260
|
-
/** Total number of COLAs */
|
|
261
|
-
colas
|
|
262
|
-
/** Number of approved COLAs */
|
|
263
|
-
colas_approved
|
|
264
|
-
/** Date of most recent COLA application (ISO date string) */
|
|
265
|
-
last_cola_application_date
|
|
260
|
+
/** Total number of COLAs. Paid plans only (starter/pro). */
|
|
261
|
+
colas?: number;
|
|
262
|
+
/** Number of approved COLAs. Paid plans only (starter/pro). */
|
|
263
|
+
colas_approved?: number;
|
|
264
|
+
/** Date of most recent COLA application (ISO date string). Paid plans only (starter/pro). */
|
|
265
|
+
last_cola_application_date?: string | null;
|
|
266
266
|
}
|
|
267
267
|
/**
|
|
268
268
|
* Full details for a permittee including recent COLAs
|
|
@@ -328,6 +328,140 @@ interface UsageStats {
|
|
|
328
328
|
/** Per-minute burst limit */
|
|
329
329
|
per_minute_limit: number;
|
|
330
330
|
}
|
|
331
|
+
/**
|
|
332
|
+
* Metadata for reference data list responses
|
|
333
|
+
*/
|
|
334
|
+
interface ReferenceListMeta {
|
|
335
|
+
/** Total number of items */
|
|
336
|
+
total: number;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Metadata for paginated reference data responses
|
|
340
|
+
*/
|
|
341
|
+
interface ReferenceListPaginatedMeta {
|
|
342
|
+
/** Total number of items */
|
|
343
|
+
total: number;
|
|
344
|
+
/** Current page number */
|
|
345
|
+
page: number;
|
|
346
|
+
/** Items per page */
|
|
347
|
+
per_page: number;
|
|
348
|
+
/** Whether there are more results */
|
|
349
|
+
has_more: boolean;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Response wrapper for reference data list endpoints
|
|
353
|
+
*/
|
|
354
|
+
interface ReferenceListResponse<T> {
|
|
355
|
+
/** Array of items */
|
|
356
|
+
data: T[];
|
|
357
|
+
/** Response metadata */
|
|
358
|
+
meta: ReferenceListMeta;
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Response wrapper for paginated reference data list endpoints
|
|
362
|
+
*/
|
|
363
|
+
interface ReferencePaginatedResponse<T> {
|
|
364
|
+
/** Array of items */
|
|
365
|
+
data: T[];
|
|
366
|
+
/** Response metadata with pagination */
|
|
367
|
+
meta: ReferenceListPaginatedMeta;
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Response wrapper for single reference data endpoints
|
|
371
|
+
*/
|
|
372
|
+
interface ReferenceSingleResponse<T> {
|
|
373
|
+
/** The requested item */
|
|
374
|
+
data: T;
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* Query parameters for processing times overview
|
|
378
|
+
*/
|
|
379
|
+
interface ProcessingTimesParams {
|
|
380
|
+
/** Filter by commodity type */
|
|
381
|
+
commodity?: string;
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Query parameters for formula processing times
|
|
385
|
+
*/
|
|
386
|
+
interface FormulaProcessingTimesParams {
|
|
387
|
+
/** Filter by formula type */
|
|
388
|
+
formulaType?: string;
|
|
389
|
+
/** Filter by commodity type */
|
|
390
|
+
commodity?: string;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Query parameters for registration processing times
|
|
394
|
+
*/
|
|
395
|
+
interface RegistrationProcessingTimesParams {
|
|
396
|
+
/** Filter by category */
|
|
397
|
+
category?: string;
|
|
398
|
+
/** Filter by application type */
|
|
399
|
+
applicationType?: string;
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Query parameters for production reports
|
|
403
|
+
*/
|
|
404
|
+
interface ProductionReportsParams {
|
|
405
|
+
/** Filter by commodity type */
|
|
406
|
+
commodity?: string;
|
|
407
|
+
/** Filter by year */
|
|
408
|
+
year?: number;
|
|
409
|
+
/** Filter by month */
|
|
410
|
+
month?: number;
|
|
411
|
+
/** Filter by report type */
|
|
412
|
+
reportType?: string;
|
|
413
|
+
/** Filter by statistical group */
|
|
414
|
+
statisticalGroup?: string;
|
|
415
|
+
/** Page number (1-indexed, default 1) */
|
|
416
|
+
page?: number;
|
|
417
|
+
/** Items per page (default 100, max 100) */
|
|
418
|
+
perPage?: number;
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Query parameters for AVA (American Viticultural Area) list
|
|
422
|
+
*/
|
|
423
|
+
interface AvaListParams {
|
|
424
|
+
/** Filter by state */
|
|
425
|
+
state?: string;
|
|
426
|
+
/** Search by name */
|
|
427
|
+
q?: string;
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* A processing time record
|
|
431
|
+
*/
|
|
432
|
+
interface ProcessingTime {
|
|
433
|
+
[key: string]: unknown;
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* A formula processing time record
|
|
437
|
+
*/
|
|
438
|
+
interface FormulaProcessingTime {
|
|
439
|
+
[key: string]: unknown;
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* A registration processing time record
|
|
443
|
+
*/
|
|
444
|
+
interface RegistrationProcessingTime {
|
|
445
|
+
[key: string]: unknown;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* A production report record
|
|
449
|
+
*/
|
|
450
|
+
interface ProductionReport {
|
|
451
|
+
[key: string]: unknown;
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* An AVA (American Viticultural Area) summary record
|
|
455
|
+
*/
|
|
456
|
+
interface AvaSummary {
|
|
457
|
+
[key: string]: unknown;
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* Full AVA (American Viticultural Area) detail record
|
|
461
|
+
*/
|
|
462
|
+
interface AvaDetail {
|
|
463
|
+
[key: string]: unknown;
|
|
464
|
+
}
|
|
331
465
|
/**
|
|
332
466
|
* Error response structure from the API
|
|
333
467
|
*/
|
|
@@ -379,6 +513,12 @@ declare class ColaCloud {
|
|
|
379
513
|
readonly barcodes: BarcodesResource;
|
|
380
514
|
/** Usage statistics endpoint */
|
|
381
515
|
readonly usage: UsageResource;
|
|
516
|
+
/** Processing times reference data endpoints */
|
|
517
|
+
readonly processingTimes: ProcessingTimesResource;
|
|
518
|
+
/** Production reports reference data endpoints */
|
|
519
|
+
readonly productionReports: ProductionReportsResource;
|
|
520
|
+
/** AVA (American Viticultural Area) reference data endpoints */
|
|
521
|
+
readonly avas: AvasResource;
|
|
382
522
|
/**
|
|
383
523
|
* Create a new COLA Cloud API client
|
|
384
524
|
* @param config Configuration options
|
|
@@ -518,6 +658,63 @@ declare class UsageResource {
|
|
|
518
658
|
*/
|
|
519
659
|
getWithQuota(): Promise<ResponseWithQuota<UsageStats>>;
|
|
520
660
|
}
|
|
661
|
+
/**
|
|
662
|
+
* Processing times reference data resource handler
|
|
663
|
+
*/
|
|
664
|
+
declare class ProcessingTimesResource {
|
|
665
|
+
private readonly client;
|
|
666
|
+
constructor(client: ColaCloud);
|
|
667
|
+
/**
|
|
668
|
+
* Get processing times overview
|
|
669
|
+
* @param params Optional filter parameters
|
|
670
|
+
* @returns Processing times data with total count
|
|
671
|
+
*/
|
|
672
|
+
list(params?: ProcessingTimesParams): Promise<ReferenceListResponse<ProcessingTime>>;
|
|
673
|
+
/**
|
|
674
|
+
* Get formula processing times
|
|
675
|
+
* @param params Optional filter parameters
|
|
676
|
+
* @returns Formula processing times data with total count
|
|
677
|
+
*/
|
|
678
|
+
formula(params?: FormulaProcessingTimesParams): Promise<ReferenceListResponse<FormulaProcessingTime>>;
|
|
679
|
+
/**
|
|
680
|
+
* Get registration processing times
|
|
681
|
+
* @param params Optional filter parameters
|
|
682
|
+
* @returns Registration processing times data with total count
|
|
683
|
+
*/
|
|
684
|
+
registration(params?: RegistrationProcessingTimesParams): Promise<ReferenceListResponse<RegistrationProcessingTime>>;
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* Production reports reference data resource handler
|
|
688
|
+
*/
|
|
689
|
+
declare class ProductionReportsResource {
|
|
690
|
+
private readonly client;
|
|
691
|
+
constructor(client: ColaCloud);
|
|
692
|
+
/**
|
|
693
|
+
* List production reports with pagination
|
|
694
|
+
* @param params Filter and pagination parameters
|
|
695
|
+
* @returns Paginated production reports data
|
|
696
|
+
*/
|
|
697
|
+
list(params?: ProductionReportsParams): Promise<ReferencePaginatedResponse<ProductionReport>>;
|
|
698
|
+
}
|
|
699
|
+
/**
|
|
700
|
+
* AVA (American Viticultural Area) reference data resource handler
|
|
701
|
+
*/
|
|
702
|
+
declare class AvasResource {
|
|
703
|
+
private readonly client;
|
|
704
|
+
constructor(client: ColaCloud);
|
|
705
|
+
/**
|
|
706
|
+
* List and search AVAs
|
|
707
|
+
* @param params Optional filter parameters
|
|
708
|
+
* @returns AVA data with total count
|
|
709
|
+
*/
|
|
710
|
+
list(params?: AvaListParams): Promise<ReferenceListResponse<AvaSummary>>;
|
|
711
|
+
/**
|
|
712
|
+
* Get a single AVA by ID
|
|
713
|
+
* @param avaId The unique AVA identifier
|
|
714
|
+
* @returns Full AVA details
|
|
715
|
+
*/
|
|
716
|
+
get(avaId: string): Promise<AvaDetail>;
|
|
717
|
+
}
|
|
521
718
|
|
|
522
719
|
/**
|
|
523
720
|
* COLA Cloud SDK Custom Error Classes
|
|
@@ -661,4 +858,4 @@ declare function collectAll<T>(iterator: AsyncIterable<T>, maxItems?: number): P
|
|
|
661
858
|
*/
|
|
662
859
|
declare function take<T>(iterator: AsyncIterable<T>, count: number): Promise<T[]>;
|
|
663
860
|
|
|
664
|
-
export { type ApiErrorResponse, AuthenticationError, type BarcodeLookupResult, type ColaBarcode, ColaCloud, type ColaCloudConfig, ColaCloudError, type ColaDetail, type ColaImage, type ColaListParams, type ColaSummary, NetworkError, NotFoundError, type PaginatedIteratorOptions, type PaginatedIteratorResult, type PaginatedResponse, type Pagination, type PermitteeDetail, type PermitteeListParams, type PermitteeSummary, type QuotaInfo, RateLimitError, type ResponseWithQuota, ServerError, type SingleResponse, TimeoutError, type UsageStats, ValidationError, collectAll, createPaginatedIterator, createPaginatedIteratorWithMetadata, take };
|
|
861
|
+
export { type ApiErrorResponse, AuthenticationError, type AvaDetail, type AvaListParams, type AvaSummary, type BarcodeLookupResult, type ColaBarcode, ColaCloud, type ColaCloudConfig, ColaCloudError, type ColaDetail, type ColaImage, type ColaListParams, type ColaSummary, type FormulaProcessingTime, type FormulaProcessingTimesParams, NetworkError, NotFoundError, type PaginatedIteratorOptions, type PaginatedIteratorResult, type PaginatedResponse, type Pagination, type PermitteeDetail, type PermitteeListParams, type PermitteeSummary, type ProcessingTime, type ProcessingTimesParams, type ProductionReport, type ProductionReportsParams, type QuotaInfo, RateLimitError, type ReferenceListMeta, type ReferenceListPaginatedMeta, type ReferenceListResponse, type ReferencePaginatedResponse, type ReferenceSingleResponse, type RegistrationProcessingTime, type RegistrationProcessingTimesParams, type ResponseWithQuota, ServerError, type SingleResponse, TimeoutError, type UsageStats, ValidationError, collectAll, createPaginatedIterator, createPaginatedIteratorWithMetadata, take };
|
package/dist/index.js
CHANGED
|
@@ -329,6 +329,12 @@ var ColaCloud = class {
|
|
|
329
329
|
barcodes;
|
|
330
330
|
/** Usage statistics endpoint */
|
|
331
331
|
usage;
|
|
332
|
+
/** Processing times reference data endpoints */
|
|
333
|
+
processingTimes;
|
|
334
|
+
/** Production reports reference data endpoints */
|
|
335
|
+
productionReports;
|
|
336
|
+
/** AVA (American Viticultural Area) reference data endpoints */
|
|
337
|
+
avas;
|
|
332
338
|
/**
|
|
333
339
|
* Create a new COLA Cloud API client
|
|
334
340
|
* @param config Configuration options
|
|
@@ -344,6 +350,9 @@ var ColaCloud = class {
|
|
|
344
350
|
this.permittees = new PermitteesResource(this);
|
|
345
351
|
this.barcodes = new BarcodesResource(this);
|
|
346
352
|
this.usage = new UsageResource(this);
|
|
353
|
+
this.processingTimes = new ProcessingTimesResource(this);
|
|
354
|
+
this.productionReports = new ProductionReportsResource(this);
|
|
355
|
+
this.avas = new AvasResource(this);
|
|
347
356
|
}
|
|
348
357
|
/**
|
|
349
358
|
* Make an authenticated request to the API
|
|
@@ -671,6 +680,86 @@ var UsageResource = class {
|
|
|
671
680
|
return { data: result.data.data, quota: result.quota };
|
|
672
681
|
}
|
|
673
682
|
};
|
|
683
|
+
var ProcessingTimesResource = class {
|
|
684
|
+
constructor(client) {
|
|
685
|
+
this.client = client;
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* Get processing times overview
|
|
689
|
+
* @param params Optional filter parameters
|
|
690
|
+
* @returns Processing times data with total count
|
|
691
|
+
*/
|
|
692
|
+
async list(params = {}) {
|
|
693
|
+
const result = await this.client.request("GET", "/processing-times", params);
|
|
694
|
+
return result.data;
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* Get formula processing times
|
|
698
|
+
* @param params Optional filter parameters
|
|
699
|
+
* @returns Formula processing times data with total count
|
|
700
|
+
*/
|
|
701
|
+
async formula(params = {}) {
|
|
702
|
+
const result = await this.client.request("GET", "/processing-times/formula", params);
|
|
703
|
+
return result.data;
|
|
704
|
+
}
|
|
705
|
+
/**
|
|
706
|
+
* Get registration processing times
|
|
707
|
+
* @param params Optional filter parameters
|
|
708
|
+
* @returns Registration processing times data with total count
|
|
709
|
+
*/
|
|
710
|
+
async registration(params = {}) {
|
|
711
|
+
const result = await this.client.request(
|
|
712
|
+
"GET",
|
|
713
|
+
"/processing-times/registration",
|
|
714
|
+
params
|
|
715
|
+
);
|
|
716
|
+
return result.data;
|
|
717
|
+
}
|
|
718
|
+
};
|
|
719
|
+
var ProductionReportsResource = class {
|
|
720
|
+
constructor(client) {
|
|
721
|
+
this.client = client;
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* List production reports with pagination
|
|
725
|
+
* @param params Filter and pagination parameters
|
|
726
|
+
* @returns Paginated production reports data
|
|
727
|
+
*/
|
|
728
|
+
async list(params = {}) {
|
|
729
|
+
const result = await this.client.request("GET", "/production-reports", params);
|
|
730
|
+
return result.data;
|
|
731
|
+
}
|
|
732
|
+
};
|
|
733
|
+
var AvasResource = class {
|
|
734
|
+
constructor(client) {
|
|
735
|
+
this.client = client;
|
|
736
|
+
}
|
|
737
|
+
/**
|
|
738
|
+
* List and search AVAs
|
|
739
|
+
* @param params Optional filter parameters
|
|
740
|
+
* @returns AVA data with total count
|
|
741
|
+
*/
|
|
742
|
+
async list(params = {}) {
|
|
743
|
+
const result = await this.client.request("GET", "/avas", params);
|
|
744
|
+
return result.data;
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* Get a single AVA by ID
|
|
748
|
+
* @param avaId The unique AVA identifier
|
|
749
|
+
* @returns Full AVA details
|
|
750
|
+
*/
|
|
751
|
+
async get(avaId) {
|
|
752
|
+
try {
|
|
753
|
+
const result = await this.client.request("GET", `/avas/${encodeURIComponent(avaId)}`);
|
|
754
|
+
return result.data.data;
|
|
755
|
+
} catch (error) {
|
|
756
|
+
if (error instanceof NotFoundError) {
|
|
757
|
+
throw new NotFoundError("AVA", avaId);
|
|
758
|
+
}
|
|
759
|
+
throw error;
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
};
|
|
674
763
|
// Annotate the CommonJS export names for ESM import in node:
|
|
675
764
|
0 && (module.exports = {
|
|
676
765
|
AuthenticationError,
|
package/dist/index.mjs
CHANGED
|
@@ -291,6 +291,12 @@ var ColaCloud = class {
|
|
|
291
291
|
barcodes;
|
|
292
292
|
/** Usage statistics endpoint */
|
|
293
293
|
usage;
|
|
294
|
+
/** Processing times reference data endpoints */
|
|
295
|
+
processingTimes;
|
|
296
|
+
/** Production reports reference data endpoints */
|
|
297
|
+
productionReports;
|
|
298
|
+
/** AVA (American Viticultural Area) reference data endpoints */
|
|
299
|
+
avas;
|
|
294
300
|
/**
|
|
295
301
|
* Create a new COLA Cloud API client
|
|
296
302
|
* @param config Configuration options
|
|
@@ -306,6 +312,9 @@ var ColaCloud = class {
|
|
|
306
312
|
this.permittees = new PermitteesResource(this);
|
|
307
313
|
this.barcodes = new BarcodesResource(this);
|
|
308
314
|
this.usage = new UsageResource(this);
|
|
315
|
+
this.processingTimes = new ProcessingTimesResource(this);
|
|
316
|
+
this.productionReports = new ProductionReportsResource(this);
|
|
317
|
+
this.avas = new AvasResource(this);
|
|
309
318
|
}
|
|
310
319
|
/**
|
|
311
320
|
* Make an authenticated request to the API
|
|
@@ -633,6 +642,86 @@ var UsageResource = class {
|
|
|
633
642
|
return { data: result.data.data, quota: result.quota };
|
|
634
643
|
}
|
|
635
644
|
};
|
|
645
|
+
var ProcessingTimesResource = class {
|
|
646
|
+
constructor(client) {
|
|
647
|
+
this.client = client;
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* Get processing times overview
|
|
651
|
+
* @param params Optional filter parameters
|
|
652
|
+
* @returns Processing times data with total count
|
|
653
|
+
*/
|
|
654
|
+
async list(params = {}) {
|
|
655
|
+
const result = await this.client.request("GET", "/processing-times", params);
|
|
656
|
+
return result.data;
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* Get formula processing times
|
|
660
|
+
* @param params Optional filter parameters
|
|
661
|
+
* @returns Formula processing times data with total count
|
|
662
|
+
*/
|
|
663
|
+
async formula(params = {}) {
|
|
664
|
+
const result = await this.client.request("GET", "/processing-times/formula", params);
|
|
665
|
+
return result.data;
|
|
666
|
+
}
|
|
667
|
+
/**
|
|
668
|
+
* Get registration processing times
|
|
669
|
+
* @param params Optional filter parameters
|
|
670
|
+
* @returns Registration processing times data with total count
|
|
671
|
+
*/
|
|
672
|
+
async registration(params = {}) {
|
|
673
|
+
const result = await this.client.request(
|
|
674
|
+
"GET",
|
|
675
|
+
"/processing-times/registration",
|
|
676
|
+
params
|
|
677
|
+
);
|
|
678
|
+
return result.data;
|
|
679
|
+
}
|
|
680
|
+
};
|
|
681
|
+
var ProductionReportsResource = class {
|
|
682
|
+
constructor(client) {
|
|
683
|
+
this.client = client;
|
|
684
|
+
}
|
|
685
|
+
/**
|
|
686
|
+
* List production reports with pagination
|
|
687
|
+
* @param params Filter and pagination parameters
|
|
688
|
+
* @returns Paginated production reports data
|
|
689
|
+
*/
|
|
690
|
+
async list(params = {}) {
|
|
691
|
+
const result = await this.client.request("GET", "/production-reports", params);
|
|
692
|
+
return result.data;
|
|
693
|
+
}
|
|
694
|
+
};
|
|
695
|
+
var AvasResource = class {
|
|
696
|
+
constructor(client) {
|
|
697
|
+
this.client = client;
|
|
698
|
+
}
|
|
699
|
+
/**
|
|
700
|
+
* List and search AVAs
|
|
701
|
+
* @param params Optional filter parameters
|
|
702
|
+
* @returns AVA data with total count
|
|
703
|
+
*/
|
|
704
|
+
async list(params = {}) {
|
|
705
|
+
const result = await this.client.request("GET", "/avas", params);
|
|
706
|
+
return result.data;
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
* Get a single AVA by ID
|
|
710
|
+
* @param avaId The unique AVA identifier
|
|
711
|
+
* @returns Full AVA details
|
|
712
|
+
*/
|
|
713
|
+
async get(avaId) {
|
|
714
|
+
try {
|
|
715
|
+
const result = await this.client.request("GET", `/avas/${encodeURIComponent(avaId)}`);
|
|
716
|
+
return result.data.data;
|
|
717
|
+
} catch (error) {
|
|
718
|
+
if (error instanceof NotFoundError) {
|
|
719
|
+
throw new NotFoundError("AVA", avaId);
|
|
720
|
+
}
|
|
721
|
+
throw error;
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
};
|
|
636
725
|
export {
|
|
637
726
|
AuthenticationError,
|
|
638
727
|
ColaCloud,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "colacloud",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
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",
|