feeef 0.6.4 → 0.7.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 CHANGED
@@ -1463,6 +1463,37 @@ var FeedbackRepository = class extends ModelRepository {
1463
1463
  }
1464
1464
  };
1465
1465
 
1466
+ // src/feeef/repositories/product_landing_page_templates.ts
1467
+ var ProductLandingPageTemplatesRepository = class extends ModelRepository {
1468
+ /**
1469
+ * Creates a new instance of ProductLandingPageTemplatesRepository class.
1470
+ * @param client - The AxiosInstance used for making HTTP requests.
1471
+ */
1472
+ constructor(client) {
1473
+ super("product_landing_page_templates", client);
1474
+ }
1475
+ };
1476
+
1477
+ // src/feeef/repositories/product_landing_pages.ts
1478
+ var ProductLandingPagesRepository = class extends ModelRepository {
1479
+ /**
1480
+ * Creates a new instance of ProductLandingPagesRepository class.
1481
+ * @param client - The AxiosInstance used for making HTTP requests.
1482
+ */
1483
+ constructor(client) {
1484
+ super("product_landing_pages", client);
1485
+ }
1486
+ /**
1487
+ * Lists product landing pages with optional filtering.
1488
+ * @param options - The options for listing product landing pages.
1489
+ * @returns A Promise that resolves to a list of ProductLandingPage entities.
1490
+ */
1491
+ async list(options) {
1492
+ const params = { ...options?.params };
1493
+ return super.list({ params });
1494
+ }
1495
+ };
1496
+
1466
1497
  // src/core/entities/order.ts
