@marteye/studiojs 1.1.47-beta.0 → 1.1.48-beta.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
@@ -1,52 +1,153 @@
1
- # MartEye Studio JavaScript SDK (@marteye/studiojs)
1
+ # MartEye Studio JavaScript SDK (`@marteye/studiojs`)
2
2
 
3
- This library is a JavaScript SDK that allows you to easily integrate with MartEye Studio's API. It provides methods to interact with various resources, manage data, and leverage the powerful features offered by MartEye Studio.
3
+ JavaScript/TypeScript SDK for the MartEye Studio API.
4
4
 
5
5
  ## Installation
6
6
 
7
- You can install the library using npm or yarn:
8
-
9
- Using npm:
10
-
11
7
  ```bash
12
8
  npm install @marteye/studiojs
13
9
  ```
14
10
 
15
- Using yarn:
11
+ For the beta release channel:
16
12
 
17
13
  ```bash
18
- yarn add @marteye/studiojs
14
+ npm install @marteye/studiojs@beta
19
15
  ```
20
16
 
21
- ## Usage
17
+ ## Create a client
18
+
19
+ ```ts
20
+ import Studio from "@marteye/studiojs";
22
21
 
23
- ### Importing the Library
22
+ const studio = Studio({
23
+ apiKey: process.env.STUDIO_API_KEY!,
24
+ baseUrl: "https://app.marteyestudio.com/api", // optional
25
+ defaultTimeout: 30000, // optional
26
+ debug: false, // optional
27
+ });
28
+ ```
24
29
 
25
- Using ES Modules:
30
+ ## Basic usage
26
31
 
27
- ```javascript
28
- import StudioJS from "@marteye/studiojs";
32
+ ```ts
33
+ const market = await studio.markets.get("greenfields");
34
+ console.log(market.name);
35
+
36
+ const sales = await studio.sales.list("greenfields", {
37
+ start: "2026-01-01",
38
+ end: "2026-12-31",
39
+ });
40
+
41
+ console.log(sales.sales.length);
29
42
  ```
30
43
 
31
- Or using CommonJS:
44
+ ## Messaging
45
+
46
+ StudioJS now exposes a single messaging interface:
32
47
 
33
- ```javascript
34
- let StudioJS = require("@marteye/studiojs");
48
+ - `studio.broadcast.send(...)`
49
+ - `studio.broadcast.get(...)`
50
+
51
+ Messaging is unified by:
52
+
53
+ - `type`: `"sms" | "email"`
54
+ - `kind`: `"broadcast" | "statement"`
55
+
56
+ ### Send an SMS broadcast
57
+
58
+ ```ts
59
+ await studio.broadcast.send("greenfields", {
60
+ type: "sms",
61
+ kind: "broadcast",
62
+ message: "Sale starts at 7pm",
63
+ recipients: [
64
+ {
65
+ customerId: "customer-1",
66
+ phoneNumbers: ["+447911123456"],
67
+ },
68
+ ],
69
+ });
35
70
  ```
36
71
 
37
- ### Initializing the SDK
72
+ ### Send a statement email
73
+
74
+ ```ts
75
+ await studio.broadcast.send("greenfields", {
76
+ type: "email",
77
+ kind: "statement",
78
+ message: "Dear {{customerName}}, your balance is {{balance}}.",
79
+ recipients: [
80
+ {
81
+ customerId: "customer-1",
82
+ emails: ["buyer@example.com"],
83
+ },
84
+ ],
85
+ });
86
+ ```
38
87
 
39
- Before using the library, initialize it with your API key. For more information on obtaining an API key, please contact your MartEye representative.
88
+ ### Get task status
89
+
90
+ ```ts
91
+ const task = await studio.broadcast.get("greenfields", "sms", "task-id");
92
+ console.log(task.status);
93
+ ```
40
94
 
41
- ```javascript
42
- let studioClient = StudioJS.init({
43
- apiKey: "YOUR_API_KEY_HERE",
95
+ ## Migration note
96
+
97
+ `studio.sms` has been removed in favour of `studio.broadcast`.
98
+
99
+ ### Before
100
+
101
+ ```ts
102
+ await studio.sms.sendSMS(marketId, payload);
103
+ await studio.sms.getSMS(marketId, smsId);
104
+ ```
105
+
106
+ ### After
107
+
108
+ ```ts
109
+ await studio.broadcast.send(marketId, {
110
+ type: "sms",
111
+ kind: "broadcast",
112
+ message: "Hello",
113
+ recipients: [{ customerId: "c1", phoneNumbers: ["+447911123456"] }],
44
114
  });
