solometrics 0.0.0-stage → 0.1.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/LICENSE +202 -0
- package/NOTICE +5 -0
- package/README.md +295 -2
- package/dist/index.cjs +1163 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +846 -0
- package/dist/index.d.ts +846 -0
- package/dist/index.js +1130 -0
- package/dist/index.js.map +1 -0
- package/package.json +65 -4
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,846 @@
|
|
|
1
|
+
/** A price. Sent to the API as a string: `250`, `250.0` and `"250"` all become `"250"`. */
|
|
2
|
+
type Amount = number | string | bigint;
|
|
3
|
+
/** A shoe size, e.g. `10`, `"10.5"`, `"10W"`. */
|
|
4
|
+
type Size = number | string;
|
|
5
|
+
/** `"2026-01-01"` or a `Date` (formatted as its UTC calendar date). */
|
|
6
|
+
type DateLike = string | Date;
|
|
7
|
+
type QueryPrimitive = string | number | boolean | Date;
|
|
8
|
+
type QueryValue = QueryPrimitive | readonly QueryPrimitive[] | null | undefined;
|
|
9
|
+
type Query = Record<string, QueryValue>;
|
|
10
|
+
/**
|
|
11
|
+
* A CSV for an upload endpoint:
|
|
12
|
+
*
|
|
13
|
+
* - a file path (`string`);
|
|
14
|
+
* - the CSV content as a `Uint8Array` / `Buffer` / `ArrayBuffer`;
|
|
15
|
+
* - a `Blob` or `File` (a `File`'s name is kept);
|
|
16
|
+
* - a Node readable stream (e.g. `fs.createReadStream(...)`), web `ReadableStream`, or any
|
|
17
|
+
* async iterable of chunks;
|
|
18
|
+
* - `{ rows }`: objects that become CSV rows (header = union of keys, in first-seen order).
|
|
19
|
+
*/
|
|
20
|
+
type CsvSource = string | Uint8Array | ArrayBuffer | Blob | ReadableStream<Uint8Array> | AsyncIterable<Uint8Array | string> | {
|
|
21
|
+
rows: Iterable<CsvRow>;
|
|
22
|
+
};
|
|
23
|
+
type CsvRow = Record<string, unknown>;
|
|
24
|
+
interface CsvFile {
|
|
25
|
+
name: string;
|
|
26
|
+
content: Uint8Array;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A listing to delete: a listing ID, a `[listingId, variantId]` tuple, or an
|
|
30
|
+
* object with `listingId`/`listing_id` and optional `variantId`/`variant_id`.
|
|
31
|
+
*/
|
|
32
|
+
type BatchDeleteItem = string | readonly [listingId: string, variantId?: string | null] | {
|
|
33
|
+
listingId: string;
|
|
34
|
+
variantId?: string | null;
|
|
35
|
+
} | {
|
|
36
|
+
listing_id: string;
|
|
37
|
+
variant_id?: string | null;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Shapes of documented responses. Responses are plain objects parsed from JSON;
|
|
42
|
+
* these types only help editors and the type checker. Endpoints that pass
|
|
43
|
+
* StockX's own response through unchanged (catalog search, variant list,
|
|
44
|
+
* listing detail, ...) are typed as {@link StockXObject}.
|
|
45
|
+
*/
|
|
46
|
+
/** A JSON object passed through from StockX as received. */
|
|
47
|
+
type StockXObject = Record<string, any>;
|
|
48
|
+
interface InventorySku {
|
|
49
|
+
id: number;
|
|
50
|
+
retailer: string;
|
|
51
|
+
size: string;
|
|
52
|
+
retailer_sku: string;
|
|
53
|
+
supplier_sku: string | null;
|
|
54
|
+
title: string | null;
|
|
55
|
+
original_price: number | null;
|
|
56
|
+
price: number | null;
|
|
57
|
+
coupon_code_eligible: boolean | null;
|
|
58
|
+
}
|
|
59
|
+
interface InventoryProduct {
|
|
60
|
+
id: number;
|
|
61
|
+
style_color: string;
|
|
62
|
+
brand: string | null;
|
|
63
|
+
model_name: string | null;
|
|
64
|
+
gender: string | null;
|
|
65
|
+
}
|
|
66
|
+
/** `HIGH` | `MEDIUM` | `LOW` | `OOS` | `IN_STOCK` */
|
|
67
|
+
type StockLevel = 'HIGH' | 'MEDIUM' | 'LOW' | 'OOS' | 'IN_STOCK' | (string & {});
|
|
68
|
+
interface InventoryLocation {
|
|
69
|
+
location_code: string;
|
|
70
|
+
stock_level: StockLevel;
|
|
71
|
+
as_of: string;
|
|
72
|
+
}
|
|
73
|
+
interface InventoryItem {
|
|
74
|
+
sku: InventorySku;
|
|
75
|
+
product: InventoryProduct;
|
|
76
|
+
inventory: InventoryLocation[];
|
|
77
|
+
}
|
|
78
|
+
interface InventorySearchResponse {
|
|
79
|
+
total_skus: number;
|
|
80
|
+
count: number;
|
|
81
|
+
limit: number;
|
|
82
|
+
offset: number;
|
|
83
|
+
has_next_page: boolean;
|
|
84
|
+
items: InventoryItem[];
|
|
85
|
+
}
|
|
86
|
+
interface SkuHistoryRecord {
|
|
87
|
+
stock_level: StockLevel;
|
|
88
|
+
location: string;
|
|
89
|
+
record_created_at: string;
|
|
90
|
+
price: number | null;
|
|
91
|
+
original_price: number | null;
|
|
92
|
+
coupon_code_eligible: boolean | null;
|
|
93
|
+
}
|
|
94
|
+
interface SkuHistorySku {
|
|
95
|
+
retailer_sku: string;
|
|
96
|
+
size: string;
|
|
97
|
+
style_color: string;
|
|
98
|
+
model_name: string | null;
|
|
99
|
+
brand: string | null;
|
|
100
|
+
}
|
|
101
|
+
interface SkuHistoryResponse {
|
|
102
|
+
retailer: string;
|
|
103
|
+
cutoff_ts: string;
|
|
104
|
+
sku: SkuHistorySku;
|
|
105
|
+
history: SkuHistoryRecord[];
|
|
106
|
+
count: number;
|
|
107
|
+
limit: number | null;
|
|
108
|
+
has_more: boolean;
|
|
109
|
+
}
|
|
110
|
+
interface MarketVariant {
|
|
111
|
+
size: string;
|
|
112
|
+
lowestAsk: number | null;
|
|
113
|
+
highestBid: number | null;
|
|
114
|
+
lastSale: number | null;
|
|
115
|
+
currency: string;
|
|
116
|
+
highDemandPrice?: number | null;
|
|
117
|
+
productCondition?: string;
|
|
118
|
+
packagingCondition?: string;
|
|
119
|
+
regionId?: unknown;
|
|
120
|
+
}
|
|
121
|
+
interface MarketSearchResponse {
|
|
122
|
+
platform: 'stockx' | 'goat' | (string & {});
|
|
123
|
+
style_id: string;
|
|
124
|
+
fetched_at: string;
|
|
125
|
+
variants: MarketVariant[];
|
|
126
|
+
}
|
|
127
|
+
interface HotStylesResponse {
|
|
128
|
+
items: string[];
|
|
129
|
+
total: number;
|
|
130
|
+
page: number;
|
|
131
|
+
limit: number;
|
|
132
|
+
pages: number;
|
|
133
|
+
has_next: boolean;
|
|
134
|
+
has_prev: boolean;
|
|
135
|
+
}
|
|
136
|
+
interface OkResponse {
|
|
137
|
+
ok: boolean;
|
|
138
|
+
}
|
|
139
|
+
interface UploadJobResponse {
|
|
140
|
+
taskId: string;
|
|
141
|
+
status: string;
|
|
142
|
+
filename: string;
|
|
143
|
+
processedRows: number;
|
|
144
|
+
batchSize: number;
|
|
145
|
+
duplicateRowsRemoved?: number;
|
|
146
|
+
}
|
|
147
|
+
interface UploadValidationResponse {
|
|
148
|
+
filename: string;
|
|
149
|
+
total_rows: number;
|
|
150
|
+
valid_rows: number;
|
|
151
|
+
invalid_rows: number;
|
|
152
|
+
duplicate_rows: number;
|
|
153
|
+
}
|
|
154
|
+
interface UnlistJobResponse {
|
|
155
|
+
taskId: string;
|
|
156
|
+
status: string;
|
|
157
|
+
filename: string;
|
|
158
|
+
processedRows: number;
|
|
159
|
+
duplicateRowsRemoved: number;
|
|
160
|
+
resolveRows: number;
|
|
161
|
+
}
|
|
162
|
+
/** `PENDING` / `STARTED` / `PAUSED` while running; `SUCCESS` / `FAILURE` / `CANCELLED` when finished. */
|
|
163
|
+
type JobState = 'PENDING' | 'STARTED' | 'PAUSED' | 'SUCCESS' | 'FAILURE' | 'CANCELLED' | (string & {});
|
|
164
|
+
/**
|
|
165
|
+
* Background job progress. `result` holds job-specific progress counters
|
|
166
|
+
* (`null` until the job starts).
|
|
167
|
+
*/
|
|
168
|
+
interface JobStatus {
|
|
169
|
+
taskId: string;
|
|
170
|
+
status: JobState;
|
|
171
|
+
result: Record<string, unknown> | null;
|
|
172
|
+
}
|
|
173
|
+
interface UnmatchedResponse {
|
|
174
|
+
items: unknown[];
|
|
175
|
+
}
|
|
176
|
+
interface CancelUnlistResponse {
|
|
177
|
+
cancelled: boolean;
|
|
178
|
+
result: unknown;
|
|
179
|
+
}
|
|
180
|
+
interface TaskQueuedResponse {
|
|
181
|
+
taskId: string;
|
|
182
|
+
status: string;
|
|
183
|
+
}
|
|
184
|
+
interface CostRecord {
|
|
185
|
+
id: number;
|
|
186
|
+
style_id: string;
|
|
187
|
+
size: string;
|
|
188
|
+
variant_id: string;
|
|
189
|
+
cost: number;
|
|
190
|
+
is_active: boolean;
|
|
191
|
+
updated_at: string;
|
|
192
|
+
}
|
|
193
|
+
interface CostListResponse {
|
|
194
|
+
items: CostRecord[];
|
|
195
|
+
total: number;
|
|
196
|
+
page: number;
|
|
197
|
+
page_size: number;
|
|
198
|
+
}
|
|
199
|
+
interface CostImportResponse {
|
|
200
|
+
total_rows: number;
|
|
201
|
+
imported: number;
|
|
202
|
+
skipped: number;
|
|
203
|
+
}
|
|
204
|
+
interface CostClearResponse {
|
|
205
|
+
ok: boolean;
|
|
206
|
+
deleted: number;
|
|
207
|
+
}
|
|
208
|
+
interface OrderSyncResponse {
|
|
209
|
+
task_id: string;
|
|
210
|
+
status: string;
|
|
211
|
+
}
|
|
212
|
+
interface Order {
|
|
213
|
+
id: number;
|
|
214
|
+
order_number: string;
|
|
215
|
+
listing_id: string | null;
|
|
216
|
+
amount: number | null;
|
|
217
|
+
currency_code: string | null;
|
|
218
|
+
status: string | null;
|
|
219
|
+
inventory_type: string | null;
|
|
220
|
+
order_created_at: string | null;
|
|
221
|
+
order_updated_at: string | null;
|
|
222
|
+
product_id: string | null;
|
|
223
|
+
product_name: string | null;
|
|
224
|
+
style_id: string | null;
|
|
225
|
+
variant_id: string | null;
|
|
226
|
+
variant_name: string | null;
|
|
227
|
+
variant_value: string | null;
|
|
228
|
+
total_payout: number | null;
|
|
229
|
+
sale_price: number | null;
|
|
230
|
+
total_adjustments: number | null;
|
|
231
|
+
payout_currency: string | null;
|
|
232
|
+
auth_status: string | null;
|
|
233
|
+
}
|
|
234
|
+
interface OrderListResponse {
|
|
235
|
+
total: number;
|
|
236
|
+
page: number;
|
|
237
|
+
page_size: number;
|
|
238
|
+
orders: Order[];
|
|
239
|
+
}
|
|
240
|
+
interface OrderAnalyticsSummary {
|
|
241
|
+
total_orders: number;
|
|
242
|
+
total_revenue: number;
|
|
243
|
+
avg_payout: number;
|
|
244
|
+
total_fees: number;
|
|
245
|
+
}
|
|
246
|
+
interface TopProduct {
|
|
247
|
+
product_name: string;
|
|
248
|
+
style_id: string | null;
|
|
249
|
+
units_sold: number;
|
|
250
|
+
total_revenue: number;
|
|
251
|
+
avg_payout: number;
|
|
252
|
+
}
|
|
253
|
+
interface TopBrand {
|
|
254
|
+
brand: string;
|
|
255
|
+
units_sold: number;
|
|
256
|
+
total_revenue: number;
|
|
257
|
+
}
|
|
258
|
+
interface SalesTrendPoint {
|
|
259
|
+
period: string;
|
|
260
|
+
units: number;
|
|
261
|
+
revenue: number;
|
|
262
|
+
}
|
|
263
|
+
interface StatusCount {
|
|
264
|
+
status: string;
|
|
265
|
+
count: number;
|
|
266
|
+
}
|
|
267
|
+
interface OrderAnalyticsResponse {
|
|
268
|
+
summary: OrderAnalyticsSummary;
|
|
269
|
+
top_products: TopProduct[];
|
|
270
|
+
top_brands: TopBrand[];
|
|
271
|
+
sales_trend: SalesTrendPoint[];
|
|
272
|
+
status_breakdown: StatusCount[];
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/** Options for endpoints that accept a StockX `connection_id`. */
|
|
276
|
+
interface ConnectionOptions extends RequestOptions {
|
|
277
|
+
/** StockX connection to use. Defaults to the client's `connectionId`. */
|
|
278
|
+
connectionId?: number | null;
|
|
279
|
+
}
|
|
280
|
+
/** Options for the `waitFor*` job-polling helpers. */
|
|
281
|
+
interface WaitOptions {
|
|
282
|
+
/** Milliseconds between status polls. Default 5000. */
|
|
283
|
+
pollInterval?: number;
|
|
284
|
+
/**
|
|
285
|
+
* Give up after this many milliseconds and throw {@link JobTimeoutError}.
|
|
286
|
+
* Without it, waits indefinitely.
|
|
287
|
+
*/
|
|
288
|
+
timeout?: number | null;
|
|
289
|
+
/** Called with every status payload, including the final one. May return a promise. */
|
|
290
|
+
onProgress?: (status: JobStatus) => unknown;
|
|
291
|
+
/** Stop waiting; throws {@link APIUserAbortError}. */
|
|
292
|
+
signal?: AbortSignal | null;
|
|
293
|
+
}
|
|
294
|
+
declare abstract class APIResource {
|
|
295
|
+
protected readonly _client: Client;
|
|
296
|
+
constructor(client: Client);
|
|
297
|
+
protected _conn(connectionId: number | null | undefined): number | null;
|
|
298
|
+
protected _get<T>(path: string, query?: Query, options?: RequestOptions): Promise<T>;
|
|
299
|
+
protected _send<T>(method: HttpMethod, path: string, init?: {
|
|
300
|
+
query?: Query;
|
|
301
|
+
body?: unknown;
|
|
302
|
+
file?: CsvFile;
|
|
303
|
+
}, options?: RequestOptions): Promise<T>;
|
|
304
|
+
protected _wait(fetchStatus: (options: RequestOptions) => Promise<JobStatus>, taskId: string, { pollInterval, timeout, onProgress, signal }?: WaitOptions): Promise<JobStatus>;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
declare class GoatMarketResource extends APIResource {
|
|
308
|
+
/**
|
|
309
|
+
* `GET /v2/goat/market/search` — per-size GOAT prices. Needs a linked GOAT
|
|
310
|
+
* account (`ConflictError` otherwise).
|
|
311
|
+
*/
|
|
312
|
+
search(styleId: string, options?: RequestOptions): Promise<MarketSearchResponse>;
|
|
313
|
+
}
|
|
314
|
+
declare class GoatResource extends APIResource {
|
|
315
|
+
readonly market: GoatMarketResource;
|
|
316
|
+
constructor(client: Client);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
interface InventoryFilters extends RequestOptions {
|
|
320
|
+
/** Broad search. */
|
|
321
|
+
q?: string;
|
|
322
|
+
/** Partial match. */
|
|
323
|
+
styleColor?: string;
|
|
324
|
+
/** Partial match. */
|
|
325
|
+
brand?: string;
|
|
326
|
+
/** Partial match. */
|
|
327
|
+
retailer?: string;
|
|
328
|
+
/** Exact match. */
|
|
329
|
+
size?: Size;
|
|
330
|
+
/** Partial match. */
|
|
331
|
+
retailerSku?: string;
|
|
332
|
+
/** Partial match. */
|
|
333
|
+
supplierSku?: string;
|
|
334
|
+
}
|
|
335
|
+
interface InventorySearchParams extends InventoryFilters {
|
|
336
|
+
/** Capped by your plan's `max_page_size`. */
|
|
337
|
+
limit?: number;
|
|
338
|
+
offset?: number;
|
|
339
|
+
}
|
|
340
|
+
interface InventoryIterParams extends InventoryFilters {
|
|
341
|
+
/** Page size for each request (the API's `limit`). */
|
|
342
|
+
pageSize?: number;
|
|
343
|
+
/** Start offset. Default 0. */
|
|
344
|
+
offset?: number;
|
|
345
|
+
}
|
|
346
|
+
interface SkuHistoryParams extends RequestOptions {
|
|
347
|
+
/** Look-back window in hours, 1–8760 (default 168). */
|
|
348
|
+
hours?: number;
|
|
349
|
+
}
|
|
350
|
+
/** Retailer inventory and SKU stock history. */
|
|
351
|
+
declare class InventoryResource extends APIResource {
|
|
352
|
+
/** `GET /v1/inventory/search` — one page of SKUs with stock per location. */
|
|
353
|
+
search(params?: InventorySearchParams): Promise<InventorySearchResponse>;
|
|
354
|
+
/**
|
|
355
|
+
* Iterate every matching SKU across pages.
|
|
356
|
+
*
|
|
357
|
+
* Stops at the last page. Without provider access for `retailer` the plan's
|
|
358
|
+
* `max_page_number` cap applies, and going past it throws `BadRequestError`.
|
|
359
|
+
*/
|
|
360
|
+
iterSearch(params?: InventoryIterParams): AsyncGenerator<InventoryItem, void, undefined>;
|
|
361
|
+
/**
|
|
362
|
+
* `GET /v1/reporting/retailers/{retailer}/skus/{retailerSku}/history` —
|
|
363
|
+
* stock history of one SKU, newest first.
|
|
364
|
+
*/
|
|
365
|
+
history(retailer: string, retailerSku: string, params?: SkuHistoryParams): Promise<SkuHistoryResponse>;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
interface CatalogSearchParams extends ConnectionOptions {
|
|
369
|
+
pageNumber?: number;
|
|
370
|
+
pageSize?: number;
|
|
371
|
+
}
|
|
372
|
+
interface CatalogVariantsParams extends ConnectionOptions {
|
|
373
|
+
/** Pass the style code so the product is cached for your account. */
|
|
374
|
+
styleId?: string;
|
|
375
|
+
}
|
|
376
|
+
declare class StockXCatalogResource extends APIResource {
|
|
377
|
+
/**
|
|
378
|
+
* `GET /v2/stockx/catalog/search` — StockX catalog search (usually by style
|
|
379
|
+
* code), returned as received from StockX.
|
|
380
|
+
*/
|
|
381
|
+
search(q: string, params?: CatalogSearchParams): Promise<StockXObject>;
|
|
382
|
+
/**
|
|
383
|
+
* `GET /v2/stockx/catalog/products/{productId}/variants` — every size variant
|
|
384
|
+
* of a product, as received from StockX.
|
|
385
|
+
*/
|
|
386
|
+
variants(productId: string, params?: CatalogVariantsParams): Promise<StockXObject[]>;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
interface ListCostsParams extends ConnectionOptions {
|
|
390
|
+
page?: number;
|
|
391
|
+
/** 1–200, default 50. */
|
|
392
|
+
pageSize?: number;
|
|
393
|
+
/** Partial match. */
|
|
394
|
+
styleId?: string;
|
|
395
|
+
}
|
|
396
|
+
interface IterCostsParams extends ConnectionOptions {
|
|
397
|
+
/** Default 200. */
|
|
398
|
+
pageSize?: number;
|
|
399
|
+
styleId?: string;
|
|
400
|
+
}
|
|
401
|
+
interface UpdateCostParams extends ConnectionOptions {
|
|
402
|
+
cost?: number;
|
|
403
|
+
/** `false` keeps the record but excludes it from profit and smart pricing. */
|
|
404
|
+
isActive?: boolean;
|
|
405
|
+
}
|
|
406
|
+
/** Acquisition costs per style code / size / variant. Uses no StockX quota. */
|
|
407
|
+
declare class StockXCostsResource extends APIResource {
|
|
408
|
+
/** `PATCH /v2/stockx/cost` — create or overwrite the cost for one style/size/variant. Basic plan. */
|
|
409
|
+
set(styleId: string, size: Size, variantId: string, cost: number, params?: ConnectionOptions): Promise<OkResponse>;
|
|
410
|
+
/** `GET /v2/stockx/costs` — cost records, newest first. */
|
|
411
|
+
list(params?: ListCostsParams): Promise<CostListResponse>;
|
|
412
|
+
/** Iterate every cost record across pages. */
|
|
413
|
+
iterList(params?: IterCostsParams): AsyncGenerator<CostRecord, void, undefined>;
|
|
414
|
+
/**
|
|
415
|
+
* `POST /v2/stockx/costs/import` — upsert costs from a CSV with
|
|
416
|
+
* `style_id, size, variant_id, cost`. Synchronous. Advanced plan.
|
|
417
|
+
*/
|
|
418
|
+
importCsv(source: CsvSource, params?: ConnectionOptions): Promise<CostImportResponse>;
|
|
419
|
+
/** `PATCH /v2/stockx/costs/{costId}` — edit one record. Basic plan. */
|
|
420
|
+
update(costId: number, params?: UpdateCostParams): Promise<OkResponse>;
|
|
421
|
+
/** `DELETE /v2/stockx/costs` — delete EVERY cost record on the connection. Cannot be undone. Basic plan. */
|
|
422
|
+
clear(params?: ConnectionOptions): Promise<CostClearResponse>;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
interface ListingFields extends ConnectionOptions {
|
|
426
|
+
currencyCode?: string;
|
|
427
|
+
/** ISO 8601 string or `Date`. */
|
|
428
|
+
expiresAt?: string | Date;
|
|
429
|
+
active?: boolean;
|
|
430
|
+
inventoryType?: string;
|
|
431
|
+
}
|
|
432
|
+
interface CreateBySkuParams extends ListingFields {
|
|
433
|
+
/** Acquisition cost, stored as a cost record for this style/size/variant. */
|
|
434
|
+
cost?: number;
|
|
435
|
+
}
|
|
436
|
+
interface CreateListingParams extends ListingFields {
|
|
437
|
+
/** Acquisition cost. Stored only together with `styleId` and `size`. */
|
|
438
|
+
cost?: number;
|
|
439
|
+
styleId?: string;
|
|
440
|
+
size?: Size;
|
|
441
|
+
}
|
|
442
|
+
interface UpdateListingParams extends ConnectionOptions {
|
|
443
|
+
amount?: Amount;
|
|
444
|
+
currencyCode?: string;
|
|
445
|
+
/** ISO 8601 string or `Date`. */
|
|
446
|
+
expiresAt?: string | Date;
|
|
447
|
+
}
|
|
448
|
+
interface ListListingsParams extends ConnectionOptions {
|
|
449
|
+
pageNumber?: number;
|
|
450
|
+
pageSize?: number;
|
|
451
|
+
/** Defaults to `ACTIVE` on the server; pass an array for several. */
|
|
452
|
+
listingStatuses?: string | readonly string[];
|
|
453
|
+
/** A style code already cached for your account (404 otherwise). */
|
|
454
|
+
sku?: string;
|
|
455
|
+
}
|
|
456
|
+
interface ActivateListingParams extends ConnectionOptions {
|
|
457
|
+
/** Relist at a new price. */
|
|
458
|
+
amount?: Amount;
|
|
459
|
+
}
|
|
460
|
+
interface DeleteListingParams extends ConnectionOptions {
|
|
461
|
+
/** Also delete the variant's cost records. */
|
|
462
|
+
variantId?: string;
|
|
463
|
+
}
|
|
464
|
+
interface UploadParams extends RequestOptions {
|
|
465
|
+
batchSize?: number;
|
|
466
|
+
}
|
|
467
|
+
/** Create, reprice and take down listings on your linked StockX account. */
|
|
468
|
+
declare class StockXListingsResource extends APIResource {
|
|
469
|
+
/**
|
|
470
|
+
* `POST /v2/stockx/simple-listing` — list by style code and size.
|
|
471
|
+
*
|
|
472
|
+
* The backend resolves the variant. Throws `NotFoundError` if no variant
|
|
473
|
+
* matches and `ConflictError` when keep-listing mode skips it. Requires the
|
|
474
|
+
* basic plan.
|
|
475
|
+
*/
|
|
476
|
+
createBySku(styleId: string, size: Size, amount: Amount, params?: CreateBySkuParams): Promise<StockXObject>;
|
|
477
|
+
/**
|
|
478
|
+
* `POST /v2/stockx/listings` — list a specific `variantId`.
|
|
479
|
+
*
|
|
480
|
+
* To store a cost record too, pass `cost`, `styleId` and `size` together (the
|
|
481
|
+
* API silently skips the cost if one is missing, so the SDK throws a
|
|
482
|
+
* `TypeError` instead). Requires the basic plan.
|
|
483
|
+
*/
|
|
484
|
+
create(variantId: string, amount: Amount, params?: CreateListingParams): Promise<StockXObject>;
|
|
485
|
+
/** `PATCH /v2/stockx/listings/{listingId}` — reprice or change expiry. Requires the basic plan. */
|
|
486
|
+
update(listingId: string, params?: UpdateListingParams): Promise<StockXObject>;
|
|
487
|
+
/**
|
|
488
|
+
* `GET /v2/stockx/listings` — your listings, fetched live from StockX.
|
|
489
|
+
* ACTIVE listings carry `cost` and `netPrice`.
|
|
490
|
+
*/
|
|
491
|
+
list(params?: ListListingsParams): Promise<StockXObject>;
|
|
492
|
+
/** `GET /v2/stockx/listings/{listingId}` — one listing. */
|
|
493
|
+
get(listingId: string, params?: ConnectionOptions): Promise<StockXObject>;
|
|
494
|
+
/**
|
|
495
|
+
* `GET /v2/stockx/listings/{listingId}/operations/{operationId}` — result of
|
|
496
|
+
* an asynchronous StockX operation.
|
|
497
|
+
*/
|
|
498
|
+
getOperation(listingId: string, operationId: string, params?: ConnectionOptions): Promise<StockXObject>;
|
|
499
|
+
/** `PUT /v2/stockx/listings/{listingId}/deactivate` — take off market, keep the listing. Basic plan. */
|
|
500
|
+
deactivate(listingId: string, params?: ConnectionOptions): Promise<StockXObject>;
|
|
501
|
+
/**
|
|
502
|
+
* `PUT /v2/stockx/listings/{listingId}/activate` — put back on market,
|
|
503
|
+
* optionally at a new `amount`. Basic plan.
|
|
504
|
+
*/
|
|
505
|
+
activate(listingId: string, params?: ActivateListingParams): Promise<StockXObject>;
|
|
506
|
+
/**
|
|
507
|
+
* `DELETE /v2/stockx/listings/{listingId}` — permanent. With `variantId` the
|
|
508
|
+
* variant's cost records are deleted too. Basic plan.
|
|
509
|
+
*/
|
|
510
|
+
delete(listingId: string, params?: DeleteListingParams): Promise<StockXObject>;
|
|
511
|
+
/**
|
|
512
|
+
* `POST /v2/stockx/batch/delete-listing` — delete several listings in one
|
|
513
|
+
* StockX batch. Advanced plan.
|
|
514
|
+
*
|
|
515
|
+
* `items` may be listing ID strings, `[listingId, variantId]` tuples, or
|
|
516
|
+
* objects with `listingId`/`listing_id` and optional `variantId`/`variant_id`.
|
|
517
|
+
*/
|
|
518
|
+
batchDelete(items: Iterable<BatchDeleteItem>, params?: ConnectionOptions): Promise<StockXObject>;
|
|
519
|
+
/**
|
|
520
|
+
* `POST /v2/stockx/listings/upload` — start a bulk listing job.
|
|
521
|
+
*
|
|
522
|
+
* Pass a CSV (path, bytes, Blob or stream) or `{ rows }` with
|
|
523
|
+
* `sku, size, quantity, amount, cost`. Returns a `taskId`; poll with
|
|
524
|
+
* {@link uploadStatus} or {@link waitForUpload}. Advanced plan.
|
|
525
|
+
*/
|
|
526
|
+
upload(source: CsvSource, params?: UploadParams): Promise<UploadJobResponse>;
|
|
527
|
+
/**
|
|
528
|
+
* `POST /v2/stockx/listings/upload/validate` — count valid, invalid and
|
|
529
|
+
* duplicate rows without listing anything.
|
|
530
|
+
*/
|
|
531
|
+
validateUpload(source: CsvSource, options?: RequestOptions): Promise<UploadValidationResponse>;
|
|
532
|
+
/** `GET /v2/stockx/listings/upload/{taskId}` */
|
|
533
|
+
uploadStatus(taskId: string, options?: RequestOptions): Promise<JobStatus>;
|
|
534
|
+
/**
|
|
535
|
+
* Poll {@link uploadStatus} until the job is SUCCESS, FAILURE or CANCELLED,
|
|
536
|
+
* and return the final status. Throws `JobTimeoutError` after `timeout` ms.
|
|
537
|
+
*/
|
|
538
|
+
waitForUpload(taskId: string, options?: WaitOptions): Promise<JobStatus>;
|
|
539
|
+
/** `GET /v2/stockx/listings/upload/unmatched` — uploaded rows that could not be matched to a variant. */
|
|
540
|
+
unmatched(options?: RequestOptions): Promise<UnmatchedResponse>;
|
|
541
|
+
/**
|
|
542
|
+
* `POST /v2/stockx/listings/unlist` — start a bulk delist job.
|
|
543
|
+
*
|
|
544
|
+
* Rows carry `listing_id` (optionally `variant_id`), or `sku` (or `style_id`)
|
|
545
|
+
* plus `size` to match ACTIVE listings. Advanced plan.
|
|
546
|
+
*/
|
|
547
|
+
unlist(source: CsvSource, options?: RequestOptions): Promise<UnlistJobResponse>;
|
|
548
|
+
/** `GET /v2/stockx/listings/unlist/{taskId}` */
|
|
549
|
+
unlistStatus(taskId: string, options?: RequestOptions): Promise<JobStatus>;
|
|
550
|
+
/** Poll {@link unlistStatus} until the job finishes. */
|
|
551
|
+
waitForUnlist(taskId: string, options?: WaitOptions): Promise<JobStatus>;
|
|
552
|
+
/** `POST /v2/stockx/listings/unlist/cancel` — cancel your running unlist job. */
|
|
553
|
+
cancelUnlist(options?: RequestOptions): Promise<CancelUnlistResponse>;
|
|
554
|
+
/**
|
|
555
|
+
* `POST /v2/stockx/listings/clear-all` — delete EVERY active listing in the
|
|
556
|
+
* account's `clear_all_scope`. Cannot be undone. Advanced plan.
|
|
557
|
+
*/
|
|
558
|
+
clearAll(options?: RequestOptions): Promise<TaskQueuedResponse>;
|
|
559
|
+
/** `GET /v2/stockx/listings/clear-all/{taskId}` */
|
|
560
|
+
clearAllStatus(taskId: string, options?: RequestOptions): Promise<JobStatus>;
|
|
561
|
+
/** Poll {@link clearAllStatus} until the job finishes. */
|
|
562
|
+
waitForClearAll(taskId: string, options?: WaitOptions): Promise<JobStatus>;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
interface MarketSearchParams extends RequestOptions {
|
|
566
|
+
size?: Size;
|
|
567
|
+
/** Skip the cache and spend StockX quota. */
|
|
568
|
+
force?: boolean;
|
|
569
|
+
}
|
|
570
|
+
interface HotStylesParams extends RequestOptions {
|
|
571
|
+
limit?: number;
|
|
572
|
+
page?: number;
|
|
573
|
+
}
|
|
574
|
+
interface HotStylesIterParams extends RequestOptions {
|
|
575
|
+
/** Default 100. */
|
|
576
|
+
pageSize?: number;
|
|
577
|
+
}
|
|
578
|
+
interface VariantMarketParams extends ConnectionOptions {
|
|
579
|
+
currencyCode?: string;
|
|
580
|
+
}
|
|
581
|
+
declare class StockXMarketResource extends APIResource {
|
|
582
|
+
/**
|
|
583
|
+
* `GET /v2/stockx/market/search` — lowest ask / highest bid per size.
|
|
584
|
+
*
|
|
585
|
+
* Served from cache when fresh; `force: true` skips the cache and spends
|
|
586
|
+
* StockX quota. Check `fetched_at` for freshness.
|
|
587
|
+
*/
|
|
588
|
+
search(styleId: string, params?: MarketSearchParams): Promise<MarketSearchResponse>;
|
|
589
|
+
/** `GET /v2/stockx/market/hot` — style codes with recently cached quotes. */
|
|
590
|
+
hot(params?: HotStylesParams): Promise<HotStylesResponse>;
|
|
591
|
+
/** Iterate every recently quoted style code across pages. */
|
|
592
|
+
iterHot(params?: HotStylesIterParams): AsyncGenerator<string, void, undefined>;
|
|
593
|
+
/**
|
|
594
|
+
* `GET /v2/stockx/catalog/products/{productId}/variants/{variantId}/market-data`
|
|
595
|
+
*
|
|
596
|
+
* Live quote for one size. Always calls StockX. Returns StockX's market data
|
|
597
|
+
* object as received.
|
|
598
|
+
*/
|
|
599
|
+
variant(productId: string, variantId: string, params?: VariantMarketParams): Promise<StockXObject>;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
interface OrderFilters extends RequestOptions {
|
|
603
|
+
orderStatus?: string;
|
|
604
|
+
/** `"2026-01-01"` or a `Date` (its UTC calendar date). */
|
|
605
|
+
fromDate?: DateLike;
|
|
606
|
+
toDate?: DateLike;
|
|
607
|
+
search?: string;
|
|
608
|
+
}
|
|
609
|
+
interface ListOrdersParams extends OrderFilters {
|
|
610
|
+
page?: number;
|
|
611
|
+
pageSize?: number;
|
|
612
|
+
}
|
|
613
|
+
interface IterOrdersParams extends OrderFilters {
|
|
614
|
+
/** Default 200. */
|
|
615
|
+
pageSize?: number;
|
|
616
|
+
}
|
|
617
|
+
interface OrderAnalyticsParams extends RequestOptions {
|
|
618
|
+
fromDate?: DateLike;
|
|
619
|
+
toDate?: DateLike;
|
|
620
|
+
/** Default `monthly`. */
|
|
621
|
+
granularity?: 'daily' | 'weekly' | 'monthly';
|
|
622
|
+
}
|
|
623
|
+
/** Locally synced StockX orders. All endpoints need the advanced plan. */
|
|
624
|
+
declare class StockXOrdersResource extends APIResource {
|
|
625
|
+
/**
|
|
626
|
+
* `POST /v2/stockx/orders/sync` — start a background sync from StockX. There
|
|
627
|
+
* is no status endpoint; query again later.
|
|
628
|
+
*/
|
|
629
|
+
sync(options?: RequestOptions): Promise<OrderSyncResponse>;
|
|
630
|
+
/** `GET /v2/stockx/orders` — synced orders, newest first. */
|
|
631
|
+
list(params?: ListOrdersParams): Promise<OrderListResponse>;
|
|
632
|
+
/** Iterate every matching order across pages. */
|
|
633
|
+
iterList(params?: IterOrdersParams): AsyncGenerator<Order, void, undefined>;
|
|
634
|
+
/**
|
|
635
|
+
* `GET /v2/stockx/orders/analytics` — summary, top products/brands, sales
|
|
636
|
+
* trend and status breakdown.
|
|
637
|
+
*/
|
|
638
|
+
analytics(params?: OrderAnalyticsParams): Promise<OrderAnalyticsResponse>;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
declare class StockXResource extends APIResource {
|
|
642
|
+
readonly market: StockXMarketResource;
|
|
643
|
+
readonly catalog: StockXCatalogResource;
|
|
644
|
+
readonly listings: StockXListingsResource;
|
|
645
|
+
readonly costs: StockXCostsResource;
|
|
646
|
+
readonly orders: StockXOrdersResource;
|
|
647
|
+
constructor(client: Client);
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
/** A `fetch`-compatible function. */
|
|
651
|
+
type Fetch = (url: string, init: RequestInit) => Promise<Response>;
|
|
652
|
+
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
653
|
+
interface ClientOptions {
|
|
654
|
+
/** Your `sr_live_...` key. Defaults to `process.env.SOLOMETRICS_API_KEY`. */
|
|
655
|
+
apiKey?: string;
|
|
656
|
+
/** Defaults to `process.env.SOLOMETRICS_BASE_URL` or `https://api.sneakers.itbanque.com`. */
|
|
657
|
+
baseURL?: string;
|
|
658
|
+
/** Per-attempt timeout in milliseconds, including reading the body. Default 60 000. `null` disables it. */
|
|
659
|
+
timeout?: number | null;
|
|
660
|
+
/**
|
|
661
|
+
* Retries for 429 (all methods), and for 502/503/504, timeouts and dropped
|
|
662
|
+
* connections on idempotent methods. Default 2. `0` disables.
|
|
663
|
+
*/
|
|
664
|
+
maxRetries?: number;
|
|
665
|
+
/** Default StockX connection for endpoints that accept `connectionId`. Per-call values override it. */
|
|
666
|
+
connectionId?: number | null;
|
|
667
|
+
/** Extra headers sent with every request. */
|
|
668
|
+
defaultHeaders?: Record<string, string>;
|
|
669
|
+
/** Bring your own `fetch` (proxies, custom agents, instrumentation, ...). Defaults to `globalThis.fetch`. */
|
|
670
|
+
fetch?: Fetch;
|
|
671
|
+
}
|
|
672
|
+
/** Per-call options accepted by every API method. */
|
|
673
|
+
interface RequestOptions {
|
|
674
|
+
/** Override the client's per-attempt timeout (milliseconds); `null` disables it. */
|
|
675
|
+
timeout?: number | null;
|
|
676
|
+
/** Override the client's `maxRetries`. */
|
|
677
|
+
maxRetries?: number;
|
|
678
|
+
/** Abort the request; throws {@link APIUserAbortError}. */
|
|
679
|
+
signal?: AbortSignal | null;
|
|
680
|
+
/** Extra headers for this request. */
|
|
681
|
+
headers?: Record<string, string>;
|
|
682
|
+
}
|
|
683
|
+
/** Options for the low-level {@link Client.get} / {@link Client.post} / ... methods. */
|
|
684
|
+
interface RawRequestOptions extends RequestOptions {
|
|
685
|
+
query?: Query;
|
|
686
|
+
/** JSON body. */
|
|
687
|
+
body?: unknown;
|
|
688
|
+
}
|
|
689
|
+
/** @internal */
|
|
690
|
+
interface FinalRequestOptions extends RequestOptions {
|
|
691
|
+
method: HttpMethod;
|
|
692
|
+
path: string;
|
|
693
|
+
query?: Query;
|
|
694
|
+
body?: unknown;
|
|
695
|
+
file?: CsvFile;
|
|
696
|
+
}
|
|
697
|
+
/**
|
|
698
|
+
* SneakersRadar API client.
|
|
699
|
+
*
|
|
700
|
+
* ```ts
|
|
701
|
+
* const client = new Client({ apiKey: 'sr_live_...' }); // or set SOLOMETRICS_API_KEY
|
|
702
|
+
* const quotes = await client.stockx.market.search('DZ5485-612');
|
|
703
|
+
* ```
|
|
704
|
+
*
|
|
705
|
+
* There is nothing to close: requests go through `fetch`.
|
|
706
|
+
*/
|
|
707
|
+
declare class Client {
|
|
708
|
+
#private;
|
|
709
|
+
readonly baseURL: string;
|
|
710
|
+
readonly timeout: number | null;
|
|
711
|
+
readonly maxRetries: number;
|
|
712
|
+
readonly connectionId: number | null;
|
|
713
|
+
readonly inventory: InventoryResource;
|
|
714
|
+
readonly stockx: StockXResource;
|
|
715
|
+
readonly goat: GoatResource;
|
|
716
|
+
constructor(options?: ClientOptions);
|
|
717
|
+
constructor(apiKey: string, options?: Omit<ClientOptions, 'apiKey'>);
|
|
718
|
+
get apiKey(): string;
|
|
719
|
+
/**
|
|
720
|
+
* Return a copy with some options changed. The copy shares `fetch` and the
|
|
721
|
+
* default headers. Pass `connectionId: null` to clear the default connection.
|
|
722
|
+
*/
|
|
723
|
+
withOptions(options: Pick<ClientOptions, 'apiKey' | 'timeout' | 'maxRetries' | 'connectionId'>): Client;
|
|
724
|
+
/** Low-level GET for endpoints the SDK does not wrap yet. */
|
|
725
|
+
get<T = unknown>(path: string, options?: RawRequestOptions): Promise<T>;
|
|
726
|
+
post<T = unknown>(path: string, options?: RawRequestOptions): Promise<T>;
|
|
727
|
+
put<T = unknown>(path: string, options?: RawRequestOptions): Promise<T>;
|
|
728
|
+
patch<T = unknown>(path: string, options?: RawRequestOptions): Promise<T>;
|
|
729
|
+
delete<T = unknown>(path: string, options?: RawRequestOptions): Promise<T>;
|
|
730
|
+
/** @internal */
|
|
731
|
+
_request<T>(options: FinalRequestOptions): Promise<T>;
|
|
732
|
+
toString(): string;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* Error hierarchy for the SneakersRadar API.
|
|
737
|
+
*
|
|
738
|
+
* Every non-2xx response throws a subclass of {@link APIStatusError}, chosen by
|
|
739
|
+
* status code. Network failures throw {@link APIConnectionError} (or its
|
|
740
|
+
* {@link APITimeoutError} subclass).
|
|
741
|
+
*/
|
|
742
|
+
/** Base class for every error thrown by this SDK. */
|
|
743
|
+
declare class SolometricsError extends Error {
|
|
744
|
+
constructor(message?: string, options?: {
|
|
745
|
+
cause?: unknown;
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
/** An error talking to the API (network failure or non-2xx response). */
|
|
749
|
+
declare class APIError extends SolometricsError {
|
|
750
|
+
}
|
|
751
|
+
/** The request never produced a response (DNS, TLS, connection reset, ...). */
|
|
752
|
+
declare class APIConnectionError extends APIError {
|
|
753
|
+
constructor(message?: string, options?: {
|
|
754
|
+
cause?: unknown;
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
/** The request timed out on the client side. */
|
|
758
|
+
declare class APITimeoutError extends APIConnectionError {
|
|
759
|
+
constructor(options?: {
|
|
760
|
+
cause?: unknown;
|
|
761
|
+
});
|
|
762
|
+
}
|
|
763
|
+
/** The caller's `AbortSignal` fired before the request (or job wait) finished. */
|
|
764
|
+
declare class APIUserAbortError extends APIError {
|
|
765
|
+
constructor(options?: {
|
|
766
|
+
cause?: unknown;
|
|
767
|
+
});
|
|
768
|
+
}
|
|
769
|
+
/** One entry of a 422 `detail` list. */
|
|
770
|
+
interface ValidationErrorItem {
|
|
771
|
+
loc?: (string | number)[];
|
|
772
|
+
msg?: string;
|
|
773
|
+
type?: string;
|
|
774
|
+
[key: string]: unknown;
|
|
775
|
+
}
|
|
776
|
+
/**
|
|
777
|
+
* The API returned a non-2xx status.
|
|
778
|
+
*
|
|
779
|
+
* - `status`: HTTP status code.
|
|
780
|
+
* - `detail`: the `detail` field of the JSON error body: a message string, or
|
|
781
|
+
* a list of field errors for 422. `null` if the body had none.
|
|
782
|
+
* - `body`: the full decoded JSON body (or raw text if it was not JSON).
|
|
783
|
+
* - `headers`: the response headers.
|
|
784
|
+
*/
|
|
785
|
+
declare class APIStatusError extends APIError {
|
|
786
|
+
readonly status: number;
|
|
787
|
+
readonly detail: unknown;
|
|
788
|
+
readonly body: unknown;
|
|
789
|
+
readonly headers: Headers;
|
|
790
|
+
constructor(message: string, init: {
|
|
791
|
+
status: number;
|
|
792
|
+
headers: Headers;
|
|
793
|
+
body: unknown;
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
/**
|
|
797
|
+
* 400 — invalid request, plan pagination cap, bad CSV, no usable StockX
|
|
798
|
+
* connection, or the connection's daily request cap was reached.
|
|
799
|
+
*/
|
|
800
|
+
declare class BadRequestError extends APIStatusError {
|
|
801
|
+
}
|
|
802
|
+
/** 401 — the API key is missing, invalid or revoked. */
|
|
803
|
+
declare class AuthenticationError extends APIStatusError {
|
|
804
|
+
}
|
|
805
|
+
/** 403 — the endpoint is not included in the account's plan. */
|
|
806
|
+
declare class PermissionDeniedError extends APIStatusError {
|
|
807
|
+
}
|
|
808
|
+
/**
|
|
809
|
+
* 404 — style code, size, SKU or record not found (cost endpoints also return
|
|
810
|
+
* 404 when no StockX account is linked).
|
|
811
|
+
*/
|
|
812
|
+
declare class NotFoundError extends APIStatusError {
|
|
813
|
+
}
|
|
814
|
+
/** 409 — keep-listing mode skipped the listing, or a GOAT account is needed but not linked. */
|
|
815
|
+
declare class ConflictError extends APIStatusError {
|
|
816
|
+
}
|
|
817
|
+
/** 422 — a parameter has the wrong type or is out of range. `errors` holds the field errors. */
|
|
818
|
+
declare class UnprocessableEntityError extends APIStatusError {
|
|
819
|
+
get errors(): ValidationErrorItem[];
|
|
820
|
+
}
|
|
821
|
+
/** 429 — rate limit exceeded. `retryAfter` is the `Retry-After` header in seconds, when present. */
|
|
822
|
+
declare class RateLimitError extends APIStatusError {
|
|
823
|
+
get retryAfter(): number | null;
|
|
824
|
+
}
|
|
825
|
+
/** 5xx not covered by a more specific class. */
|
|
826
|
+
declare class InternalServerError extends APIStatusError {
|
|
827
|
+
}
|
|
828
|
+
/** 502 — the request to StockX/GOAT failed; `detail` carries the upstream error. */
|
|
829
|
+
declare class UpstreamError extends InternalServerError {
|
|
830
|
+
}
|
|
831
|
+
/** 504 — StockX did not respond in time. */
|
|
832
|
+
declare class UpstreamTimeoutError extends InternalServerError {
|
|
833
|
+
}
|
|
834
|
+
/**
|
|
835
|
+
* A `waitFor*` helper gave up before the background job finished.
|
|
836
|
+
* `lastStatus` is the last status payload seen.
|
|
837
|
+
*/
|
|
838
|
+
declare class JobTimeoutError extends SolometricsError {
|
|
839
|
+
readonly taskId: string;
|
|
840
|
+
readonly lastStatus: unknown;
|
|
841
|
+
constructor(taskId: string, lastStatus: unknown);
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
declare const VERSION = "0.1.0";
|
|
845
|
+
|
|
846
|
+
export { APIConnectionError, APIError, APIStatusError, APITimeoutError, APIUserAbortError, type ActivateListingParams, type Amount, AuthenticationError, BadRequestError, type BatchDeleteItem, type CancelUnlistResponse, type CatalogSearchParams, type CatalogVariantsParams, Client, type ClientOptions, ConflictError, type ConnectionOptions, type CostClearResponse, type CostImportResponse, type CostListResponse, type CostRecord, type CreateBySkuParams, type CreateListingParams, type CsvRow, type CsvSource, type DateLike, type DeleteListingParams, type Fetch, GoatMarketResource, GoatResource, type HotStylesIterParams, type HotStylesParams, type HotStylesResponse, type HttpMethod, InternalServerError, type InventoryFilters, type InventoryItem, type InventoryIterParams, type InventoryLocation, type InventoryProduct, InventoryResource, type InventorySearchParams, type InventorySearchResponse, type InventorySku, type IterCostsParams, type IterOrdersParams, type JobState, type JobStatus, JobTimeoutError, type ListCostsParams, type ListListingsParams, type ListOrdersParams, type MarketSearchParams, type MarketSearchResponse, type MarketVariant, NotFoundError, type OkResponse, type Order, type OrderAnalyticsParams, type OrderAnalyticsResponse, type OrderAnalyticsSummary, type OrderFilters, type OrderListResponse, type OrderSyncResponse, PermissionDeniedError, type Query, type QueryValue, RateLimitError, type RawRequestOptions, type RequestOptions, type SalesTrendPoint, type Size, type SkuHistoryParams, type SkuHistoryRecord, type SkuHistoryResponse, type SkuHistorySku, SolometricsError, type StatusCount, type StockLevel, StockXCatalogResource, StockXCostsResource, StockXListingsResource, StockXMarketResource, type StockXObject, StockXOrdersResource, StockXResource, type TaskQueuedResponse, type TopBrand, type TopProduct, type UnlistJobResponse, type UnmatchedResponse, UnprocessableEntityError, type UpdateCostParams, type UpdateListingParams, type UploadJobResponse, type UploadParams, type UploadValidationResponse, UpstreamError, UpstreamTimeoutError, VERSION, type ValidationErrorItem, type VariantMarketParams, type WaitOptions };
|