1467
1498
  var OrderStatus = /* @__PURE__ */ ((OrderStatus2) => {
1468
1499
  OrderStatus2["draft"] = "draft";
@@ -2926,6 +2957,14 @@ var FeeeF = class {
2926
2957
  * The repository for managing products.
2927
2958
  */
2928
2959
  products;
2960
+ /**
2961
+ * The repository for managing product landing pages.
2962
+ */
2963
+ productLandingPages;
2964
+ /**
2965
+ * The repository for managing product landing page templates.
2966
+ */
2967
+ productLandingPageTemplates;
2929
2968
  /**
2930
2969
  * The repository for managing users.
2931
2970
  */
@@ -3011,6 +3050,8 @@ var FeeeF = class {
3011
3050
  this.client.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest";
3012
3051
  this.stores = new StoreRepository(this.client);
3013
3052
  this.products = new ProductRepository(this.client);
3053
+ this.productLandingPages = new ProductLandingPagesRepository(this.client);
3054
+ this.productLandingPageTemplates = new ProductLandingPageTemplatesRepository(this.client);
3014
3055
  this.users = new UserRepository(this.client);
3015
3056
  this.orders = new OrderRepository(this.client);
3016
3057
  this.deposits = new DepositRepository(this.client);
@@ -3058,7 +3099,8 @@ var generatePublicStoreIntegrations = (integrations) => {
3058
3099
  webhooks,
3059
3100
  ai,
3060
3101
  security,
3061
- customFields
3102
+ customFields,
3103
+ payment
3062
3104
  } = integrations;
3063
3105
  return {
3064
3106
  metaPixel: generatePublicStoreIntegrationMetaPixel(metaPixel) || null,
@@ -3070,7 +3112,8 @@ var generatePublicStoreIntegrations = (integrations) => {
3070
3112
  orderdz: generatePublicStoreIntegrationOrderdz(orderdz) || null,
3071
3113
  webhooks: generatePublicStoreIntegrationWebhooks(webhooks) || null,
3072
3114
  security: generatePublicStoreIntegrationSecurity(security) || null,
3073
- customFields: generatePublicStoreIntegrationCustomFields(customFields) || null
3115
+ customFields: generatePublicStoreIntegrationCustomFields(customFields) || null,
3116
+ payment: generatePublicStoreIntegrationPayment(payment) || null
3074
3117
  };
3075
3118
  };
3076
3119
  var generatePublicStoreIntegrationCustomFields = (customFields) => {
@@ -3170,6 +3213,19 @@ var generatePublicStoreIntegrationSecurity = (security) => {
3170
3213
  active: security.active
3171
3214
  };
3172
3215
  };
3216
+ var generatePublicStoreIntegrationPayment = (payment) => {
3217
+ if (!payment) return null;
3218
+ return {
3219
+ active: payment.active,
3220
+ methods: payment.methods.map((method) => ({
3221
+ id: method.id,
3222
+ name: method.name,
3223
+ active: method.active
3224
+ // API keys, client secrets, etc. are intentionally excluded
3225
+ })),
3226
+ defaultMethod: payment.defaultMethod
3227
+ };
3228
+ };
3173
3229
  var StoreMemberRole = /* @__PURE__ */ ((StoreMemberRole2) => {
3174
3230
  StoreMemberRole2["editor"] = "editor";
3175
3231
  StoreMemberRole2["viewer"] = "viewer";
@@ -3205,12 +3261,13 @@ var StoreSubscriptionType = /* @__PURE__ */ ((StoreSubscriptionType2) => {
3205
3261
  // src/core/entities/product.ts
3206
3262
  function generatePublicIntegrationsData(data) {
3207
3263
  if (!data) return data;
3208
- const { metaPixelData, tiktokPixelData, googleAnalyticsData, googleTagsData } = data;
3264
+ const { metaPixelData, tiktokPixelData, googleAnalyticsData, googleTagsData, paymentMethodData } = data;
3209
3265
  return {
3210
3266
  metaPixelData: generatePublicIntegrationsDataMetaPixel(metaPixelData),
3211
3267
  tiktokPixelData: generatePublicIntegrationsDataTiktokPixel(tiktokPixelData),
3212
3268
  googleAnalyticsData: generatePublicIntegrationsDataGoogleAnalytics(googleAnalyticsData),
3213
- googleTagsData: generatePublicIntegrationsDataGoogleTag(googleTagsData)
3269
+ googleTagsData: generatePublicIntegrationsDataGoogleTag(googleTagsData),
3270
+ paymentMethodData: generatePublicIntegrationsDataPaymentMethod(paymentMethodData)
3214
3271
  };
3215
3272
  }
3216
3273
  function generatePublicIntegrationsDataMetaPixel(data) {
@@ -3265,6 +3322,13 @@ var TiktokPixelEvent = /* @__PURE__ */ ((TiktokPixelEvent2) => {
3265
3322
  TiktokPixelEvent2["purchase"] = "Purchase";
3266
3323
  return TiktokPixelEvent2;
3267
3324
  })(TiktokPixelEvent || {});
3325
+ function generatePublicIntegrationsDataPaymentMethod(data) {
3326
+ if (!data) return data;
3327
+ return {
3328
+ methodIds: data.methodIds,
3329
+ enabled: data.enabled
3330
+ };
3331
+ }
3268
3332
  var ProductStatus = /* @__PURE__ */ ((ProductStatus2) => {
3269
3333
  ProductStatus2["draft"] = "draft";
3270
3334
  ProductStatus2["published"] = "published";
@@ -3463,6 +3527,7 @@ export {
3463
3527
  generatePublicIntegrationsDataGoogleSheets,
3464
3528
  generatePublicIntegrationsDataGoogleTag,
3465
3529
  generatePublicIntegrationsDataMetaPixel,
3530
+ generatePublicIntegrationsDataPaymentMethod,
3466
3531
  generatePublicIntegrationsDataTiktokPixel,
3467
3532
  generatePublicStoreIntegrationAi,
3468
3533
  generatePublicStoreIntegrationCustomFields,
@@ -3471,6 +3536,7 @@ export {
3471
3536
  generatePublicStoreIntegrationGoogleTags,
3472
3537
  generatePublicStoreIntegrationMetaPixel,
3473
3538
  generatePublicStoreIntegrationOrderdz,
3539
+ generatePublicStoreIntegrationPayment,
3474
3540
  generatePublicStoreIntegrationSecurity,
3475
3541
  generatePublicStoreIntegrationTiktokPixel,
3476
3542
  generatePublicStoreIntegrationWebhooks,