@marteye/studiojs 1.1.45 → 1.1.47-beta.0

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.
@@ -1,21 +1,22 @@
1
+ /// <reference types="node" />
1
2
  import type { HttpClient } from "./net/http";
2
3
  export default function resources(httpClient: HttpClient): {
3
4
  activity: {
4
- list: (marketId: string, params?: import("./resources/activity").ActivityListParams) => Promise<import("./resources/activity").ActivityListResponse>;
5
+ list: (marketId: string, params?: import("./resources/activity").ActivityListParams | undefined) => Promise<import("./resources/activity").ActivityListResponse>;
5
6
  get: (marketId: string, activityId: string) => Promise<import("./types").ActivityLog>;
6
7
  };
7
8
  markets: {
8
- get: (marketId: string, options?: import("./types").ReadOptions) => Promise<import("./types").Market>;
9
+ get: (marketId: string, options?: import("./types").ReadOptions | undefined) => Promise<import("./types").Market>;
9
10
  };
10
11
  members: {
11
- list: (marketId: string, params?: import("./resources/members").MembersListParams) => Promise<import("./resources/members").MembersListResponse>;
12
+ list: (marketId: string, params?: import("./resources/members").MembersListParams | undefined) => Promise<import("./resources/members").MembersListResponse>;
12
13
  get: (marketId: string, memberId: string) => Promise<import("./resources/members").Member>;
13
14
  };
14
15
  sales: {
15
- get: (marketId: string, saleId: string, options?: import("./types").ReadOptions) => Promise<import("./types").Sale>;
16
+ get: (marketId: string, saleId: string, options?: import("./types").ReadOptions | undefined) => Promise<import("./types").Sale>;
16
17
  list: (marketId: string, opts: {
17
- start?: string;
18
- end?: string;
18
+ start?: string | undefined;
19
+ end?: string | undefined;
19
20
  }) => Promise<{
20
21
  start: string;
21
22
  end: string;
@@ -25,122 +26,126 @@ export default function resources(httpClient: HttpClient): {
25
26
  name: string;
26
27
  startsAt: string;
27
28
  availableProductCodes: string[];
28
- recurring?: null | "Weekly" | "Bi-weekly" | "Monthly";
29
- martEyeSaleType?: "LIVE" | "TIMED" | null;
30
- location?: string | null;
31
- description?: string | null;
32
- image?: string | null;
33
- cover?: string | null;
34
- templateId?: string | null;
29
+ recurring?: "Weekly" | "Bi-weekly" | "Monthly" | null | undefined;
30
+ martEyeSaleType?: "LIVE" | "TIMED" | null | undefined;
31
+ location?: string | null | undefined;
32
+ description?: string | null | undefined;
33
+ image?: string | null | undefined;
34
+ cover?: string | null | undefined;
35
+ templateId?: string | null | undefined;
35
36
  attributeDefaults?: {
36
37
  [attributekey: string]: string | number | boolean;
37
- };
38
+ } | undefined;
38
39
  }) => Promise<{
39
40
  saleId: string;
40
41
  }>;
41
42
  update: (marketId: string, saleId: string, data: {
42
- name?: string;
43
- startsAt?: string;
44
- recurring?: "Weekly" | "Bi-weekly" | "Monthly" | null;
45
- defaultProductCode?: string;
46
- attributeDefaults?: Record<string, any>;
47
- publishStatus?: import("./types").SalePublishStatus;
43
+ name?: string | undefined;
44
+ startsAt?: string | undefined;
45
+ recurring?: "Weekly" | "Bi-weekly" | "Monthly" | null | undefined;
46
+ defaultProductCode?: string | undefined;
47
+ attributeDefaults?: Record<string, any> | undefined;
48
+ publishStatus?: import("./types").SalePublishStatus | undefined;
48
49
  marteyeSettings?: {
49
- description?: string;
50
- image?: string;
51
- logo?: string;
50
+ description?: string | undefined;
51
+ image?: string | undefined;
52
+ logo?: string | undefined;
52
53
  type: "LIVE" | "TIMED";
53
- location?: string | null;
54
- descriptionLines?: string[];
55
- descriptionLink?: string;
56
- deposit?: number;
57
- hidePrices?: boolean;
58
- hideReplay?: boolean;
59
- labels?: string[];
60
- tags?: string[];
61
- details?: Array<{
54
+ location?: string | null | undefined;
55
+ descriptionLines?: string[] | undefined;
56
+ descriptionLink?: string | undefined;
57
+ deposit?: number | undefined;
58
+ hidePrices?: boolean | undefined;
59
+ hideReplay?: boolean | undefined;
60
+ labels?: string[] | undefined;
61
+ tags?: string[] | undefined;
62
+ details?: {
62
63
  markdownBase64: string;
63
64
  title: string;
64
- }>;
65
- cover?: string;
66
- primaryColour?: string;
67
- secondaryColour?: string;
68
- foregroundColour?: string;
69
- extensionTime?: number;
70
- incrementLadder?: Array<{
65
+ }[] | undefined;
66
+ cover?: string | undefined;
67
+ primaryColour?: string | undefined;
68
+ secondaryColour?: string | undefined;
69
+ foregroundColour?: string | undefined;
70
+ extensionTime?: number | undefined;
71
+ incrementLadder?: {
71
72
  max: number;
72
73
  increment: number;
73
- }>;
74
- hideNav?: boolean;
75
- signInOverrideLink?: string;
76
- published?: boolean;
77
- pin?: boolean;
78
- cascade?: boolean;
79
- reportEmail?: string;
80
- queueLots?: boolean;
81
- } | null;
74
+ }[] | undefined;
75
+ hideNav?: boolean | undefined;
76
+ signInOverrideLink?: string | undefined;
77
+ published?: boolean | undefined;
78
+ pin?: boolean | undefined;
79
+ cascade?: boolean | undefined;
80
+ reportEmail?: string | undefined;
81
+ queueLots?: boolean | undefined;
82
+ markSubjectLotsAsSold?: boolean | undefined;
83
+ } | null | undefined;
82
84
  }) => Promise<import("./types").Sale>;
