@use-stall/core 0.0.2 → 0.0.3
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 +345 -430
- package/dist/index.d.mts +690 -657
- package/dist/index.d.ts +690 -657
- package/dist/index.js +2084 -1247
- package/dist/index.mjs +2056 -1239
- package/package.json +3 -2
- package/bun.lock +0 -211
package/dist/index.d.mts
CHANGED
|
@@ -1,673 +1,706 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ConnectorModuleKey, UnifiedProductType, UnifiedVariantsType, UnifiedCollectionType, UnifiedCategoryType, UnifiedInventoryLevelType, UnifiedPromotion, UnifiedOrderType, UnifiedOrderNote, UnifiedOrderRefundType, UnifiedPaymentProviderType, UnifiedPaymentCollectionType, UnifiedTaxRegionType, UnifiedTaxRateType, UnifiedCustomerType, UnifiedLocationType, UnifiedFulfillmentType } from '@use-stall/types';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
success: boolean;
|
|
8
|
-
data?: T;
|
|
9
|
-
error?: {
|
|
10
|
-
code: string;
|
|
11
|
-
message: string;
|
|
12
|
-
details?: Record<string, any>;
|
|
13
|
-
};
|
|
14
|
-
metadata?: {
|
|
15
|
-
timestamp: number;
|
|
16
|
-
connector_id: string;
|
|
17
|
-
operation: string;
|
|
18
|
-
request_id: string;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Pagination options for list operations
|
|
23
|
-
*/
|
|
24
|
-
interface PaginationOptions {
|
|
25
|
-
limit?: number;
|
|
26
|
-
offset?: number;
|
|
27
|
-
page?: number;
|
|
28
|
-
per_page?: number;
|
|
29
|
-
sort?: string;
|
|
30
|
-
order?: "asc" | "desc";
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Plugin metadata and capabilities
|
|
34
|
-
*/
|
|
35
|
-
interface PluginMetadata {
|
|
36
|
-
id: string;
|
|
37
|
-
version: string;
|
|
38
|
-
name: string;
|
|
39
|
-
description: string;
|
|
40
|
-
}
|
|
41
|
-
interface ModuleCapability {
|
|
42
|
-
module: "orders" | "products" | "customers" | "refunds" | "inventory" | "payments";
|
|
43
|
-
actions: {
|
|
44
|
-
create?: boolean;
|
|
45
|
-
read?: boolean;
|
|
46
|
-
update?: boolean;
|
|
47
|
-
delete?: boolean;
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Configuration passed to connector plugins
|
|
52
|
-
*/
|
|
53
|
-
interface ConnectorPluginConfig {
|
|
54
|
-
/**
|
|
55
|
-
* The connector ID from the database
|
|
56
|
-
*/
|
|
57
|
-
connectorId: string;
|
|
58
|
-
/**
|
|
59
|
-
* The integration ID (e.g., woocommerce, shopify)
|
|
60
|
-
*/
|
|
61
|
-
integrationId: string;
|
|
62
|
-
/**
|
|
63
|
-
* Organization ID for context
|
|
64
|
-
*/
|
|
65
|
-
organizationId: string;
|
|
66
|
-
/**
|
|
67
|
-
* Decrypted connector configuration with credentials
|
|
68
|
-
*/
|
|
69
|
-
configuration: {
|
|
70
|
-
endpoint: string;
|
|
71
|
-
username?: string;
|
|
72
|
-
password?: string;
|
|
73
|
-
token?: string;
|
|
74
|
-
api_key_header?: string;
|
|
75
|
-
api_key_value?: string;
|
|
76
|
-
[key: string]: any;
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* Optional additional options
|
|
80
|
-
*/
|
|
81
|
-
options?: {
|
|
82
|
-
timeout?: number;
|
|
83
|
-
retries?: number;
|
|
84
|
-
logLevel?: "debug" | "info" | "warn" | "error";
|
|
85
|
-
[key: string]: any;
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Base plugin interface that all connectors must implement
|
|
90
|
-
*/
|
|
91
|
-
interface IConnectorPlugin {
|
|
92
|
-
metadata: PluginMetadata;
|
|
93
|
-
/**
|
|
94
|
-
* Initialize the plugin with configuration
|
|
95
|
-
*/
|
|
96
|
-
initialize(config: ConnectorPluginConfig): Promise<void>;
|
|
97
|
-
/**
|
|
98
|
-
* Verify the configuration is valid and credentials work
|
|
99
|
-
*/
|
|
100
|
-
verify(): Promise<ConnectorResponse<boolean>>;
|
|
101
|
-
/**
|
|
102
|
-
* Get supported modules for this connector
|
|
103
|
-
*/
|
|
104
|
-
getSupportedModules(): string[];
|
|
105
|
-
/**
|
|
106
|
-
* Order-related operations
|
|
107
|
-
*/
|
|
108
|
-
orders: {
|
|
109
|
-
create(order: UnifiedOrderType): Promise<ConnectorResponse<any>>;
|
|
110
|
-
get(orderId: string): Promise<ConnectorResponse<any>>;
|
|
111
|
-
update(orderId: string, order: Partial<UnifiedOrderType>): Promise<ConnectorResponse<any>>;
|
|
112
|
-
delete(orderId: string): Promise<ConnectorResponse<any>>;
|
|
113
|
-
list(options?: PaginationOptions & {
|
|
114
|
-
[key: string]: any;
|
|
115
|
-
}): Promise<ConnectorResponse<any[]>>;
|
|
116
|
-
};
|
|
117
|
-
/**
|
|
118
|
-
* Product-related operations
|
|
119
|
-
*/
|
|
120
|
-
products: {
|
|
121
|
-
create(product: UnifiedProductType): Promise<ConnectorResponse<any>>;
|
|
122
|
-
get(productId: string): Promise<ConnectorResponse<any>>;
|
|
123
|
-
update(productId: string, product: Partial<UnifiedProductType>): Promise<ConnectorResponse<any>>;
|
|
124
|
-
delete(productId: string): Promise<ConnectorResponse<any>>;
|
|
125
|
-
list(options?: PaginationOptions & {
|
|
126
|
-
[key: string]: any;
|
|
127
|
-
}): Promise<ConnectorResponse<any[]>>;
|
|
128
|
-
};
|
|
129
|
-
/**
|
|
130
|
-
* Customer-related operations
|
|
131
|
-
*/
|
|
132
|
-
customers: {
|
|
133
|
-
create(customer: any): Promise<ConnectorResponse<any>>;
|
|
134
|
-
get(customerId: string): Promise<ConnectorResponse<any>>;
|
|
135
|
-
update(customerId: string, customer: any): Promise<ConnectorResponse<any>>;
|
|
136
|
-
delete(customerId: string): Promise<ConnectorResponse<any>>;
|
|
137
|
-
list(options?: PaginationOptions & {
|
|
138
|
-
[key: string]: any;
|
|
139
|
-
}): Promise<ConnectorResponse<any[]>>;
|
|
140
|
-
};
|
|
141
|
-
/**
|
|
142
|
-
* Inventory/Stock-related operations
|
|
143
|
-
*/
|
|
144
|
-
inventory: {
|
|
145
|
-
get(productId: string, variantId?: string): Promise<ConnectorResponse<any>>;
|
|
146
|
-
update(productId: string, inventory: any, variantId?: string): Promise<ConnectorResponse<any>>;
|
|
147
|
-
list(options?: PaginationOptions & {
|
|
148
|
-
[key: string]: any;
|
|
149
|
-
}): Promise<ConnectorResponse<any[]>>;
|
|
150
|
-
};
|
|
151
|
-
/**
|
|
152
|
-
* Refund-related operations
|
|
153
|
-
*/
|
|
154
|
-
refunds: {
|
|
155
|
-
create(orderId: string, refund: UnifiedOrderRefundType): Promise<ConnectorResponse<any>>;
|
|
156
|
-
get(refundId: string): Promise<ConnectorResponse<any>>;
|
|
157
|
-
list(orderId: string, options?: PaginationOptions & {
|
|
158
|
-
[key: string]: any;
|
|
159
|
-
}): Promise<ConnectorResponse<any[]>>;
|
|
160
|
-
};
|
|
161
|
-
/**
|
|
162
|
-
* Payment-related operations
|
|
163
|
-
*/
|
|
164
|
-
payments: {
|
|
165
|
-
create(payment: any): Promise<ConnectorResponse<any>>;
|
|
166
|
-
get(paymentId: string): Promise<ConnectorResponse<any>>;
|
|
167
|
-
list(options?: PaginationOptions & {
|
|
168
|
-
[key: string]: any;
|
|
169
|
-
}): Promise<ConnectorResponse<any[]>>;
|
|
170
|
-
};
|
|
171
|
-
/**
|
|
172
|
-
* Webhook support (optional)
|
|
173
|
-
*/
|
|
174
|
-
webhooks?: {
|
|
175
|
-
register(url: string, events: string[]): Promise<ConnectorResponse<any>>;
|
|
176
|
-
unregister(webhookId: string): Promise<ConnectorResponse<any>>;
|
|
177
|
-
verifySignature(payload: string, signature: string): Promise<ConnectorResponse<boolean>>;
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Plugin constructor type for dynamic loading
|
|
182
|
-
*/
|
|
183
|
-
type PluginConstructor = new () => IConnectorPlugin;
|
|
184
|
-
/**
|
|
185
|
-
* Plugin module structure when loaded from storage
|
|
186
|
-
*/
|
|
187
|
-
interface PluginModule {
|
|
188
|
-
default: PluginConstructor;
|
|
189
|
-
Plugin?: PluginConstructor;
|
|
3
|
+
interface StallCoreConfigOptions {
|
|
4
|
+
connector_url: string;
|
|
5
|
+
version: string;
|
|
6
|
+
configuration: Record<string, any>;
|
|
190
7
|
}
|
|
191
8
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
interface StallSDKOptions extends ConnectorConfigurationType {
|
|
197
|
-
/**
|
|
198
|
-
* Optional additional options
|
|
199
|
-
*/
|
|
200
|
-
options?: {
|
|
201
|
-
timeout?: number;
|
|
202
|
-
retries?: number;
|
|
203
|
-
logLevel?: "debug" | "info" | "warn" | "error";
|
|
204
|
-
cachePlugins?: boolean;
|
|
205
|
-
connectorUrl?: string;
|
|
206
|
-
[key: string]: any;
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Connector loader options
|
|
211
|
-
*/
|
|
212
|
-
interface ConnectorLoaderOptions {
|
|
213
|
-
/**
|
|
214
|
-
* Base URL for loading connector plugins
|
|
215
|
-
* e.g., https://connectors.myapp.xyz
|
|
216
|
-
*/
|
|
217
|
-
connectorUrl: string;
|
|
218
|
-
/**
|
|
219
|
-
* Whether to cache loaded plugins in memory
|
|
220
|
-
*/
|
|
221
|
-
cache?: boolean;
|
|
222
|
-
/**
|
|
223
|
-
* Cache TTL in milliseconds (default: 1 hour)
|
|
224
|
-
*/
|
|
225
|
-
cacheTtl?: number;
|
|
226
|
-
}
|
|
227
|
-
/**
|
|
228
|
-
* Error response from connector operations
|
|
229
|
-
*/
|
|
230
|
-
interface ConnectorError extends Error {
|
|
231
|
-
code: string;
|
|
232
|
-
details?: any;
|
|
233
|
-
statusCode?: number;
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* Operation metadata
|
|
237
|
-
*/
|
|
238
|
-
interface OperationMetadata {
|
|
239
|
-
connector_id: string;
|
|
240
|
-
integration_id: string;
|
|
241
|
-
organization_id: string;
|
|
242
|
-
operation: string;
|
|
243
|
-
timestamp: number;
|
|
244
|
-
request_id: string;
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* Batch operation options
|
|
248
|
-
*/
|
|
249
|
-
interface BatchOperationOptions {
|
|
250
|
-
/**
|
|
251
|
-
* Whether to stop on first error
|
|
252
|
-
*/
|
|
253
|
-
stopOnError?: boolean;
|
|
254
|
-
/**
|
|
255
|
-
* Parallel execution count
|
|
256
|
-
*/
|
|
257
|
-
parallel?: number;
|
|
258
|
-
/**
|
|
259
|
-
* Timeout per item in milliseconds
|
|
260
|
-
*/
|
|
261
|
-
timeout?: number;
|
|
9
|
+
interface CoreConfig {
|
|
10
|
+
options: StallCoreConfigOptions;
|
|
11
|
+
adapter: () => Promise<AdapterModuleType>;
|
|
12
|
+
refreshAdapter: () => Promise<AdapterModuleType>;
|
|
262
13
|
}
|
|
263
14
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
* Verify the plugin configuration
|
|
287
|
-
*/
|
|
288
|
-
verify(): Promise<boolean>;
|
|
289
|
-
/**
|
|
290
|
-
* Get metadata about the loaded plugin
|
|
291
|
-
*/
|
|
292
|
-
getMetadata(): {
|
|
293
|
-
id: string;
|
|
294
|
-
name: string;
|
|
295
|
-
version: string;
|
|
296
|
-
description: string;
|
|
297
|
-
supportedModules: string[];
|
|
298
|
-
};
|
|
299
|
-
/**
|
|
300
|
-
* Check if a module is supported
|
|
301
|
-
*/
|
|
302
|
-
isModuleSupported(module: string): boolean;
|
|
303
|
-
/**
|
|
304
|
-
* Clear plugin cache (if using remote loading)
|
|
305
|
-
*/
|
|
306
|
-
clearCache(): void;
|
|
307
|
-
}
|
|
15
|
+
type ModuleTypeMap = {
|
|
16
|
+
products: UnifiedProductType;
|
|
17
|
+
variants: UnifiedVariantsType;
|
|
18
|
+
collections: UnifiedCollectionType;
|
|
19
|
+
categories: UnifiedCategoryType;
|
|
20
|
+
tags: string;
|
|
21
|
+
inventory_levels: UnifiedInventoryLevelType;
|
|
22
|
+
inventory_history: UnifiedInventoryLevelType;
|
|
23
|
+
promotions: UnifiedPromotion;
|
|
24
|
+
orders: UnifiedOrderType;
|
|
25
|
+
order_notes: UnifiedOrderNote;
|
|
26
|
+
refunds: UnifiedOrderRefundType;
|
|
27
|
+
payment_providers: UnifiedPaymentProviderType;
|
|
28
|
+
payments: UnifiedPaymentCollectionType;
|
|
29
|
+
tax_regions: UnifiedTaxRegionType;
|
|
30
|
+
tax_rates: UnifiedTaxRateType;
|
|
31
|
+
customers: UnifiedCustomerType;
|
|
32
|
+
locations: UnifiedLocationType;
|
|
33
|
+
fulfillment_types: string;
|
|
34
|
+
fulfillment_providers: string;
|
|
35
|
+
fulfillments: UnifiedFulfillmentType;
|
|
36
|
+
};
|
|
308
37
|
|
|
309
|
-
type
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
*/
|
|
313
|
-
declare class Logger {
|
|
314
|
-
private level;
|
|
315
|
-
private context;
|
|
316
|
-
constructor(context?: string, level?: LogLevel);
|
|
317
|
-
private shouldLog;
|
|
318
|
-
private format;
|
|
319
|
-
debug(message: string, data?: any): void;
|
|
320
|
-
info(message: string, data?: any): void;
|
|
321
|
-
warn(message: string, data?: any): void;
|
|
322
|
-
error(message: string, error?: Error | any): void;
|
|
323
|
-
setLevel(level: LogLevel): void;
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* Create a logger instance
|
|
327
|
-
*/
|
|
328
|
-
declare function createLogger(context?: string, level?: LogLevel): Logger;
|
|
38
|
+
type GetModuleType<K extends ConnectorModuleKey> = K extends keyof ModuleTypeMap
|
|
39
|
+
? ModuleTypeMap[K]
|
|
40
|
+
: never;
|
|
329
41
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
42
|
+
type AdapterModuleType = {
|
|
43
|
+
[K in ConnectorModuleKey]: {
|
|
44
|
+
list: (props: {
|
|
45
|
+
connector_config: Record<string, any>;
|
|
46
|
+
query?: string;
|
|
47
|
+
}) => Promise<GetModuleType<K>[]>;
|
|
48
|
+
retrieve: (props: {
|
|
49
|
+
connector_config: Record<string, any>;
|
|
50
|
+
id: string;
|
|
51
|
+
}) => Promise<GetModuleType<K>>;
|
|
52
|
+
create: (props: {
|
|
53
|
+
connector_config: Record<string, any>;
|
|
54
|
+
data: GetModuleType<K>;
|
|
55
|
+
}) => Promise<GetModuleType<K>>;
|
|
56
|
+
update: (props: {
|
|
57
|
+
connector_config: Record<string, any>;
|
|
58
|
+
id: string;
|
|
59
|
+
data: Partial<GetModuleType<K>>;
|
|
60
|
+
}) => Promise<GetModuleType<K>>;
|
|
61
|
+
delete: (props: {
|
|
62
|
+
connector_config: Record<string, any>;
|
|
63
|
+
id: string;
|
|
64
|
+
}) => Promise<void>;
|
|
65
|
+
bulk_create: (props: {
|
|
66
|
+
connector_config: Record<string, any>;
|
|
67
|
+
data: GetModuleType<K>[];
|
|
68
|
+
}) => Promise<GetModuleType<K>[]>;
|
|
69
|
+
bulk_update: (props: {
|
|
70
|
+
connector_config: Record<string, any>;
|
|
71
|
+
data: Array<{ id: string; data: Partial<GetModuleType<K>> }>;
|
|
72
|
+
}) => Promise<GetModuleType<K>[]>;
|
|
73
|
+
bulk_delete: (props: {
|
|
74
|
+
connector_config: Record<string, any>;
|
|
75
|
+
ids: string[];
|
|
76
|
+
}) => Promise<void>;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
355
79
|
|
|
356
|
-
|
|
357
|
-
* Service for managing orders through connectors
|
|
358
|
-
*/
|
|
359
|
-
declare class OrdersService extends BaseService {
|
|
360
|
-
constructor(pluginManager: PluginManager, connectorId: string);
|
|
361
|
-
/**
|
|
362
|
-
* Create a new order
|
|
363
|
-
*/
|
|
364
|
-
createOrder(order: UnifiedOrderType): Promise<ConnectorResponse<UnifiedOrderType>>;
|
|
365
|
-
/**
|
|
366
|
-
* Get an order by ID
|
|
367
|
-
*/
|
|
368
|
-
getOrder(orderId: string): Promise<ConnectorResponse<UnifiedOrderType>>;
|
|
369
|
-
/**
|
|
370
|
-
* Update an existing order
|
|
371
|
-
*/
|
|
372
|
-
updateOrder(orderId: string, order: Partial<UnifiedOrderType>): Promise<ConnectorResponse<UnifiedOrderType>>;
|
|
373
|
-
/**
|
|
374
|
-
* Delete/cancel an order
|
|
375
|
-
*/
|
|
376
|
-
deleteOrder(orderId: string): Promise<ConnectorResponse<void>>;
|
|
377
|
-
/**
|
|
378
|
-
* List orders with optional filtering
|
|
379
|
-
*/
|
|
380
|
-
listOrders(options?: PaginationOptions & {
|
|
381
|
-
[key: string]: any;
|
|
382
|
-
}): Promise<ConnectorResponse<UnifiedOrderType[]>>;
|
|
383
|
-
/**
|
|
384
|
-
* Create a refund for an order
|
|
385
|
-
*/
|
|
386
|
-
createRefund(orderId: string, refund: UnifiedOrderRefundType): Promise<ConnectorResponse<UnifiedOrderRefundType>>;
|
|
387
|
-
/**
|
|
388
|
-
* Get a refund by ID
|
|
389
|
-
*/
|
|
390
|
-
getRefund(refundId: string): Promise<ConnectorResponse<UnifiedOrderRefundType>>;
|
|
391
|
-
/**
|
|
392
|
-
* List refunds for an order
|
|
393
|
-
*/
|
|
394
|
-
listRefunds(orderId: string, options?: PaginationOptions & {
|
|
395
|
-
[key: string]: any;
|
|
396
|
-
}): Promise<ConnectorResponse<UnifiedOrderRefundType[]>>;
|
|
397
|
-
}
|
|
80
|
+
declare const initializeStallCore: (options: StallCoreConfigOptions) => CoreConfig;
|
|
398
81
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
82
|
+
declare const products: {
|
|
83
|
+
list: (props: {
|
|
84
|
+
sdk: CoreConfig;
|
|
85
|
+
query: string;
|
|
86
|
+
}) => Promise<UnifiedProductType[]>;
|
|
87
|
+
retrieve: (props: {
|
|
88
|
+
sdk: CoreConfig;
|
|
89
|
+
id: string;
|
|
90
|
+
}) => Promise<UnifiedProductType>;
|
|
91
|
+
create: (props: {
|
|
92
|
+
sdk: CoreConfig;
|
|
93
|
+
data: UnifiedProductType;
|
|
94
|
+
}) => Promise<UnifiedProductType>;
|
|
95
|
+
update: (props: {
|
|
96
|
+
sdk: CoreConfig;
|
|
97
|
+
id: string;
|
|
98
|
+
data: Partial<UnifiedProductType>;
|
|
99
|
+
}) => Promise<UnifiedProductType>;
|
|
100
|
+
delete: (props: {
|
|
101
|
+
sdk: CoreConfig;
|
|
102
|
+
id: string;
|
|
103
|
+
}) => Promise<void>;
|
|
104
|
+
bulk_create: (props: {
|
|
105
|
+
sdk: CoreConfig;
|
|
106
|
+
data: UnifiedProductType[];
|
|
107
|
+
}) => Promise<UnifiedProductType[]>;
|
|
108
|
+
bulk_update: (props: {
|
|
109
|
+
sdk: CoreConfig;
|
|
110
|
+
data: Array<{
|
|
111
|
+
id: string;
|
|
112
|
+
data: Partial<UnifiedProductType>;
|
|
113
|
+
}>;
|
|
114
|
+
}) => Promise<UnifiedProductType[]>;
|
|
115
|
+
bulk_delete: (props: {
|
|
116
|
+
sdk: CoreConfig;
|
|
117
|
+
ids: string[];
|
|
118
|
+
}) => Promise<void>;
|
|
119
|
+
};
|
|
427
120
|
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
* Initialize with a provided plugin instance (for testing/custom plugins)
|
|
467
|
-
* Useful for mock plugins or custom implementations
|
|
468
|
-
*/
|
|
469
|
-
static initializeWithPlugin(options: StallSDKOptions, plugin: IConnectorPlugin): Promise<StallCore>;
|
|
470
|
-
/**
|
|
471
|
-
* Get plugin metadata
|
|
472
|
-
*/
|
|
473
|
-
getMetadata(): {
|
|
474
|
-
id: string;
|
|
475
|
-
name: string;
|
|
476
|
-
version: string;
|
|
477
|
-
description: string;
|
|
478
|
-
supportedModules: string[];
|
|
479
|
-
};
|
|
480
|
-
/**
|
|
481
|
-
* Verify the connector configuration
|
|
482
|
-
*/
|
|
483
|
-
verify(): Promise<boolean>;
|
|
484
|
-
/**
|
|
485
|
-
* Check if a module is supported
|
|
486
|
-
*/
|
|
487
|
-
isModuleSupported(module: string): boolean;
|
|
488
|
-
/**
|
|
489
|
-
* Check if SDK is initialized
|
|
490
|
-
*/
|
|
491
|
-
isInitialized(): boolean;
|
|
492
|
-
/**
|
|
493
|
-
* Clear plugin cache
|
|
494
|
-
*/
|
|
495
|
-
clearCache(): void;
|
|
496
|
-
/**
|
|
497
|
-
* Get the underlying plugin instance
|
|
498
|
-
*/
|
|
499
|
-
getPlugin(): IConnectorPlugin;
|
|
500
|
-
/**
|
|
501
|
-
* Get SDK configuration
|
|
502
|
-
*/
|
|
503
|
-
getConfiguration(): {
|
|
504
|
-
id: string;
|
|
505
|
-
integration_id: string;
|
|
506
|
-
created_at: number;
|
|
507
|
-
updated_at: number;
|
|
508
|
-
};
|
|
509
|
-
}
|
|
121
|
+
declare const orders: {
|
|
122
|
+
list: (props: {
|
|
123
|
+
sdk: CoreConfig;
|
|
124
|
+
query?: string;
|
|
125
|
+
}) => Promise<UnifiedOrderType[]>;
|
|
126
|
+
retrieve: (props: {
|
|
127
|
+
sdk: CoreConfig;
|
|
128
|
+
id: string;
|
|
129
|
+
}) => Promise<UnifiedOrderType>;
|
|
130
|
+
create: (props: {
|
|
131
|
+
sdk: CoreConfig;
|
|
132
|
+
data: UnifiedOrderType;
|
|
133
|
+
}) => Promise<UnifiedOrderType>;
|
|
134
|
+
update: (props: {
|
|
135
|
+
sdk: CoreConfig;
|
|
136
|
+
id: string;
|
|
137
|
+
data: Partial<UnifiedOrderType>;
|
|
138
|
+
}) => Promise<UnifiedOrderType>;
|
|
139
|
+
delete: (props: {
|
|
140
|
+
sdk: CoreConfig;
|
|
141
|
+
id: string;
|
|
142
|
+
}) => Promise<void>;
|
|
143
|
+
bulk_create: (props: {
|
|
144
|
+
sdk: CoreConfig;
|
|
145
|
+
data: UnifiedOrderType[];
|
|
146
|
+
}) => Promise<UnifiedOrderType[]>;
|
|
147
|
+
bulk_update: (props: {
|
|
148
|
+
sdk: CoreConfig;
|
|
149
|
+
data: Array<{
|
|
150
|
+
id: string;
|
|
151
|
+
data: Partial<UnifiedOrderType>;
|
|
152
|
+
}>;
|
|
153
|
+
}) => Promise<UnifiedOrderType[]>;
|
|
154
|
+
bulk_delete: (props: {
|
|
155
|
+
sdk: CoreConfig;
|
|
156
|
+
ids: string[];
|
|
157
|
+
}) => Promise<void>;
|
|
158
|
+
};
|
|
510
159
|
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
*/
|
|
550
|
-
removeCacheEntry(integrationId: string): void;
|
|
551
|
-
}
|
|
160
|
+
declare const customers: {
|
|
161
|
+
list: (props: {
|
|
162
|
+
sdk: CoreConfig;
|
|
163
|
+
query: string;
|
|
164
|
+
}) => Promise<UnifiedCustomerType[]>;
|
|
165
|
+
retrieve: (props: {
|
|
166
|
+
sdk: CoreConfig;
|
|
167
|
+
id: string;
|
|
168
|
+
}) => Promise<UnifiedCustomerType>;
|
|
169
|
+
create: (props: {
|
|
170
|
+
sdk: CoreConfig;
|
|
171
|
+
data: UnifiedCustomerType;
|
|
172
|
+
}) => Promise<UnifiedCustomerType>;
|
|
173
|
+
update: (props: {
|
|
174
|
+
sdk: CoreConfig;
|
|
175
|
+
id: string;
|
|
176
|
+
data: Partial<UnifiedCustomerType>;
|
|
177
|
+
}) => Promise<UnifiedCustomerType>;
|
|
178
|
+
delete: (props: {
|
|
179
|
+
sdk: CoreConfig;
|
|
180
|
+
id: string;
|
|
181
|
+
}) => Promise<void>;
|
|
182
|
+
bulk_create: (props: {
|
|
183
|
+
sdk: CoreConfig;
|
|
184
|
+
data: UnifiedCustomerType[];
|
|
185
|
+
}) => Promise<UnifiedCustomerType[]>;
|
|
186
|
+
bulk_update: (props: {
|
|
187
|
+
sdk: CoreConfig;
|
|
188
|
+
data: Array<{
|
|
189
|
+
id: string;
|
|
190
|
+
data: Partial<UnifiedCustomerType>;
|
|
191
|
+
}>;
|
|
192
|
+
}) => Promise<UnifiedCustomerType[]>;
|
|
193
|
+
bulk_delete: (props: {
|
|
194
|
+
sdk: CoreConfig;
|
|
195
|
+
ids: string[];
|
|
196
|
+
}) => Promise<void>;
|
|
197
|
+
};
|
|
552
198
|
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
199
|
+
declare const collections: {
|
|
200
|
+
list: (props: {
|
|
201
|
+
sdk: CoreConfig;
|
|
202
|
+
query: string;
|
|
203
|
+
}) => Promise<UnifiedCollectionType[]>;
|
|
204
|
+
retrieve: (props: {
|
|
205
|
+
sdk: CoreConfig;
|
|
206
|
+
id: string;
|
|
207
|
+
}) => Promise<UnifiedCollectionType>;
|
|
208
|
+
create: (props: {
|
|
209
|
+
sdk: CoreConfig;
|
|
210
|
+
data: UnifiedCollectionType;
|
|
211
|
+
}) => Promise<UnifiedCollectionType>;
|
|
212
|
+
update: (props: {
|
|
213
|
+
sdk: CoreConfig;
|
|
214
|
+
id: string;
|
|
215
|
+
data: Partial<UnifiedCollectionType>;
|
|
216
|
+
}) => Promise<UnifiedCollectionType>;
|
|
217
|
+
delete: (props: {
|
|
218
|
+
sdk: CoreConfig;
|
|
219
|
+
id: string;
|
|
220
|
+
}) => Promise<void>;
|
|
221
|
+
bulk_create: (props: {
|
|
222
|
+
sdk: CoreConfig;
|
|
223
|
+
data: UnifiedCollectionType[];
|
|
224
|
+
}) => Promise<UnifiedCollectionType[]>;
|
|
225
|
+
bulk_update: (props: {
|
|
226
|
+
sdk: CoreConfig;
|
|
227
|
+
data: Array<{
|
|
228
|
+
id: string;
|
|
229
|
+
data: Partial<UnifiedCollectionType>;
|
|
230
|
+
}>;
|
|
231
|
+
}) => Promise<UnifiedCollectionType[]>;
|
|
232
|
+
bulk_delete: (props: {
|
|
233
|
+
sdk: CoreConfig;
|
|
234
|
+
ids: string[];
|
|
235
|
+
}) => Promise<void>;
|
|
585
236
|
};
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
237
|
+
|
|
238
|
+
declare const categories: {
|
|
239
|
+
list: (props: {
|
|
240
|
+
sdk: CoreConfig;
|
|
241
|
+
query: string;
|
|
242
|
+
}) => Promise<UnifiedCategoryType[]>;
|
|
243
|
+
retrieve: (props: {
|
|
244
|
+
sdk: CoreConfig;
|
|
245
|
+
id: string;
|
|
246
|
+
}) => Promise<UnifiedCategoryType>;
|
|
247
|
+
create: (props: {
|
|
248
|
+
sdk: CoreConfig;
|
|
249
|
+
data: UnifiedCategoryType;
|
|
250
|
+
}) => Promise<UnifiedCategoryType>;
|
|
251
|
+
update: (props: {
|
|
252
|
+
sdk: CoreConfig;
|
|
253
|
+
id: string;
|
|
254
|
+
data: Partial<UnifiedCategoryType>;
|
|
255
|
+
}) => Promise<UnifiedCategoryType>;
|
|
256
|
+
delete: (props: {
|
|
257
|
+
sdk: CoreConfig;
|
|
258
|
+
id: string;
|
|
259
|
+
}) => Promise<void>;
|
|
260
|
+
bulk_create: (props: {
|
|
261
|
+
sdk: CoreConfig;
|
|
262
|
+
data: UnifiedCategoryType[];
|
|
263
|
+
}) => Promise<UnifiedCategoryType[]>;
|
|
264
|
+
bulk_update: (props: {
|
|
265
|
+
sdk: CoreConfig;
|
|
266
|
+
data: Array<{
|
|
267
|
+
id: string;
|
|
268
|
+
data: Partial<UnifiedCategoryType>;
|
|
269
|
+
}>;
|
|
270
|
+
}) => Promise<UnifiedCategoryType[]>;
|
|
271
|
+
bulk_delete: (props: {
|
|
272
|
+
sdk: CoreConfig;
|
|
273
|
+
ids: string[];
|
|
274
|
+
}) => Promise<void>;
|
|
606
275
|
};
|
|
607
|
-
/**
|
|
608
|
-
* Generate a unique request ID
|
|
609
|
-
*/
|
|
610
|
-
declare function generateRequestId(): string;
|
|
611
276
|
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
277
|
+
declare const variants: {
|
|
278
|
+
list: (props: {
|
|
279
|
+
sdk: CoreConfig;
|
|
280
|
+
query: string;
|
|
281
|
+
}) => Promise<UnifiedVariantsType[]>;
|
|
282
|
+
retrieve: (props: {
|
|
283
|
+
sdk: CoreConfig;
|
|
284
|
+
id: string;
|
|
285
|
+
}) => Promise<UnifiedVariantsType>;
|
|
286
|
+
create: (props: {
|
|
287
|
+
sdk: CoreConfig;
|
|
288
|
+
data: UnifiedVariantsType;
|
|
289
|
+
}) => Promise<UnifiedVariantsType>;
|
|
290
|
+
update: (props: {
|
|
291
|
+
sdk: CoreConfig;
|
|
292
|
+
id: string;
|
|
293
|
+
data: Partial<UnifiedVariantsType>;
|
|
294
|
+
}) => Promise<UnifiedVariantsType>;
|
|
295
|
+
delete: (props: {
|
|
296
|
+
sdk: CoreConfig;
|
|
297
|
+
id: string;
|
|
298
|
+
}) => Promise<void>;
|
|
299
|
+
bulk_create: (props: {
|
|
300
|
+
sdk: CoreConfig;
|
|
301
|
+
data: UnifiedVariantsType[];
|
|
302
|
+
}) => Promise<UnifiedVariantsType[]>;
|
|
303
|
+
bulk_update: (props: {
|
|
304
|
+
sdk: CoreConfig;
|
|
305
|
+
data: Array<{
|
|
306
|
+
id: string;
|
|
307
|
+
data: Partial<UnifiedVariantsType>;
|
|
308
|
+
}>;
|
|
309
|
+
}) => Promise<UnifiedVariantsType[]>;
|
|
310
|
+
bulk_delete: (props: {
|
|
311
|
+
sdk: CoreConfig;
|
|
312
|
+
ids: string[];
|
|
313
|
+
}) => Promise<void>;
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
declare const inventory_levels: {
|
|
317
|
+
list: (props: {
|
|
318
|
+
sdk: CoreConfig;
|
|
319
|
+
query: string;
|
|
320
|
+
}) => Promise<UnifiedInventoryLevelType[]>;
|
|
321
|
+
retrieve: (props: {
|
|
322
|
+
sdk: CoreConfig;
|
|
323
|
+
id: string;
|
|
324
|
+
}) => Promise<UnifiedInventoryLevelType>;
|
|
325
|
+
create: (props: {
|
|
326
|
+
sdk: CoreConfig;
|
|
327
|
+
data: UnifiedInventoryLevelType;
|
|
328
|
+
}) => Promise<UnifiedInventoryLevelType>;
|
|
329
|
+
update: (props: {
|
|
330
|
+
sdk: CoreConfig;
|
|
331
|
+
id: string;
|
|
332
|
+
data: Partial<UnifiedInventoryLevelType>;
|
|
333
|
+
}) => Promise<UnifiedInventoryLevelType>;
|
|
334
|
+
delete: (props: {
|
|
335
|
+
sdk: CoreConfig;
|
|
336
|
+
id: string;
|
|
337
|
+
}) => Promise<void>;
|
|
338
|
+
bulk_create: (props: {
|
|
339
|
+
sdk: CoreConfig;
|
|
340
|
+
data: UnifiedInventoryLevelType[];
|
|
341
|
+
}) => Promise<UnifiedInventoryLevelType[]>;
|
|
342
|
+
bulk_update: (props: {
|
|
343
|
+
sdk: CoreConfig;
|
|
344
|
+
data: Array<{
|
|
345
|
+
id: string;
|
|
346
|
+
data: Partial<UnifiedInventoryLevelType>;
|
|
347
|
+
}>;
|
|
348
|
+
}) => Promise<UnifiedInventoryLevelType[]>;
|
|
349
|
+
bulk_delete: (props: {
|
|
350
|
+
sdk: CoreConfig;
|
|
351
|
+
ids: string[];
|
|
352
|
+
}) => Promise<void>;
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
declare const promotions: {
|
|
356
|
+
list: (props: {
|
|
357
|
+
sdk: CoreConfig;
|
|
358
|
+
query: string;
|
|
359
|
+
}) => Promise<UnifiedPromotion[]>;
|
|
360
|
+
retrieve: (props: {
|
|
361
|
+
sdk: CoreConfig;
|
|
362
|
+
id: string;
|
|
363
|
+
}) => Promise<UnifiedPromotion>;
|
|
364
|
+
create: (props: {
|
|
365
|
+
sdk: CoreConfig;
|
|
366
|
+
data: UnifiedPromotion;
|
|
367
|
+
}) => Promise<UnifiedPromotion>;
|
|
368
|
+
update: (props: {
|
|
369
|
+
sdk: CoreConfig;
|
|
370
|
+
id: string;
|
|
371
|
+
data: Partial<UnifiedPromotion>;
|
|
372
|
+
}) => Promise<UnifiedPromotion>;
|
|
373
|
+
delete: (props: {
|
|
374
|
+
sdk: CoreConfig;
|
|
375
|
+
id: string;
|
|
376
|
+
}) => Promise<void>;
|
|
377
|
+
bulk_create: (props: {
|
|
378
|
+
sdk: CoreConfig;
|
|
379
|
+
data: UnifiedPromotion[];
|
|
380
|
+
}) => Promise<UnifiedPromotion[]>;
|
|
381
|
+
bulk_update: (props: {
|
|
382
|
+
sdk: CoreConfig;
|
|
383
|
+
data: Array<{
|
|
384
|
+
id: string;
|
|
385
|
+
data: Partial<UnifiedPromotion>;
|
|
386
|
+
}>;
|
|
387
|
+
}) => Promise<UnifiedPromotion[]>;
|
|
388
|
+
bulk_delete: (props: {
|
|
389
|
+
sdk: CoreConfig;
|
|
390
|
+
ids: string[];
|
|
391
|
+
}) => Promise<void>;
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
declare const order_notes: {
|
|
395
|
+
list: (props: {
|
|
396
|
+
sdk: CoreConfig;
|
|
397
|
+
query: string;
|
|
398
|
+
}) => Promise<UnifiedOrderNote[]>;
|
|
399
|
+
retrieve: (props: {
|
|
400
|
+
sdk: CoreConfig;
|
|
401
|
+
id: string;
|
|
402
|
+
}) => Promise<UnifiedOrderNote>;
|
|
403
|
+
create: (props: {
|
|
404
|
+
sdk: CoreConfig;
|
|
405
|
+
data: UnifiedOrderNote;
|
|
406
|
+
}) => Promise<UnifiedOrderNote>;
|
|
407
|
+
update: (props: {
|
|
408
|
+
sdk: CoreConfig;
|
|
409
|
+
id: string;
|
|
410
|
+
data: Partial<UnifiedOrderNote>;
|
|
411
|
+
}) => Promise<UnifiedOrderNote>;
|
|
412
|
+
delete: (props: {
|
|
413
|
+
sdk: CoreConfig;
|
|
414
|
+
id: string;
|
|
415
|
+
}) => Promise<void>;
|
|
416
|
+
bulk_create: (props: {
|
|
417
|
+
sdk: CoreConfig;
|
|
418
|
+
data: UnifiedOrderNote[];
|
|
419
|
+
}) => Promise<UnifiedOrderNote[]>;
|
|
420
|
+
bulk_update: (props: {
|
|
421
|
+
sdk: CoreConfig;
|
|
422
|
+
data: Array<{
|
|
423
|
+
id: string;
|
|
424
|
+
data: Partial<UnifiedOrderNote>;
|
|
425
|
+
}>;
|
|
426
|
+
}) => Promise<UnifiedOrderNote[]>;
|
|
427
|
+
bulk_delete: (props: {
|
|
428
|
+
sdk: CoreConfig;
|
|
429
|
+
ids: string[];
|
|
430
|
+
}) => Promise<void>;
|
|
431
|
+
};
|
|
432
|
+
|
|
433
|
+
declare const refunds: {
|
|
434
|
+
list: (props: {
|
|
435
|
+
sdk: CoreConfig;
|
|
436
|
+
query: string;
|
|
437
|
+
}) => Promise<UnifiedOrderRefundType[]>;
|
|
438
|
+
retrieve: (props: {
|
|
439
|
+
sdk: CoreConfig;
|
|
440
|
+
id: string;
|
|
441
|
+
}) => Promise<UnifiedOrderRefundType>;
|
|
442
|
+
create: (props: {
|
|
443
|
+
sdk: CoreConfig;
|
|
444
|
+
data: UnifiedOrderRefundType;
|
|
445
|
+
}) => Promise<UnifiedOrderRefundType>;
|
|
446
|
+
update: (props: {
|
|
447
|
+
sdk: CoreConfig;
|
|
448
|
+
id: string;
|
|
449
|
+
data: Partial<UnifiedOrderRefundType>;
|
|
450
|
+
}) => Promise<UnifiedOrderRefundType>;
|
|
451
|
+
delete: (props: {
|
|
452
|
+
sdk: CoreConfig;
|
|
453
|
+
id: string;
|
|
454
|
+
}) => Promise<void>;
|
|
455
|
+
bulk_create: (props: {
|
|
456
|
+
sdk: CoreConfig;
|
|
457
|
+
data: UnifiedOrderRefundType[];
|
|
458
|
+
}) => Promise<UnifiedOrderRefundType[]>;
|
|
459
|
+
bulk_update: (props: {
|
|
460
|
+
sdk: CoreConfig;
|
|
461
|
+
data: Array<{
|
|
462
|
+
id: string;
|
|
463
|
+
data: Partial<UnifiedOrderRefundType>;
|
|
464
|
+
}>;
|
|
465
|
+
}) => Promise<UnifiedOrderRefundType[]>;
|
|
466
|
+
bulk_delete: (props: {
|
|
467
|
+
sdk: CoreConfig;
|
|
468
|
+
ids: string[];
|
|
469
|
+
}) => Promise<void>;
|
|
470
|
+
};
|
|
471
|
+
|
|
472
|
+
declare const payment_providers: {
|
|
473
|
+
list: (props: {
|
|
474
|
+
sdk: CoreConfig;
|
|
475
|
+
query: string;
|
|
476
|
+
}) => Promise<UnifiedPaymentProviderType[]>;
|
|
477
|
+
retrieve: (props: {
|
|
478
|
+
sdk: CoreConfig;
|
|
479
|
+
id: string;
|
|
480
|
+
}) => Promise<UnifiedPaymentProviderType>;
|
|
481
|
+
create: (props: {
|
|
482
|
+
sdk: CoreConfig;
|
|
483
|
+
data: UnifiedPaymentProviderType;
|
|
484
|
+
}) => Promise<UnifiedPaymentProviderType>;
|
|
485
|
+
update: (props: {
|
|
486
|
+
sdk: CoreConfig;
|
|
487
|
+
id: string;
|
|
488
|
+
data: Partial<UnifiedPaymentProviderType>;
|
|
489
|
+
}) => Promise<UnifiedPaymentProviderType>;
|
|
490
|
+
delete: (props: {
|
|
491
|
+
sdk: CoreConfig;
|
|
492
|
+
id: string;
|
|
493
|
+
}) => Promise<void>;
|
|
494
|
+
bulk_create: (props: {
|
|
495
|
+
sdk: CoreConfig;
|
|
496
|
+
data: UnifiedPaymentProviderType[];
|
|
497
|
+
}) => Promise<UnifiedPaymentProviderType[]>;
|
|
498
|
+
bulk_update: (props: {
|
|
499
|
+
sdk: CoreConfig;
|
|
500
|
+
data: Array<{
|
|
501
|
+
id: string;
|
|
502
|
+
data: Partial<UnifiedPaymentProviderType>;
|
|
503
|
+
}>;
|
|
504
|
+
}) => Promise<UnifiedPaymentProviderType[]>;
|
|
505
|
+
bulk_delete: (props: {
|
|
506
|
+
sdk: CoreConfig;
|
|
507
|
+
ids: string[];
|
|
508
|
+
}) => Promise<void>;
|
|
509
|
+
};
|
|
510
|
+
|
|
511
|
+
declare const payments: {
|
|
512
|
+
list: (props: {
|
|
513
|
+
sdk: CoreConfig;
|
|
514
|
+
query: string;
|
|
515
|
+
}) => Promise<UnifiedPaymentCollectionType[]>;
|
|
516
|
+
retrieve: (props: {
|
|
517
|
+
sdk: CoreConfig;
|
|
518
|
+
id: string;
|
|
519
|
+
}) => Promise<UnifiedPaymentCollectionType>;
|
|
520
|
+
create: (props: {
|
|
521
|
+
sdk: CoreConfig;
|
|
522
|
+
data: UnifiedPaymentCollectionType;
|
|
523
|
+
}) => Promise<UnifiedPaymentCollectionType>;
|
|
524
|
+
update: (props: {
|
|
525
|
+
sdk: CoreConfig;
|
|
526
|
+
id: string;
|
|
527
|
+
data: Partial<UnifiedPaymentCollectionType>;
|
|
528
|
+
}) => Promise<UnifiedPaymentCollectionType>;
|
|
529
|
+
delete: (props: {
|
|
530
|
+
sdk: CoreConfig;
|
|
531
|
+
id: string;
|
|
532
|
+
}) => Promise<void>;
|
|
533
|
+
bulk_create: (props: {
|
|
534
|
+
sdk: CoreConfig;
|
|
535
|
+
data: UnifiedPaymentCollectionType[];
|
|
536
|
+
}) => Promise<UnifiedPaymentCollectionType[]>;
|
|
537
|
+
bulk_update: (props: {
|
|
538
|
+
sdk: CoreConfig;
|
|
539
|
+
data: Array<{
|
|
540
|
+
id: string;
|
|
541
|
+
data: Partial<UnifiedPaymentCollectionType>;
|
|
542
|
+
}>;
|
|
543
|
+
}) => Promise<UnifiedPaymentCollectionType[]>;
|
|
544
|
+
bulk_delete: (props: {
|
|
545
|
+
sdk: CoreConfig;
|
|
546
|
+
ids: string[];
|
|
547
|
+
}) => Promise<void>;
|
|
548
|
+
};
|
|
549
|
+
|
|
550
|
+
declare const tax_regions: {
|
|
551
|
+
list: (props: {
|
|
552
|
+
sdk: CoreConfig;
|
|
553
|
+
query: string;
|
|
554
|
+
}) => Promise<UnifiedTaxRegionType[]>;
|
|
555
|
+
retrieve: (props: {
|
|
556
|
+
sdk: CoreConfig;
|
|
557
|
+
id: string;
|
|
558
|
+
}) => Promise<UnifiedTaxRegionType>;
|
|
559
|
+
create: (props: {
|
|
560
|
+
sdk: CoreConfig;
|
|
561
|
+
data: UnifiedTaxRegionType;
|
|
562
|
+
}) => Promise<UnifiedTaxRegionType>;
|
|
563
|
+
update: (props: {
|
|
564
|
+
sdk: CoreConfig;
|
|
565
|
+
id: string;
|
|
566
|
+
data: Partial<UnifiedTaxRegionType>;
|
|
567
|
+
}) => Promise<UnifiedTaxRegionType>;
|
|
568
|
+
delete: (props: {
|
|
569
|
+
sdk: CoreConfig;
|
|
570
|
+
id: string;
|
|
571
|
+
}) => Promise<void>;
|
|
572
|
+
bulk_create: (props: {
|
|
573
|
+
sdk: CoreConfig;
|
|
574
|
+
data: UnifiedTaxRegionType[];
|
|
575
|
+
}) => Promise<UnifiedTaxRegionType[]>;
|
|
576
|
+
bulk_update: (props: {
|
|
577
|
+
sdk: CoreConfig;
|
|
578
|
+
data: Array<{
|
|
579
|
+
id: string;
|
|
580
|
+
data: Partial<UnifiedTaxRegionType>;
|
|
581
|
+
}>;
|
|
582
|
+
}) => Promise<UnifiedTaxRegionType[]>;
|
|
583
|
+
bulk_delete: (props: {
|
|
584
|
+
sdk: CoreConfig;
|
|
585
|
+
ids: string[];
|
|
586
|
+
}) => Promise<void>;
|
|
587
|
+
};
|
|
588
|
+
|
|
589
|
+
declare const tax_rates: {
|
|
590
|
+
list: (props: {
|
|
591
|
+
sdk: CoreConfig;
|
|
592
|
+
query: string;
|
|
593
|
+
}) => Promise<UnifiedTaxRateType[]>;
|
|
594
|
+
retrieve: (props: {
|
|
595
|
+
sdk: CoreConfig;
|
|
596
|
+
id: string;
|
|
597
|
+
}) => Promise<UnifiedTaxRateType>;
|
|
598
|
+
create: (props: {
|
|
599
|
+
sdk: CoreConfig;
|
|
600
|
+
data: UnifiedTaxRateType;
|
|
601
|
+
}) => Promise<UnifiedTaxRateType>;
|
|
602
|
+
update: (props: {
|
|
603
|
+
sdk: CoreConfig;
|
|
604
|
+
id: string;
|
|
605
|
+
data: Partial<UnifiedTaxRateType>;
|
|
606
|
+
}) => Promise<UnifiedTaxRateType>;
|
|
607
|
+
delete: (props: {
|
|
608
|
+
sdk: CoreConfig;
|
|
609
|
+
id: string;
|
|
610
|
+
}) => Promise<void>;
|
|
611
|
+
bulk_create: (props: {
|
|
612
|
+
sdk: CoreConfig;
|
|
613
|
+
data: UnifiedTaxRateType[];
|
|
614
|
+
}) => Promise<UnifiedTaxRateType[]>;
|
|
615
|
+
bulk_update: (props: {
|
|
616
|
+
sdk: CoreConfig;
|
|
617
|
+
data: Array<{
|
|
618
|
+
id: string;
|
|
619
|
+
data: Partial<UnifiedTaxRateType>;
|
|
620
|
+
}>;
|
|
621
|
+
}) => Promise<UnifiedTaxRateType[]>;
|
|
622
|
+
bulk_delete: (props: {
|
|
623
|
+
sdk: CoreConfig;
|
|
624
|
+
ids: string[];
|
|
625
|
+
}) => Promise<void>;
|
|
626
|
+
};
|
|
627
|
+
|
|
628
|
+
declare const locations: {
|
|
629
|
+
list: (props: {
|
|
630
|
+
sdk: CoreConfig;
|
|
631
|
+
query: string;
|
|
632
|
+
}) => Promise<UnifiedLocationType[]>;
|
|
633
|
+
retrieve: (props: {
|
|
634
|
+
sdk: CoreConfig;
|
|
635
|
+
id: string;
|
|
636
|
+
}) => Promise<UnifiedLocationType>;
|
|
637
|
+
create: (props: {
|
|
638
|
+
sdk: CoreConfig;
|
|
639
|
+
data: UnifiedLocationType;
|
|
640
|
+
}) => Promise<UnifiedLocationType>;
|
|
641
|
+
update: (props: {
|
|
642
|
+
sdk: CoreConfig;
|
|
643
|
+
id: string;
|
|
644
|
+
data: Partial<UnifiedLocationType>;
|
|
645
|
+
}) => Promise<UnifiedLocationType>;
|
|
646
|
+
delete: (props: {
|
|
647
|
+
sdk: CoreConfig;
|
|
648
|
+
id: string;
|
|
649
|
+
}) => Promise<void>;
|
|
650
|
+
bulk_create: (props: {
|
|
651
|
+
sdk: CoreConfig;
|
|
652
|
+
data: UnifiedLocationType[];
|
|
653
|
+
}) => Promise<UnifiedLocationType[]>;
|
|
654
|
+
bulk_update: (props: {
|
|
655
|
+
sdk: CoreConfig;
|
|
656
|
+
data: Array<{
|
|
657
|
+
id: string;
|
|
658
|
+
data: Partial<UnifiedLocationType>;
|
|
659
|
+
}>;
|
|
660
|
+
}) => Promise<UnifiedLocationType[]>;
|
|
661
|
+
bulk_delete: (props: {
|
|
662
|
+
sdk: CoreConfig;
|
|
663
|
+
ids: string[];
|
|
664
|
+
}) => Promise<void>;
|
|
665
|
+
};
|
|
666
|
+
|
|
667
|
+
declare const fulfillments: {
|
|
668
|
+
list: (props: {
|
|
669
|
+
sdk: CoreConfig;
|
|
670
|
+
query: string;
|
|
671
|
+
}) => Promise<UnifiedFulfillmentType[]>;
|
|
672
|
+
retrieve: (props: {
|
|
673
|
+
sdk: CoreConfig;
|
|
674
|
+
id: string;
|
|
675
|
+
}) => Promise<UnifiedFulfillmentType>;
|
|
676
|
+
create: (props: {
|
|
677
|
+
sdk: CoreConfig;
|
|
678
|
+
data: UnifiedFulfillmentType;
|
|
679
|
+
}) => Promise<UnifiedFulfillmentType>;
|
|
680
|
+
update: (props: {
|
|
681
|
+
sdk: CoreConfig;
|
|
682
|
+
id: string;
|
|
683
|
+
data: Partial<UnifiedFulfillmentType>;
|
|
684
|
+
}) => Promise<UnifiedFulfillmentType>;
|
|
685
|
+
delete: (props: {
|
|
686
|
+
sdk: CoreConfig;
|
|
687
|
+
id: string;
|
|
688
|
+
}) => Promise<void>;
|
|
689
|
+
bulk_create: (props: {
|
|
690
|
+
sdk: CoreConfig;
|
|
691
|
+
data: UnifiedFulfillmentType[];
|
|
692
|
+
}) => Promise<UnifiedFulfillmentType[]>;
|
|
693
|
+
bulk_update: (props: {
|
|
694
|
+
sdk: CoreConfig;
|
|
695
|
+
data: Array<{
|
|
696
|
+
id: string;
|
|
697
|
+
data: Partial<UnifiedFulfillmentType>;
|
|
698
|
+
}>;
|
|
699
|
+
}) => Promise<UnifiedFulfillmentType[]>;
|
|
700
|
+
bulk_delete: (props: {
|
|
701
|
+
sdk: CoreConfig;
|
|
702
|
+
ids: string[];
|
|
703
|
+
}) => Promise<void>;
|
|
704
|
+
};
|
|
672
705
|
|
|
673
|
-
export {
|
|
706
|
+
export { categories, collections, customers, fulfillments, initializeStallCore, inventory_levels, locations, order_notes, orders, payment_providers, payments, products, promotions, refunds, tax_rates, tax_regions, variants };
|