@marteye/studiojs 1.1.24 → 1.1.26

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
@@ -1,107 +1,5 @@
1
1
  import { z } from 'zod';
2
2
 
3
- declare const videoTaskSchema: z.ZodEnum<["compressed", "thumbnail"]>;
4
- declare const imageSizeSchema: z.ZodEnum<["small", "medium", "large"]>;
5
- type ImageSize = z.infer<typeof imageSizeSchema>;
6
- type VideoTask = z.infer<typeof videoTaskSchema>;
7
- type SupportedFileTypesNames$1 = "image" | "video" | "file";
8
- type VariantProcessingState = {
9
- fileName: string;
10
- thumbHash: string;
11
- path: string;
12
- url: string;
13
- fileType: string;
14
- variants: Partial<Record<ImageSize | VideoTask, {
15
- url: string;
16
- isProcessing: boolean;
17
- type: SupportedFileTypesNames$1;
18
- }>>;
19
- };
20
- /**
21
- |--------------------------------------------------
22
- | END OF MEDIA CRATE CODE
23
- |--------------------------------------------------
24
- */
25
- type MediaFinishUploadResponse = {
26
- message: string;
27
- mediaType: string;
28
- process: VariantProcessingState;
29
- };
30
- type MediaUploadOptions = {
31
- marketId: string;
32
- saleId: string;
33
- lotId: string;
34
- attributeId: string;
35
- options?: {
36
- bucket?: "raw";
37
- parallelParts?: number;
38
- baseUrl?: string;
39
- progressCallback?: (progress: {
40
- /**
41
- * The state of the upload
42
- */
43
- state: "uploading" | "finished" | "failed" | "starting";
44
- /**
45
- * The progress of the upload
46
- */
47
- progress: number;
48
- /**
49
- * The current part number
50
- */
51
- currentPart?: number;
52
- /**
53
- * The total parts
54
- */
55
- totalParts?: number;
56
- }) => void;
57
- };
58
- };
59
- type ChunkedFile = {
60
- partNumber: string;
61
- chunk: string;
62
- fileExtension: string;
63
- fileMimeType: string;
64
- };
65
- type FileInput = {
66
- file: File;
67
- uploadConfig: MediaUploadOptions;
68
- };
69
- type ChunkedInput = {
70
- fileName: string;
71
- chunks: ChunkedFile[];
72
- uploadConfig: MediaUploadOptions;
73
- };
74
- /**
75
- * Handles the complete file upload process including chunking and progress tracking -
76
- * WEB: Pass in a file and we will chunk it and upload it in parallel
77
- * NATIVE: You need to chunk the file yourself.
78
- * @param {FileInput | ChunkedInput} input - Either {file, options} or {fileName, chunks, options}
79
- * @returns {Promise<MediaFinishUploadResponse>}
80
- * @throws {Error} When upload fails
81
- */
82
- declare const uploadFile: (input: FileInput | ChunkedInput, token: string) => Promise<MediaFinishUploadResponse>;
83
-
84
- declare function SimpleHttpClient(baseUrl: string, apiKey: string, fetch: any, defaultTimeout: number, debug?: boolean): {
85
- get: <T>(path: string, queryParams?: any) => Promise<T>;
86
- post: <T>(path: string, body: any) => Promise<T>;
87
- delete: <T>(path: string) => Promise<T>;
88
- };
89
- type HttpClient = ReturnType<typeof SimpleHttpClient>;
90
-
91
- /**
92
- * Search result interface based on the API implementation
93
- */
94
- interface SearchResult {
95
- hits: Array<{
96
- id: string;
97
- marketId: string;
98
- title: string;
99
- [key: string]: any;
100
- }>;
101
- processingTimeMs: number;
102
- query: string;
103
- }
104
-
105
3
  type Timestamp = string;
106
4
  type ClientType = "Seller" | "Buyer";
107
5
  type SuperType = "Sheep" | "Goats" | "Cattle" | "Pigs" | "Horses" | "Deer" | "Poultry" | "Machinery" | "Antiques" | "Other";