83
85
  };
84
86
  lots: {
85
- get: (marketId: string, saleId: string, lotId: string, options?: import("./types").ReadOptions) => Promise<import("./types").Lot>;
87
+ get: (marketId: string, saleId: string, lotId: string, options?: import("./types").ReadOptions | undefined) => Promise<import("./types").Lot>;
86
88
  list: (marketId: string, saleId: string, filters?: {
87
- group?: string;
88
- productCode?: string;
89
- saleStatus?: import("./types").LotSaleStatus;
90
- sellerCustomerId?: string;
91
- buyerCustomerId?: string;
92
- }) => Promise<import("./types").Lot[]>;
89
+ group?: string | undefined;
90
+ productCode?: string | undefined;
91
+ saleStatus?: import("./types").LotSaleStatus | undefined;
92
+ sellerCustomerId?: string | undefined;
93
+ buyerCustomerId?: string | undefined;
94
+ } | undefined) => Promise<import("./types").Lot[]>;
93
95
  create: (marketId: string, saleId: string, data: {
94
- index?: number;
95
- lotNumber?: string;
96
- group?: string;
97
- productCode?: string;
98
- sellerCustomerId?: string;
99
- attributes?: Record<string, any>;
100
- metadata?: Record<string, any>;
101
- buyerCustomerId?: string;
102
- unitPriceInCents?: number;
103
- reservePriceInCents?: number;
104
- startingPriceInCents?: number;
105
- startAt?: string;
106
- endAt?: string;
107
- previousLotNumber?: string;
108
- saleStatus?: import("./types").LotSaleStatus;
96
+ index?: number | undefined;
97
+ lotNumber?: string | undefined;
98
+ group?: string | undefined;
99
+ productCode?: string | undefined;
100
+ sellerCustomerId?: string | undefined;
101
+ attributes?: Record<string, any> | undefined;
102
+ metadata?: Record<string, any> | undefined;
103
+ buyerCustomerId?: string | undefined;
104
+ unitPriceInCents?: number | undefined;
105
+ reservePriceInCents?: number | undefined;
106
+ startingPriceInCents?: number | undefined;
107
+ startAt?: string | undefined;
108
+ endAt?: string | undefined;
109
+ previousLotNumber?: string | undefined;
110
+ saleStatus?: import("./types").LotSaleStatus | undefined;
109
111
  }) => Promise<import("./types").Lot>;
