@marteye/studiojs 1.1.35 → 1.1.37

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/types.d.ts CHANGED
@@ -10,6 +10,7 @@ export type CurrenciesWithGuinea = Currency | "GUINEA-GBP";
10
10
  export type UnitOfSale = "Per KG" | "Per Item" | "Per Lot" | "Per 1000KG";
11
11
  export declare const SupportedUnitsOfSale: UnitOfSale[];
12
12
  export type PaymentMethod = "BACS" | "Cheque" | "BankTransfer" | "Cash" | "Card" | "Credit";
13
+ export type InvoiceDeliveryPreference = "email" | "printed" | "both";
13
14
  export type PayoutMethod = "BACS" | "Cheque" | "Cash";
14
15
  export declare const SupportedPaymentMethods: PaymentMethod[];
15
16
  export interface Market {
@@ -44,6 +45,7 @@ export interface SettingsMarketDefaults {
44
45
  defaultPayoutPreference: PayoutMethod;
45
46
  defaultUnitOfSale: UnitOfSale;
46
47
  defaultSuperType?: SuperType | null;
48
+ defaultSettleDebtsFirst?: boolean;
47
49
  lotDescriptionTemplateMap?: {
48
50
  default: string | undefined;
49
51
  [supertype: string]: string | undefined;
@@ -98,6 +100,10 @@ export interface Printer {
98
100
  */
99
101
  name: string;
100
102
  friendlyName: string;
103
+ /**
104
+ * Optional single IPP URI if linked by IP discovery
105
+ */
106
+ uri?: string;
101
107
  chequePrinter?: boolean;
102
108
  /**
103
109
  * The next cheque number to use when printing a cheque
@@ -195,6 +201,40 @@ export interface Sale {
195
201
  };
196
202
  editedBy?: string[];
197
203
  }
204
+ export interface TemplateSaleData {
205
+ name?: string;
206
+ description?: string | null;
207
+ image?: string | null;
208
+ location?: string | null;
209
+ martEyeSaleType?: "LIVE" | "TIMED" | null;
210
+ cover?: string | null;
211
+ availableProductCodes: string[];
212
+ attributeDefaults?: {
213
+ [attributekey: string]: AttributeValueType;
214
+ };
215
+ marteyeSettings?: MartEyeTimedSaleSettings | MartEyeLiveSaleSettings | null;
216
+ }
217
+ export interface SaleTemplate {
218
+ id: string;
219
+ marketId: string;
220
+ name: string;
221
+ description?: string | null;
222
+ sourceSaleId?: string;
223
+ createdAt: Timestamp;
224
+ updatedAt: Timestamp;
225
+ createdBy: string;
226
+ saleData: TemplateSaleData;
227
+ lotGridConfigs?: {
228
+ [configId: string]: StoredDataGridConfig;
229
+ };
230
+ }
231
+ export interface StoredDataGridConfig {
232
+ widths?: {
233
+ [key: string]: number;
234
+ };
235
+ hiddenColumnIds: string[];
236
+ columnOrder: string[];
237
+ }
198
238
  export interface MartEyeLiveSaleSettings {
199
239
  description?: string;
200
240
  image?: string;
@@ -398,6 +438,11 @@ export interface Product {
398
438
  subtotalGroup?: SubtotalGroups | null | undefined;
399
439
  passThroughFundsToAnotherCustomer?: boolean;
400
440
  isEnabled?: boolean;
441
+ relatedTo?: {
442
+ lotId: string;
443
+ saleId: string;
444
+ } | null;
445
+ obfusicate?: boolean;
401
446
  metadata: {
402
447
  [key: string]: string | number | boolean | Timestamp | Media;
403
448
  };
@@ -464,31 +509,6 @@ export interface ProductCodeConfiguration {
464
509
  export interface ProductConfiguration {
465
510
  [id: string]: Product;
466
511
  }
467
- /***
468
- * A market may offer other products and services. This is a way to track those.
469
- * They simply create a line item on the invoice
470
- */
471
- export interface Product {
472
- id: string;
473
- createdAt: Timestamp;
474
- updatedAt: Timestamp;
475
- marketId: string;
476
- name: string;
477
- taxRateId: string;
478
- defaultUnitPriceInCents: number;
479
- unitPriceIncludesVat?: boolean;
480
- applyToClients: ClientType[];
481
- subtotalGroup?: SubtotalGroups | null | undefined;
482
- passThroughFundsToAnotherCustomer?: boolean;
483
- relatedTo?: {
484
- lotId: string;
485
- saleId: string;
486
- } | null;
487
- obfusicate?: boolean;
488
- metadata: {
489
- [key: string]: string | number | boolean | Timestamp | Media;
490
- };
491
- }
492
512
  export interface Cart {
493
513
  customerId: string;
494
514
  updatedAt: Timestamp;
@@ -531,6 +551,37 @@ export type BankDetails = {
531
551
  accountNumber?: never;
532
552
  sortCode?: never;
533
553
  });
554
+ export type CustomerBankDetails = BankDetails & {
555
+ id?: string;
556
+ createdAt?: Timestamp;
557
+ updatedAt?: Timestamp;
558
+ updatedBy?: string | null;
559
+ };
560
+ export interface CustomerContact {
561
+ id: string;
562
+ createdAt: Timestamp;
563
+ updatedAt: Timestamp;
564
+ updatedBy?: string | null;
565
+ marketId: string;
566
+ displayName: string;
567
+ email?: string | null;
568
+ phoneNumber?: string | null;
569
+ /** @deprecated */
570
+ landlineNumber?: string | null;
571
+ /** @deprecated */
572
+ address?: Address;
573
+ isPrimary?: boolean;
574
+ isActive?: boolean;
575
+ isDeleted?: boolean;
576
+ isVerified?: boolean;
577
+ accountEmails?: boolean;
578
+ marketingEmails?: boolean;
579
+ marteyeUid?: string | null;
580
+ notes?: string | null;
581
+ metadata?: {
582
+ [key: string]: string | number | boolean | Timestamp | Media;
583
+ };
584
+ }
534
585
  /**
535
586
  * Used to store the bank details for a market
536
587
  */
@@ -556,19 +607,25 @@ export interface Customer {
556
607
  isMarketAccount?: boolean;
557
608
  accountNumber?: string;
558
609
  bidderNumber?: number | null;
610
+ displayName?: string | null;
559
611
  firstName?: string | null;
560
612
  lastName?: string | null;
561
613
  tradingName?: string | null;
562
614
  email?: EmailWrapper;
563
615
  phoneNumber?: PhoneNumberWrapper;
616
+ /** @deprecated */
564
617
  otherPhoneNumbers?: PhoneNumberWrapper[];
565
618
  address: AddressWrapper;
619
+ /** @deprecated */
566
620
  otherAddresses: {
567
621
  [addressId: string]: AddressWrapper;
568
622
  };
569
623
  photoURL?: string | null;
570
624
  payoutPreference?: PayoutMethod;
571
- bankDetails?: BankDetails;
625
+ invoiceDeliveryPreference?: InvoiceDeliveryPreference;
626
+ statementDeliveryPreference?: InvoiceDeliveryPreference;
627
+ bankDetails?: CustomerBankDetails | CustomerBankDetails[] | null;
628
+ contacts?: CustomerContact[];
572
629
  attributeDefaultsBuyer?: {
573
630
  [attributekey: string]: AttributeValueType[];
574
631
  };
@@ -585,6 +642,8 @@ export interface Customer {
585
642
  hasPurchasedItems?: boolean;
586
643
  hasSoldItems?: boolean;
587
644
  notes?: string;
645
+ status?: "archived" | "deleted" | null;
646
+ deleteAfter?: Timestamp;
588
647
  }
589
648
  export interface CustomerFromSearch extends Omit<Customer, "createdAt" | "updatedAt" | "lastItemPurchaseDate" | "lastItemSaleDate"> {
590
649
  createdAt: number;
@@ -756,6 +815,10 @@ export interface Payment {
756
815
  voidedBy?: string | null;
757
816
  voidReason?: string | null;
758
817
  invoiceIds: string[];
818
+ invoices?: Array<{
819
+ id: string;
820
+ amountAppliedInCents?: number;
821
+ }>;
759
822
  transactionIds: string[];
760
823
  }
761
824
  export interface Payout {
@@ -767,6 +830,10 @@ export interface Payout {
767
830
  customerId: string;
768
831
  method: PayoutMethod | "Credit";
769
832
  amountInCents: number;
833
+ invoices?: Array<{
834
+ id: string;
835
+ amountAppliedInCents?: number;
836
+ }>;
770
837
  accountName?: string;
771
838
  accountNumber?: string;
772
839
  sortCode?: string;
@@ -1022,4 +1089,21 @@ export type AppParameterConfig = {
1022
1089
  required?: boolean;
1023
1090
  defaultValue?: string | number | boolean | string[];
1024
1091
  };
1092
+ export interface CphLookupResponse {
1093
+ cph: string;
1094
+ county: string;
1095
+ parish: string;
1096
+ holding: string;
1097
+ subLocation?: string;
1098
+ country: string;
1099
+ region: string | null;
1100
+ spatialUnit: string | null;
1101
+ office: string | null;
1102
+ ahdoNumber: string | null;
1103
+ parishName: string;
1104
+ tbTestingInterval: string | null;
1105
+ tbArea: string | null;
1106
+ cphValid?: boolean | null;
1107
+ farmName?: string | null;
1108
+ }
1025
1109
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marteye/studiojs",
3
- "version": "1.1.35",
3
+ "version": "1.1.37",
4
4
  "description": "MartEye Studio JavaScript SDK",
5
5
  "license": "MIT",
6
6
  "source": "src/index.ts",