@marteye/studiojs 1.1.38 → 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 +126 -3
- package/dist/index.esm.js +105 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +105 -2
- package/dist/index.js.map +1 -1
- package/dist/resources/activity.d.ts +35 -0
- package/dist/resources/ledger.d.ts +64 -0
- package/dist/resources/payouts.d.ts +34 -0
- package/dist/resources.d.ts +8 -0
- package/dist/studio.d.ts +8 -0
- package/dist/types.d.ts +26 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -74,7 +74,7 @@ function SimpleHttpClient(baseUrl, apiKey, fetch, defaultTimeout, debug = false)
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
// Path: studiojs/src/resources/markets.ts
|
|
77
|
-
function create$
|
|
77
|
+
function create$n(_) {
|
|
78
78
|
const actions = {
|
|
79
79
|
/***
|
|
80
80
|
* This is used to construct the action from the request body
|
|
@@ -104,6 +104,58 @@ function create$m(_) {
|
|
|
104
104
|
return actions;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
function create$m(httpClient) {
|
|
108
|
+
let activity = {
|
|
109
|
+
/**
|
|
110
|
+
* List activity logs for a market with pagination and filtering
|
|
111
|
+
* @param marketId - ID of the market
|
|
112
|
+
* @param params - Optional filtering and pagination parameters
|
|
113
|
+
* @returns Paginated list of activity logs
|
|
114
|
+
*/
|
|
115
|
+
list: async (marketId, params) => {
|
|
116
|
+
let queryParams = {};
|
|
117
|
+
if (params === null || params === void 0 ? void 0 : params.saleId) {
|
|
118
|
+
queryParams.saleId = params.saleId;
|
|
119
|
+
}
|
|
120
|
+
if (params === null || params === void 0 ? void 0 : params.entityType) {
|
|
121
|
+
queryParams.entityType = params.entityType;
|
|
122
|
+
}
|
|
123
|
+
if (params === null || params === void 0 ? void 0 : params.entityId) {
|
|
124
|
+
queryParams.entityId = params.entityId;
|
|
125
|
+
}
|
|
126
|
+
if (params === null || params === void 0 ? void 0 : params.operation) {
|
|
127
|
+
queryParams.operation = params.operation;
|
|
128
|
+
}
|
|
129
|
+
if (params === null || params === void 0 ? void 0 : params.memberId) {
|
|
130
|
+
queryParams.memberId = params.memberId;
|
|
131
|
+
}
|
|
132
|
+
if (params === null || params === void 0 ? void 0 : params.from) {
|
|
133
|
+
queryParams.from = params.from;
|
|
134
|
+
}
|
|
135
|
+
if (params === null || params === void 0 ? void 0 : params.to) {
|
|
136
|
+
queryParams.to = params.to;
|
|
137
|
+
}
|
|
138
|
+
if ((params === null || params === void 0 ? void 0 : params.limit) !== undefined) {
|
|
139
|
+
queryParams.limit = String(params.limit);
|
|
140
|
+
}
|
|
141
|
+
if (params === null || params === void 0 ? void 0 : params.lastId) {
|
|
142
|
+
queryParams.lastId = params.lastId;
|
|
143
|
+
}
|
|
144
|
+
return httpClient.get(`/${marketId}/activity`, queryParams);
|
|
145
|
+
},
|
|
146
|
+
/**
|
|
147
|
+
* Get a specific activity log by ID
|
|
148
|
+
* @param marketId - ID of the market
|
|
149
|
+
* @param activityId - ID of the activity log entry
|
|
150
|
+
* @returns The activity log details
|
|
151
|
+
*/
|
|
152
|
+
get: async (marketId, activityId) => {
|
|
153
|
+
return httpClient.get(`/${marketId}/activity/${activityId}`);
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
return activity;
|
|
157
|
+
}
|
|
158
|
+
|
|
107
159
|
function create$l(httpClient) {
|
|
108
160
|
return {
|
|
109
161
|
list: async (marketId) => {
|
|
@@ -5222,6 +5274,17 @@ function create$a(httpClient) {
|
|
|
5222
5274
|
get: async (marketId, payoutId) => {
|
|
5223
5275
|
return httpClient.get(`/${marketId}/payouts/${payoutId}`);
|
|
5224
5276
|
},
|
|
5277
|
+
/**
|
|
5278
|
+
* Create a payout for one or more seller invoices.
|
|
5279
|
+
* Use this to re-create a payout after voiding (e.g., lost cheque).
|
|
5280
|
+
* Payment details will fall back to customer defaults if not provided.
|
|
5281
|
+
* @param marketId - ID of the market
|
|
5282
|
+
* @param data - Payout creation data
|
|
5283
|
+
* @returns The created payout
|
|
5284
|
+
*/
|
|
5285
|
+
create: async (marketId, data) => {
|
|
5286
|
+
return httpClient.post(`/${marketId}/payouts`, data);
|
|
5287
|
+
},
|
|
5225
5288
|
};
|
|
5226
5289
|
return payouts;
|
|
5227
5290
|
}
|
|
@@ -5393,12 +5456,52 @@ function create(httpClient) {
|
|
|
5393
5456
|
getBalance: async (marketId, account) => {
|
|
5394
5457
|
return httpClient.get(`/${marketId}/ledger/balance`, { account });
|
|
5395
5458
|
},
|
|
5459
|
+
/**
|
|
5460
|
+
* Get a transaction by ID
|
|
5461
|
+
* @param marketId - ID of the market
|
|
5462
|
+
* @param transactionId - ID of the transaction
|
|
5463
|
+
* @returns The transaction details
|
|
5464
|
+
*/
|
|
5465
|
+
getTransaction: async (marketId, transactionId) => {
|
|
5466
|
+
return httpClient.get(`/${marketId}/ledger/transactions/${transactionId}`);
|
|
5467
|
+
},
|
|
5468
|
+
/**
|
|
5469
|
+
* Get the latest transaction on an account
|
|
5470
|
+
* @param marketId - ID of the market
|
|
5471
|
+
* @param account - Full account string (format: owner:accountType:accountName)
|
|
5472
|
+
* @returns The latest transaction on the account
|
|
5473
|
+
*/
|
|
5474
|
+
getLatestTransaction: async (marketId, account) => {
|
|
5475
|
+
return httpClient.get(`/${marketId}/ledger/transactions/latest`, { account });
|
|
5476
|
+
},
|
|
5477
|
+
/**
|
|
5478
|
+
* List transactions for an account with optional date range and pagination
|
|
5479
|
+
* @param marketId - ID of the market
|
|
5480
|
+
* @param params - Query parameters
|
|
5481
|
+
* @param params.account - Full account string (format: owner:accountType:accountName)
|
|
5482
|
+
* @param params.dateFrom - Optional start date (ISO 8601 format, e.g. "2024-01-01")
|
|
5483
|
+
* @param params.dateTo - Optional end date (ISO 8601 format, e.g. "2024-12-31")
|
|
5484
|
+
* @param params.limit - Optional max results (default 50, max 100)
|
|
5485
|
+
* @param params.cursor - Optional cursor for pagination
|
|
5486
|
+
* @returns List of transactions with pagination info
|
|
5487
|
+
*/
|
|
5488
|
+
listTransactions: async (marketId, params) => {
|
|
5489
|
+
let queryParams = {
|
|
5490
|
+
account: params.account,
|
|
5491
|
+
dateFrom: params.dateFrom,
|
|
5492
|
+
dateTo: params.dateTo,
|
|
5493
|
+
limit: params.limit,
|
|
5494
|
+
cursor: params.cursor,
|
|
5495
|
+
};
|
|
5496
|
+
return httpClient.get(`/${marketId}/ledger/transactions`, queryParams);
|
|
5497
|
+
},
|
|
5396
5498
|
};
|
|
5397
5499
|
return ledger;
|
|
5398
5500
|
}
|
|
5399
5501
|
|
|
5400
5502
|
function resources(httpClient) {
|
|
5401
5503
|
return {
|
|
5504
|
+
activity: create$m(httpClient),
|
|
5402
5505
|
markets: create$c(httpClient),
|
|
5403
5506
|
sales: create$8(httpClient),
|
|
5404
5507
|
lots: create$d(httpClient),
|
|
@@ -5406,7 +5509,7 @@ function resources(httpClient) {
|
|
|
5406
5509
|
carts: create$k(httpClient),
|
|
5407
5510
|
cph: create$2(httpClient),
|
|
5408
5511
|
webhooks: create$3(),
|
|
5409
|
-
actions: create$
|
|
5512
|
+
actions: create$n(),
|
|
5410
5513
|
bidderApplications: create$i(httpClient),
|
|
5411
5514
|
settings: create$5(httpClient),
|
|
5412
5515
|
adjustments: create$l(httpClient),
|