Skip to content

Commit

Permalink
feat(core): CustomField support on Country, CustomerGroup, PaymentMet…
Browse files Browse the repository at this point in the history
…hod, Promotion, TaxCategory,

...TaxRate & Zone. Relates to #1185
  • Loading branch information
michaelbromley committed Nov 23, 2021
1 parent 09d68b2 commit fac803d
Show file tree
Hide file tree
Showing 24 changed files with 318 additions and 43 deletions.
31 changes: 30 additions & 1 deletion packages/admin-ui/src/lib/core/src/common/generated-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ export type Country = Node & {
name: Scalars['String'];
enabled: Scalars['Boolean'];
translations: Array<CountryTranslation>;
customFields?: Maybe<Scalars['JSON']>;
};

export type CountryFilterParameter = {
Expand Down Expand Up @@ -542,6 +543,7 @@ export type CountryTranslationInput = {
id?: Maybe<Scalars['ID']>;
languageCode: LanguageCode;
name?: Maybe<Scalars['String']>;
customFields?: Maybe<Scalars['JSON']>;
};

export type CreateAddressInput = {
Expand Down Expand Up @@ -611,11 +613,13 @@ export type CreateCountryInput = {
code: Scalars['String'];
translations: Array<CountryTranslationInput>;
enabled: Scalars['Boolean'];
customFields?: Maybe<Scalars['JSON']>;
};

export type CreateCustomerGroupInput = {
name: Scalars['String'];
customerIds?: Maybe<Array<Scalars['ID']>>;
customFields?: Maybe<Scalars['JSON']>;
};

export type CreateCustomerInput = {
Expand Down Expand Up @@ -669,6 +673,7 @@ export type CreatePaymentMethodInput = {
enabled: Scalars['Boolean'];
checker?: Maybe<ConfigurableOperationInput>;
handler: ConfigurableOperationInput;
customFields?: Maybe<Scalars['JSON']>;
};

export type CreateProductInput = {
Expand Down Expand Up @@ -726,6 +731,7 @@ export type CreatePromotionInput = {
perCustomerUsageLimit?: Maybe<Scalars['Int']>;
conditions: Array<ConfigurableOperationInput>;
actions: Array<ConfigurableOperationInput>;
customFields?: Maybe<Scalars['JSON']>;
};

export type CreatePromotionResult = Promotion | MissingConditionsError;
Expand Down Expand Up @@ -753,6 +759,7 @@ export type CreateTagInput = {
export type CreateTaxCategoryInput = {
name: Scalars['String'];
isDefault?: Maybe<Scalars['Boolean']>;
customFields?: Maybe<Scalars['JSON']>;
};

export type CreateTaxRateInput = {
Expand All @@ -762,11 +769,13 @@ export type CreateTaxRateInput = {
categoryId: Scalars['ID'];
zoneId: Scalars['ID'];
customerGroupId?: Maybe<Scalars['ID']>;
customFields?: Maybe<Scalars['JSON']>;
};

export type CreateZoneInput = {
name: Scalars['String'];
memberIds?: Maybe<Array<Scalars['ID']>>;
customFields?: Maybe<Scalars['JSON']>;
};

/**
Expand Down Expand Up @@ -1134,19 +1143,26 @@ export type CustomFields = {
Asset: Array<CustomFieldConfig>;
Channel: Array<CustomFieldConfig>;
Collection: Array<CustomFieldConfig>;
Country: Array<CustomFieldConfig>;
Customer: Array<CustomFieldConfig>;
CustomerGroup: Array<CustomFieldConfig>;
Facet: Array<CustomFieldConfig>;
FacetValue: Array<CustomFieldConfig>;
Fulfillment: Array<CustomFieldConfig>;
GlobalSettings: Array<CustomFieldConfig>;
Order: Array<CustomFieldConfig>;
OrderLine: Array<CustomFieldConfig>;
PaymentMethod: Array<CustomFieldConfig>;
Product: Array<CustomFieldConfig>;
ProductOption: Array<CustomFieldConfig>;
ProductOptionGroup: Array<CustomFieldConfig>;
ProductVariant: Array<CustomFieldConfig>;
User: Array<CustomFieldConfig>;
Promotion: Array<CustomFieldConfig>;
ShippingMethod: Array<CustomFieldConfig>;
TaxCategory: Array<CustomFieldConfig>;
TaxRate: Array<CustomFieldConfig>;
User: Array<CustomFieldConfig>;
Zone: Array<CustomFieldConfig>;
};

export type Customer = Node & {
Expand Down Expand Up @@ -1194,6 +1210,7 @@ export type CustomerGroup = Node & {
updatedAt: Scalars['DateTime'];
name: Scalars['String'];
customers: CustomerList;
customFields?: Maybe<Scalars['JSON']>;
};


Expand Down Expand Up @@ -3386,6 +3403,7 @@ export type PaymentMethod = Node & {
enabled: Scalars['Boolean'];
checker?: Maybe<ConfigurableOperation>;
handler: ConfigurableOperation;
customFields?: Maybe<Scalars['JSON']>;
};

export type PaymentMethodFilterParameter = {
Expand Down Expand Up @@ -3929,6 +3947,7 @@ export type Promotion = Node & {
enabled: Scalars['Boolean'];
conditions: Array<ConfigurableOperation>;
actions: Array<ConfigurableOperation>;
customFields?: Maybe<Scalars['JSON']>;
};

export type PromotionFilterParameter = {
Expand Down Expand Up @@ -4785,6 +4804,7 @@ export type TaxCategory = Node & {
updatedAt: Scalars['DateTime'];
name: Scalars['String'];
isDefault: Scalars['Boolean'];
customFields?: Maybe<Scalars['JSON']>;
};

export type TaxLine = {
Expand All @@ -4804,6 +4824,7 @@ export type TaxRate = Node & {
category: TaxCategory;
zone: Zone;
customerGroup?: Maybe<CustomerGroup>;
customFields?: Maybe<Scalars['JSON']>;
};

export type TaxRateFilterParameter = {
Expand Down Expand Up @@ -4977,11 +4998,13 @@ export type UpdateCountryInput = {
code?: Maybe<Scalars['String']>;
translations?: Maybe<Array<CountryTranslationInput>>;
enabled?: Maybe<Scalars['Boolean']>;
customFields?: Maybe<Scalars['JSON']>;
};

export type UpdateCustomerGroupInput = {
id: Scalars['ID'];
name?: Maybe<Scalars['String']>;
customFields?: Maybe<Scalars['JSON']>;
};

export type UpdateCustomerInput = {
Expand Down Expand Up @@ -5056,6 +5079,7 @@ export type UpdatePaymentMethodInput = {
enabled?: Maybe<Scalars['Boolean']>;
checker?: Maybe<ConfigurableOperationInput>;
handler?: Maybe<ConfigurableOperationInput>;
customFields?: Maybe<Scalars['JSON']>;
};

export type UpdateProductInput = {
Expand Down Expand Up @@ -5109,6 +5133,7 @@ export type UpdatePromotionInput = {
perCustomerUsageLimit?: Maybe<Scalars['Int']>;
conditions?: Maybe<Array<ConfigurableOperationInput>>;
actions?: Maybe<Array<ConfigurableOperationInput>>;
customFields?: Maybe<Scalars['JSON']>;
};

export type UpdatePromotionResult = Promotion | MissingConditionsError;
Expand Down Expand Up @@ -5140,6 +5165,7 @@ export type UpdateTaxCategoryInput = {
id: Scalars['ID'];
name?: Maybe<Scalars['String']>;
isDefault?: Maybe<Scalars['Boolean']>;
customFields?: Maybe<Scalars['JSON']>;
};

export type UpdateTaxRateInput = {
Expand All @@ -5150,11 +5176,13 @@ export type UpdateTaxRateInput = {
categoryId?: Maybe<Scalars['ID']>;
zoneId?: Maybe<Scalars['ID']>;
customerGroupId?: Maybe<Scalars['ID']>;
customFields?: Maybe<Scalars['JSON']>;
};

export type UpdateZoneInput = {
id: Scalars['ID'];
name?: Maybe<Scalars['String']>;
customFields?: Maybe<Scalars['JSON']>;
};


Expand Down Expand Up @@ -5195,6 +5223,7 @@ export type Zone = Node & {
updatedAt: Scalars['DateTime'];
name: Scalars['String'];
members: Array<Country>;
customFields?: Maybe<Scalars['JSON']>;
};

export type RoleFragment = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ export type Country = Node & {
name: Scalars['String'];
enabled: Scalars['Boolean'];
translations: Array<CountryTranslation>;
customFields?: Maybe<Scalars['JSON']>;
};

export type CountryFilterParameter = {
Expand Down Expand Up @@ -528,6 +529,7 @@ export type CountryTranslationInput = {
id?: Maybe<Scalars['ID']>;
languageCode: LanguageCode;
name?: Maybe<Scalars['String']>;
customFields?: Maybe<Scalars['JSON']>;
};

export type CreateAddressInput = {
Expand Down Expand Up @@ -597,11 +599,13 @@ export type CreateCountryInput = {
code: Scalars['String'];
translations: Array<CountryTranslationInput>;
enabled: Scalars['Boolean'];
customFields?: Maybe<Scalars['JSON']>;
};

export type CreateCustomerGroupInput = {
name: Scalars['String'];
customerIds?: Maybe<Array<Scalars['ID']>>;
customFields?: Maybe<Scalars['JSON']>;
};

export type CreateCustomerInput = {
Expand Down Expand Up @@ -654,6 +658,7 @@ export type CreatePaymentMethodInput = {
enabled: Scalars['Boolean'];
checker?: Maybe<ConfigurableOperationInput>;
handler: ConfigurableOperationInput;
customFields?: Maybe<Scalars['JSON']>;
};

export type CreateProductInput = {
Expand Down Expand Up @@ -711,6 +716,7 @@ export type CreatePromotionInput = {
perCustomerUsageLimit?: Maybe<Scalars['Int']>;
conditions: Array<ConfigurableOperationInput>;
actions: Array<ConfigurableOperationInput>;
customFields?: Maybe<Scalars['JSON']>;
};

export type CreatePromotionResult = Promotion | MissingConditionsError;
Expand Down Expand Up @@ -738,6 +744,7 @@ export type CreateTagInput = {
export type CreateTaxCategoryInput = {
name: Scalars['String'];
isDefault?: Maybe<Scalars['Boolean']>;
customFields?: Maybe<Scalars['JSON']>;
};

export type CreateTaxRateInput = {
Expand All @@ -747,11 +754,13 @@ export type CreateTaxRateInput = {
categoryId: Scalars['ID'];
zoneId: Scalars['ID'];
customerGroupId?: Maybe<Scalars['ID']>;
customFields?: Maybe<Scalars['JSON']>;
};

export type CreateZoneInput = {
name: Scalars['String'];
memberIds?: Maybe<Array<Scalars['ID']>>;
customFields?: Maybe<Scalars['JSON']>;
};

/**
Expand Down Expand Up @@ -1117,19 +1126,26 @@ export type CustomFields = {
Asset: Array<CustomFieldConfig>;
Channel: Array<CustomFieldConfig>;
Collection: Array<CustomFieldConfig>;
Country: Array<CustomFieldConfig>;
Customer: Array<CustomFieldConfig>;
CustomerGroup: Array<CustomFieldConfig>;
Facet: Array<CustomFieldConfig>;
FacetValue: Array<CustomFieldConfig>;
Fulfillment: Array<CustomFieldConfig>;
GlobalSettings: Array<CustomFieldConfig>;
Order: Array<CustomFieldConfig>;
OrderLine: Array<CustomFieldConfig>;
PaymentMethod: Array<CustomFieldConfig>;
Product: Array<CustomFieldConfig>;
ProductOption: Array<CustomFieldConfig>;
ProductOptionGroup: Array<CustomFieldConfig>;
ProductVariant: Array<CustomFieldConfig>;
User: Array<CustomFieldConfig>;
Promotion: Array<CustomFieldConfig>;
ShippingMethod: Array<CustomFieldConfig>;
TaxCategory: Array<CustomFieldConfig>;
TaxRate: Array<CustomFieldConfig>;
User: Array<CustomFieldConfig>;
Zone: Array<CustomFieldConfig>;
};

export type Customer = Node & {
Expand Down Expand Up @@ -1173,6 +1189,7 @@ export type CustomerGroup = Node & {
updatedAt: Scalars['DateTime'];
name: Scalars['String'];
customers: CustomerList;
customFields?: Maybe<Scalars['JSON']>;
};

export type CustomerGroupCustomersArgs = {
Expand Down Expand Up @@ -3165,6 +3182,7 @@ export type PaymentMethod = Node & {
enabled: Scalars['Boolean'];
checker?: Maybe<ConfigurableOperation>;
handler: ConfigurableOperation;
customFields?: Maybe<Scalars['JSON']>;
};

export type PaymentMethodFilterParameter = {
Expand Down Expand Up @@ -3686,6 +3704,7 @@ export type Promotion = Node & {
enabled: Scalars['Boolean'];
conditions: Array<ConfigurableOperation>;
actions: Array<ConfigurableOperation>;
customFields?: Maybe<Scalars['JSON']>;
};

export type PromotionFilterParameter = {
Expand Down Expand Up @@ -4478,6 +4497,7 @@ export type TaxCategory = Node & {
updatedAt: Scalars['DateTime'];
name: Scalars['String'];
isDefault: Scalars['Boolean'];
customFields?: Maybe<Scalars['JSON']>;
};

export type TaxLine = {
Expand All @@ -4495,6 +4515,7 @@ export type TaxRate = Node & {
category: TaxCategory;
zone: Zone;
customerGroup?: Maybe<CustomerGroup>;
customFields?: Maybe<Scalars['JSON']>;
};

export type TaxRateFilterParameter = {
Expand Down Expand Up @@ -4657,11 +4678,13 @@ export type UpdateCountryInput = {
code?: Maybe<Scalars['String']>;
translations?: Maybe<Array<CountryTranslationInput>>;
enabled?: Maybe<Scalars['Boolean']>;
customFields?: Maybe<Scalars['JSON']>;
};

export type UpdateCustomerGroupInput = {
id: Scalars['ID'];
name?: Maybe<Scalars['String']>;
customFields?: Maybe<Scalars['JSON']>;
};

export type UpdateCustomerInput = {
Expand Down Expand Up @@ -4736,6 +4759,7 @@ export type UpdatePaymentMethodInput = {
enabled?: Maybe<Scalars['Boolean']>;
checker?: Maybe<ConfigurableOperationInput>;
handler?: Maybe<ConfigurableOperationInput>;
customFields?: Maybe<Scalars['JSON']>;
};

export type UpdateProductInput = {
Expand Down Expand Up @@ -4789,6 +4813,7 @@ export type UpdatePromotionInput = {
perCustomerUsageLimit?: Maybe<Scalars['Int']>;
conditions?: Maybe<Array<ConfigurableOperationInput>>;
actions?: Maybe<Array<ConfigurableOperationInput>>;
customFields?: Maybe<Scalars['JSON']>;
};

export type UpdatePromotionResult = Promotion | MissingConditionsError;
Expand Down Expand Up @@ -4820,6 +4845,7 @@ export type UpdateTaxCategoryInput = {
id: Scalars['ID'];
name?: Maybe<Scalars['String']>;
isDefault?: Maybe<Scalars['Boolean']>;
customFields?: Maybe<Scalars['JSON']>;
};

export type UpdateTaxRateInput = {
Expand All @@ -4830,11 +4856,13 @@ export type UpdateTaxRateInput = {
categoryId?: Maybe<Scalars['ID']>;
zoneId?: Maybe<Scalars['ID']>;
customerGroupId?: Maybe<Scalars['ID']>;
customFields?: Maybe<Scalars['JSON']>;
};

export type UpdateZoneInput = {
id: Scalars['ID'];
name?: Maybe<Scalars['String']>;
customFields?: Maybe<Scalars['JSON']>;
};

export type User = Node & {
Expand All @@ -4855,6 +4883,7 @@ export type Zone = Node & {
updatedAt: Scalars['DateTime'];
name: Scalars['String'];
members: Array<Country>;
customFields?: Maybe<Scalars['JSON']>;
};

export type CreateAssetsMutationVariables = Exact<{
Expand Down
Loading

0 comments on commit fac803d

Please sign in to comment.