Skip to content

Commit

Permalink
feat(core): Implement Admin API operations for stock location, e2e tests
Browse files Browse the repository at this point in the history
Relates to #1545
  • Loading branch information
michaelbromley committed Feb 2, 2023
1 parent 905c1df commit 7913b9a
Show file tree
Hide file tree
Showing 21 changed files with 1,416 additions and 17 deletions.
83 changes: 83 additions & 0 deletions packages/admin-ui/src/lib/core/src/common/generated-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,12 @@ export type CreateShippingMethodInput = {
translations: Array<ShippingMethodTranslationInput>;
};

export type CreateStockLocationInput = {
customFields?: InputMaybe<Scalars['JSON']>;
description?: InputMaybe<Scalars['String']>;
name: Scalars['String'];
};

export type CreateTagInput = {
value: Scalars['String'];
};
Expand Down Expand Up @@ -1416,6 +1422,11 @@ export type DeleteAssetsInput = {
force?: InputMaybe<Scalars['Boolean']>;
};

export type DeleteStockLocationInput = {
id: Scalars['ID'];
transferToLocationId?: InputMaybe<Scalars['ID']>;
};

export type DeletionResponse = {
__typename?: 'DeletionResponse';
message?: Maybe<Scalars['String']>;
Expand Down Expand Up @@ -2499,6 +2510,7 @@ export type Mutation = {
createSeller: Seller;
/** Create a new ShippingMethod */
createShippingMethod: ShippingMethod;
createStockLocation: StockLocation;
/** Create a new Tag */
createTag: Tag;
/** Create a new TaxCategory */
Expand Down Expand Up @@ -2556,6 +2568,7 @@ export type Mutation = {
deleteSeller: DeletionResponse;
/** Delete a ShippingMethod */
deleteShippingMethod: DeletionResponse;
deleteStockLocation: DeletionResponse;
/** Delete an existing Tag */
deleteTag: DeletionResponse;
/** Deletes a TaxCategory */
Expand Down Expand Up @@ -2670,6 +2683,7 @@ export type Mutation = {
updateSeller: Seller;
/** Update an existing ShippingMethod */
updateShippingMethod: ShippingMethod;
updateStockLocation: StockLocation;
/** Update an existing Tag */
updateTag: Tag;
/** Update an existing TaxCategory */
Expand Down Expand Up @@ -2892,6 +2906,11 @@ export type MutationCreateShippingMethodArgs = {
};


export type MutationCreateStockLocationArgs = {
input: CreateStockLocationInput;
};


export type MutationCreateTagArgs = {
input: CreateTagInput;
};
Expand Down Expand Up @@ -3046,6 +3065,11 @@ export type MutationDeleteShippingMethodArgs = {
};


export type MutationDeleteStockLocationArgs = {
input: DeleteStockLocationInput;
};


export type MutationDeleteTagArgs = {
id: Scalars['ID'];
};
Expand Down Expand Up @@ -3378,6 +3402,11 @@ export type MutationUpdateShippingMethodArgs = {
};


export type MutationUpdateStockLocationArgs = {
input: UpdateStockLocationInput;
};


export type MutationUpdateTagArgs = {
input: UpdateTagInput;
};
Expand Down Expand Up @@ -4551,6 +4580,8 @@ export type Query = {
shippingEligibilityCheckers: Array<ConfigurableOperationDefinition>;
shippingMethod?: Maybe<ShippingMethod>;
shippingMethods: ShippingMethodList;
stockLocation?: Maybe<StockLocation>;
stockLocations: StockLocationList;
tag: Tag;
tags: TagList;
taxCategories: Array<TaxCategory>;
Expand Down Expand Up @@ -4775,6 +4806,16 @@ export type QueryShippingMethodsArgs = {
};


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


export type QueryStockLocationsArgs = {
options?: InputMaybe<StockLocationListOptions>;
};


export type QueryTagArgs = {
id: Scalars['ID'];
};
Expand Down Expand Up @@ -5287,6 +5328,41 @@ export type StockLocation = Node & {
updatedAt: Scalars['DateTime'];
};

export type StockLocationFilterParameter = {
createdAt?: InputMaybe<DateOperators>;
description?: InputMaybe<StringOperators>;
id?: InputMaybe<IdOperators>;
name?: InputMaybe<StringOperators>;
updatedAt?: InputMaybe<DateOperators>;
};

export type StockLocationList = PaginatedList & {
__typename?: 'StockLocationList';
items: Array<StockLocation>;
totalItems: Scalars['Int'];
};

export type StockLocationListOptions = {
/** Allows the results to be filtered */
filter?: InputMaybe<StockLocationFilterParameter>;
/** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */
filterOperator?: InputMaybe<LogicalOperator>;
/** Skips the first n results, for use in pagination */
skip?: InputMaybe<Scalars['Int']>;
/** Specifies which properties to sort the results by */
sort?: InputMaybe<StockLocationSortParameter>;
/** Takes n results, for use in pagination */
take?: InputMaybe<Scalars['Int']>;
};

export type StockLocationSortParameter = {
createdAt?: InputMaybe<SortOrder>;
description?: InputMaybe<SortOrder>;
id?: InputMaybe<SortOrder>;
name?: InputMaybe<SortOrder>;
updatedAt?: InputMaybe<SortOrder>;
};

export type StockMovement = {
createdAt: Scalars['DateTime'];
id: Scalars['ID'];
Expand Down Expand Up @@ -5801,6 +5877,13 @@ export type UpdateShippingMethodInput = {
translations: Array<ShippingMethodTranslationInput>;
};

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

export type UpdateTagInput = {
id: Scalars['ID'];
value?: InputMaybe<Scalars['String']>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ const result: PossibleTypesResultData = {
'RoleList',
'SellerList',
'ShippingMethodList',
'StockLocationList',
'TagList',
'TaxRateList',
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,12 @@ export type CreateShippingMethodInput = {
translations: Array<ShippingMethodTranslationInput>;
};

export type CreateStockLocationInput = {
customFields?: InputMaybe<Scalars['JSON']>;
description?: InputMaybe<Scalars['String']>;
name: Scalars['String'];
};

export type CreateTagInput = {
value: Scalars['String'];
};
Expand Down Expand Up @@ -1392,6 +1398,11 @@ export type DeleteAssetsInput = {
force?: InputMaybe<Scalars['Boolean']>;
};

export type DeleteStockLocationInput = {
id: Scalars['ID'];
transferToLocationId?: InputMaybe<Scalars['ID']>;
};

export type DeletionResponse = {
message?: Maybe<Scalars['String']>;
result: DeletionResult;
Expand Down Expand Up @@ -2447,6 +2458,7 @@ export type Mutation = {
createSeller: Seller;
/** Create a new ShippingMethod */
createShippingMethod: ShippingMethod;
createStockLocation: StockLocation;
/** Create a new Tag */
createTag: Tag;
/** Create a new TaxCategory */
Expand Down Expand Up @@ -2504,6 +2516,7 @@ export type Mutation = {
deleteSeller: DeletionResponse;
/** Delete a ShippingMethod */
deleteShippingMethod: DeletionResponse;
deleteStockLocation: DeletionResponse;
/** Delete an existing Tag */
deleteTag: DeletionResponse;
/** Deletes a TaxCategory */
Expand Down Expand Up @@ -2608,6 +2621,7 @@ export type Mutation = {
updateSeller: Seller;
/** Update an existing ShippingMethod */
updateShippingMethod: ShippingMethod;
updateStockLocation: StockLocation;
/** Update an existing Tag */
updateTag: Tag;
/** Update an existing TaxCategory */
Expand Down Expand Up @@ -2788,6 +2802,10 @@ export type MutationCreateShippingMethodArgs = {
input: CreateShippingMethodInput;
};

export type MutationCreateStockLocationArgs = {
input: CreateStockLocationInput;
};

export type MutationCreateTagArgs = {
input: CreateTagInput;
};
Expand Down Expand Up @@ -2912,6 +2930,10 @@ export type MutationDeleteShippingMethodArgs = {
id: Scalars['ID'];
};

export type MutationDeleteStockLocationArgs = {
input: DeleteStockLocationInput;
};

export type MutationDeleteTagArgs = {
id: Scalars['ID'];
};
Expand Down Expand Up @@ -3153,6 +3175,10 @@ export type MutationUpdateShippingMethodArgs = {
input: UpdateShippingMethodInput;
};

export type MutationUpdateStockLocationArgs = {
input: UpdateStockLocationInput;
};

export type MutationUpdateTagArgs = {
input: UpdateTagInput;
};
Expand Down Expand Up @@ -4266,6 +4292,8 @@ export type Query = {
shippingEligibilityCheckers: Array<ConfigurableOperationDefinition>;
shippingMethod?: Maybe<ShippingMethod>;
shippingMethods: ShippingMethodList;
stockLocation?: Maybe<StockLocation>;
stockLocations: StockLocationList;
tag: Tag;
tags: TagList;
taxCategories: Array<TaxCategory>;
Expand Down Expand Up @@ -4446,6 +4474,14 @@ export type QueryShippingMethodsArgs = {
options?: InputMaybe<ShippingMethodListOptions>;
};

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

export type QueryStockLocationsArgs = {
options?: InputMaybe<StockLocationListOptions>;
};

export type QueryTagArgs = {
id: Scalars['ID'];
};
Expand Down Expand Up @@ -4944,6 +4980,40 @@ export type StockLocation = Node & {
updatedAt: Scalars['DateTime'];
};

export type StockLocationFilterParameter = {
createdAt?: InputMaybe<DateOperators>;
description?: InputMaybe<StringOperators>;
id?: InputMaybe<IdOperators>;
name?: InputMaybe<StringOperators>;
updatedAt?: InputMaybe<DateOperators>;
};

export type StockLocationList = PaginatedList & {
items: Array<StockLocation>;
totalItems: Scalars['Int'];
};

export type StockLocationListOptions = {
/** Allows the results to be filtered */
filter?: InputMaybe<StockLocationFilterParameter>;
/** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */
filterOperator?: InputMaybe<LogicalOperator>;
/** Skips the first n results, for use in pagination */
skip?: InputMaybe<Scalars['Int']>;
/** Specifies which properties to sort the results by */
sort?: InputMaybe<StockLocationSortParameter>;
/** Takes n results, for use in pagination */
take?: InputMaybe<Scalars['Int']>;
};

export type StockLocationSortParameter = {
createdAt?: InputMaybe<SortOrder>;
description?: InputMaybe<SortOrder>;
id?: InputMaybe<SortOrder>;
name?: InputMaybe<SortOrder>;
updatedAt?: InputMaybe<SortOrder>;
};

export type StockMovement = {
createdAt: Scalars['DateTime'];
id: Scalars['ID'];
Expand Down Expand Up @@ -5440,6 +5510,13 @@ export type UpdateShippingMethodInput = {
translations: Array<ShippingMethodTranslationInput>;
};

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

export type UpdateTagInput = {
id: Scalars['ID'];
value?: InputMaybe<Scalars['String']>;
Expand Down
Loading

0 comments on commit 7913b9a

Please sign in to comment.