@marteye/studiojs 1.1.37 → 1.1.39
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 +182 -2
- package/dist/index.esm.js +247 -61
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +247 -61
- package/dist/index.js.map +1 -1
- package/dist/resources/activity.d.ts +35 -0
- package/dist/resources/carts.d.ts +35 -0
- package/dist/resources/ledger.d.ts +79 -0
- package/dist/resources/payouts.d.ts +34 -0
- package/dist/resources/sales.d.ts +2 -1
- package/dist/resources.d.ts +17 -0
- package/dist/studio.d.ts +17 -0
- package/dist/types.d.ts +33 -0
- package/dist/utils/lots.d.ts +7 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,48 @@ declare function SimpleHttpClient(baseUrl: string, apiKey: string, fetch: any, d
|
|
|
8
8
|
};
|
|
9
9
|
type HttpClient = ReturnType<typeof SimpleHttpClient>;
|
|
10
10
|
|
|
11
|
+
interface LedgerBalanceResponse {
|
|
12
|
+
balanceInCents: number;
|
|
13
|
+
}
|
|
14
|
+
interface LedgerTransaction {
|
|
15
|
+
id: string;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
18
|
+
transactionDate: string;
|
|
19
|
+
marketId: string;
|
|
20
|
+
account: string;
|
|
21
|
+
rollUpAccounts: string[];
|
|
22
|
+
accountType: "income" | "expense" | "asset" | "liability" | "equity";
|
|
23
|
+
accountName: string;
|
|
24
|
+
owner: "market" | string;
|
|
25
|
+
isMarketAccount: boolean;
|
|
26
|
+
amountInCents: number;
|
|
27
|
+
batchId: string;
|
|
28
|
+
batchDescription: string;
|
|
29
|
+
referenceId: string;
|
|
30
|
+
referenceType: string;
|
|
31
|
+
referenceTxnCount: number;
|
|
32
|
+
referenceGroupKey: string;
|
|
33
|
+
tags: Record<string, string | number | boolean>;
|
|
34
|
+
parentTransactionId: string | null;
|
|
35
|
+
currentBalanceInCents: number;
|
|
36
|
+
sumOfCreditsInCents: number;
|
|
37
|
+
sumOfDebitsInCents: number;
|
|
38
|
+
index: number;
|
|
39
|
+
}
|
|
40
|
+
interface TransactionsListResponse {
|
|
41
|
+
transactions: LedgerTransaction[];
|
|
42
|
+
nextCursor: string | null;
|
|
43
|
+
hasMore: boolean;
|
|
44
|
+
}
|
|
45
|
+
interface ListTransactionsParams {
|
|
46
|
+
account: string;
|
|
47
|
+
dateFrom?: string;
|
|
48
|
+
dateTo?: string;
|
|
49
|
+
limit?: number;
|
|
50
|
+
cursor?: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
11
53
|
type Timestamp = string;
|
|
12
54
|
type ClientType = "Seller" | "Buyer";
|
|
13
55
|
type SuperType = "Sheep" | "Goats" | "Cattle" | "Pigs" | "Horses" | "Deer" | "Poultry" | "Machinery" | "Antiques" | "Other";
|
|
@@ -56,6 +98,7 @@ interface SettingsMarketDefaults {
|
|
|
56
98
|
defaultUnitOfSale: UnitOfSale;
|
|
57
99
|
defaultSuperType?: SuperType | null;
|
|
58
100
|
defaultSettleDebtsFirst?: boolean;
|
|
101
|
+
liveEmailsEnabled?: boolean;
|
|
59
102
|
lotDescriptionTemplateMap?: {
|
|
60
103
|
default: string | undefined;
|
|
61
104
|
[supertype: string]: string | undefined;
|
|
@@ -119,6 +162,7 @@ type DisplayBoardMode = "off" | "live" | "manual" | {
|
|
|
119
162
|
type: "focused";
|
|
120
163
|
field: string;
|
|
121
164
|
};
|
|
165
|
+
type SalePublishStatus = "unpublished" | "sale" | "saleAndCatalog";
|
|
122
166
|
interface Sale {
|
|
123
167
|
id: string;
|
|
124
168
|
createdAt: Timestamp;
|
|
@@ -186,6 +230,13 @@ interface Sale {
|
|
|
186
230
|
};
|
|
187
231
|
};
|
|
188
232
|
editedBy?: string[];
|
|
233
|
+
/**
|
|
234
|
+
* Publishing status for external systems
|
|
235
|
+
* - unpublished: Not listed in external system
|
|
236
|
+
* - sale: Sale date is listed externally
|
|
237
|
+
* - saleAndCatalog: Sale and catalog information synced
|
|
238
|
+
*/
|
|
239
|
+
publishStatus?: SalePublishStatus;
|
|
189
240
|
}
|
|
190
241
|
interface TemplateSaleData {
|
|
191
242
|
name?: string;
|
|
@@ -630,6 +681,7 @@ interface Customer {
|
|
|
630
681
|
notes?: string;
|
|
631
682
|
status?: "archived" | "deleted" | null;
|
|
632
683
|
deleteAfter?: Timestamp;
|
|
684
|
+
casualBuyerLabels?: string[];
|
|
633
685
|
}
|
|
634
686
|
interface CustomerFromSearch extends Omit<Customer, "createdAt" | "updatedAt" | "lastItemPurchaseDate" | "lastItemSaleDate"> {
|
|
635
687
|
createdAt: number;
|
|
@@ -1066,6 +1118,7 @@ interface AttributeDefinition {
|
|
|
1066
1118
|
prefillableFromPreviousLot?: boolean;
|
|
1067
1119
|
hidden?: boolean;
|
|
1068
1120
|
showInSellerDetailsPanel?: boolean;
|
|
1121
|
+
showInSellerReviewPanel?: boolean;
|
|
1069
1122
|
displayTemplate?: string;
|
|
1070
1123
|
displayTemplateMultiValue?: string;
|
|
1071
1124
|
type: SupportedAttributeTypes;
|
|
@@ -1116,8 +1169,33 @@ interface CphLookupResponse {
|
|
|
1116
1169
|
cphValid?: boolean | null;
|
|
1117
1170
|
farmName?: string | null;
|
|
1118
1171
|
}
|
|
1172
|
+
type ActivityOperation = "created" | "updated" | "deleted" | "voided";
|
|
1173
|
+
interface ActivityChange {
|
|
1174
|
+
before?: any;
|
|
1175
|
+
after?: any;
|
|
1176
|
+
}
|
|
1177
|
+
interface ActivityLog {
|
|
1178
|
+
id: string;
|
|
1179
|
+
firstEventAt: Timestamp;
|
|
1180
|
+
lastEventAt: Timestamp;
|
|
1181
|
+
userId: string | null;
|
|
1182
|
+
userName?: string;
|
|
1183
|
+
eventType: WebhookEventName;
|
|
1184
|
+
entityType: ObjectType;
|
|
1185
|
+
entityId: string;
|
|
1186
|
+
entityLabel?: string;
|
|
1187
|
+
saleIds: string[];
|
|
1188
|
+
operation: ActivityOperation;
|
|
1189
|
+
changeCount: number;
|
|
1190
|
+
changes?: {
|
|
1191
|
+
[fieldPath: string]: ActivityChange;
|
|
1192
|
+
};
|
|
1193
|
+
}
|
|
1119
1194
|
|
|
1120
1195
|
type types_Accessory = Accessory;
|
|
1196
|
+
type types_ActivityChange = ActivityChange;
|
|
1197
|
+
type types_ActivityLog = ActivityLog;
|
|
1198
|
+
type types_ActivityOperation = ActivityOperation;
|
|
1121
1199
|
type types_Address = Address;
|
|
1122
1200
|
type types_AddressWrapper = AddressWrapper;
|
|
1123
1201
|
type types_AdjustmentTarget = AdjustmentTarget;
|
|
@@ -1182,6 +1260,7 @@ type types_ProductCodeConfiguration = ProductCodeConfiguration;
|
|
|
1182
1260
|
type types_ProductConfiguration = ProductConfiguration;
|
|
1183
1261
|
type types_Sale = Sale;
|
|
1184
1262
|
type types_SaleFromSearch = SaleFromSearch;
|
|
1263
|
+
type types_SalePublishStatus = SalePublishStatus;
|
|
1185
1264
|
type types_SaleTemplate = SaleTemplate;
|
|
1186
1265
|
type types_SettingsAccessories = SettingsAccessories;
|
|
1187
1266
|
type types_SettingsAdjustmentsConfiguration = SettingsAdjustmentsConfiguration;
|
|
@@ -1214,7 +1293,7 @@ type types_WebhookEventName = WebhookEventName;
|
|
|
1214
1293
|
declare const types_supportedWebhookEvents: typeof supportedWebhookEvents;
|
|
1215
1294
|
declare namespace types {
|
|
1216
1295
|
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 };
|
|
1217
|
-
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_CphLookupResponse as CphLookupResponse, types_CurrenciesWithGuinea as CurrenciesWithGuinea, types_Currency as Currency, types_Customer as Customer, types_CustomerBankDetails as CustomerBankDetails, types_CustomerContact as CustomerContact, types_CustomerFromSearch as CustomerFromSearch, types_DeviceType as DeviceType, types_DisplayBoardMode as DisplayBoardMode, types_DraftInvoice as DraftInvoice, types_EmailWrapper as EmailWrapper, types_FarmAssurances as FarmAssurances, types_FieldPositions as FieldPositions, types_ImageSizes as ImageSizes, types_IncrementLadder as IncrementLadder, types_IncrementLadderItem as IncrementLadderItem, types_Invoice as Invoice, types_InvoiceDeliveryPreference as InvoiceDeliveryPreference, types_InvoiceField as InvoiceField, types_InvoiceLineItem as InvoiceLineItem, types_InvoiceTotalAdjustmentConfiguration as InvoiceTotalAdjustmentConfiguration, types_InvoiceTotals as InvoiceTotals, types_LineItemAdjustmentConfiguration as LineItemAdjustmentConfiguration, types_Lot as Lot, types_LotGeneratedValues as LotGeneratedValues, types_LotIssue as LotIssue, types_LotItem as LotItem, types_LotSaleStatus as LotSaleStatus, types_LotWithItemsAsArray as LotWithItemsAsArray, types_Market as Market, types_MarketBankDetails as MarketBankDetails, types_MarketReportHeaders as MarketReportHeaders, types_MartEyeLiveSaleSettings as MartEyeLiveSaleSettings, types_MartEyeTimedSaleSettings as MartEyeTimedSaleSettings, types_Media as Media, types_MemberSharingConfiguration as MemberSharingConfiguration, types_ObjectType as ObjectType, types_Payment as Payment, types_PaymentMethod as PaymentMethod, types_Payout as Payout, types_PayoutMethod as PayoutMethod, types_PhoneNumberWrapper as PhoneNumberWrapper, types_Printer as Printer, types_Product as Product, types_ProductCodeConfiguration as ProductCodeConfiguration, types_ProductConfiguration as ProductConfiguration, types_Sale as Sale, types_SaleFromSearch as SaleFromSearch, types_SaleTemplate as SaleTemplate, types_SettingsAccessories as SettingsAccessories, types_SettingsAdjustmentsConfiguration as SettingsAdjustmentsConfiguration, types_SettingsGlobalAttributes as SettingsGlobalAttributes, types_SettingsMarketDefaults as SettingsMarketDefaults, types_SettingsPrinters as SettingsPrinters, types_SettingsProductCodes as SettingsProductCodes, types_SettingsTaxRates as SettingsTaxRates, types_ShortCustomerDetails as ShortCustomerDetails, types_SimplePaymentIn as SimplePaymentIn, types_SimplePaymentOut as SimplePaymentOut, types_StoredDataGridConfig as StoredDataGridConfig, types_StudioAppPartial as StudioAppPartial, types_SubtotalGroups as SubtotalGroups, types_SuperType as SuperType, types_SupportedAttributeTypes as SupportedAttributeTypes, types_SupportedCountryCode as SupportedCountryCode, SupportedFileTypesNames$1 as SupportedFileTypesNames, types_TablePosition as TablePosition, types_TaxRate as TaxRate, types_TemplateSaleData as TemplateSaleData, types_UnitOfSale as UnitOfSale, types_VideoTasks as VideoTasks, types_WebhookEvent as WebhookEvent, types_WebhookEventName as WebhookEventName };
|
|
1296
|
+
export type { types_Accessory as Accessory, types_ActivityChange as ActivityChange, types_ActivityLog as ActivityLog, types_ActivityOperation as ActivityOperation, types_Address as Address, types_AddressWrapper as AddressWrapper, types_AdjustmentTarget as AdjustmentTarget, types_AdjustmentTotalTarget as AdjustmentTotalTarget, types_AdjustmentsConfiguration as AdjustmentsConfiguration, types_AppParameterConfig as AppParameterConfig, types_Application as Application, types_AttributeDefinition as AttributeDefinition, types_AttributeValueType as AttributeValueType, types_BankDetails as BankDetails, types_Cart as Cart, types_CartItem as CartItem, types_ChequeField as ChequeField, types_ClientType as ClientType, types_CphLookupResponse as CphLookupResponse, types_CurrenciesWithGuinea as CurrenciesWithGuinea, types_Currency as Currency, types_Customer as Customer, types_CustomerBankDetails as CustomerBankDetails, types_CustomerContact as CustomerContact, types_CustomerFromSearch as CustomerFromSearch, types_DeviceType as DeviceType, types_DisplayBoardMode as DisplayBoardMode, types_DraftInvoice as DraftInvoice, types_EmailWrapper as EmailWrapper, types_FarmAssurances as FarmAssurances, types_FieldPositions as FieldPositions, types_ImageSizes as ImageSizes, types_IncrementLadder as IncrementLadder, types_IncrementLadderItem as IncrementLadderItem, types_Invoice as Invoice, types_InvoiceDeliveryPreference as InvoiceDeliveryPreference, types_InvoiceField as InvoiceField, types_InvoiceLineItem as InvoiceLineItem, types_InvoiceTotalAdjustmentConfiguration as InvoiceTotalAdjustmentConfiguration, types_InvoiceTotals as InvoiceTotals, types_LineItemAdjustmentConfiguration as LineItemAdjustmentConfiguration, types_Lot as Lot, types_LotGeneratedValues as LotGeneratedValues, types_LotIssue as LotIssue, types_LotItem as LotItem, types_LotSaleStatus as LotSaleStatus, types_LotWithItemsAsArray as LotWithItemsAsArray, types_Market as Market, types_MarketBankDetails as MarketBankDetails, types_MarketReportHeaders as MarketReportHeaders, types_MartEyeLiveSaleSettings as MartEyeLiveSaleSettings, types_MartEyeTimedSaleSettings as MartEyeTimedSaleSettings, types_Media as Media, types_MemberSharingConfiguration as MemberSharingConfiguration, types_ObjectType as ObjectType, types_Payment as Payment, types_PaymentMethod as PaymentMethod, types_Payout as Payout, types_PayoutMethod as PayoutMethod, types_PhoneNumberWrapper as PhoneNumberWrapper, types_Printer as Printer, types_Product as Product, types_ProductCodeConfiguration as ProductCodeConfiguration, types_ProductConfiguration as ProductConfiguration, types_Sale as Sale, types_SaleFromSearch as SaleFromSearch, types_SalePublishStatus as SalePublishStatus, types_SaleTemplate as SaleTemplate, types_SettingsAccessories as SettingsAccessories, types_SettingsAdjustmentsConfiguration as SettingsAdjustmentsConfiguration, types_SettingsGlobalAttributes as SettingsGlobalAttributes, types_SettingsMarketDefaults as SettingsMarketDefaults, types_SettingsPrinters as SettingsPrinters, types_SettingsProductCodes as SettingsProductCodes, types_SettingsTaxRates as SettingsTaxRates, types_ShortCustomerDetails as ShortCustomerDetails, types_SimplePaymentIn as SimplePaymentIn, types_SimplePaymentOut as SimplePaymentOut, types_StoredDataGridConfig as StoredDataGridConfig, types_StudioAppPartial as StudioAppPartial, types_SubtotalGroups as SubtotalGroups, types_SuperType as SuperType, types_SupportedAttributeTypes as SupportedAttributeTypes, types_SupportedCountryCode as SupportedCountryCode, SupportedFileTypesNames$1 as SupportedFileTypesNames, types_TablePosition as TablePosition, types_TaxRate as TaxRate, types_TemplateSaleData as TemplateSaleData, types_UnitOfSale as UnitOfSale, types_VideoTasks as VideoTasks, types_WebhookEvent as WebhookEvent, types_WebhookEventName as WebhookEventName };
|
|
1218
1297
|
}
|
|
1219
1298
|
|
|
1220
1299
|
interface ListContactsResponse {
|
|
@@ -1346,6 +1425,31 @@ interface PayoutsListResponse {
|
|
|
1346
1425
|
lastId: string | null;
|
|
1347
1426
|
hasMore: boolean;
|
|
1348
1427
|
}
|
|
1428
|
+
interface PayoutCreateResponse {
|
|
1429
|
+
payout: Payout;
|
|
1430
|
+
}
|
|
1431
|
+
interface CreatePayoutRequest {
|
|
1432
|
+
/** IDs of the seller invoices this payout is for. All must be for the same customer and have status "issued". */
|
|
1433
|
+
invoiceIds: string[];
|
|
1434
|
+
/** Payout method */
|
|
1435
|
+
method: "BACS" | "Cheque" | "Cash";
|
|
1436
|
+
/** Payout amount in cents. If not provided, defaults to the sum of amountDueInCents across all invoices. */
|
|
1437
|
+
amountInCents?: number;
|
|
1438
|
+
/** Transaction date (ISO 8601). Defaults to now. */
|
|
1439
|
+
transactionDate?: string;
|
|
1440
|
+
/** Cheque number or BACS reference */
|
|
1441
|
+
reference?: string | null;
|
|
1442
|
+
/** Optional notes */
|
|
1443
|
+
notes?: string | null;
|
|
1444
|
+
/** Account holder name (BACS only). Falls back to customer bank details or display name. */
|
|
1445
|
+
accountName?: string;
|
|
1446
|
+
/** 8-digit account number (BACS only). Falls back to customer bank details. */
|
|
1447
|
+
accountNumber?: string;
|
|
1448
|
+
/** 6-digit sort code (BACS only). Falls back to customer bank details. */
|
|
1449
|
+
sortCode?: string;
|
|
1450
|
+
/** Name on cheque (Cheque only). Falls back to customer display name. */
|
|
1451
|
+
chequeMadePayableTo?: string;
|
|
1452
|
+
}
|
|
1349
1453
|
|
|
1350
1454
|
interface PaymentsListResponse {
|
|
1351
1455
|
payments: Payment[];
|
|
@@ -1501,7 +1605,47 @@ interface ListApplicationsResponse {
|
|
|
1501
1605
|
hasMore: boolean;
|
|
1502
1606
|
}
|
|
1503
1607
|
|
|
1608
|
+
interface LotsBySale {
|
|
1609
|
+
saleId: string;
|
|
1610
|
+
marketId: string;
|
|
1611
|
+
lots: Lot[];
|
|
1612
|
+
}
|
|
1613
|
+
interface CartResponse {
|
|
1614
|
+
customerId: string;
|
|
1615
|
+
extras: CartItem[];
|
|
1616
|
+
lotsBuyingBySale: LotsBySale[];
|
|
1617
|
+
lotsSellingBySale: LotsBySale[];
|
|
1618
|
+
}
|
|
1619
|
+
interface AddExtraPayload {
|
|
1620
|
+
productId: string;
|
|
1621
|
+
clientType: "Seller" | "Buyer";
|
|
1622
|
+
quantity: number;
|
|
1623
|
+
unitPriceInCents: number;
|
|
1624
|
+
passthroughFundsToCustomerId?: string | null;
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
interface ActivityListResponse {
|
|
1628
|
+
data: ActivityLog[];
|
|
1629
|
+
lastId: string | null;
|
|
1630
|
+
hasMore: boolean;
|
|
1631
|
+
}
|
|
1632
|
+
interface ActivityListParams {
|
|
1633
|
+
saleId?: string;
|
|
1634
|
+
entityType?: string;
|
|
1635
|
+
entityId?: string;
|
|
1636
|
+
operation?: string;
|
|
1637
|
+
memberId?: string;
|
|
1638
|
+
from?: string;
|
|
1639
|
+
to?: string;
|
|
1640
|
+
limit?: number;
|
|
1641
|
+
lastId?: string;
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1504
1644
|
declare function resources(httpClient: HttpClient): {
|
|
1645
|
+
activity: {
|
|
1646
|
+
list: (marketId: string, params?: ActivityListParams) => Promise<ActivityListResponse>;
|
|
1647
|
+
get: (marketId: string, activityId: string) => Promise<ActivityLog>;
|
|
1648
|
+
};
|
|
1505
1649
|
markets: {
|
|
1506
1650
|
get: (marketId: string) => Promise<Market>;
|
|
1507
1651
|
};
|
|
@@ -1538,6 +1682,7 @@ declare function resources(httpClient: HttpClient): {
|
|
|
1538
1682
|
recurring?: "Weekly" | "Bi-weekly" | "Monthly" | null;
|
|
1539
1683
|
defaultProductCode?: string;
|
|
1540
1684
|
attributeDefaults?: Record<string, any>;
|
|
1685
|
+
publishStatus?: SalePublishStatus;
|
|
1541
1686
|
marteyeSettings?: {
|
|
1542
1687
|
description?: string;
|
|
1543
1688
|
image?: string;
|
|
@@ -1637,6 +1782,11 @@ declare function resources(httpClient: HttpClient): {
|
|
|
1637
1782
|
}) => Promise<LotItem>;
|
|
1638
1783
|
delete: (marketId: string, saleId: string, lotId: string, itemId: string) => Promise<unknown>;
|
|
1639
1784
|
};
|
|
1785
|
+
carts: {
|
|
1786
|
+
get: (marketId: string, customerId: string) => Promise<CartResponse>;
|
|
1787
|
+
addExtra: (marketId: string, customerId: string, data: AddExtraPayload) => Promise<CartResponse>;
|
|
1788
|
+
removeExtra: (marketId: string, customerId: string, itemId: string) => Promise<void>;
|
|
1789
|
+
};
|
|
1640
1790
|
cph: {
|
|
1641
1791
|
lookup: (marketId: string, cph: string) => Promise<CphLookupResponse>;
|
|
1642
1792
|
};
|
|
@@ -1723,6 +1873,7 @@ declare function resources(httpClient: HttpClient): {
|
|
|
1723
1873
|
payouts: {
|
|
1724
1874
|
list: (marketId: string, lastId?: string | null) => Promise<PayoutsListResponse>;
|
|
1725
1875
|
get: (marketId: string, payoutId: string) => Promise<Payout>;
|
|
1876
|
+
create: (marketId: string, data: CreatePayoutRequest) => Promise<PayoutCreateResponse>;
|
|
1726
1877
|
};
|
|
1727
1878
|
search: {
|
|
1728
1879
|
query: (marketId: string, query: string) => Promise<SearchResult>;
|
|
@@ -1751,6 +1902,12 @@ declare function resources(httpClient: HttpClient): {
|
|
|
1751
1902
|
update: (marketId: string, customerId: string, contactId: string, payload: CreateOrUpdateContactPayload) => Promise<CustomerContact>;
|
|
1752
1903
|
delete: (marketId: string, customerId: string, contactId: string) => Promise<void>;
|
|
1753
1904
|
};
|
|
1905
|
+
ledger: {
|
|
1906
|
+
getBalance: (marketId: string, account: string) => Promise<LedgerBalanceResponse>;
|
|
1907
|
+
getTransaction: (marketId: string, transactionId: string) => Promise<LedgerTransaction>;
|
|
1908
|
+
getLatestTransaction: (marketId: string, account: string) => Promise<LedgerTransaction>;
|
|
1909
|
+
listTransactions: (marketId: string, params: ListTransactionsParams) => Promise<TransactionsListResponse>;
|
|
1910
|
+
};
|
|
1754
1911
|
};
|
|
1755
1912
|
|
|
1756
1913
|
type StudioInstance = ReturnType<typeof resources> & {
|
|
@@ -1763,6 +1920,10 @@ declare function Studio(info?: {
|
|
|
1763
1920
|
debug?: boolean;
|
|
1764
1921
|
}): {
|
|
1765
1922
|
isDebugMode: boolean;
|
|
1923
|
+
activity: {
|
|
1924
|
+
list: (marketId: string, params?: ActivityListParams) => Promise<ActivityListResponse>;
|
|
1925
|
+
get: (marketId: string, activityId: string) => Promise<ActivityLog>;
|
|
1926
|
+
};
|
|
1766
1927
|
markets: {
|
|
1767
1928
|
get: (marketId: string) => Promise<Market>;
|
|
1768
1929
|
};
|
|
@@ -1799,6 +1960,7 @@ declare function Studio(info?: {
|
|
|
1799
1960
|
recurring?: "Weekly" | "Bi-weekly" | "Monthly" | null;
|
|
1800
1961
|
defaultProductCode?: string;
|
|
1801
1962
|
attributeDefaults?: Record<string, any>;
|
|
1963
|
+
publishStatus?: SalePublishStatus;
|
|
1802
1964
|
marteyeSettings?: {
|
|
1803
1965
|
description?: string;
|
|
1804
1966
|
image?: string;
|
|
@@ -1898,6 +2060,11 @@ declare function Studio(info?: {
|
|
|
1898
2060
|
}) => Promise<LotItem>;
|
|
1899
2061
|
delete: (marketId: string, saleId: string, lotId: string, itemId: string) => Promise<unknown>;
|
|
1900
2062
|
};
|
|
2063
|
+
carts: {
|
|
2064
|
+
get: (marketId: string, customerId: string) => Promise<CartResponse>;
|
|
2065
|
+
addExtra: (marketId: string, customerId: string, data: AddExtraPayload) => Promise<CartResponse>;
|
|
2066
|
+
removeExtra: (marketId: string, customerId: string, itemId: string) => Promise<void>;
|
|
2067
|
+
};
|
|
1901
2068
|
cph: {
|
|
1902
2069
|
lookup: (marketId: string, cph: string) => Promise<CphLookupResponse>;
|
|
1903
2070
|
};
|
|
@@ -1984,6 +2151,7 @@ declare function Studio(info?: {
|
|
|
1984
2151
|
payouts: {
|
|
1985
2152
|
list: (marketId: string, lastId?: string | null) => Promise<PayoutsListResponse>;
|
|
1986
2153
|
get: (marketId: string, payoutId: string) => Promise<Payout>;
|
|
2154
|
+
create: (marketId: string, data: CreatePayoutRequest) => Promise<PayoutCreateResponse>;
|
|
1987
2155
|
};
|
|
1988
2156
|
search: {
|
|
1989
2157
|
query: (marketId: string, query: string) => Promise<SearchResult>;
|
|
@@ -2012,6 +2180,12 @@ declare function Studio(info?: {
|
|
|
2012
2180
|
update: (marketId: string, customerId: string, contactId: string, payload: CreateOrUpdateContactPayload) => Promise<CustomerContact>;
|
|
2013
2181
|
delete: (marketId: string, customerId: string, contactId: string) => Promise<void>;
|
|
2014
2182
|
};
|
|
2183
|
+
ledger: {
|
|
2184
|
+
getBalance: (marketId: string, account: string) => Promise<LedgerBalanceResponse>;
|
|
2185
|
+
getTransaction: (marketId: string, transactionId: string) => Promise<LedgerTransaction>;
|
|
2186
|
+
getLatestTransaction: (marketId: string, account: string) => Promise<LedgerTransaction>;
|
|
2187
|
+
listTransactions: (marketId: string, params: ListTransactionsParams) => Promise<TransactionsListResponse>;
|
|
2188
|
+
};
|
|
2015
2189
|
};
|
|
2016
2190
|
|
|
2017
2191
|
/**
|
|
@@ -2111,7 +2285,13 @@ declare function sortByLotNumber<T extends {
|
|
|
2111
2285
|
lotNumber: string;
|
|
2112
2286
|
}>(lots: T[]): T[];
|
|
2113
2287
|
/***
|
|
2114
|
-
* Generate the next lot number in a sequence
|
|
2288
|
+
* Generate the next lot number in a sequence.
|
|
2289
|
+
* Handles various formats:
|
|
2290
|
+
* - Simple: "7" -> "8"
|
|
2291
|
+
* - Alphanumeric: "7A" -> "7B"
|
|
2292
|
+
* - Range: "1-3" -> "4", "1 - 3" -> "4" (flexible whitespace)
|
|
2293
|
+
* - Range with alpha: "1-3A" -> "3B"
|
|
2294
|
+
* - Compound: "1-3, 10" -> "11", "1-5, 7-9" -> "10"
|
|
2115
2295
|
*/
|
|
2116
2296
|
declare function nextLotNumber(previousLotNumber: string): string;
|
|
2117
2297
|
|