Skip to content

Commit

Permalink
fix(core): Remove "Placeholder" from Permission enum
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Jun 10, 2021
1 parent 31a45c6 commit eabfe77
Show file tree
Hide file tree
Showing 10 changed files with 80 additions and 88 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2695,7 +2695,6 @@ export enum DeletionResult {
* @docsCategory common
*/
export enum Permission {
Placeholder = 'Placeholder',
/** Authenticated means simply that the user is logged in */
Authenticated = 'Authenticated',
/** SuperAdmin has unrestricted access to all operations */
Expand Down
77 changes: 38 additions & 39 deletions packages/common/src/generated-shop-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,6 @@ export enum DeletionResult {
* @docsCategory common
*/
export enum Permission {
Placeholder = 'Placeholder',
/** Authenticated means simply that the user is logged in */
Authenticated = 'Authenticated',
/** SuperAdmin has unrestricted access to all operations */
Expand Down Expand Up @@ -2793,44 +2792,6 @@ export type AuthenticationResult = CurrentUser | InvalidCredentialsError | NotVe

export type ActiveOrderResult = Order | NoActiveOrderError;

export type CollectionFilterParameter = {
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
languageCode?: Maybe<StringOperators>;
name?: Maybe<StringOperators>;
slug?: Maybe<StringOperators>;
position?: Maybe<NumberOperators>;
description?: Maybe<StringOperators>;
};

export type CollectionSortParameter = {
id?: Maybe<SortOrder>;
createdAt?: Maybe<SortOrder>;
updatedAt?: Maybe<SortOrder>;
name?: Maybe<SortOrder>;
slug?: Maybe<SortOrder>;
position?: Maybe<SortOrder>;
description?: Maybe<SortOrder>;
};

export type ProductFilterParameter = {
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
languageCode?: Maybe<StringOperators>;
name?: Maybe<StringOperators>;
slug?: Maybe<StringOperators>;
description?: Maybe<StringOperators>;
};

export type ProductSortParameter = {
id?: Maybe<SortOrder>;
createdAt?: Maybe<SortOrder>;
updatedAt?: Maybe<SortOrder>;
name?: Maybe<SortOrder>;
slug?: Maybe<SortOrder>;
description?: Maybe<SortOrder>;
};

export type ProductVariantFilterParameter = {
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
Expand Down Expand Up @@ -2921,6 +2882,44 @@ export type HistoryEntrySortParameter = {
updatedAt?: Maybe<SortOrder>;
};

export type CollectionFilterParameter = {
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
languageCode?: Maybe<StringOperators>;
name?: Maybe<StringOperators>;
slug?: Maybe<StringOperators>;
position?: Maybe<NumberOperators>;
description?: Maybe<StringOperators>;
};

export type CollectionSortParameter = {
id?: Maybe<SortOrder>;
createdAt?: Maybe<SortOrder>;
updatedAt?: Maybe<SortOrder>;
name?: Maybe<SortOrder>;
slug?: Maybe<SortOrder>;
position?: Maybe<SortOrder>;
description?: Maybe<SortOrder>;
};

export type ProductFilterParameter = {
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
languageCode?: Maybe<StringOperators>;
name?: Maybe<StringOperators>;
slug?: Maybe<StringOperators>;
description?: Maybe<StringOperators>;
};

export type ProductSortParameter = {
id?: Maybe<SortOrder>;
createdAt?: Maybe<SortOrder>;
updatedAt?: Maybe<SortOrder>;
name?: Maybe<SortOrder>;
slug?: Maybe<SortOrder>;
description?: Maybe<SortOrder>;
};

export type NativeAuthInput = {
username: Scalars['String'];
password: Scalars['String'];
Expand Down
1 change: 0 additions & 1 deletion packages/common/src/generated-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2767,7 +2767,6 @@ export enum DeletionResult {
* @docsCategory common
*/
export enum Permission {
Placeholder = 'Placeholder',
/** Authenticated means simply that the user is logged in */
Authenticated = 'Authenticated',
/** SuperAdmin has unrestricted access to all operations */
Expand Down
1 change: 0 additions & 1 deletion packages/core/e2e/graphql/generated-e2e-admin-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2695,7 +2695,6 @@ export enum DeletionResult {
* @docsCategory common
*/
export enum Permission {
Placeholder = 'Placeholder',
/** Authenticated means simply that the user is logged in */
Authenticated = 'Authenticated',
/** SuperAdmin has unrestricted access to all operations */
Expand Down
77 changes: 38 additions & 39 deletions packages/core/e2e/graphql/generated-e2e-shop-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,6 @@ export enum DeletionResult {
* @docsCategory common
*/
export enum Permission {
Placeholder = 'Placeholder',
/** Authenticated means simply that the user is logged in */
Authenticated = 'Authenticated',
/** SuperAdmin has unrestricted access to all operations */
Expand Down Expand Up @@ -2677,44 +2676,6 @@ export type AuthenticationResult = CurrentUser | InvalidCredentialsError | NotVe

export type ActiveOrderResult = Order | NoActiveOrderError;

export type CollectionFilterParameter = {
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
languageCode?: Maybe<StringOperators>;
name?: Maybe<StringOperators>;
slug?: Maybe<StringOperators>;
position?: Maybe<NumberOperators>;
description?: Maybe<StringOperators>;
};

export type CollectionSortParameter = {
id?: Maybe<SortOrder>;
createdAt?: Maybe<SortOrder>;
updatedAt?: Maybe<SortOrder>;
name?: Maybe<SortOrder>;
slug?: Maybe<SortOrder>;
position?: Maybe<SortOrder>;
description?: Maybe<SortOrder>;
};

export type ProductFilterParameter = {
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
languageCode?: Maybe<StringOperators>;
name?: Maybe<StringOperators>;
slug?: Maybe<StringOperators>;
description?: Maybe<StringOperators>;
};

export type ProductSortParameter = {
id?: Maybe<SortOrder>;
createdAt?: Maybe<SortOrder>;
updatedAt?: Maybe<SortOrder>;
name?: Maybe<SortOrder>;
slug?: Maybe<SortOrder>;
description?: Maybe<SortOrder>;
};

export type ProductVariantFilterParameter = {
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
Expand Down Expand Up @@ -2805,6 +2766,44 @@ export type HistoryEntrySortParameter = {
updatedAt?: Maybe<SortOrder>;
};

export type CollectionFilterParameter = {
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
languageCode?: Maybe<StringOperators>;
name?: Maybe<StringOperators>;
slug?: Maybe<StringOperators>;
position?: Maybe<NumberOperators>;
description?: Maybe<StringOperators>;
};

export type CollectionSortParameter = {
id?: Maybe<SortOrder>;
createdAt?: Maybe<SortOrder>;
updatedAt?: Maybe<SortOrder>;
name?: Maybe<SortOrder>;
slug?: Maybe<SortOrder>;
position?: Maybe<SortOrder>;
description?: Maybe<SortOrder>;
};

export type ProductFilterParameter = {
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
languageCode?: Maybe<StringOperators>;
name?: Maybe<StringOperators>;
slug?: Maybe<StringOperators>;
description?: Maybe<StringOperators>;
};

export type ProductSortParameter = {
id?: Maybe<SortOrder>;
createdAt?: Maybe<SortOrder>;
updatedAt?: Maybe<SortOrder>;
name?: Maybe<SortOrder>;
slug?: Maybe<SortOrder>;
description?: Maybe<SortOrder>;
};

export type NativeAuthInput = {
username: Scalars['String'];
password: Scalars['String'];
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/api/config/configure-graphql-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ async function createGraphQLOptions(
.map(e => (typeof e.schema === 'function' ? e.schema() : e.schema))
.filter(notNullOrUndefined)
.forEach(documentNode => (schema = extendSchema(schema, documentNode)));
schema = generatePermissionEnum(schema, configService.authOptions.customPermissions);
schema = generateListOptions(schema);
schema = addGraphQLCustomFields(schema, customFields, apiType === 'shop');
schema = addOrderLineCustomFieldsInput(schema, customFields.OrderLine || []);
Expand All @@ -155,6 +154,7 @@ async function createGraphQLOptions(
if (apiType === 'shop') {
schema = addRegisterCustomerCustomFieldsInput(schema, customFields.Customer || []);
}
schema = generatePermissionEnum(schema, configService.authOptions.customPermissions);

return schema;
}
Expand Down
4 changes: 1 addition & 3 deletions packages/core/src/api/schema/common/common-enums.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ enum DeletionResult {
}

# Populated at run-time
enum Permission {
Placeholder
}
enum Permission

enum SortOrder {
ASC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2695,7 +2695,6 @@ export enum DeletionResult {
* @docsCategory common
*/
export enum Permission {
Placeholder = 'Placeholder',
/** Authenticated means simply that the user is logged in */
Authenticated = 'Authenticated',
/** SuperAdmin has unrestricted access to all operations */
Expand Down
2 changes: 1 addition & 1 deletion schema-admin.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion schema-shop.json

Large diffs are not rendered by default.

0 comments on commit eabfe77

Please sign in to comment.