Browse Source

refactor: Rename AdjustmentOperation to ConfigurableOperation

The former name does not communicate what it does very well.
Michael Bromley 6 years ago
parent
commit
62cd98e470
37 changed files with 218 additions and 219 deletions
  1. 2 2
      admin-ui/src/app/catalog/components/collection-detail/collection-detail.component.html
  2. 8 8
      admin-ui/src/app/catalog/components/collection-detail/collection-detail.component.ts
  3. 9 9
      admin-ui/src/app/common/utilities/interpolate-description.spec.ts
  4. 3 3
      admin-ui/src/app/common/utilities/interpolate-description.ts
  5. 5 5
      admin-ui/src/app/data/definitions/product-definitions.ts
  6. 8 8
      admin-ui/src/app/data/definitions/promotion-definitions.ts
  7. 7 7
      admin-ui/src/app/data/definitions/shipping-definitions.ts
  8. 4 4
      admin-ui/src/app/marketing/components/promotion-detail/promotion-detail.component.html
  9. 16 16
      admin-ui/src/app/marketing/components/promotion-detail/promotion-detail.component.ts
  10. 2 2
      admin-ui/src/app/settings/components/payment-method-detail/payment-method-detail.component.ts
  11. 4 4
      admin-ui/src/app/settings/components/shipping-method-detail/shipping-method-detail.component.html
  12. 10 10
      admin-ui/src/app/settings/components/shipping-method-detail/shipping-method-detail.component.ts
  13. 3 3
      admin-ui/src/app/settings/components/tax-category-detail/tax-category-detail.component.ts
  14. 0 0
      admin-ui/src/app/shared/components/configurable-input/configurable-input.component.html
  15. 0 0
      admin-ui/src/app/shared/components/configurable-input/configurable-input.component.scss
  16. 10 11
      admin-ui/src/app/shared/components/configurable-input/configurable-input.component.ts
  17. 2 2
      admin-ui/src/app/shared/shared.module.ts
  18. 0 0
      schema-admin.json
  19. 0 0
      schema-shop.json
  20. 22 22
      schema.json
  21. 2 2
      server/src/api/resolvers/admin/collection.resolver.ts
  22. 3 3
      server/src/api/resolvers/admin/shipping-method.resolver.ts
  23. 3 3
      server/src/api/schema/admin-api/collection.api.graphql
  24. 4 4
      server/src/api/schema/admin-api/promotion.api.graphql
  25. 6 6
      server/src/api/schema/admin-api/shipping-method.api.graphql
  26. 2 2
      server/src/api/schema/common/common-types.graphql
  27. 1 1
      server/src/api/schema/type/collection.type.graphql
  28. 4 4
      server/src/api/schema/type/promotion.type.graphql
  29. 2 2
      server/src/api/schema/type/shipping-method.type.graphql
  30. 2 2
      server/src/entity/collection/collection.entity.ts
  31. 3 3
      server/src/entity/promotion/promotion.entity.ts
  32. 3 3
      server/src/entity/shipping-method/shipping-method.entity.ts
  33. 4 4
      server/src/service/services/collection.service.ts
  34. 7 7
      server/src/service/services/promotion.service.ts
  35. 7 7
      server/src/service/services/shipping-method.service.ts
  36. 15 15
      shared/generated-shop-types.ts
  37. 35 35
      shared/generated-types.ts

+ 2 - 2
admin-ui/src/app/catalog/components/collection-detail/collection-detail.component.html

@@ -65,12 +65,12 @@
         <div class="clr-col">
             <label>{{ 'catalog.filters' | translate }}</label>
             <ng-container *ngFor="let filter of filters; index as i">
-                <vdr-adjustment-operation-input
+                <vdr-configurable-input
                     (remove)="removeFilter($event)"
                     [facets]="facets$ | async"
                     [operation]="filter"
                     [formControlName]="i"
-                ></vdr-adjustment-operation-input>
+                ></vdr-configurable-input>
             </ng-container>
 
             <div>

+ 8 - 8
admin-ui/src/app/catalog/components/collection-detail/collection-detail.component.ts

