@marteye/studiojs 1.1.48-beta.0 → 1.1.48

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
@@ -116,29 +116,6 @@ await studio.broadcast.send(marketId, {
116
116
  await studio.broadcast.get(marketId, "sms", taskId);
117
117
  ```
118
118
 
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
119
  ## Types
143
120
 
144
121
  Relevant exported types include:
package/dist/index.d.ts CHANGED
@@ -1254,6 +1254,8 @@ interface SendSMSPayload {
1254
1254
  }
1255
1255
  type BroadcastType = "sms" | "email";
1256
1256
  type BroadcastKind = "broadcast" | "statement";
1257
+ type EmailDeliveryClass = "transactional" | "broadcast";
1258
+ type PostmarkMessageStream = "outbound" | "broadcast";
1257
1259
  interface BroadcastRecipient {
1258
1260
  customerId: string;
1259
1261
  displayName?: string;
@@ -1332,6 +1334,8 @@ interface EmailTask {
1332
1334
  customerId: string;
1333
1335
  accountNumber?: string;
1334
1336
  templateId: string;
1337
+ deliveryClass?: EmailDeliveryClass;
1338
+ postmarkMessageStream?: PostmarkMessageStream;
1335
1339
  to: string[];
1336
1340
  documents?: string[];
1337
1341
  data: Record<string, any>;
@@ -1354,114 +1358,6 @@ interface EmailTask {
1354
1358
  }[];
1355
1359
  }
1356
1360
  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
- }
1465
1361
 
1466
1362
  type types_Accessory = Accessory;
1467
1363
  type types_ActivityChange = ActivityChange;
@@ -1495,26 +1391,12 @@ type types_Customer = Customer;
1495
1391
  type types_CustomerBankDetails = CustomerBankDetails;
1496
1392
  type types_CustomerContact = CustomerContact;
1497
1393
  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;
1513
1394
  type types_DeleteLotsResponse = DeleteLotsResponse;
1514
1395
  type types_DeviceType = DeviceType;
1515
1396
  type types_DisplayBoardMode = DisplayBoardMode;
1516
1397
  type types_DraftInvoice = DraftInvoice;
1517
1398
  type types_EmailBroadcastPayload = EmailBroadcastPayload;
1399
+ type types_EmailDeliveryClass = EmailDeliveryClass;
1518
1400
  type types_EmailTask = EmailTask;
1519
1401
  type types_EmailWrapper = EmailWrapper;
1520
1402
  type types_FarmAssurances = FarmAssurances;
@@ -1554,6 +1436,7 @@ type types_PaymentMethod = PaymentMethod;
1554
1436
  type types_Payout = Payout;
1555
1437
  type types_PayoutMethod = PayoutMethod;
1556
1438
  type types_PhoneNumberWrapper = PhoneNumberWrapper;
1439
+ type types_PostmarkMessageStream = PostmarkMessageStream;
1557
1440
  type types_Printer = Printer;
1558
1441
  type types_Product = Product;
1559
1442
  type types_ProductCodeConfiguration = ProductCodeConfiguration;
@@ -1596,7 +1479,7 @@ type types_WebhookEvent<T> = WebhookEvent<T>;
1596
1479
  type types_WebhookEventName = WebhookEventName;
1597
1480
  declare const types_supportedWebhookEvents: typeof supportedWebhookEvents;
1598
1481
  declare namespace types {
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 };
1482
+ 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_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_EmailDeliveryClass as EmailDeliveryClass, 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_PostmarkMessageStream as PostmarkMessageStream, 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 };
1600
1483
  }
1601
1484
 
1602
1485
  interface ListContactsResponse {
@@ -2413,11 +2296,6 @@ declare function resources(httpClient: HttpClient): {
2413
2296
  get: (marketId: string, payoutId: string) => Promise<Payout>;
2414
2297
  create: (marketId: string, data: CreatePayoutRequest) => Promise<PayoutCreateResponse>;
2415
2298
  };
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
- };
2421
2299
  search: {
2422
2300
  query: (marketId: string, query: string) => Promise<SearchResult>;
2423
2301
  };
@@ -2729,11 +2607,6 @@ declare function Studio(info?: {
2729
2607
  get: (marketId: string, payoutId: string) => Promise<Payout>;
2730
2608
  create: (marketId: string, data: CreatePayoutRequest) => Promise<PayoutCreateResponse>;
2731
2609
  };
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
- };
2737
2610
  search: {
2738
2611
  query: (marketId: string, query: string) => Promise<SearchResult>;
2739
2612
  };
@@ -2927,11 +2800,4 @@ declare function sortByLotNumber<T extends {
2927
2800
  */
2928
2801
  declare function nextLotNumber(previousLotNumber: string): string;
2929
2802
 
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 };
2803
+ 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 };
package/dist/index.esm.js CHANGED
@@ -73,7 +73,7 @@ function SimpleHttpClient(baseUrl, apiKey, fetch, defaultTimeout, debug = false)
73
73
  }
74
74
 
75
75
  // Path: studiojs/src/resources/markets.ts
76
- function create$r(_) {
76
+ function create$q(_) {
77
77
  const actions = {
78
78
  /***
79
79
  * This is used to construct the action from the request body
@@ -103,7 +103,7 @@ function create$r(_) {
103
103
  return actions;
104
104
  }
105
105
 
106
- function create$q(httpClient) {
106
+ function create$p(httpClient) {
107
107
  let activity = {
108
108
  /**
109
109
  * List activity logs for a market with pagination and filtering
@@ -155,7 +155,7 @@ function create$q(httpClient) {
155
155
  return activity;
156
156
  }
157
157
 
158
- function create$p(httpClient) {
158
+ function create$o(httpClient) {
159
159
  return {
160
160
  list: async (marketId) => {
161
161
  return httpClient.get(`/${marketId}/adjustments`);
@@ -172,7 +172,7 @@ function create$p(httpClient) {
172
172
  };
173
173
  }
174
174
 
175
- function create$o(httpClient) {
175
+ function create$n(httpClient) {
176
176
  return {
177
177
  /**
178
178
  * Get the full cart for a customer including extras and uninvoiced lots
@@ -195,7 +195,7 @@ function create$o(httpClient) {
195
195
  };
196
196
  }
197
197
 
198
- function create$n(httpClient) {
198
+ function create$m(httpClient) {
199
199
  return {
200
200
  list: async (marketId) => {
201
201
  return httpClient.get(`/${marketId}/extras`);
@@ -215,7 +215,7 @@ function create$n(httpClient) {
215
215
  /***
216
216
  * Bidder applications
217
217
  */
218
- function create$m(httpClient) {
218
+ function create$l(httpClient) {
219
219
  let applications = {
220
220
  /**
221
221
  * List applications for a market with optional filtering
@@ -298,7 +298,7 @@ function create$m(httpClient) {
298
298
  return applications;
299
299
  }
300
300
 
301
- function create$l(httpClient) {
301
+ function create$k(httpClient) {
302
302
  return {
303
303
  send: async (marketId, data) => httpClient.post(`/${marketId}/broadcast/send`, data),
304
304
  get: async (marketId, type, taskId) => httpClient.get(`/${marketId}/broadcast/${type}/${taskId}`),
@@ -306,7 +306,7 @@ function create$l(httpClient) {
306
306
  }
307
307
 
308
308
  // Path: studiojs/src/resources/markets.ts
309
- function create$k(httpClient) {
309
+ function create$j(httpClient) {
310
310
  let customers = {
311
311
  list: async (marketId, lastId) => {
312
312
  let params = {};
@@ -355,7 +355,7 @@ function create$k(httpClient) {
355
355
 
356
356
  const DEFAULT_PAGE_SIZE = 100;
357
357
  const MAX_MEMBER_BATCH_SIZE = 100;
358
- function create$j(httpClient) {
358
+ function create$i(httpClient) {
359
359
  const customerLists = {
360
360
  list: async (marketId, options) => {
361
361
  return httpClient.get(`/${marketId}/lists`, buildListQueryParams(options));
@@ -5735,7 +5735,7 @@ const uploadSingleFile = async (input, token) => {
5735
5735
  };
5736
5736
 
5737
5737
  // Multipart Upload for Media to the MARTEYE Media Service
5738
- function create$i() {
5738
+ function create$h() {
5739
5739
  const files = {
5740
5740
  uploadSingleFile: async (input, token) => {
5741
5741
  return await uploadSingleFile(input, token);
@@ -5750,7 +5750,7 @@ function create$i() {
5750
5750
  return files;
5751
5751
  }
5752
5752
 
5753
- function create$h(httpClient) {
5753
+ function create$g(httpClient) {
5754
5754
  const invoices = {
5755
5755
  /**
5756
5756
  * List all invoices for a market with pagination
@@ -5778,7 +5778,7 @@ function create$h(httpClient) {
5778
5778
  return invoices;
5779
5779
  }
5780
5780
 
5781
- function create$g(httpClient) {
5781
+ function create$f(httpClient) {
5782
5782
  return {
5783
5783
  create: async (marketId, saleId, lotId, data) => {
5784
5784
  return httpClient.post(`/${marketId}/sales/${saleId}/lots/${lotId}/items`, data);
@@ -5795,7 +5795,7 @@ function create$g(httpClient) {
5795
5795
  /**
5796
5796
  * Defines the possible status values for a lot in a sale
5797
5797
  */
5798
- function create$f(httpClient) {
5798
+ function create$e(httpClient) {
5799
5799
  return {
5800
5800
  get: async (marketId, saleId, lotId, options) => {
5801
5801
  return httpClient.get(`/${marketId}/sales/${saleId}/lots/${lotId}`, (options === null || options === void 0 ? void 0 : options.at) ? { at: options.at } : undefined);
@@ -5824,7 +5824,7 @@ function create$f(httpClient) {
5824
5824
  };
5825
5825
  }
5826
5826
 
5827
- function create$e(httpClient) {
5827
+ function create$d(httpClient) {
5828
5828
  const markets = {
5829
5829
  get: async (marketId, options) => {
5830
5830
  return httpClient.get(`/${marketId}`, (options === null || options === void 0 ? void 0 : options.at) ? { at: options.at } : undefined);
@@ -5846,7 +5846,7 @@ function create$e(httpClient) {
5846
5846
  return markets;
5847
5847
  }
5848
5848
 
5849
- function create$d(httpClient) {
5849
+ function create$c(httpClient) {
5850
5850
  let members = {
5851
5851
  /**
5852
5852
  * List members (staff accounts) for a market with pagination
@@ -5877,7 +5877,7 @@ function create$d(httpClient) {
5877
5877
  return members;
5878
5878
  }
5879
5879
 
5880
- function create$c(httpClient) {
5880
+ function create$b(httpClient) {
5881
5881
  const payments = {
5882
5882
  /**
5883
5883
  * List all payments for a market with pagination
@@ -5905,7 +5905,7 @@ function create$c(httpClient) {
5905
5905
  return payments;
5906
5906
  }
5907
5907
 
5908
- function create$b(httpClient) {
5908
+ function create$a(httpClient) {
5909
5909
  const payouts = {
5910
5910
  /**
5911
5911
  * List all payouts for a market with pagination
@@ -5944,7 +5944,7 @@ function create$b(httpClient) {
5944
5944
  return payouts;
5945
5945
  }
5946
5946
 
5947
- function create$a(httpClient) {
5947
+ function create$9(httpClient) {
5948
5948
  return {
5949
5949
  list: async (marketId) => {
5950
5950
  return httpClient.get(`/${marketId}/product-codes`);
@@ -5961,43 +5961,6 @@ function create$a(httpClient) {
5961
5961
  };
5962
5962
  }
5963
5963
 
5964
- function create$9(httpClient) {
5965
- let reports = {
5966
- getDebtOperationalOverview: async (marketId, options) => {
5967
- let queryParams = {};
5968
- if ((options === null || options === void 0 ? void 0 : options.comparisonDays) !== undefined) {
5969
- queryParams.comparisonDays = options.comparisonDays;
5970
- }
5971
- return httpClient.get(`/${marketId}/debt/operational-overview`, queryParams);
5972
- },
5973
- getDebtBehavior: async (marketId, options) => {
5974
- let overview = await reports.getDebtOperationalOverview(marketId, options);
5975
- return {
5976
- customers: overview.customers.map((customer) => ({
5977
- customerId: customer.customerId,
5978
- displayName: customer.displayName,
5979
- accountNumber: customer.accountNumber,
5980
- balanceInCents: customer.balanceInCents,
5981
- balanceXDaysAgoInCents: customer.balanceXDaysAgoInCents,
5982
- balanceChangeInCents: customer.balanceChangeInCents,
5983
- balanceChangePercent: customer.balanceChangePercent,
5984
- paymentBehavior: customer.paymentBehavior,
5985
- warningSignCodes: customer.warningSignCodes,
5986
- warningSignLabels: customer.warningSignLabels,
5987
- })),
5988
- };
5989
- },
5990
- getDebtProduct: async (marketId, options) => {
5991
- let queryParams = {};
5992
- if ((options === null || options === void 0 ? void 0 : options.limit) !== undefined) {
5993
- queryParams.limit = options.limit;
5994
- }
5995
- return httpClient.get(`/${marketId}/debt/outstanding-by-product`, queryParams);
5996
- },
5997
- };
5998
- return reports;
5999
- }
6000
-
6001
5964
  function create$8(httpClient) {
6002
5965
  return {
6003
5966
  get: async (marketId, saleId, options) => {
@@ -6199,32 +6162,31 @@ function create(_) {
6199
6162
 
6200
6163
  function resources(httpClient) {
6201
6164
  return {
6202
- activity: create$q(httpClient),
6203
- broadcast: create$l(httpClient),
6204
- markets: create$e(httpClient),
6205
- members: create$d(httpClient),
6165
+ activity: create$p(httpClient),
6166
+ broadcast: create$k(httpClient),
6167
+ markets: create$d(httpClient),
6168
+ members: create$c(httpClient),
6206
6169
  sales: create$8(httpClient),
6207
- lots: create$f(httpClient),
6208
- lotitems: create$g(httpClient),
6209
- carts: create$o(httpClient),
6170
+ lots: create$e(httpClient),
6171
+ lotitems: create$f(httpClient),
6172
+ carts: create$n(httpClient),
6210
6173
  cph: create$4(httpClient),
6211
6174
  webhooks: create(),
6212
- actions: create$r(),
6213
- bidderApplications: create$m(httpClient),
6175
+ actions: create$q(),
6176
+ bidderApplications: create$l(httpClient),
6214
6177
  settings: create$5(httpClient),
6215
- adjustments: create$p(httpClient),
6216
- extras: create$n(httpClient),
6217
- productCodes: create$a(httpClient),
6178
+ adjustments: create$o(httpClient),
6179
+ extras: create$m(httpClient),
6180
+ productCodes: create$9(httpClient),
6218
6181
  saleTemplates: create$7(httpClient),
6219
6182
  taxRates: create$1(httpClient),
6220
- customers: create$k(httpClient),
6221
- customerLists: create$j(httpClient),
6222
- invoices: create$h(httpClient),
6223
- payments: create$c(httpClient),
6224
- payouts: create$b(httpClient),
6225
- reports: create$9(httpClient),
6183
+ customers: create$j(httpClient),
6184
+ customerLists: create$i(httpClient),
6185
+ invoices: create$g(httpClient),
6186
+ payments: create$b(httpClient),
6187
+ payouts: create$a(httpClient),
6226
6188
  search: create$6(httpClient),
6227
- files: create$i(),
6189
+ files: create$h(),
6228
6190
  contacts: create$3(httpClient),
6229
6191
  ledger: create$2(httpClient),
6230
6192
  };
package/dist/index.js CHANGED
@@ -77,7 +77,7 @@ function SimpleHttpClient(baseUrl, apiKey, fetch, defaultTimeout, debug = false)
77
77
  }
78
78
 
79
79
  // Path: studiojs/src/resources/markets.ts
80
- function create$r(_) {
80
+ function create$q(_) {
81
81
  const actions = {
82
82
  /***
83
83
  * This is used to construct the action from the request body
@@ -107,7 +107,7 @@ function create$r(_) {
107
107
  return actions;
108
108
  }
109
109
 
110
- function create$q(httpClient) {
110
+ function create$p(httpClient) {
111
111
  let activity = {
112
112
  /**
113
113
  * List activity logs for a market with pagination and filtering
@@ -159,7 +159,7 @@ function create$q(httpClient) {
159
159
  return activity;
160
160
  }
161
161
 
162
- function create$p(httpClient) {
162
+ function create$o(httpClient) {
163
163
  return {
164
164
  list: async (marketId) => {
165
165
  return httpClient.get(`/${marketId}/adjustments`);
@@ -176,7 +176,7 @@ function create$p(httpClient) {
176
176
  };
177
177
  }
178
178
 
179
- function create$o(httpClient) {
179
+ function create$n(httpClient) {
180
180
  return {
181
181
  /**
182
182
  * Get the full cart for a customer including extras and uninvoiced lots
@@ -199,7 +199,7 @@ function create$o(httpClient) {
199
199
  };
200
200
  }
201
201
 
202
- function create$n(httpClient) {
202
+ function create$m(httpClient) {
203
203
  return {
204
204
  list: async (marketId) => {
205
205
  return httpClient.get(`/${marketId}/extras`);
@@ -219,7 +219,7 @@ function create$n(httpClient) {
219
219
  /***
220
220
  * Bidder applications
221
221
  */
222
- function create$m(httpClient) {
222
+ function create$l(httpClient) {
223
223
  let applications = {
224
224
  /**
225
225
  * List applications for a market with optional filtering
@@ -302,7 +302,7 @@ function create$m(httpClient) {
302
302
  return applications;
303
303
  }
304
304
 
305
- function create$l(httpClient) {
305
+ function create$k(httpClient) {
306
306
  return {
307
307
  send: async (marketId, data) => httpClient.post(`/${marketId}/broadcast/send`, data),
308
308
  get: async (marketId, type, taskId) => httpClient.get(`/${marketId}/broadcast/${type}/${taskId}`),
@@ -310,7 +310,7 @@ function create$l(httpClient) {
310
310
  }
311
311
 
312
312
  // Path: studiojs/src/resources/markets.ts
313
- function create$k(httpClient) {
313
+ function create$j(httpClient) {
314
314
  let customers = {
315
315
  list: async (marketId, lastId) => {
316
316
  let params = {};
@@ -359,7 +359,7 @@ function create$k(httpClient) {
359
359
 
360
360
  const DEFAULT_PAGE_SIZE = 100;
361
361
  const MAX_MEMBER_BATCH_SIZE = 100;
362
- function create$j(httpClient) {
362
+ function create$i(httpClient) {
363
363
  const customerLists = {
364
364
  list: async (marketId, options) => {
365
365
  return httpClient.get(`/${marketId}/lists`, buildListQueryParams(options));
@@ -5739,7 +5739,7 @@ const uploadSingleFile = async (input, token) => {
5739
5739
  };
5740
5740
 
5741
5741
  // Multipart Upload for Media to the MARTEYE Media Service
5742
- function create$i() {
5742
+ function create$h() {
5743
5743
  const files = {
5744
5744
  uploadSingleFile: async (input, token) => {
5745
5745
  return await uploadSingleFile(input, token);
@@ -5754,7 +5754,7 @@ function create$i() {
5754
5754
  return files;
5755
5755
  }
5756
5756
 
5757
- function create$h(httpClient) {
5757
+ function create$g(httpClient) {
5758
5758
  const invoices = {
5759
5759
  /**
5760
5760
  * List all invoices for a market with pagination
@@ -5782,7 +5782,7 @@ function create$h(httpClient) {
5782
5782
  return invoices;
5783
5783
  }
5784
5784
 
5785
- function create$g(httpClient) {
5785
+ function create$f(httpClient) {
5786
5786
  return {
5787
5787
  create: async (marketId, saleId, lotId, data) => {
5788
5788
  return httpClient.post(`/${marketId}/sales/${saleId}/lots/${lotId}/items`, data);
@@ -5799,7 +5799,7 @@ function create$g(httpClient) {
5799
5799
  /**
5800
5800
  * Defines the possible status values for a lot in a sale
5801
5801
  */
5802
- function create$f(httpClient) {
5802
+ function create$e(httpClient) {
5803
5803
  return {
5804
5804
  get: async (marketId, saleId, lotId, options) => {
5805
5805
  return httpClient.get(`/${marketId}/sales/${saleId}/lots/${lotId}`, (options === null || options === void 0 ? void 0 : options.at) ? { at: options.at } : undefined);
@@ -5828,7 +5828,7 @@ function create$f(httpClient) {
5828
5828
  };
5829
5829
  }
5830
5830
 
5831
- function create$e(httpClient) {
5831
+ function create$d(httpClient) {
5832
5832
  const markets = {
5833
5833
  get: async (marketId, options) => {
5834
5834
  return httpClient.get(`/${marketId}`, (options === null || options === void 0 ? void 0 : options.at) ? { at: options.at } : undefined);
@@ -5850,7 +5850,7 @@ function create$e(httpClient) {
5850
5850
  return markets;
5851
5851
  }
5852
5852
 
5853
- function create$d(httpClient) {
5853
+ function create$c(httpClient) {
5854
5854
  let members = {
5855
5855
  /**
5856
5856
  * List members (staff accounts) for a market with pagination
@@ -5881,7 +5881,7 @@ function create$d(httpClient) {
5881
5881
  return members;
5882
5882
  }
5883
5883
 
5884
- function create$c(httpClient) {
5884
+ function create$b(httpClient) {
5885
5885
  const payments = {
5886
5886
  /**
5887
5887
  * List all payments for a market with pagination
@@ -5909,7 +5909,7 @@ function create$c(httpClient) {
5909
5909
  return payments;
5910
5910
  }
5911
5911
 
5912
- function create$b(httpClient) {
5912
+ function create$a(httpClient) {
5913
5913
  const payouts = {
5914
5914
  /**
5915
5915
  * List all payouts for a market with pagination
@@ -5948,7 +5948,7 @@ function create$b(httpClient) {
5948
5948
  return payouts;
5949
5949
  }
5950
5950
 
5951
- function create$a(httpClient) {
5951
+ function create$9(httpClient) {
5952
5952
  return {
5953
5953
  list: async (marketId) => {
5954
5954
  return httpClient.get(`/${marketId}/product-codes`);
@@ -5965,43 +5965,6 @@ function create$a(httpClient) {
5965
5965
  };
5966
5966
  }
5967
5967
 
5968
- function create$9(httpClient) {
5969
- let reports = {
5970
- getDebtOperationalOverview: async (marketId, options) => {
5971
- let queryParams = {};
5972
- if ((options === null || options === void 0 ? void 0 : options.comparisonDays) !== undefined) {
5973
- queryParams.comparisonDays = options.comparisonDays;
5974
- }
5975
- return httpClient.get(`/${marketId}/debt/operational-overview`, queryParams);
5976
- },
5977
- getDebtBehavior: async (marketId, options) => {
5978
- let overview = await reports.getDebtOperationalOverview(marketId, options);
5979
- return {
5980
- customers: overview.customers.map((customer) => ({
5981
- customerId: customer.customerId,
5982
- displayName: customer.displayName,
5983
- accountNumber: customer.accountNumber,
5984
- balanceInCents: customer.balanceInCents,
5985
- balanceXDaysAgoInCents: customer.balanceXDaysAgoInCents,
5986
- balanceChangeInCents: customer.balanceChangeInCents,
5987
- balanceChangePercent: customer.balanceChangePercent,
5988
- paymentBehavior: customer.paymentBehavior,
5989
- warningSignCodes: customer.warningSignCodes,
5990
- warningSignLabels: customer.warningSignLabels,
5991
- })),
5992
- };
5993
- },
5994
- getDebtProduct: async (marketId, options) => {
5995
- let queryParams = {};
5996
- if ((options === null || options === void 0 ? void 0 : options.limit) !== undefined) {
5997
- queryParams.limit = options.limit;
5998
- }
5999
- return httpClient.get(`/${marketId}/debt/outstanding-by-product`, queryParams);
6000
- },
6001
- };
6002
- return reports;
6003
- }
6004
-
6005
5968
  function create$8(httpClient) {
6006
5969
  return {
6007
5970
  get: async (marketId, saleId, options) => {
@@ -6203,32 +6166,31 @@ function create(_) {
6203
6166
 
6204
6167
  function resources(httpClient) {
6205
6168
  return {
6206
- activity: create$q(httpClient),
6207
- broadcast: create$l(httpClient),
6208
- markets: create$e(httpClient),
6209
- members: create$d(httpClient),
6169
+ activity: create$p(httpClient),
6170
+ broadcast: create$k(httpClient),
6171
+ markets: create$d(httpClient),
6172
+ members: create$c(httpClient),
6210
6173
  sales: create$8(httpClient),
6211
- lots: create$f(httpClient),
6212
- lotitems: create$g(httpClient),
6213
- carts: create$o(httpClient),
6174
+ lots: create$e(httpClient),
6175
+ lotitems: create$f(httpClient),
6176
+ carts: create$n(httpClient),
6214
6177
  cph: create$4(httpClient),
6215
6178
  webhooks: create(),
6216
- actions: create$r(),
6217
- bidderApplications: create$m(httpClient),
6179
+ actions: create$q(),
6180
+ bidderApplications: create$l(httpClient),
6218
6181
  settings: create$5(httpClient),
6219
- adjustments: create$p(httpClient),
6220
- extras: create$n(httpClient),
6221
- productCodes: create$a(httpClient),
6182
+ adjustments: create$o(httpClient),
6183
+ extras: create$m(httpClient),
6184
+ productCodes: create$9(httpClient),
6222
6185
  saleTemplates: create$7(httpClient),
6223
6186
  taxRates: create$1(httpClient),
6224
- customers: create$k(httpClient),
6225
- customerLists: create$j(httpClient),
6226
- invoices: create$h(httpClient),
6227
- payments: create$c(httpClient),
6228
- payouts: create$b(httpClient),
6229
- reports: create$9(httpClient),
6187
+ customers: create$j(httpClient),
6188
+ customerLists: create$i(httpClient),
6189
+ invoices: create$g(httpClient),
6190
+ payments: create$b(httpClient),
6191
+ payouts: create$a(httpClient),
6230
6192
  search: create$6(httpClient),
6231
- files: create$i(),
6193
+ files: create$h(),
6232
6194
  contacts: create$3(httpClient),
6233
6195
  ledger: create$2(httpClient),
6234
6196
  };
@@ -267,11 +267,6 @@ export default function resources(httpClient: HttpClient): {
267
267
  get: (marketId: string, payoutId: string) => Promise<import("./types").Payout>;
268
268
  create: (marketId: string, data: import("./resources/payouts").CreatePayoutRequest) => Promise<import("./resources/payouts").PayoutCreateResponse>;
269
269
  };
270
- reports: {
271
- getDebtOperationalOverview: (marketId: string, options?: import("./types").DebtOperationalOverviewOptions | undefined) => Promise<import("./types").DebtOperationalOverviewResponse>;
272
- getDebtBehavior: (marketId: string, options?: import("./types").DebtOperationalOverviewOptions | undefined) => Promise<import("./types").DebtBehaviorResponse>;
273
- getDebtProduct: (marketId: string, options?: import("./types").DebtProductOptions | undefined) => Promise<import("./types").DebtProductResponse>;
274
- };
275
270
  search: {
276
271
  query: (marketId: string, query: string) => Promise<import("./resources/search").SearchResult>;
277
272
  };
package/dist/studio.d.ts CHANGED
@@ -276,11 +276,6 @@ export declare function Studio(info?: {
276
276
  get: (marketId: string, payoutId: string) => Promise<import("./types").Payout>;
277
277
  create: (marketId: string, data: import("./resources/payouts").CreatePayoutRequest) => Promise<import("./resources/payouts").PayoutCreateResponse>;
278
278
  };
279
- reports: {
280
- getDebtOperationalOverview: (marketId: string, options?: import("./types").DebtOperationalOverviewOptions | undefined) => Promise<import("./types").DebtOperationalOverviewResponse>;
281
- getDebtBehavior: (marketId: string, options?: import("./types").DebtOperationalOverviewOptions | undefined) => Promise<import("./types").DebtBehaviorResponse>;
282
- getDebtProduct: (marketId: string, options?: import("./types").DebtProductOptions | undefined) => Promise<import("./types").DebtProductResponse>;
283
- };
284
279
  search: {
285
280
  query: (marketId: string, query: string) => Promise<import("./resources/search").SearchResult>;
286
281
  };
package/dist/types.d.ts CHANGED
@@ -1201,6 +1201,8 @@ export interface SendSMSPayload {
1201
1201
  }
1202
1202
  export type BroadcastType = "sms" | "email";
1203
1203
  export type BroadcastKind = "broadcast" | "statement";
1204
+ export type EmailDeliveryClass = "transactional" | "broadcast";
1205
+ export type PostmarkMessageStream = "outbound" | "broadcast";
1204
1206
  export interface BroadcastRecipient {
1205
1207
  customerId: string;
1206
1208
  displayName?: string;
@@ -1279,6 +1281,8 @@ export interface EmailTask {
1279
1281
  customerId: string;
1280
1282
  accountNumber?: string;
1281
1283
  templateId: string;
1284
+ deliveryClass?: EmailDeliveryClass;
1285
+ postmarkMessageStream?: PostmarkMessageStream;
1282
1286
  to: string[];
1283
1287
  documents?: string[];
1284
1288
  data: Record<string, any>;
@@ -1301,112 +1305,4 @@ export interface EmailTask {
1301
1305
  }[];
1302
1306
  }
1303
1307
  export type BroadcastTask = SMSTask | EmailTask;
1304
- export interface DebtOperationalOverviewOptions {
1305
- comparisonDays?: number;
1306
- }
1307
- export interface DebtPaymentHistoryPoint {
1308
- date: string;
1309
- daysToPay: number;
1310
- }
1311
- export interface DebtRecentPaymentInfo {
1312
- date: string;
1313
- amountInCents: number;
1314
- daysToPay: number;
1315
- }
1316
- export interface DebtPaymentBehavior {
1317
- avgDaysToPay: number | null;
1318
- paymentConsistency: "consistent" | "variable" | "erratic" | null;
1319
- recentTrend: "improving" | "stable" | "worsening" | null;
1320
- paymentHistory: DebtPaymentHistoryPoint[];
1321
- lastPayments: DebtRecentPaymentInfo[];
1322
- debtorDaysDSO: number | null;
1323
- debtorDaysDSO30DaysAgo: number | null;
1324
- }
1325
- export interface DebtOutstandingInvoice {
1326
- invoiceId: string;
1327
- issuedAtSeconds: number;
1328
- amountDueInCents: number;
1329
- riskCategory?: "low" | "medium" | "high" | "critical";
1330
- }
1331
- export interface DebtOperationalCustomer {
1332
- customerId: string;
1333
- displayName: string | null;
1334
- accountNumber: string | null;
1335
- balanceInCents: number;
1336
- balanceXDaysAgoInCents: number | null;
1337
- balanceChangeInCents: number | null;
1338
- balanceChangePercent: number | null;
1339
- lastPaymentDateSeconds: number | null;
1340
- daysSinceLastPayment: number | null;
1341
- outstandingInvoices: DebtOutstandingInvoice[];
1342
- warningSignCodes: Array<"paying_slower" | "buying_more_paying_less" | "stopped_paying" | "late_payments" | "high_risk_invoice">;
1343
- warningSignLabels: string[];
1344
- gmvLast30DaysInCents: number;
1345
- paymentsLast30DaysInCents: number;
1346
- ageBucket0to6: number;
1347
- ageBucket7to13: number;
1348
- ageBucket14to20: number;
1349
- ageBucket21to27: number;
1350
- ageBucket28to34: number;
1351
- ageBucket35plus: number;
1352
- avgDaysToPayRecent: number | null;
1353
- avgDaysToPayBaseline: number | null;
1354
- hasHighRiskInvoice: boolean;
1355
- invoiceCount: number;
1356
- paymentBehavior: DebtPaymentBehavior;
1357
- }
1358
- export interface DebtOperationalInvoice {
1359
- invoiceId: string;
1360
- customerId: string;
1361
- issuedAtSeconds: number;
1362
- amountDueInCents: number;
1363
- daysOutstanding: number;
1364
- expectedPayDays: number | null;
1365
- daysOverdue: number | null;
1366
- riskCategory: "low" | "medium" | "high" | "critical";
1367
- customerWarnings: Array<"paying_slower" | "buying_more_paying_less" | "stopped_paying" | "late_payments" | "high_risk_invoice">;
1368
- customerAvgDaysToPay: number | null;
1369
- }
1370
- export interface DebtOperationalOverviewResponse {
1371
- customers: DebtOperationalCustomer[];
1372
- invoices: DebtOperationalInvoice[];
1373
- }
1374
- export interface DebtBehaviorCustomer {
1375
- customerId: string;
1376
- displayName: string | null;
1377
- accountNumber: string | null;
1378
- balanceInCents: number;
1379
- balanceXDaysAgoInCents: number | null;
1380
- balanceChangeInCents: number | null;
1381
- balanceChangePercent: number | null;
1382
- paymentBehavior: DebtPaymentBehavior;
1383
- warningSignCodes: DebtOperationalCustomer["warningSignCodes"];
1384
- warningSignLabels: string[];
1385
- }
1386
- export interface DebtBehaviorResponse {
1387
- customers: DebtBehaviorCustomer[];
1388
- }
1389
- export interface DebtProductOptions {
1390
- limit?: number;
1391
- }
1392
- export interface DebtProductInvoice {
1393
- invoiceId: string;
1394
- outstandingInMilliCents: number;
1395
- issuedAtSeconds: number;
1396
- }
1397
- export interface DebtProductCustomer {
1398
- owner: string | null;
1399
- customerId: string | null;
1400
- outstandingInMilliCents: number;
1401
- invoices: DebtProductInvoice[];
1402
- }
1403
- export interface DebtProductRow {
1404
- productCode: string | null;
1405
- totalOutstandingInMilliCents: number;
1406
- customers: DebtProductCustomer[];
1407
- }
1408
- export interface DebtProductResponse {
1409
- outstandingByProduct: DebtProductRow[];
1410
- overallOutstandingInMilliCents: number;
1411
- }
1412
1308
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marteye/studiojs",
3
- "version": "1.1.48-beta.0",
3
+ "version": "1.1.48",
4
4
  "description": "MartEye Studio JavaScript SDK",
5
5
  "license": "MIT",
6
6
  "source": "src/index.ts",
@@ -1,8 +0,0 @@
1
- import { HttpClient } from "../net/http";
2
- import { DebtBehaviorResponse, DebtOperationalOverviewOptions, DebtOperationalOverviewResponse, DebtProductOptions, DebtProductResponse } from "../types";
3
- export default function create(httpClient: HttpClient): {
4
- getDebtOperationalOverview: (marketId: string, options?: DebtOperationalOverviewOptions) => Promise<DebtOperationalOverviewResponse>;
5
- getDebtBehavior: (marketId: string, options?: DebtOperationalOverviewOptions) => Promise<DebtBehaviorResponse>;
6
- getDebtProduct: (marketId: string, options?: DebtProductOptions) => Promise<DebtProductResponse>;
7
- };
8
- export type Reports = ReturnType<typeof create>;