feeef 0.11.2 → 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 +55 -3
- package/build/index.js.map +1 -1
- package/build/src/core/entities/store.d.ts +73 -0
- 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
|
|
@@ -4692,7 +4721,8 @@ var generatePublicStoreIntegrations = (integrations) => {
|
|
|
4692
4721
|
ai,
|
|
4693
4722
|
security,
|
|
4694
4723
|
customFields,
|
|
4695
|
-
payment
|
|
4724
|
+
payment,
|
|
4725
|
+
connectors
|
|
4696
4726
|
} = integrations;
|
|
4697
4727
|
return {
|
|
4698
4728
|
metaPixel: generatePublicStoreIntegrationMetaPixel(metaPixel) || null,
|
|
@@ -4706,7 +4736,27 @@ var generatePublicStoreIntegrations = (integrations) => {
|
|
|
4706
4736
|
webhooks: generatePublicStoreIntegrationWebhooks(webhooks) || null,
|
|
4707
4737
|
security: generatePublicStoreIntegrationSecurity(security) || null,
|
|
4708
4738
|
customFields: generatePublicStoreIntegrationCustomFields(customFields) || null,
|
|
4709
|
-
payment: generatePublicStoreIntegrationPayment(payment) || null
|
|
4739
|
+
payment: generatePublicStoreIntegrationPayment(payment) || null,
|
|
4740
|
+
connectors: generatePublicStoreIntegrationConnectors(connectors) || null
|
|
4741
|
+
};
|
|
4742
|
+
};
|
|
4743
|
+
var generatePublicStoreIntegrationConnectors = (connectors) => {
|
|
4744
|
+
if (!connectors) return null;
|
|
4745
|
+
return {
|
|
4746
|
+
active: connectors.active,
|
|
4747
|
+
metadata: connectors.metadata,
|
|
4748
|
+
connectors: (connectors.connectors || []).map((c) => ({
|
|
4749
|
+
id: c.id,
|
|
4750
|
+
type: c.type,
|
|
4751
|
+
active: c.active,
|
|
4752
|
+
name: c.name,
|
|
4753
|
+
status: c.status,
|
|
4754
|
+
externalId: c.externalId,
|
|
4755
|
+
fieldMapping: c.fieldMapping,
|
|
4756
|
+
syncState: c.syncState,
|
|
4757
|
+
createdAt: c.createdAt,
|
|
4758
|
+
metadata: c.metadata
|
|
4759
|
+
}))
|
|
4710
4760
|
};
|
|
4711
4761
|
};
|
|
4712
4762
|
var generatePublicStoreIntegrationCustomFields = (customFields) => {
|
|
@@ -5722,6 +5772,7 @@ export {
|
|
|
5722
5772
|
NoestDeliveryIntegrationApi,
|
|
5723
5773
|
NotificationsService,
|
|
5724
5774
|
OAuthRepository,
|
|
5775
|
+
ORDER_FILTER_ANY,
|
|
5725
5776
|
OrderRepository,
|
|
5726
5777
|
OrderStatus,
|
|
5727
5778
|
PaymentStatus,
|
|
@@ -5792,6 +5843,7 @@ export {
|
|
|
5792
5843
|
generatePublicIntegrationsDataTiktokPixel,
|
|
5793
5844
|
generatePublicStoreIntegrationAi,
|
|
5794
5845
|
generatePublicStoreIntegrationClarity,
|
|
5846
|
+
generatePublicStoreIntegrationConnectors,
|
|
5795
5847
|
generatePublicStoreIntegrationCustomFields,
|
|
5796
5848
|
generatePublicStoreIntegrationGoogleAnalytics,
|
|
5797
5849
|
generatePublicStoreIntegrationGoogleSheet,
|