@connect-plus-online/ogabai-integrations 0.0.95 → 0.0.96

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/index.cjs.js CHANGED
@@ -546,11 +546,12 @@ function createEntityIntegration(config) {
546
546
  }
547
547
  function createListIntegration(config) {
548
548
  var _a;
549
+ const pluralKey = config.key.endsWith("y") ? `${config.key.slice(0, -1)}ies` : `${config.key}s`;
549
550
  return {
550
- responseFields: [config.key, "total"],
551
+ responseFields: [pluralKey, "total"],
551
552
  nestedFields: {
552
553
  ...(_a = config.nested) != null ? _a : {},
553
- [config.key]: config.fields
554
+ [pluralKey]: config.fields
554
555
  }
555
556
  };
556
557
  }
@@ -584,7 +585,7 @@ var userAccountIntegration = createStandardEntityIntegration({
584
585
  }
585
586
  });
586
587
  var userAccountListIntegration = createListIntegration({
587
- key: "userAccounts",
588
+ key: ENTITY,
588
589
  fields: userAccountQuery,
589
590
  nested: {
590
591
  userAccount: userAccountQuery,
@@ -730,7 +731,7 @@ var subscriptionPlanFeatureDefinitionIntegration = createStandardEntityIntegrati
730
731
  fields: subscriptionPlanFeatureDefinitionQuery
731
732
  });
732
733
  var subscriptionPlanFeatureDefinitionListIntegration = createListIntegration({
733
- key: "subscriptionPlanFeatureDefinitions",
734
+ key: ENTITY2,
734
735
  fields: subscriptionPlanFeatureDefinitionQuery
735
736
  });
736
737
  var subscriptionPlanFeatureDefinitionDeleteIntegration = createDeleteIntegration(ENTITY2);
@@ -745,7 +746,7 @@ var subscriptionPlanIntegration = createStandardEntityIntegration({
745
746
  }
746
747
  });
747
748
  var subscriptionPlanListIntegration = createListIntegration({
748
- key: "subscriptionPlans",
749
+ key: ENTITY3,
749
750
  fields: subscriptionPlanQuery,
750
751
  nested: {
751
752
  features: subscriptionPlanFeatureQuery
@@ -785,7 +786,7 @@ var subscriptionPlanFeatureBehaviourIntegration = createStandardEntityIntegratio
785
786
  fields: subscriptionPlanFeatureBehaviourQuery
786
787
  });
787
788
  var subscriptionPlanFeatureBehaviourListIntegration = createListIntegration({
788
- key: "subscriptionPlanFeatureBehaviours",
789
+ key: ENTITY4,
789
790
  fields: subscriptionPlanFeatureBehaviourQuery
790
791
  });
791
792
  var subscriptionPlanFeatureBehaviourDeleteIntegration = createDeleteIntegration(ENTITY4);
@@ -797,7 +798,7 @@ var subscriptionTrialIntegration = createStandardEntityIntegration({
797
798
  fields: subscriptionTrialQuery
798
799
  });
799
800
  var subscriptionTrialListIntegration = createListIntegration({
800
- key: "subscriptionTrials",
801
+ key: ENTITY5,
801
802
  fields: subscriptionTrialQuery
802
803
  });
803
804
  var subscriptionTrialDeleteIntegration = createDeleteIntegration(ENTITY5);
@@ -1791,7 +1792,7 @@ var userRoleIntegration = createStandardEntityIntegration({
1791
1792
  }
1792
1793
  });
1793
1794
  var userRoleListIntegration = createListIntegration({
1794
- key: "userRoles",
1795
+ key: ENTITY6,
1795
1796
  fields: userRoleQuery,
1796
1797
  nested: {
1797
1798
  privileges: privilegeQuery
@@ -1892,7 +1893,7 @@ var customerIntegration = createStandardEntityIntegration({
1892
1893
  }
1893
1894
  });
1894
1895
  var customerListIntegration = createListIntegration({
1895
- key: "customers",
1896
+ key: ENTITY7,
1896
1897
  fields: customerQuery,
1897
1898
  nested: {
1898
1899
  customerStoreBalance: customerStoreBalanceQuery
@@ -3576,7 +3577,7 @@ var expenseCategoryIntegration = createStandardEntityIntegration({
3576
3577
  }
3577
3578
  });
3578
3579
  var expenseCategoryListIntegration = createListIntegration({
3579
- key: "expenseCategorys",
3580
+ key: ENTITY8,
3580
3581
  fields: expenseCategoryQuery,
3581
3582
  nested: {
3582
3583
  features: expenseCategoryQuery
@@ -3594,7 +3595,7 @@ var expenseIntegration = createStandardEntityIntegration({
3594
3595
  }
3595
3596
  });
3596
3597
  var expenseListIntegration = createListIntegration({
3597
- key: "expenses",
3598
+ key: ENTITY9,
3598
3599
  fields: expenseQuery,
3599
3600
  nested: {
3600
3601
  features: expenseQuery
@@ -3674,7 +3675,7 @@ var createExpenseCategoryService = (client) => ({
3674
3675
  defaultNestedFields: {}
3675
3676
  }
3676
3677
  ),
3677
- getExpenseCategorys: createOperationExecutor(
3678
+ getExpenseCategories: createOperationExecutor(
3678
3679
  client,
3679
3680
  "getExpenseCategories",
3680
3681
  {