feeef 0.5.38-dev.4 → 0.6.2
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/build/index.js +1222 -40
- package/build/index.js.map +1 -1
- package/build/src/core/entities/category.d.ts +21 -0
- package/build/src/core/entities/feedback.d.ts +100 -0
- package/build/src/core/entities/order.d.ts +93 -0
- package/build/src/core/entities/product.d.ts +76 -0
- package/build/src/core/entities/shipping_method.d.ts +28 -0
- package/build/src/core/entities/shipping_price.d.ts +19 -0
- package/build/src/core/entities/store.d.ts +105 -0
- package/build/src/feeef/feeef.d.ts +28 -1
- package/build/src/feeef/repositories/categories.d.ts +43 -3
- package/build/src/feeef/repositories/deposits.d.ts +67 -4
- package/build/src/feeef/repositories/feedbacks.d.ts +43 -0
- package/build/src/feeef/repositories/orders.d.ts +69 -13
- package/build/src/feeef/repositories/products.d.ts +43 -5
- package/build/src/feeef/repositories/repository.d.ts +6 -2
- package/build/src/feeef/repositories/shipping_methods.d.ts +38 -0
- package/build/src/feeef/repositories/shipping_prices.d.ts +19 -8
- package/build/src/feeef/repositories/stores.d.ts +90 -7
- package/build/src/feeef/repositories/transfers.d.ts +61 -4
- package/build/src/feeef/services/integrations.d.ts +330 -0
- package/build/src/feeef/services/notifications.d.ts +68 -0
- package/build/src/feeef/services/storage.d.ts +134 -0
- package/build/src/index.d.ts +17 -2
- package/package.json +1 -1
|
@@ -11,3 +11,24 @@ export interface CategoryEntity {
|
|
|
11
11
|
createdAt: any;
|
|
12
12
|
updatedAt: any;
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Input data for creating a new category
|
|
16
|
+
*/
|
|
17
|
+
export interface CategoryCreateInput {
|
|
18
|
+
name: string;
|
|
19
|
+
storeId: string;
|
|
20
|
+
parentId?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
photoUrl?: string;
|
|
23
|
+
metadata?: Record<string, any>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Input data for updating an existing category
|
|
27
|
+
*/
|
|
28
|
+
export interface CategoryUpdateInput {
|
|
29
|
+
name?: string;
|
|
30
|
+
parentId?: string | null;
|
|
31
|
+
description?: string;
|
|
32
|
+
photoUrl?: string;
|
|
33
|
+
metadata?: Record<string, any>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feedback status enum
|
|
3
|
+
*/
|
|
4
|
+
export declare enum FeedbackStatus {
|
|
5
|
+
open = "open",
|
|
6
|
+
inProgress = "in_progress",
|
|
7
|
+
resolved = "resolved",
|
|
8
|
+
closed = "closed"
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Feedback priority enum
|
|
12
|
+
*/
|
|
13
|
+
export declare enum FeedbackPriority {
|
|
14
|
+
low = "low",
|
|
15
|
+
medium = "medium",
|
|
16
|
+
high = "high",
|
|
17
|
+
critical = "critical"
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Feedback comment interface
|
|
21
|
+
*/
|
|
22
|
+
export interface FeedbackComment {
|
|
23
|
+
id: string;
|
|
24
|
+
userId: string;
|
|
25
|
+
comment: string;
|
|
26
|
+
createdAt: any;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Feedback attachment interface
|
|
30
|
+
*/
|
|
31
|
+
export interface FeedbackAttachment {
|
|
32
|
+
url: string;
|
|
33
|
+
name: string;
|
|
34
|
+
type: string;
|
|
35
|
+
size?: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Feedback entity interface
|
|
39
|
+
*/
|
|
40
|
+
export interface FeedbackEntity {
|
|
41
|
+
id: string;
|
|
42
|
+
userId: string;
|
|
43
|
+
title: string;
|
|
44
|
+
details: string | null;
|
|
45
|
+
status: FeedbackStatus;
|
|
46
|
+
priority: FeedbackPriority;
|
|
47
|
+
tags: string[];
|
|
48
|
+
attachments: FeedbackAttachment[];
|
|
49
|
+
comments: FeedbackComment[];
|
|
50
|
+
appVersion: string | null;
|
|
51
|
+
metadata: Record<string, any>;
|
|
52
|
+
resolvedAt: any | null;
|
|
53
|
+
createdAt: any;
|
|
54
|
+
updatedAt: any;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Input data for creating a new feedback
|
|
58
|
+
*/
|
|
59
|
+
export interface FeedbackCreateInput {
|
|
60
|
+
title: string;
|
|
61
|
+
details?: string;
|
|
62
|
+
priority?: FeedbackPriority;
|
|
63
|
+
tags?: string[];
|
|
64
|
+
attachments?: FeedbackAttachment[];
|
|
65
|
+
appVersion?: string;
|
|
66
|
+
metadata?: Record<string, any>;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Input data for updating an existing feedback
|
|
70
|
+
*/
|
|
71
|
+
export interface FeedbackUpdateInput {
|
|
72
|
+
title?: string;
|
|
73
|
+
details?: string;
|
|
74
|
+
status?: FeedbackStatus;
|
|
75
|
+
priority?: FeedbackPriority;
|
|
76
|
+
tags?: string[];
|
|
77
|
+
attachments?: FeedbackAttachment[];
|
|
78
|
+
appVersion?: string;
|
|
79
|
+
metadata?: Record<string, any>;
|
|
80
|
+
comment?: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Options for listing feedbacks
|
|
84
|
+
*/
|
|
85
|
+
export interface FeedbackListOptions {
|
|
86
|
+
page?: number;
|
|
87
|
+
offset?: number;
|
|
88
|
+
limit?: number;
|
|
89
|
+
status?: FeedbackStatus[];
|
|
90
|
+
priority?: FeedbackPriority[];
|
|
91
|
+
tags?: string[];
|
|
92
|
+
q?: string;
|
|
93
|
+
createdAfter?: Date | string;
|
|
94
|
+
createdBefore?: Date | string;
|
|
95
|
+
updatedAfter?: Date | string;
|
|
96
|
+
updatedBefore?: Date | string;
|
|
97
|
+
resolvedAfter?: Date | string;
|
|
98
|
+
resolvedBefore?: Date | string;
|
|
99
|
+
resolved?: boolean;
|
|
100
|
+
}
|
|
@@ -106,4 +106,97 @@ interface OrderMetadata {
|
|
|
106
106
|
[key: string]: any;
|
|
107
107
|
}
|
|
108
108
|
export declare const convertOrderEntityToOrderTrackEntity: (order: OrderEntity) => OrderTrackEntity;
|
|
109
|
+
/**
|
|
110
|
+
* Input for creating a new order (admin/merchant)
|
|
111
|
+
*/
|
|
112
|
+
export interface OrderCreateInput {
|
|
113
|
+
id?: string;
|
|
114
|
+
customerName?: string;
|
|
115
|
+
customerPhone: string;
|
|
116
|
+
customerEmail?: string;
|
|
117
|
+
customerNote?: string;
|
|
118
|
+
shippingAddress?: string;
|
|
119
|
+
shippingCity?: string;
|
|
120
|
+
shippingState?: string;
|
|
121
|
+
shippingCountry?: string;
|
|
122
|
+
shippingType: ShippingType;
|
|
123
|
+
shippingMethodId?: string;
|
|
124
|
+
paymentMethodId?: string;
|
|
125
|
+
items: OrderItemInput[];
|
|
126
|
+
coupon?: string;
|
|
127
|
+
couponId?: string;
|
|
128
|
+
source?: string;
|
|
129
|
+
status?: OrderStatus;
|
|
130
|
+
paymentStatus?: PaymentStatus;
|
|
131
|
+
deliveryStatus?: DeliveryStatus;
|
|
132
|
+
customStatus?: string;
|
|
133
|
+
customFields?: Record<string, any>;
|
|
134
|
+
metadata?: Record<string, any>;
|
|
135
|
+
storeId: string;
|
|
136
|
+
tags?: string[];
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Input for order items when creating/updating an order
|
|
140
|
+
*/
|
|
141
|
+
export interface OrderItemInput {
|
|
142
|
+
productId: string;
|
|
143
|
+
quantity: number;
|
|
144
|
+
variantPath?: string;
|
|
145
|
+
offerCode?: string;
|
|
146
|
+
addons?: Record<string, number>;
|
|
147
|
+
price?: number;
|
|
148
|
+
discount?: number;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Input data for updating an existing order
|
|
152
|
+
*/
|
|
153
|
+
export interface OrderUpdateInput {
|
|
154
|
+
customerName?: string;
|
|
155
|
+
customerPhone?: string;
|
|
156
|
+
customerEmail?: string;
|
|
157
|
+
customerNote?: string;
|
|
158
|
+
shippingAddress?: string;
|
|
159
|
+
shippingCity?: string;
|
|
160
|
+
shippingState?: string;
|
|
161
|
+
shippingCountry?: string;
|
|
162
|
+
shippingType?: ShippingType;
|
|
163
|
+
shippingMethodId?: string;
|
|
164
|
+
trackingCode?: string;
|
|
165
|
+
paymentMethodId?: string;
|
|
166
|
+
items?: OrderItemInput[];
|
|
167
|
+
subtotal?: number;
|
|
168
|
+
shippingPrice?: number;
|
|
169
|
+
total?: number;
|
|
170
|
+
discount?: number;
|
|
171
|
+
coupon?: string;
|
|
172
|
+
couponId?: string;
|
|
173
|
+
source?: string;
|
|
174
|
+
confirmerId?: string;
|
|
175
|
+
status?: OrderStatus;
|
|
176
|
+
paymentStatus?: PaymentStatus;
|
|
177
|
+
deliveryStatus?: DeliveryStatus;
|
|
178
|
+
customStatus?: string;
|
|
179
|
+
customFields?: Record<string, any>;
|
|
180
|
+
metadata?: Record<string, any>;
|
|
181
|
+
tags?: string[];
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Order pricing calculation result
|
|
185
|
+
*/
|
|
186
|
+
export interface OrderPricing {
|
|
187
|
+
subtotal: number;
|
|
188
|
+
shippingPrice: number | null;
|
|
189
|
+
calculatedTotal: number;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Options for calculating order pricing
|
|
193
|
+
*/
|
|
194
|
+
export interface CalculateOrderPricingOptions {
|
|
195
|
+
storeId: string;
|
|
196
|
+
items: OrderItemInput[];
|
|
197
|
+
shippingState?: string;
|
|
198
|
+
shippingCountry?: string;
|
|
199
|
+
shippingType?: ShippingType;
|
|
200
|
+
shippingAddress?: string;
|
|
201
|
+
}
|
|
109
202
|
export {};
|
|
@@ -176,3 +176,79 @@ export interface ProductOffer {
|
|
|
176
176
|
maxQuantity?: number;
|
|
177
177
|
freeShipping?: boolean;
|
|
178
178
|
}
|
|
179
|
+
/**
|
|
180
|
+
* Input data for creating a new product
|
|
181
|
+
*/
|
|
182
|
+
export interface ProductCreateInput {
|
|
183
|
+
name: string;
|
|
184
|
+
storeId: string;
|
|
185
|
+
slug?: string;
|
|
186
|
+
photoUrl?: string;
|
|
187
|
+
media?: string[];
|
|
188
|
+
shippingMethodId?: string;
|
|
189
|
+
shippingPriceId?: string;
|
|
190
|
+
categoryId?: string;
|
|
191
|
+
category?: EmbaddedCategory;
|
|
192
|
+
title?: string;
|
|
193
|
+
description?: string;
|
|
194
|
+
body?: string;
|
|
195
|
+
sku?: string;
|
|
196
|
+
price: number;
|
|
197
|
+
cost?: number;
|
|
198
|
+
discount?: number;
|
|
199
|
+
stock?: number;
|
|
200
|
+
variant?: ProductVariant;
|
|
201
|
+
offers?: ProductOffer[];
|
|
202
|
+
addons?: ProductAddon[];
|
|
203
|
+
metadata?: Record<string, any>;
|
|
204
|
+
status?: ProductStatus;
|
|
205
|
+
type?: ProductType;
|
|
206
|
+
decoration?: ProductDecoration;
|
|
207
|
+
integrationsData?: IntegrationsData;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Input data for updating an existing product
|
|
211
|
+
*/
|
|
212
|
+
export interface ProductUpdateInput {
|
|
213
|
+
name?: string;
|
|
214
|
+
slug?: string;
|
|
215
|
+
photoUrl?: string;
|
|
216
|
+
media?: string[];
|
|
217
|
+
shippingMethodId?: string;
|
|
218
|
+
shippingPriceId?: string;
|
|
219
|
+
categoryId?: string;
|
|
220
|
+
category?: EmbaddedCategory;
|
|
221
|
+
title?: string;
|
|
222
|
+
description?: string;
|
|
223
|
+
body?: string;
|
|
224
|
+
sku?: string;
|
|
225
|
+
price?: number;
|
|
226
|
+
cost?: number;
|
|
227
|
+
discount?: number;
|
|
228
|
+
stock?: number;
|
|
229
|
+
variant?: ProductVariant;
|
|
230
|
+
offers?: ProductOffer[];
|
|
231
|
+
addons?: ProductAddon[];
|
|
232
|
+
metadata?: Record<string, any>;
|
|
233
|
+
status?: ProductStatus;
|
|
234
|
+
type?: ProductType;
|
|
235
|
+
decoration?: ProductDecoration;
|
|
236
|
+
integrationsData?: IntegrationsData;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Product report/analytics data
|
|
240
|
+
*/
|
|
241
|
+
export interface ProductReport {
|
|
242
|
+
views: number;
|
|
243
|
+
likes: number;
|
|
244
|
+
dislikes: number;
|
|
245
|
+
sold: number;
|
|
246
|
+
revenue: number;
|
|
247
|
+
conversionRate: number;
|
|
248
|
+
averageOrderValue: number;
|
|
249
|
+
topVariants?: Array<{
|
|
250
|
+
path: string;
|
|
251
|
+
sold: number;
|
|
252
|
+
}>;
|
|
253
|
+
salesByDate?: Record<string, number>;
|
|
254
|
+
}
|
|
@@ -27,3 +27,31 @@ export declare enum ShippingMethodPolicy {
|
|
|
27
27
|
private = "private",
|
|
28
28
|
public = "public"
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Input data for creating a new shipping method
|
|
32
|
+
*/
|
|
33
|
+
export interface ShippingMethodCreateInput {
|
|
34
|
+
name: string;
|
|
35
|
+
storeId: string;
|
|
36
|
+
description?: string;
|
|
37
|
+
logoUrl?: string;
|
|
38
|
+
ondarkLogoUrl?: string;
|
|
39
|
+
price?: number;
|
|
40
|
+
rates?: (number | null)[][] | null;
|
|
41
|
+
status?: ShippingMethodStatus;
|
|
42
|
+
policy?: ShippingMethodPolicy;
|
|
43
|
+
sourceId?: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Input data for updating an existing shipping method
|
|
47
|
+
*/
|
|
48
|
+
export interface ShippingMethodUpdateInput {
|
|
49
|
+
name?: string;
|
|
50
|
+
description?: string;
|
|
51
|
+
logoUrl?: string;
|
|
52
|
+
ondarkLogoUrl?: string;
|
|
53
|
+
price?: number;
|
|
54
|
+
rates?: (number | null)[][] | null;
|
|
55
|
+
status?: ShippingMethodStatus;
|
|
56
|
+
policy?: ShippingMethodPolicy;
|
|
57
|
+
}
|
|
@@ -118,3 +118,22 @@ export declare function getAvailableShippingTypes(prices: ShippingPriceRates, co
|
|
|
118
118
|
type: ShippingPriceType;
|
|
119
119
|
price: number;
|
|
120
120
|
}>;
|
|
121
|
+
/**
|
|
122
|
+
* Input data for creating a new shipping price
|
|
123
|
+
*/
|
|
124
|
+
export interface ShippingPriceCreateInput {
|
|
125
|
+
name: string;
|
|
126
|
+
storeId: string;
|
|
127
|
+
logoUrl?: string;
|
|
128
|
+
prices: ShippingPriceRates;
|
|
129
|
+
status?: ShippingPriceStatus;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Input data for updating an existing shipping price
|
|
133
|
+
*/
|
|
134
|
+
export interface ShippingPriceUpdateInput {
|
|
135
|
+
name?: string;
|
|
136
|
+
logoUrl?: string;
|
|
137
|
+
prices?: ShippingPriceRates;
|
|
138
|
+
status?: ShippingPriceStatus;
|
|
139
|
+
}
|
|
@@ -46,6 +46,11 @@ export interface StoreEntity {
|
|
|
46
46
|
}
|
|
47
47
|
export declare const generatePublicStoreIntegrations: (integrations: StoreIntegrations | null | undefined) => PublicStoreIntegrations | null;
|
|
48
48
|
export declare const generatePublicStoreIntegrationCustomFields: (customFields: any | null | undefined) => PublicCustomFieldsIntegration | null | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Generates public Meta Pixel integration data from private integration data.
|
|
51
|
+
* Only exposes non-sensitive information (pixel IDs, active status, objectives).
|
|
52
|
+
* Sensitive data like oauth2 tokens, pixel API keys, and metadata are NOT exposed.
|
|
53
|
+
*/
|
|
49
54
|
export declare const generatePublicStoreIntegrationMetaPixel: (metaPixel: MetaPixelIntegration | null | undefined) => PublicMetaPixelIntegration | null | undefined;
|
|
50
55
|
export declare const generatePublicStoreIntegrationTiktokPixel: (tiktokPixel: TiktokPixelIntegration | null | undefined) => PublicTiktokPixelIntegration | null | undefined;
|
|
51
56
|
export declare const generatePublicStoreIntegrationGoogleAnalytics: (googleAnalytics: GoogleAnalyticsIntegration | null | undefined) => PublicGoogleAnalyticsIntegration | null | undefined;
|
|
@@ -259,6 +264,17 @@ export interface MetaPixel {
|
|
|
259
264
|
id: string;
|
|
260
265
|
key?: string;
|
|
261
266
|
}
|
|
267
|
+
/**
|
|
268
|
+
* Facebook Marketing OAuth data
|
|
269
|
+
* Used for accessing Facebook Marketing API (pixels, ads, etc.)
|
|
270
|
+
*/
|
|
271
|
+
export interface FacebookMarketingOAuth {
|
|
272
|
+
accessToken: string;
|
|
273
|
+
tokenType?: string;
|
|
274
|
+
expiresIn?: number;
|
|
275
|
+
expiresAt?: string;
|
|
276
|
+
scopes?: string[];
|
|
277
|
+
}
|
|
262
278
|
export interface TiktokPixel {
|
|
263
279
|
name?: string;
|
|
264
280
|
id: string;
|
|
@@ -271,6 +287,8 @@ export interface MetaPixelIntegration {
|
|
|
271
287
|
draftObjective?: MetaPixelEvent | null;
|
|
272
288
|
active: boolean;
|
|
273
289
|
metadata: Record<string, any>;
|
|
290
|
+
/** Facebook Marketing OAuth data - for accessing pixels via API */
|
|
291
|
+
oauth2?: FacebookMarketingOAuth | null;
|
|
274
292
|
}
|
|
275
293
|
export interface TiktokPixelIntegration {
|
|
276
294
|
id: string;
|
|
@@ -478,3 +496,90 @@ export interface StoreSubscription {
|
|
|
478
496
|
remaining: number;
|
|
479
497
|
metadata: Record<string, any>;
|
|
480
498
|
}
|
|
499
|
+
/**
|
|
500
|
+
* Input data for creating a new store
|
|
501
|
+
*/
|
|
502
|
+
export interface StoreCreateInput {
|
|
503
|
+
name: string;
|
|
504
|
+
slug?: string;
|
|
505
|
+
title?: string;
|
|
506
|
+
description?: string;
|
|
507
|
+
iconUrl?: string;
|
|
508
|
+
logoUrl?: string;
|
|
509
|
+
ondarkLogoUrl?: string;
|
|
510
|
+
categories?: EmbaddedCategory[];
|
|
511
|
+
addresses?: EmbaddedAddress[];
|
|
512
|
+
contacts?: EmbaddedContact[];
|
|
513
|
+
decoration?: StoreDecoration;
|
|
514
|
+
domain?: StoreDomain;
|
|
515
|
+
banner?: StoreBanner;
|
|
516
|
+
action?: StoreAction;
|
|
517
|
+
metadata?: Record<string, any>;
|
|
518
|
+
defaultShippingRates?: (number | null)[][] | null;
|
|
519
|
+
shippingPriceId?: string;
|
|
520
|
+
configs?: StoreConfigs;
|
|
521
|
+
metaPixelIds?: string[];
|
|
522
|
+
tiktokPixelIds?: string[];
|
|
523
|
+
googleAnalyticsId?: string;
|
|
524
|
+
googleTagsId?: string;
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* Input data for updating an existing store
|
|
528
|
+
*/
|
|
529
|
+
export interface StoreUpdateInput {
|
|
530
|
+
name?: string;
|
|
531
|
+
slug?: string;
|
|
532
|
+
title?: string;
|
|
533
|
+
description?: string;
|
|
534
|
+
iconUrl?: string;
|
|
535
|
+
logoUrl?: string;
|
|
536
|
+
ondarkLogoUrl?: string;
|
|
537
|
+
categories?: EmbaddedCategory[];
|
|
538
|
+
addresses?: EmbaddedAddress[];
|
|
539
|
+
contacts?: EmbaddedContact[];
|
|
540
|
+
decoration?: StoreDecoration;
|
|
541
|
+
domain?: StoreDomain;
|
|
542
|
+
banner?: StoreBanner;
|
|
543
|
+
action?: StoreAction;
|
|
544
|
+
metadata?: Record<string, any>;
|
|
545
|
+
defaultShippingRates?: (number | null)[][] | null;
|
|
546
|
+
shippingPriceId?: string;
|
|
547
|
+
configs?: StoreConfigs;
|
|
548
|
+
metaPixelIds?: string[];
|
|
549
|
+
tiktokPixelIds?: string[];
|
|
550
|
+
googleAnalyticsId?: string;
|
|
551
|
+
googleTagsId?: string;
|
|
552
|
+
integrations?: StoreIntegrations;
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Store summary data
|
|
556
|
+
*/
|
|
557
|
+
export interface StoreSummary {
|
|
558
|
+
ordersCount: number;
|
|
559
|
+
productsCount: number;
|
|
560
|
+
revenue: number;
|
|
561
|
+
topProducts?: Array<{
|
|
562
|
+
id: string;
|
|
563
|
+
name: string;
|
|
564
|
+
sold: number;
|
|
565
|
+
}>;
|
|
566
|
+
ordersByStatus?: Record<string, number>;
|
|
567
|
+
recentOrders?: any[];
|
|
568
|
+
}
|
|
569
|
+
/**
|
|
570
|
+
* Input for adding a store member
|
|
571
|
+
*/
|
|
572
|
+
export interface AddStoreMemberInput {
|
|
573
|
+
email: string;
|
|
574
|
+
role: StoreMemberRole;
|
|
575
|
+
name?: string;
|
|
576
|
+
metadata?: Record<string, any>;
|
|
577
|
+
}
|
|
578
|
+
/**
|
|
579
|
+
* Input for updating a store member
|
|
580
|
+
*/
|
|
581
|
+
export interface UpdateStoreMemberInput {
|
|
582
|
+
role?: StoreMemberRole;
|
|
583
|
+
name?: string;
|
|
584
|
+
metadata?: Record<string, any>;
|
|
585
|
+
}
|
|
@@ -11,8 +11,13 @@ import { StateRepository } from './repositories/states.js';
|
|
|
11
11
|
import { CityRepository } from './repositories/cities.js';
|
|
12
12
|
import { CurrencyRepository } from './repositories/currencies.js';
|
|
13
13
|
import { ShippingPriceRepository } from './repositories/shipping_prices.js';
|
|
14
|
+
import { ShippingMethodRepository } from './repositories/shipping_methods.js';
|
|
15
|
+
import { FeedbackRepository } from './repositories/feedbacks.js';
|
|
14
16
|
import { CartService } from './services/cart.js';
|
|
15
17
|
import { ActionsService } from './services/actions.js';
|
|
18
|
+
import { NotificationsService } from './services/notifications.js';
|
|
19
|
+
import { StorageService } from './services/storage.js';
|
|
20
|
+
import { IntegrationFactory } from './services/integrations.js';
|
|
16
21
|
/**
|
|
17
22
|
* Configuration options for the FeeeF module.
|
|
18
23
|
*/
|
|
@@ -97,6 +102,14 @@ export declare class FeeeF {
|
|
|
97
102
|
* The repository for managing shipping prices.
|
|
98
103
|
*/
|
|
99
104
|
shippingPrices: ShippingPriceRepository;
|
|
105
|
+
/**
|
|
106
|
+
* The repository for managing shipping methods.
|
|
107
|
+
*/
|
|
108
|
+
shippingMethods: ShippingMethodRepository;
|
|
109
|
+
/**
|
|
110
|
+
* The repository for managing feedbacks.
|
|
111
|
+
*/
|
|
112
|
+
feedbacks: FeedbackRepository;
|
|
100
113
|
/**
|
|
101
114
|
* The cart service for managing the cart.
|
|
102
115
|
*/
|
|
@@ -105,6 +118,18 @@ export declare class FeeeF {
|
|
|
105
118
|
* The actions service for performing various actions (file uploads, etc.)
|
|
106
119
|
*/
|
|
107
120
|
actions: ActionsService;
|
|
121
|
+
/**
|
|
122
|
+
* The notifications service for sending push notifications
|
|
123
|
+
*/
|
|
124
|
+
notifications: NotificationsService;
|
|
125
|
+
/**
|
|
126
|
+
* The storage service for uploading files
|
|
127
|
+
*/
|
|
128
|
+
storage: StorageService;
|
|
129
|
+
/**
|
|
130
|
+
* The integration factory for creating integration API instances
|
|
131
|
+
*/
|
|
132
|
+
integrations: IntegrationFactory;
|
|
108
133
|
/**
|
|
109
134
|
* Constructs a new instance of the FeeeF class.
|
|
110
135
|
* @param {FeeeFConfig} config - The configuration object.
|
|
@@ -114,7 +139,9 @@ export declare class FeeeF {
|
|
|
114
139
|
*/
|
|
115
140
|
constructor({ apiKey, client, cache, baseURL }: FeeeFConfig);
|
|
116
141
|
/**
|
|
117
|
-
*
|
|
142
|
+
* Sets a header for all requests
|
|
143
|
+
* @param {string} key - The header key.
|
|
144
|
+
* @param {string} value - The header value.
|
|
118
145
|
*/
|
|
119
146
|
setHeader(key: string, value: string): void;
|
|
120
147
|
/**
|
|
@@ -1,13 +1,53 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
|
-
import { ModelRepository } from './repository.js';
|
|
3
|
-
import { CategoryEntity } from '../../core/entities/category.js';
|
|
2
|
+
import { ModelRepository, ListResponse } from './repository.js';
|
|
3
|
+
import { CategoryEntity, CategoryCreateInput, CategoryUpdateInput } from '../../core/entities/category.js';
|
|
4
|
+
/**
|
|
5
|
+
* Options for listing categories
|
|
6
|
+
*/
|
|
7
|
+
export interface CategoryListOptions {
|
|
8
|
+
page?: number;
|
|
9
|
+
offset?: number;
|
|
10
|
+
limit?: number;
|
|
11
|
+
storeId?: string;
|
|
12
|
+
parentId?: string | null;
|
|
13
|
+
q?: string;
|
|
14
|
+
params?: Record<string, any>;
|
|
15
|
+
}
|
|
4
16
|
/**
|
|
5
17
|
* Represents a repository for managing categories.
|
|
6
18
|
*/
|
|
7
|
-
export declare class CategoryRepository extends ModelRepository<CategoryEntity,
|
|
19
|
+
export declare class CategoryRepository extends ModelRepository<CategoryEntity, CategoryCreateInput, CategoryUpdateInput> {
|
|
8
20
|
/**
|
|
9
21
|
* Creates a new instance of the CategoryRepository class.
|
|
10
22
|
* @param client - The AxiosInstance used for making HTTP requests.
|
|
11
23
|
*/
|
|
12
24
|
constructor(client: AxiosInstance);
|
|
25
|
+
/**
|
|
26
|
+
* Lists categories with optional filtering.
|
|
27
|
+
* @param options - The options for listing categories.
|
|
28
|
+
* @returns A Promise that resolves to a list of Category entities.
|
|
29
|
+
*/
|
|
30
|
+
list(options?: CategoryListOptions): Promise<ListResponse<CategoryEntity>>;
|
|
31
|
+
/**
|
|
32
|
+
* Lists categories for a specific store.
|
|
33
|
+
* @param storeId - The store ID.
|
|
34
|
+
* @param options - Optional list options.
|
|
35
|
+
* @returns A Promise that resolves to a list of Category entities.
|
|
36
|
+
*/
|
|
37
|
+
listByStore(storeId: string, options?: Omit<CategoryListOptions, 'storeId'>): Promise<ListResponse<CategoryEntity>>;
|
|
38
|
+
/**
|
|
39
|
+
* Lists root categories (no parent) for a store.
|
|
40
|
+
* @param storeId - The store ID.
|
|
41
|
+
* @param options - Optional list options.
|
|
42
|
+
* @returns A Promise that resolves to a list of root Category entities.
|
|
43
|
+
*/
|
|
44
|
+
listRootCategories(storeId: string, options?: Omit<CategoryListOptions, 'storeId' | 'parentId'>): Promise<ListResponse<CategoryEntity>>;
|
|
45
|
+
/**
|
|
46
|
+
* Lists child categories for a parent category.
|
|
47
|
+
* @param storeId - The store ID.
|
|
48
|
+
* @param parentId - The parent category ID.
|
|
49
|
+
* @param options - Optional list options.
|
|
50
|
+
* @returns A Promise that resolves to a list of child Category entities.
|
|
51
|
+
*/
|
|
52
|
+
listChildren(storeId: string, parentId: string, options?: Omit<CategoryListOptions, 'storeId' | 'parentId'>): Promise<ListResponse<CategoryEntity>>;
|
|
13
53
|
}
|