@marteye/studiojs 1.1.13 → 1.1.15
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.common.d.ts +11 -0
- package/dist/index.d.ts +363 -84
- package/dist/index.esm.js +4741 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4741 -6
- package/dist/index.js.map +1 -1
- package/dist/net/http.d.ts +2 -2
- package/dist/resources/actions.d.ts +0 -1
- package/dist/resources/customers.d.ts +1 -3
- package/dist/resources/files.d.ts +12 -0
- package/dist/resources/lots.d.ts +8 -4
- package/dist/resources/webhooks.d.ts +0 -1
- package/dist/resources.d.ts +92 -79
- package/dist/studio.d.ts +91 -78
- package/dist/types.d.ts +4 -2
- package/dist/utils/multipart-upload.d.ts +201 -0
- package/package.json +16 -2
package/dist/net/http.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default function SimpleHttpClient(baseUrl: string, apiKey: string, fetch: any, defaultTimeout: number, debug?: boolean): {
|
|
2
2
|
get: <T>(path: string, queryParams?: any) => Promise<T>;
|
|
3
|
-
post: <
|
|
4
|
-
delete: <
|
|
3
|
+
post: <T>(path: string, body: any) => Promise<T>;
|
|
4
|
+
delete: <T>(path: string) => Promise<T>;
|
|
5
5
|
};
|
|
6
6
|
export type HttpClient = ReturnType<typeof SimpleHttpClient>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { HttpClient } from "../net/http";
|
|
2
2
|
import { Customer } from "../types";
|
|
3
3
|
export interface CreateCustomerPayload {
|
|
4
|
-
|
|
5
|
-
lastName?: string;
|
|
4
|
+
displayName: string;
|
|
6
5
|
email?: string;
|
|
7
6
|
phone?: string;
|
|
8
|
-
tradingName: string;
|
|
9
7
|
accountNumberPrefix?: string;
|
|
10
8
|
accountNumber?: string;
|
|
11
9
|
cphNumber?: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { uploadFile } from "../utils/multipart-upload";
|
|
2
|
+
export default function create(): {
|
|
3
|
+
uploadFile: (input: Parameters<typeof uploadFile>[0], token: string) => Promise<{
|
|
4
|
+
message: string;
|
|
5
|
+
mediaType: string;
|
|
6
|
+
process: import("../utils/multipart-upload").VariantProcessingState;
|
|
7
|
+
}>;
|
|
8
|
+
deleteFile: (fileUrl: string, token: string) => Promise<{
|
|
9
|
+
data: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
12
|
+
export type Files = ReturnType<typeof create>;
|
package/dist/resources/lots.d.ts
CHANGED
|
@@ -16,8 +16,10 @@ export default function create(httpClient: HttpClient): {
|
|
|
16
16
|
metadata?: Record<string, any>;
|
|
17
17
|
buyerCustomerId?: string;
|
|
18
18
|
unitPriceInCents?: number;
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
reservePriceInCents?: number;
|
|
20
|
+
startingPriceInCents?: number;
|
|
21
|
+
startAt?: string;
|
|
22
|
+
endAt?: string;
|
|
21
23
|
previousLotNumber?: string;
|
|
22
24
|
saleStatus?: LotSaleStatus;
|
|
23
25
|
}) => Promise<Lot>;
|
|
@@ -31,10 +33,12 @@ export default function create(httpClient: HttpClient): {
|
|
|
31
33
|
notes?: string;
|
|
32
34
|
unitOfSale?: "Per KG" | "Per Item" | "Per Lot" | "Per 1000KG";
|
|
33
35
|
unitPriceInCents?: number;
|
|
36
|
+
reservePriceInCents?: number;
|
|
37
|
+
startingPriceInCents?: number;
|
|
34
38
|
buyerCasual?: string | null;
|
|
35
39
|
buyerCustomerId?: string | null;
|
|
36
|
-
|
|
37
|
-
|
|
40
|
+
startAt?: string | null;
|
|
41
|
+
endAt?: string | null;
|
|
38
42
|
saleStatus?: LotSaleStatus;
|
|
39
43
|
metadata?: Record<string, any>;
|
|
40
44
|
}) => Promise<Lot>;
|
package/dist/resources.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { HttpClient } from "./net/http";
|
|
1
|
+
import type { HttpClient } from "./net/http";
|
|
3
2
|
export default function resources(httpClient: HttpClient): {
|
|
4
3
|
markets: {
|
|
5
4
|
get: (marketId: string) => Promise<import("./types").Market>;
|
|
@@ -7,8 +6,8 @@ export default function resources(httpClient: HttpClient): {
|
|
|
7
6
|
sales: {
|
|
8
7
|
get: (marketId: string, saleId: string) => Promise<import("./types").Sale>;
|
|
9
8
|
list: (marketId: string, opts: {
|
|
10
|
-
start?: string
|
|
11
|
-
end?: string
|
|
9
|
+
start?: string;
|
|
10
|
+
end?: string;
|
|
12
11
|
}) => Promise<{
|
|
13
12
|
start: string;
|
|
14
13
|
end: string;
|
|
@@ -18,113 +17,117 @@ export default function resources(httpClient: HttpClient): {
|
|
|
18
17
|
name: string;
|
|
19
18
|
startsAt: string;
|
|
20
19
|
availableProductCodes: string[];
|
|
21
|
-
recurring?: "Weekly" | "Bi-weekly" | "Monthly"
|
|
22
|
-
martEyeSaleType?: "LIVE" | "TIMED" | null
|
|
23
|
-
location?: string | null
|
|
24
|
-
description?: string | null
|
|
25
|
-
image?: string | null
|
|
26
|
-
cover?: string | null
|
|
20
|
+
recurring?: null | "Weekly" | "Bi-weekly" | "Monthly";
|
|
21
|
+
martEyeSaleType?: "LIVE" | "TIMED" | null;
|
|
22
|
+
location?: string | null;
|
|
23
|
+
description?: string | null;
|
|
24
|
+
image?: string | null;
|
|
25
|
+
cover?: string | null;
|
|
27
26
|
attributeDefaults?: {
|
|
28
27
|
[attributekey: string]: string | number | boolean;
|
|
29
|
-
}
|
|
28
|
+
};
|
|
30
29
|
}) => Promise<{
|
|
31
30
|
saleId: string;
|
|
32
31
|
}>;
|
|
33
32
|
update: (marketId: string, saleId: string, data: {
|
|
34
|
-
name?: string
|
|
35
|
-
recurring?: "Weekly" | "Bi-weekly" | "Monthly" | null
|
|
36
|
-
defaultProductCode?: string
|
|
37
|
-
attributeDefaults?: Record<string, any
|
|
38
|
-
martEyeId?: string | null
|
|
33
|
+
name?: string;
|
|
34
|
+
recurring?: "Weekly" | "Bi-weekly" | "Monthly" | null;
|
|
35
|
+
defaultProductCode?: string;
|
|
36
|
+
attributeDefaults?: Record<string, any>;
|
|
37
|
+
martEyeId?: string | null;
|
|
39
38
|
marteyeSettings?: {
|
|
40
|
-
description?: string
|
|
41
|
-
image?: string
|
|
42
|
-
logo?: string
|
|
39
|
+
description?: string;
|
|
40
|
+
image?: string;
|
|
41
|
+
logo?: string;
|
|
43
42
|
type: "LIVE" | "TIMED";
|
|
44
|
-
location?: string | null
|
|
45
|
-
descriptionLines?: string[]
|
|
46
|
-
descriptionLink?: string
|
|
47
|
-
deposit?: number
|
|
48
|
-
hidePrices?: boolean
|
|
49
|
-
hideReplay?: boolean
|
|
50
|
-
labels?: string[]
|
|
51
|
-
tags?: string[]
|
|
52
|
-
details?: {
|
|
43
|
+
location?: string | null;
|
|
44
|
+
descriptionLines?: string[];
|
|
45
|
+
descriptionLink?: string;
|
|
46
|
+
deposit?: number;
|
|
47
|
+
hidePrices?: boolean;
|
|
48
|
+
hideReplay?: boolean;
|
|
49
|
+
labels?: string[];
|
|
50
|
+
tags?: string[];
|
|
51
|
+
details?: Array<{
|
|
53
52
|
markdownBase64: string;
|
|
54
53
|
title: string;
|
|
55
|
-
}
|
|
56
|
-
cover?: string
|
|
57
|
-
primaryColour?: string
|
|
58
|
-
secondaryColour?: string
|
|
59
|
-
foregroundColour?: string
|
|
60
|
-
extensionTime?: number
|
|
61
|
-
incrementLadder?: {
|
|
54
|
+
}>;
|
|
55
|
+
cover?: string;
|
|
56
|
+
primaryColour?: string;
|
|
57
|
+
secondaryColour?: string;
|
|
58
|
+
foregroundColour?: string;
|
|
59
|
+
extensionTime?: number;
|
|
60
|
+
incrementLadder?: Array<{
|
|
62
61
|
max: number;
|
|
63
62
|
increment: number;
|
|
64
|
-
}
|
|
65
|
-
hideNav?: boolean
|
|
66
|
-
signInOverrideLink?: string
|
|
67
|
-
published?: boolean
|
|
68
|
-
pin?: boolean
|
|
69
|
-
cascade?: boolean
|
|
70
|
-
reportEmail?: string
|
|
71
|
-
} | null
|
|
63
|
+
}>;
|
|
64
|
+
hideNav?: boolean;
|
|
65
|
+
signInOverrideLink?: string;
|
|
66
|
+
published?: boolean;
|
|
67
|
+
pin?: boolean;
|
|
68
|
+
cascade?: boolean;
|
|
69
|
+
reportEmail?: string;
|
|
70
|
+
} | null;
|
|
72
71
|
}) => Promise<import("./types").Sale>;
|
|
73
72
|
};
|
|
74
73
|
lots: {
|
|
75
74
|
get: (marketId: string, saleId: string, lotId: string) => Promise<import("./types").Lot>;
|
|
76
75
|
list: (marketId: string, saleId: string) => Promise<import("./types").Lot[]>;
|
|
77
76
|
create: (marketId: string, saleId: string, data: {
|
|
78
|
-
index?: number
|
|
79
|
-
lotNumber?: string
|
|
80
|
-
group?: string
|
|
81
|
-
productCode?: string
|
|
82
|
-
sellerCustomerId?: string
|
|
83
|
-
attributes?: Record<string, any
|
|
84
|
-
metadata?: Record<string, any
|
|
85
|
-
buyerCustomerId?: string
|
|
86
|
-
unitPriceInCents?: number
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
77
|
+
index?: number;
|
|
78
|
+
lotNumber?: string;
|
|
79
|
+
group?: string;
|
|
80
|
+
productCode?: string;
|
|
81
|
+
sellerCustomerId?: string;
|
|
82
|
+
attributes?: Record<string, any>;
|
|
83
|
+
metadata?: Record<string, any>;
|
|
84
|
+
buyerCustomerId?: string;
|
|
85
|
+
unitPriceInCents?: number;
|
|
86
|
+
reservePriceInCents?: number;
|
|
87
|
+
startingPriceInCents?: number;
|
|
88
|
+
startAt?: string;
|
|
89
|
+
endAt?: string;
|
|
90
|
+
previousLotNumber?: string;
|
|
91
|
+
saleStatus?: import("./types").LotSaleStatus;
|
|
91
92
|
}) => Promise<import("./types").Lot>;
|
|
92
93
|
update: (marketId: string, saleId: string, lotId: string, data: {
|
|
93
|
-
productCode?: string
|
|
94
|
-
attributes?: Record<string, any
|
|
95
|
-
sellerCasual?: string | null
|
|
96
|
-
sellerCustomerId?: string | null
|
|
97
|
-
lotNumber?: string | null
|
|
98
|
-
remarks?: string
|
|
99
|
-
notes?: string
|
|
100
|
-
unitOfSale?: "Per KG" | "Per Item" | "Per Lot" | "Per 1000KG"
|
|
101
|
-
unitPriceInCents?: number
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
94
|
+
productCode?: string;
|
|
95
|
+
attributes?: Record<string, any>;
|
|
96
|
+
sellerCasual?: string | null;
|
|
97
|
+
sellerCustomerId?: string | null;
|
|
98
|
+
lotNumber?: string | null;
|
|
99
|
+
remarks?: string;
|
|
100
|
+
notes?: string;
|
|
101
|
+
unitOfSale?: "Per KG" | "Per Item" | "Per Lot" | "Per 1000KG";
|
|
102
|
+
unitPriceInCents?: number;
|
|
103
|
+
reservePriceInCents?: number;
|
|
104
|
+
startingPriceInCents?: number;
|
|
105
|
+
buyerCasual?: string | null;
|
|
106
|
+
buyerCustomerId?: string | null;
|
|
107
|
+
startAt?: string | null;
|
|
108
|
+
endAt?: string | null;
|
|
109
|
+
saleStatus?: import("./types").LotSaleStatus;
|
|
110
|
+
metadata?: Record<string, any>;
|
|
108
111
|
}) => Promise<import("./types").Lot>;
|
|
109
112
|
delete: (marketId: string, saleId: string, lotId: string) => Promise<unknown>;
|
|
110
113
|
};
|
|
111
114
|
lotitems: {
|
|
112
115
|
create: (marketId: string, saleId: string, lotId: string, data: {
|
|
113
|
-
attributes?: Record<string, any
|
|
114
|
-
notes?: {
|
|
116
|
+
attributes?: Record<string, any>;
|
|
117
|
+
notes?: Array<{
|
|
115
118
|
text: string;
|
|
116
|
-
}
|
|
117
|
-
metadata?: Record<string, any
|
|
119
|
+
}>;
|
|
120
|
+
metadata?: Record<string, any>;
|
|
118
121
|
}) => Promise<import("./types").LotItem>;
|
|
119
122
|
update: (marketId: string, saleId: string, lotId: string, itemId: string, data: {
|
|
120
|
-
attributes?: Record<string, any
|
|
121
|
-
index?: number
|
|
122
|
-
metadata?: Record<string, any
|
|
123
|
+
attributes?: Record<string, any>;
|
|
124
|
+
index?: number;
|
|
125
|
+
metadata?: Record<string, any>;
|
|
123
126
|
}) => Promise<import("./types").LotItem>;
|
|
124
127
|
delete: (marketId: string, saleId: string, lotId: string, itemId: string) => Promise<unknown>;
|
|
125
128
|
};
|
|
126
129
|
webhooks: {
|
|
127
|
-
constructEvent: <T extends unknown>(bodyAsBuffer: Buffer, signature: string |
|
|
130
|
+
constructEvent: <T extends unknown>(bodyAsBuffer: Buffer, signature: string | undefined | null, endpointSecret: string | undefined | null) => Promise<import("./types").WebhookEvent<T>>;
|
|
128
131
|
};
|
|
129
132
|
actions: {
|
|
130
133
|
constructAction: (bodyAsBuffer: Buffer, signature: string, endpointSecret: string) => Promise<any>;
|
|
@@ -154,4 +157,14 @@ export default function resources(httpClient: HttpClient): {
|
|
|
154
157
|
search: {
|
|
155
158
|
query: (marketId: string, query: string) => Promise<import("./resources/search").SearchResult>;
|
|
156
159
|
};
|
|
160
|
+
files: {
|
|
161
|
+
uploadFile: (input: Parameters<typeof import("./utils/multipart-upload").uploadFile>[0], token: string) => Promise<{
|
|
162
|
+
message: string;
|
|
163
|
+
mediaType: string;
|
|
164
|
+
process: import("./utils/multipart-upload").VariantProcessingState;
|
|
165
|
+
}>;
|
|
166
|
+
deleteFile: (fileUrl: string, token: string) => Promise<{
|
|
167
|
+
data: boolean;
|
|
168
|
+
}>;
|
|
169
|
+
};
|
|
157
170
|
};
|
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;
|
|
@@ -16,8 +15,8 @@ export declare function Studio(info?: {
|
|
|
16
15
|
sales: {
|
|
17
16
|
get: (marketId: string, saleId: string) => Promise<import("./types").Sale>;
|
|
18
17
|
list: (marketId: string, opts: {
|
|
19
|
-
start?: string
|
|
20
|
-
end?: string
|
|
18
|
+
start?: string;
|
|
19
|
+
end?: string;
|
|
21
20
|
}) => Promise<{
|
|
22
21
|
start: string;
|
|
23
22
|
end: string;
|
|
@@ -27,113 +26,117 @@ export declare function Studio(info?: {
|
|
|
27
26
|
name: string;
|
|
28
27
|
startsAt: string;
|
|
29
28
|
availableProductCodes: string[];
|
|
30
|
-
recurring?: "Weekly" | "Bi-weekly" | "Monthly"
|
|
31
|
-
martEyeSaleType?: "LIVE" | "TIMED" | null
|
|
32
|
-
location?: string | null
|
|
33
|
-
description?: string | null
|
|
34
|
-
image?: string | null
|
|
35
|
-
cover?: string | null
|
|
29
|
+
recurring?: null | "Weekly" | "Bi-weekly" | "Monthly";
|
|
30
|
+
martEyeSaleType?: "LIVE" | "TIMED" | null;
|
|
31
|
+
location?: string | null;
|
|
32
|
+
description?: string | null;
|
|
33
|
+
image?: string | null;
|
|
34
|
+
cover?: string | null;
|
|
36
35
|
attributeDefaults?: {
|
|
37
36
|
[attributekey: string]: string | number | boolean;
|
|
38
|
-
}
|
|
37
|
+
};
|
|
39
38
|
}) => Promise<{
|
|
40
39
|
saleId: string;
|
|
41
40
|
}>;
|
|
42
41
|
update: (marketId: string, saleId: string, data: {
|
|
43
|
-
name?: string
|
|
44
|
-
recurring?: "Weekly" | "Bi-weekly" | "Monthly" | null
|
|
45
|
-
defaultProductCode?: string
|
|
46
|
-
attributeDefaults?: Record<string, any
|
|
47
|
-
martEyeId?: string | null
|
|
42
|
+
name?: string;
|
|
43
|
+
recurring?: "Weekly" | "Bi-weekly" | "Monthly" | null;
|
|
44
|
+
defaultProductCode?: string;
|
|
45
|
+
attributeDefaults?: Record<string, any>;
|
|
46
|
+
martEyeId?: string | null;
|
|
48
47
|
marteyeSettings?: {
|
|
49
|
-
description?: string
|
|
50
|
-
image?: string
|
|
51
|
-
logo?: string
|
|
48
|
+
description?: string;
|
|
49
|
+
image?: string;
|
|
50
|
+
logo?: string;
|
|
52
51
|
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?: {
|
|
52
|
+
location?: string | null;
|
|
53
|
+
descriptionLines?: string[];
|
|
54
|
+
descriptionLink?: string;
|
|
55
|
+
deposit?: number;
|
|
56
|
+
hidePrices?: boolean;
|
|
57
|
+
hideReplay?: boolean;
|
|
58
|
+
labels?: string[];
|
|
59
|
+
tags?: string[];
|
|
60
|
+
details?: Array<{
|
|
62
61
|
markdownBase64: string;
|
|
63
62
|
title: string;
|
|
64
|
-
}
|
|
65
|
-
cover?: string
|
|
66
|
-
primaryColour?: string
|
|
67
|
-
secondaryColour?: string
|
|
68
|
-
foregroundColour?: string
|
|
69
|
-
extensionTime?: number
|
|
70
|
-
incrementLadder?: {
|
|
63
|
+
}>;
|
|
64
|
+
cover?: string;
|
|
65
|
+
primaryColour?: string;
|
|
66
|
+
secondaryColour?: string;
|
|
67
|
+
foregroundColour?: string;
|
|
68
|
+
extensionTime?: number;
|
|
69
|
+
incrementLadder?: Array<{
|
|
71
70
|
max: number;
|
|
72
71
|
increment: number;
|
|
73
|
-
}
|
|
74
|
-
hideNav?: boolean
|
|
75
|
-
signInOverrideLink?: string
|
|
76
|
-
published?: boolean
|
|
77
|
-
pin?: boolean
|
|
78
|
-
cascade?: boolean
|
|
79
|
-
reportEmail?: string
|
|
80
|
-
} | null
|
|
72
|
+
}>;
|
|
73
|
+
hideNav?: boolean;
|
|
74
|
+
signInOverrideLink?: string;
|
|
75
|
+
published?: boolean;
|
|
76
|
+
pin?: boolean;
|
|
77
|
+
cascade?: boolean;
|
|
78
|
+
reportEmail?: string;
|
|
79
|
+
} | null;
|
|
81
80
|
}) => Promise<import("./types").Sale>;
|
|
82
81
|
};
|
|
83
82
|
lots: {
|
|
84
83
|
get: (marketId: string, saleId: string, lotId: string) => Promise<import("./types").Lot>;
|
|
85
84
|
list: (marketId: string, saleId: string) => Promise<import("./types").Lot[]>;
|
|
86
85
|
create: (marketId: string, saleId: string, data: {
|
|
87
|
-
index?: number
|
|
88
|
-
lotNumber?: string
|
|
89
|
-
group?: string
|
|
90
|
-
productCode?: string
|
|
91
|
-
sellerCustomerId?: string
|
|
92
|
-
attributes?: Record<string, any
|
|
93
|
-
metadata?: Record<string, any
|
|
94
|
-
buyerCustomerId?: string
|
|
95
|
-
unitPriceInCents?: number
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
86
|
+
index?: number;
|
|
87
|
+
lotNumber?: string;
|
|
88
|
+
group?: string;
|
|
89
|
+
productCode?: string;
|
|
90
|
+
sellerCustomerId?: string;
|
|
91
|
+
attributes?: Record<string, any>;
|
|
92
|
+
metadata?: Record<string, any>;
|
|
93
|
+
buyerCustomerId?: string;
|
|
94
|
+
unitPriceInCents?: number;
|
|
95
|
+
reservePriceInCents?: number;
|
|
96
|
+
startingPriceInCents?: number;
|
|
97
|
+
startAt?: string;
|
|
98
|
+
endAt?: string;
|
|
99
|
+
previousLotNumber?: string;
|
|
100
|
+
saleStatus?: import("./types").LotSaleStatus;
|
|
100
101
|
}) => Promise<import("./types").Lot>;
|
|
101
102
|
update: (marketId: string, saleId: string, lotId: string, data: {
|
|
102
|
-
productCode?: string
|
|
103
|
-
attributes?: Record<string, any
|
|
104
|
-
sellerCasual?: string | null
|
|
105
|
-
sellerCustomerId?: string | null
|
|
106
|
-
lotNumber?: string | null
|
|
107
|
-
remarks?: string
|
|
108
|
-
notes?: string
|
|
109
|
-
unitOfSale?: "Per KG" | "Per Item" | "Per Lot" | "Per 1000KG"
|
|
110
|
-
unitPriceInCents?: number
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
103
|
+
productCode?: string;
|
|
104
|
+
attributes?: Record<string, any>;
|
|
105
|
+
sellerCasual?: string | null;
|
|
106
|
+
sellerCustomerId?: string | null;
|
|
107
|
+
lotNumber?: string | null;
|
|
108
|
+
remarks?: string;
|
|
109
|
+
notes?: string;
|
|
110
|
+
unitOfSale?: "Per KG" | "Per Item" | "Per Lot" | "Per 1000KG";
|
|
111
|
+
unitPriceInCents?: number;
|
|
112
|
+
reservePriceInCents?: number;
|
|
113
|
+
startingPriceInCents?: number;
|
|
114
|
+
buyerCasual?: string | null;
|
|
115
|
+
buyerCustomerId?: string | null;
|
|
116
|
+
startAt?: string | null;
|
|
117
|
+
endAt?: string | null;
|
|
118
|
+
saleStatus?: import("./types").LotSaleStatus;
|
|
119
|
+
metadata?: Record<string, any>;
|
|
117
120
|
}) => Promise<import("./types").Lot>;
|
|
118
121
|
delete: (marketId: string, saleId: string, lotId: string) => Promise<unknown>;
|
|
119
122
|
};
|
|
120
123
|
lotitems: {
|
|
121
124
|
create: (marketId: string, saleId: string, lotId: string, data: {
|
|
122
|
-
attributes?: Record<string, any
|
|
123
|
-
notes?: {
|
|
125
|
+
attributes?: Record<string, any>;
|
|
126
|
+
notes?: Array<{
|
|
124
127
|
text: string;
|
|
125
|
-
}
|
|
126
|
-
metadata?: Record<string, any
|
|
128
|
+
}>;
|
|
129
|
+
metadata?: Record<string, any>;
|
|
127
130
|
}) => Promise<import("./types").LotItem>;
|
|
128
131
|
update: (marketId: string, saleId: string, lotId: string, itemId: string, data: {
|
|
129
|
-
attributes?: Record<string, any
|
|
130
|
-
index?: number
|
|
131
|
-
metadata?: Record<string, any
|
|
132
|
+
attributes?: Record<string, any>;
|
|
133
|
+
index?: number;
|
|
134
|
+
metadata?: Record<string, any>;
|
|
132
135
|
}) => Promise<import("./types").LotItem>;
|
|
133
136
|
delete: (marketId: string, saleId: string, lotId: string, itemId: string) => Promise<unknown>;
|
|
134
137
|
};
|
|
135
138
|
webhooks: {
|
|
136
|
-
constructEvent: <T extends unknown>(bodyAsBuffer: Buffer, signature: string |
|
|
139
|
+
constructEvent: <T extends unknown>(bodyAsBuffer: Buffer, signature: string | undefined | null, endpointSecret: string | undefined | null) => Promise<import("./types").WebhookEvent<T>>;
|
|
137
140
|
};
|
|
138
141
|
actions: {
|
|
139
142
|
constructAction: (bodyAsBuffer: Buffer, signature: string, endpointSecret: string) => Promise<any>;
|
|
@@ -163,4 +166,14 @@ export declare function Studio(info?: {
|
|
|
163
166
|
search: {
|
|
164
167
|
query: (marketId: string, query: string) => Promise<import("./resources/search").SearchResult>;
|
|
165
168
|
};
|
|
169
|
+
files: {
|
|
170
|
+
uploadFile: (input: Parameters<typeof import("./utils/multipart-upload").uploadFile>[0], token: string) => Promise<{
|
|
171
|
+
message: string;
|
|
172
|
+
mediaType: string;
|
|
173
|
+
process: import("./utils/multipart-upload").VariantProcessingState;
|
|
174
|
+
}>;
|
|
175
|
+
deleteFile: (fileUrl: string, token: string) => Promise<{
|
|
176
|
+
data: boolean;
|
|
177
|
+
}>;
|
|
178
|
+
};
|
|
166
179
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -255,12 +255,14 @@ export interface Lot {
|
|
|
255
255
|
notes?: string;
|
|
256
256
|
currency: CurrenciesWithGuinea;
|
|
257
257
|
unitOfSale: UnitOfSale;
|
|
258
|
+
reservePriceInCents?: number | null;
|
|
259
|
+
startingPriceInCents?: number | null;
|
|
258
260
|
unitPriceInCents?: number;
|
|
259
261
|
buyerCasual?: string | null;
|
|
260
262
|
buyerCustomerId: string | null;
|
|
261
263
|
buyer?: ShortCustomerDetails | null;
|
|
262
|
-
|
|
263
|
-
|
|
264
|
+
startAt?: Timestamp;
|
|
265
|
+
endAt?: Timestamp;
|
|
264
266
|
sellerInvoiceId: string | null;
|
|
265
267
|
sellerInvoiceNumber?: number | undefined | null;
|
|
266
268
|
buyerInvoiceId: string | null;
|