@marteye/studiojs 1.1.40 → 1.1.42

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/dist/index.d.ts CHANGED
@@ -43,7 +43,8 @@ interface TransactionsListResponse {
43
43
  hasMore: boolean;
44
44
  }
45
45
  interface ListTransactionsParams {
46
- account: string;
46
+ account?: string;
47
+ referenceGroupKey?: string;
47
48
  dateFrom?: string;
48
49
  dateTo?: string;
49
50
  limit?: number;
@@ -110,6 +111,7 @@ interface SettingsMarketDefaults {
110
111
  selectDocumentIdsMap: {
111
112
  [supertype: string]: string[];
112
113
  };
114
+ enableLuckMoney?: boolean;
113
115
  }
114
116
  interface SettingsProductCodes {
115
117
  [code: string]: ProductCodeConfiguration;
@@ -237,6 +239,7 @@ interface Sale {
237
239
  * - saleAndCatalog: Sale and catalog information synced
238
240
  */
239
241
  publishStatus?: SalePublishStatus;
242
+ enableLuckMoney?: boolean;
240
243
  }
241
244
  interface TemplateSaleData {
242
245
  name?: string;
@@ -250,6 +253,7 @@ interface TemplateSaleData {
250
253
  [attributekey: string]: AttributeValueType;
251
254
  };
252
255
  marteyeSettings?: MartEyeTimedSaleSettings | MartEyeLiveSaleSettings | null;
256
+ enableLuckMoney?: boolean;
253
257
  }
254
258
  interface SaleTemplate {
255
259
  id: string;
@@ -373,6 +377,7 @@ interface Lot {
373
377
  unitOfSale: UnitOfSale;
374
378
  reservePriceInCents?: number | null;
375
379
  startingPriceInCents?: number | null;
380
+ luckMoneyInCents?: number | null;
376
381
  unitPriceInCents?: number;
377
382
  buyerCasual?: string | null;
378
383
  buyerCustomerId: string | null;
@@ -552,6 +557,9 @@ interface Cart {
552
557
  itemsById: {
553
558
  [itemId: string]: CartItem;
554
559
  };
560
+ checkoutPrefs?: {
561
+ [key: string]: any;
562
+ };
555
563
  }
556
564
  interface EmailWrapper {
557
565
  email: string;
@@ -709,6 +717,9 @@ interface Application {
709
717
  isApprovedAtOtherMarkets?: boolean;
710
718
  marteyeUid: string;
711
719
  notes?: string;
720
+ customerId?: string;
721
+ contactId?: string;
722
+ accountNumber?: string;
712
723
  approvedBy?: string;
713
724
  rejectedBy?: string;
714
725
  approvedAt?: Timestamp;
@@ -1015,6 +1026,12 @@ interface Invoice extends Omit<Omit<Omit<Omit<DraftInvoice, "ledgerAccountTotals
1015
1026
  status: "sent" | "delivered" | "opened" | "bounced";
1016
1027
  timestamp: Timestamp;
1017
1028
  }[];
1029
+ printHistory?: {
1030
+ printedAt: Timestamp;
1031
+ printedBy: string;
1032
+ deviceId: string;
1033
+ documentIds: string[];
1034
+ }[];
1018
1035
  pitchPayLink: string | null;
1019
1036
  }
1020
1037
  /**
@@ -1073,6 +1090,7 @@ interface InvoiceLineItem {
1073
1090
  productObfusicate?: boolean;
1074
1091
  passthroughFundsToCustomerId?: string | null;
1075
1092
  adjustmentConfig?: AdjustmentsConfiguration;
1093
+ isLuckMoney?: boolean;
1076
1094
  metadata: {
1077
1095
  [key: string]: string | number | boolean | Timestamp | Media | {
1078
1096
  [key: string]: string | number | boolean | Timestamp;
@@ -1174,6 +1192,9 @@ interface ActivityChange {
1174
1192
  before?: any;
1175
1193
  after?: any;
1176
1194
  }
1195
+ type ReadOptions = {
1196
+ at?: string;
1197
+ };
1177
1198
  interface ActivityLog {
1178
1199
  id: string;
1179
1200
  firstEventAt: Timestamp;
@@ -1258,6 +1279,7 @@ type types_Printer = Printer;
1258
1279
  type types_Product = Product;
1259
1280
  type types_ProductCodeConfiguration = ProductCodeConfiguration;
1260
1281
  type types_ProductConfiguration = ProductConfiguration;
1282
+ type types_ReadOptions = ReadOptions;
1261
1283
  type types_Sale = Sale;
1262
1284
  type types_SaleFromSearch = SaleFromSearch;
1263
1285
  type types_SalePublishStatus = SalePublishStatus;
@@ -1293,7 +1315,7 @@ type types_WebhookEventName = WebhookEventName;
1293
1315
  declare const types_supportedWebhookEvents: typeof supportedWebhookEvents;
1294
1316
  declare namespace types {
1295
1317
  export { types_IMAGE_SIZES_VALUES as IMAGE_SIZES_VALUES, types_LivestockSuperTypes as LivestockSuperTypes, types_SupportedCurrencyCodes as SupportedCurrencyCodes, types_SupportedPaymentMethods as SupportedPaymentMethods, types_SupportedSuperTypes as SupportedSuperTypes, types_SupportedUnitsOfSale as SupportedUnitsOfSale, types_VIDEO_TASKS_VALUES as VIDEO_TASKS_VALUES, types_supportedWebhookEvents as supportedWebhookEvents };
1296
- export type { types_Accessory as Accessory, types_ActivityChange as ActivityChange, types_ActivityLog as ActivityLog, types_ActivityOperation as ActivityOperation, types_Address as Address, types_AddressWrapper as AddressWrapper, types_AdjustmentTarget as AdjustmentTarget, types_AdjustmentTotalTarget as AdjustmentTotalTarget, types_AdjustmentsConfiguration as AdjustmentsConfiguration, types_AppParameterConfig as AppParameterConfig, types_Application as Application, types_AttributeDefinition as AttributeDefinition, types_AttributeValueType as AttributeValueType, types_BankDetails as BankDetails, types_Cart as Cart, types_CartItem as CartItem, types_ChequeField as ChequeField, types_ClientType as ClientType, types_CphLookupResponse as CphLookupResponse, types_CurrenciesWithGuinea as CurrenciesWithGuinea, types_Currency as Currency, types_Customer as Customer, types_CustomerBankDetails as CustomerBankDetails, types_CustomerContact as CustomerContact, types_CustomerFromSearch as CustomerFromSearch, types_DeviceType as DeviceType, types_DisplayBoardMode as DisplayBoardMode, types_DraftInvoice as DraftInvoice, types_EmailWrapper as EmailWrapper, types_FarmAssurances as FarmAssurances, types_FieldPositions as FieldPositions, types_ImageSizes as ImageSizes, types_IncrementLadder as IncrementLadder, types_IncrementLadderItem as IncrementLadderItem, types_Invoice as Invoice, types_InvoiceDeliveryPreference as InvoiceDeliveryPreference, types_InvoiceField as InvoiceField, types_InvoiceLineItem as InvoiceLineItem, types_InvoiceTotalAdjustmentConfiguration as InvoiceTotalAdjustmentConfiguration, types_InvoiceTotals as InvoiceTotals, types_LineItemAdjustmentConfiguration as LineItemAdjustmentConfiguration, types_Lot as Lot, types_LotGeneratedValues as LotGeneratedValues, types_LotIssue as LotIssue, types_LotItem as LotItem, types_LotSaleStatus as LotSaleStatus, types_LotWithItemsAsArray as LotWithItemsAsArray, types_Market as Market, types_MarketBankDetails as MarketBankDetails, types_MarketReportHeaders as MarketReportHeaders, types_MartEyeLiveSaleSettings as MartEyeLiveSaleSettings, types_MartEyeTimedSaleSettings as MartEyeTimedSaleSettings, types_Media as Media, types_MemberSharingConfiguration as MemberSharingConfiguration, types_ObjectType as ObjectType, types_Payment as Payment, types_PaymentMethod as PaymentMethod, types_Payout as Payout, types_PayoutMethod as PayoutMethod, types_PhoneNumberWrapper as PhoneNumberWrapper, types_Printer as Printer, types_Product as Product, types_ProductCodeConfiguration as ProductCodeConfiguration, types_ProductConfiguration as ProductConfiguration, types_Sale as Sale, types_SaleFromSearch as SaleFromSearch, types_SalePublishStatus as SalePublishStatus, types_SaleTemplate as SaleTemplate, types_SettingsAccessories as SettingsAccessories, types_SettingsAdjustmentsConfiguration as SettingsAdjustmentsConfiguration, types_SettingsGlobalAttributes as SettingsGlobalAttributes, types_SettingsMarketDefaults as SettingsMarketDefaults, types_SettingsPrinters as SettingsPrinters, types_SettingsProductCodes as SettingsProductCodes, types_SettingsTaxRates as SettingsTaxRates, types_ShortCustomerDetails as ShortCustomerDetails, types_SimplePaymentIn as SimplePaymentIn, types_SimplePaymentOut as SimplePaymentOut, types_StoredDataGridConfig as StoredDataGridConfig, types_StudioAppPartial as StudioAppPartial, types_SubtotalGroups as SubtotalGroups, types_SuperType as SuperType, types_SupportedAttributeTypes as SupportedAttributeTypes, types_SupportedCountryCode as SupportedCountryCode, SupportedFileTypesNames$1 as SupportedFileTypesNames, types_TablePosition as TablePosition, types_TaxRate as TaxRate, types_TemplateSaleData as TemplateSaleData, types_UnitOfSale as UnitOfSale, types_VideoTasks as VideoTasks, types_WebhookEvent as WebhookEvent, types_WebhookEventName as WebhookEventName };
1318
+ export type { types_Accessory as Accessory, types_ActivityChange as ActivityChange, types_ActivityLog as ActivityLog, types_ActivityOperation as ActivityOperation, types_Address as Address, types_AddressWrapper as AddressWrapper, types_AdjustmentTarget as AdjustmentTarget, types_AdjustmentTotalTarget as AdjustmentTotalTarget, types_AdjustmentsConfiguration as AdjustmentsConfiguration, types_AppParameterConfig as AppParameterConfig, types_Application as Application, types_AttributeDefinition as AttributeDefinition, types_AttributeValueType as AttributeValueType, types_BankDetails as BankDetails, types_Cart as Cart, types_CartItem as CartItem, types_ChequeField as ChequeField, types_ClientType as ClientType, types_CphLookupResponse as CphLookupResponse, types_CurrenciesWithGuinea as CurrenciesWithGuinea, types_Currency as Currency, types_Customer as Customer, types_CustomerBankDetails as CustomerBankDetails, types_CustomerContact as CustomerContact, types_CustomerFromSearch as CustomerFromSearch, types_DeviceType as DeviceType, types_DisplayBoardMode as DisplayBoardMode, types_DraftInvoice as DraftInvoice, types_EmailWrapper as EmailWrapper, types_FarmAssurances as FarmAssurances, types_FieldPositions as FieldPositions, types_ImageSizes as ImageSizes, types_IncrementLadder as IncrementLadder, types_IncrementLadderItem as IncrementLadderItem, types_Invoice as Invoice, types_InvoiceDeliveryPreference as InvoiceDeliveryPreference, types_InvoiceField as InvoiceField, types_InvoiceLineItem as InvoiceLineItem, types_InvoiceTotalAdjustmentConfiguration as InvoiceTotalAdjustmentConfiguration, types_InvoiceTotals as InvoiceTotals, types_LineItemAdjustmentConfiguration as LineItemAdjustmentConfiguration, types_Lot as Lot, types_LotGeneratedValues as LotGeneratedValues, types_LotIssue as LotIssue, types_LotItem as LotItem, types_LotSaleStatus as LotSaleStatus, types_LotWithItemsAsArray as LotWithItemsAsArray, types_Market as Market, types_MarketBankDetails as MarketBankDetails, types_MarketReportHeaders as MarketReportHeaders, types_MartEyeLiveSaleSettings as MartEyeLiveSaleSettings, types_MartEyeTimedSaleSettings as MartEyeTimedSaleSettings, types_Media as Media, types_MemberSharingConfiguration as MemberSharingConfiguration, types_ObjectType as ObjectType, types_Payment as Payment, types_PaymentMethod as PaymentMethod, types_Payout as Payout, types_PayoutMethod as PayoutMethod, types_PhoneNumberWrapper as PhoneNumberWrapper, types_Printer as Printer, types_Product as Product, types_ProductCodeConfiguration as ProductCodeConfiguration, types_ProductConfiguration as ProductConfiguration, types_ReadOptions as ReadOptions, types_Sale as Sale, types_SaleFromSearch as SaleFromSearch, types_SalePublishStatus as SalePublishStatus, types_SaleTemplate as SaleTemplate, types_SettingsAccessories as SettingsAccessories, types_SettingsAdjustmentsConfiguration as SettingsAdjustmentsConfiguration, types_SettingsGlobalAttributes as SettingsGlobalAttributes, types_SettingsMarketDefaults as SettingsMarketDefaults, types_SettingsPrinters as SettingsPrinters, types_SettingsProductCodes as SettingsProductCodes, types_SettingsTaxRates as SettingsTaxRates, types_ShortCustomerDetails as ShortCustomerDetails, types_SimplePaymentIn as SimplePaymentIn, types_SimplePaymentOut as SimplePaymentOut, types_StoredDataGridConfig as StoredDataGridConfig, types_StudioAppPartial as StudioAppPartial, types_SubtotalGroups as SubtotalGroups, types_SuperType as SuperType, types_SupportedAttributeTypes as SupportedAttributeTypes, types_SupportedCountryCode as SupportedCountryCode, SupportedFileTypesNames$1 as SupportedFileTypesNames, types_TablePosition as TablePosition, types_TaxRate as TaxRate, types_TemplateSaleData as TemplateSaleData, types_UnitOfSale as UnitOfSale, types_VideoTasks as VideoTasks, types_WebhookEvent as WebhookEvent, types_WebhookEventName as WebhookEventName };
1297
1319
  }
1298
1320
 
1299
1321
  interface ListContactsResponse {
@@ -1471,6 +1493,8 @@ interface CreateCustomerPayload {
1471
1493
  accountNumber?: string;
1472
1494
  cphNumber?: string;
1473
1495
  farmName?: string;
1496
+ herdNumber?: string;
1497
+ flockNumber?: string;
1474
1498
  address: {
1475
1499
  company?: string;
1476
1500
  firstName?: string;
@@ -1483,6 +1507,16 @@ interface CreateCustomerPayload {
1483
1507
  country: string;
1484
1508
  };
1485
1509
  marteyeUid?: string;
1510
+ bankDetails?: {
1511
+ sortCode?: string;
1512
+ accountNumber?: string;
1513
+ accountName?: string;
1514
+ };
1515
+ vatNumber?: string;
1516
+ invoiceDeliveryPreference?: string;
1517
+ statementDeliveryPreference?: string;
1518
+ payoutPreference?: string;
1519
+ notes?: string;
1486
1520
  }
1487
1521
  interface FarmAssuranceUpdate {
1488
1522
  number?: string | null;
@@ -1624,6 +1658,23 @@ interface AddExtraPayload {
1624
1658
  passthroughFundsToCustomerId?: string | null;
1625
1659
  }
1626
1660
 
1661
+ interface Member {
1662
+ uid: string;
1663
+ displayName: string | null;
1664
+ role: "Owner" | "Admin" | "Editor";
1665
+ createdAt: string;
1666
+ updatedAt: string;
1667
+ }
1668
+ interface MembersListResponse {
1669
+ data: Member[];
1670
+ lastId: string | null;
1671
+ hasMore: boolean;
1672
+ }
1673
+ interface MembersListParams {
1674
+ limit?: number;
1675
+ lastId?: string;
1676
+ }
1677
+
1627
1678
  interface ActivityListResponse {
1628
1679
  data: ActivityLog[];
1629
1680
  lastId: string | null;
@@ -1647,10 +1698,14 @@ declare function resources(httpClient: HttpClient): {
1647
1698
  get: (marketId: string, activityId: string) => Promise<ActivityLog>;
1648
1699
  };
1649
1700
  markets: {
1650
- get: (marketId: string) => Promise<Market>;
1701
+ get: (marketId: string, options?: ReadOptions) => Promise<Market>;
1702
+ };
1703
+ members: {
1704
+ list: (marketId: string, params?: MembersListParams) => Promise<MembersListResponse>;
1705
+ get: (marketId: string, memberId: string) => Promise<Member>;
1651
1706
  };
1652
1707
  sales: {
1653
- get: (marketId: string, saleId: string) => Promise<Sale>;
1708
+ get: (marketId: string, saleId: string, options?: ReadOptions) => Promise<Sale>;
1654
1709
  list: (marketId: string, opts: {
1655
1710
  start?: string;
1656
1711
  end?: string;
@@ -1720,7 +1775,7 @@ declare function resources(httpClient: HttpClient): {
1720
1775
  }) => Promise<Sale>;
1721
1776
  };
1722
1777
  lots: {
1723
- get: (marketId: string, saleId: string, lotId: string) => Promise<Lot>;
1778
+ get: (marketId: string, saleId: string, lotId: string, options?: ReadOptions) => Promise<Lot>;
1724
1779
  list: (marketId: string, saleId: string, filters?: {
1725
1780
  group?: string;
1726
1781
  productCode?: string;
@@ -1803,13 +1858,15 @@ declare function resources(httpClient: HttpClient): {
1803
1858
  update: (marketId: string, applicationId: string, updateData: UpdateApplicationPayload) => Promise<Application>;
1804
1859
  approve: (marketId: string, applicationId: string, notes?: string) => Promise<Application>;
1805
1860
  reject: (marketId: string, applicationId: string, notes?: string) => Promise<Application>;
1861
+ unlink: (marketId: string, applicationId: string) => Promise<Application>;
1862
+ delete: (marketId: string, applicationId: string) => Promise<void>;
1806
1863
  };
1807
1864
  settings: {
1808
- get: (marketId: string) => Promise<SettingsMarketDefaults>;
1865
+ get: (marketId: string, options?: ReadOptions) => Promise<SettingsMarketDefaults>;
1809
1866
  };
1810
1867
  adjustments: {
1811
1868
  list: (marketId: string) => Promise<AdjustmentsConfiguration[]>;
1812
- get: (marketId: string, id: string) => Promise<AdjustmentsConfiguration>;
1869
+ get: (marketId: string, id: string, options?: ReadOptions) => Promise<AdjustmentsConfiguration>;
1813
1870
  create: (marketId: string, data: Partial<AdjustmentsConfiguration>) => Promise<AdjustmentsConfiguration>;
1814
1871
  update: (marketId: string, id: string, data: Partial<AdjustmentsConfiguration>) => Promise<AdjustmentsConfiguration>;
1815
1872
  };
@@ -1821,7 +1878,7 @@ declare function resources(httpClient: HttpClient): {
1821
1878
  };
1822
1879
  productCodes: {
1823
1880
  list: (marketId: string) => Promise<ProductCodeConfiguration[]>;
1824
- get: (marketId: string, id: string) => Promise<ProductCodeConfiguration>;
1881
+ get: (marketId: string, id: string, options?: ReadOptions) => Promise<ProductCodeConfiguration>;
1825
1882
  create: (marketId: string, data: Partial<ProductCodeConfiguration>) => Promise<ProductCodeConfiguration>;
1826
1883
  update: (marketId: string, id: string, data: Partial<ProductCodeConfiguration>) => Promise<ProductCodeConfiguration>;
1827
1884
  };
@@ -1855,7 +1912,7 @@ declare function resources(httpClient: HttpClient): {
1855
1912
  };
1856
1913
  customers: {
1857
1914
  list: (marketId: string, lastId?: string | null) => Promise<CustomersListResponse>;
1858
- get: (marketId: string, customerId: string) => Promise<Customer>;
1915
+ get: (marketId: string, customerId: string, options?: ReadOptions) => Promise<Customer>;
1859
1916
  avatar: (marketId: string, customerId: string) => Promise<Customer>;
1860
1917
  create: (marketId: string, customerData: CreateCustomerPayload) => Promise<Customer>;
1861
1918
  update: (marketId: string, customerId: string, customerData: UpdateCustomerPayload) => Promise<Customer>;
@@ -1864,7 +1921,7 @@ declare function resources(httpClient: HttpClient): {
1864
1921
  };
1865
1922
  invoices: {
1866
1923
  list: (marketId: string, lastId?: string | null) => Promise<InvoicesListResponse>;
1867
- get: (marketId: string, invoiceId: string) => Promise<Invoice>;
1924
+ get: (marketId: string, invoiceId: string, options?: ReadOptions) => Promise<Invoice>;
1868
1925
  };
1869
1926
  payments: {
1870
1927
  list: (marketId: string, lastId?: string | null) => Promise<PaymentsListResponse>;
@@ -1925,10 +1982,14 @@ declare function Studio(info?: {
1925
1982
  get: (marketId: string, activityId: string) => Promise<ActivityLog>;
1926
1983
  };
1927
1984
  markets: {
1928
- get: (marketId: string) => Promise<Market>;
1985
+ get: (marketId: string, options?: ReadOptions) => Promise<Market>;
1986
+ };
1987
+ members: {
1988
+ list: (marketId: string, params?: MembersListParams) => Promise<MembersListResponse>;
1989
+ get: (marketId: string, memberId: string) => Promise<Member>;
1929
1990
  };
1930
1991
  sales: {
1931
- get: (marketId: string, saleId: string) => Promise<Sale>;
1992
+ get: (marketId: string, saleId: string, options?: ReadOptions) => Promise<Sale>;
1932
1993
  list: (marketId: string, opts: {
1933
1994
  start?: string;
1934
1995
  end?: string;
@@ -1998,7 +2059,7 @@ declare function Studio(info?: {
1998
2059
  }) => Promise<Sale>;
1999
2060
  };
2000
2061
  lots: {
2001
- get: (marketId: string, saleId: string, lotId: string) => Promise<Lot>;
2062
+ get: (marketId: string, saleId: string, lotId: string, options?: ReadOptions) => Promise<Lot>;
2002
2063
  list: (marketId: string, saleId: string, filters?: {
2003
2064
  group?: string;
2004
2065
  productCode?: string;
@@ -2081,13 +2142,15 @@ declare function Studio(info?: {
2081
2142
  update: (marketId: string, applicationId: string, updateData: UpdateApplicationPayload) => Promise<Application>;
2082
2143
  approve: (marketId: string, applicationId: string, notes?: string) => Promise<Application>;
2083
2144
  reject: (marketId: string, applicationId: string, notes?: string) => Promise<Application>;
2145
+ unlink: (marketId: string, applicationId: string) => Promise<Application>;
2146
+ delete: (marketId: string, applicationId: string) => Promise<void>;
2084
2147
  };
2085
2148
  settings: {
2086
- get: (marketId: string) => Promise<SettingsMarketDefaults>;
2149
+ get: (marketId: string, options?: ReadOptions) => Promise<SettingsMarketDefaults>;
2087
2150
  };
2088
2151
  adjustments: {
2089
2152
  list: (marketId: string) => Promise<AdjustmentsConfiguration[]>;
2090
- get: (marketId: string, id: string) => Promise<AdjustmentsConfiguration>;
2153
+ get: (marketId: string, id: string, options?: ReadOptions) => Promise<AdjustmentsConfiguration>;
2091
2154
  create: (marketId: string, data: Partial<AdjustmentsConfiguration>) => Promise<AdjustmentsConfiguration>;
2092
2155
  update: (marketId: string, id: string, data: Partial<AdjustmentsConfiguration>) => Promise<AdjustmentsConfiguration>;
2093
2156
  };
@@ -2099,7 +2162,7 @@ declare function Studio(info?: {
2099
2162
  };
2100
2163
  productCodes: {
2101
2164
  list: (marketId: string) => Promise<ProductCodeConfiguration[]>;
2102
- get: (marketId: string, id: string) => Promise<ProductCodeConfiguration>;
2165
+ get: (marketId: string, id: string, options?: ReadOptions) => Promise<ProductCodeConfiguration>;
2103
2166
  create: (marketId: string, data: Partial<ProductCodeConfiguration>) => Promise<ProductCodeConfiguration>;
2104
2167
  update: (marketId: string, id: string, data: Partial<ProductCodeConfiguration>) => Promise<ProductCodeConfiguration>;
2105
2168
  };
@@ -2133,7 +2196,7 @@ declare function Studio(info?: {
2133
2196
  };
2134
2197
  customers: {
2135
2198
  list: (marketId: string, lastId?: string | null) => Promise<CustomersListResponse>;
2136
- get: (marketId: string, customerId: string) => Promise<Customer>;
2199
+ get: (marketId: string, customerId: string, options?: ReadOptions) => Promise<Customer>;
2137
2200
  avatar: (marketId: string, customerId: string) => Promise<Customer>;
2138
2201
  create: (marketId: string, customerData: CreateCustomerPayload) => Promise<Customer>;
2139
2202
  update: (marketId: string, customerId: string, customerData: UpdateCustomerPayload) => Promise<Customer>;
@@ -2142,7 +2205,7 @@ declare function Studio(info?: {
2142
2205
  };
2143
2206
  invoices: {
2144
2207
  list: (marketId: string, lastId?: string | null) => Promise<InvoicesListResponse>;
2145
- get: (marketId: string, invoiceId: string) => Promise<Invoice>;
2208
+ get: (marketId: string, invoiceId: string, options?: ReadOptions) => Promise<Invoice>;
2146
2209
  };
2147
2210
  payments: {
2148
2211
  list: (marketId: string, lastId?: string | null) => Promise<PaymentsListResponse>;
@@ -2278,6 +2341,56 @@ declare class EarTag {
2278
2341
  toISO24631(): string;
2279
2342
  }
2280
2343
 
2344
+ /**
2345
+ * Parses the bottom barcode on a UK cattle passport.
2346
+ *
2347
+ * The barcode is a 30-character fixed-width positional format:
2348
+ * [0-13] Eartag — 2 alpha country code + 12 char national ID (space-padded for shorter foreign tags)
2349
+ * [14-21] Date of birth — ddMMyyyy
2350
+ * [22] Sex — F or M
2351
+ * [23-27] Breed code — left-justified, space-padded to 5 chars
2352
+ * [28-29] Passport version — 2 digits
2353
+ *
2354
+ * UK animals fill all 12 digits of the national ID. Imported animals (DE, FR, BE, etc.)
2355
+ * have shorter national IDs so the field is right-padded with spaces.
2356
+ *
2357
+ * Examples:
2358
+ * UK12345671004215032023MHER 01 ← UK tag, breed HER
2359
+ * UK98765430018722112022FLIMX 01 ← UK tag, breed LIMX
2360
+ * DE04821 9315614092018FHF 01 ← German import, 10-digit national ID
2361
+ * FR72341 6850203052020FHF 01 ← French import, 10-digit national ID
2362
+ */
2363
+ declare class CattlePassport {
2364
+ static BARCODE_LENGTH: number;
2365
+ private _raw;
2366
+ private _earTag;
2367
+ private _dateOfBirth;
2368
+ private _sex;
2369
+ private _breed;
2370
+ private _passportVersion;
2371
+ private constructor();
2372
+ static parse(code: string): CattlePassport | null;
2373
+ /** The original raw barcode string */
2374
+ get raw(): string;
2375
+ /** The eartag extracted from the barcode, e.g. "UK705946601313" or "DE0359581730" */
2376
+ get earTag(): string;
2377
+ /** Date of birth (UTC) */
2378
+ get dateOfBirth(): Date;
2379
+ /** Male or Female */
2380
+ get sex(): "Male" | "Female";
2381
+ /** Breed code, e.g. "AA", "HF", "LIMX" */
2382
+ get breed(): string;
2383
+ /** Passport version number */
2384
+ get passportVersion(): number;
2385
+ /** 2-letter country code, e.g. "UK", "DE", "FR" */
2386
+ get countryCode(): string;
2387
+ /** Format the eartag via the EarTag class. Falls back to the raw tag string. */
2388
+ get formattedEarTag(): string;
2389
+ /** Date of birth as DD/MM/YYYY */
2390
+ get formattedDateOfBirth(): string;
2391
+ toString(): string;
2392
+ }
2393
+
2281
2394
  declare function lotComparator<T extends {
2282
2395
  lotNumber: string;
2283
2396
  }>(a: T, b: T): number;
@@ -2295,5 +2408,5 @@ declare function sortByLotNumber<T extends {
2295
2408
  */
2296
2409
  declare function nextLotNumber(previousLotNumber: string): string;
2297
2410
 
2298
- export { EarTag, Studio, StudioHeaders, types as StudioTypes, createAppManifest, Studio as default, lotComparator, nextLotNumber, sortByLotNumber };
2411
+ export { CattlePassport, EarTag, Studio, StudioHeaders, types as StudioTypes, createAppManifest, Studio as default, lotComparator, nextLotNumber, sortByLotNumber };
2299
2412
  export type { ChunkedFile, CreateCustomerPayload, FarmAssuranceUpdate, KeeperDetailsUpdate, StudioInstance, StudioManifest, UpdateCustomerPayload };