@marteye/studiojs 1.1.39 → 1.1.41

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.cjs ADDED
@@ -0,0 +1,10 @@
1
+ const mod = require("./index.js");
2
+ const api = mod && mod.default ? mod.default : mod;
3
+ if (mod && typeof mod === "object") {
4
+ for (const key of Object.keys(mod)) {
5
+ if (key !== "default") {
6
+ api[key] = mod[key];
7
+ }
8
+ }
9
+ }
10
+ module.exports = api;
package/dist/index.d.ts CHANGED
@@ -1624,6 +1624,23 @@ interface AddExtraPayload {
1624
1624
  passthroughFundsToCustomerId?: string | null;
1625
1625
  }
1626
1626
 
1627
+ interface Member {
1628
+ uid: string;
1629
+ displayName: string | null;
1630
+ role: "Owner" | "Admin" | "Editor";
1631
+ createdAt: string;
1632
+ updatedAt: string;
1633
+ }
1634
+ interface MembersListResponse {
1635
+ data: Member[];
1636
+ lastId: string | null;
1637
+ hasMore: boolean;
1638
+ }
1639
+ interface MembersListParams {
1640
+ limit?: number;
1641
+ lastId?: string;
1642
+ }
1643
+
1627
1644
  interface ActivityListResponse {
1628
1645
  data: ActivityLog[];
1629
1646
  lastId: string | null;
@@ -1649,6 +1666,10 @@ declare function resources(httpClient: HttpClient): {
1649
1666
  markets: {
1650
1667
  get: (marketId: string) => Promise<Market>;
1651
1668
  };
1669
+ members: {
1670
+ list: (marketId: string, params?: MembersListParams) => Promise<MembersListResponse>;
1671
+ get: (marketId: string, memberId: string) => Promise<Member>;
1672
+ };
1652
1673
  sales: {
1653
1674
  get: (marketId: string, saleId: string) => Promise<Sale>;
1654
1675
  list: (marketId: string, opts: {
@@ -1927,6 +1948,10 @@ declare function Studio(info?: {
1927
1948
  markets: {
1928
1949
  get: (marketId: string) => Promise<Market>;
1929
1950
  };
1951
+ members: {
1952
+ list: (marketId: string, params?: MembersListParams) => Promise<MembersListResponse>;
1953
+ get: (marketId: string, memberId: string) => Promise<Member>;
1954
+ };
1930
1955
  sales: {
1931
1956
  get: (marketId: string, saleId: string) => Promise<Sale>;
1932
1957
  list: (marketId: string, opts: {
package/dist/index.esm.js CHANGED
@@ -70,7 +70,7 @@ function SimpleHttpClient(baseUrl, apiKey, fetch, defaultTimeout, debug = false)
70
70
  }
71
71
 
72
72
  // Path: studiojs/src/resources/markets.ts
73
- function create$n(_) {
73
+ function create$o(_) {
74
74
  const actions = {
75
75
  /***
76
76
  * This is used to construct the action from the request body
@@ -100,7 +100,7 @@ function create$n(_) {
100
100
  return actions;
101
101
  }
102
102
 
103
- function create$m(httpClient) {
103
+ function create$n(httpClient) {
104
104
  let activity = {
105
105
  /**
106
106
  * List activity logs for a market with pagination and filtering
@@ -152,7 +152,7 @@ function create$m(httpClient) {
152
152
  return activity;
153
153
  }
154
154
 
155
- function create$l(httpClient) {
155
+ function create$m(httpClient) {
156
156
  return {
157
157
  list: async (marketId) => {
158
158
  return httpClient.get(`/${marketId}/adjustments`);
@@ -169,7 +169,7 @@ function create$l(httpClient) {
169
169
  };
170
170
  }
171
171
 
172
- function create$k(httpClient) {
172
+ function create$l(httpClient) {
173
173
  return {
174
174
  /**
175
175
  * Get the full cart for a customer including extras and uninvoiced lots
@@ -192,7 +192,7 @@ function create$k(httpClient) {
192
192
  };
193
193
  }
194
194
 
195
- function create$j(httpClient) {
195
+ function create$k(httpClient) {
196
196
  return {
197
197
  list: async (marketId) => {
198
198
  return httpClient.get(`/${marketId}/extras`);
@@ -212,7 +212,7 @@ function create$j(httpClient) {
212
212
  /***
213
213
  * Bidder applications
214
214
  */
215
- function create$i(httpClient) {
215
+ function create$j(httpClient) {
216
216
  let applications = {
217
217
  /**
218
218
  * List applications for a market with optional filtering
@@ -279,7 +279,7 @@ function create$i(httpClient) {
279
279
  }
280
280
 
281
281
  // Path: studiojs/src/resources/markets.ts
282
- function create$h(httpClient) {
282
+ function create$i(httpClient) {
283
283
  let customers = {
284
284
  list: async (marketId, lastId) => {
285
285
  let params = {};
@@ -5116,7 +5116,7 @@ const uploadSingleFile = async (input, token) => {
5116
5116
  };
5117
5117
 
5118
5118
  // Multipart Upload for Media to the MARTEYE Media Service
5119
- function create$g() {
5119
+ function create$h() {
5120
5120
  const files = {
5121
5121
  uploadSingleFile: async (input, token) => {
5122
5122
  return await uploadSingleFile(input, token);
@@ -5131,7 +5131,7 @@ function create$g() {
5131
5131
  return files;
5132
5132
  }
5133
5133
 
5134
- function create$f(httpClient) {
5134
+ function create$g(httpClient) {
5135
5135
  const invoices = {
5136
5136
  /**
5137
5137
  * List all invoices for a market with pagination
@@ -5159,7 +5159,7 @@ function create$f(httpClient) {
5159
5159
  return invoices;
5160
5160
  }
5161
5161
 
5162
- function create$e(httpClient) {
5162
+ function create$f(httpClient) {
5163
5163
  return {
5164
5164
  create: async (marketId, saleId, lotId, data) => {
5165
5165
  return httpClient.post(`/${marketId}/sales/${saleId}/lots/${lotId}/items`, data);
@@ -5176,7 +5176,7 @@ function create$e(httpClient) {
5176
5176
  /**
5177
5177
  * Defines the possible status values for a lot in a sale
5178
5178
  */
5179
- function create$d(httpClient) {
5179
+ function create$e(httpClient) {
5180
5180
  return {
5181
5181
  get: async (marketId, saleId, lotId) => {
5182
5182
  return httpClient.get(`/${marketId}/sales/${saleId}/lots/${lotId}`);
@@ -5196,7 +5196,7 @@ function create$d(httpClient) {
5196
5196
  };
5197
5197
  }
5198
5198
 
5199
- function create$c(httpClient) {
5199
+ function create$d(httpClient) {
5200
5200
  const markets = {
5201
5201
  get: async (marketId) => {
5202
5202
  return httpClient.get(`/${marketId}`);
@@ -5218,6 +5218,37 @@ function create$c(httpClient) {
5218
5218
  return markets;
5219
5219
  }
5220
5220
 
5221
+ function create$c(httpClient) {
5222
+ let members = {
5223
+ /**
5224
+ * List members (staff accounts) for a market with pagination
5225
+ * @param marketId - ID of the market
5226
+ * @param params - Optional pagination parameters
5227
+ * @returns Paginated list of members
5228
+ */
5229
+ list: async (marketId, params) => {
5230
+ let queryParams = {};
5231
+ if ((params === null || params === void 0 ? void 0 : params.limit) !== undefined) {
5232
+ queryParams.limit = String(params.limit);
5233
+ }
5234
+ if (params === null || params === void 0 ? void 0 : params.lastId) {
5235
+ queryParams.lastId = params.lastId;
5236
+ }
5237
+ return httpClient.get(`/${marketId}/members`, queryParams);
5238
+ },
5239
+ /**
5240
+ * Get a specific member by ID
5241
+ * @param marketId - ID of the market
5242
+ * @param memberId - User ID of the member
5243
+ * @returns The member details
5244
+ */
5245
+ get: async (marketId, memberId) => {
5246
+ return httpClient.get(`/${marketId}/members/${memberId}`);
5247
+ },
5248
+ };
5249
+ return members;
5250
+ }
5251
+
5221
5252
  function create$b(httpClient) {
5222
5253
  const payments = {
5223
5254
  /**
@@ -5497,28 +5528,29 @@ function create(httpClient) {
5497
5528
 
5498
5529
  function resources(httpClient) {
5499
5530
  return {
5500
- activity: create$m(httpClient),
5501
- markets: create$c(httpClient),
5531
+ activity: create$n(httpClient),
5532
+ markets: create$d(httpClient),
5533
+ members: create$c(httpClient),
5502
5534
  sales: create$8(httpClient),
5503
- lots: create$d(httpClient),
5504
- lotitems: create$e(httpClient),
5505
- carts: create$k(httpClient),
5535
+ lots: create$e(httpClient),
5536
+ lotitems: create$f(httpClient),
5537
+ carts: create$l(httpClient),
5506
5538
  cph: create$2(httpClient),
5507
5539
  webhooks: create$3(),
5508
- actions: create$n(),
5509
- bidderApplications: create$i(httpClient),
5540
+ actions: create$o(),
5541
+ bidderApplications: create$j(httpClient),
5510
5542
  settings: create$5(httpClient),
5511
- adjustments: create$l(httpClient),
5512
- extras: create$j(httpClient),
5543
+ adjustments: create$m(httpClient),
5544
+ extras: create$k(httpClient),
5513
5545
  productCodes: create$9(httpClient),
5514
5546
  saleTemplates: create$7(httpClient),
5515
5547
  taxRates: create$4(httpClient),
5516
- customers: create$h(httpClient),
5517
- invoices: create$f(httpClient),
5548
+ customers: create$i(httpClient),
5549
+ invoices: create$g(httpClient),
5518
5550
  payments: create$b(httpClient),
5519
5551
  payouts: create$a(httpClient),
5520
5552
  search: create$6(httpClient),
5521
- files: create$g(),
5553
+ files: create$h(),
5522
5554
  contacts: create$1(httpClient),
5523
5555
  ledger: create(httpClient),
5524
5556
  };
@@ -5993,4 +6025,3 @@ function incrementAlphaSequence(alpha) {
5993
6025
  }
5994
6026
 
5995
6027
  export { EarTag, Studio, StudioHeaders, types as StudioTypes, createAppManifest, Studio as default, lotComparator, nextLotNumber, sortByLotNumber };
5996
- //# sourceMappingURL=index.esm.js.map
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$n(_) {
77
+ function create$o(_) {
78
78
  const actions = {
79
79
  /***
80
80
  * This is used to construct the action from the request body
@@ -104,7 +104,7 @@ function create$n(_) {
104
104
  return actions;
105
105
  }
106
106
 
107
- function create$m(httpClient) {
107
+ function create$n(httpClient) {
108
108
  let activity = {
109
109
  /**
110
110
  * List activity logs for a market with pagination and filtering
@@ -156,7 +156,7 @@ function create$m(httpClient) {
156
156
  return activity;
157
157
  }
158
158
 
159
- function create$l(httpClient) {
159
+ function create$m(httpClient) {
160
160
  return {
161
161
  list: async (marketId) => {
162
162
  return httpClient.get(`/${marketId}/adjustments`);
@@ -173,7 +173,7 @@ function create$l(httpClient) {
173
173
  };
174
174
  }
175
175
 
176
- function create$k(httpClient) {
176
+ function create$l(httpClient) {
177
177
  return {
178
178
  /**
179
179
  * Get the full cart for a customer including extras and uninvoiced lots
@@ -196,7 +196,7 @@ function create$k(httpClient) {
196
196
  };
197
197
  }
198
198
 
199
- function create$j(httpClient) {
199
+ function create$k(httpClient) {
200
200
  return {
201
201
  list: async (marketId) => {
202
202
  return httpClient.get(`/${marketId}/extras`);
@@ -216,7 +216,7 @@ function create$j(httpClient) {
216
216
  /***
217
217
  * Bidder applications
218
218
  */
219
- function create$i(httpClient) {
219
+ function create$j(httpClient) {
220
220
  let applications = {
221
221
  /**
222
222
  * List applications for a market with optional filtering
@@ -283,7 +283,7 @@ function create$i(httpClient) {
283
283
  }
284
284
 
285
285
  // Path: studiojs/src/resources/markets.ts
286
- function create$h(httpClient) {
286
+ function create$i(httpClient) {
287
287
  let customers = {
288
288
  list: async (marketId, lastId) => {
289
289
  let params = {};
@@ -5120,7 +5120,7 @@ const uploadSingleFile = async (input, token) => {
5120
5120
  };
5121
5121
 
5122
5122
  // Multipart Upload for Media to the MARTEYE Media Service
5123
- function create$g() {
5123
+ function create$h() {
5124
5124
  const files = {
5125
5125
  uploadSingleFile: async (input, token) => {
5126
5126
  return await uploadSingleFile(input, token);
@@ -5135,7 +5135,7 @@ function create$g() {
5135
5135
  return files;
5136
5136
  }
5137
5137
 
5138
- function create$f(httpClient) {
5138
+ function create$g(httpClient) {
5139
5139
  const invoices = {
5140
5140
  /**
5141
5141
  * List all invoices for a market with pagination
@@ -5163,7 +5163,7 @@ function create$f(httpClient) {
5163
5163
  return invoices;
5164
5164
  }
5165
5165
 
5166
- function create$e(httpClient) {
5166
+ function create$f(httpClient) {
5167
5167
  return {
5168
5168
  create: async (marketId, saleId, lotId, data) => {
5169
5169
  return httpClient.post(`/${marketId}/sales/${saleId}/lots/${lotId}/items`, data);
@@ -5180,7 +5180,7 @@ function create$e(httpClient) {
5180
5180
  /**
5181
5181
  * Defines the possible status values for a lot in a sale
5182
5182
  */
5183
- function create$d(httpClient) {
5183
+ function create$e(httpClient) {
5184
5184
  return {
5185
5185
  get: async (marketId, saleId, lotId) => {
5186
5186
  return httpClient.get(`/${marketId}/sales/${saleId}/lots/${lotId}`);
@@ -5200,7 +5200,7 @@ function create$d(httpClient) {
5200
5200
  };
5201
5201
  }
5202
5202
 
5203
- function create$c(httpClient) {
5203
+ function create$d(httpClient) {
5204
5204
  const markets = {
5205
5205
  get: async (marketId) => {
5206
5206
  return httpClient.get(`/${marketId}`);
@@ -5222,6 +5222,37 @@ function create$c(httpClient) {
5222
5222
  return markets;
5223
5223
  }
5224
5224
 
5225
+ function create$c(httpClient) {
5226
+ let members = {
5227
+ /**
5228
+ * List members (staff accounts) for a market with pagination
5229
+ * @param marketId - ID of the market
5230
+ * @param params - Optional pagination parameters
5231
+ * @returns Paginated list of members
5232
+ */
5233
+ list: async (marketId, params) => {
5234
+ let queryParams = {};
5235
+ if ((params === null || params === void 0 ? void 0 : params.limit) !== undefined) {
5236
+ queryParams.limit = String(params.limit);
5237
+ }
5238
+ if (params === null || params === void 0 ? void 0 : params.lastId) {
5239
+ queryParams.lastId = params.lastId;
5240
+ }
5241
+ return httpClient.get(`/${marketId}/members`, queryParams);
5242
+ },
5243
+ /**
5244
+ * Get a specific member by ID
5245
+ * @param marketId - ID of the market
5246
+ * @param memberId - User ID of the member
5247
+ * @returns The member details
5248
+ */
5249
+ get: async (marketId, memberId) => {
5250
+ return httpClient.get(`/${marketId}/members/${memberId}`);
5251
+ },
5252
+ };
5253
+ return members;
5254
+ }
5255
+
5225
5256
  function create$b(httpClient) {
5226
5257
  const payments = {
5227
5258
  /**
@@ -5501,28 +5532,29 @@ function create(httpClient) {
5501
5532
 
5502
5533
  function resources(httpClient) {
5503
5534
  return {
5504
- activity: create$m(httpClient),
5505
- markets: create$c(httpClient),
5535
+ activity: create$n(httpClient),
5536
+ markets: create$d(httpClient),
5537
+ members: create$c(httpClient),
5506
5538
  sales: create$8(httpClient),
5507
- lots: create$d(httpClient),
5508
- lotitems: create$e(httpClient),
5509
- carts: create$k(httpClient),
5539
+ lots: create$e(httpClient),
5540
+ lotitems: create$f(httpClient),
5541
+ carts: create$l(httpClient),
5510
5542
  cph: create$2(httpClient),
5511
5543
  webhooks: create$3(),
5512
- actions: create$n(),
5513
- bidderApplications: create$i(httpClient),
5544
+ actions: create$o(),
5545
+ bidderApplications: create$j(httpClient),
5514
5546
  settings: create$5(httpClient),
5515
- adjustments: create$l(httpClient),
5516
- extras: create$j(httpClient),
5547
+ adjustments: create$m(httpClient),
5548
+ extras: create$k(httpClient),
5517
5549
  productCodes: create$9(httpClient),
5518
5550
  saleTemplates: create$7(httpClient),
5519
5551
  taxRates: create$4(httpClient),
5520
- customers: create$h(httpClient),
5521
- invoices: create$f(httpClient),
5552
+ customers: create$i(httpClient),
5553
+ invoices: create$g(httpClient),
5522
5554
  payments: create$b(httpClient),
5523
5555
  payouts: create$a(httpClient),
5524
5556
  search: create$6(httpClient),
5525
- files: create$g(),
5557
+ files: create$h(),
5526
5558
  contacts: create$1(httpClient),
5527
5559
  ledger: create(httpClient),
5528
5560
  };
@@ -6005,4 +6037,3 @@ exports.default = Studio;
6005
6037
  exports.lotComparator = lotComparator;
6006
6038
  exports.nextLotNumber = nextLotNumber;
6007
6039
  exports.sortByLotNumber = sortByLotNumber;
6008
- //# sourceMappingURL=index.js.map
@@ -0,0 +1,34 @@
1
+ import { HttpClient } from "../net/http";
2
+ export interface Member {
3
+ uid: string;
4
+ displayName: string | null;
5
+ role: "Owner" | "Admin" | "Editor";
6
+ createdAt: string;
7
+ updatedAt: string;
8
+ }
9
+ export interface MembersListResponse {
10
+ data: Member[];
11
+ lastId: string | null;
12
+ hasMore: boolean;
13
+ }
14
+ export interface MembersListParams {
15
+ limit?: number;
16
+ lastId?: string;
17
+ }
18
+ export default function create(httpClient: HttpClient): {
19
+ /**
20
+ * List members (staff accounts) for a market with pagination
21
+ * @param marketId - ID of the market
22
+ * @param params - Optional pagination parameters
23
+ * @returns Paginated list of members
24
+ */
25
+ list: (marketId: string, params?: MembersListParams) => Promise<MembersListResponse>;
26
+ /**
27
+ * Get a specific member by ID
28
+ * @param marketId - ID of the market
29
+ * @param memberId - User ID of the member
30
+ * @returns The member details
31
+ */
32
+ get: (marketId: string, memberId: string) => Promise<Member>;
33
+ };
34
+ export type Members = ReturnType<typeof create>;
@@ -7,6 +7,10 @@ export default function resources(httpClient: HttpClient): {
7
7
  markets: {
8
8
  get: (marketId: string) => Promise<import("./types").Market>;
9
9
  };
10
+ members: {
11
+ list: (marketId: string, params?: import("./resources/members").MembersListParams) => Promise<import("./resources/members").MembersListResponse>;
12
+ get: (marketId: string, memberId: string) => Promise<import("./resources/members").Member>;
13
+ };
10
14
  sales: {
11
15
  get: (marketId: string, saleId: string) => Promise<import("./types").Sale>;
12
16
  list: (marketId: string, opts: {
package/dist/studio.d.ts CHANGED
@@ -16,6 +16,10 @@ export declare function Studio(info?: {
16
16
  markets: {
17
17
  get: (marketId: string) => Promise<import("./types").Market>;
18
18
  };
19
+ members: {
20
+ list: (marketId: string, params?: import("./resources/members").MembersListParams) => Promise<import("./resources/members").MembersListResponse>;
21
+ get: (marketId: string, memberId: string) => Promise<import("./resources/members").Member>;
22
+ };
19
23
  sales: {
20
24
  get: (marketId: string, saleId: string) => Promise<import("./types").Sale>;
21
25
  list: (marketId: string, opts: {
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@marteye/studiojs",
3
- "version": "1.1.39",
3
+ "version": "1.1.41",
4
4
  "description": "MartEye Studio JavaScript SDK",
5
5
  "license": "MIT",
6
6
  "source": "src/index.ts",
7
- "main": "dist/index.js",
7
+ "main": "dist/index.cjs",
8
8
  "module": "dist/index.esm.js",
9
9
  "types": "dist/index.d.ts",
10
10
  "browser": {
@@ -15,7 +15,7 @@
15
15
  ],
16
16
  "exports": {
17
17
  ".": {
18
- "require": "./dist/index.js",
18
+ "require": "./dist/index.cjs",
19
19
  "import": "./dist/index.esm.js",
20
20
  "types": "./dist/index.d.ts"
21
21
  }