Skip to content

Commit

Permalink
feat(core): Add nullable & defaultValue options to custom fields config
Browse files Browse the repository at this point in the history
Relates to #85
  • Loading branch information
michaelbromley committed Jul 12, 2019
1 parent 090758c commit b1722d8
Show file tree
Hide file tree
Showing 19 changed files with 564 additions and 234 deletions.
106 changes: 57 additions & 49 deletions admin-ui/src/app/common/generated-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,8 @@ export type CustomFieldConfig = {
__typename?: 'CustomFieldConfig',
name: Scalars['String'],
type: Scalars['String'],
label?: Maybe<Array<LocalizedString>>,
description?: Maybe<Array<LocalizedString>>,
};

export type CustomFields = {
Expand Down Expand Up @@ -1554,6 +1556,12 @@ export enum LanguageCode {
zu = 'zu'
}

export type LocalizedString = {
__typename?: 'LocalizedString',
languageCode: LanguageCode,
value: Scalars['String'],
};

export type LoginResult = {
__typename?: 'LoginResult',
user: CurrentUser,
Expand All @@ -1567,14 +1575,14 @@ export type MoveCollectionInput = {

export type Mutation = {
__typename?: 'Mutation',
/** Create a new Asset */
createAssets: Array<Asset>,
/** Create a new Administrator */
createAdministrator: Administrator,
/** Update an existing Administrator */
updateAdministrator: Administrator,
/** Assign a Role to an Administrator */
assignRoleToAdministrator: Administrator,
/** Create a new Asset */
createAssets: Array<Asset>,
login: LoginResult,
logout: Scalars['Boolean'],
/** Create a new Channel */
Expand Down Expand Up @@ -1603,8 +1611,6 @@ export type Mutation = {
addCustomersToGroup: CustomerGroup,
/** Remove Customers from a CustomerGroup */
removeCustomersFromGroup: CustomerGroup,
updateGlobalSettings: GlobalSettings,
importProducts?: Maybe<ImportInfo>,
/** Create a new Customer. If a password is provided, a new User will also be created an linked to the Customer. */
createCustomer: Customer,
/** Update an existing Customer */
Expand All @@ -1629,6 +1635,8 @@ export type Mutation = {
updateFacetValues: Array<FacetValue>,
/** Delete one or more FacetValues */
deleteFacetValues: Array<DeletionResponse>,
updateGlobalSettings: GlobalSettings,
importProducts?: Maybe<ImportInfo>,
settlePayment: Payment,
fulfillOrder: Fulfillment,
cancelOrder: Order,
Expand Down Expand Up @@ -1677,10 +1685,6 @@ export type Mutation = {
createTaxCategory: TaxCategory,
/** Update an existing TaxCategory */
updateTaxCategory: TaxCategory,
/** Create a new TaxRate */
createTaxRate: TaxRate,
/** Update an existing TaxRate */
updateTaxRate: TaxRate,
/** Create a new Zone */
createZone: Zone,
/** Update an existing Zone */
Expand All @@ -1691,6 +1695,10 @@ export type Mutation = {
addMembersToZone: Zone,
/** Remove members from a Zone */
removeMembersFromZone: Zone,
/** Create a new TaxRate */
createTaxRate: TaxRate,
/** Update an existing TaxRate */
updateTaxRate: TaxRate,
requestStarted: Scalars['Int'],
requestCompleted: Scalars['Int'],
setAsLoggedIn: UserStatus,
Expand All @@ -1699,6 +1707,11 @@ export type Mutation = {
};


export type MutationCreateAssetsArgs = {
input: Array<CreateAssetInput>
};


export type MutationCreateAdministratorArgs = {
input: CreateAdministratorInput
};
Expand All @@ -1715,11 +1728,6 @@ export type MutationAssignRoleToAdministratorArgs = {
};


export type MutationCreateAssetsArgs = {
input: Array<CreateAssetInput>
};


export type MutationLoginArgs = {
username: Scalars['String'],
password: Scalars['String'],
Expand Down Expand Up @@ -1794,16 +1802,6 @@ export type MutationRemoveCustomersFromGroupArgs = {
};


export type MutationUpdateGlobalSettingsArgs = {
input: UpdateGlobalSettingsInput
};


export type MutationImportProductsArgs = {
csvFile: Scalars['Upload']
};


export type MutationCreateCustomerArgs = {
input: CreateCustomerInput,
password?: Maybe<Scalars['String']>
Expand Down Expand Up @@ -1868,6 +1866,16 @@ export type MutationDeleteFacetValuesArgs = {
};


export type MutationUpdateGlobalSettingsArgs = {
input: UpdateGlobalSettingsInput
};


export type MutationImportProductsArgs = {
csvFile: Scalars['Upload']
};


export type MutationSettlePaymentArgs = {
id: Scalars['ID']
};
Expand Down Expand Up @@ -2010,16 +2018,6 @@ export type MutationUpdateTaxCategoryArgs = {
};


export type MutationCreateTaxRateArgs = {
input: CreateTaxRateInput
};


export type MutationUpdateTaxRateArgs = {
input: UpdateTaxRateInput
};


export type MutationCreateZoneArgs = {
input: CreateZoneInput
};
Expand Down Expand Up @@ -2047,6 +2045,16 @@ export type MutationRemoveMembersFromZoneArgs = {
};


export type MutationCreateTaxRateArgs = {
input: CreateTaxRateInput
};


export type MutationUpdateTaxRateArgs = {
input: UpdateTaxRateInput
};


export type MutationSetAsLoggedInArgs = {
username: Scalars['String'],
loginTime: Scalars['String']
Expand Down Expand Up @@ -2558,10 +2566,10 @@ export type PromotionSortParameter = {

export type Query = {
__typename?: 'Query',
administrators: AdministratorList,
administrator?: Maybe<Administrator>,
assets: AssetList,
asset?: Maybe<Asset>,
administrators: AdministratorList,
administrator?: Maybe<Administrator>,
me?: Maybe<CurrentUser>,
channels: Array<Channel>,
channel?: Maybe<Channel>,
Expand All @@ -2573,11 +2581,11 @@ export type Query = {
country?: Maybe<Country>,
customerGroups: Array<CustomerGroup>,
customerGroup?: Maybe<CustomerGroup>,
globalSettings: GlobalSettings,
customers: CustomerList,
customer?: Maybe<Customer>,
facets: FacetList,
facet?: Maybe<Facet>,
globalSettings: GlobalSettings,
job?: Maybe<JobInfo>,
jobs: Array<JobInfo>,
order?: Maybe<Order>,
Expand All @@ -2601,32 +2609,32 @@ export type Query = {
shippingCalculators: Array<ConfigurableOperation>,
taxCategories: Array<TaxCategory>,
taxCategory?: Maybe<TaxCategory>,
taxRates: TaxRateList,
taxRate?: Maybe<TaxRate>,
zones: Array<Zone>,
zone?: Maybe<Zone>,
taxRates: TaxRateList,
taxRate?: Maybe<TaxRate>,
networkStatus: NetworkStatus,
userStatus: UserStatus,
uiState: UiState,
};


export type QueryAdministratorsArgs = {
options?: Maybe<AdministratorListOptions>
export type QueryAssetsArgs = {
options?: Maybe<AssetListOptions>
};


export type QueryAdministratorArgs = {
export type QueryAssetArgs = {
id: Scalars['ID']
};


export type QueryAssetsArgs = {
options?: Maybe<AssetListOptions>
export type QueryAdministratorsArgs = {
options?: Maybe<AdministratorListOptions>
};


export type QueryAssetArgs = {
export type QueryAdministratorArgs = {
id: Scalars['ID']
};

Expand Down Expand Up @@ -2780,17 +2788,17 @@ export type QueryTaxCategoryArgs = {
};


export type QueryTaxRatesArgs = {
options?: Maybe<TaxRateListOptions>
export type QueryZoneArgs = {
id: Scalars['ID']
};


export type QueryTaxRateArgs = {
id: Scalars['ID']
export type QueryTaxRatesArgs = {
options?: Maybe<TaxRateListOptions>
};


export type QueryZoneArgs = {
export type QueryTaxRateArgs = {
id: Scalars['ID']
};

Expand Down
8 changes: 8 additions & 0 deletions packages/common/src/generated-shop-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,8 @@ export type CustomFieldConfig = {
__typename?: 'CustomFieldConfig';
name: Scalars['String'];
type: Scalars['String'];
label?: Maybe<Array<LocalizedString>>;
description?: Maybe<Array<LocalizedString>>;
};

export type CustomFields = {
Expand Down Expand Up @@ -1205,6 +1207,12 @@ export enum LanguageCode {
zu = 'zu',
}

export type LocalizedString = {
__typename?: 'LocalizedString';
languageCode: LanguageCode;
value: Scalars['String'];
};

export type LoginResult = {
__typename?: 'LoginResult';
user: CurrentUser;
Expand Down
Loading

0 comments on commit b1722d8

Please sign in to comment.