@tuturuuu/internal-api 0.0.1 → 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/dist/ai-memory.d.ts +76 -0
- package/dist/ai-memory.d.ts.map +1 -0
- package/dist/ai-memory.js +59 -0
- package/dist/ai.d.ts +67 -3
- package/dist/ai.d.ts.map +1 -1
- package/dist/ai.js +121 -0
- package/dist/auth.d.ts +121 -1
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +111 -0
- package/dist/calendar.d.ts +17 -1
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +9 -0
- package/dist/chat-conversations.d.ts +81 -0
- package/dist/chat-conversations.d.ts.map +1 -0
- package/dist/chat-conversations.js +384 -0
- package/dist/chat-internal.d.ts +11 -0
- package/dist/chat-internal.d.ts.map +1 -0
- package/dist/chat-internal.js +39 -0
- package/dist/chat-legacy.d.ts +23 -0
- package/dist/chat-legacy.d.ts.map +1 -0
- package/dist/chat-legacy.js +68 -0
- package/dist/chat-types.d.ts +262 -0
- package/dist/chat-types.d.ts.map +1 -0
- package/dist/chat-types.js +2 -0
- package/dist/chat.d.ts +3 -45
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js +17 -65
- package/dist/client.d.ts +5 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +50 -5
- package/dist/education.d.ts +288 -2
- package/dist/education.d.ts.map +1 -1
- package/dist/education.js +176 -0
- package/dist/external-project-team.d.ts +51 -0
- package/dist/external-project-team.d.ts.map +1 -0
- package/dist/external-project-team.js +137 -0
- package/dist/external-projects.d.ts +98 -10
- package/dist/external-projects.d.ts.map +1 -1
- package/dist/external-projects.js +92 -33
- package/dist/finance.d.ts +491 -3
- package/dist/finance.d.ts.map +1 -1
- package/dist/finance.js +611 -1
- package/dist/hive.d.ts +739 -0
- package/dist/hive.d.ts.map +1 -0
- package/dist/hive.js +333 -0
- package/dist/index.d.ts +31 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +350 -8
- package/dist/infrastructure.d.ts +955 -1
- package/dist/infrastructure.d.ts.map +1 -1
- package/dist/infrastructure.js +595 -0
- package/dist/inventory.d.ts +355 -0
- package/dist/inventory.d.ts.map +1 -0
- package/dist/inventory.js +268 -0
- package/dist/mail.d.ts +125 -0
- package/dist/mail.d.ts.map +1 -1
- package/dist/mail.js +112 -1
- package/dist/meet.d.ts +54 -0
- package/dist/meet.d.ts.map +1 -0
- package/dist/meet.js +37 -0
- package/dist/mind.d.ts +55 -0
- package/dist/mind.d.ts.map +1 -0
- package/dist/mind.js +84 -0
- package/dist/posts.d.ts +33 -0
- package/dist/posts.d.ts.map +1 -1
- package/dist/posts.js +42 -0
- package/dist/promotions.d.ts +54 -0
- package/dist/promotions.d.ts.map +1 -1
- package/dist/promotions.js +52 -0
- package/dist/settings.d.ts +28 -1
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +68 -0
- package/dist/storage.d.ts +32 -21
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +52 -32
- package/dist/tasks.d.ts +224 -4
- package/dist/tasks.d.ts.map +1 -1
- package/dist/tasks.js +204 -0
- package/dist/teach.d.ts +130 -0
- package/dist/teach.d.ts.map +1 -0
- package/dist/teach.js +110 -0
- package/dist/topic-announcements.d.ts +235 -0
- package/dist/topic-announcements.d.ts.map +1 -0
- package/dist/topic-announcements.js +182 -0
- package/dist/tulearn.d.ts +223 -0
- package/dist/tulearn.d.ts.map +1 -0
- package/dist/tulearn.js +97 -0
- package/dist/tutoring.d.ts +152 -0
- package/dist/tutoring.d.ts.map +1 -0
- package/dist/tutoring.js +58 -0
- package/dist/user-group-activity.d.ts +54 -0
- package/dist/user-group-activity.d.ts.map +1 -0
- package/dist/user-group-activity.js +11 -0
- package/dist/user-groups.d.ts +35 -0
- package/dist/user-groups.d.ts.map +1 -0
- package/dist/user-groups.js +84 -0
- package/dist/users.d.ts +83 -1
- package/dist/users.d.ts.map +1 -1
- package/dist/users.js +137 -0
- package/dist/workspace-configs.d.ts +2 -0
- package/dist/workspace-configs.d.ts.map +1 -1
- package/dist/workspace-configs.js +3 -1
- package/dist/workspace-user-audit.d.ts +1 -0
- package/dist/workspace-user-audit.d.ts.map +1 -1
- package/dist/workspaces.d.ts +57 -0
- package/dist/workspaces.d.ts.map +1 -1
- package/dist/workspaces.js +58 -1
- package/package.json +59 -6
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
import type { InventoryOwner } from '@tuturuuu/types/primitives/InventoryOwner';
|
|
2
|
+
import type { Product } from '@tuturuuu/types/primitives/Product';
|
|
3
|
+
import type { ProductBatch } from '@tuturuuu/types/primitives/ProductBatch';
|
|
4
|
+
import type { ProductCategory } from '@tuturuuu/types/primitives/ProductCategory';
|
|
5
|
+
import type { ProductPromotion } from '@tuturuuu/types/primitives/ProductPromotion';
|
|
6
|
+
import type { ProductSupplier } from '@tuturuuu/types/primitives/ProductSupplier';
|
|
7
|
+
import type { ProductUnit } from '@tuturuuu/types/primitives/ProductUnit';
|
|
8
|
+
import type { ProductWarehouse } from '@tuturuuu/types/primitives/ProductWarehouse';
|
|
9
|
+
import type { TransactionCategory } from '@tuturuuu/types/primitives/TransactionCategory';
|
|
10
|
+
import { type InternalApiClientOptions } from './client';
|
|
11
|
+
export type InventoryStorefrontStatus = 'draft' | 'published' | 'paused' | 'archived';
|
|
12
|
+
export type InventoryListingStatus = 'draft' | 'published' | 'paused' | 'archived';
|
|
13
|
+
export type InventoryBundleStatus = 'draft' | 'active' | 'paused' | 'archived';
|
|
14
|
+
export type InventoryCheckoutStatus = 'reserved' | 'completed' | 'cancelled' | 'expired';
|
|
15
|
+
export type InventoryStorefront = {
|
|
16
|
+
id: string;
|
|
17
|
+
wsId: string;
|
|
18
|
+
slug: string;
|
|
19
|
+
name: string;
|
|
20
|
+
description: string | null;
|
|
21
|
+
status: InventoryStorefrontStatus;
|
|
22
|
+
heroImageUrl: string | null;
|
|
23
|
+
accentColor: string | null;
|
|
24
|
+
currency: string;
|
|
25
|
+
listingsCount?: number;
|
|
26
|
+
createdAt: string | null;
|
|
27
|
+
updatedAt: string | null;
|
|
28
|
+
};
|
|
29
|
+
export type InventoryStorefrontListing = {
|
|
30
|
+
id: string;
|
|
31
|
+
storefrontId: string;
|
|
32
|
+
wsId: string;
|
|
33
|
+
listingType: 'product' | 'bundle';
|
|
34
|
+
productId: string | null;
|
|
35
|
+
bundleId: string | null;
|
|
36
|
+
unitId: string | null;
|
|
37
|
+
warehouseId: string | null;
|
|
38
|
+
title: string;
|
|
39
|
+
description: string | null;
|
|
40
|
+
imageUrl: string | null;
|
|
41
|
+
price: number;
|
|
42
|
+
compareAtPrice: number | null;
|
|
43
|
+
status: InventoryListingStatus;
|
|
44
|
+
sortOrder: number;
|
|
45
|
+
maxPerOrder: number;
|
|
46
|
+
availableQuantity?: number;
|
|
47
|
+
unitName?: string | null;
|
|
48
|
+
warehouseName?: string | null;
|
|
49
|
+
createdAt: string | null;
|
|
50
|
+
updatedAt: string | null;
|
|
51
|
+
};
|
|
52
|
+
export type InventoryBundleComponent = {
|
|
53
|
+
id: string;
|
|
54
|
+
bundleId: string;
|
|
55
|
+
productId: string;
|
|
56
|
+
unitId: string;
|
|
57
|
+
warehouseId: string;
|
|
58
|
+
quantity: number;
|
|
59
|
+
productName?: string | null;
|
|
60
|
+
unitName?: string | null;
|
|
61
|
+
warehouseName?: string | null;
|
|
62
|
+
};
|
|
63
|
+
export type InventoryBundle = {
|
|
64
|
+
id: string;
|
|
65
|
+
wsId: string;
|
|
66
|
+
storefrontId: string | null;
|
|
67
|
+
slug: string;
|
|
68
|
+
name: string;
|
|
69
|
+
description: string | null;
|
|
70
|
+
imageUrl: string | null;
|
|
71
|
+
price: number;
|
|
72
|
+
status: InventoryBundleStatus;
|
|
73
|
+
maxPerOrder: number;
|
|
74
|
+
availableQuantity?: number;
|
|
75
|
+
components: InventoryBundleComponent[];
|
|
76
|
+
createdAt: string | null;
|
|
77
|
+
updatedAt: string | null;
|
|
78
|
+
};
|
|
79
|
+
export type InventoryCheckoutLine = {
|
|
80
|
+
id: string;
|
|
81
|
+
listingId: string | null;
|
|
82
|
+
bundleId: string | null;
|
|
83
|
+
productId: string;
|
|
84
|
+
unitId: string;
|
|
85
|
+
warehouseId: string;
|
|
86
|
+
title: string;
|
|
87
|
+
quantity: number;
|
|
88
|
+
unitPrice: number;
|
|
89
|
+
subtotalAmount: number;
|
|
90
|
+
};
|
|
91
|
+
export type InventoryCheckoutSession = {
|
|
92
|
+
id: string;
|
|
93
|
+
publicToken: string;
|
|
94
|
+
status: InventoryCheckoutStatus;
|
|
95
|
+
customerName: string;
|
|
96
|
+
customerEmail: string;
|
|
97
|
+
customerPhone: string | null;
|
|
98
|
+
note: string | null;
|
|
99
|
+
currency: string;
|
|
100
|
+
subtotalAmount: number;
|
|
101
|
+
platformFeeAmount: number;
|
|
102
|
+
processingFeeEstimateAmount: number;
|
|
103
|
+
conversionFeeEstimateAmount: number;
|
|
104
|
+
totalAmount: number;
|
|
105
|
+
expiresAt: string | null;
|
|
106
|
+
completedAt: string | null;
|
|
107
|
+
financeInvoiceId: string | null;
|
|
108
|
+
lines: InventoryCheckoutLine[];
|
|
109
|
+
};
|
|
110
|
+
export type InventoryOverviewResponse = {
|
|
111
|
+
category_breakdown?: Array<Record<string, unknown>>;
|
|
112
|
+
low_stock_products?: Array<Record<string, unknown>>;
|
|
113
|
+
owner_breakdown?: Array<Record<string, unknown>>;
|
|
114
|
+
realtime_enabled?: boolean;
|
|
115
|
+
recent_sales?: Array<Record<string, unknown>>;
|
|
116
|
+
totals?: Record<string, number>;
|
|
117
|
+
};
|
|
118
|
+
export type InventoryProductSummary = {
|
|
119
|
+
archived?: boolean;
|
|
120
|
+
category?: string | null;
|
|
121
|
+
id: string;
|
|
122
|
+
inventory?: Array<Record<string, unknown>>;
|
|
123
|
+
manufacturer_id?: string | null;
|
|
124
|
+
manufacturer?: string | null;
|
|
125
|
+
min_amount?: number | null;
|
|
126
|
+
name: string;
|
|
127
|
+
owner?: {
|
|
128
|
+
name?: string | null;
|
|
129
|
+
} | null;
|
|
130
|
+
stock?: Array<Record<string, unknown>>;
|
|
131
|
+
unit?: string | null;
|
|
132
|
+
warehouse?: string | null;
|
|
133
|
+
};
|
|
134
|
+
export type InventoryManufacturer = {
|
|
135
|
+
id: string;
|
|
136
|
+
ws_id: string;
|
|
137
|
+
name: string;
|
|
138
|
+
created_at?: string | null;
|
|
139
|
+
updated_at?: string | null;
|
|
140
|
+
};
|
|
141
|
+
export type InventoryUnit = {
|
|
142
|
+
id: string;
|
|
143
|
+
ws_id: string;
|
|
144
|
+
name: string;
|
|
145
|
+
created_at?: string | null;
|
|
146
|
+
updated_at?: string | null;
|
|
147
|
+
};
|
|
148
|
+
export type InventorySaleSummary = {
|
|
149
|
+
completed_at: string | null;
|
|
150
|
+
created_at: string | null;
|
|
151
|
+
customer_name: string | null;
|
|
152
|
+
id: string;
|
|
153
|
+
items_count: number;
|
|
154
|
+
paid_amount: number;
|
|
155
|
+
total_quantity: number;
|
|
156
|
+
};
|
|
157
|
+
export type InventoryAuditLogSummary = {
|
|
158
|
+
actor_auth_uid?: string | null;
|
|
159
|
+
created_at: string | null;
|
|
160
|
+
entity_id?: string | null;
|
|
161
|
+
entity_kind: string;
|
|
162
|
+
entity_label?: string | null;
|
|
163
|
+
event_kind: string;
|
|
164
|
+
id: string;
|
|
165
|
+
summary: string;
|
|
166
|
+
};
|
|
167
|
+
export type InventoryStorefrontListQuery = {
|
|
168
|
+
q?: string;
|
|
169
|
+
status?: InventoryStorefrontStatus | 'all';
|
|
170
|
+
page?: number;
|
|
171
|
+
pageSize?: number;
|
|
172
|
+
};
|
|
173
|
+
export type InventoryBundleListQuery = {
|
|
174
|
+
q?: string;
|
|
175
|
+
status?: InventoryBundleStatus | 'all';
|
|
176
|
+
page?: number;
|
|
177
|
+
pageSize?: number;
|
|
178
|
+
};
|
|
179
|
+
export type InventoryCheckoutListQuery = {
|
|
180
|
+
q?: string;
|
|
181
|
+
status?: InventoryCheckoutStatus | 'all';
|
|
182
|
+
page?: number;
|
|
183
|
+
pageSize?: number;
|
|
184
|
+
};
|
|
185
|
+
export type InventoryCatalogListQuery = {
|
|
186
|
+
categoryId?: string;
|
|
187
|
+
manufacturerId?: string;
|
|
188
|
+
page?: number;
|
|
189
|
+
pageSize?: number;
|
|
190
|
+
q?: string;
|
|
191
|
+
sortBy?: string;
|
|
192
|
+
sortOrder?: 'asc' | 'desc';
|
|
193
|
+
status?: 'active' | 'archived' | 'all';
|
|
194
|
+
};
|
|
195
|
+
export type InventoryNamedListQuery = {
|
|
196
|
+
q?: string;
|
|
197
|
+
page?: number;
|
|
198
|
+
pageSize?: number;
|
|
199
|
+
};
|
|
200
|
+
export type InventoryManufacturerPayload = {
|
|
201
|
+
name: string;
|
|
202
|
+
};
|
|
203
|
+
export type InventoryUnitPayload = {
|
|
204
|
+
name: string;
|
|
205
|
+
};
|
|
206
|
+
export type InventoryOffsetListQuery = {
|
|
207
|
+
limit?: number;
|
|
208
|
+
offset?: number;
|
|
209
|
+
};
|
|
210
|
+
export type InventoryStorefrontPayload = {
|
|
211
|
+
slug: string;
|
|
212
|
+
name: string;
|
|
213
|
+
description?: string | null;
|
|
214
|
+
status?: InventoryStorefrontStatus;
|
|
215
|
+
heroImageUrl?: string | null;
|
|
216
|
+
accentColor?: string | null;
|
|
217
|
+
currency?: string;
|
|
218
|
+
};
|
|
219
|
+
export type InventoryStorefrontListingPayload = {
|
|
220
|
+
listingType?: 'product' | 'bundle';
|
|
221
|
+
productId?: string | null;
|
|
222
|
+
bundleId?: string | null;
|
|
223
|
+
unitId?: string | null;
|
|
224
|
+
warehouseId?: string | null;
|
|
225
|
+
title: string;
|
|
226
|
+
description?: string | null;
|
|
227
|
+
imageUrl?: string | null;
|
|
228
|
+
price: number;
|
|
229
|
+
compareAtPrice?: number | null;
|
|
230
|
+
status?: InventoryListingStatus;
|
|
231
|
+
sortOrder?: number;
|
|
232
|
+
maxPerOrder?: number;
|
|
233
|
+
};
|
|
234
|
+
export type InventoryBundlePayload = {
|
|
235
|
+
storefrontId?: string | null;
|
|
236
|
+
slug: string;
|
|
237
|
+
name: string;
|
|
238
|
+
description?: string | null;
|
|
239
|
+
imageUrl?: string | null;
|
|
240
|
+
price: number;
|
|
241
|
+
status?: InventoryBundleStatus;
|
|
242
|
+
maxPerOrder?: number;
|
|
243
|
+
components?: Array<{
|
|
244
|
+
productId: string;
|
|
245
|
+
unitId: string;
|
|
246
|
+
warehouseId: string;
|
|
247
|
+
quantity: number;
|
|
248
|
+
}>;
|
|
249
|
+
};
|
|
250
|
+
export type InventoryCheckoutCreatePayload = {
|
|
251
|
+
customerName: string;
|
|
252
|
+
customerEmail: string;
|
|
253
|
+
customerPhone?: string | null;
|
|
254
|
+
note?: string | null;
|
|
255
|
+
lines: Array<{
|
|
256
|
+
listingId?: string;
|
|
257
|
+
bundleId?: string;
|
|
258
|
+
quantity: number;
|
|
259
|
+
}>;
|
|
260
|
+
};
|
|
261
|
+
export type InventoryListResponse<T> = {
|
|
262
|
+
data: T[];
|
|
263
|
+
count: number;
|
|
264
|
+
};
|
|
265
|
+
export type InventoryProductFormOptionsResponse = {
|
|
266
|
+
categories: ProductCategory[];
|
|
267
|
+
financeCategories: TransactionCategory[];
|
|
268
|
+
manufacturers: InventoryManufacturer[];
|
|
269
|
+
owners: InventoryOwner[];
|
|
270
|
+
units: ProductUnit[];
|
|
271
|
+
warehouses: ProductWarehouse[];
|
|
272
|
+
};
|
|
273
|
+
export type InventoryStatisticsResponse = {
|
|
274
|
+
batches: number;
|
|
275
|
+
categories: number;
|
|
276
|
+
inventoryProducts: number;
|
|
277
|
+
products: number;
|
|
278
|
+
promotions: number;
|
|
279
|
+
suppliers: number;
|
|
280
|
+
units: number;
|
|
281
|
+
warehouses: number;
|
|
282
|
+
};
|
|
283
|
+
export type InventoryPublicStorefrontResponse = {
|
|
284
|
+
storefront: InventoryStorefront;
|
|
285
|
+
listings: InventoryStorefrontListing[];
|
|
286
|
+
bundles: InventoryBundle[];
|
|
287
|
+
};
|
|
288
|
+
export type InventoryCheckoutResponse = {
|
|
289
|
+
checkout: InventoryCheckoutSession;
|
|
290
|
+
};
|
|
291
|
+
export declare function listInventoryStorefronts(wsId: string, query?: InventoryStorefrontListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<InventoryStorefront>>;
|
|
292
|
+
export declare function getInventoryStatistics(wsId: string, options?: InternalApiClientOptions): Promise<InventoryStatisticsResponse>;
|
|
293
|
+
export declare function getInventoryOverview(wsId: string, options?: InternalApiClientOptions): Promise<InventoryOverviewResponse>;
|
|
294
|
+
export declare function getInventoryProduct(wsId: string, productId: string, options?: InternalApiClientOptions): Promise<Product>;
|
|
295
|
+
export declare function getInventoryProductFormOptions(wsId: string, options?: InternalApiClientOptions): Promise<InventoryProductFormOptionsResponse>;
|
|
296
|
+
export declare function listInventoryProducts(wsId: string, query?: InventoryCatalogListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<InventoryProductSummary>>;
|
|
297
|
+
export declare function listInventoryProductCategories(wsId: string, query?: InventoryNamedListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<ProductCategory>>;
|
|
298
|
+
export declare function listInventoryWarehouses(wsId: string, query?: InventoryNamedListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<ProductWarehouse>>;
|
|
299
|
+
export declare function listInventorySuppliers(wsId: string, query?: InventoryNamedListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<ProductSupplier>>;
|
|
300
|
+
export declare function listInventoryBatches(wsId: string, query?: InventoryNamedListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<ProductBatch>>;
|
|
301
|
+
export declare function listInventoryPromotions(wsId: string, query?: InventoryNamedListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<ProductPromotion>>;
|
|
302
|
+
export declare function listInventoryManufacturers(wsId: string, options?: InternalApiClientOptions): Promise<{
|
|
303
|
+
data: InventoryManufacturer[];
|
|
304
|
+
}>;
|
|
305
|
+
export declare function listInventoryManufacturersPage(wsId: string, query?: InventoryNamedListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<InventoryManufacturer>>;
|
|
306
|
+
export declare function listInventoryUnits(wsId: string, options?: InternalApiClientOptions): Promise<InventoryUnit[]>;
|
|
307
|
+
export declare function listInventoryUnitsPage(wsId: string, query?: InventoryNamedListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<ProductUnit>>;
|
|
308
|
+
export declare function listInventorySales(wsId: string, query?: InventoryOffsetListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<InventorySaleSummary>>;
|
|
309
|
+
export declare function listInventoryAuditLogs(wsId: string, query?: InventoryOffsetListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<InventoryAuditLogSummary>>;
|
|
310
|
+
export declare function createInventoryStorefront(wsId: string, payload: InventoryStorefrontPayload, options?: InternalApiClientOptions): Promise<{
|
|
311
|
+
data: InventoryStorefront;
|
|
312
|
+
}>;
|
|
313
|
+
export declare function createInventoryManufacturer(wsId: string, payload: InventoryManufacturerPayload, options?: InternalApiClientOptions): Promise<{
|
|
314
|
+
data: InventoryManufacturer;
|
|
315
|
+
}>;
|
|
316
|
+
export declare function createInventoryUnit(wsId: string, payload: InventoryUnitPayload, options?: InternalApiClientOptions): Promise<{
|
|
317
|
+
data: InventoryUnit;
|
|
318
|
+
message: string;
|
|
319
|
+
}>;
|
|
320
|
+
export declare function updateInventoryManufacturer(wsId: string, manufacturerId: string, payload: Partial<InventoryManufacturerPayload>, options?: InternalApiClientOptions): Promise<{
|
|
321
|
+
data: InventoryManufacturer;
|
|
322
|
+
}>;
|
|
323
|
+
export declare function updateInventoryUnit(wsId: string, unitId: string, payload: Partial<InventoryUnitPayload>, options?: InternalApiClientOptions): Promise<{
|
|
324
|
+
data: InventoryUnit;
|
|
325
|
+
message: string;
|
|
326
|
+
}>;
|
|
327
|
+
export declare function deleteInventoryManufacturer(wsId: string, manufacturerId: string, options?: InternalApiClientOptions): Promise<{
|
|
328
|
+
message: string;
|
|
329
|
+
}>;
|
|
330
|
+
export declare function deleteInventoryUnit(wsId: string, unitId: string, options?: InternalApiClientOptions): Promise<{
|
|
331
|
+
message: string;
|
|
332
|
+
}>;
|
|
333
|
+
export declare function updateInventoryStorefront(wsId: string, storefrontId: string, payload: Partial<InventoryStorefrontPayload>, options?: InternalApiClientOptions): Promise<{
|
|
334
|
+
data: InventoryStorefront;
|
|
335
|
+
}>;
|
|
336
|
+
export declare function listInventoryStorefrontListings(wsId: string, storefrontId: string, query?: {
|
|
337
|
+
status?: InventoryListingStatus | 'all';
|
|
338
|
+
}, options?: InternalApiClientOptions): Promise<InventoryListResponse<InventoryStorefrontListing>>;
|
|
339
|
+
export declare function createInventoryStorefrontListing(wsId: string, storefrontId: string, payload: InventoryStorefrontListingPayload, options?: InternalApiClientOptions): Promise<{
|
|
340
|
+
data: InventoryStorefrontListing;
|
|
341
|
+
}>;
|
|
342
|
+
export declare function listInventoryBundles(wsId: string, query?: InventoryBundleListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<InventoryBundle>>;
|
|
343
|
+
export declare function createInventoryBundle(wsId: string, payload: InventoryBundlePayload, options?: InternalApiClientOptions): Promise<{
|
|
344
|
+
data: InventoryBundle;
|
|
345
|
+
}>;
|
|
346
|
+
export declare function updateInventoryBundle(wsId: string, bundleId: string, payload: Partial<InventoryBundlePayload>, options?: InternalApiClientOptions): Promise<{
|
|
347
|
+
data: InventoryBundle;
|
|
348
|
+
}>;
|
|
349
|
+
export declare function listInventoryCheckouts(wsId: string, query?: InventoryCheckoutListQuery, options?: InternalApiClientOptions): Promise<InventoryListResponse<InventoryCheckoutSession>>;
|
|
350
|
+
export declare function getInventoryPublicStorefront(slug: string, options?: InternalApiClientOptions): Promise<InventoryPublicStorefrontResponse>;
|
|
351
|
+
export declare function createInventoryCheckoutSession(slug: string, payload: InventoryCheckoutCreatePayload, options?: InternalApiClientOptions): Promise<InventoryCheckoutResponse>;
|
|
352
|
+
export declare function getInventoryPublicOrder(publicToken: string, options?: InternalApiClientOptions): Promise<{
|
|
353
|
+
order: InventoryCheckoutSession;
|
|
354
|
+
}>;
|
|
355
|
+
//# sourceMappingURL=inventory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inventory.d.ts","sourceRoot":"","sources":["../src/inventory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AAC1F,OAAO,EAGL,KAAK,wBAAwB,EAE9B,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,yBAAyB,GACjC,OAAO,GACP,WAAW,GACX,QAAQ,GACR,UAAU,CAAC;AAEf,MAAM,MAAM,sBAAsB,GAC9B,OAAO,GACP,WAAW,GACX,QAAQ,GACR,UAAU,CAAC;AAEf,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE/E,MAAM,MAAM,uBAAuB,GAC/B,UAAU,GACV,WAAW,GACX,WAAW,GACX,SAAS,CAAC;AAEd,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAA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AAM,EACZ,OAAO,CAAC,EAAE,wBAAwB,8CAMnC;AAED,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,8BAA8B,EACvC,OAAO,CAAC,EAAE,wBAAwB,sCAUnC;AAED,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,wBAAwB;WAGzB,wBAAwB;GAIlC"}
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listInventoryStorefronts = listInventoryStorefronts;
|
|
4
|
+
exports.getInventoryStatistics = getInventoryStatistics;
|
|
5
|
+
exports.getInventoryOverview = getInventoryOverview;
|
|
6
|
+
exports.getInventoryProduct = getInventoryProduct;
|
|
7
|
+
exports.getInventoryProductFormOptions = getInventoryProductFormOptions;
|
|
8
|
+
exports.listInventoryProducts = listInventoryProducts;
|
|
9
|
+
exports.listInventoryProductCategories = listInventoryProductCategories;
|
|
10
|
+
exports.listInventoryWarehouses = listInventoryWarehouses;
|
|
11
|
+
exports.listInventorySuppliers = listInventorySuppliers;
|
|
12
|
+
exports.listInventoryBatches = listInventoryBatches;
|
|
13
|
+
exports.listInventoryPromotions = listInventoryPromotions;
|
|
14
|
+
exports.listInventoryManufacturers = listInventoryManufacturers;
|
|
15
|
+
exports.listInventoryManufacturersPage = listInventoryManufacturersPage;
|
|
16
|
+
exports.listInventoryUnits = listInventoryUnits;
|
|
17
|
+
exports.listInventoryUnitsPage = listInventoryUnitsPage;
|
|
18
|
+
exports.listInventorySales = listInventorySales;
|
|
19
|
+
exports.listInventoryAuditLogs = listInventoryAuditLogs;
|
|
20
|
+
exports.createInventoryStorefront = createInventoryStorefront;
|
|
21
|
+
exports.createInventoryManufacturer = createInventoryManufacturer;
|
|
22
|
+
exports.createInventoryUnit = createInventoryUnit;
|
|
23
|
+
exports.updateInventoryManufacturer = updateInventoryManufacturer;
|
|
24
|
+
exports.updateInventoryUnit = updateInventoryUnit;
|
|
25
|
+
exports.deleteInventoryManufacturer = deleteInventoryManufacturer;
|
|
26
|
+
exports.deleteInventoryUnit = deleteInventoryUnit;
|
|
27
|
+
exports.updateInventoryStorefront = updateInventoryStorefront;
|
|
28
|
+
exports.listInventoryStorefrontListings = listInventoryStorefrontListings;
|
|
29
|
+
exports.createInventoryStorefrontListing = createInventoryStorefrontListing;
|
|
30
|
+
exports.listInventoryBundles = listInventoryBundles;
|
|
31
|
+
exports.createInventoryBundle = createInventoryBundle;
|
|
32
|
+
exports.updateInventoryBundle = updateInventoryBundle;
|
|
33
|
+
exports.listInventoryCheckouts = listInventoryCheckouts;
|
|
34
|
+
exports.getInventoryPublicStorefront = getInventoryPublicStorefront;
|
|
35
|
+
exports.createInventoryCheckoutSession = createInventoryCheckoutSession;
|
|
36
|
+
exports.getInventoryPublicOrder = getInventoryPublicOrder;
|
|
37
|
+
const client_1 = require("./client");
|
|
38
|
+
function workspaceInventoryPath(wsId, suffix) {
|
|
39
|
+
return `/api/v1/workspaces/${(0, client_1.encodePathSegment)(wsId)}/inventory${suffix}`;
|
|
40
|
+
}
|
|
41
|
+
function workspacePath(wsId, suffix) {
|
|
42
|
+
return `/api/v1/workspaces/${(0, client_1.encodePathSegment)(wsId)}${suffix}`;
|
|
43
|
+
}
|
|
44
|
+
function workspaceProductUnitsPath(wsId, suffix = '') {
|
|
45
|
+
return `/api/v1/workspaces/${(0, client_1.encodePathSegment)(wsId)}/product-units${suffix}`;
|
|
46
|
+
}
|
|
47
|
+
function publicStorefrontPath(slug, suffix = '') {
|
|
48
|
+
return `/api/v1/inventory/storefronts/${(0, client_1.encodePathSegment)(slug)}${suffix}`;
|
|
49
|
+
}
|
|
50
|
+
function asQuery(query) {
|
|
51
|
+
if (!query) {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
return Object.fromEntries(Object.entries(query).filter(([, value]) => value !== undefined));
|
|
55
|
+
}
|
|
56
|
+
function jsonHeaders(headers) {
|
|
57
|
+
const nextHeaders = new Headers(headers);
|
|
58
|
+
if (!nextHeaders.has('Content-Type')) {
|
|
59
|
+
nextHeaders.set('Content-Type', 'application/json');
|
|
60
|
+
}
|
|
61
|
+
return nextHeaders;
|
|
62
|
+
}
|
|
63
|
+
function paginatedQuery(query) {
|
|
64
|
+
return asQuery({
|
|
65
|
+
...query,
|
|
66
|
+
response: 'paginated',
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function listInventoryStorefronts(wsId, query, options) {
|
|
70
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceInventoryPath(wsId, '/storefronts'), {
|
|
71
|
+
cache: 'no-store',
|
|
72
|
+
query: asQuery(query),
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function getInventoryStatistics(wsId, options) {
|
|
76
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceInventoryPath(wsId, '/statistics'), { cache: 'no-store' });
|
|
77
|
+
}
|
|
78
|
+
function getInventoryOverview(wsId, options) {
|
|
79
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceInventoryPath(wsId, '/overview'), { cache: 'no-store' });
|
|
80
|
+
}
|
|
81
|
+
function getInventoryProduct(wsId, productId, options) {
|
|
82
|
+
return (0, client_1.getInternalApiClient)(options).json(workspacePath(wsId, `/products/${(0, client_1.encodePathSegment)(productId)}`), { cache: 'no-store' });
|
|
83
|
+
}
|
|
84
|
+
function getInventoryProductFormOptions(wsId, options) {
|
|
85
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceInventoryPath(wsId, '/product-form-options'), { cache: 'no-store' });
|
|
86
|
+
}
|
|
87
|
+
function listInventoryProducts(wsId, query, options) {
|
|
88
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceInventoryPath(wsId, '/products'), {
|
|
89
|
+
cache: 'no-store',
|
|
90
|
+
query: asQuery(query),
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
function listInventoryProductCategories(wsId, query, options) {
|
|
94
|
+
return (0, client_1.getInternalApiClient)(options).json(workspacePath(wsId, '/product-categories'), {
|
|
95
|
+
cache: 'no-store',
|
|
96
|
+
query: paginatedQuery(query),
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function listInventoryWarehouses(wsId, query, options) {
|
|
100
|
+
return (0, client_1.getInternalApiClient)(options).json(workspacePath(wsId, '/product-warehouses'), {
|
|
101
|
+
cache: 'no-store',
|
|
102
|
+
query: paginatedQuery(query),
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
function listInventorySuppliers(wsId, query, options) {
|
|
106
|
+
return (0, client_1.getInternalApiClient)(options).json(workspacePath(wsId, '/product-suppliers'), {
|
|
107
|
+
cache: 'no-store',
|
|
108
|
+
query: paginatedQuery(query),
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
function listInventoryBatches(wsId, query, options) {
|
|
112
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceInventoryPath(wsId, '/batches'), {
|
|
113
|
+
cache: 'no-store',
|
|
114
|
+
query: paginatedQuery(query),
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
function listInventoryPromotions(wsId, query, options) {
|
|
118
|
+
return (0, client_1.getInternalApiClient)(options).json(workspacePath(wsId, '/promotions'), {
|
|
119
|
+
cache: 'no-store',
|
|
120
|
+
query: asQuery({
|
|
121
|
+
...query,
|
|
122
|
+
inventoryOnly: true,
|
|
123
|
+
response: 'paginated',
|
|
124
|
+
}),
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
function listInventoryManufacturers(wsId, options) {
|
|
128
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceInventoryPath(wsId, '/manufacturers'), {
|
|
129
|
+
cache: 'no-store',
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
function listInventoryManufacturersPage(wsId, query, options) {
|
|
133
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceInventoryPath(wsId, '/manufacturers'), {
|
|
134
|
+
cache: 'no-store',
|
|
135
|
+
query: paginatedQuery(query),
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
function listInventoryUnits(wsId, options) {
|
|
139
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceProductUnitsPath(wsId), {
|
|
140
|
+
cache: 'no-store',
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
function listInventoryUnitsPage(wsId, query, options) {
|
|
144
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceProductUnitsPath(wsId), {
|
|
145
|
+
cache: 'no-store',
|
|
146
|
+
query: paginatedQuery(query),
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
function listInventorySales(wsId, query, options) {
|
|
150
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceInventoryPath(wsId, '/sales'), {
|
|
151
|
+
cache: 'no-store',
|
|
152
|
+
query: asQuery(query),
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
function listInventoryAuditLogs(wsId, query, options) {
|
|
156
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceInventoryPath(wsId, '/audit-logs'), {
|
|
157
|
+
cache: 'no-store',
|
|
158
|
+
query: asQuery(query),
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
function createInventoryStorefront(wsId, payload, options) {
|
|
162
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceInventoryPath(wsId, '/storefronts'), {
|
|
163
|
+
body: JSON.stringify(payload),
|
|
164
|
+
headers: jsonHeaders(options?.defaultHeaders),
|
|
165
|
+
method: 'POST',
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
function createInventoryManufacturer(wsId, payload, options) {
|
|
169
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceInventoryPath(wsId, '/manufacturers'), {
|
|
170
|
+
body: JSON.stringify(payload),
|
|
171
|
+
headers: jsonHeaders(options?.defaultHeaders),
|
|
172
|
+
method: 'POST',
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
function createInventoryUnit(wsId, payload, options) {
|
|
176
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceProductUnitsPath(wsId), {
|
|
177
|
+
body: JSON.stringify(payload),
|
|
178
|
+
headers: jsonHeaders(options?.defaultHeaders),
|
|
179
|
+
method: 'POST',
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
function updateInventoryManufacturer(wsId, manufacturerId, payload, options) {
|
|
183
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceInventoryPath(wsId, `/manufacturers/${(0, client_1.encodePathSegment)(manufacturerId)}`), {
|
|
184
|
+
body: JSON.stringify(payload),
|
|
185
|
+
headers: jsonHeaders(options?.defaultHeaders),
|
|
186
|
+
method: 'PATCH',
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
function updateInventoryUnit(wsId, unitId, payload, options) {
|
|
190
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceProductUnitsPath(wsId, `/${(0, client_1.encodePathSegment)(unitId)}`), {
|
|
191
|
+
body: JSON.stringify(payload),
|
|
192
|
+
headers: jsonHeaders(options?.defaultHeaders),
|
|
193
|
+
method: 'PUT',
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
function deleteInventoryManufacturer(wsId, manufacturerId, options) {
|
|
197
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceInventoryPath(wsId, `/manufacturers/${(0, client_1.encodePathSegment)(manufacturerId)}`), {
|
|
198
|
+
headers: options?.defaultHeaders,
|
|
199
|
+
method: 'DELETE',
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
function deleteInventoryUnit(wsId, unitId, options) {
|
|
203
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceProductUnitsPath(wsId, `/${(0, client_1.encodePathSegment)(unitId)}`), {
|
|
204
|
+
headers: options?.defaultHeaders,
|
|
205
|
+
method: 'DELETE',
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
function updateInventoryStorefront(wsId, storefrontId, payload, options) {
|
|
209
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceInventoryPath(wsId, `/storefronts/${(0, client_1.encodePathSegment)(storefrontId)}`), {
|
|
210
|
+
body: JSON.stringify(payload),
|
|
211
|
+
headers: jsonHeaders(options?.defaultHeaders),
|
|
212
|
+
method: 'PATCH',
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
function listInventoryStorefrontListings(wsId, storefrontId, query, options) {
|
|
216
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceInventoryPath(wsId, `/storefronts/${(0, client_1.encodePathSegment)(storefrontId)}/listings`), {
|
|
217
|
+
cache: 'no-store',
|
|
218
|
+
query: asQuery(query),
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
function createInventoryStorefrontListing(wsId, storefrontId, payload, options) {
|
|
222
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceInventoryPath(wsId, `/storefronts/${(0, client_1.encodePathSegment)(storefrontId)}/listings`), {
|
|
223
|
+
body: JSON.stringify(payload),
|
|
224
|
+
headers: jsonHeaders(options?.defaultHeaders),
|
|
225
|
+
method: 'POST',
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
function listInventoryBundles(wsId, query, options) {
|
|
229
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceInventoryPath(wsId, '/bundles'), {
|
|
230
|
+
cache: 'no-store',
|
|
231
|
+
query: asQuery(query),
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
function createInventoryBundle(wsId, payload, options) {
|
|
235
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceInventoryPath(wsId, '/bundles'), {
|
|
236
|
+
body: JSON.stringify(payload),
|
|
237
|
+
headers: jsonHeaders(options?.defaultHeaders),
|
|
238
|
+
method: 'POST',
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
function updateInventoryBundle(wsId, bundleId, payload, options) {
|
|
242
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceInventoryPath(wsId, `/bundles/${(0, client_1.encodePathSegment)(bundleId)}`), {
|
|
243
|
+
body: JSON.stringify(payload),
|
|
244
|
+
headers: jsonHeaders(options?.defaultHeaders),
|
|
245
|
+
method: 'PATCH',
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
function listInventoryCheckouts(wsId, query, options) {
|
|
249
|
+
return (0, client_1.getInternalApiClient)(options).json(workspaceInventoryPath(wsId, '/checkouts'), {
|
|
250
|
+
cache: 'no-store',
|
|
251
|
+
query: asQuery(query),
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
function getInventoryPublicStorefront(slug, options) {
|
|
255
|
+
return (0, client_1.getInternalApiClient)(options).json(publicStorefrontPath(slug), { cache: 'no-store' });
|
|
256
|
+
}
|
|
257
|
+
function createInventoryCheckoutSession(slug, payload, options) {
|
|
258
|
+
return (0, client_1.getInternalApiClient)(options).json(publicStorefrontPath(slug, '/checkouts'), {
|
|
259
|
+
body: JSON.stringify(payload),
|
|
260
|
+
headers: jsonHeaders(options?.defaultHeaders),
|
|
261
|
+
method: 'POST',
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
function getInventoryPublicOrder(publicToken, options) {
|
|
265
|
+
return (0, client_1.getInternalApiClient)(options).json(`/api/v1/inventory/orders/${(0, client_1.encodePathSegment)(publicToken)}`, {
|
|
266
|
+
cache: 'no-store',
|
|
267
|
+
});
|
|
268
|
+
}
|