@marteye/studiojs 1.1.48-beta.0 → 1.1.48-beta.1
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 +0 -23
- package/dist/__tests__/activity.test.d.ts +1 -0
- package/dist/__tests__/cattlePassport.test.d.ts +1 -0
- package/dist/__tests__/customerLists.test.d.ts +1 -0
- package/dist/__tests__/customerLists.unit.test.d.ts +1 -0
- package/dist/__tests__/eartag.test.d.ts +1 -0
- package/dist/__tests__/lot-util.test.d.ts +1 -0
- package/dist/__tests__/lots.test.d.ts +1 -0
- package/dist/__tests__/markets.test.d.ts +1 -0
- package/dist/__tests__/media.test.d.ts +1 -0
- package/dist/__tests__/sales.test.d.ts +1 -0
- package/dist/__tests__/studio.test.d.ts +311 -0
- package/dist/index.d.ts +13 -2937
- package/dist/index.esm.js +36 -74
- package/dist/index.js +36 -74
- package/dist/resources.d.ts +0 -5
- package/dist/studio.d.ts +0 -5
- package/dist/types.d.ts +4 -108
- package/package.json +1 -1
- package/dist/resources/reports.d.ts +0 -8
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
6203
|
-
broadcast: create$
|
|
6204
|
-
markets: create$
|
|
6205
|
-
members: create$
|
|
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$
|
|
6208
|
-
lotitems: create$
|
|
6209
|
-
carts: create$
|
|
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$
|
|
6213
|
-
bidderApplications: create$
|
|
6175
|
+
actions: create$q(),
|
|
6176
|
+
bidderApplications: create$l(httpClient),
|
|
6214
6177
|
settings: create$5(httpClient),
|
|
6215
|
-
adjustments: create$
|
|
6216
|
-
extras: create$
|
|
6217
|
-
productCodes: create$
|
|
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$
|
|
6221
|
-
customerLists: create$
|
|
6222
|
-
invoices: create$
|
|
6223
|
-
payments: create$
|
|
6224
|
-
payouts: create$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
6207
|
-
broadcast: create$
|
|
6208
|
-
markets: create$
|
|
6209
|
-
members: create$
|
|
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$
|
|
6212
|
-
lotitems: create$
|
|
6213
|
-
carts: create$
|
|
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$
|
|
6217
|
-
bidderApplications: create$
|
|
6179
|
+
actions: create$q(),
|
|
6180
|
+
bidderApplications: create$l(httpClient),
|
|
6218
6181
|
settings: create$5(httpClient),
|
|
6219
|
-
adjustments: create$
|
|
6220
|
-
extras: create$
|
|
6221
|
-
productCodes: create$
|
|
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$
|
|
6225
|
-
customerLists: create$
|
|
6226
|
-
invoices: create$
|
|
6227
|
-
payments: create$
|
|
6228
|
-
payouts: create$
|
|
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$
|
|
6193
|
+
files: create$h(),
|
|
6232
6194
|
contacts: create$3(httpClient),
|
|
6233
6195
|
ledger: create$2(httpClient),
|
|
6234
6196
|
};
|
package/dist/resources.d.ts
CHANGED
|
@@ -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,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>;
|