@marteye/studiojs 1.1.35 → 1.1.36

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 CHANGED
@@ -1233,6 +1233,24 @@ interface SearchResult {
1233
1233
  query: string;
1234
1234
  }
1235
1235
 
1236
+ interface PayoutsListResponse {
1237
+ payouts: Payout[];
1238
+ lastId: string | null;
1239
+ hasMore: boolean;
1240
+ }
1241
+
1242
+ interface PaymentsListResponse {
1243
+ payments: Payment[];
1244
+ lastId: string | null;
1245
+ hasMore: boolean;
1246
+ }
1247
+
1248
+ interface InvoicesListResponse {
1249
+ invoices: Invoice[];
1250
+ lastId: string | null;
1251
+ hasMore: boolean;
1252
+ }
1253
+
1236
1254
  interface CreateCustomerPayload {
1237
1255
  displayName: string;
1238
1256
  email?: string;
@@ -1470,6 +1488,18 @@ declare function resources(httpClient: HttpClient): {
1470
1488
  getByAccountNumber: (marketId: string, accountNumber: string) => Promise<Customer | null>;
1471
1489
  getByMartEyeUid: (marketId: string, marteyeUid: string) => Promise<Customer | null>;
1472
1490
  };
1491
+ invoices: {
1492
+ list: (marketId: string, lastId?: string) => Promise<InvoicesListResponse>;
1493
+ get: (marketId: string, invoiceId: string) => Promise<Invoice>;
1494
+ };
1495
+ payments: {
1496
+ list: (marketId: string, lastId?: string) => Promise<PaymentsListResponse>;
1497
+ get: (marketId: string, paymentId: string) => Promise<Payment>;
1498
+ };
1499
+ payouts: {
1500
+ list: (marketId: string, lastId?: string) => Promise<PayoutsListResponse>;
1501
+ get: (marketId: string, payoutId: string) => Promise<Payout>;
1502
+ };
1473
1503
  search: {
1474
1504
  query: (marketId: string, query: string) => Promise<SearchResult>;
1475
1505
  };
@@ -1670,6 +1700,18 @@ declare function Studio(info?: {
1670
1700
  getByAccountNumber: (marketId: string, accountNumber: string) => Promise<Customer | null>;
1671
1701
  getByMartEyeUid: (marketId: string, marteyeUid: string) => Promise<Customer | null>;
1672
1702
  };
1703
+ invoices: {
1704
+ list: (marketId: string, lastId?: string) => Promise<InvoicesListResponse>;
1705
+ get: (marketId: string, invoiceId: string) => Promise<Invoice>;
1706
+ };
1707
+ payments: {
1708
+ list: (marketId: string, lastId?: string) => Promise<PaymentsListResponse>;
1709
+ get: (marketId: string, paymentId: string) => Promise<Payment>;
1710
+ };
1711
+ payouts: {
1712
+ list: (marketId: string, lastId?: string) => Promise<PayoutsListResponse>;
1713
+ get: (marketId: string, payoutId: string) => Promise<Payout>;
1714
+ };
1673
1715
  search: {
1674
1716
  query: (marketId: string, query: string) => Promise<SearchResult>;
1675
1717
  };
package/dist/index.esm.js CHANGED
@@ -67,7 +67,7 @@ function SimpleHttpClient(baseUrl, apiKey, fetch, defaultTimeout, debug = false)
67
67
  }
68
68
 
69
69
  // Path: studiojs/src/resources/markets.ts
70
- function create$d(_) {
70
+ function create$g(_) {
71
71
  const actions = {
72
72
  /***
73
73
  * This is used to construct the action from the request body
@@ -97,7 +97,7 @@ function create$d(_) {
97
97
  return actions;
98
98
  }
99
99
 
100
- function create$c(httpClient) {
100
+ function create$f(httpClient) {
101
101
  return {
102
102
  list: async (marketId) => {
103
103
  return httpClient.get(`/${marketId}/adjustments`);
@@ -111,7 +111,7 @@ function create$c(httpClient) {
111
111
  /***
112
112
  * Bidder applications
113
113
  */
114
- function create$b(httpClient) {
114
+ function create$e(httpClient) {
115
115
  let applications = {
116
116
  /**
117
117
  * List applications for a market with optional filtering
@@ -178,7 +178,7 @@ function create$b(httpClient) {
178
178
  }
179
179
 
180
180
  // Path: studiojs/src/resources/markets.ts
181
- function create$a(httpClient) {
181
+ function create$d(httpClient) {
182
182
  let customers = {
183
183
  list: async (marketId, lastId) => {
184
184
  let params = {};
@@ -5012,7 +5012,7 @@ const uploadSingleFile = async (input, token) => {
5012
5012
  };
5013
5013
 
5014
5014
  // Multipart Upload for Media to the MARTEYE Media Service
5015
- function create$9() {
5015
+ function create$c() {
5016
5016
  const files = {
5017
5017
  uploadSingleFile: async (input, token) => {
5018
5018
  return await uploadSingleFile(input, token);
@@ -5027,7 +5027,35 @@ function create$9() {
5027
5027
  return files;
5028
5028
  }
5029
5029
 
5030
- function create$8(httpClient) {
5030
+ function create$b(httpClient) {
5031
+ const invoices = {
5032
+ /**
5033
+ * List all invoices for a market with pagination
5034
+ * @param marketId - ID of the market
5035
+ * @param lastId - ID of the last invoice from previous page (for pagination)
5036
+ * @returns Paginated list of invoices
5037
+ */
5038
+ list: async (marketId, lastId) => {
5039
+ let params = {};
5040
+ if (lastId) {
5041
+ params.lastId = lastId;
5042
+ }
5043
+ return httpClient.get(`/${marketId}/invoices`, params);
5044
+ },
5045
+ /**
5046
+ * Get a specific invoice by ID
5047
+ * @param marketId - ID of the market
5048
+ * @param invoiceId - ID of the invoice to fetch
5049
+ * @returns The invoice details
5050
+ */
5051
+ get: async (marketId, invoiceId) => {
5052
+ return httpClient.get(`/${marketId}/invoices/${invoiceId}`);
5053
+ },
5054
+ };
5055
+ return invoices;
5056
+ }
5057
+
5058
+ function create$a(httpClient) {
5031
5059
  return {
5032
5060
  create: async (marketId, saleId, lotId, data) => {
5033
5061
  return httpClient.post(`/${marketId}/sales/${saleId}/lots/${lotId}/items`, data);
@@ -5044,7 +5072,7 @@ function create$8(httpClient) {
5044
5072
  /**
5045
5073
  * Defines the possible status values for a lot in a sale
5046
5074
  */
5047
- function create$7(httpClient) {
5075
+ function create$9(httpClient) {
5048
5076
  return {
5049
5077
  get: async (marketId, saleId, lotId) => {
5050
5078
  return httpClient.get(`/${marketId}/sales/${saleId}/lots/${lotId}`);
@@ -5064,7 +5092,7 @@ function create$7(httpClient) {
5064
5092
  };
5065
5093
  }
5066
5094
 
5067
- function create$6(httpClient) {
5095
+ function create$8(httpClient) {
5068
5096
  const markets = {
5069
5097
  get: async (marketId) => {
5070
5098
  return httpClient.get(`/${marketId}`);
@@ -5086,6 +5114,62 @@ function create$6(httpClient) {
5086
5114
  return markets;
5087
5115
  }
5088
5116
 
5117
+ function create$7(httpClient) {
5118
+ const payments = {
5119
+ /**
5120
+ * List all payments for a market with pagination
5121
+ * @param marketId - ID of the market
5122
+ * @param lastId - ID of the last payment from previous page (for pagination)
5123
+ * @returns Paginated list of payments
5124
+ */
5125
+ list: async (marketId, lastId) => {
5126
+ let params = {};
5127
+ if (lastId) {
5128
+ params.lastId = lastId;
5129
+ }
5130
+ return httpClient.get(`/${marketId}/payments`, params);
5131
+ },
5132
+ /**
5133
+ * Get a specific payment by ID
5134
+ * @param marketId - ID of the market
5135
+ * @param paymentId - ID of the payment to fetch
5136
+ * @returns The payment details
5137
+ */
5138
+ get: async (marketId, paymentId) => {
5139
+ return httpClient.get(`/${marketId}/payments/${paymentId}`);
5140
+ },
5141
+ };
5142
+ return payments;
5143
+ }
5144
+
5145
+ function create$6(httpClient) {
5146
+ const payouts = {
5147
+ /**
5148
+ * List all payouts for a market with pagination
5149
+ * @param marketId - ID of the market
5150
+ * @param lastId - ID of the last payout from previous page (for pagination)
5151
+ * @returns Paginated list of payouts
5152
+ */
5153
+ list: async (marketId, lastId) => {
5154
+ let params = {};
5155
+ if (lastId) {
5156
+ params.lastId = lastId;
5157
+ }
5158
+ return httpClient.get(`/${marketId}/payouts`, params);
5159
+ },
5160
+ /**
5161
+ * Get a specific payout by ID
5162
+ * @param marketId - ID of the market
5163
+ * @param payoutId - ID of the payout to fetch
5164
+ * @returns The payout details
5165
+ */
5166
+ get: async (marketId, payoutId) => {
5167
+ return httpClient.get(`/${marketId}/payouts/${payoutId}`);
5168
+ },
5169
+ };
5170
+ return payouts;
5171
+ }
5172
+
5089
5173
  function create$5(httpClient) {
5090
5174
  return {
5091
5175
  list: async (marketId) => {
@@ -5186,20 +5270,23 @@ function create(_) {
5186
5270
 
5187
5271
  function resources(httpClient) {
5188
5272
  return {
5189
- markets: create$6(httpClient),
5273
+ markets: create$8(httpClient),
5190
5274
  sales: create$4(httpClient),
5191
- lots: create$7(httpClient),
5192
- lotitems: create$8(httpClient),
5275
+ lots: create$9(httpClient),
5276
+ lotitems: create$a(httpClient),
5193
5277
  webhooks: create(),
5194
- actions: create$d(),
5195
- bidderApplications: create$b(httpClient),
5278
+ actions: create$g(),
5279
+ bidderApplications: create$e(httpClient),
5196
5280
  settings: create$2(httpClient),
5197
- adjustments: create$c(httpClient),
5281
+ adjustments: create$f(httpClient),
5198
5282
  productCodes: create$5(httpClient),
5199
5283
  taxRates: create$1(httpClient),
5200
- customers: create$a(httpClient),
5284
+ customers: create$d(httpClient),
5285
+ invoices: create$b(httpClient),
5286
+ payments: create$7(httpClient),
5287
+ payouts: create$6(httpClient),
5201
5288
  search: create$3(httpClient),
5202
- files: create$9(),
5289
+ files: create$c(),
5203
5290
  };
5204
5291
  }
5205
5292