@@ -547,6 +445,7 @@ interface Product {
547
445
  };
548
446
  }
549
447
  interface Cart {
448
+ customerId: string;
550
449
  updatedAt: Timestamp;
551
450
  itemsById: {
552
451
  [itemId: string]: CartItem;
@@ -648,6 +547,31 @@ interface CustomerFromSearch extends Omit<Customer, "createdAt" | "updatedAt" |
648
547
  lastItemPurchaseDate?: number;
649
548
  lastItemSaleDate?: number;
650
549
  }
550
+ interface Application {
551
+ id: string;
552
+ createdAt: Timestamp;
553
+ updatedAt: Timestamp;
554
+ marketId: string;
555
+ status: "pending" | "approved" | "rejected";
556
+ displayName: string;
557
+ phoneNumber?: string;
558
+ email?: string;
559
+ address: {
560
+ firstLine: string;
561
+ secondLine?: string;
562
+ county?: string;
563
+ postCode: string;
564
+ };
565
+ dateOfMarteyeAccountCreation?: Timestamp;
566
+ hasWonLotsOnMarteye?: boolean;
567
+ isApprovedAtOtherMarkets?: boolean;
568
+ marteyeUid: string;
569
+ notes?: string;
570
+ approvedBy?: string;
571
+ rejectedBy?: string;
572
+ approvedAt?: Timestamp;
573
+ rejectedAt?: Timestamp;
574
+ }
651
575
  interface Address {
652
576
  id: string;
653
577
  nickname?: string;
@@ -665,7 +589,7 @@ declare const IMAGE_SIZES_VALUES: readonly ["small", "medium", "large"];
665
589
  declare const VIDEO_TASKS_VALUES: readonly ["compressed", "thumbnail"];
666
590
  type ImageSizes = (typeof IMAGE_SIZES_VALUES)[number];
667
591
  type VideoTasks = (typeof VIDEO_TASKS_VALUES)[number];
668
- type SupportedFileTypesNames = "image" | "video" | "file";
592
+ type SupportedFileTypesNames$1 = "image" | "video" | "file";
669
593
  interface Media {
670
594
  id: string;
671
595
  fileName: string;
@@ -676,7 +600,7 @@ interface Media {
676
600
  url: string;
677
601
  isLocal?: boolean;
678
602
  isProcessing: boolean;
679
- type: SupportedFileTypesNames;
603
+ type: SupportedFileTypesNames$1;
680
604
  }>>;
681
605
  }
682
606
  type MarketReportHeaders = "grossServices" | "vatOnServices" | "grossGoods" | "vatOnGoods" | "netTotal" | "contra";
@@ -739,6 +663,14 @@ interface Adjustment {
739
663
  ceilingInCents?: number;
740
664
  } | null;
741
665
  fixedAmountInCents?: number | null;
666
+ ladder?: {
667
+ steps: {
668
+ percentageValue?: number;
669
+ upToAmountInCents?: number | null;
670
+ }[];
671
+ floorInCents?: number;
672
+ ceilingInCents?: number;
673
+ };
742
674
  }
743
675
  interface LineItemAdjustmentConfiguration extends AdjustmentsConfiguration {
744
676
  adjustment: Adjustment & {
@@ -902,6 +834,7 @@ interface Invoice extends Omit<Omit<Omit<Omit<DraftInvoice, "ledgerAccountTotals
902
834
  sales: {
903
835
  id: string;
904
836
  name?: string;
837
+ startsAt?: Timestamp;
905
838
  }[];
906
839
  transactionIds?: string[];
907
840
  status: "draft" | "issued" | "void" | "imported" | "paid";
@@ -927,6 +860,11 @@ interface Invoice extends Omit<Omit<Omit<Omit<DraftInvoice, "ledgerAccountTotals
927
860
  */
928
861
  internalNextInvoiceId: string | null;
929
862
  emailNotifications?: string[];
863
+ emailStatus?: {
864
+ recipient: string;
865
+ status: "sent" | "delivered" | "opened" | "bounced";
866
+ timestamp: Timestamp;
867
+ }[];
930
868
  pitchPayLink: string | null;
931
869
  }
932
870
  /**
@@ -1067,6 +1005,7 @@ type types_AdjustmentTarget = AdjustmentTarget;
1067
1005
  type types_AdjustmentTotalTarget = AdjustmentTotalTarget;
1068
1006
  type types_AdjustmentsConfiguration = AdjustmentsConfiguration;
1069
1007
  type types_AppParameterConfig = AppParameterConfig;
1008
+ type types_Application = Application;
1070
1009
  type types_AttributeDefinition = AttributeDefinition;
1071
1010
  type types_AttributeValueType = AttributeValueType;
1072
1011
  type types_BankDetails = BankDetails;
@@ -1135,7 +1074,6 @@ type types_SuperType = SuperType;
1135
1074
  type types_SupportedAttributeTypes = SupportedAttributeTypes;
1136
1075
  type types_SupportedCountryCode = SupportedCountryCode;
1137
1076
  declare const types_SupportedCurrencyCodes: typeof SupportedCurrencyCodes;
1138
- type types_SupportedFileTypesNames = SupportedFileTypesNames;
1139
1077
  declare const types_SupportedPaymentMethods: typeof SupportedPaymentMethods;
1140
1078
  declare const types_SupportedSuperTypes: typeof SupportedSuperTypes;
1141
1079
  declare const types_SupportedUnitsOfSale: typeof SupportedUnitsOfSale;
@@ -1149,7 +1087,122 @@ type types_WebhookEventName = WebhookEventName;
1149
1087
  declare const types_supportedWebhookEvents: typeof supportedWebhookEvents;
1150
1088
  declare namespace types {
1151
1089
  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 };
1152
- export type { types_Accessory as Accessory, 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_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_CurrenciesWithGuinea as CurrenciesWithGuinea, types_Currency as Currency, types_Customer as Customer, types_CustomerFromSearch as CustomerFromSearch, types_DeviceType as DeviceType, 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_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_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_StudioAppPartial as StudioAppPartial, types_SubtotalGroups as SubtotalGroups, types_SuperType as SuperType, types_SupportedAttributeTypes as SupportedAttributeTypes, types_SupportedCountryCode as SupportedCountryCode, types_SupportedFileTypesNames as SupportedFileTypesNames, types_TablePosition as TablePosition, types_TaxRate as TaxRate, types_UnitOfSale as UnitOfSale, types_VideoTasks as VideoTasks, types_WebhookEvent as WebhookEvent, types_WebhookEventName as WebhookEventName };
1090
+ export type { types_Accessory as Accessory, 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_CurrenciesWithGuinea as CurrenciesWithGuinea, types_Currency as Currency, types_Customer as Customer, types_CustomerFromSearch as CustomerFromSearch, types_DeviceType as DeviceType, 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_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_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_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_UnitOfSale as UnitOfSale, types_VideoTasks as VideoTasks, types_WebhookEvent as WebhookEvent, types_WebhookEventName as WebhookEventName };
1091
+ }
1092
+
1093
+ declare const videoTaskSchema: z.ZodEnum<["compressed", "thumbnail"]>;
1094
+ declare const imageSizeSchema: z.ZodEnum<["thumbnail", "small", "medium", "large"]>;
1095
+ type ImageSize = z.infer<typeof imageSizeSchema>;
1096
+ type VideoTask = z.infer<typeof videoTaskSchema>;
1097
+ type SupportedFileTypesNames = "image" | "video" | "file";
1098
+ type VariantProcessingState = {
1099
+ fileName: string;
1100
+ thumbHash: string;
1101
+ path: string;
1102
+ url: string;
1103
+ fileType: string;
1104
+ variants: Partial<Record<ImageSize | VideoTask, {
1105
+ url: string;
1106
+ isProcessing: boolean;
1107
+ type: SupportedFileTypesNames;
1108
+ }>>;
1109
+ };
1110
+ /**
1111
+ |--------------------------------------------------
1112
+ | END OF MEDIA CRATE CODE
1113
+ |--------------------------------------------------
1114
+ */
1115
+ type MediaFinishUploadResponse = {
1116
+ message: string;
1117
+ mediaType: string;
1118
+ process: VariantProcessingState;
1119
+ };
1120
+ type MediaUploadOptions = {
1121
+ marketId: string;
1122
+ saleId: string;
1123
+ lotId: string;
1124
+ attributeId: string;
1125
+ options?: {
1126
+ bucket?: "raw";
1127
+ parallelParts?: number;
1128
+ baseUrl?: string;
1129
+ progressCallback?: (progress: {
1130
+ /**
1131
+ * The state of the upload
1132
+ */
1133
+ state: "uploading" | "finished" | "failed" | "starting";
1134
+ /**
1135
+ * The progress of the upload
1136
+ */
1137
+ progress: number;
1138
+ /**
1139
+ * The current part number
1140
+ */
1141
+ currentPart?: number;
1142
+ /**
1143
+ * The total parts
1144
+ */
1145
+ totalParts?: number;
1146
+ }) => void;
1147
+ };
1148
+ };
1149
+ type ChunkedFile = {
1150
+ partNumber: string;
1151
+ chunk: string;
1152
+ fileExtension: string;
1153
+ fileMimeType: string;
1154
+ };
1155
+ type FileInput = {
1156
+ file: File;
1157
+ uploadConfig: MediaUploadOptions;
1158
+ };
1159
+ type ChunkedInput = {
1160
+ fileName: string;
1161
+ chunks: ChunkedFile[];
1162
+ uploadConfig: MediaUploadOptions;
1163
+ };
1164
+ /**
1165
+ * Handles the complete file upload process including chunking and progress tracking -
1166
+ * WEB: Pass in a file and we will chunk it and upload it in parallel
1167
+ * NATIVE: You need to chunk the file yourself.
1168
+ * @param {FileInput | ChunkedInput} input - Either {file, options} or {fileName, chunks, options}
1169
+ * @returns {Promise<MediaFinishUploadResponse>}
1170
+ * @throws {Error} When upload fails
1171
+ */
1172
+ declare const uploadMultipartFile: (input: FileInput | ChunkedInput, token: string) => Promise<MediaFinishUploadResponse>;
1173
+ type SingleFileInput = {
1174
+ file?: File;
1175
+ filePath?: never;
1176
+ uploadConfig: MediaUploadOptions;
1177
+ } | {
1178
+ filePath?: string;
1179
+ file?: never;
1180
+ uploadConfig: MediaUploadOptions;
1181
+ };
1182
+ declare const uploadSingleFile: (input: SingleFileInput, token: string) => Promise<{
1183
+ message: string;
1184
+ data: Media;
1185
+ }>;
1186
+
1187
+ declare function SimpleHttpClient(baseUrl: string, apiKey: string, fetch: any, defaultTimeout: number, debug?: boolean): {
1188
+ get: <T>(path: string, queryParams?: any) => Promise<T>;
1189
+ post: <T>(path: string, body: any) => Promise<T>;
1190
+ delete: <T>(path: string) => Promise<T>;
1191
+ };
1192
+ type HttpClient = ReturnType<typeof SimpleHttpClient>;
1193
+
1194
+ /**
1195
+ * Search result interface based on the API implementation
1196
+ */
1197
+ interface SearchResult {
1198
+ hits: Array<{
1199
+ id: string;
1200
+ marketId: string;
1201
+ title: string;
1202
+ [key: string]: any;
1203
+ }>;
1204
+ processingTimeMs: number;
1205
+ query: string;
1153
1206
  }
1154
1207
 
1155
1208
  interface CreateCustomerPayload {
@@ -1174,6 +1227,44 @@ interface CreateCustomerPayload {
1174
1227
  marteyeUid?: string;
1175
1228
  }
1176
1229
 
1230
+ interface CreateApplicationPayload {
1231
+ displayName: string;
1232
+ phoneNumber?: string;
1233
+ email?: string;
1234
+ address: {
1235
+ firstLine: string;
1236
+ secondLine?: string;
1237
+ county?: string;
1238
+ postCode: string;
1239
+ };
1240
+ dateOfMarteyeAccountCreation?: string;
1241
+ hasWonLotsOnMarteye?: boolean;
1242
+ isApprovedAtOtherMarkets?: boolean;
1243
+ marteyeUid: string;
1244
+ notes?: string;
1245
+ }
1246
+ interface UpdateApplicationPayload {
1247
+ displayName?: string;
1248
+ phoneNumber?: string;
1249
+ email?: string;
1250
+ address?: {
1251
+ firstLine?: string;
1252
+ secondLine?: string;
1253
+ county?: string;
1254
+ postCode?: string;
1255
+ };
1256
+ notes?: string;
1257
+ }
1258
+ interface ListApplicationsOptions {
1259
+ lastId?: string;
1260
+ status?: "pending" | "approved" | "rejected";
1261
+ }
1262
+ interface ListApplicationsResponse {
1263
+ applications: Application[];
1264
+ lastId: string | null;
1265
+ hasMore: boolean;
1266
+ }
1267
+
1177
1268
  declare function resources(httpClient: HttpClient): {
1178
1269
  markets: {
1179
1270
  get: (marketId: string) => Promise<Market>;
@@ -1283,6 +1374,7 @@ declare function resources(httpClient: HttpClient): {
1283
1374
  endAt?: string | null;
1284
1375
  saleStatus?: LotSaleStatus;
1285
1376
  metadata?: Record<string, any>;
1377
+ inputAccessories?: Record<string, any>;
1286
1378
  }) => Promise<Lot>;
1287
1379
  delete: (marketId: string, saleId: string, lotId: string) => Promise<unknown>;
1288
1380
  };
@@ -1307,6 +1399,14 @@ declare function resources(httpClient: HttpClient): {
1307
1399
  actions: {
1308
1400
  constructAction: (bodyAsBuffer: Buffer, signature: string, endpointSecret: string) => Promise<any>;
1309
1401
  };
1402
+ applications: {
1403
+ list: (marketId: string, options?: ListApplicationsOptions) => Promise<ListApplicationsResponse>;
1404
+ get: (marketId: string, applicationId: string) => Promise<Application>;
1405
+ create: (marketId: string, applicationData: CreateApplicationPayload) => Promise<Application>;
1406
+ update: (marketId: string, applicationId: string, updateData: UpdateApplicationPayload) => Promise<Application>;
1407
+ approve: (marketId: string, applicationId: string, notes?: string) => Promise<Application>;
1408
+ reject: (marketId: string, applicationId: string, notes?: string) => Promise<Application>;
1409
+ };
1310
1410
  settings: {
1311
1411
  get: (marketId: string) => Promise<SettingsMarketDefaults>;
1312
1412
  };
@@ -1333,7 +1433,11 @@ declare function resources(httpClient: HttpClient): {
1333
1433
  query: (marketId: string, query: string) => Promise<SearchResult>;
1334
1434
  };
1335
1435
  files: {
1336
- uploadFile: (input: Parameters<typeof uploadFile>[0], token: string) => Promise<{
1436
+ uploadSingleFile: (input: Parameters<typeof uploadSingleFile>[0], token: string) => Promise<{
1437
+ message: string;
1438
+ data: Media;
1439
+ }>;
1440
+ uploadMultipartFile: (input: Parameters<typeof uploadMultipartFile>[0], token: string) => Promise<{
1337
1441
  message: string;
1338
1442
  mediaType: string;
1339
1443
  process: VariantProcessingState;
@@ -1462,6 +1566,7 @@ declare function Studio(info?: {
1462
1566
  endAt?: string | null;
1463
1567
  saleStatus?: LotSaleStatus;
1464
1568
  metadata?: Record<string, any>;
1569
+ inputAccessories?: Record<string, any>;
1465
1570
  }) => Promise<Lot>;
1466
1571
  delete: (marketId: string, saleId: string, lotId: string) => Promise<unknown>;
1467
1572
  };
@@ -1486,6 +1591,14 @@ declare function Studio(info?: {
1486
1591
  actions: {
1487
1592
  constructAction: (bodyAsBuffer: Buffer, signature: string, endpointSecret: string) => Promise<any>;
1488
1593
  };
1594
+ applications: {
1595
+ list: (marketId: string, options?: ListApplicationsOptions) => Promise<ListApplicationsResponse>;
1596
+ get: (marketId: string, applicationId: string) => Promise<Application>;
1597
+ create: (marketId: string, applicationData: CreateApplicationPayload) => Promise<Application>;
1598
+ update: (marketId: string, applicationId: string, updateData: UpdateApplicationPayload) => Promise<Application>;
1599
+ approve: (marketId: string, applicationId: string, notes?: string) => Promise<Application>;
1600
+ reject: (marketId: string, applicationId: string, notes?: string) => Promise<Application>;
1601
+ };
1489
1602
  settings: {
1490
1603
  get: (marketId: string) => Promise<SettingsMarketDefaults>;
1491
1604
  };
@@ -1512,7 +1625,11 @@ declare function Studio(info?: {
1512
1625
  query: (marketId: string, query: string) => Promise<SearchResult>;
1513
1626
  };
1514
1627
  files: {
1515
- uploadFile: (input: Parameters<typeof uploadFile>[0], token: string) => Promise<{
1628
+ uploadSingleFile: (input: Parameters<typeof uploadSingleFile>[0], token: string) => Promise<{
1629
+ message: string;
1630
+ data: Media;
1631
+ }>;
1632
+ uploadMultipartFile: (input: Parameters<typeof uploadMultipartFile>[0], token: string) => Promise<{
1516
1633
  message: string;
1517
1634
  mediaType: string;
1518
1635
  process: VariantProcessingState;
@@ -1587,5 +1704,42 @@ declare function createAppManifest(appConfig: {
1587
1704
  readonly manifest: StudioManifest;
1588
1705
  };
1589
1706
 
1590
- export { Studio, StudioHeaders, types as StudioTypes, createAppManifest, Studio as default };
1707
+ type CountryCode = keyof typeof EarTag.countryCodes;
1708
+ declare class EarTag {
1709
+ static regexISO24631: RegExp;
1710
+ static countryCodes: {
1711
+ [key: string]: string;
1712
+ };
1713
+ static get countryCodesByNumber(): {
1714
+ [code: string]: CountryCode;
1715
+ };
1716
+ private normalisedCountryCode;
1717
+ private _raw;
1718
+ get raw(): string;
1719
+ private _isEartag;
1720
+ isEartag(): boolean;
1721
+ private _isoCountryCode?;
1722
+ get isoCountryCode(): string | undefined;
1723
+ private _nationalIdentifier?;
1724
+ get nationalIdentifier(): string | undefined;
1725
+ constructor(input: string, fallbackCountryCode?: CountryCode | string | null);
1726
+ static parse(str: string, fallbackCountryCode?: CountryCode | string | null): EarTag;
1727
+ static format(str: string, marketCountry?: string | null | undefined): string | null;
1728
+ toString(): string;
1729
+ isISO24631(): boolean;
1730
+ toISO24631(): string;
1731
+ }
1732
+
1733
+ declare function lotComparator<T extends {
1734
+ lotNumber: string;
1735
+ }>(a: T, b: T): number;
1736
+ declare function sortByLotNumber<T extends {
1737
+ lotNumber: string;
1738
+ }>(lots: T[]): T[];
1739
+ /***
1740
+ * Generate the next lot number in a sequence:
1741
+ */
1742
+ declare function nextLotNumber(previousLotNumber: string): string;
1743
+
1744
+ export { EarTag, Studio, StudioHeaders, types as StudioTypes, createAppManifest, Studio as default, lotComparator, nextLotNumber, sortByLotNumber };
1591
1745
  export type { ChunkedFile, StudioInstance, StudioManifest };