110
112
  update: (marketId: string, saleId: string, lotId: string, data: {
111
- productCode?: string;
112
- attributes?: Record<string, any>;
113
- sellerCasual?: string | null;
114
- sellerCustomerId?: string | null;
115
- lotNumber?: string | null;
116
- remarks?: string;
117
- notes?: string;
118
- unitOfSale?: "Per KG" | "Per Item" | "Per Lot" | "Per 1000KG";
119
- unitPriceInCents?: number;
120
- reservePriceInCents?: number;
121
- startingPriceInCents?: number;
122
- buyerCasual?: string | null;
123
- buyerCustomerId?: string | null;
124
- startAt?: string | null;
125
- endAt?: string | null;
126
- saleStatus?: import("./types").LotSaleStatus;
127
- metadata?: Record<string, any>;
128
- inputAccessories?: Record<string, any>;
113
+ productCode?: string | undefined;
114
+ attributes?: Record<string, any> | undefined;
115
+ sellerCasual?: string | null | undefined;
116
+ sellerCustomerId?: string | null | undefined;
117
+ lotNumber?: string | null | undefined;
118
+ remarks?: string | undefined;
119
+ notes?: string | undefined;
120
+ unitOfSale?: "Per KG" | "Per Item" | "Per Lot" | "Per 1000KG" | undefined;
121
+ unitPriceInCents?: number | undefined;
122
+ reservePriceInCents?: number | undefined;
123
+ startingPriceInCents?: number | undefined;
124
+ buyerCasual?: string | null | undefined;
125
+ buyerCustomerId?: string | null | undefined;
126
+ startAt?: string | null | undefined;
127
+ endAt?: string | null | undefined;
128
+ saleStatus?: import("./types").LotSaleStatus | undefined;
129
+ metadata?: Record<string, any> | undefined;
130
+ inputAccessories?: Record<string, any> | undefined;
129
131
  }) => Promise<import("./types").Lot>;
130
132
  delete: (marketId: string, saleId: string, lotId: string) => Promise<unknown>;
133
+ deletePreflight: (marketId: string, saleId: string, lotId: string) => Promise<import("./types").LotDeletePreflightResponse>;
134
+ deletePreflightBatch: (marketId: string, saleId: string, lotIds: string[]) => Promise<import("./types").DeleteLotsResponse>;
135
+ deleteBatch: (marketId: string, saleId: string, lotIds: string[], confirmedLotIds?: string[] | undefined) => Promise<import("./types").DeleteLotsResponse>;
131
136
  };
132
137
  lotitems: {
133
138
  create: (marketId: string, saleId: string, lotId: string, data: {
134
- attributes?: Record<string, any>;
135
- notes?: Array<{
139
+ attributes?: Record<string, any> | undefined;
140
+ notes?: {
136
141
  text: string;
137
- }>;
138
- metadata?: Record<string, any>;
142
+ }[] | undefined;
143
+ metadata?: Record<string, any> | undefined;
139
144
  }) => Promise<import("./types").LotItem>;
140
145
  update: (marketId: string, saleId: string, lotId: string, itemId: string, data: {
141
- attributes?: Record<string, any>;
142
- index?: number;
143
- metadata?: Record<string, any>;
146
+ attributes?: Record<string, any> | undefined;
147
+ index?: number | undefined;
148
+ metadata?: Record<string, any> | undefined;
144
149
  }) => Promise<import("./types").LotItem>;
145
150
  delete: (marketId: string, saleId: string, lotId: string, itemId: string) => Promise<unknown>;
146
151
  };
@@ -153,27 +158,27 @@ export default function resources(httpClient: HttpClient): {
153
158
  lookup: (marketId: string, cph: string) => Promise<import("./types").CphLookupResponse>;
154
159
  };
