@marteye/studiojs 1.1.48 → 1.1.49-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/README.md +23 -101
- package/dist/index.common.d.ts +1 -0
- package/dist/index.d.ts +644 -259
- package/dist/index.esm.js +1158 -747
- package/dist/index.js +1172 -746
- package/dist/media-crate-client.d.ts +285 -0
- package/dist/net/http.d.ts +3 -3
- package/dist/resources/actions.d.ts +0 -1
- package/dist/resources/customerLists.d.ts +17 -1
- package/dist/resources/payouts.d.ts +4 -0
- package/dist/resources/productCodes.d.ts +5 -1
- package/dist/resources/webhooks.d.ts +0 -1
- package/dist/resources.d.ts +128 -127
- package/dist/studio.d.ts +128 -127
- package/dist/types.d.ts +48 -1
- package/package.json +1 -1
package/dist/studio.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import Resources from "./resources";
|
|
3
2
|
export type StudioInstance = ReturnType<typeof Resources> & {
|
|
4
3
|
isDebugMode: boolean;
|
|
@@ -11,7 +10,7 @@ export declare function Studio(info?: {
|
|
|
11
10
|
}): {
|
|
12
11
|
isDebugMode: boolean;
|
|
13
12
|
activity: {
|
|
14
|
-
list: (marketId: string, params?: import("./resources/activity").ActivityListParams
|
|
13
|
+
list: (marketId: string, params?: import("./resources/activity").ActivityListParams) => Promise<import("./resources/activity").ActivityListResponse>;
|
|
15
14
|
get: (marketId: string, activityId: string) => Promise<import("./types").ActivityLog>;
|
|
16
15
|
};
|
|
17
16
|
broadcast: {
|
|
@@ -19,17 +18,17 @@ export declare function Studio(info?: {
|
|
|
19
18
|
get: (marketId: string, type: import("./types").BroadcastType, taskId: string) => Promise<import("./types").BroadcastTask>;
|
|
20
19
|
};
|
|
21
20
|
markets: {
|
|
22
|
-
get: (marketId: string, options?: import("./types").ReadOptions
|
|
21
|
+
get: (marketId: string, options?: import("./types").ReadOptions) => Promise<import("./types").Market>;
|
|
23
22
|
};
|
|
24
23
|
members: {
|
|
25
|
-
list: (marketId: string, params?: import("./resources/members").MembersListParams
|
|
24
|
+
list: (marketId: string, params?: import("./resources/members").MembersListParams) => Promise<import("./resources/members").MembersListResponse>;
|
|
26
25
|
get: (marketId: string, memberId: string) => Promise<import("./resources/members").Member>;
|
|
27
26
|
};
|
|
28
27
|
sales: {
|
|
29
|
-
get: (marketId: string, saleId: string, options?: import("./types").ReadOptions
|
|
28
|
+
get: (marketId: string, saleId: string, options?: import("./types").ReadOptions) => Promise<import("./types").Sale>;
|
|
30
29
|
list: (marketId: string, opts: {
|
|
31
|
-
start?: string
|
|
32
|
-
end?: string
|
|
30
|
+
start?: string;
|
|
31
|
+
end?: string;
|
|
33
32
|
}) => Promise<{
|
|
34
33
|
start: string;
|
|
35
34
|
end: string;
|
|
@@ -39,128 +38,128 @@ export declare function Studio(info?: {
|
|
|
39
38
|
name: string;
|
|
40
39
|
startsAt: string;
|
|
41
40
|
availableProductCodes: string[];
|
|
42
|
-
recurring?: "Weekly" | "Bi-weekly" | "Monthly"
|
|
43
|
-
martEyeSaleType?: "LIVE" | "TIMED" | null
|
|
44
|
-
location?: string | null
|
|
45
|
-
description?: string | null
|
|
46
|
-
image?: string | null
|
|
47
|
-
cover?: string | null
|
|
48
|
-
templateId?: string | null
|
|
49
|
-
enableLotGrouping?: boolean
|
|
41
|
+
recurring?: null | "Weekly" | "Bi-weekly" | "Monthly";
|
|
42
|
+
martEyeSaleType?: "LIVE" | "TIMED" | null;
|
|
43
|
+
location?: string | null;
|
|
44
|
+
description?: string | null;
|
|
45
|
+
image?: string | null;
|
|
46
|
+
cover?: string | null;
|
|
47
|
+
templateId?: string | null;
|
|
48
|
+
enableLotGrouping?: boolean;
|
|
50
49
|
attributeDefaults?: {
|
|
51
50
|
[attributekey: string]: string | number | boolean;
|
|
52
|
-
}
|
|
51
|
+
};
|
|
53
52
|
}) => Promise<{
|
|
54
53
|
saleId: string;
|
|
55
54
|
}>;
|
|
56
55
|
update: (marketId: string, saleId: string, data: {
|
|
57
|
-
name?: string
|
|
58
|
-
startsAt?: string
|
|
59
|
-
recurring?: "Weekly" | "Bi-weekly" | "Monthly" | null
|
|
60
|
-
defaultProductCode?: string
|
|
61
|
-
attributeDefaults?: Record<string, any
|
|
62
|
-
publishStatus?: import("./types").SalePublishStatus
|
|
63
|
-
enableLotGrouping?: boolean
|
|
56
|
+
name?: string;
|
|
57
|
+
startsAt?: string;
|
|
58
|
+
recurring?: "Weekly" | "Bi-weekly" | "Monthly" | null;
|
|
59
|
+
defaultProductCode?: string;
|
|
60
|
+
attributeDefaults?: Record<string, any>;
|
|
61
|
+
publishStatus?: import("./types").SalePublishStatus;
|
|
62
|
+
enableLotGrouping?: boolean;
|
|
64
63
|
marteyeSettings?: {
|
|
65
|
-
description?: string
|
|
66
|
-
image?: string
|
|
67
|
-
logo?: string
|
|
64
|
+
description?: string;
|
|
65
|
+
image?: string;
|
|
66
|
+
logo?: string;
|
|
68
67
|
type: "LIVE" | "TIMED";
|
|
69
|
-
location?: string | null
|
|
70
|
-
descriptionLines?: string[]
|
|
71
|
-
descriptionLink?: string
|
|
72
|
-
deposit?: number
|
|
73
|
-
hidePrices?: boolean
|
|
74
|
-
hideReplay?: boolean
|
|
75
|
-
labels?: string[]
|
|
76
|
-
tags?: string[]
|
|
77
|
-
details?: {
|
|
68
|
+
location?: string | null;
|
|
69
|
+
descriptionLines?: string[];
|
|
70
|
+
descriptionLink?: string;
|
|
71
|
+
deposit?: number;
|
|
72
|
+
hidePrices?: boolean;
|
|
73
|
+
hideReplay?: boolean;
|
|
74
|
+
labels?: string[];
|
|
75
|
+
tags?: string[];
|
|
76
|
+
details?: Array<{
|
|
78
77
|
markdownBase64: string;
|
|
79
78
|
title: string;
|
|
80
|
-
}
|
|
81
|
-
cover?: string
|
|
82
|
-
primaryColour?: string
|
|
83
|
-
secondaryColour?: string
|
|
84
|
-
foregroundColour?: string
|
|
85
|
-
extensionTime?: number
|
|
86
|
-
incrementLadder?: {
|
|
79
|
+
}>;
|
|
80
|
+
cover?: string;
|
|
81
|
+
primaryColour?: string;
|
|
82
|
+
secondaryColour?: string;
|
|
83
|
+
foregroundColour?: string;
|
|
84
|
+
extensionTime?: number;
|
|
85
|
+
incrementLadder?: Array<{
|
|
87
86
|
max: number;
|
|
88
87
|
increment: number;
|
|
89
|
-
}
|
|
90
|
-
hideNav?: boolean
|
|
91
|
-
signInOverrideLink?: string
|
|
92
|
-
published?: boolean
|
|
93
|
-
pin?: boolean
|
|
94
|
-
cascade?: boolean
|
|
95
|
-
reportEmail?: string
|
|
96
|
-
queueLots?: boolean
|
|
97
|
-
markSubjectLotsAsSold?: boolean
|
|
98
|
-
} | null
|
|
88
|
+
}>;
|
|
89
|
+
hideNav?: boolean;
|
|
90
|
+
signInOverrideLink?: string;
|
|
91
|
+
published?: boolean;
|
|
92
|
+
pin?: boolean;
|
|
93
|
+
cascade?: boolean;
|
|
94
|
+
reportEmail?: string;
|
|
95
|
+
queueLots?: boolean;
|
|
96
|
+
markSubjectLotsAsSold?: boolean;
|
|
97
|
+
} | null;
|
|
99
98
|
}) => Promise<import("./types").Sale>;
|
|
100
99
|
};
|
|
101
100
|
lots: {
|
|
102
|
-
get: (marketId: string, saleId: string, lotId: string, options?: import("./types").ReadOptions
|
|
101
|
+
get: (marketId: string, saleId: string, lotId: string, options?: import("./types").ReadOptions) => Promise<import("./types").Lot>;
|
|
103
102
|
list: (marketId: string, saleId: string, filters?: {
|
|
104
|
-
group?: string
|
|
105
|
-
productCode?: string
|
|
106
|
-
saleStatus?: import("./types").LotSaleStatus
|
|
107
|
-
sellerCustomerId?: string
|
|
108
|
-
buyerCustomerId?: string
|
|
109
|
-
}
|
|
103
|
+
group?: string;
|
|
104
|
+
productCode?: string;
|
|
105
|
+
saleStatus?: import("./types").LotSaleStatus;
|
|
106
|
+
sellerCustomerId?: string;
|
|
107
|
+
buyerCustomerId?: string;
|
|
108
|
+
}) => Promise<import("./types").Lot[]>;
|
|
110
109
|
create: (marketId: string, saleId: string, data: {
|
|
111
|
-
index?: number
|
|
112
|
-
lotNumber?: string
|
|
113
|
-
group?: string
|
|
114
|
-
productCode?: string
|
|
115
|
-
sellerCustomerId?: string
|
|
116
|
-
attributes?: Record<string, any
|
|
117
|
-
metadata?: Record<string, any
|
|
118
|
-
buyerCustomerId?: string
|
|
119
|
-
unitPriceInCents?: number
|
|
120
|
-
reservePriceInCents?: number
|
|
121
|
-
startingPriceInCents?: number
|
|
122
|
-
startAt?: string
|
|
123
|
-
endAt?: string
|
|
124
|
-
previousLotNumber?: string
|
|
125
|
-
saleStatus?: import("./types").LotSaleStatus
|
|
110
|
+
index?: number;
|
|
111
|
+
lotNumber?: string;
|
|
112
|
+
group?: string;
|
|
113
|
+
productCode?: string;
|
|
114
|
+
sellerCustomerId?: string;
|
|
115
|
+
attributes?: Record<string, any>;
|
|
116
|
+
metadata?: Record<string, any>;
|
|
117
|
+
buyerCustomerId?: string;
|
|
118
|
+
unitPriceInCents?: number;
|
|
119
|
+
reservePriceInCents?: number;
|
|
120
|
+
startingPriceInCents?: number;
|
|
121
|
+
startAt?: string;
|
|
122
|
+
endAt?: string;
|
|
123
|
+
previousLotNumber?: string;
|
|
124
|
+
saleStatus?: import("./types").LotSaleStatus;
|
|
126
125
|
}) => Promise<import("./types").Lot>;
|
|
127
126
|
update: (marketId: string, saleId: string, lotId: string, data: {
|
|
128
|
-
productCode?: string
|
|
129
|
-
attributes?: Record<string, any
|
|
130
|
-
sellerCasual?: string | null
|
|
131
|
-
sellerCustomerId?: string | null
|
|
132
|
-
lotNumber?: string | null
|
|
133
|
-
remarks?: string
|
|
134
|
-
notes?: string
|
|
135
|
-
unitOfSale?: "Per KG" | "Per Item" | "Per Lot" | "Per 1000KG"
|
|
136
|
-
unitPriceInCents?: number
|
|
137
|
-
reservePriceInCents?: number
|
|
138
|
-
startingPriceInCents?: number
|
|
139
|
-
buyerCasual?: string | null
|
|
140
|
-
buyerCustomerId?: string | null
|
|
141
|
-
startAt?: string | null
|
|
142
|
-
endAt?: string | null
|
|
143
|
-
saleStatus?: import("./types").LotSaleStatus
|
|
144
|
-
metadata?: Record<string, any
|
|
145
|
-
inputAccessories?: Record<string, any
|
|
127
|
+
productCode?: string;
|
|
128
|
+
attributes?: Record<string, any>;
|
|
129
|
+
sellerCasual?: string | null;
|
|
130
|
+
sellerCustomerId?: string | null;
|
|
131
|
+
lotNumber?: string | null;
|
|
132
|
+
remarks?: string;
|
|
133
|
+
notes?: string;
|
|
134
|
+
unitOfSale?: "Per KG" | "Per Item" | "Per Lot" | "Per 1000KG";
|
|
135
|
+
unitPriceInCents?: number;
|
|
136
|
+
reservePriceInCents?: number;
|
|
137
|
+
startingPriceInCents?: number;
|
|
138
|
+
buyerCasual?: string | null;
|
|
139
|
+
buyerCustomerId?: string | null;
|
|
140
|
+
startAt?: string | null;
|
|
141
|
+
endAt?: string | null;
|
|
142
|
+
saleStatus?: import("./types").LotSaleStatus;
|
|
143
|
+
metadata?: Record<string, any>;
|
|
144
|
+
inputAccessories?: Record<string, any>;
|
|
146
145
|
}) => Promise<import("./types").Lot>;
|
|
147
146
|
delete: (marketId: string, saleId: string, lotId: string) => Promise<unknown>;
|
|
148
147
|
deletePreflight: (marketId: string, saleId: string, lotId: string) => Promise<import("./types").LotDeletePreflightResponse>;
|
|
149
148
|
deletePreflightBatch: (marketId: string, saleId: string, lotIds: string[]) => Promise<import("./types").DeleteLotsResponse>;
|
|
150
|
-
deleteBatch: (marketId: string, saleId: string, lotIds: string[], confirmedLotIds?: string[]
|
|
149
|
+
deleteBatch: (marketId: string, saleId: string, lotIds: string[], confirmedLotIds?: string[]) => Promise<import("./types").DeleteLotsResponse>;
|
|
151
150
|
};
|
|
152
151
|
lotitems: {
|
|
153
152
|
create: (marketId: string, saleId: string, lotId: string, data: {
|
|
154
|
-
attributes?: Record<string, any
|
|
155
|
-
notes?: {
|
|
153
|
+
attributes?: Record<string, any>;
|
|
154
|
+
notes?: Array<{
|
|
156
155
|
text: string;
|
|
157
|
-
}
|
|
158
|
-
metadata?: Record<string, any
|
|
156
|
+
}>;
|
|
157
|
+
metadata?: Record<string, any>;
|
|
159
158
|
}) => Promise<import("./types").LotItem>;
|
|
160
159
|
update: (marketId: string, saleId: string, lotId: string, itemId: string, data: {
|
|
161
|
-
attributes?: Record<string, any
|
|
162
|
-
index?: number
|
|
163
|
-
metadata?: Record<string, any
|
|
160
|
+
attributes?: Record<string, any>;
|
|
161
|
+
index?: number;
|
|
162
|
+
metadata?: Record<string, any>;
|
|
164
163
|
}) => Promise<import("./types").LotItem>;
|
|
165
164
|
delete: (marketId: string, saleId: string, lotId: string, itemId: string) => Promise<unknown>;
|
|
166
165
|
};
|
|
@@ -173,27 +172,27 @@ export declare function Studio(info?: {
|
|
|
173
172
|
lookup: (marketId: string, cph: string) => Promise<import("./types").CphLookupResponse>;
|
|
174
173
|
};
|
|
175
174
|
webhooks: {
|
|
176
|
-
constructEvent: <T extends unknown>(bodyAsBuffer: Buffer, signature: string |
|
|
175
|
+
constructEvent: <T extends unknown>(bodyAsBuffer: Buffer, signature: string | undefined | null, endpointSecret: string | undefined | null) => Promise<import("./types").WebhookEvent<T>>;
|
|
177
176
|
};
|
|
178
177
|
actions: {
|
|
179
178
|
constructAction: (bodyAsBuffer: Buffer, signature: string, endpointSecret: string) => Promise<any>;
|
|
180
179
|
};
|
|
181
180
|
bidderApplications: {
|
|
182
|
-
list: (marketId: string, options?: import("./resources/bidderApplications").ListApplicationsOptions
|
|
181
|
+
list: (marketId: string, options?: import("./resources/bidderApplications").ListApplicationsOptions) => Promise<import("./resources/bidderApplications").ListApplicationsResponse>;
|
|
183
182
|
get: (marketId: string, applicationId: string) => Promise<import("./types").Application>;
|
|
184
183
|
create: (marketId: string, applicationData: import("./resources/bidderApplications").CreateApplicationPayload) => Promise<import("./types").Application>;
|
|
185
184
|
update: (marketId: string, applicationId: string, updateData: import("./resources/bidderApplications").UpdateApplicationPayload) => Promise<import("./types").Application>;
|
|
186
|
-
approve: (marketId: string, applicationId: string, notes?: string
|
|
187
|
-
reject: (marketId: string, applicationId: string, notes?: string
|
|
185
|
+
approve: (marketId: string, applicationId: string, notes?: string) => Promise<import("./types").Application>;
|
|
186
|
+
reject: (marketId: string, applicationId: string, notes?: string) => Promise<import("./types").Application>;
|
|
188
187
|
unlink: (marketId: string, applicationId: string) => Promise<import("./types").Application>;
|
|
189
188
|
delete: (marketId: string, applicationId: string) => Promise<void>;
|
|
190
189
|
};
|
|
191
190
|
settings: {
|
|
192
|
-
get: (marketId: string, options?: import("./types").ReadOptions
|
|
191
|
+
get: (marketId: string, options?: import("./types").ReadOptions) => Promise<import("./types").SettingsMarketDefaults>;
|
|
193
192
|
};
|
|
194
193
|
adjustments: {
|
|
195
194
|
list: (marketId: string) => Promise<import("./types").AdjustmentsConfiguration[]>;
|
|
196
|
-
get: (marketId: string, id: string, options?: import("./types").ReadOptions
|
|
195
|
+
get: (marketId: string, id: string, options?: import("./types").ReadOptions) => Promise<import("./types").AdjustmentsConfiguration>;
|
|
197
196
|
create: (marketId: string, data: Partial<import("./types").AdjustmentsConfiguration>) => Promise<import("./types").AdjustmentsConfiguration>;
|
|
198
197
|
update: (marketId: string, id: string, data: Partial<import("./types").AdjustmentsConfiguration>) => Promise<import("./types").AdjustmentsConfiguration>;
|
|
199
198
|
};
|
|
@@ -204,8 +203,10 @@ export declare function Studio(info?: {
|
|
|
204
203
|
update: (marketId: string, id: string, data: import("./resources/extras").UpdateExtraPayload) => Promise<import("./types").Product>;
|
|
205
204
|
};
|
|
206
205
|
productCodes: {
|
|
207
|
-
list: (marketId: string
|
|
208
|
-
|
|
206
|
+
list: (marketId: string, options?: {
|
|
207
|
+
includeArchived?: boolean;
|
|
208
|
+
}) => Promise<import("./types").ProductCodeConfiguration[]>;
|
|
209
|
+
get: (marketId: string, id: string, options?: import("./types").ReadOptions) => Promise<import("./types").ProductCodeConfiguration>;
|
|
209
210
|
create: (marketId: string, data: Partial<import("./types").ProductCodeConfiguration>) => Promise<import("./types").ProductCodeConfiguration>;
|
|
210
211
|
update: (marketId: string, id: string, data: Partial<import("./types").ProductCodeConfiguration>) => Promise<import("./types").ProductCodeConfiguration>;
|
|
211
212
|
};
|
|
@@ -219,13 +220,13 @@ export declare function Studio(info?: {
|
|
|
219
220
|
create: (marketId: string, body: {
|
|
220
221
|
saleId: string;
|
|
221
222
|
name: string;
|
|
222
|
-
description?: string | null
|
|
223
|
+
description?: string | null;
|
|
223
224
|
}) => Promise<{
|
|
224
225
|
templateId: string;
|
|
225
226
|
}>;
|
|
226
227
|
update: (marketId: string, templateId: string, body: {
|
|
227
|
-
name?: string
|
|
228
|
-
description?: string | null
|
|
228
|
+
name?: string;
|
|
229
|
+
description?: string | null;
|
|
229
230
|
}) => Promise<{
|
|
230
231
|
template: import("./types").SaleTemplate;
|
|
231
232
|
}>;
|
|
@@ -238,8 +239,8 @@ export declare function Studio(info?: {
|
|
|
238
239
|
get: (marketId: string, id: string) => Promise<import("./types").TaxRate>;
|
|
239
240
|
};
|
|
240
241
|
customers: {
|
|
241
|
-
list: (marketId: string, lastId?: string | null
|
|
242
|
-
get: (marketId: string, customerId: string, options?: import("./types").ReadOptions
|
|
242
|
+
list: (marketId: string, lastId?: string | null) => Promise<import("./resources/customers").CustomersListResponse>;
|
|
243
|
+
get: (marketId: string, customerId: string, options?: import("./types").ReadOptions) => Promise<import("./types").Customer>;
|
|
243
244
|
avatar: (marketId: string, customerId: string) => Promise<import("./types").Customer>;
|
|
244
245
|
create: (marketId: string, customerData: import(".").CreateCustomerPayload) => Promise<import("./types").Customer>;
|
|
245
246
|
update: (marketId: string, customerId: string, customerData: import(".").UpdateCustomerPayload) => Promise<import("./types").Customer>;
|
|
@@ -247,32 +248,32 @@ export declare function Studio(info?: {
|
|
|
247
248
|
getByMartEyeUid: (marketId: string, marteyeUid: string) => Promise<import("./types").Customer | null>;
|
|
248
249
|
};
|
|
249
250
|
customerLists: {
|
|
250
|
-
list: (marketId: string, options?: import(".").CustomerListsListOptions
|
|
251
|
-
listAll: (marketId: string, options?: Omit<import(".").CustomerListsListOptions, "offset">
|
|
251
|
+
list: (marketId: string, options?: import(".").CustomerListsListOptions) => Promise<import(".").CustomerListsListResponse>;
|
|
252
|
+
listAll: (marketId: string, options?: Omit<import(".").CustomerListsListOptions, "offset">) => Promise<import(".").CustomerList[]>;
|
|
252
253
|
get: (marketId: string, listId: string) => Promise<import(".").CustomerList>;
|
|
253
254
|
getBySlug: (marketId: string, slug: string) => Promise<import(".").CustomerList>;
|
|
254
255
|
create: (marketId: string, payload: import(".").CreateCustomerListPayload) => Promise<import(".").CustomerList>;
|
|
255
256
|
update: (marketId: string, listId: string, payload: import(".").UpdateCustomerListPayload) => Promise<import(".").CustomerList>;
|
|
256
257
|
delete: (marketId: string, listId: string) => Promise<import(".").CustomerListDeleteResponse>;
|
|
257
258
|
refresh: (marketId: string, listId: string) => Promise<import(".").CustomerListRefreshResponse>;
|
|
258
|
-
getMembers: (marketId: string, listId: string, options?: import(".").CustomerListMembersOptions
|
|
259
|
-
getAllMembers: (marketId: string, listId: string, options?: Omit<import(".").CustomerListMembersOptions, "offset">
|
|
259
|
+
getMembers: (marketId: string, listId: string, options?: import(".").CustomerListMembersOptions) => Promise<import(".").CustomerListMembersResponse>;
|
|
260
|
+
getAllMembers: (marketId: string, listId: string, options?: Omit<import(".").CustomerListMembersOptions, "offset">) => Promise<import(".").CustomerListMember[]>;
|
|
260
261
|
addMembers: (marketId: string, listId: string, customerIds: string[]) => Promise<import(".").CustomerListAddMembersResponse>;
|
|
261
262
|
removeMember: (marketId: string, listId: string, customerId: string) => Promise<import(".").CustomerListRemoveMemberResponse>;
|
|
262
263
|
preview: (marketId: string, filters: import(".").CustomerListFilters) => Promise<import(".").CustomerListPreviewResponse>;
|
|
263
264
|
listProductCodes: (marketId: string) => Promise<import(".").CustomerListProductCodesResponse>;
|
|
264
|
-
view: (marketId: string, listIdOrSlug: string, options?: import(".").CustomerListViewOptions
|
|
265
|
+
view: (marketId: string, listIdOrSlug: string, options?: import(".").CustomerListViewOptions) => Promise<import(".").CustomerListViewResult>;
|
|
265
266
|
};
|
|
266
267
|
invoices: {
|
|
267
|
-
list: (marketId: string, lastId?: string | null
|
|
268
|
-
get: (marketId: string, invoiceId: string, options?: import("./types").ReadOptions
|
|
268
|
+
list: (marketId: string, lastId?: string | null) => Promise<import("./resources/invoices").InvoicesListResponse>;
|
|
269
|
+
get: (marketId: string, invoiceId: string, options?: import("./types").ReadOptions) => Promise<import("./types").Invoice>;
|
|
269
270
|
};
|
|
270
271
|
payments: {
|
|
271
|
-
list: (marketId: string, lastId?: string | null
|
|
272
|
+
list: (marketId: string, lastId?: string | null) => Promise<import("./resources/payments").PaymentsListResponse>;
|
|
272
273
|
get: (marketId: string, paymentId: string) => Promise<import("./types").Payment>;
|
|
273
274
|
};
|
|
274
275
|
payouts: {
|
|
275
|
-
list: (marketId: string, lastId?: string | null
|
|
276
|
+
list: (marketId: string, lastId?: string | null) => Promise<import("./resources/payouts").PayoutsListResponse>;
|
|
276
277
|
get: (marketId: string, payoutId: string) => Promise<import("./types").Payout>;
|
|
277
278
|
create: (marketId: string, data: import("./resources/payouts").CreatePayoutRequest) => Promise<import("./resources/payouts").PayoutCreateResponse>;
|
|
278
279
|
};
|
|
@@ -280,11 +281,11 @@ export declare function Studio(info?: {
|
|
|
280
281
|
query: (marketId: string, query: string) => Promise<import("./resources/search").SearchResult>;
|
|
281
282
|
};
|
|
282
283
|
files: {
|
|
283
|
-
uploadSingleFile: (input: import("./utils/multipart-upload").
|
|
284
|
+
uploadSingleFile: (input: Parameters<typeof import("./utils/multipart-upload").uploadSingleFile>[0], token: string) => Promise<{
|
|
284
285
|
message: string;
|
|
285
286
|
data: import("./types").Media;
|
|
286
287
|
}>;
|
|
287
|
-
uploadMultipartFile: (input:
|
|
288
|
+
uploadMultipartFile: (input: Parameters<typeof import("./utils/multipart-upload").uploadMultipartFile>[0], token: string) => Promise<{
|
|
288
289
|
message: string;
|
|
289
290
|
mediaType: string;
|
|
290
291
|
process: import("./utils/multipart-upload").VariantProcessingState;
|
|
@@ -295,9 +296,9 @@ export declare function Studio(info?: {
|
|
|
295
296
|
};
|
|
296
297
|
contacts: {
|
|
297
298
|
list: (marketId: string, customerId: string, params?: {
|
|
298
|
-
lastId?: string
|
|
299
|
-
limit?: number
|
|
300
|
-
}
|
|
299
|
+
lastId?: string;
|
|
300
|
+
limit?: number;
|
|
301
|
+
}) => Promise<import("./resources/contacts").ListContactsResponse>;
|
|
301
302
|
get: (marketId: string, customerId: string, contactId: string) => Promise<import("./types").CustomerContact>;
|
|
302
303
|
create: (marketId: string, customerId: string, payload: import("./resources/contacts").CreateOrUpdateContactPayload) => Promise<import("./types").CustomerContact>;
|
|
303
304
|
update: (marketId: string, customerId: string, contactId: string, payload: import("./resources/contacts").CreateOrUpdateContactPayload) => Promise<import("./types").CustomerContact>;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
type Timestamp = string;
|
|
2
2
|
export type ClientType = "Seller" | "Buyer";
|
|
3
|
-
export type SuperType = "Sheep" | "Goats" | "Cattle" | "Pigs" | "Horses" | "Deer" | "Poultry" | "Machinery" | "Antiques" | "Other";
|
|
3
|
+
export type SuperType = "Sheep" | "Goats" | "Cattle" | "Pigs" | "Horses" | "Dogs" | "Deer" | "Poultry" | "Machinery" | "Antiques" | "Other";
|
|
4
4
|
export declare const SupportedSuperTypes: SuperType[];
|
|
5
5
|
export declare const LivestockSuperTypes: SuperType[];
|
|
6
6
|
export type Currency = "GBP" | "EUR" | "USD";
|
|
7
7
|
export declare const SupportedCurrencyCodes: Currency[];
|
|
8
|
+
export declare const AccountTiers: {
|
|
9
|
+
readonly free: 0;
|
|
10
|
+
readonly basic: 1;
|
|
11
|
+
readonly standard: 2;
|
|
12
|
+
readonly premium: 3;
|
|
13
|
+
};
|
|
14
|
+
export type AccountTier = (typeof AccountTiers)[keyof typeof AccountTiers];
|
|
8
15
|
export type SupportedCountryCode = "GB-ENG" | "GB-SCT" | "GB-WLS" | "GB-NIR" | "IE";
|
|
9
16
|
export type CurrenciesWithGuinea = Currency | "GUINEA-GBP";
|
|
10
17
|
export type UnitOfSale = "Per KG" | "Per Item" | "Per Lot" | "Per 1000KG";
|
|
@@ -33,6 +40,7 @@ export interface Market {
|
|
|
33
40
|
createdAt: Timestamp;
|
|
34
41
|
}[];
|
|
35
42
|
paymentInstructions?: string;
|
|
43
|
+
accountTier?: AccountTier;
|
|
36
44
|
}
|
|
37
45
|
export interface SettingsMarketDefaults {
|
|
38
46
|
updatedAt: Timestamp;
|
|
@@ -59,6 +67,7 @@ export interface SettingsMarketDefaults {
|
|
|
59
67
|
selectDocumentIdsMap: {
|
|
60
68
|
[supertype: string]: string[];
|
|
61
69
|
};
|
|
70
|
+
priceEntrySheetColumnOrder?: string[];
|
|
62
71
|
enableLuckMoney?: boolean;
|
|
63
72
|
}
|
|
64
73
|
export interface SettingsProductCodes {
|
|
@@ -192,6 +201,8 @@ export interface Sale {
|
|
|
192
201
|
count: number;
|
|
193
202
|
sold: number;
|
|
194
203
|
invoiced: number;
|
|
204
|
+
invoicedBuyer?: number;
|
|
205
|
+
invoicedSeller?: number;
|
|
195
206
|
valueInCents: number;
|
|
196
207
|
};
|
|
197
208
|
lotItems: {
|
|
@@ -228,6 +239,7 @@ export interface TemplateSaleData {
|
|
|
228
239
|
marteyeSettings?: MartEyeTimedSaleSettings | MartEyeLiveSaleSettings | null;
|
|
229
240
|
enableLuckMoney?: boolean;
|
|
230
241
|
enableLotGrouping?: boolean;
|
|
242
|
+
customAttributes?: AttributeDefinition[];
|
|
231
243
|
}
|
|
232
244
|
export interface SaleTemplate {
|
|
233
245
|
id: string;
|
|
@@ -319,6 +331,7 @@ export interface SaleFromSearch extends Omit<Omit<Omit<Sale, "createdAt">, "upda
|
|
|
319
331
|
export type LotSaleStatus = "Sold" | "Unsold" | "Rerun" | "Resold" | null;
|
|
320
332
|
export type LotDeleteDecision = "allow" | "confirm" | "block";
|
|
321
333
|
export type LotDeleteReason = "local_only" | "not_started" | "started" | "started_with_bids" | "finished" | "studio_locked" | "not_found" | "sync_unavailable" | "link_unresolved";
|
|
334
|
+
export type LotDeleteStudioLockReason = "invoice" | "sale_status";
|
|
322
335
|
export interface LotDeletePreflightItem {
|
|
323
336
|
lotId: string;
|
|
324
337
|
lotNumber: string | null;
|
|
@@ -332,6 +345,8 @@ export interface LotDeletePreflightItem {
|
|
|
332
345
|
bidCount: number;
|
|
333
346
|
startAt: string | null;
|
|
334
347
|
endAt: string | null;
|
|
348
|
+
studioLockReason?: LotDeleteStudioLockReason;
|
|
349
|
+
lockedSaleStatus?: string | null;
|
|
335
350
|
}
|
|
336
351
|
export interface LotDeletePreflightResponse {
|
|
337
352
|
version: 1;
|
|
@@ -432,6 +447,8 @@ export interface LotWithItemsAsArray extends Omit<Lot, "itemMap"> {
|
|
|
432
447
|
export interface LotGeneratedValues {
|
|
433
448
|
totalValueInCents?: number | null;
|
|
434
449
|
description?: string | null;
|
|
450
|
+
buyerInvoiceDescription?: string | null;
|
|
451
|
+
sellerStatementDescription?: string | null;
|
|
435
452
|
pricePerKiloInCents?: number | null;
|
|
436
453
|
averageWeightKg?: number | null;
|
|
437
454
|
pricePerItemInCents?: number | null;
|
|
@@ -525,6 +542,9 @@ export interface ProductCodeConfiguration {
|
|
|
525
542
|
createdAt?: Timestamp;
|
|
526
543
|
updatedAt?: Timestamp;
|
|
527
544
|
updatedBy?: string | null;
|
|
545
|
+
archived?: boolean;
|
|
546
|
+
archivedAt?: Timestamp | null;
|
|
547
|
+
archivedBy?: string | null;
|
|
528
548
|
superType: SuperType;
|
|
529
549
|
description: string;
|
|
530
550
|
icon?: string;
|
|
@@ -546,7 +566,21 @@ export interface ProductCodeConfiguration {
|
|
|
546
566
|
[attributekey: string]: AttributeValueType;
|
|
547
567
|
};
|
|
548
568
|
lotDescriptionTemplate?: string;
|
|
569
|
+
sellerStatementLotDescriptionTemplate?: string;
|
|
570
|
+
buyerInvoiceLotDescriptionTemplate?: string;
|
|
549
571
|
rostrumAttributes?: string[];
|
|
572
|
+
benthamSheepBuilder?: {
|
|
573
|
+
topFieldOrder?: string[];
|
|
574
|
+
topFieldVisibility?: Record<string, boolean>;
|
|
575
|
+
lotFieldOrder?: string[];
|
|
576
|
+
lotFieldVisibility?: Record<string, boolean>;
|
|
577
|
+
createLotOnRowAdd?: boolean;
|
|
578
|
+
sendCreatedLotsToDisplayBoard?: boolean;
|
|
579
|
+
displayBoardTrigger?: "auto" | {
|
|
580
|
+
type: "focused";
|
|
581
|
+
field: string;
|
|
582
|
+
};
|
|
583
|
+
};
|
|
550
584
|
selectDocumentIds?: string[] | null;
|
|
551
585
|
}
|
|
552
586
|
/***
|
|
@@ -774,6 +808,7 @@ export type ChequeField = "chequeDate" | "chequeNumber" | "payee" | "amount" | "
|
|
|
774
808
|
export type SubtotalGroups = "Commission" | string;
|
|
775
809
|
export type AdjustmentTotalTarget = "Per Invoice" | "Total - finalTotalInCents" | "Total - lotTotalLessCommissionInCentsExVat";
|
|
776
810
|
export type AdjustmentTarget = UnitOfSale | AdjustmentTotalTarget;
|
|
811
|
+
export type LadderCalculationMode = "progressive" | "threshold";
|
|
777
812
|
/***
|
|
778
813
|
* Commission is added as a line item. Can also be used for levies etc
|
|
779
814
|
*/
|
|
@@ -821,6 +856,7 @@ interface Adjustment {
|
|
|
821
856
|
} | null;
|
|
822
857
|
fixedAmountInCents?: number | null;
|
|
823
858
|
ladder?: {
|
|
859
|
+
mode?: LadderCalculationMode;
|
|
824
860
|
steps: {
|
|
825
861
|
percentageValue?: number;
|
|
826
862
|
upToAmountInCents?: number | null;
|
|
@@ -891,6 +927,8 @@ export interface Payout {
|
|
|
891
927
|
accountNumber?: string;
|
|
892
928
|
sortCode?: string;
|
|
893
929
|
chequeMadePayableTo?: string;
|
|
930
|
+
chequeIsPrinted?: boolean;
|
|
931
|
+
chequeIssuedManually?: boolean;
|
|
894
932
|
transactionDate: Timestamp;
|
|
895
933
|
reference: string | null;
|
|
896
934
|
status: "pending" | "complete" | "void";
|
|
@@ -1104,6 +1142,11 @@ export interface AttributeDefinition {
|
|
|
1104
1142
|
shortName?: string;
|
|
1105
1143
|
description?: string;
|
|
1106
1144
|
martEyeAttribute?: string;
|
|
1145
|
+
scope?: "global" | "sale";
|
|
1146
|
+
saleScoped?: boolean;
|
|
1147
|
+
archivedAt?: Timestamp | null;
|
|
1148
|
+
archivedBy?: string | null;
|
|
1149
|
+
archivedSyncToMartEye?: boolean | null;
|
|
1107
1150
|
applyTo: string[];
|
|
1108
1151
|
level: "item" | "lot";
|
|
1109
1152
|
readonly?: boolean;
|
|
@@ -1198,6 +1241,8 @@ export interface SendSMSPayload {
|
|
|
1198
1241
|
customerId?: string;
|
|
1199
1242
|
reference?: string;
|
|
1200
1243
|
senderName?: string;
|
|
1244
|
+
communicationContext?: string;
|
|
1245
|
+
metadata?: Record<string, any>;
|
|
1201
1246
|
}
|
|
1202
1247
|
export type BroadcastType = "sms" | "email";
|
|
1203
1248
|
export type BroadcastKind = "broadcast" | "statement";
|
|
@@ -1213,6 +1258,7 @@ export interface BroadcastRecipient {
|
|
|
1213
1258
|
export interface SMSBroadcastPayload {
|
|
1214
1259
|
type: "sms";
|
|
1215
1260
|
kind?: BroadcastKind;
|
|
1261
|
+
communicationContext?: string;
|
|
1216
1262
|
message?: string;
|
|
1217
1263
|
senderName?: string;
|
|
1218
1264
|
recipients: BroadcastRecipient[];
|
|
@@ -1220,6 +1266,7 @@ export interface SMSBroadcastPayload {
|
|
|
1220
1266
|
export interface EmailBroadcastPayload {
|
|
1221
1267
|
type: "email";
|
|
1222
1268
|
kind?: BroadcastKind;
|
|
1269
|
+
communicationContext?: string;
|
|
1223
1270
|
message?: string;
|
|
1224
1271
|
subject?: string;
|
|
1225
1272
|
subdomain?: string;
|