@infrab4a/connect 5.1.1-beta.7 → 5.1.1-beta.9

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.
Files changed (3) hide show
  1. package/index.cjs.js +12 -16
  2. package/index.esm.js +12 -16
  3. package/package.json +1 -1
package/index.cjs.js CHANGED
@@ -3475,8 +3475,12 @@ class HasuraDeleteVariablesHelper {
3475
3475
  if (lodash.isNil(instance.identifier[identifierBinded]))
3476
3476
  return ids;
3477
3477
  const columnOption = AttributeOptionHelper.FindByAttribute(identifier, fields);
3478
- const value = columnOption?.to(identifiers[identifier], instance) ||
3479
- identifiers[identifier];
3478
+ // const value =
3479
+ // columnOption?.to(identifiers[identifier as keyof DeleteRepositoryParams<MBase>], instance) ||
3480
+ // identifiers[identifier as keyof DeleteRepositoryParams<MBase>]
3481
+ const value = 'to' in columnOption
3482
+ ? columnOption?.to?.(identifiers[identifier], instance)
3483
+ : identifiers[identifier];
3480
3484
  return {
3481
3485
  ...ids,
3482
3486
  [columnOption.columnName]: {
@@ -3918,19 +3922,12 @@ class HasuraGetVariablesHelper {
3918
3922
  if (lodash.isNil(instance[identifierBinded]))
3919
3923
  return ids;
3920
3924
  const columnOption = AttributeOptionHelper.FindByAttribute(identifier, fields);
3921
- console.warn('columnOption', columnOption);
3922
- const value = columnOption?.to?.(identifiers[identifier], instance) ||
3923
- identifiers[identifier];
3924
- console.warn('columnOption value', value);
3925
- console.warn('columnOption ...ids', ids);
3926
- console.warn('columnOption return', {
3927
- ...ids,
3928
- [columnOption.columnName]: {
3929
- type: repository.getAttributeGraphQLTypeOf(columnOption.type || value),
3930
- value,
3931
- required: true,
3932
- },
3933
- });
3925
+ // const value =
3926
+ // columnOption?.to?.(identifiers[identifier as keyof typeof identifiers], instance) ||
3927
+ // identifiers[identifier as keyof typeof identifiers]
3928
+ const value = 'to' in columnOption
3929
+ ? columnOption?.to?.(identifiers[identifier], instance)
3930
+ : identifiers[identifier];
3934
3931
  return {
3935
3932
  ...ids,
3936
3933
  [columnOption.columnName]: {
@@ -7646,7 +7643,6 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
7646
7643
  return reviews;
7647
7644
  }
7648
7645
  async findCatalog(params, mainGender, options) {
7649
- console.warn('findCatalog', { params, ...params.filters, published: true });
7650
7646
  const result = await this.find({
7651
7647
  ...params,
7652
7648
  filters: { ...params.filters, published: true },
package/index.esm.js CHANGED
@@ -3450,8 +3450,12 @@ class HasuraDeleteVariablesHelper {
3450
3450
  if (isNil(instance.identifier[identifierBinded]))
3451
3451
  return ids;
3452
3452
  const columnOption = AttributeOptionHelper.FindByAttribute(identifier, fields);
3453
- const value = columnOption?.to(identifiers[identifier], instance) ||
3454
- identifiers[identifier];
3453
+ // const value =
3454
+ // columnOption?.to(identifiers[identifier as keyof DeleteRepositoryParams<MBase>], instance) ||
3455
+ // identifiers[identifier as keyof DeleteRepositoryParams<MBase>]
3456
+ const value = 'to' in columnOption
3457
+ ? columnOption?.to?.(identifiers[identifier], instance)
3458
+ : identifiers[identifier];
3455
3459
  return {
3456
3460
  ...ids,
3457
3461
  [columnOption.columnName]: {
@@ -3893,19 +3897,12 @@ class HasuraGetVariablesHelper {
3893
3897
  if (isNil(instance[identifierBinded]))
3894
3898
  return ids;
3895
3899
  const columnOption = AttributeOptionHelper.FindByAttribute(identifier, fields);
3896
- console.warn('columnOption', columnOption);
3897
- const value = columnOption?.to?.(identifiers[identifier], instance) ||
3898
- identifiers[identifier];
3899
- console.warn('columnOption value', value);
3900
- console.warn('columnOption ...ids', ids);
3901
- console.warn('columnOption return', {
3902
- ...ids,
3903
- [columnOption.columnName]: {
3904
- type: repository.getAttributeGraphQLTypeOf(columnOption.type || value),
3905
- value,
3906
- required: true,
3907
- },
3908
- });
3900
+ // const value =
3901
+ // columnOption?.to?.(identifiers[identifier as keyof typeof identifiers], instance) ||
3902
+ // identifiers[identifier as keyof typeof identifiers]
3903
+ const value = 'to' in columnOption
3904
+ ? columnOption?.to?.(identifiers[identifier], instance)
3905
+ : identifiers[identifier];
3909
3906
  return {
3910
3907
  ...ids,
3911
3908
  [columnOption.columnName]: {
@@ -7621,7 +7618,6 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
7621
7618
  return reviews;
7622
7619
  }
7623
7620
  async findCatalog(params, mainGender, options) {
7624
- console.warn('findCatalog', { params, ...params.filters, published: true });
7625
7621
  const result = await this.find({
7626
7622
  ...params,
7627
7623
  filters: { ...params.filters, published: true },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infrab4a/connect",
3
- "version": "5.1.1-beta.7",
3
+ "version": "5.1.1-beta.9",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },