@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.
- package/dist/index.d.ts +558 -265
- package/dist/index.esm.js +667 -52
- package/dist/index.js +667 -52
- package/dist/net/http.d.ts +3 -3
- package/dist/resources/actions.d.ts +1 -0
- package/dist/resources/customerLists.d.ts +214 -0
- package/dist/resources/lots.d.ts +4 -1
- package/dist/resources/sales.d.ts +1 -0
- package/dist/resources/sms.d.ts +7 -0
- package/dist/resources/webhooks.d.ts +1 -0
- package/dist/resources.d.ts +142 -116
- package/dist/studio.d.ts +142 -116
- package/dist/types.d.ts +68 -3
- package/package.json +1 -1
package/dist/studio.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import Resources from "./resources";
|
|
2
3
|
export type StudioInstance = ReturnType<typeof Resources> & {
|
|
3
4
|
isDebugMode: boolean;
|
|
@@ -10,21 +11,21 @@ export declare function Studio(info?: {
|
|
|
10
11
|
}): {
|
|
11
12
|
isDebugMode: boolean;
|
|
12
13
|
activity: {
|
|
13
|
-
list: (marketId: string, params?: import("./resources/activity").ActivityListParams) => Promise<import("./resources/activity").ActivityListResponse>;
|
|
14
|
+
list: (marketId: string, params?: import("./resources/activity").ActivityListParams | undefined) => Promise<import("./resources/activity").ActivityListResponse>;
|
|
14
15
|
get: (marketId: string, activityId: string) => Promise<import("./types").ActivityLog>;
|
|
15
16
|
};
|
|
16
17
|
markets: {
|
|
17
|
-
get: (marketId: string, options?: import("./types").ReadOptions) => Promise<import("./types").Market>;
|
|
18
|
+
get: (marketId: string, options?: import("./types").ReadOptions | undefined) => Promise<import("./types").Market>;
|
|
18
19
|
};
|
|
19
20
|
members: {
|
|
20
|
-
list: (marketId: string, params?: import("./resources/members").MembersListParams) => Promise<import("./resources/members").MembersListResponse>;
|
|
21
|
+
list: (marketId: string, params?: import("./resources/members").MembersListParams | undefined) => Promise<import("./resources/members").MembersListResponse>;
|
|
21
22
|
get: (marketId: string, memberId: string) => Promise<import("./resources/members").Member>;
|
|
22
23
|
};
|
|
23
24
|
sales: {
|
|
24
|
-
get: (marketId: string, saleId: string, options?: import("./types").ReadOptions) => Promise<import("./types").Sale>;
|
|
25
|
+
get: (marketId: string, saleId: string, options?: import("./types").ReadOptions | undefined) => Promise<import("./types").Sale>;
|
|
25
26
|
list: (marketId: string, opts: {
|
|
26
|
-
start?: string;
|
|
27
|
-
end?: string;
|
|
27
|
+
start?: string | undefined;
|
|
28
|
+
end?: string | undefined;
|
|
28
29
|
}) => Promise<{
|
|
29
30
|
start: string;
|
|
30
31
|
end: string;
|
|
@@ -34,122 +35,126 @@ export declare function Studio(info?: {
|
|
|
34
35
|
name: string;
|
|
35
36
|
startsAt: string;
|
|
36
37
|
availableProductCodes: string[];
|
|
37
|
-
recurring?:
|
|
38
|
-
martEyeSaleType?: "LIVE" | "TIMED" | null;
|
|
39
|
-
location?: string | null;
|
|
40
|
-
description?: string | null;
|
|
41
|
-
image?: string | null;
|
|
42
|
-
cover?: string | null;
|
|
43
|
-
templateId?: string | null;
|
|
38
|
+
recurring?: "Weekly" | "Bi-weekly" | "Monthly" | null | undefined;
|
|
39
|
+
martEyeSaleType?: "LIVE" | "TIMED" | null | undefined;
|
|
40
|
+
location?: string | null | undefined;
|
|
41
|
+
description?: string | null | undefined;
|
|
42
|
+
image?: string | null | undefined;
|
|
43
|
+
cover?: string | null | undefined;
|
|
44
|
+
templateId?: string | null | undefined;
|
|
44
45
|
attributeDefaults?: {
|
|
45
46
|
[attributekey: string]: string | number | boolean;
|
|
46
|
-
};
|
|
47
|
+
} | undefined;
|
|
47
48
|
}) => Promise<{
|
|
48
49
|
saleId: string;
|
|
49
50
|
}>;
|
|
50
51
|
update: (marketId: string, saleId: string, data: {
|
|
51
|
-
name?: string;
|
|
52
|
-
startsAt?: string;
|
|
53
|
-
recurring?: "Weekly" | "Bi-weekly" | "Monthly" | null;
|
|
54
|
-
defaultProductCode?: string;
|
|
55
|
-
attributeDefaults?: Record<string, any
|
|
56
|
-
publishStatus?: import("./types").SalePublishStatus;
|
|
52
|
+
name?: string | undefined;
|
|
53
|
+
startsAt?: string | undefined;
|
|
54
|
+
recurring?: "Weekly" | "Bi-weekly" | "Monthly" | null | undefined;
|
|
55
|
+
defaultProductCode?: string | undefined;
|
|
56
|
+
attributeDefaults?: Record<string, any> | undefined;
|
|
57
|
+
publishStatus?: import("./types").SalePublishStatus | undefined;
|
|
57
58
|
marteyeSettings?: {
|
|
58
|
-
description?: string;
|
|
59
|
-
image?: string;
|
|
60
|
-
logo?: string;
|
|
59
|
+
description?: string | undefined;
|
|
60
|
+
image?: string | undefined;
|
|
61
|
+
logo?: string | undefined;
|
|
61
62
|
type: "LIVE" | "TIMED";
|
|
62
|
-
location?: string | null;
|
|
63
|
-
descriptionLines?: string[];
|
|
64
|
-
descriptionLink?: string;
|
|
65
|
-
deposit?: number;
|
|
66
|
-
hidePrices?: boolean;
|
|
67
|
-
hideReplay?: boolean;
|
|
68
|
-
labels?: string[];
|
|
69
|
-
tags?: string[];
|
|
70
|
-
details?:
|
|
63
|
+
location?: string | null | undefined;
|
|
64
|
+
descriptionLines?: string[] | undefined;
|
|
65
|
+
descriptionLink?: string | undefined;
|
|
66
|
+
deposit?: number | undefined;
|
|
67
|
+
hidePrices?: boolean | undefined;
|
|
68
|
+
hideReplay?: boolean | undefined;
|
|
69
|
+
labels?: string[] | undefined;
|
|
70
|
+
tags?: string[] | undefined;
|
|
71
|
+
details?: {
|
|
71
72
|
markdownBase64: string;
|
|
72
73
|
title: string;
|
|
73
|
-
}
|
|
74
|
-
cover?: string;
|
|
75
|
-
primaryColour?: string;
|
|
76
|
-
secondaryColour?: string;
|
|
77
|
-
foregroundColour?: string;
|
|
78
|
-
extensionTime?: number;
|
|
79
|
-
incrementLadder?:
|
|
74
|
+
}[] | undefined;
|
|
75
|
+
cover?: string | undefined;
|
|
76
|
+
primaryColour?: string | undefined;
|
|
77
|
+
secondaryColour?: string | undefined;
|
|
78
|
+
foregroundColour?: string | undefined;
|
|
79
|
+
extensionTime?: number | undefined;
|
|
80
|
+
incrementLadder?: {
|
|
80
81
|
max: number;
|
|
81
82
|
increment: number;
|
|
82
|
-
}
|
|
83
|
-
hideNav?: boolean;
|
|
84
|
-
signInOverrideLink?: string;
|
|
85
|
-
published?: boolean;
|
|
86
|
-
pin?: boolean;
|
|
87
|
-
cascade?: boolean;
|
|
88
|
-
reportEmail?: string;
|
|
89
|
-
queueLots?: boolean;
|
|
90
|
-
|
|
83
|
+
}[] | undefined;
|
|
84
|
+
hideNav?: boolean | undefined;
|
|
85
|
+
signInOverrideLink?: string | undefined;
|
|
86
|
+
published?: boolean | undefined;
|
|
87
|
+
pin?: boolean | undefined;
|
|
88
|
+
cascade?: boolean | undefined;
|
|
89
|
+
reportEmail?: string | undefined;
|
|
90
|
+
queueLots?: boolean | undefined;
|
|
91
|
+
markSubjectLotsAsSold?: boolean | undefined;
|
|
92
|
+
} | null | undefined;
|
|
91
93
|
}) => Promise<import("./types").Sale>;
|
|
92
94
|
};
|
|
93
95
|
lots: {
|
|
94
|
-
get: (marketId: string, saleId: string, lotId: string, options?: import("./types").ReadOptions) => Promise<import("./types").Lot>;
|
|
96
|
+
get: (marketId: string, saleId: string, lotId: string, options?: import("./types").ReadOptions | undefined) => Promise<import("./types").Lot>;
|
|
95
97
|
list: (marketId: string, saleId: string, filters?: {
|
|
96
|
-
group?: string;
|
|
97
|
-
productCode?: string;
|
|
98
|
-
saleStatus?: import("./types").LotSaleStatus;
|
|
99
|
-
sellerCustomerId?: string;
|
|
100
|
-
buyerCustomerId?: string;
|
|
101
|
-
}) => Promise<import("./types").Lot[]>;
|
|
98
|
+
group?: string | undefined;
|
|
99
|
+
productCode?: string | undefined;
|
|
100
|
+
saleStatus?: import("./types").LotSaleStatus | undefined;
|
|
101
|
+
sellerCustomerId?: string | undefined;
|
|
102
|
+
buyerCustomerId?: string | undefined;
|
|
103
|
+
} | undefined) => Promise<import("./types").Lot[]>;
|
|
102
104
|
create: (marketId: string, saleId: string, data: {
|
|
103
|
-
index?: number;
|
|
104
|
-
lotNumber?: string;
|
|
105
|
-
group?: string;
|
|
106
|
-
productCode?: string;
|
|
107
|
-
sellerCustomerId?: string;
|
|
108
|
-
attributes?: Record<string, any
|
|
109
|
-
metadata?: Record<string, any
|
|
110
|
-
buyerCustomerId?: string;
|
|
111
|
-
unitPriceInCents?: number;
|
|
112
|
-
reservePriceInCents?: number;
|
|
113
|
-
startingPriceInCents?: number;
|
|
114
|
-
startAt?: string;
|
|
115
|
-
endAt?: string;
|
|
116
|
-
previousLotNumber?: string;
|
|
117
|
-
saleStatus?: import("./types").LotSaleStatus;
|
|
105
|
+
index?: number | undefined;
|
|
106
|
+
lotNumber?: string | undefined;
|
|
107
|
+
group?: string | undefined;
|
|
108
|
+
productCode?: string | undefined;
|
|
109
|
+
sellerCustomerId?: string | undefined;
|
|
110
|
+
attributes?: Record<string, any> | undefined;
|
|
111
|
+
metadata?: Record<string, any> | undefined;
|
|
112
|
+
buyerCustomerId?: string | undefined;
|
|
113
|
+
unitPriceInCents?: number | undefined;
|
|
114
|
+
reservePriceInCents?: number | undefined;
|
|
115
|
+
startingPriceInCents?: number | undefined;
|
|
116
|
+
startAt?: string | undefined;
|
|
117
|
+
endAt?: string | undefined;
|
|
118
|
+
previousLotNumber?: string | undefined;
|
|
119
|
+
saleStatus?: import("./types").LotSaleStatus | undefined;
|
|
118
120
|
}) => Promise<import("./types").Lot>;
|
|
119
121
|
update: (marketId: string, saleId: string, lotId: string, data: {
|
|
120
|
-
productCode?: string;
|
|
121
|
-
attributes?: Record<string, any
|
|
122
|
-
sellerCasual?: string | null;
|
|
123
|
-
sellerCustomerId?: string | null;
|
|
124
|
-
lotNumber?: string | null;
|
|
125
|
-
remarks?: string;
|
|
126
|
-
notes?: string;
|
|
127
|
-
unitOfSale?: "Per KG" | "Per Item" | "Per Lot" | "Per 1000KG";
|
|
128
|
-
unitPriceInCents?: number;
|
|
129
|
-
reservePriceInCents?: number;
|
|
130
|
-
startingPriceInCents?: number;
|
|
131
|
-
buyerCasual?: string | null;
|
|
132
|
-
buyerCustomerId?: string | null;
|
|
133
|
-
startAt?: string | null;
|
|
134
|
-
endAt?: string | null;
|
|
135
|
-
saleStatus?: import("./types").LotSaleStatus;
|
|
136
|
-
metadata?: Record<string, any
|
|
137
|
-
inputAccessories?: Record<string, any
|
|
122
|
+
productCode?: string | undefined;
|
|
123
|
+
attributes?: Record<string, any> | undefined;
|
|
124
|
+
sellerCasual?: string | null | undefined;
|
|
125
|
+
sellerCustomerId?: string | null | undefined;
|
|
126
|
+
lotNumber?: string | null | undefined;
|
|
127
|
+
remarks?: string | undefined;
|
|
128
|
+
notes?: string | undefined;
|
|
129
|
+
unitOfSale?: "Per KG" | "Per Item" | "Per Lot" | "Per 1000KG" | undefined;
|
|
130
|
+
unitPriceInCents?: number | undefined;
|
|
131
|
+
reservePriceInCents?: number | undefined;
|
|
132
|
+
startingPriceInCents?: number | undefined;
|
|
133
|
+
buyerCasual?: string | null | undefined;
|
|
134
|
+
buyerCustomerId?: string | null | undefined;
|
|
135
|
+
startAt?: string | null | undefined;
|
|
136
|
+
endAt?: string | null | undefined;
|
|
137
|
+
saleStatus?: import("./types").LotSaleStatus | undefined;
|
|
138
|
+
metadata?: Record<string, any> | undefined;
|
|
139
|
+
inputAccessories?: Record<string, any> | undefined;
|
|
138
140
|
}) => Promise<import("./types").Lot>;
|
|
139
141
|
delete: (marketId: string, saleId: string, lotId: string) => Promise<unknown>;
|
|
142
|
+
deletePreflight: (marketId: string, saleId: string, lotId: string) => Promise<import("./types").LotDeletePreflightResponse>;
|
|
143
|
+
deletePreflightBatch: (marketId: string, saleId: string, lotIds: string[]) => Promise<import("./types").DeleteLotsResponse>;
|
|
144
|
+
deleteBatch: (marketId: string, saleId: string, lotIds: string[], confirmedLotIds?: string[] | undefined) => Promise<import("./types").DeleteLotsResponse>;
|
|
140
145
|
};
|
|
141
146
|
lotitems: {
|
|
142
147
|
create: (marketId: string, saleId: string, lotId: string, data: {
|
|
143
|
-
attributes?: Record<string, any
|
|
144
|
-
notes?:
|
|
148
|
+
attributes?: Record<string, any> | undefined;
|
|
149
|
+
notes?: {
|
|
145
150
|
text: string;
|
|
146
|
-
}
|
|
147
|
-
metadata?: Record<string, any
|
|
151
|
+
}[] | undefined;
|
|
152
|
+
metadata?: Record<string, any> | undefined;
|
|
148
153
|
}) => Promise<import("./types").LotItem>;
|
|
149
154
|
update: (marketId: string, saleId: string, lotId: string, itemId: string, data: {
|
|
150
|
-
attributes?: Record<string, any
|
|
151
|
-
index?: number;
|
|
152
|
-
metadata?: Record<string, any
|
|
155
|
+
attributes?: Record<string, any> | undefined;
|
|
156
|
+
index?: number | undefined;
|
|
157
|
+
metadata?: Record<string, any> | undefined;
|
|
153
158
|
}) => Promise<import("./types").LotItem>;
|
|
154
159
|
delete: (marketId: string, saleId: string, lotId: string, itemId: string) => Promise<unknown>;
|
|
155
160
|
};
|
|
@@ -162,27 +167,27 @@ export declare function Studio(info?: {
|
|
|
162
167
|
lookup: (marketId: string, cph: string) => Promise<import("./types").CphLookupResponse>;
|
|
163
168
|
};
|
|
164
169
|
webhooks: {
|
|
165
|
-
constructEvent: <T extends unknown>(bodyAsBuffer: Buffer, signature: string |
|
|
170
|
+
constructEvent: <T extends unknown>(bodyAsBuffer: Buffer, signature: string | null | undefined, endpointSecret: string | null | undefined) => Promise<import("./types").WebhookEvent<T>>;
|
|
166
171
|
};
|
|
167
172
|
actions: {
|
|
168
173
|
constructAction: (bodyAsBuffer: Buffer, signature: string, endpointSecret: string) => Promise<any>;
|
|
169
174
|
};
|
|
170
175
|
bidderApplications: {
|
|
171
|
-
list: (marketId: string, options?: import("./resources/bidderApplications").ListApplicationsOptions) => Promise<import("./resources/bidderApplications").ListApplicationsResponse>;
|
|
176
|
+
list: (marketId: string, options?: import("./resources/bidderApplications").ListApplicationsOptions | undefined) => Promise<import("./resources/bidderApplications").ListApplicationsResponse>;
|
|
172
177
|
get: (marketId: string, applicationId: string) => Promise<import("./types").Application>;
|
|
173
178
|
create: (marketId: string, applicationData: import("./resources/bidderApplications").CreateApplicationPayload) => Promise<import("./types").Application>;
|
|
174
179
|
update: (marketId: string, applicationId: string, updateData: import("./resources/bidderApplications").UpdateApplicationPayload) => Promise<import("./types").Application>;
|
|
175
|
-
approve: (marketId: string, applicationId: string, notes?: string) => Promise<import("./types").Application>;
|
|
176
|
-
reject: (marketId: string, applicationId: string, notes?: string) => Promise<import("./types").Application>;
|
|
180
|
+
approve: (marketId: string, applicationId: string, notes?: string | undefined) => Promise<import("./types").Application>;
|
|
181
|
+
reject: (marketId: string, applicationId: string, notes?: string | undefined) => Promise<import("./types").Application>;
|
|
177
182
|
unlink: (marketId: string, applicationId: string) => Promise<import("./types").Application>;
|
|
178
183
|
delete: (marketId: string, applicationId: string) => Promise<void>;
|
|
179
184
|
};
|
|
180
185
|
settings: {
|
|
181
|
-
get: (marketId: string, options?: import("./types").ReadOptions) => Promise<import("./types").SettingsMarketDefaults>;
|
|
186
|
+
get: (marketId: string, options?: import("./types").ReadOptions | undefined) => Promise<import("./types").SettingsMarketDefaults>;
|
|
182
187
|
};
|
|
183
188
|
adjustments: {
|
|
184
189
|
list: (marketId: string) => Promise<import("./types").AdjustmentsConfiguration[]>;
|
|
185
|
-
get: (marketId: string, id: string, options?: import("./types").ReadOptions) => Promise<import("./types").AdjustmentsConfiguration>;
|
|
190
|
+
get: (marketId: string, id: string, options?: import("./types").ReadOptions | undefined) => Promise<import("./types").AdjustmentsConfiguration>;
|
|
186
191
|
create: (marketId: string, data: Partial<import("./types").AdjustmentsConfiguration>) => Promise<import("./types").AdjustmentsConfiguration>;
|
|
187
192
|
update: (marketId: string, id: string, data: Partial<import("./types").AdjustmentsConfiguration>) => Promise<import("./types").AdjustmentsConfiguration>;
|
|
188
193
|
};
|
|
@@ -194,7 +199,7 @@ export declare function Studio(info?: {
|
|
|
194
199
|
};
|
|
195
200
|
productCodes: {
|
|
196
201
|
list: (marketId: string) => Promise<import("./types").ProductCodeConfiguration[]>;
|
|
197
|
-
get: (marketId: string, id: string, options?: import("./types").ReadOptions) => Promise<import("./types").ProductCodeConfiguration>;
|
|
202
|
+
get: (marketId: string, id: string, options?: import("./types").ReadOptions | undefined) => Promise<import("./types").ProductCodeConfiguration>;
|
|
198
203
|
create: (marketId: string, data: Partial<import("./types").ProductCodeConfiguration>) => Promise<import("./types").ProductCodeConfiguration>;
|
|
199
204
|
update: (marketId: string, id: string, data: Partial<import("./types").ProductCodeConfiguration>) => Promise<import("./types").ProductCodeConfiguration>;
|
|
200
205
|
};
|
|
@@ -208,13 +213,13 @@ export declare function Studio(info?: {
|
|
|
208
213
|
create: (marketId: string, body: {
|
|
209
214
|
saleId: string;
|
|
210
215
|
name: string;
|
|
211
|
-
description?: string | null;
|
|
216
|
+
description?: string | null | undefined;
|
|
212
217
|
}) => Promise<{
|
|
213
218
|
templateId: string;
|
|
214
219
|
}>;
|
|
215
220
|
update: (marketId: string, templateId: string, body: {
|
|
216
|
-
name?: string;
|
|
217
|
-
description?: string | null;
|
|
221
|
+
name?: string | undefined;
|
|
222
|
+
description?: string | null | undefined;
|
|
218
223
|
}) => Promise<{
|
|
219
224
|
template: import("./types").SaleTemplate;
|
|
220
225
|
}>;
|
|
@@ -227,24 +232,41 @@ export declare function Studio(info?: {
|
|
|
227
232
|
get: (marketId: string, id: string) => Promise<import("./types").TaxRate>;
|
|
228
233
|
};
|
|
229
234
|
customers: {
|
|
230
|
-
list: (marketId: string, lastId?: string | null) => Promise<import("./resources/customers").CustomersListResponse>;
|
|
231
|
-
get: (marketId: string, customerId: string, options?: import("./types").ReadOptions) => Promise<import("./types").Customer>;
|
|
235
|
+
list: (marketId: string, lastId?: string | null | undefined) => Promise<import("./resources/customers").CustomersListResponse>;
|
|
236
|
+
get: (marketId: string, customerId: string, options?: import("./types").ReadOptions | undefined) => Promise<import("./types").Customer>;
|
|
232
237
|
avatar: (marketId: string, customerId: string) => Promise<import("./types").Customer>;
|
|
233
238
|
create: (marketId: string, customerData: import(".").CreateCustomerPayload) => Promise<import("./types").Customer>;
|
|
234
239
|
update: (marketId: string, customerId: string, customerData: import(".").UpdateCustomerPayload) => Promise<import("./types").Customer>;
|
|
235
240
|
getByAccountNumber: (marketId: string, accountNumber: string) => Promise<import("./types").Customer | null>;
|
|
236
241
|
getByMartEyeUid: (marketId: string, marteyeUid: string) => Promise<import("./types").Customer | null>;
|
|
237
242
|
};
|
|
243
|
+
customerLists: {
|
|
244
|
+
list: (marketId: string, options?: import(".").CustomerListsListOptions | undefined) => Promise<import(".").CustomerListsListResponse>;
|
|
245
|
+
listAll: (marketId: string, options?: Omit<import(".").CustomerListsListOptions, "offset"> | undefined) => Promise<import(".").CustomerList[]>;
|
|
246
|
+
get: (marketId: string, listId: string) => Promise<import(".").CustomerList>;
|
|
247
|
+
getBySlug: (marketId: string, slug: string) => Promise<import(".").CustomerList>;
|
|
248
|
+
create: (marketId: string, payload: import(".").CreateCustomerListPayload) => Promise<import(".").CustomerList>;
|
|
249
|
+
update: (marketId: string, listId: string, payload: import(".").UpdateCustomerListPayload) => Promise<import(".").CustomerList>;
|
|
250
|
+
delete: (marketId: string, listId: string) => Promise<import(".").CustomerListDeleteResponse>;
|
|
251
|
+
refresh: (marketId: string, listId: string) => Promise<import(".").CustomerListRefreshResponse>;
|
|
252
|
+
getMembers: (marketId: string, listId: string, options?: import(".").CustomerListMembersOptions | undefined) => Promise<import(".").CustomerListMembersResponse>;
|
|
253
|
+
getAllMembers: (marketId: string, listId: string, options?: Omit<import(".").CustomerListMembersOptions, "offset"> | undefined) => Promise<import(".").CustomerListMember[]>;
|
|
254
|
+
addMembers: (marketId: string, listId: string, customerIds: string[]) => Promise<import(".").CustomerListAddMembersResponse>;
|
|
255
|
+
removeMember: (marketId: string, listId: string, customerId: string) => Promise<import(".").CustomerListRemoveMemberResponse>;
|
|
256
|
+
preview: (marketId: string, filters: import(".").CustomerListFilters) => Promise<import(".").CustomerListPreviewResponse>;
|
|
257
|
+
listProductCodes: (marketId: string) => Promise<import(".").CustomerListProductCodesResponse>;
|
|
258
|
+
view: (marketId: string, listIdOrSlug: string, options?: import(".").CustomerListViewOptions | undefined) => Promise<import(".").CustomerListViewResult>;
|
|
259
|
+
};
|
|
238
260
|
invoices: {
|
|
239
|
-
list: (marketId: string, lastId?: string | null) => Promise<import("./resources/invoices").InvoicesListResponse>;
|
|
240
|
-
get: (marketId: string, invoiceId: string, options?: import("./types").ReadOptions) => Promise<import("./types").Invoice>;
|
|
261
|
+
list: (marketId: string, lastId?: string | null | undefined) => Promise<import("./resources/invoices").InvoicesListResponse>;
|
|
262
|
+
get: (marketId: string, invoiceId: string, options?: import("./types").ReadOptions | undefined) => Promise<import("./types").Invoice>;
|
|
241
263
|
};
|
|
242
264
|
payments: {
|
|
243
|
-
list: (marketId: string, lastId?: string | null) => Promise<import("./resources/payments").PaymentsListResponse>;
|
|
265
|
+
list: (marketId: string, lastId?: string | null | undefined) => Promise<import("./resources/payments").PaymentsListResponse>;
|
|
244
266
|
get: (marketId: string, paymentId: string) => Promise<import("./types").Payment>;
|
|
245
267
|
};
|
|
246
268
|
payouts: {
|
|
247
|
-
list: (marketId: string, lastId?: string | null) => Promise<import("./resources/payouts").PayoutsListResponse>;
|
|
269
|
+
list: (marketId: string, lastId?: string | null | undefined) => Promise<import("./resources/payouts").PayoutsListResponse>;
|
|
248
270
|
get: (marketId: string, payoutId: string) => Promise<import("./types").Payout>;
|
|
249
271
|
create: (marketId: string, data: import("./resources/payouts").CreatePayoutRequest) => Promise<import("./resources/payouts").PayoutCreateResponse>;
|
|
250
272
|
};
|
|
@@ -252,11 +274,11 @@ export declare function Studio(info?: {
|
|
|
252
274
|
query: (marketId: string, query: string) => Promise<import("./resources/search").SearchResult>;
|
|
253
275
|
};
|
|
254
276
|
files: {
|
|
255
|
-
uploadSingleFile: (input:
|
|
277
|
+
uploadSingleFile: (input: import("./utils/multipart-upload").SingleFileInput, token: string) => Promise<{
|
|
256
278
|
message: string;
|
|
257
279
|
data: import("./types").Media;
|
|
258
280
|
}>;
|
|
259
|
-
uploadMultipartFile: (input:
|
|
281
|
+
uploadMultipartFile: (input: import("./index.common").FileInput | import("./index.common").ChunkedInput, token: string) => Promise<{
|
|
260
282
|
message: string;
|
|
261
283
|
mediaType: string;
|
|
262
284
|
process: import("./utils/multipart-upload").VariantProcessingState;
|
|
@@ -267,9 +289,9 @@ export declare function Studio(info?: {
|
|
|
267
289
|
};
|
|
268
290
|
contacts: {
|
|
269
291
|
list: (marketId: string, customerId: string, params?: {
|
|
270
|
-
lastId?: string;
|
|
271
|
-
limit?: number;
|
|
272
|
-
}) => Promise<import("./resources/contacts").ListContactsResponse>;
|
|
292
|
+
lastId?: string | undefined;
|
|
293
|
+
limit?: number | undefined;
|
|
294
|
+
} | undefined) => Promise<import("./resources/contacts").ListContactsResponse>;
|
|
273
295
|
get: (marketId: string, customerId: string, contactId: string) => Promise<import("./types").CustomerContact>;
|
|
274
296
|
create: (marketId: string, customerId: string, payload: import("./resources/contacts").CreateOrUpdateContactPayload) => Promise<import("./types").CustomerContact>;
|
|
275
297
|
update: (marketId: string, customerId: string, contactId: string, payload: import("./resources/contacts").CreateOrUpdateContactPayload) => Promise<import("./types").CustomerContact>;
|
|
@@ -281,4 +303,8 @@ export declare function Studio(info?: {
|
|
|
281
303
|
getLatestTransaction: (marketId: string, account: string) => Promise<import("./resources/ledger").LedgerTransaction>;
|
|
282
304
|
listTransactions: (marketId: string, params: import("./resources/ledger").ListTransactionsParams) => Promise<import("./resources/ledger").TransactionsListResponse>;
|
|
283
305
|
};
|
|
306
|
+
sms: {
|
|
307
|
+
sendSMS: (marketId: string, data: import("./types").SendSMSPayload) => Promise<import("./types").SMSTask>;
|
|
308
|
+
getSMS: (marketId: string, smsId: string) => Promise<import("./types").SMSTask>;
|
|
309
|
+
};
|
|
284
310
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -261,6 +261,7 @@ export interface MartEyeLiveSaleSettings {
|
|
|
261
261
|
labels?: string[];
|
|
262
262
|
tags?: string[];
|
|
263
263
|
queueLots?: boolean;
|
|
264
|
+
markSubjectLotsAsSold?: boolean;
|
|
264
265
|
}
|
|
265
266
|
export interface MartEyeTimedSaleSettings {
|
|
266
267
|
description?: string;
|
|
@@ -313,6 +314,35 @@ export interface SaleFromSearch extends Omit<Omit<Omit<Sale, "createdAt">, "upda
|
|
|
313
314
|
startsAt: number;
|
|
314
315
|
}
|
|
315
316
|
export type LotSaleStatus = "Sold" | "Unsold" | "Rerun" | "Resold" | null;
|
|
317
|
+
export type LotDeleteDecision = "allow" | "confirm" | "block";
|
|
318
|
+
export type LotDeleteReason = "local_only" | "not_started" | "started" | "started_with_bids" | "finished" | "studio_locked" | "not_found" | "sync_unavailable" | "link_unresolved";
|
|
319
|
+
export interface LotDeletePreflightItem {
|
|
320
|
+
lotId: string;
|
|
321
|
+
lotNumber: string | null;
|
|
322
|
+
decision: LotDeleteDecision;
|
|
323
|
+
reason: LotDeleteReason;
|
|
324
|
+
isMartEyeEnabled: boolean;
|
|
325
|
+
saleType: "LIVE" | "TIMED" | null;
|
|
326
|
+
started: boolean;
|
|
327
|
+
finished: boolean;
|
|
328
|
+
hasBids: boolean;
|
|
329
|
+
bidCount: number;
|
|
330
|
+
startAt: string | null;
|
|
331
|
+
endAt: string | null;
|
|
332
|
+
}
|
|
333
|
+
export interface LotDeletePreflightResponse {
|
|
334
|
+
version: 1;
|
|
335
|
+
saleId: string;
|
|
336
|
+
lotId: string;
|
|
337
|
+
result: LotDeletePreflightItem;
|
|
338
|
+
}
|
|
339
|
+
export interface DeleteLotsResponse {
|
|
340
|
+
version: 1;
|
|
341
|
+
saleId: string;
|
|
342
|
+
status: "deleted" | "blocked" | "confirmation_required";
|
|
343
|
+
deletedLotIds: string[];
|
|
344
|
+
results: LotDeletePreflightItem[];
|
|
345
|
+
}
|
|
316
346
|
export interface Lot {
|
|
317
347
|
id: string;
|
|
318
348
|
saleId: string;
|
|
@@ -1050,9 +1080,9 @@ export interface TablePosition {
|
|
|
1050
1080
|
cellWidth: number;
|
|
1051
1081
|
halign: "left" | "center" | "right";
|
|
1052
1082
|
}
|
|
1053
|
-
export type WebhookEventName = "market.updated" | "sale.created" | "sale.updated" | "sale.deleted" | "lot.created" | "lot.updated" | "lot.deleted" | "lot.media.created" | "lot.media.deleted" | "invoice.created" | "invoice.updated" | "invoice.deleted" | "payment.created" | "payment.updated" | "payment.deleted" | "payout.created" | "payout.updated" | "payout.deleted" | "customer.created" | "customer.updated" | "customer.deleted" | "member.created" | "member.updated" | "member.deleted";
|
|
1054
|
-
export declare const supportedWebhookEvents: readonly ["market.updated", "sale.created", "sale.updated", "sale.deleted", "lot.created", "lot.updated", "lot.deleted", "lot.media.created", "lot.media.deleted", "invoice.created", "invoice.updated", "invoice.deleted", "payment.created", "payment.updated", "payment.deleted", "payout.created", "payout.updated", "payout.deleted", "customer.created", "customer.updated", "customer.deleted", "member.created", "member.updated", "member.deleted"];
|
|
1055
|
-
export type ObjectType = "market" | "sale" | "lot" | "invoice" | "payment" | "customer" | "member";
|
|
1083
|
+
export type WebhookEventName = "market.updated" | "sale.created" | "sale.updated" | "sale.deleted" | "lot.created" | "lot.updated" | "lot.deleted" | "lot.media.created" | "lot.media.deleted" | "invoice.created" | "invoice.updated" | "invoice.deleted" | "payment.created" | "payment.updated" | "payment.deleted" | "payout.created" | "payout.updated" | "payout.deleted" | "customer.created" | "customer.updated" | "customer.deleted" | "member.created" | "member.updated" | "member.deleted" | "sms-task.created" | "sms-task.updated" | "sms-task.deleted";
|
|
1084
|
+
export declare const supportedWebhookEvents: readonly ["market.updated", "sale.created", "sale.updated", "sale.deleted", "lot.created", "lot.updated", "lot.deleted", "lot.media.created", "lot.media.deleted", "invoice.created", "invoice.updated", "invoice.deleted", "payment.created", "payment.updated", "payment.deleted", "payout.created", "payout.updated", "payout.deleted", "customer.created", "customer.updated", "customer.deleted", "member.created", "member.updated", "member.deleted", "sms-task.created", "sms-task.updated", "sms-task.deleted"];
|
|
1085
|
+
export type ObjectType = "market" | "sale" | "lot" | "invoice" | "payment" | "customer" | "member" | "sms-task";
|
|
1056
1086
|
export interface WebhookEvent<T> {
|
|
1057
1087
|
id: string;
|
|
1058
1088
|
createdAt: Timestamp;
|
|
@@ -1159,4 +1189,39 @@ export interface ActivityLog {
|
|
|
1159
1189
|
[fieldPath: string]: ActivityChange;
|
|
1160
1190
|
};
|
|
1161
1191
|
}
|
|
1192
|
+
export interface SendSMSPayload {
|
|
1193
|
+
to: string[];
|
|
1194
|
+
message: string;
|
|
1195
|
+
customerId?: string;
|
|
1196
|
+
reference?: string;
|
|
1197
|
+
senderName?: string;
|
|
1198
|
+
}
|
|
1199
|
+
export interface SMSTask {
|
|
1200
|
+
id: string;
|
|
1201
|
+
marketId: string;
|
|
1202
|
+
to: string[];
|
|
1203
|
+
message: string;
|
|
1204
|
+
customerId?: string;
|
|
1205
|
+
reference?: string;
|
|
1206
|
+
senderName?: string;
|
|
1207
|
+
metadata?: Record<string, any>;
|
|
1208
|
+
status: "pending" | "sent" | "delivered" | "failed" | "partial";
|
|
1209
|
+
errorCode?: string;
|
|
1210
|
+
errorMessage?: string;
|
|
1211
|
+
providerMessageIds?: string[];
|
|
1212
|
+
providerName?: string;
|
|
1213
|
+
createdAt: Timestamp;
|
|
1214
|
+
updatedAt: Timestamp;
|
|
1215
|
+
sentAt?: Timestamp;
|
|
1216
|
+
deliveredAt?: Timestamp;
|
|
1217
|
+
recipientStatus?: {
|
|
1218
|
+
[phoneNumber: string]: {
|
|
1219
|
+
status: "pending" | "sent" | "delivered" | "failed";
|
|
1220
|
+
providerMessageId?: string;
|
|
1221
|
+
errorCode?: string;
|
|
1222
|
+
errorMessage?: string;
|
|
1223
|
+
timestamp: Timestamp;
|
|
1224
|
+
};
|
|
1225
|
+
};
|
|
1226
|
+
}
|
|
1162
1227
|
export {};
|