155
160
  webhooks: {
156
- constructEvent: <T extends unknown>(bodyAsBuffer: Buffer, signature: string | undefined | null, endpointSecret: string | undefined | null) => Promise<import("./types").WebhookEvent<T>>;
161
+ constructEvent: <T extends unknown>(bodyAsBuffer: Buffer, signature: string | null | undefined, endpointSecret: string | null | undefined) => Promise<import("./types").WebhookEvent<T>>;
157
162
  };
158
163
  actions: {
159
164
  constructAction: (bodyAsBuffer: Buffer, signature: string, endpointSecret: string) => Promise<any>;
160
165
  };
161
166
  bidderApplications: {
162
- list: (marketId: string, options?: import("./resources/bidderApplications").ListApplicationsOptions) => Promise<import("./resources/bidderApplications").ListApplicationsResponse>;
167
+ list: (marketId: string, options?: import("./resources/bidderApplications").ListApplicationsOptions | undefined) => Promise<import("./resources/bidderApplications").ListApplicationsResponse>;
163
168
  get: (marketId: string, applicationId: string) => Promise<import("./types").Application>;
164
169
  create: (marketId: string, applicationData: import("./resources/bidderApplications").CreateApplicationPayload) => Promise<import("./types").Application>;
165
170
  update: (marketId: string, applicationId: string, updateData: import("./resources/bidderApplications").UpdateApplicationPayload) => Promise<import("./types").Application>;
166
- approve: (marketId: string, applicationId: string, notes?: string) => Promise<import("./types").Application>;
167
- reject: (marketId: string, applicationId: string, notes?: string) => Promise<import("./types").Application>;
171
+ approve: (marketId: string, applicationId: string, notes?: string | undefined) => Promise<import("./types").Application>;
172
+ reject: (marketId: string, applicationId: string, notes?: string | undefined) => Promise<import("./types").Application>;
168
173
  unlink: (marketId: string, applicationId: string) => Promise<import("./types").Application>;
169
174
  delete: (marketId: string, applicationId: string) => Promise<void>;
170
175
  };
171
176
  settings: {
172
- get: (marketId: string, options?: import("./types").ReadOptions) => Promise<import("./types").SettingsMarketDefaults>;
177
+ get: (marketId: string, options?: import("./types").ReadOptions | undefined) => Promise<import("./types").SettingsMarketDefaults>;
173
178
  };
174
179
  adjustments: {
175
180
  list: (marketId: string) => Promise<import("./types").AdjustmentsConfiguration[]>;
176
- get: (marketId: string, id: string, options?: import("./types").ReadOptions) => Promise<import("./types").AdjustmentsConfiguration>;
181
+ get: (marketId: string, id: string, options?: import("./types").ReadOptions | undefined) => Promise<import("./types").AdjustmentsConfiguration>;
177
182
  create: (marketId: string, data: Partial<import("./types").AdjustmentsConfiguration>) => Promise<import("./types").AdjustmentsConfiguration>;
178
183
  update: (marketId: string, id: string, data: Partial<import("./types").AdjustmentsConfiguration>) => Promise<import("./types").AdjustmentsConfiguration>;
179
184
  };
@@ -185,7 +190,7 @@ export default function resources(httpClient: HttpClient): {
185
190
  };
186
191
  productCodes: {
187
192
  list: (marketId: string) => Promise<import("./types").ProductCodeConfiguration[]>;
188
- get: (marketId: string, id: string, options?: import("./types").ReadOptions) => Promise<import("./types").ProductCodeConfiguration>;
193
+ get: (marketId: string, id: string, options?: import("./types").ReadOptions | undefined) => Promise<import("./types").ProductCodeConfiguration>;
189
194
  create: (marketId: string, data: Partial<import("./types").ProductCodeConfiguration>) => Promise<import("./types").ProductCodeConfiguration>;
190
195
  update: (marketId: string, id: string, data: Partial<import("./types").ProductCodeConfiguration>) => Promise<import("./types").ProductCodeConfiguration>;
191
196
  };