@@ -4,9 +4,9 @@ import { ActivatedRoute, Router } from '@angular/router';
 import { combineLatest, Observable } from 'rxjs';
 import { mergeMap, shareReplay, take } from 'rxjs/operators';
 import {
-    AdjustmentOperation,
-    AdjustmentOperationInput,
     Collection,
+    ConfigurableOperation,
+    ConfigurableOperationInput,
     CreateCollectionInput,
     FacetWithValues,
     LanguageCode,
@@ -33,8 +33,8 @@ export class CollectionDetailComponent extends BaseDetailComponent<Collection.Fr
     customFields: CustomFieldConfig[];
     detailForm: FormGroup;
     assetChanges: { assetIds?: string[]; featuredAssetId?: string } = {};
-    filters: AdjustmentOperation[] = [];
-    allFilters: AdjustmentOperation[] = [];
+    filters: ConfigurableOperation[] = [];
+    allFilters: ConfigurableOperation[] = [];
     facets$: Observable<FacetWithValues.Fragment[]>;
 
     constructor(
@@ -83,7 +83,7 @@ export class CollectionDetailComponent extends BaseDetailComponent<Collection.Fr
         return !!Object.values(this.assetChanges).length;
     }
 
-    addFilter(collectionFilter: AdjustmentOperation) {
+    addFilter(collectionFilter: ConfigurableOperation) {
         const filtersArray = this.detailForm.get('filters') as FormArray;
         const index = filtersArray.value.findIndex(o => o.code === collectionFilter.code);
         if (index === -1) {
@@ -104,7 +104,7 @@ export class CollectionDetailComponent extends BaseDetailComponent<Collection.Fr
         }
     }
 
-    removeFilter(collectionFilter: AdjustmentOperation) {
+    removeFilter(collectionFilter: ConfigurableOperation) {
         const filtersArray = this.detailForm.get('filters') as FormArray;
         const index = filtersArray.value.findIndex(o => o.code === collectionFilter.code);
         if (index !== -1) {
@@ -232,9 +232,9 @@ export class CollectionDetailComponent extends BaseDetailComponent<Collection.Fr
      * Maps an array of conditions or actions to the input format expected by the GraphQL API.
      */
     private mapOperationsToInputs(
-        operations: AdjustmentOperation[],
+        operations: ConfigurableOperation[],
         formValueOperations: any,
-    ): AdjustmentOperationInput[] {
+    ): ConfigurableOperationInput[] {
         return operations.map((o, i) => {
             return {
                 code: o.code,

+ 9 - 9
admin-ui/src/app/common/utilities/interpolate-description.spec.ts

@@ -1,10 +1,10 @@
-import { AdjustmentOperation } from 'shared/generated-types';
+import { ConfigurableOperation } from 'shared/generated-types';
 
 import { interpolateDescription } from './interpolate-description';
 
 describe('interpolateDescription()', () => {
     it('works for single argument', () => {
-        const operation: Partial<AdjustmentOperation> = {
+        const operation: Partial<ConfigurableOperation> = {
             args: [{ name: 'foo', type: 'string' }],
             description: 'The value is { foo }',
         };
@@ -14,7 +14,7 @@ describe('interpolateDescription()', () => {
     });
 
     it('works for multiple arguments', () => {
-        const operation: Partial<AdjustmentOperation> = {
+        const operation: Partial<ConfigurableOperation> = {
             args: [{ name: 'foo', type: 'string' }, { name: 'bar', type: 'string' }],
             description: 'The value is { foo } and { bar }',
         };
@@ -24,7 +24,7 @@ describe('interpolateDescription()', () => {
     });
 
     it('is case-insensitive', () => {
-        const operation: Partial<AdjustmentOperation> = {
+        const operation: Partial<ConfigurableOperation> = {
             args: [{ name: 'foo', type: 'string' }],
             description: 'The value is { FOo }',
         };
@@ -34,7 +34,7 @@ describe('interpolateDescription()', () => {
     });
 
     it('ignores whitespaces in interpolation', () => {
-        const operation: Partial<AdjustmentOperation> = {
+        const operation: Partial<ConfigurableOperation> = {
             args: [{ name: 'foo', type: 'string' }, { name: 'bar', type: 'string' }],
             description: 'The value is {foo} and {      bar    }',
         };
@@ -44,7 +44,7 @@ describe('interpolateDescription()', () => {
     });
 
     it('formats money as a decimal', () => {
-        const operation: Partial<AdjustmentOperation> = {
+        const operation: Partial<ConfigurableOperation> = {
             args: [{ name: 'price', type: 'money' }],
             description: 'The price is { price }',
         };
@@ -54,7 +54,7 @@ describe('interpolateDescription()', () => {
     });
 
     it('formats Date object as human-readable', () => {
-        const operation: Partial<AdjustmentOperation> = {
+        const operation: Partial<ConfigurableOperation> = {
             args: [{ name: 'date', type: 'datetime' }],
             description: 'The date is { date }',
         };
@@ -65,7 +65,7 @@ describe('interpolateDescription()', () => {
     });
 
     it('formats date string object as human-readable', () => {
-        const operation: Partial<AdjustmentOperation> = {
+        const operation: Partial<ConfigurableOperation> = {
             args: [{ name: 'date', type: 'datetime' }],
             description: 'The date is { date }',
         };
@@ -76,7 +76,7 @@ describe('interpolateDescription()', () => {
     });
 
     it('correctly interprets falsy-looking values', () => {
-        const operation: Partial<AdjustmentOperation> = {
+        const operation: Partial<ConfigurableOperation> = {
             args: [{ name: 'foo', type: 'int' }],
             description: 'The value is { foo }',
         };

+ 3 - 3
admin-ui/src/app/common/utilities/interpolate-description.ts

@@ -1,10 +1,10 @@
-import { AdjustmentOperation } from 'shared/generated-types';
+import { ConfigurableOperation } from 'shared/generated-types';
 
 /**
- * Interpolates the description of an AdjustmentOperation with the given values.
+ * Interpolates the description of an ConfigurableOperation with the given values.
  */
 export function interpolateDescription(
-    operation: AdjustmentOperation,
+    operation: ConfigurableOperation,
     values: { [name: string]: any },
 ): string {
     if (!operation) {

+ 5 - 5
admin-ui/src/app/data/definitions/product-definitions.ts

@@ -1,6 +1,6 @@
 import gql from 'graphql-tag';
 
-import { ADJUSTMENT_OPERATION_FRAGMENT } from './promotion-definitions';
+import { CONFIGURABLE_FRAGMENT } from './promotion-definitions';
 
 export const ASSET_FRAGMENT = gql`
     fragment Asset on Asset {
@@ -290,10 +290,10 @@ export const CREATE_ASSETS = gql`
 export const GET_COLLECTION_FILTERS = gql`
     query GetCollectionFilters {
         collectionFilters {
-            ...AdjustmentOperation
+            ...ConfigurableOperation
         }
     }
-    ${ADJUSTMENT_OPERATION_FRAGMENT}
+    ${CONFIGURABLE_FRAGMENT}
 `;
 
 export const COLLECTION_FRAGMENT = gql`
@@ -309,7 +309,7 @@ export const COLLECTION_FRAGMENT = gql`
             ...Asset
         }
         filters {
-            ...AdjustmentOperation
+            ...ConfigurableOperation
         }
         translations {
             id
@@ -327,7 +327,7 @@ export const COLLECTION_FRAGMENT = gql`
         }
     }
     ${ASSET_FRAGMENT}
-    ${ADJUSTMENT_OPERATION_FRAGMENT}
+    ${CONFIGURABLE_FRAGMENT}
 `;
 
 export const GET_COLLECTION_LIST = gql`

+ 8 - 8
admin-ui/src/app/data/definitions/promotion-definitions.ts

@@ -1,7 +1,7 @@
 import gql from 'graphql-tag';
 
-export const ADJUSTMENT_OPERATION_FRAGMENT = gql`
-    fragment AdjustmentOperation on AdjustmentOperation {
+export const CONFIGURABLE_FRAGMENT = gql`
+    fragment ConfigurableOperation on ConfigurableOperation {
         args {
             name
             type
@@ -20,13 +20,13 @@ export const PROMOTION_FRAGMENT = gql`
         name
         enabled
         conditions {
-            ...AdjustmentOperation
+            ...ConfigurableOperation
         }
         actions {
-            ...AdjustmentOperation
+            ...ConfigurableOperation
         }
     }
-    ${ADJUSTMENT_OPERATION_FRAGMENT}
+    ${CONFIGURABLE_FRAGMENT}
 `;
 
 export const GET_PROMOTION_LIST = gql`
@@ -54,14 +54,14 @@ export const GET_ADJUSTMENT_OPERATIONS = gql`
     query GetAdjustmentOperations {
         adjustmentOperations {
             actions {
-                ...AdjustmentOperation
+                ...ConfigurableOperation
             }
             conditions {
-                ...AdjustmentOperation
+                ...ConfigurableOperation
             }
         }
     }
-    ${ADJUSTMENT_OPERATION_FRAGMENT}
+    ${CONFIGURABLE_FRAGMENT}
 `;
 
 export const CREATE_PROMOTION = gql`

+ 7 - 7
admin-ui/src/app/data/definitions/shipping-definitions.ts

@@ -1,6 +1,6 @@
 import gql from 'graphql-tag';
 
-import { ADJUSTMENT_OPERATION_FRAGMENT } from './promotion-definitions';
+import { CONFIGURABLE_FRAGMENT } from './promotion-definitions';
 
 export const SHIPPING_METHOD_FRAGMENT = gql`
     fragment ShippingMethod on ShippingMethod {
@@ -10,13 +10,13 @@ export const SHIPPING_METHOD_FRAGMENT = gql`
         code
         description
         checker {
-            ...AdjustmentOperation
+            ...ConfigurableOperation
         }
         calculator {
-            ...AdjustmentOperation
+            ...ConfigurableOperation
         }
     }
-    ${ADJUSTMENT_OPERATION_FRAGMENT}
+    ${CONFIGURABLE_FRAGMENT}
 `;
 
 export const GET_SHIPPING_METHOD_LIST = gql`
@@ -43,13 +43,13 @@ export const GET_SHIPPING_METHOD = gql`
 export const GET_SHIPPING_METHOD_OPERATIONS = gql`
     query GetShippingMethodOperations {
         shippingEligibilityCheckers {
-            ...AdjustmentOperation
+            ...ConfigurableOperation
         }
         shippingCalculators {
-            ...AdjustmentOperation
+            ...ConfigurableOperation
         }
     }
-    ${ADJUSTMENT_OPERATION_FRAGMENT}
+    ${CONFIGURABLE_FRAGMENT}
 `;
 
 export const CREATE_SHIPPING_METHOD = gql`

+ 4 - 4
admin-ui/src/app/marketing/components/promotion-detail/promotion-detail.component.html

@@ -29,12 +29,12 @@
         <div class="clr-col" formArrayName="conditions">
             <label>{{ 'marketing.conditions' | translate }}</label>
             <ng-container *ngFor="let condition of conditions; index as i">
-                <vdr-adjustment-operation-input
+                <vdr-configurable-input
                     (remove)="removeCondition($event)"
                     [facets]="facets$ | async"
                     [operation]="condition"
                     [formControlName]="i"
-                ></vdr-adjustment-operation-input>
+                ></vdr-configurable-input>
             </ng-container>
 
             <div>
@@ -60,13 +60,13 @@
         </div>
         <div class="clr-col" formArrayName="actions">
             <label>{{ 'marketing.actions' | translate }}</label>
-            <vdr-adjustment-operation-input
+            <vdr-configurable-input
                 *ngFor="let action of actions; index as i"
                 (remove)="removeAction($event)"
                 [facets]="facets$ | async"
                 [operation]="action"
                 [formControlName]="i"
-            ></vdr-adjustment-operation-input>
+            ></vdr-configurable-input>
             <div>
                 <clr-dropdown>
                     <div clrDropdownTrigger>

+ 16 - 16
admin-ui/src/app/marketing/components/promotion-detail/promotion-detail.component.ts

@@ -4,8 +4,8 @@ import { ActivatedRoute, Router } from '@angular/router';
 import { Observable } from 'rxjs';
 import { mergeMap, shareReplay, take } from 'rxjs/operators';
 import {
-    AdjustmentOperation,
-    AdjustmentOperationInput,
+    ConfigurableOperation,
+    ConfigurableOperationInput,
     CreatePromotionInput,
     FacetWithValues,
     LanguageCode,
@@ -29,12 +29,12 @@ export class PromotionDetailComponent extends BaseDetailComponent<Promotion.Frag
     implements OnInit, OnDestroy {
     promotion$: Observable<Promotion.Fragment>;
     detailForm: FormGroup;
-    conditions: AdjustmentOperation[] = [];
-    actions: AdjustmentOperation[] = [];
+    conditions: ConfigurableOperation[] = [];
+    actions: ConfigurableOperation[] = [];
     facets$: Observable<FacetWithValues.Fragment[]>;
 
-    private allConditions: AdjustmentOperation[];
-    private allActions: AdjustmentOperation[];
+    private allConditions: ConfigurableOperation[];
+    private allActions: ConfigurableOperation[];
 
     constructor(
         router: Router,
@@ -71,11 +71,11 @@ export class PromotionDetailComponent extends BaseDetailComponent<Promotion.Frag
         this.destroy();
     }
 
-    getAvailableConditions(): AdjustmentOperation[] {
+    getAvailableConditions(): ConfigurableOperation[] {
         return this.allConditions.filter(o => !this.conditions.find(c => c.code === o.code));
     }
 
-    getAvailableActions(): AdjustmentOperation[] {
+    getAvailableActions(): ConfigurableOperation[] {
         return this.allActions.filter(o => !this.actions.find(a => a.code === o.code));
     }
 
@@ -88,22 +88,22 @@ export class PromotionDetailComponent extends BaseDetailComponent<Promotion.Frag
         );
     }
 
-    addCondition(condition: AdjustmentOperation) {
+    addCondition(condition: ConfigurableOperation) {
         this.addOperation('conditions', condition);
         this.detailForm.markAsDirty();
     }
 
-    addAction(action: AdjustmentOperation) {
+    addAction(action: ConfigurableOperation) {
         this.addOperation('actions', action);
         this.detailForm.markAsDirty();
     }
 
-    removeCondition(condition: AdjustmentOperation) {
+    removeCondition(condition: ConfigurableOperation) {
         this.removeOperation('conditions', condition);
         this.detailForm.markAsDirty();
     }
 
-    removeAction(action: AdjustmentOperation) {
+    removeAction(action: ConfigurableOperation) {
         this.removeOperation('actions', action);
         this.detailForm.markAsDirty();
     }
@@ -187,9 +187,9 @@ export class PromotionDetailComponent extends BaseDetailComponent<Promotion.Frag
      * Maps an array of conditions or actions to the input format expected by the GraphQL API.
      */
     private mapOperationsToInputs(
-        operations: AdjustmentOperation[],
+        operations: ConfigurableOperation[],
         formValueOperations: any,
-    ): AdjustmentOperationInput[] {
+    ): ConfigurableOperationInput[] {
         return operations.map((o, i) => {
             return {
                 code: o.code,
@@ -204,7 +204,7 @@ export class PromotionDetailComponent extends BaseDetailComponent<Promotion.Frag
     /**
      * Adds a new condition or action to the promotion.
      */
-    private addOperation(key: 'conditions' | 'actions', operation: AdjustmentOperation) {
+    private addOperation(key: 'conditions' | 'actions', operation: ConfigurableOperation) {
         const operationsArray = this.formArrayOf(key);
         const collection = key === 'conditions' ? this.conditions : this.actions;
         const index = operationsArray.value.findIndex(o => o.code === operation.code);
@@ -229,7 +229,7 @@ export class PromotionDetailComponent extends BaseDetailComponent<Promotion.Frag
     /**
      * Removes a condition or action from the promotion.
      */
-    private removeOperation(key: 'conditions' | 'actions', operation: AdjustmentOperation) {
+    private removeOperation(key: 'conditions' | 'actions', operation: ConfigurableOperation) {
         const operationsArray = this.formArrayOf(key);
         const collection = key === 'conditions' ? this.conditions : this.actions;
         const index = operationsArray.value.findIndex(o => o.code === operation.code);

+ 2 - 2
admin-ui/src/app/settings/components/payment-method-detail/payment-method-detail.component.ts

@@ -3,9 +3,9 @@ import { FormArray, FormBuilder, FormGroup, Validators } from '@angular/forms';
 import { ActivatedRoute, Router } from '@angular/router';
 import { mergeMap, take } from 'rxjs/operators';
 import {
-    AdjustmentOperation,
-    AdjustmentOperationInput,
     ConfigArg,
+    ConfigurableOperation,
+    ConfigurableOperationInput,
     PaymentMethod,
     UpdatePaymentMethodInput,
 } from 'shared/generated-types';

+ 4 - 4
admin-ui/src/app/settings/components/shipping-method-detail/shipping-method-detail.component.html

@@ -37,12 +37,12 @@
     <div class="clr-row">
         <div class="clr-col">
             <label>{{ 'settings.shipping-eligibility-checker' | translate }}</label>
-            <vdr-adjustment-operation-input
+            <vdr-configurable-input
                 *ngIf="selectedChecker"
                 [operation]="selectedChecker"
                 (remove)="selectedChecker = null"
                 formControlName="checker"
-            ></vdr-adjustment-operation-input>
+            ></vdr-configurable-input>
             <div *ngIf="!selectedChecker">
                 <clr-dropdown>
                     <div clrDropdownTrigger>
@@ -66,12 +66,12 @@
         </div>
         <div class="clr-col">
             <label>{{ 'settings.shipping-calculator' | translate }}</label>
-            <vdr-adjustment-operation-input
+            <vdr-configurable-input
                 *ngIf="selectedCalculator"
                 [operation]="selectedCalculator"
                 (remove)="selectedCalculator = null"
                 formControlName="calculator"
-            ></vdr-adjustment-operation-input>
+            ></vdr-configurable-input>
             <div *ngIf="!selectedCalculator">
                 <clr-dropdown>
                     <div clrDropdownTrigger>

+ 10 - 10
admin-ui/src/app/settings/components/shipping-method-detail/shipping-method-detail.component.ts

@@ -3,8 +3,8 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
 import { ActivatedRoute, Router } from '@angular/router';
 import { mergeMap, take } from 'rxjs/operators';
 import {
-    AdjustmentOperation,
-    AdjustmentOperationInput,
+    ConfigurableOperation,
+    ConfigurableOperationInput,
     CreateShippingMethodInput,
     ShippingMethod,
     UpdateShippingMethodInput,
@@ -26,10 +26,10 @@ import { ServerConfigService } from '../../../data/server-config';
 export class ShippingMethodDetailComponent extends BaseDetailComponent<ShippingMethod.Fragment>
     implements OnInit, OnDestroy {
     detailForm: FormGroup;
-    checkers: AdjustmentOperation[] = [];
-    calculators: AdjustmentOperation[] = [];
-    selectedChecker?: AdjustmentOperation;
-    selectedCalculator?: AdjustmentOperation;
+    checkers: ConfigurableOperation[] = [];
+    calculators: ConfigurableOperation[] = [];
+    selectedChecker?: ConfigurableOperation;
+    selectedCalculator?: ConfigurableOperation;
 
     constructor(
         router: Router,
@@ -62,11 +62,11 @@ export class ShippingMethodDetailComponent extends BaseDetailComponent<ShippingM
         this.destroy();
     }
 
-    selectChecker(checker: AdjustmentOperation) {
+    selectChecker(checker: ConfigurableOperation) {
         this.selectedChecker = checker;
     }
 
-    selectCalculator(calculator: AdjustmentOperation) {
+    selectCalculator(calculator: ConfigurableOperation) {
         this.selectedCalculator = calculator;
     }
 
@@ -139,9 +139,9 @@ export class ShippingMethodDetailComponent extends BaseDetailComponent<ShippingM
      * Maps an array of conditions or actions to the input format expected by the GraphQL API.
      */
     private toAdjustmentOperationInput(
-        operation: AdjustmentOperation,
+        operation: ConfigurableOperation,
         formValueOperations: any,
-    ): AdjustmentOperationInput {
+    ): ConfigurableOperationInput {
         return {
             code: operation.code,
             arguments: Object.values(formValueOperations.args || {}).map((value, j) => ({

+ 3 - 3
admin-ui/src/app/settings/components/tax-category-detail/tax-category-detail.component.ts

@@ -4,7 +4,7 @@ import { ActivatedRoute, Router } from '@angular/router';
 import { Observable } from 'rxjs';
 import { mergeMap, take } from 'rxjs/operators';
 import {
-    AdjustmentOperation,
+    ConfigurableOperation,
     CreateTaxCategoryInput,
     LanguageCode,
     TaxCategory,
@@ -28,8 +28,8 @@ export class TaxCategoryDetailComponent extends BaseDetailComponent<TaxCategory.
     taxCategory$: Observable<TaxCategory.Fragment>;
     detailForm: FormGroup;
 
-    private taxCondition: AdjustmentOperation;
-    private taxAction: AdjustmentOperation;
+    private taxCondition: ConfigurableOperation;
+    private taxAction: ConfigurableOperation;
 
     constructor(
         router: Router,

+ 0 - 0
admin-ui/src/app/shared/components/adjustment-operation-input/adjustment-operation-input.component.html → admin-ui/src/app/shared/components/configurable-input/configurable-input.component.html


+ 0 - 0
admin-ui/src/app/shared/components/adjustment-operation-input/adjustment-operation-input.component.scss → admin-ui/src/app/shared/components/configurable-input/configurable-input.component.scss


+ 10 - 11
admin-ui/src/app/shared/components/adjustment-operation-input/adjustment-operation-input.component.ts → admin-ui/src/app/shared/components/configurable-input/configurable-input.component.ts

@@ -21,36 +21,35 @@ import {
     Validators,
 } from '@angular/forms';
 import { Subscription } from 'rxjs';
-import { AdjustmentOperation, FacetWithValues } from 'shared/generated-types';
+import { ConfigurableOperation, FacetWithValues } from 'shared/generated-types';
 
 import { interpolateDescription } from '../../../common/utilities/interpolate-description';
 
 /**
- * A form input which renders a card with the internal form fields of the given AdjustmentOperation.
+ * A form input which renders a card with the internal form fields of the given ConfigurableOperation.
  */
 @Component({
-    selector: 'vdr-adjustment-operation-input',
-    templateUrl: './adjustment-operation-input.component.html',
-    styleUrls: ['./adjustment-operation-input.component.scss'],
+    selector: 'vdr-configurable-input',
+    templateUrl: './configurable-input.component.html',
+    styleUrls: ['./configurable-input.component.scss'],
     changeDetection: ChangeDetectionStrategy.OnPush,
     providers: [
         {
             provide: NG_VALUE_ACCESSOR,
-            useExisting: AdjustmentOperationInputComponent,
+            useExisting: ConfigurableInputComponent,
             multi: true,
         },
         {
             provide: NG_VALIDATORS,
-            useExisting: forwardRef(() => AdjustmentOperationInputComponent),
+            useExisting: forwardRef(() => ConfigurableInputComponent),
             multi: true,
         },
     ],
 })
-export class AdjustmentOperationInputComponent
-    implements OnChanges, OnDestroy, ControlValueAccessor, Validator {
-    @Input() operation: AdjustmentOperation;
+export class ConfigurableInputComponent implements OnChanges, OnDestroy, ControlValueAccessor, Validator {
+    @Input() operation: ConfigurableOperation;
     @Input() facets: FacetWithValues.Fragment[] = [];
-    @Output() remove = new EventEmitter<AdjustmentOperation>();
+    @Output() remove = new EventEmitter<ConfigurableOperation>();
     argValues: { [name: string]: any } = {};
     onChange: (val: any) => void;
     onTouch: () => void;

+ 2 - 2
admin-ui/src/app/shared/shared.module.ts

@@ -12,10 +12,10 @@ import {
     ActionBarLeftComponent,
     ActionBarRightComponent,
 } from './components/action-bar/action-bar.component';
-import { AdjustmentOperationInputComponent } from './components/adjustment-operation-input/adjustment-operation-input.component';
 import { AffixedInputComponent } from './components/affixed-input/affixed-input.component';
 import { PercentageSuffixInputComponent } from './components/affixed-input/percentage-suffix-input.component';
 import { ChipComponent } from './components/chip/chip.component';
+import { ConfigurableInputComponent } from './components/configurable-input/configurable-input.component';
 import { CurrencyInputComponent } from './components/currency-input/currency-input.component';
 import { CustomFieldControlComponent } from './components/custom-field-control/custom-field-control.component';
 import { CustomerLabelComponent } from './components/customer-label/customer-label.component';
@@ -58,7 +58,7 @@ const DECLARATIONS = [
     ActionBarComponent,
     ActionBarLeftComponent,
     ActionBarRightComponent,
-    AdjustmentOperationInputComponent,
+    ConfigurableInputComponent,
     AffixedInputComponent,
     BackgroundColorFromDirective,
     ChipComponent,

File diff suppressed because it is too large
+ 0 - 0
schema-admin.json


File diff suppressed because it is too large
+ 0 - 0
schema-shop.json


+ 22 - 22
schema.json

@@ -289,7 +289,7 @@
                   "name": null,
                   "ofType": {
                     "kind": "OBJECT",
-                    "name": "AdjustmentOperation",
+                    "name": "ConfigurableOperation",
                     "ofType": null
                   }
                 }
@@ -1051,7 +1051,7 @@
                   "name": null,
                   "ofType": {
                     "kind": "OBJECT",
-                    "name": "AdjustmentOperation",
+                    "name": "ConfigurableOperation",
                     "ofType": null
                   }
                 }
@@ -1075,7 +1075,7 @@
                   "name": null,
                   "ofType": {
                     "kind": "OBJECT",
-                    "name": "AdjustmentOperation",
+                    "name": "ConfigurableOperation",
                     "ofType": null
                   }
                 }
@@ -6278,7 +6278,7 @@
                   "name": null,
                   "ofType": {
                     "kind": "OBJECT",
-                    "name": "AdjustmentOperation",
+                    "name": "ConfigurableOperation",
                     "ofType": null
                   }
                 }
@@ -6364,7 +6364,7 @@
       },
       {
         "kind": "OBJECT",
-        "name": "AdjustmentOperation",
+        "name": "ConfigurableOperation",
         "description": null,
         "fields": [
           {
@@ -10846,7 +10846,7 @@
               "name": null,
               "ofType": {
                 "kind": "OBJECT",
-                "name": "AdjustmentOperation",
+                "name": "ConfigurableOperation",
                 "ofType": null
               }
             },
@@ -10862,7 +10862,7 @@
               "name": null,
               "ofType": {
                 "kind": "OBJECT",
-                "name": "AdjustmentOperation",
+                "name": "ConfigurableOperation",
                 "ofType": null
               }
             },
@@ -13022,7 +13022,7 @@
                   "name": null,
                   "ofType": {
                     "kind": "OBJECT",
-                    "name": "AdjustmentOperation",
+                    "name": "ConfigurableOperation",
                     "ofType": null
                   }
                 }
@@ -13046,7 +13046,7 @@
                   "name": null,
                   "ofType": {
                     "kind": "OBJECT",
-                    "name": "AdjustmentOperation",
+                    "name": "ConfigurableOperation",
                     "ofType": null
                   }
                 }
@@ -13297,7 +13297,7 @@
                   "name": null,
                   "ofType": {
                     "kind": "OBJECT",
-                    "name": "AdjustmentOperation",
+                    "name": "ConfigurableOperation",
                     "ofType": null
                   }
                 }
@@ -13321,7 +13321,7 @@
                   "name": null,
                   "ofType": {
                     "kind": "OBJECT",
-                    "name": "AdjustmentOperation",
+                    "name": "ConfigurableOperation",
                     "ofType": null
                   }
                 }
@@ -17113,7 +17113,7 @@
                   "name": null,
                   "ofType": {
                     "kind": "INPUT_OBJECT",
-                    "name": "AdjustmentOperationInput",
+                    "name": "ConfigurableOperationInput",
                     "ofType": null
                   }
                 }
@@ -17160,7 +17160,7 @@
       },
       {
         "kind": "INPUT_OBJECT",
-        "name": "AdjustmentOperationInput",
+        "name": "ConfigurableOperationInput",
         "description": null,
         "fields": null,
         "inputFields": [
@@ -17381,7 +17381,7 @@
                   "name": null,
                   "ofType": {
                     "kind": "INPUT_OBJECT",
-                    "name": "AdjustmentOperationInput",
+                    "name": "ConfigurableOperationInput",
                     "ofType": null
                   }
                 }
@@ -19628,7 +19628,7 @@
                   "name": null,
                   "ofType": {
                     "kind": "INPUT_OBJECT",
-                    "name": "AdjustmentOperationInput",
+                    "name": "ConfigurableOperationInput",
                     "ofType": null
                   }
                 }
@@ -19650,7 +19650,7 @@
                   "name": null,
                   "ofType": {
                     "kind": "INPUT_OBJECT",
-                    "name": "AdjustmentOperationInput",
+                    "name": "ConfigurableOperationInput",
                     "ofType": null
                   }
                 }
@@ -19714,7 +19714,7 @@
                 "name": null,
                 "ofType": {
                   "kind": "INPUT_OBJECT",
-                  "name": "AdjustmentOperationInput",
+                  "name": "ConfigurableOperationInput",
                   "ofType": null
                 }
               }
@@ -19732,7 +19732,7 @@
                 "name": null,
                 "ofType": {
                   "kind": "INPUT_OBJECT",
-                  "name": "AdjustmentOperationInput",
+                  "name": "ConfigurableOperationInput",
                   "ofType": null
                 }
               }
@@ -19910,7 +19910,7 @@
               "name": null,
               "ofType": {
                 "kind": "INPUT_OBJECT",
-                "name": "AdjustmentOperationInput",
+                "name": "ConfigurableOperationInput",
                 "ofType": null
               }
             },
@@ -19924,7 +19924,7 @@
               "name": null,
               "ofType": {
                 "kind": "INPUT_OBJECT",
-                "name": "AdjustmentOperationInput",
+                "name": "ConfigurableOperationInput",
                 "ofType": null
               }
             },
@@ -19980,7 +19980,7 @@
             "description": null,
             "type": {
               "kind": "INPUT_OBJECT",
-              "name": "AdjustmentOperationInput",
+              "name": "ConfigurableOperationInput",
               "ofType": null
             },
             "defaultValue": null
@@ -19990,7 +19990,7 @@
             "description": null,
             "type": {
               "kind": "INPUT_OBJECT",
-              "name": "AdjustmentOperationInput",
+              "name": "ConfigurableOperationInput",
               "ofType": null
             },
             "defaultValue": null

+ 2 - 2
server/src/api/resolvers/admin/collection.resolver.ts

@@ -1,9 +1,9 @@
 import { Args, Mutation, Query, Resolver } from '@nestjs/graphql';
 
 import {
-    AdjustmentOperation,
     CollectionQueryArgs,
     CollectionsQueryArgs,
+    ConfigurableOperation,
     CreateCollectionMutationArgs,
     MoveCollectionMutationArgs,
     Permission,
@@ -29,7 +29,7 @@ export class CollectionResolver {
     async collectionFilters(
         @Ctx() ctx: RequestContext,
         @Args() args: CollectionsQueryArgs,
-    ): Promise<AdjustmentOperation[]> {
+    ): Promise<ConfigurableOperation[]> {
         // TODO: extract to common util bc it is used in at least 3 places.
         const toAdjustmentOperation = (source: CollectionFilter<any>) => {
             return {

+ 3 - 3
server/src/api/resolvers/admin/shipping-method.resolver.ts

@@ -1,7 +1,7 @@
 import { Args, Mutation, Query, Resolver } from '@nestjs/graphql';
 
 import {
-    AdjustmentOperation,
+    ConfigurableOperation,
     CreateShippingMethodMutationArgs,
     Permission,
     ShippingMethodQueryArgs,
@@ -31,13 +31,13 @@ export class ShippingMethodResolver {
 
     @Query()
     @Allow(Permission.ReadSettings)
-    shippingEligibilityCheckers(@Args() args: ShippingMethodQueryArgs): AdjustmentOperation[] {
+    shippingEligibilityCheckers(@Args() args: ShippingMethodQueryArgs): ConfigurableOperation[] {
         return this.shippingMethodService.getShippingEligibilityCheckers();
     }
 
     @Query()
     @Allow(Permission.ReadSettings)
-    shippingCalculators(@Args() args: ShippingMethodQueryArgs): AdjustmentOperation[] {
+    shippingCalculators(@Args() args: ShippingMethodQueryArgs): ConfigurableOperation[] {
         return this.shippingMethodService.getShippingCalculators();
     }
 

+ 3 - 3
server/src/api/schema/admin-api/collection.api.graphql

@@ -1,7 +1,7 @@
 type Query {
     collections(languageCode: LanguageCode, options: CollectionListOptions): CollectionList!
     collection(id: ID!, languageCode: LanguageCode): Collection
-    collectionFilters: [AdjustmentOperation!]!
+    collectionFilters: [ConfigurableOperation!]!
 }
 
 type Mutation {
@@ -35,7 +35,7 @@ input CreateCollectionInput {
     featuredAssetId: ID
     assetIds: [ID!]
     parentId: ID
-    filters: [AdjustmentOperationInput!]!
+    filters: [ConfigurableOperationInput!]!
     translations: [CollectionTranslationInput!]!
 }
 
@@ -44,6 +44,6 @@ input UpdateCollectionInput {
     featuredAssetId: ID
     parentId: ID
     assetIds: [ID!]
-    filters: [AdjustmentOperationInput!]!
+    filters: [ConfigurableOperationInput!]!
     translations: [CollectionTranslationInput!]!
 }

+ 4 - 4
server/src/api/schema/admin-api/promotion.api.graphql

@@ -16,14 +16,14 @@ input PromotionListOptions
 input CreatePromotionInput {
     name: String!
     enabled: Boolean!
-    conditions: [AdjustmentOperationInput!]!
-    actions: [AdjustmentOperationInput!]!
+    conditions: [ConfigurableOperationInput!]!
+    actions: [ConfigurableOperationInput!]!
 }
 
 input UpdatePromotionInput {
     id: ID!
     name: String
     enabled: Boolean
-    conditions: [AdjustmentOperationInput!]
-    actions: [AdjustmentOperationInput!]
+    conditions: [ConfigurableOperationInput!]
+    actions: [ConfigurableOperationInput!]
 }

+ 6 - 6
server/src/api/schema/admin-api/shipping-method.api.graphql

@@ -1,8 +1,8 @@
 type Query {
     shippingMethods(options: ShippingMethodListOptions): ShippingMethodList!
     shippingMethod(id: ID!): ShippingMethod
-    shippingEligibilityCheckers: [AdjustmentOperation!]!
-    shippingCalculators: [AdjustmentOperation!]!
+    shippingEligibilityCheckers: [ConfigurableOperation!]!
+    shippingCalculators: [ConfigurableOperation!]!
 }
 
 type Mutation {
@@ -18,14 +18,14 @@ input ShippingMethodListOptions
 input CreateShippingMethodInput {
     code: String!
     description: String!
-    checker: AdjustmentOperationInput!
-    calculator: AdjustmentOperationInput!
+    checker: ConfigurableOperationInput!
+    calculator: ConfigurableOperationInput!
 }
 
 input UpdateShippingMethodInput {
     id: ID!
     code: String
     description: String
-    checker: AdjustmentOperationInput
-    calculator: AdjustmentOperationInput
+    checker: ConfigurableOperationInput
+    calculator: ConfigurableOperationInput
 }

+ 2 - 2
server/src/api/schema/common/common-types.graphql

@@ -26,7 +26,7 @@ type ConfigArg {
     value: String
 }
 
-type AdjustmentOperation {
+type ConfigurableOperation {
     code: String!
     args: [ConfigArg!]!
     description: String!
@@ -49,7 +49,7 @@ input ConfigArgInput {
     value: String!
 }
 
-input AdjustmentOperationInput {
+input ConfigurableOperationInput {
     code: String!
     arguments: [ConfigArgInput!]!
 }

+ 1 - 1
server/src/api/schema/type/collection.type.graphql

@@ -10,7 +10,7 @@ type Collection implements Node {
     assets: [Asset!]!
     parent: Collection!
     children: [Collection!]
-    filters: [AdjustmentOperation!]!
+    filters: [ConfigurableOperation!]!
     translations: [CollectionTranslation!]!
     productVariants(options: ProductVariantListOptions): ProductVariantList!
 }

+ 4 - 4
server/src/api/schema/type/promotion.type.graphql

@@ -4,13 +4,13 @@ type Promotion implements Node {
     updatedAt: DateTime!
     name: String!
     enabled: Boolean!
-    conditions: [AdjustmentOperation!]!
-    actions: [AdjustmentOperation!]!
+    conditions: [ConfigurableOperation!]!
+    actions: [ConfigurableOperation!]!
 }
 
 type AdjustmentOperations {
-    conditions: [AdjustmentOperation!]!
-    actions: [AdjustmentOperation!]!
+    conditions: [ConfigurableOperation!]!
+    actions: [ConfigurableOperation!]!
 }
 
 type PromotionList implements PaginatedList {

+ 2 - 2
server/src/api/schema/type/shipping-method.type.graphql

@@ -4,8 +4,8 @@ type ShippingMethod implements Node {
     updatedAt: DateTime!
     code: String!
     description: String!
-    checker: AdjustmentOperation!
-    calculator: AdjustmentOperation!
+    checker: ConfigurableOperation!
+    calculator: ConfigurableOperation!
 }
 
 type ShippingMethodList implements PaginatedList {

+ 2 - 2
server/src/entity/collection/collection.entity.ts

@@ -9,7 +9,7 @@ import {
     TreeParent,
 } from 'typeorm';
 
-import { AdjustmentOperation } from '../../../../shared/generated-types';
+import { ConfigurableOperation } from '../../../../shared/generated-types';
 import { DeepPartial, HasCustomFields } from '../../../../shared/shared-types';
 import { ChannelAware } from '../../common/types/common-types';
 import { LocaleString, Translatable, Translation } from '../../common/types/locale-types';
@@ -58,7 +58,7 @@ export class Collection extends VendureEntity implements Translatable, HasCustom
     @JoinTable()
     assets: Asset[];
 
-    @Column('simple-json') filters: AdjustmentOperation[];
+    @Column('simple-json') filters: ConfigurableOperation[];
 
     @ManyToMany(type => ProductVariant, productVariant => productVariant.collections)
     @JoinTable()

+ 3 - 3
server/src/entity/promotion/promotion.entity.ts

@@ -1,6 +1,6 @@
 import { Column, Entity, JoinTable, ManyToMany } from 'typeorm';
 
-import { Adjustment, AdjustmentOperation, AdjustmentType } from '../../../../shared/generated-types';
+import { Adjustment, AdjustmentType, ConfigurableOperation } from '../../../../shared/generated-types';
 import { DeepPartial } from '../../../../shared/shared-types';
 import { AdjustmentSource } from '../../common/types/adjustment-source';
 import { ChannelAware, SoftDeletable } from '../../common/types/common-types';
@@ -70,9 +70,9 @@ export class Promotion extends AdjustmentSource implements ChannelAware, SoftDel
     @JoinTable()
     channels: Channel[];
 
-    @Column('simple-json') conditions: AdjustmentOperation[];
+    @Column('simple-json') conditions: ConfigurableOperation[];
 
-    @Column('simple-json') actions: AdjustmentOperation[];
+    @Column('simple-json') actions: ConfigurableOperation[];
 
     /**
      * The PriorityScore is used to determine the sequence in which multiple promotions are tested

+ 3 - 3
server/src/entity/shipping-method/shipping-method.entity.ts

@@ -1,6 +1,6 @@
 import { Column, Entity, JoinTable, ManyToMany } from 'typeorm';
 
-import { Adjustment, AdjustmentOperation, AdjustmentType } from '../../../../shared/generated-types';
+import { Adjustment, AdjustmentType, ConfigurableOperation } from '../../../../shared/generated-types';
 import { DeepPartial } from '../../../../shared/shared-types';
 import { AdjustmentSource } from '../../common/types/adjustment-source';
 import { ChannelAware } from '../../common/types/common-types';
@@ -38,9 +38,9 @@ export class ShippingMethod extends AdjustmentSource implements ChannelAware {
 
     @Column() description: string;
 
-    @Column('simple-json') checker: AdjustmentOperation;
+    @Column('simple-json') checker: ConfigurableOperation;
 
-    @Column('simple-json') calculator: AdjustmentOperation;
+    @Column('simple-json') calculator: ConfigurableOperation;
 
     @ManyToMany(type => Channel)
     @JoinTable()

+ 4 - 4
server/src/service/services/collection.service.ts

@@ -2,7 +2,7 @@ import { InjectConnection } from '@nestjs/typeorm';
 import { Connection } from 'typeorm';
 
 import {
-    AdjustmentOperation,
+    ConfigurableOperation,
     CreateCollectionInput,
     MoveCollectionInput,
     UpdateCollectionInput,
@@ -216,8 +216,8 @@ export class CollectionService {
 
     private getCollectionFiltersFromInput(
         input: CreateCollectionInput | UpdateCollectionInput,
-    ): AdjustmentOperation[] {
-        const filters: AdjustmentOperation[] = [];
+    ): ConfigurableOperation[] {
+        const filters: ConfigurableOperation[] = [];
         if (input.filters) {
             for (const filter of input.filters) {
                 const match = this.getFilterByCode(filter.code);
@@ -238,7 +238,7 @@ export class CollectionService {
         return filters;
     }
 
-    private async applyCollectionFilters(filters: AdjustmentOperation[]): Promise<ProductVariant[]> {
+    private async applyCollectionFilters(filters: ConfigurableOperation[]): Promise<ProductVariant[]> {
         let qb = this.connection.getRepository(ProductVariant).createQueryBuilder('productVariant');
         for (const filter of filters) {
             if (filter.code === facetValueCollectionFilter.code) {

+ 7 - 7
server/src/service/services/promotion.service.ts

@@ -3,8 +3,8 @@ import { InjectConnection } from '@nestjs/typeorm';
 import { Connection } from 'typeorm';
 
 import {
-    AdjustmentOperation,
-    AdjustmentOperationInput,
+    ConfigurableOperation,
+    ConfigurableOperationInput,
     CreatePromotionInput,
     DeletionResponse,
     DeletionResult,
@@ -65,8 +65,8 @@ export class PromotionService {
      * Returns all available AdjustmentOperations.
      */
     getAdjustmentOperations(): {
-        conditions: AdjustmentOperation[];
-        actions: AdjustmentOperation[];
+        conditions: ConfigurableOperation[];
+        actions: ConfigurableOperation[];
     } {
         const toAdjustmentOperation = (source: PromotionCondition | PromotionAction) => {
             return {
@@ -135,10 +135,10 @@ export class PromotionService {
      */
     private parseOperationArgs(
         type: 'condition' | 'action',
-        input: AdjustmentOperationInput,
-    ): AdjustmentOperation {
+        input: ConfigurableOperationInput,
+    ): ConfigurableOperation {
         const match = this.getAdjustmentOperationByCode(type, input.code);
-        const output: AdjustmentOperation = {
+        const output: ConfigurableOperation = {
             code: input.code,
             description: match.description,
             args: input.arguments.map((inputArg, i) => {

+ 7 - 7
server/src/service/services/shipping-method.service.ts

@@ -3,8 +3,8 @@ import { InjectConnection } from '@nestjs/typeorm';
 import { Connection } from 'typeorm';
 
 import {
-    AdjustmentOperation,
-    AdjustmentOperationInput,
+    ConfigurableOperation,
+    ConfigurableOperationInput,
     CreateShippingMethodInput,
     UpdateShippingMethodInput,
 } from '../../../../shared/generated-types';
@@ -96,11 +96,11 @@ export class ShippingMethodService {
         return assertFound(this.findOne(shippingMethod.id));
     }
 
-    getShippingEligibilityCheckers(): AdjustmentOperation[] {
+    getShippingEligibilityCheckers(): ConfigurableOperation[] {
         return this.shippingEligibilityCheckers.map(this.toAdjustmentOperation);
     }
 
-    getShippingCalculators(): AdjustmentOperation[] {
+    getShippingCalculators(): ConfigurableOperation[] {
         return this.shippingCalculators.map(this.toAdjustmentOperation);
     }
 
@@ -120,10 +120,10 @@ export class ShippingMethodService {
      * Converts the input values of the "create" and "update" mutations into the format expected by the ShippingMethod entity.
      */
     private parseOperationArgs(
-        input: AdjustmentOperationInput,
+        input: ConfigurableOperationInput,
         adjustmentSource: ShippingEligibilityChecker | ShippingCalculator,
-    ): AdjustmentOperation {
-        const output: AdjustmentOperation = {
+    ): ConfigurableOperation {
+        const output: ConfigurableOperation = {
             code: input.code,
             description: adjustmentSource.description,
             args: input.arguments.map((inputArg, i) => {

+ 15 - 15
shared/generated-shop-types.ts

@@ -1,5 +1,5 @@
 // tslint:disable
-// Generated in 2019-03-05T13:49:42+01:00
+// Generated in 2019-03-05T20:52:07+01:00
 export type Maybe<T> = T | null;
 
 export interface OrderListOptions {
@@ -346,17 +346,17 @@ export interface UpdateAddressInput {
     customFields?: Maybe<Json>;
 }
 
-export interface AdjustmentOperationInput {
-    code: string;
-
-    arguments: ConfigArgInput[];
-}
-
 export interface ConfigArgInput {
     name: string;
 
     value: string;
 }
+
+export interface ConfigurableOperationInput {
+    code: string;
+
+    arguments: ConfigArgInput[];
+}
 /** ISO 639-1 language code */
 export enum LanguageCode {
     aa = 'aa',
@@ -1266,12 +1266,12 @@ export interface ShippingMethod extends Node {
 
     description: string;
 
-    checker: AdjustmentOperation;
+    checker: ConfigurableOperation;
 
-    calculator: AdjustmentOperation;
+    calculator: ConfigurableOperation;
 }
 
-export interface AdjustmentOperation {
+export interface ConfigurableOperation {
     code: string;
 
     args: ConfigArg[];
@@ -1372,7 +1372,7 @@ export interface Collection extends Node {
 
     children?: Maybe<Collection[]>;
 
-    filters: AdjustmentOperation[];
+    filters: ConfigurableOperation[];
 
     translations: CollectionTranslation[];
 
@@ -1586,9 +1586,9 @@ export interface LoginResult {
 }
 
 export interface AdjustmentOperations {
-    conditions: AdjustmentOperation[];
+    conditions: ConfigurableOperation[];
 
-    actions: AdjustmentOperation[];
+    actions: ConfigurableOperation[];
 }
 
 export interface Administrator extends Node {
@@ -1694,9 +1694,9 @@ export interface Promotion extends Node {
 
     enabled: boolean;
 
-    conditions: AdjustmentOperation[];
+    conditions: ConfigurableOperation[];
 
-    actions: AdjustmentOperation[];
+    actions: ConfigurableOperation[];
 }
 
 export interface PromotionList extends PaginatedList {

+ 35 - 35
shared/generated-types.ts

@@ -1,5 +1,5 @@
 // tslint:disable
-// Generated in 2019-03-05T13:49:43+01:00
+// Generated in 2019-03-05T20:52:08+01:00
 export type Maybe<T> = T | null;
 
 
@@ -712,14 +712,14 @@ export interface CreateCollectionInput {
   
   parentId?: Maybe<string>;
   
-  filters: AdjustmentOperationInput[];
+  filters: ConfigurableOperationInput[];
   
   translations: CollectionTranslationInput[];
   
   customFields?: Maybe<Json>;
 }
 
-export interface AdjustmentOperationInput {
+export interface ConfigurableOperationInput {
   
   code: string;
   
@@ -756,7 +756,7 @@ export interface UpdateCollectionInput {
   
   assetIds?: Maybe<string[]>;
   
-  filters: AdjustmentOperationInput[];
+  filters: ConfigurableOperationInput[];
   
   translations: CollectionTranslationInput[];
   
@@ -1117,9 +1117,9 @@ export interface CreatePromotionInput {
   
   enabled: boolean;
   
-  conditions: AdjustmentOperationInput[];
+  conditions: ConfigurableOperationInput[];
   
-  actions: AdjustmentOperationInput[];
+  actions: ConfigurableOperationInput[];
 }
 
 export interface UpdatePromotionInput {
@@ -1130,9 +1130,9 @@ export interface UpdatePromotionInput {
   
   enabled?: Maybe<boolean>;
   
-  conditions?: Maybe<AdjustmentOperationInput[]>;
+  conditions?: Maybe<ConfigurableOperationInput[]>;
   
-  actions?: Maybe<AdjustmentOperationInput[]>;
+  actions?: Maybe<ConfigurableOperationInput[]>;
 }
 
 export interface CreateRoleInput {
@@ -1161,9 +1161,9 @@ export interface CreateShippingMethodInput {
   
   description: string;
   
-  checker: AdjustmentOperationInput;
+  checker: ConfigurableOperationInput;
   
-  calculator: AdjustmentOperationInput;
+  calculator: ConfigurableOperationInput;
 }
 
 export interface UpdateShippingMethodInput {
@@ -1174,9 +1174,9 @@ export interface UpdateShippingMethodInput {
   
   description?: Maybe<string>;
   
-  checker?: Maybe<AdjustmentOperationInput>;
+  checker?: Maybe<ConfigurableOperationInput>;
   
-  calculator?: Maybe<AdjustmentOperationInput>;
+  calculator?: Maybe<ConfigurableOperationInput>;
 }
 
 export interface CreateTaxCategoryInput {
@@ -2638,7 +2638,7 @@ export namespace GetCollectionFilters {
     collectionFilters: CollectionFilters[];
   }
 
-  export type CollectionFilters = AdjustmentOperation.Fragment
+  export type CollectionFilters = ConfigurableOperation.Fragment
 }
 
 export namespace GetCollectionList {
@@ -2833,9 +2833,9 @@ export namespace GetAdjustmentOperations {
     conditions: Conditions[];
   } 
 
-  export type Actions = AdjustmentOperation.Fragment
+  export type Actions = ConfigurableOperation.Fragment
 
-  export type Conditions = AdjustmentOperation.Fragment
+  export type Conditions = ConfigurableOperation.Fragment
 }
 
 export namespace CreatePromotion {
@@ -3427,9 +3427,9 @@ export namespace GetShippingMethodOperations {
     shippingCalculators: ShippingCalculators[];
   }
 
-  export type ShippingEligibilityCheckers = AdjustmentOperation.Fragment
+  export type ShippingEligibilityCheckers = ConfigurableOperation.Fragment
 
-  export type ShippingCalculators = AdjustmentOperation.Fragment
+  export type ShippingCalculators = ConfigurableOperation.Fragment
 }
 
 export namespace CreateShippingMethod {
@@ -4153,7 +4153,7 @@ export namespace Collection {
 
   export type Assets =Asset.Fragment
 
-  export type Filters =AdjustmentOperation.Fragment
+  export type Filters =ConfigurableOperation.Fragment
 
   export type Translations = {
     __typename?: "CollectionTranslation";
@@ -4184,9 +4184,9 @@ export namespace Collection {
   }
 }
 
-export namespace AdjustmentOperation {
+export namespace ConfigurableOperation {
   export type Fragment = {
-    __typename?: "AdjustmentOperation";
+    __typename?: "ConfigurableOperation";
     
     args: Args[];
     
@@ -4225,9 +4225,9 @@ export namespace Promotion {
     actions: Actions[];
   }
 
-  export type Conditions =AdjustmentOperation.Fragment
+  export type Conditions =ConfigurableOperation.Fragment
 
-  export type Actions =AdjustmentOperation.Fragment
+  export type Actions =ConfigurableOperation.Fragment
 }
 
 export namespace Country {
@@ -4413,9 +4413,9 @@ export namespace ShippingMethod {
     calculator: Calculator;
   }
 
-  export type Checker =AdjustmentOperation.Fragment
+  export type Checker =ConfigurableOperation.Fragment
 
-  export type Calculator =AdjustmentOperation.Fragment
+  export type Calculator =ConfigurableOperation.Fragment
 }
 
 
@@ -4479,7 +4479,7 @@ export interface Query {
   
   collection?: Maybe<Collection>;
   
-  collectionFilters: AdjustmentOperation[];
+  collectionFilters: ConfigurableOperation[];
   
   config: Config;
   
@@ -4533,9 +4533,9 @@ export interface Query {
   
   shippingMethod?: Maybe<ShippingMethod>;
   
-  shippingEligibilityCheckers: AdjustmentOperation[];
+  shippingEligibilityCheckers: ConfigurableOperation[];
   
-  shippingCalculators: AdjustmentOperation[];
+  shippingCalculators: ConfigurableOperation[];
   
   taxCategories: TaxCategory[];
   
@@ -4759,7 +4759,7 @@ export interface Collection extends Node {
   
   children?: Maybe<Collection[]>;
   
-  filters: AdjustmentOperation[];
+  filters: ConfigurableOperation[];
   
   translations: CollectionTranslation[];
   
@@ -4769,7 +4769,7 @@ export interface Collection extends Node {
 }
 
 
-export interface AdjustmentOperation {
+export interface ConfigurableOperation {
   
   code: string;
   
@@ -5269,9 +5269,9 @@ export interface ShippingMethod extends Node {
   
   description: string;
   
-  checker: AdjustmentOperation;
+  checker: ConfigurableOperation;
   
-  calculator: AdjustmentOperation;
+  calculator: ConfigurableOperation;
 }
 
 
@@ -5477,9 +5477,9 @@ export interface Promotion extends Node {
   
   enabled: boolean;
   
-  conditions: AdjustmentOperation[];
+  conditions: ConfigurableOperation[];
   
-  actions: AdjustmentOperation[];
+  actions: ConfigurableOperation[];
 }
 
 
@@ -5493,9 +5493,9 @@ export interface PromotionList extends PaginatedList {
 
 export interface AdjustmentOperations {
   
-  conditions: AdjustmentOperation[];
+  conditions: ConfigurableOperation[];
   
-  actions: AdjustmentOperation[];
+  actions: ConfigurableOperation[];
 }
 
 

Some files were not shown because too many files changed in this diff