feeef 0.11.3 → 0.12.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/build/index.js +31 -1
- package/build/index.js.map +1 -1
- package/build/src/core/entities/store.d.ts +6 -1
- package/build/src/core/entities/store_template.d.ts +22 -0
- package/build/src/feeef/repositories/orders.d.ts +8 -1
- package/build/src/feeef/repositories/store_templates.d.ts +11 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -254,6 +254,7 @@ var ModelRepository = class {
|
|
|
254
254
|
|
|
255
255
|
// src/feeef/repositories/orders.ts
|
|
256
256
|
var DeliveryServiceFilter = /* @__PURE__ */ ((DeliveryServiceFilter2) => {
|
|
257
|
+
DeliveryServiceFilter2["none"] = "none";
|
|
257
258
|
DeliveryServiceFilter2["yalidine"] = "yalidine";
|
|
258
259
|
DeliveryServiceFilter2["ecotrack"] = "ecotrack";
|
|
259
260
|
DeliveryServiceFilter2["procolis"] = "procolis";
|
|
@@ -263,6 +264,7 @@ var DeliveryServiceFilter = /* @__PURE__ */ ((DeliveryServiceFilter2) => {
|
|
|
263
264
|
DeliveryServiceFilter2["ecomanager"] = "ecomanager";
|
|
264
265
|
return DeliveryServiceFilter2;
|
|
265
266
|
})(DeliveryServiceFilter || {});
|
|
267
|
+
var ORDER_FILTER_ANY = "$$any";
|
|
266
268
|
var OrderRepository = class extends ModelRepository {
|
|
267
269
|
/**
|
|
268
270
|
* Constructs a new OrderRepository instance.
|
|
@@ -308,6 +310,8 @@ var OrderRepository = class extends ModelRepository {
|
|
|
308
310
|
if (options.shippingState) params.shippingState = options.shippingState;
|
|
309
311
|
if (options.shippingCity) params.shippingCity = options.shippingCity;
|
|
310
312
|
if (options.deliveryService) params.deliveryService = options.deliveryService;
|
|
313
|
+
if (options.variant) params.variant = options.variant;
|
|
314
|
+
if (options.offer) params.offer = options.offer;
|
|
311
315
|
if (options.references !== void 0) params.references = options.references;
|
|
312
316
|
}
|
|
313
317
|
return super.list({ params });
|
|
@@ -563,7 +567,8 @@ var StoreRepository = class extends ModelRepository {
|
|
|
563
567
|
...listOptions,
|
|
564
568
|
params: {
|
|
565
569
|
...listOptions.params,
|
|
566
|
-
|
|
570
|
+
// StoreFilter.user() — owned by or member of this user
|
|
571
|
+
...userId && { user: userId, user_id: userId }
|
|
567
572
|
}
|
|
568
573
|
});
|
|
569
574
|
}
|
|
@@ -2952,6 +2957,30 @@ var StoreTemplatesRepository = class extends ModelRepository {
|
|
|
2952
2957
|
});
|
|
2953
2958
|
return res.data;
|
|
2954
2959
|
}
|
|
2960
|
+
/** GET locales bundle (`defaultLocale`, `locales`, `messages`). */
|
|
2961
|
+
async listLocales(templateId) {
|
|
2962
|
+
const res = await this.client.get(`/${this.resource}/${templateId}/locales`);
|
|
2963
|
+
return res.data;
|
|
2964
|
+
}
|
|
2965
|
+
/** Create one locale row. */
|
|
2966
|
+
async createLocale(templateId, input) {
|
|
2967
|
+
const res = await this.client.post(`/${this.resource}/${templateId}/locales`, input);
|
|
2968
|
+
return res.data;
|
|
2969
|
+
}
|
|
2970
|
+
/** Update one locale by language code. */
|
|
2971
|
+
async updateLocale(templateId, locale, input) {
|
|
2972
|
+
const res = await this.client.put(`/${this.resource}/${templateId}/locales/${locale}`, input);
|
|
2973
|
+
return res.data;
|
|
2974
|
+
}
|
|
2975
|
+
/** Delete one locale by language code. */
|
|
2976
|
+
async deleteLocale(templateId, locale) {
|
|
2977
|
+
await this.client.delete(`/${this.resource}/${templateId}/locales/${locale}`);
|
|
2978
|
+
}
|
|
2979
|
+
/** Replace the full locale set (CLI publish). */
|
|
2980
|
+
async replaceLocales(templateId, locales) {
|
|
2981
|
+
const res = await this.client.put(`/${this.resource}/${templateId}/locales`, { locales });
|
|
2982
|
+
return res.data;
|
|
2983
|
+
}
|
|
2955
2984
|
};
|
|
2956
2985
|
|
|
2957
2986
|
// src/core/entities/order.ts
|
|
@@ -5743,6 +5772,7 @@ export {
|
|
|
5743
5772
|
NoestDeliveryIntegrationApi,
|
|
5744
5773
|
NotificationsService,
|
|
5745
5774
|
OAuthRepository,
|
|
5775
|
+
ORDER_FILTER_ANY,
|
|
5746
5776
|
OrderRepository,
|
|
5747
5777
|
OrderStatus,
|
|
5748
5778
|
PaymentStatus,
|