@@ -199,13 +204,13 @@ export default function resources(httpClient: HttpClient): {
199
204
  create: (marketId: string, body: {
200
205
  saleId: string;
201
206
  name: string;
202
- description?: string | null;
207
+ description?: string | null | undefined;
203
208
  }) => Promise<{
204
209
  templateId: string;
205
210
  }>;
206
211
  update: (marketId: string, templateId: string, body: {
207
- name?: string;
208
- description?: string | null;
212
+ name?: string | undefined;
213
+ description?: string | null | undefined;
209
214
  }) => Promise<{
210
215
  template: import("./types").SaleTemplate;
211
216
  }>;
@@ -218,24 +223,41 @@ export default function resources(httpClient: HttpClient): {
218
223
  get: (marketId: string, id: string) => Promise<import("./types").TaxRate>;
219
224
  };
220
225
  customers: {
221
- list: (marketId: string, lastId?: string | null) => Promise<import("./resources/customers").CustomersListResponse>;
222
- get: (marketId: string, customerId: string, options?: import("./types").ReadOptions) => Promise<import("./types").Customer>;
226
+ list: (marketId: string, lastId?: string | null | undefined) => Promise<import("./resources/customers").CustomersListResponse>;
227
+ get: (marketId: string, customerId: string, options?: import("./types").ReadOptions | undefined) => Promise<import("./types").Customer>;
223
228
  avatar: (marketId: string, customerId: string) => Promise<import("./types").Customer>;
224
229
  create: (marketId: string, customerData: import("./resources/customers").CreateCustomerPayload) => Promise<import("./types").Customer>;
225
230
  update: (marketId: string, customerId: string, customerData: import("./resources/customers").UpdateCustomerPayload) => Promise<import("./types").Customer>;
226
231
  getByAccountNumber: (marketId: string, accountNumber: string) => Promise<import("./types").Customer | null>;
227
232
  getByMartEyeUid: (marketId: string, marteyeUid: string) => Promise<import("./types").Customer | null>;
228
233
  };
234
+ customerLists: {
235
+ list: (marketId: string, options?: import("./resources/customerLists").CustomerListsListOptions | undefined) => Promise<import("./resources/customerLists").CustomerListsListResponse>;
236
+ listAll: (marketId: string, options?: Omit<import("./resources/customerLists").CustomerListsListOptions, "offset"> | undefined) => Promise<import("./resources/customerLists").CustomerList[]>;
237
+ get: (marketId: string, listId: string) => Promise<import("./resources/customerLists").CustomerList>;
238
+ getBySlug: (marketId: string, slug: string) => Promise<import("./resources/customerLists").CustomerList>;
239
+ create: (marketId: string, payload: import("./resources/customerLists").CreateCustomerListPayload) => Promise<import("./resources/customerLists").CustomerList>;
240
+ update: (marketId: string, listId: string, payload: import("./resources/customerLists").UpdateCustomerListPayload) => Promise<import("./resources/customerLists").CustomerList>;
241
+ delete: (marketId: string, listId: string) => Promise<import("./resources/customerLists").CustomerListDeleteResponse>;
242
+ refresh: (marketId: string, listId: string) => Promise<import("./resources/customerLists").CustomerListRefreshResponse>;
243
+ getMembers: (marketId: string, listId: string, options?: import("./resources/customerLists").CustomerListMembersOptions | undefined) => Promise<import("./resources/customerLists").CustomerListMembersResponse>;
244
+ getAllMembers: (marketId: string, listId: string, options?: Omit<import("./resources/customerLists").CustomerListMembersOptions, "offset"> | undefined) => Promise<import("./resources/customerLists").CustomerListMember[]>;
245
+ addMembers: (marketId: string, listId: string, customerIds: string[]) => Promise<import("./resources/customerLists").CustomerListAddMembersResponse>;
246
+ removeMember: (marketId: string, listId: string, customerId: string) => Promise<import("./resources/customerLists").CustomerListRemoveMemberResponse>;
247
+ preview: (marketId: string, filters: import("./resources/customerLists").CustomerListFilters) => Promise<import("./resources/customerLists").CustomerListPreviewResponse>;
248
+ listProductCodes: (marketId: string) => Promise<import("./resources/customerLists").CustomerListProductCodesResponse>;
249
+ view: (marketId: string, listIdOrSlug: string, options?: import("./resources/customerLists").CustomerListViewOptions | undefined) => Promise<import("./resources/customerLists").CustomerListViewResult>;
250
+ };
229
251
  invoices: {
230
- list: (marketId: string, lastId?: string | null) => Promise<import("./resources/invoices").InvoicesListResponse>;
231
- get: (marketId: string, invoiceId: string, options?: import("./types").ReadOptions) => Promise<import("./types").Invoice>;
252
+ list: (marketId: string, lastId?: string | null | undefined) => Promise<import("./resources/invoices").InvoicesListResponse>;
253
+ get: (marketId: string, invoiceId: string, options?: import("./types").ReadOptions | undefined) => Promise<import("./types").Invoice>;
232
254
  };
233
255
  payments: {
234
- list: (marketId: string, lastId?: string | null) => Promise<import("./resources/payments").PaymentsListResponse>;
256
+ list: (marketId: string, lastId?: string | null | undefined) => Promise<import("./resources/payments").PaymentsListResponse>;
235
257
  get: (marketId: string, paymentId: string) => Promise<import("./types").Payment>;
236
258
  };
237
259
  payouts: {
238
- list: (marketId: string, lastId?: string | null) => Promise<import("./resources/payouts").PayoutsListResponse>;
260
+ list: (marketId: string, lastId?: string | null | undefined) => Promise<import("./resources/payouts").PayoutsListResponse>;
239
261
  get: (marketId: string, payoutId: string) => Promise<import("./types").Payout>;
240
262
  create: (marketId: string, data: import("./resources/payouts").CreatePayoutRequest) => Promise<import("./resources/payouts").PayoutCreateResponse>;
241
263
  };
@@ -243,11 +265,11 @@ export default function resources(httpClient: HttpClient): {
243
265
  query: (marketId: string, query: string) => Promise<import("./resources/search").SearchResult>;
244
266
  };
245
267
  files: {
246
- uploadSingleFile: (input: Parameters<typeof import("./utils/multipart-upload").uploadSingleFile>[0], token: string) => Promise<{
268
+ uploadSingleFile: (input: import("./utils/multipart-upload").SingleFileInput, token: string) => Promise<{
247
269
  message: string;
248
270
  data: import("./types").Media;
249
271
  }>;
250
- uploadMultipartFile: (input: Parameters<typeof import("./utils/multipart-upload").uploadMultipartFile>[0], token: string) => Promise<{
272
+ uploadMultipartFile: (input: import("./index.common").FileInput | import("./index.common").ChunkedInput, token: string) => Promise<{
251
273
  message: string;
252
274
  mediaType: string;
253
275
  process: import("./utils/multipart-upload").VariantProcessingState;
@@ -258,9 +280,9 @@ export default function resources(httpClient: HttpClient): {
258
280
  };
259
281
  contacts: {
260
282
  list: (marketId: string, customerId: string, params?: {
261
- lastId?: string;
262
- limit?: number;
263
- }) => Promise<import("./resources/contacts").ListContactsResponse>;
283
+ lastId?: string | undefined;
284
+ limit?: number | undefined;
285
+ } | undefined) => Promise<import("./resources/contacts").ListContactsResponse>;
264
286
  get: (marketId: string, customerId: string, contactId: string) => Promise<import("./types").CustomerContact>;
265
287
  create: (marketId: string, customerId: string, payload: import("./resources/contacts").CreateOrUpdateContactPayload) => Promise<import("./types").CustomerContact>;
266
288
  update: (marketId: string, customerId: string, contactId: string, payload: import("./resources/contacts").CreateOrUpdateContactPayload) => Promise<import("./types").CustomerContact>;
@@ -272,4 +294,8 @@ export default function resources(httpClient: HttpClient): {
272
294
  getLatestTransaction: (marketId: string, account: string) => Promise<import("./resources/ledger").LedgerTransaction>;
273
295
  listTransactions: (marketId: string, params: import("./resources/ledger").ListTransactionsParams) => Promise<import("./resources/ledger").TransactionsListResponse>;
274
296
  };
297
+ sms: {
298
+ sendSMS: (marketId: string, data: import("./types").SendSMSPayload) => Promise<import("./types").SMSTask>;
299
+ getSMS: (marketId: string, smsId: string) => Promise<import("./types").SMSTask>;
300
+ };
275
301
  };