115
+
116
+ await studio.broadcast.get(marketId, "sms", taskId);
45
117
  ```
46
118
 
47
- ## Contributing
119
+ ## Reports
120
+
121
+ Debt reporting is exposed under `studio.reports`.
122
+
123
+ ```ts
124
+ const overview = await studio.reports.getDebtOperationalOverview(
125
+ "greenfields",
126
+ {
127
+ comparisonDays: 7,
128
+ }
129
+ );
130
+
131
+ const behavior = await studio.reports.getDebtBehavior("greenfields", {
132
+ comparisonDays: 7,
133
+ });
134
+
135
+ const product = await studio.reports.getDebtProduct("greenfields", {
136
+ limit: 500,
137
+ });
138
+ ```
139
+
140
+ These debt report endpoints are restricted to **Mart Owners and Admins**.
141
+
142
+ ## Types
143
+
144
+ Relevant exported types include:
48
145
 
49
- Contributions are welcome! Please open an issue or submit a pull request if you have suggestions or improvements.
146
+ - `BroadcastPayload`
147
+ - `BroadcastSendResponse`
148
+ - `BroadcastTask`
149
+ - `SMSTask`
150
+ - `EmailTask`
50
151
 
51
152
  ## License
52
153
 
package/dist/index.d.ts CHANGED
@@ -99,6 +99,7 @@ interface SettingsMarketDefaults {
99
99
  defaultUnitOfSale: UnitOfSale;
100
100
  defaultSuperType?: SuperType | null;
101
101
  defaultSettleDebtsFirst?: boolean;
102
+ showInvoiceAveragesAndStats?: boolean;
102
103
  liveEmailsEnabled?: boolean;
103
104
  lotDescriptionTemplateMap?: {
104
105
  default: string | undefined;
@@ -240,6 +241,7 @@ interface Sale {
240
241
  */
241
242
  publishStatus?: SalePublishStatus;
242
243
  enableLuckMoney?: boolean;
244
+ enableLotGrouping?: boolean;
243
245
  }
244
246
  interface TemplateSaleData {
245
247
  name?: string;
@@ -254,6 +256,7 @@ interface TemplateSaleData {
254
256
  };
255
257
  marteyeSettings?: MartEyeTimedSaleSettings | MartEyeLiveSaleSettings | null;
256
258
  enableLuckMoney?: boolean;
259
+ enableLotGrouping?: boolean;
257
260
  }
258
261
  interface SaleTemplate {
259
262
  id: string;
@@ -1249,12 +1252,55 @@ interface SendSMSPayload {
1249
1252
  reference?: string;
1250
1253
  senderName?: string;
1251
1254
  }
1255
+ type BroadcastType = "sms" | "email";
1256
+ type BroadcastKind = "broadcast" | "statement";
1257
+ interface BroadcastRecipient {
1258
+ customerId: string;
1259
+ displayName?: string;
1260
+ accountNumber?: string;
1261
+ phoneNumbers?: string[];
1262
+ emails?: string[];
1263
+ }
1264
+ interface SMSBroadcastPayload {
1265
+ type: "sms";
1266
+ kind?: BroadcastKind;
1267
+ message?: string;
1268
+ senderName?: string;
1269
+ recipients: BroadcastRecipient[];
1270
+ }
1271
+ interface EmailBroadcastPayload {
1272
+ type: "email";
1273
+ kind?: BroadcastKind;
1274
+ message?: string;
1275
+ subject?: string;
1276
+ subdomain?: string;
1277
+ recipients: BroadcastRecipient[];
1278
+ }
1279
+ type BroadcastPayload = SMSBroadcastPayload | EmailBroadcastPayload;
1280
+ interface BroadcastSendResultItem {
1281
+ customerId: string;
1282
+ taskId?: string;
1283
+ status: "queued" | "skipped" | "failed";
1284
+ recipientCount: number;
1285
+ reason?: string;
1286
+ }
1287
+ interface BroadcastSendResponse {
1288
+ success: boolean;
1289
+ type: BroadcastType;
1290
+ kind: BroadcastKind;
1291
+ broadcastId: string;
1292
+ sent: number;
1293
+ skipped: number;
1294
+ results: BroadcastSendResultItem[];
1295
+ }
1252
1296
  interface SMSTask {
1253
1297
  id: string;
1254
1298
  marketId: string;
1299
+ broadcastId?: string;
1255
1300
  to: string[];
1256
1301
  message: string;
1257
1302
  customerId?: string;
1303
+ accountNumber?: string;
1258
1304
  reference?: string;
1259
1305
  senderName?: string;
1260
1306
  metadata?: Record<string, any>;
@@ -1277,6 +1323,145 @@ interface SMSTask {
1277
1323
  };
1278
1324
  };
1279
1325
  }
1326
+ interface EmailTask {
1327
+ id: string;
1328
+ marketId: string;
1329
+ broadcastId?: string;
1330
+ marketName: string;
1331
+ replyTo: string;
1332
+ customerId: string;
1333
+ accountNumber?: string;
1334
+ templateId: string;
1335
+ to: string[];
1336
+ documents?: string[];
1337
+ data: Record<string, any>;
1338
+ status: "failed" | "pending" | "sent" | "delivered" | "opened" | "bounced" | "spam-complaint";
1339
+ errorCode?: number;
1340
+ errorMessage?: string;
1341
+ providerMessageId?: string;
1342
+ createdAt: Timestamp;
1343
+ updatedAt: Timestamp;
1344
+ sentAt?: Timestamp;
1345
+ deliveredAt?: Timestamp;
1346
+ openedAt?: Timestamp;
1347
+ bouncedAt?: Timestamp;
1348
+ subject?: string;
1349
+ events?: {
1350
+ id: string;
1351
+ timestamp: Timestamp;
1352
+ type: string;
1353
+ recipient: string;
1354
+ }[];
1355
+ }
1356
+ type BroadcastTask = SMSTask | EmailTask;
1357
+ interface DebtOperationalOverviewOptions {
1358
+ comparisonDays?: number;
1359
+ }
1360
+ interface DebtPaymentHistoryPoint {
1361
+ date: string;
1362
+ daysToPay: number;
1363
+ }
1364
+ interface DebtRecentPaymentInfo {
1365
+ date: string;
1366
+ amountInCents: number;
1367
+ daysToPay: number;
1368
+ }
1369
+ interface DebtPaymentBehavior {
1370
+ avgDaysToPay: number | null;
1371
+ paymentConsistency: "consistent" | "variable" | "erratic" | null;
1372
+ recentTrend: "improving" | "stable" | "worsening" | null;
1373
+ paymentHistory: DebtPaymentHistoryPoint[];
1374
+ lastPayments: DebtRecentPaymentInfo[];
1375
+ debtorDaysDSO: number | null;
1376
+ debtorDaysDSO30DaysAgo: number | null;
1377
+ }
1378
+ interface DebtOutstandingInvoice {
1379
+ invoiceId: string;
1380
+ issuedAtSeconds: number;
1381
+ amountDueInCents: number;
1382
+ riskCategory?: "low" | "medium" | "high" | "critical";
1383
+ }
1384
+ interface DebtOperationalCustomer {
1385
+ customerId: string;
1386
+ displayName: string | null;
1387
+ accountNumber: string | null;
1388
+ balanceInCents: number;
1389
+ balanceXDaysAgoInCents: number | null;
1390
+ balanceChangeInCents: number | null;
1391
+ balanceChangePercent: number | null;
1392
+ lastPaymentDateSeconds: number | null;
1393
+ daysSinceLastPayment: number | null;
1394
+ outstandingInvoices: DebtOutstandingInvoice[];
1395
+ warningSignCodes: Array<"paying_slower" | "buying_more_paying_less" | "stopped_paying" | "late_payments" | "high_risk_invoice">;
1396
+ warningSignLabels: string[];
1397
+ gmvLast30DaysInCents: number;
1398
+ paymentsLast30DaysInCents: number;
1399
+ ageBucket0to6: number;
1400
+ ageBucket7to13: number;
1401
+ ageBucket14to20: number;
1402
+ ageBucket21to27: number;
1403
+ ageBucket28to34: number;
1404
+ ageBucket35plus: number;
1405
+ avgDaysToPayRecent: number | null;
1406
+ avgDaysToPayBaseline: number | null;
1407
+ hasHighRiskInvoice: boolean;
1408
+ invoiceCount: number;
1409
+ paymentBehavior: DebtPaymentBehavior;
1410
+ }
1411
+ interface DebtOperationalInvoice {
1412
+ invoiceId: string;
1413
+ customerId: string;
1414
+ issuedAtSeconds: number;
1415
+ amountDueInCents: number;
1416
+ daysOutstanding: number;
1417
+ expectedPayDays: number | null;
1418
+ daysOverdue: number | null;
1419
+ riskCategory: "low" | "medium" | "high" | "critical";
1420
+ customerWarnings: Array<"paying_slower" | "buying_more_paying_less" | "stopped_paying" | "late_payments" | "high_risk_invoice">;
1421
+ customerAvgDaysToPay: number | null;
1422
+ }
1423
+ interface DebtOperationalOverviewResponse {
1424
+ customers: DebtOperationalCustomer[];
1425
+ invoices: DebtOperationalInvoice[];
1426
+ }
1427
+ interface DebtBehaviorCustomer {
1428
+ customerId: string;
1429
+ displayName: string | null;
1430
+ accountNumber: string | null;
1431
+ balanceInCents: number;
1432
+ balanceXDaysAgoInCents: number | null;
1433
+ balanceChangeInCents: number | null;
1434
+ balanceChangePercent: number | null;
1435
+ paymentBehavior: DebtPaymentBehavior;
1436
+ warningSignCodes: DebtOperationalCustomer["warningSignCodes"];
1437
+ warningSignLabels: string[];
1438
+ }
1439
+ interface DebtBehaviorResponse {
1440
+ customers: DebtBehaviorCustomer[];
1441
+ }
1442
+ interface DebtProductOptions {
1443
+ limit?: number;
1444
+ }
1445
+ interface DebtProductInvoice {
1446
+ invoiceId: string;
1447
+ outstandingInMilliCents: number;
1448
+ issuedAtSeconds: number;
1449
+ }
1450
+ interface DebtProductCustomer {
1451
+ owner: string | null;
1452
+ customerId: string | null;
1453
+ outstandingInMilliCents: number;
1454
+ invoices: DebtProductInvoice[];
1455
+ }
1456
+ interface DebtProductRow {
1457
+ productCode: string | null;
1458
+ totalOutstandingInMilliCents: number;
1459
+ customers: DebtProductCustomer[];
1460
+ }
1461
+ interface DebtProductResponse {
1462
+ outstandingByProduct: DebtProductRow[];
1463
+ overallOutstandingInMilliCents: number;
1464
+ }
1280
1465
 
1281
1466
  type types_Accessory = Accessory;
1282
1467
  type types_ActivityChange = ActivityChange;
@@ -1292,6 +1477,13 @@ type types_Application = Application;
1292
1477
  type types_AttributeDefinition = AttributeDefinition;
1293
1478
  type types_AttributeValueType = AttributeValueType;
1294
1479
  type types_BankDetails = BankDetails;
1480
+ type types_BroadcastKind = BroadcastKind;
1481
+ type types_BroadcastPayload = BroadcastPayload;
1482
+ type types_BroadcastRecipient = BroadcastRecipient;
1483
+ type types_BroadcastSendResponse = BroadcastSendResponse;
1484
+ type types_BroadcastSendResultItem = BroadcastSendResultItem;
1485
+ type types_BroadcastTask = BroadcastTask;
1486
+ type types_BroadcastType = BroadcastType;
1295
1487
  type types_Cart = Cart;
1296
1488
  type types_CartItem = CartItem;
1297
1489
  type types_ChequeField = ChequeField;
@@ -1303,10 +1495,27 @@ type types_Customer = Customer;
1303
1495
  type types_CustomerBankDetails = CustomerBankDetails;
1304
1496
  type types_CustomerContact = CustomerContact;
1305
1497
  type types_CustomerFromSearch = CustomerFromSearch;
1498
+ type types_DebtBehaviorCustomer = DebtBehaviorCustomer;
1499
+ type types_DebtBehaviorResponse = DebtBehaviorResponse;
1500
+ type types_DebtOperationalCustomer = DebtOperationalCustomer;
1501
+ type types_DebtOperationalInvoice = DebtOperationalInvoice;
1502
+ type types_DebtOperationalOverviewOptions = DebtOperationalOverviewOptions;
1503
+ type types_DebtOperationalOverviewResponse = DebtOperationalOverviewResponse;
1504
+ type types_DebtOutstandingInvoice = DebtOutstandingInvoice;
1505
+ type types_DebtPaymentBehavior = DebtPaymentBehavior;
1506
+ type types_DebtPaymentHistoryPoint = DebtPaymentHistoryPoint;
1507
+ type types_DebtProductCustomer = DebtProductCustomer;
1508
+ type types_DebtProductInvoice = DebtProductInvoice;
1509
+ type types_DebtProductOptions = DebtProductOptions;
1510
+ type types_DebtProductResponse = DebtProductResponse;
1511
+ type types_DebtProductRow = DebtProductRow;
1512
+ type types_DebtRecentPaymentInfo = DebtRecentPaymentInfo;
1306
1513
  type types_DeleteLotsResponse = DeleteLotsResponse;
1307
1514
  type types_DeviceType = DeviceType;
1308
1515
  type types_DisplayBoardMode = DisplayBoardMode;
1309
1516
  type types_DraftInvoice = DraftInvoice;
1517
+ type types_EmailBroadcastPayload = EmailBroadcastPayload;
1518
+ type types_EmailTask = EmailTask;
1310
1519
  type types_EmailWrapper = EmailWrapper;
1311
1520
  type types_FarmAssurances = FarmAssurances;
1312
1521
  type types_FieldPositions = FieldPositions;
@@ -1350,6 +1559,7 @@ type types_Product = Product;
1350
1559
  type types_ProductCodeConfiguration = ProductCodeConfiguration;
1351
1560
  type types_ProductConfiguration = ProductConfiguration;
1352
1561
  type types_ReadOptions = ReadOptions;
1562
+ type types_SMSBroadcastPayload = SMSBroadcastPayload;
1353
1563
  type types_SMSTask = SMSTask;
1354
1564
  type types_Sale = Sale;
1355
1565
  type types_SaleFromSearch = SaleFromSearch;
@@ -1386,7 +1596,7 @@ type types_WebhookEvent<T> = WebhookEvent<T>;
1386
1596
  type types_WebhookEventName = WebhookEventName;
1387
1597
  declare const types_supportedWebhookEvents: typeof supportedWebhookEvents;
1388
1598
  declare namespace types {
1389
- export { type types_Accessory as Accessory, type types_ActivityChange as ActivityChange, type types_ActivityLog as ActivityLog, type types_ActivityOperation as ActivityOperation, type types_Address as Address, type types_AddressWrapper as AddressWrapper, type types_AdjustmentTarget as AdjustmentTarget, type types_AdjustmentTotalTarget as AdjustmentTotalTarget, type types_AdjustmentsConfiguration as AdjustmentsConfiguration, type types_AppParameterConfig as AppParameterConfig, type types_Application as Application, type types_AttributeDefinition as AttributeDefinition, type types_AttributeValueType as AttributeValueType, type types_BankDetails as BankDetails, type types_Cart as Cart, type types_CartItem as CartItem, type types_ChequeField as ChequeField, type types_ClientType as ClientType, type types_CphLookupResponse as CphLookupResponse, type types_CurrenciesWithGuinea as CurrenciesWithGuinea, type types_Currency as Currency, type types_Customer as Customer, type types_CustomerBankDetails as CustomerBankDetails, type types_CustomerContact as CustomerContact, type types_CustomerFromSearch as CustomerFromSearch, type types_DeleteLotsResponse as DeleteLotsResponse, type types_DeviceType as DeviceType, type types_DisplayBoardMode as DisplayBoardMode, type types_DraftInvoice as DraftInvoice, type types_EmailWrapper as EmailWrapper, type types_FarmAssurances as FarmAssurances, type types_FieldPositions as FieldPositions, types_IMAGE_SIZES_VALUES as IMAGE_SIZES_VALUES, type types_ImageSizes as ImageSizes, type types_IncrementLadder as IncrementLadder, type types_IncrementLadderItem as IncrementLadderItem, type types_Invoice as Invoice, type types_InvoiceDeliveryPreference as InvoiceDeliveryPreference, type types_InvoiceField as InvoiceField, type types_InvoiceLineItem as InvoiceLineItem, type types_InvoiceTotalAdjustmentConfiguration as InvoiceTotalAdjustmentConfiguration, type types_InvoiceTotals as InvoiceTotals, type types_LineItemAdjustmentConfiguration as LineItemAdjustmentConfiguration, types_LivestockSuperTypes as LivestockSuperTypes, type types_Lot as Lot, type types_LotDeleteDecision as LotDeleteDecision, type types_LotDeletePreflightItem as LotDeletePreflightItem, type types_LotDeletePreflightResponse as LotDeletePreflightResponse, type types_LotDeleteReason as LotDeleteReason, type types_LotGeneratedValues as LotGeneratedValues, type types_LotIssue as LotIssue, type types_LotItem as LotItem, type types_LotSaleStatus as LotSaleStatus, type types_LotWithItemsAsArray as LotWithItemsAsArray, type types_Market as Market, type types_MarketBankDetails as MarketBankDetails, type types_MarketReportHeaders as MarketReportHeaders, type types_MartEyeLiveSaleSettings as MartEyeLiveSaleSettings, type types_MartEyeTimedSaleSettings as MartEyeTimedSaleSettings, type types_Media as Media, type types_MemberSharingConfiguration as MemberSharingConfiguration, type types_ObjectType as ObjectType, type types_Payment as Payment, type types_PaymentMethod as PaymentMethod, type types_Payout as Payout, type types_PayoutMethod as PayoutMethod, type types_PhoneNumberWrapper as PhoneNumberWrapper, type types_Printer as Printer, type types_Product as Product, type types_ProductCodeConfiguration as ProductCodeConfiguration, type types_ProductConfiguration as ProductConfiguration, type types_ReadOptions as ReadOptions, type types_SMSTask as SMSTask, type types_Sale as Sale, type types_SaleFromSearch as SaleFromSearch, type types_SalePublishStatus as SalePublishStatus, type types_SaleTemplate as SaleTemplate, type types_SendSMSPayload as SendSMSPayload, type types_SettingsAccessories as SettingsAccessories, type types_SettingsAdjustmentsConfiguration as SettingsAdjustmentsConfiguration, type types_SettingsGlobalAttributes as SettingsGlobalAttributes, type types_SettingsMarketDefaults as SettingsMarketDefaults, type types_SettingsPrinters as SettingsPrinters, type types_SettingsProductCodes as SettingsProductCodes, type types_SettingsTaxRates as SettingsTaxRates, type types_ShortCustomerDetails as ShortCustomerDetails, type types_SimplePaymentIn as SimplePaymentIn, type types_SimplePaymentOut as SimplePaymentOut, type types_StoredDataGridConfig as StoredDataGridConfig, type types_StudioAppPartial as StudioAppPartial, type types_SubtotalGroups as SubtotalGroups, type types_SuperType as SuperType, type types_SupportedAttributeTypes as SupportedAttributeTypes, type types_SupportedCountryCode as SupportedCountryCode, types_SupportedCurrencyCodes as SupportedCurrencyCodes, type SupportedFileTypesNames$1 as SupportedFileTypesNames, types_SupportedPaymentMethods as SupportedPaymentMethods, types_SupportedSuperTypes as SupportedSuperTypes, types_SupportedUnitsOfSale as SupportedUnitsOfSale, type types_TablePosition as TablePosition, type types_TaxRate as TaxRate, type types_TemplateSaleData as TemplateSaleData, type types_UnitOfSale as UnitOfSale, types_VIDEO_TASKS_VALUES as VIDEO_TASKS_VALUES, type types_VideoTasks as VideoTasks, type types_WebhookEvent as WebhookEvent, type types_WebhookEventName as WebhookEventName, types_supportedWebhookEvents as supportedWebhookEvents };
1599
+ export { type types_Accessory as Accessory, type types_ActivityChange as ActivityChange, type types_ActivityLog as ActivityLog, type types_ActivityOperation as ActivityOperation, type types_Address as Address, type types_AddressWrapper as AddressWrapper, type types_AdjustmentTarget as AdjustmentTarget, type types_AdjustmentTotalTarget as AdjustmentTotalTarget, type types_AdjustmentsConfiguration as AdjustmentsConfiguration, type types_AppParameterConfig as AppParameterConfig, type types_Application as Application, type types_AttributeDefinition as AttributeDefinition, type types_AttributeValueType as AttributeValueType, type types_BankDetails as BankDetails, type types_BroadcastKind as BroadcastKind, type types_BroadcastPayload as BroadcastPayload, type types_BroadcastRecipient as BroadcastRecipient, type types_BroadcastSendResponse as BroadcastSendResponse, type types_BroadcastSendResultItem as BroadcastSendResultItem, type types_BroadcastTask as BroadcastTask, type types_BroadcastType as BroadcastType, type types_Cart as Cart, type types_CartItem as CartItem, type types_ChequeField as ChequeField, type types_ClientType as ClientType, type types_CphLookupResponse as CphLookupResponse, type types_CurrenciesWithGuinea as CurrenciesWithGuinea, type types_Currency as Currency, type types_Customer as Customer, type types_CustomerBankDetails as CustomerBankDetails, type types_CustomerContact as CustomerContact, type types_CustomerFromSearch as CustomerFromSearch, type types_DebtBehaviorCustomer as DebtBehaviorCustomer, type types_DebtBehaviorResponse as DebtBehaviorResponse, type types_DebtOperationalCustomer as DebtOperationalCustomer, type types_DebtOperationalInvoice as DebtOperationalInvoice, type types_DebtOperationalOverviewOptions as DebtOperationalOverviewOptions, type types_DebtOperationalOverviewResponse as DebtOperationalOverviewResponse, type types_DebtOutstandingInvoice as DebtOutstandingInvoice, type types_DebtPaymentBehavior as DebtPaymentBehavior, type types_DebtPaymentHistoryPoint as DebtPaymentHistoryPoint, type types_DebtProductCustomer as DebtProductCustomer, type types_DebtProductInvoice as DebtProductInvoice, type types_DebtProductOptions as DebtProductOptions, type types_DebtProductResponse as DebtProductResponse, type types_DebtProductRow as DebtProductRow, type types_DebtRecentPaymentInfo as DebtRecentPaymentInfo, type types_DeleteLotsResponse as DeleteLotsResponse, type types_DeviceType as DeviceType, type types_DisplayBoardMode as DisplayBoardMode, type types_DraftInvoice as DraftInvoice, type types_EmailBroadcastPayload as EmailBroadcastPayload, type types_EmailTask as EmailTask, type types_EmailWrapper as EmailWrapper, type types_FarmAssurances as FarmAssurances, type types_FieldPositions as FieldPositions, types_IMAGE_SIZES_VALUES as IMAGE_SIZES_VALUES, type types_ImageSizes as ImageSizes, type types_IncrementLadder as IncrementLadder, type types_IncrementLadderItem as IncrementLadderItem, type types_Invoice as Invoice, type types_InvoiceDeliveryPreference as InvoiceDeliveryPreference, type types_InvoiceField as InvoiceField, type types_InvoiceLineItem as InvoiceLineItem, type types_InvoiceTotalAdjustmentConfiguration as InvoiceTotalAdjustmentConfiguration, type types_InvoiceTotals as InvoiceTotals, type types_LineItemAdjustmentConfiguration as LineItemAdjustmentConfiguration, types_LivestockSuperTypes as LivestockSuperTypes, type types_Lot as Lot, type types_LotDeleteDecision as LotDeleteDecision, type types_LotDeletePreflightItem as LotDeletePreflightItem, type types_LotDeletePreflightResponse as LotDeletePreflightResponse, type types_LotDeleteReason as LotDeleteReason, type types_LotGeneratedValues as LotGeneratedValues, type types_LotIssue as LotIssue, type types_LotItem as LotItem, type types_LotSaleStatus as LotSaleStatus, type types_LotWithItemsAsArray as LotWithItemsAsArray, type types_Market as Market, type types_MarketBankDetails as MarketBankDetails, type types_MarketReportHeaders as MarketReportHeaders, type types_MartEyeLiveSaleSettings as MartEyeLiveSaleSettings, type types_MartEyeTimedSaleSettings as MartEyeTimedSaleSettings, type types_Media as Media, type types_MemberSharingConfiguration as MemberSharingConfiguration, type types_ObjectType as ObjectType, type types_Payment as Payment, type types_PaymentMethod as PaymentMethod, type types_Payout as Payout, type types_PayoutMethod as PayoutMethod, type types_PhoneNumberWrapper as PhoneNumberWrapper, type types_Printer as Printer, type types_Product as Product, type types_ProductCodeConfiguration as ProductCodeConfiguration, type types_ProductConfiguration as ProductConfiguration, type types_ReadOptions as ReadOptions, type types_SMSBroadcastPayload as SMSBroadcastPayload, type types_SMSTask as SMSTask, type types_Sale as Sale, type types_SaleFromSearch as SaleFromSearch, type types_SalePublishStatus as SalePublishStatus, type types_SaleTemplate as SaleTemplate, type types_SendSMSPayload as SendSMSPayload, type types_SettingsAccessories as SettingsAccessories, type types_SettingsAdjustmentsConfiguration as SettingsAdjustmentsConfiguration, type types_SettingsGlobalAttributes as SettingsGlobalAttributes, type types_SettingsMarketDefaults as SettingsMarketDefaults, type types_SettingsPrinters as SettingsPrinters, type types_SettingsProductCodes as SettingsProductCodes, type types_SettingsTaxRates as SettingsTaxRates, type types_ShortCustomerDetails as ShortCustomerDetails, type types_SimplePaymentIn as SimplePaymentIn, type types_SimplePaymentOut as SimplePaymentOut, type types_StoredDataGridConfig as StoredDataGridConfig, type types_StudioAppPartial as StudioAppPartial, type types_SubtotalGroups as SubtotalGroups, type types_SuperType as SuperType, type types_SupportedAttributeTypes as SupportedAttributeTypes, type types_SupportedCountryCode as SupportedCountryCode, types_SupportedCurrencyCodes as SupportedCurrencyCodes, type SupportedFileTypesNames$1 as SupportedFileTypesNames, types_SupportedPaymentMethods as SupportedPaymentMethods, types_SupportedSuperTypes as SupportedSuperTypes, types_SupportedUnitsOfSale as SupportedUnitsOfSale, type types_TablePosition as TablePosition, type types_TaxRate as TaxRate, type types_TemplateSaleData as TemplateSaleData, type types_UnitOfSale as UnitOfSale, types_VIDEO_TASKS_VALUES as VIDEO_TASKS_VALUES, type types_VideoTasks as VideoTasks, type types_WebhookEvent as WebhookEvent, type types_WebhookEventName as WebhookEventName, types_supportedWebhookEvents as supportedWebhookEvents };
1390
1600
  }
1391
1601
 
1392
1602
  interface ListContactsResponse {
@@ -1941,6 +2151,10 @@ declare function resources(httpClient: HttpClient): {
1941
2151
  list: (marketId: string, params?: ActivityListParams | undefined) => Promise<ActivityListResponse>;
1942
2152
  get: (marketId: string, activityId: string) => Promise<ActivityLog>;
1943
2153
  };
2154
+ broadcast: {
2155
+ send: (marketId: string, data: BroadcastPayload) => Promise<BroadcastSendResponse>;
2156
+ get: (marketId: string, type: BroadcastType, taskId: string) => Promise<BroadcastTask>;
2157
+ };
1944
2158
  markets: {
1945
2159
  get: (marketId: string, options?: ReadOptions | undefined) => Promise<Market>;
1946
2160
  };
@@ -1969,6 +2183,7 @@ declare function resources(httpClient: HttpClient): {
1969
2183
  image?: string | null | undefined;
1970
2184
  cover?: string | null | undefined;
1971
2185
  templateId?: string | null | undefined;
2186
+ enableLotGrouping?: boolean | undefined;
1972
2187
  attributeDefaults?: {
1973
2188
  [attributekey: string]: string | number | boolean;
1974
2189
  } | undefined;
@@ -1982,6 +2197,7 @@ declare function resources(httpClient: HttpClient): {
1982
2197
  defaultProductCode?: string | undefined;
1983
2198
  attributeDefaults?: Record<string, any> | undefined;
1984
2199
  publishStatus?: SalePublishStatus | undefined;
2200
+ enableLotGrouping?: boolean | undefined;
1985
2201
  marteyeSettings?: {
1986
2202
  description?: string | undefined;
1987
2203
  image?: string | undefined;
@@ -2197,6 +2413,11 @@ declare function resources(httpClient: HttpClient): {
2197
2413
  get: (marketId: string, payoutId: string) => Promise<Payout>;
2198
2414
  create: (marketId: string, data: CreatePayoutRequest) => Promise<PayoutCreateResponse>;
2199
2415
  };
2416
+ reports: {
2417
+ getDebtOperationalOverview: (marketId: string, options?: DebtOperationalOverviewOptions | undefined) => Promise<DebtOperationalOverviewResponse>;
2418
+ getDebtBehavior: (marketId: string, options?: DebtOperationalOverviewOptions | undefined) => Promise<DebtBehaviorResponse>;
2419
+ getDebtProduct: (marketId: string, options?: DebtProductOptions | undefined) => Promise<DebtProductResponse>;
2420
+ };
2200
2421
  search: {
2201
2422
  query: (marketId: string, query: string) => Promise<SearchResult>;
2202
2423
  };
@@ -2230,10 +2451,6 @@ declare function resources(httpClient: HttpClient): {
2230
2451
  getLatestTransaction: (marketId: string, account: string) => Promise<LedgerTransaction>;
2231
2452
  listTransactions: (marketId: string, params: ListTransactionsParams) => Promise<TransactionsListResponse>;
2232
2453
  };
2233
- sms: {
2234
- sendSMS: (marketId: string, data: SendSMSPayload) => Promise<SMSTask>;
2235
- getSMS: (marketId: string, smsId: string) => Promise<SMSTask>;
2236
- };
2237
2454
  };
2238
2455
 
2239
2456
  type StudioInstance = ReturnType<typeof resources> & {
@@ -2250,6 +2467,10 @@ declare function Studio(info?: {
2250
2467
  list: (marketId: string, params?: ActivityListParams | undefined) => Promise<ActivityListResponse>;
2251
2468
  get: (marketId: string, activityId: string) => Promise<ActivityLog>;
2252
2469
  };
2470
+ broadcast: {
2471
+ send: (marketId: string, data: BroadcastPayload) => Promise<BroadcastSendResponse>;
2472
+ get: (marketId: string, type: BroadcastType, taskId: string) => Promise<BroadcastTask>;
2473
+ };
2253
2474
  markets: {
2254
2475
  get: (marketId: string, options?: ReadOptions | undefined) => Promise<Market>;
2255
2476
  };
@@ -2278,6 +2499,7 @@ declare function Studio(info?: {
2278
2499
  image?: string | null | undefined;
2279
2500
  cover?: string | null | undefined;
2280
2501
  templateId?: string | null | undefined;
2502
+ enableLotGrouping?: boolean | undefined;
2281
2503
  attributeDefaults?: {
2282
2504
  [attributekey: string]: string | number | boolean;
2283
2505
  } | undefined;
@@ -2291,6 +2513,7 @@ declare function Studio(info?: {
2291
2513
  defaultProductCode?: string | undefined;
2292
2514
  attributeDefaults?: Record<string, any> | undefined;
2293
2515
  publishStatus?: SalePublishStatus | undefined;
2516
+ enableLotGrouping?: boolean | undefined;
2294
2517
  marteyeSettings?: {
2295
2518
  description?: string | undefined;
2296
2519
  image?: string | undefined;
@@ -2506,6 +2729,11 @@ declare function Studio(info?: {
2506
2729
  get: (marketId: string, payoutId: string) => Promise<Payout>;
2507
2730
  create: (marketId: string, data: CreatePayoutRequest) => Promise<PayoutCreateResponse>;
2508
2731
  };
2732
+ reports: {
2733
+ getDebtOperationalOverview: (marketId: string, options?: DebtOperationalOverviewOptions | undefined) => Promise<DebtOperationalOverviewResponse>;
2734
+ getDebtBehavior: (marketId: string, options?: DebtOperationalOverviewOptions | undefined) => Promise<DebtBehaviorResponse>;
2735
+ getDebtProduct: (marketId: string, options?: DebtProductOptions | undefined) => Promise<DebtProductResponse>;
2736
+ };
2509
2737
  search: {
2510
2738
  query: (marketId: string, query: string) => Promise<SearchResult>;
2511
2739
  };
@@ -2539,10 +2767,6 @@ declare function Studio(info?: {
2539
2767
  getLatestTransaction: (marketId: string, account: string) => Promise<LedgerTransaction>;
2540
2768
  listTransactions: (marketId: string, params: ListTransactionsParams) => Promise<TransactionsListResponse>;
2541
2769
  };
2542
- sms: {
2543
- sendSMS: (marketId: string, data: SendSMSPayload) => Promise<SMSTask>;
2544
- getSMS: (marketId: string, smsId: string) => Promise<SMSTask>;
2545
- };
2546
2770
  };
2547
2771
 
2548
2772
  /**
@@ -2703,4 +2927,11 @@ declare function sortByLotNumber<T extends {
2703
2927
  */
2704
2928
  declare function nextLotNumber(previousLotNumber: string): string;
2705
2929
 
2706
- export { CattlePassport, type ChunkedFile, type CreateCustomerListPayload, type CreateCustomerPayload, type CustomerList, type CustomerListAddMembersResponse, type CustomerListDeleteResponse, type CustomerListFilterGroup, type CustomerListFilters, type CustomerListMember, type CustomerListMembersOptions, type CustomerListMembersResponse, type CustomerListPreviewResponse, type CustomerListProductCodesResponse, type CustomerListQuery, type CustomerListRefreshResponse, type CustomerListRemoveMemberResponse, type CustomerListReportRow, type CustomerListReportSummary, type CustomerListRole, type CustomerListType, type CustomerListViewOptions, type CustomerListViewResult, type CustomerListsListOptions, type CustomerListsListResponse, EarTag, type FarmAssuranceUpdate, type KeeperDetailsUpdate, type RollingDateConfig, Studio, StudioHeaders, type StudioInstance, type StudioManifest, types as StudioTypes, type UpdateCustomerListPayload, type UpdateCustomerPayload, createAppManifest, Studio as default, lotComparator, nextLotNumber, sortByLotNumber };
2930
+ declare function create(httpClient: HttpClient): {
2931
+ getDebtOperationalOverview: (marketId: string, options?: DebtOperationalOverviewOptions) => Promise<DebtOperationalOverviewResponse>;
2932
+ getDebtBehavior: (marketId: string, options?: DebtOperationalOverviewOptions) => Promise<DebtBehaviorResponse>;
2933
+ getDebtProduct: (marketId: string, options?: DebtProductOptions) => Promise<DebtProductResponse>;
2934
+ };
2935
+ type Reports = ReturnType<typeof create>;
2936
+
2937
+ export { CattlePassport, type ChunkedFile, type CreateCustomerListPayload, type CreateCustomerPayload, type CustomerList, type CustomerListAddMembersResponse, type CustomerListDeleteResponse, type CustomerListFilterGroup, type CustomerListFilters, type CustomerListMember, type CustomerListMembersOptions, type CustomerListMembersResponse, type CustomerListPreviewResponse, type CustomerListProductCodesResponse, type CustomerListQuery, type CustomerListRefreshResponse, type CustomerListRemoveMemberResponse, type CustomerListReportRow, type CustomerListReportSummary, type CustomerListRole, type CustomerListType, type CustomerListViewOptions, type CustomerListViewResult, type CustomerListsListOptions, type CustomerListsListResponse, type DebtBehaviorCustomer, type DebtBehaviorResponse, type DebtOperationalCustomer, type DebtOperationalInvoice, type DebtOperationalOverviewOptions, type DebtOperationalOverviewResponse, type DebtOutstandingInvoice, type DebtPaymentBehavior, type DebtPaymentHistoryPoint, type DebtProductCustomer, type DebtProductInvoice, type DebtProductOptions, type DebtProductResponse, type DebtProductRow, type DebtRecentPaymentInfo, EarTag, type FarmAssuranceUpdate, type KeeperDetailsUpdate, type Reports, type RollingDateConfig, Studio, StudioHeaders, type StudioInstance, type StudioManifest, types as StudioTypes, type UpdateCustomerListPayload, type UpdateCustomerPayload, createAppManifest, Studio as default, lotComparator, nextLotNumber, sortByLotNumber };