Преглед на файлове

refactor(server): Move all .graphql files into api module

Michael Bromley преди 7 години
родител
ревизия
4363b273a6
променени са 70 файла, в които са добавени 683 реда и са изтрити 680 реда
  1. 4 2
      server/src/api/config/graphql-config.service.ts
  2. 16 5
      server/src/api/schema/admin-api/administrator.api.graphql
  3. 5 5
      server/src/api/schema/admin-api/asset.api.graphql
  4. 0 10
      server/src/api/schema/admin-api/auth.api.graphql
  5. 12 11
      server/src/api/schema/admin-api/channel.api.graphql
  6. 1 1
      server/src/api/schema/admin-api/config.api.graphql
  7. 18 3
      server/src/api/schema/admin-api/country.api.graphql
  8. 10 0
      server/src/api/schema/admin-api/customer-group.api.graphql
  9. 46 5
      server/src/api/schema/admin-api/customer.api.graphql
  10. 40 5
      server/src/api/schema/admin-api/facet.api.graphql
  11. 4 0
      server/src/api/schema/admin-api/global-settings.api.graphql
  12. 3 0
      server/src/api/schema/admin-api/import.api.graphql
  13. 0 11
      server/src/api/schema/admin-api/order.api.graphql
  14. 7 0
      server/src/api/schema/admin-api/payment-method.api.graphql
  15. 24 5
      server/src/api/schema/admin-api/product-category.api.graphql
  16. 40 0
      server/src/api/schema/admin-api/product-option-group.api.graphql
  17. 21 0
      server/src/api/schema/admin-api/product-search.api.graphql
  18. 51 5
      server/src/api/schema/admin-api/product.api.graphql
  19. 15 10
      server/src/api/schema/admin-api/promotion.api.graphql
  20. 14 5
      server/src/api/schema/admin-api/role.api.graphql
  21. 15 5
      server/src/api/schema/admin-api/shipping-method.api.graphql
  22. 10 0
      server/src/api/schema/admin-api/tax-category.api.graphql
  23. 19 5
      server/src/api/schema/admin-api/tax-rate.api.graphql
  24. 10 0
      server/src/api/schema/admin-api/zone.api.graphql
  25. 0 0
      server/src/api/schema/common/common-types.graphql
  26. 0 0
      server/src/api/schema/common/currency-code.graphql
  27. 0 0
      server/src/api/schema/common/language-code.graphql
  28. 0 0
      server/src/api/schema/common/permission.graphql
  29. 16 0
      server/src/api/schema/type/address.type.graphql
  30. 14 0
      server/src/api/schema/type/administrator.type.graphql
  31. 5 4
      server/src/api/schema/type/asset.type.graphql
  32. 9 0
      server/src/api/schema/type/auth.type.graphql
  33. 12 0
      server/src/api/schema/type/channel.type.graphql
  34. 21 0
      server/src/api/schema/type/country.type.graphql
  35. 6 0
      server/src/api/schema/type/customer-group.type.graphql
  36. 3 15
      server/src/api/schema/type/customer.type.graphql
  37. 18 0
      server/src/api/schema/type/facet-value.type.graphql
  38. 3 16
      server/src/api/schema/type/facet.type.graphql
  39. 0 4
      server/src/api/schema/type/global-settings.type.graphql
  40. 0 4
      server/src/api/schema/type/import.type.graphql
  41. 82 0
      server/src/api/schema/type/order.type.graphql
  42. 0 7
      server/src/api/schema/type/payment-method.type.graphql
  43. 3 22
      server/src/api/schema/type/product-category.type.graphql
  44. 12 12
      server/src/api/schema/type/product-option-group.type.graphql
  45. 0 22
      server/src/api/schema/type/product-search.type.graphql
  46. 31 28
      server/src/api/schema/type/product.type.graphql
  47. 19 0
      server/src/api/schema/type/promotion.type.graphql
  48. 14 0
      server/src/api/schema/type/role.type.graphql
  49. 14 0
      server/src/api/schema/type/shipping-method.type.graphql
  50. 0 10
      server/src/api/schema/type/tax-category.type.graphql
  51. 16 0
      server/src/api/schema/type/tax-rate.type.graphql
  52. 0 0
      server/src/api/schema/type/user.type.graphql
  53. 0 10
      server/src/api/schema/type/zone.type.graphql
  54. 0 13
      server/src/api/types/channel.api.graphql
  55. 0 11
      server/src/api/types/product-option.api.graphql
  56. 0 45
      server/src/entity/address/address.graphql
  57. 0 26
      server/src/entity/administrator/administrator.graphql
  58. 0 36
      server/src/entity/country/country.graphql
  59. 0 16
      server/src/entity/customer-group/customer-group.graphql
  60. 0 41
      server/src/entity/facet-value/facet-value.graphql
  61. 0 10
      server/src/entity/order-item/order-item.graphql
  62. 0 14
      server/src/entity/order-line/order-line.graphql
  63. 0 34
      server/src/entity/order/order.graphql
  64. 0 10
      server/src/entity/payment/payment.graphql
  65. 0 28
      server/src/entity/product-option/product-option.graphql
  66. 0 48
      server/src/entity/product/product.graphql
  67. 0 24
      server/src/entity/promotion/promotion.graphql
  68. 0 23
      server/src/entity/role/role.graphql
  69. 0 24
      server/src/entity/shipping-method/shipping-method.graphql
  70. 0 30
      server/src/entity/tax-rate/tax-rate.graphql

+ 4 - 2
server/src/api/config/graphql-config.service.ts

@@ -15,7 +15,9 @@ import { addGraphQLCustomFields } from './graphql-custom-fields';
 
 @Injectable()
 export class GraphqlConfigService implements GqlOptionsFactory {
-    readonly typePaths = path.join(__dirname, '/../../**/*.graphql');
+    readonly typePaths = ['type', 'admin-api', 'common'].map(p =>
+        path.join(__dirname, '../schema', p, '**/*.graphql'),
+    );
 
     constructor(
         private i18nService: I18nService,
@@ -62,7 +64,7 @@ export class GraphqlConfigService implements GqlOptionsFactory {
      */
     private createTypeDefs(): string {
         const customFields = this.configService.customFields;
-        const typeDefs = this.typesLoader.mergeTypesByPaths(this.typePaths);
+        const typeDefs = this.typesLoader.mergeTypesByPaths(...this.typePaths);
         let schema = addGraphQLCustomFields(typeDefs, customFields);
         const pluginTypes = this.configService.plugins
             .map(p => (p.defineGraphQlTypes ? p.defineGraphQlTypes() : undefined))

+ 16 - 5
server/src/api/types/administrator.api.graphql → server/src/api/schema/admin-api/administrator.api.graphql

@@ -12,11 +12,6 @@ type Mutation {
     assignRoleToAdministrator(administratorId: ID!, roleId: ID!): Administrator!
 }
 
-type AdministratorList implements PaginatedList {
-    items: [Administrator!]!
-    totalItems: Int!
-}
-
 input AdministratorListOptions {
     take: Int
     skip: Int
@@ -41,3 +36,19 @@ input AdministratorFilterParameter {
     updatedAt: DateOperators
 }
 
+input CreateAdministratorInput {
+    firstName: String!
+    lastName: String!
+    emailAddress: String!
+    password: String!
+    roleIds: [ID!]!
+}
+
+input UpdateAdministratorInput {
+    id: ID!
+    firstName: String
+    lastName: String
+    emailAddress: String
+    password: String
+    roleIds: [ID!]
+}

+ 5 - 5
server/src/api/types/asset.api.graphql → server/src/api/schema/admin-api/asset.api.graphql

@@ -8,11 +8,6 @@ type Mutation {
     createAssets(input: [CreateAssetInput!]!): [Asset!]!
 }
 
-type AssetList implements PaginatedList {
-    items: [Asset!]!
-    totalItems: Int!
-}
-
 input AssetListOptions {
     take: Int
     skip: Int
@@ -35,3 +30,8 @@ input AssetFilterParameter {
     createdAt: DateOperators
     updatedAt: DateOperators
 }
+
+input CreateAssetInput {
+    file: Upload!
+}
+

+ 0 - 10
server/src/api/types/auth.api.graphql → server/src/api/schema/admin-api/auth.api.graphql

@@ -13,16 +13,6 @@ type Mutation {
     refreshCustomerVerification(emailAddress: String!): Boolean!
 }
 
-type LoginResult {
-    user: CurrentUser!
-}
-
-type CurrentUser {
-    id: ID!
-    identifier: String!
-    channelTokens: [String!]!
-}
-
 input RegisterCustomerInput {
     emailAddress: String!
     title: String

+ 12 - 11
server/src/entity/channel/channel.graphql → server/src/api/schema/admin-api/channel.api.graphql

@@ -1,14 +1,15 @@
-type Channel implements Node {
-    id: ID!
-    createdAt: DateTime!
-    updatedAt: DateTime!
-    code: String!
-    token: String!
-    defaultTaxZone: Zone
-    defaultShippingZone: Zone
-    defaultLanguageCode: LanguageCode!
-    currencyCode: CurrencyCode!
-    pricesIncludeTax: Boolean!
+type Query {
+    channels: [Channel!]!
+    channel(id: ID!): Channel
+    activeChannel: Channel!
+}
+
+type Mutation {
+    "Create a new Channel"
+    createChannel(input: CreateChannelInput!): Channel!
+
+    "Update an existing Channel"
+    updateChannel(input: UpdateChannelInput!): Channel!
 }
 
 input CreateChannelInput {

+ 1 - 1
server/src/api/types/config.api.graphql → server/src/api/schema/admin-api/config.api.graphql

@@ -1,5 +1,5 @@
 type Query {
-  config: Config!
+    config: Config!
 }
 
 type Config {

+ 18 - 3
server/src/api/types/country.api.graphql → server/src/api/schema/admin-api/country.api.graphql

@@ -15,9 +15,24 @@ type Mutation {
     deleteCountry(id: ID!): DeletionResponse!
 }
 
-type CountryList implements PaginatedList {
-    items: [Country!]!
-    totalItems: Int!
+input CountryTranslationInput {
+    id: ID
+    languageCode: LanguageCode!
+    name: String
+}
+
+input CreateCountryInput {
+    code: String!
+    translations: [CountryTranslationInput!]!
+    enabled: Boolean!
+}
+
+
+input UpdateCountryInput {
+    id: ID!
+    code: String
+    translations: [CountryTranslationInput!]
+    enabled: Boolean
 }
 
 input CountryListOptions {

+ 10 - 0
server/src/api/types/customer-group.api.graphql → server/src/api/schema/admin-api/customer-group.api.graphql

@@ -13,3 +13,13 @@ type Mutation {
     "Remove Customers from a CustomerGroup"
     removeCustomersFromGroup(customerGroupId: ID!, customerIds: [ID!]!): CustomerGroup!
 }
+
+input CreateCustomerGroupInput {
+    name: String!
+    customerIds: [ID!]
+}
+
+input UpdateCustomerGroupInput {
+    id: ID!
+    name: String
+}

+ 46 - 5
server/src/api/types/customer.api.graphql → server/src/api/schema/admin-api/customer.api.graphql

@@ -21,11 +21,6 @@ type Mutation {
     updateCustomerAddress(input: UpdateAddressInput!): Address!
 }
 
-type CustomerList implements PaginatedList {
-    items: [Customer!]!
-    totalItems: Int!
-}
-
 input CustomerListOptions {
     take: Int
     skip: Int
@@ -51,3 +46,49 @@ input CustomerFilterParameter {
     createdAt: DateOperators
     updatedAt: DateOperators
 }
+
+input CreateCustomerInput {
+    title: String
+    firstName: String!
+    lastName: String!
+    phoneNumber: String
+    emailAddress: String!
+}
+
+input UpdateCustomerInput {
+    id: ID!
+    title: String
+    firstName: String
+    lastName: String
+    phoneNumber: String
+    emailAddress: String
+}
+
+input CreateAddressInput {
+    fullName: String
+    company: String
+    streetLine1: String!
+    streetLine2: String
+    city: String
+    province: String
+    postalCode: String
+    countryCode: String!
+    phoneNumber: String
+    defaultShippingAddress: Boolean
+    defaultBillingAddress: Boolean
+}
+
+input UpdateAddressInput {
+    id: ID!
+    fullName: String
+    company: String
+    streetLine1: String
+    streetLine2: String
+    city: String
+    province: String
+    postalCode: String
+    countryCode: String
+    phoneNumber: String
+    defaultShippingAddress: Boolean
+    defaultBillingAddress: Boolean
+}

+ 40 - 5
server/src/api/types/facet.api.graphql → server/src/api/schema/admin-api/facet.api.graphql

@@ -23,11 +23,6 @@ type Mutation {
     deleteFacetValues(ids: [ID!]!, force: Boolean): [DeletionResponse!]!
 }
 
-type FacetList implements PaginatedList {
-    items: [Facet!]!
-    totalItems: Int!
-}
-
 input FacetListOptions {
     take: Int
     skip: Int
@@ -49,3 +44,43 @@ input FacetFilterParameter {
     createdAt: DateOperators
     updatedAt: DateOperators
 }
+
+input FacetTranslationInput {
+    id: ID
+    languageCode: LanguageCode!
+    name: String
+}
+
+input CreateFacetInput {
+    code: String!
+    translations: [FacetTranslationInput!]!
+    values: [CreateFacetValueWithFacetInput!]
+}
+
+input UpdateFacetInput {
+    id: ID!
+    code: String
+    translations: [FacetTranslationInput!]
+}
+input FacetValueTranslationInput {
+    id: ID
+    languageCode: LanguageCode!
+    name: String
+}
+
+input CreateFacetValueWithFacetInput {
+    code: String!
+    translations: [FacetValueTranslationInput!]!
+}
+
+input CreateFacetValueInput {
+    facetId: ID!
+    code: String!
+    translations: [FacetValueTranslationInput!]!
+}
+
+input UpdateFacetValueInput {
+    id: ID!
+    code: String
+    translations: [FacetValueTranslationInput!]
+}

+ 4 - 0
server/src/api/types/global-settings.api.graphql → server/src/api/schema/admin-api/global-settings.api.graphql

@@ -5,3 +5,7 @@ type Query {
 type Mutation {
     updateGlobalSettings(input: UpdateGlobalSettingsInput!): GlobalSettings!
 }
+
+input UpdateGlobalSettingsInput {
+    availableLanguages: [LanguageCode!]
+}

+ 3 - 0
server/src/api/schema/admin-api/import.api.graphql

@@ -0,0 +1,3 @@
+type Mutation {
+    importProducts(csvFile: Upload!): ImportInfo
+}

+ 0 - 11
server/src/api/types/order.api.graphql → server/src/api/schema/admin-api/order.api.graphql

@@ -18,17 +18,6 @@ type Mutation {
     setCustomerForOrder(input: CreateCustomerInput!): Order
 }
 
-type OrderList implements PaginatedList {
-    items: [Order!]!
-    totalItems: Int!
-}
-
-type ShippingMethodQuote {
-    id: ID!
-    price: Int!
-    description: String!
-}
-
 input PaymentInput {
     method: String!
     metadata: JSON!

+ 7 - 0
server/src/api/types/payment-method.api.graphql → server/src/api/schema/admin-api/payment-method.api.graphql

@@ -32,3 +32,10 @@ input PaymentMethodFilterParameter {
     createdAt: DateOperators
     updatedAt: DateOperators
 }
+
+input UpdatePaymentMethodInput {
+    id: ID!
+    code: String
+    enabled: Boolean
+    configArgs: [ConfigArgInput!]
+}

+ 24 - 5
server/src/api/types/product-category.api.graphql → server/src/api/schema/admin-api/product-category.api.graphql

@@ -14,11 +14,6 @@ type Mutation {
     moveProductCategory(input: MoveProductCategoryInput!): ProductCategory!
 }
 
-type ProductCategoryList implements PaginatedList {
-    items: [ProductCategory!]!
-    totalItems: Int!
-}
-
 input ProductCategoryListOptions {
     take: Int
     skip: Int
@@ -46,3 +41,27 @@ input MoveProductCategoryInput {
     parentId: ID!
     index: Int!
 }
+
+input ProductCategoryTranslationInput {
+    id: ID
+    languageCode: LanguageCode!
+    name: String
+    description: String
+}
+
+input CreateProductCategoryInput {
+    featuredAssetId: ID
+    assetIds: [ID!]
+    parentId: ID
+    facetValueIds: [ID!]
+    translations: [ProductCategoryTranslationInput!]!
+}
+
+input UpdateProductCategoryInput {
+    id: ID!
+    featuredAssetId: ID
+    parentId: ID
+    assetIds: [ID!]
+    facetValueIds: [ID!]
+    translations: [ProductCategoryTranslationInput!]!
+}

+ 40 - 0
server/src/api/schema/admin-api/product-option-group.api.graphql

@@ -0,0 +1,40 @@
+type Query {
+    productOptionGroups(languageCode: LanguageCode, filterTerm: String): [ProductOptionGroup!]!
+    productOptionGroup(id: ID!, languageCode: LanguageCode): ProductOptionGroup
+}
+
+type Mutation {
+    "Create a new ProductOptionGroup"
+    createProductOptionGroup(input: CreateProductOptionGroupInput!): ProductOptionGroup!
+    "Update an existing ProductOptionGroup"
+    updateProductOptionGroup(input: UpdateProductOptionGroupInput!): ProductOptionGroup!
+}
+
+input ProductOptionGroupTranslationInput {
+    id: ID
+    languageCode: LanguageCode!
+    name: String
+}
+
+input CreateProductOptionGroupInput {
+    code: String!
+    translations: [ProductOptionGroupTranslationInput!]!
+    options: [CreateProductOptionInput!]!
+}
+
+input UpdateProductOptionGroupInput {
+    id: ID!
+    code: String
+    translations: [ProductOptionGroupTranslationInput!]
+}
+
+input ProductOptionTranslationInput {
+    id: ID
+    languageCode: LanguageCode!
+    name: String
+}
+
+input CreateProductOptionInput {
+    code: String!
+    translations: [ProductOptionGroupTranslationInput!]!
+}

+ 21 - 0
server/src/api/schema/admin-api/product-search.api.graphql

@@ -0,0 +1,21 @@
+type Query {
+    search(input: SearchInput!): SearchResponse!
+}
+
+type Mutation {
+    reindex: SearchReindexResponse!
+}
+
+input SearchInput {
+    term: String
+    facetIds: [String!]
+    groupByProduct: Boolean
+    take: Int
+    skip: Int
+    sort: SearchResultSortParameter
+}
+
+input SearchResultSortParameter {
+    name: SortOrder
+    price: SortOrder
+}

+ 51 - 5
server/src/api/types/product.api.graphql → server/src/api/schema/admin-api/product.api.graphql

@@ -26,11 +26,6 @@ type Mutation {
     updateProductVariants(input: [UpdateProductVariantInput!]!): [ProductVariant]!
 }
 
-type ProductList implements PaginatedList {
-    items: [Product!]!
-    totalItems: Int!
-}
-
 input ProductListOptions {
     take: Int
     skip: Int
@@ -54,3 +49,54 @@ input ProductFilterParameter {
     createdAt: DateOperators
     updatedAt: DateOperators
 }
+
+input ProductTranslationInput {
+    id: ID
+    languageCode: LanguageCode!
+    name: String
+    slug: String
+    description: String
+}
+
+input CreateProductInput {
+    featuredAssetId: ID
+    assetIds: [ID!]
+    facetValueIds: [ID!]
+    translations: [ProductTranslationInput!]!
+}
+
+input UpdateProductInput {
+    id: ID!
+    featuredAssetId: ID
+    assetIds: [ID!]
+    facetValueIds: [ID!]
+    translations: [ProductTranslationInput!]
+}
+
+input ProductVariantTranslationInput {
+    id: ID
+    languageCode: LanguageCode!
+    name: String
+}
+
+input CreateProductVariantInput {
+    translations: [ProductVariantTranslationInput!]!
+    facetValueIds: [ID!]
+    sku: String!
+    price: Int
+    taxCategoryId: ID!
+    optionIds: [ID!]
+    featuredAssetId: ID
+    assetIds: [ID!]
+}
+
+input UpdateProductVariantInput {
+    id: ID!
+    translations: [ProductVariantTranslationInput!]
+    facetValueIds: [ID!]
+    sku: String
+    taxCategoryId: ID
+    price: Int
+    featuredAssetId: ID
+    assetIds: [ID!]
+}

+ 15 - 10
server/src/api/types/promotion.api.graphql → server/src/api/schema/admin-api/promotion.api.graphql

@@ -4,22 +4,12 @@ type Query {
     adjustmentOperations: AdjustmentOperations!
 }
 
-type AdjustmentOperations {
-    conditions: [AdjustmentOperation!]!
-    actions: [AdjustmentOperation!]!
-}
-
 type Mutation {
     createPromotion(input: CreatePromotionInput!): Promotion!
     updatePromotion(input: UpdatePromotionInput!): Promotion!
     deletePromotion(id: ID!): DeletionResponse!
 }
 
-type PromotionList implements PaginatedList {
-    items: [Promotion!]!
-    totalItems: Int!
-}
-
 input PromotionListOptions {
     take: Int
     skip: Int
@@ -40,3 +30,18 @@ input PromotionFilterParameter {
     updatedAt: DateOperators
     type: StringOperators
 }
+
+input CreatePromotionInput {
+    name: String!
+    enabled: Boolean!
+    conditions: [AdjustmentOperationInput!]!
+    actions: [AdjustmentOperationInput!]!
+}
+
+input UpdatePromotionInput {
+    id: ID!
+    name: String
+    enabled: Boolean
+    conditions: [AdjustmentOperationInput!]
+    actions: [AdjustmentOperationInput!]
+}

+ 14 - 5
server/src/api/types/role.api.graphql → server/src/api/schema/admin-api/role.api.graphql

@@ -10,11 +10,6 @@ type Mutation {
   updateRole(input: UpdateRoleInput!): Role!
 }
 
-type RoleList implements PaginatedList {
-    items: [Role!]!
-    totalItems: Int!
-}
-
 input RoleListOptions {
     take: Int
     skip: Int
@@ -36,3 +31,17 @@ input RoleFilterParameter {
     createdAt: DateOperators
     updatedAt: DateOperators
 }
+
+input CreateRoleInput {
+    code: String!
+    description: String!
+    permissions: [Permission!]!
+}
+
+
+input UpdateRoleInput {
+    id: ID!
+    code: String
+    description: String
+    permissions: [Permission!]
+}

+ 15 - 5
server/src/api/types/shipping-method.api.graphql → server/src/api/schema/admin-api/shipping-method.api.graphql

@@ -12,11 +12,6 @@ type Mutation {
     updateShippingMethod(input: UpdateShippingMethodInput!): ShippingMethod!
 }
 
-type ShippingMethodList implements PaginatedList {
-    items: [ShippingMethod!]!
-    totalItems: Int!
-}
-
 input ShippingMethodListOptions {
     take: Int
     skip: Int
@@ -38,3 +33,18 @@ input ShippingMethodFilterParameter {
     createdAt: DateOperators
     updatedAt: DateOperators
 }
+
+input CreateShippingMethodInput {
+    code: String!
+    description: String!
+    checker: AdjustmentOperationInput!
+    calculator: AdjustmentOperationInput!
+}
+
+input UpdateShippingMethodInput {
+    id: ID!
+    code: String
+    description: String
+    checker: AdjustmentOperationInput
+    calculator: AdjustmentOperationInput
+}

+ 10 - 0
server/src/api/types/tax-category.api.graphql → server/src/api/schema/admin-api/tax-category.api.graphql

@@ -10,3 +10,13 @@ type Mutation {
     "Update an existing TaxCategory"
     updateTaxCategory(input: UpdateTaxCategoryInput!): TaxCategory!
 }
+
+input CreateTaxCategoryInput {
+    name: String!
+}
+
+
+input UpdateTaxCategoryInput {
+    id: ID!
+    name: String
+}

+ 19 - 5
server/src/api/types/tax-rate.api.graphql → server/src/api/schema/admin-api/tax-rate.api.graphql

@@ -10,11 +10,6 @@ type Mutation {
   updateTaxRate(input: UpdateTaxRateInput!): TaxRate!
 }
 
-type TaxRateList implements PaginatedList {
-    items: [TaxRate!]!
-    totalItems: Int!
-}
-
 input TaxRateListOptions {
     take: Int
     skip: Int
@@ -37,3 +32,22 @@ input TaxRateFilterParameter {
     createdAt: DateOperators
     updatedAt: DateOperators
 }
+
+input CreateTaxRateInput {
+    name: String!
+    enabled: Boolean!
+    value: Int!
+    categoryId: ID!
+    zoneId: ID!
+    customerGroupId: ID
+}
+
+input UpdateTaxRateInput {
+    id: ID!
+    name: String
+    value: Int
+    enabled: Boolean
+    categoryId: ID
+    zoneId: ID
+    customerGroupId: ID
+}

+ 10 - 0
server/src/api/types/zone.api.graphql → server/src/api/schema/admin-api/zone.api.graphql

@@ -19,3 +19,13 @@ type Mutation {
     "Remove members from a Zone"
     removeMembersFromZone(zoneId: ID!, memberIds: [ID!]!): Zone!
 }
+
+input CreateZoneInput {
+    name: String!
+    memberIds: [ID!]
+}
+
+input UpdateZoneInput {
+    id: ID!
+    name: String
+}

+ 0 - 0
server/src/common/types/common-types.graphql → server/src/api/schema/common/common-types.graphql


+ 0 - 0
server/src/common/types/currency-code.graphql → server/src/api/schema/common/currency-code.graphql


+ 0 - 0
server/src/common/types/language-code.graphql → server/src/api/schema/common/language-code.graphql


+ 0 - 0
server/src/common/types/permission.graphql → server/src/api/schema/common/permission.graphql


+ 16 - 0
server/src/api/schema/type/address.type.graphql

@@ -0,0 +1,16 @@
+type Address implements Node {
+    id: ID!
+    createdAt: DateTime!
+    updatedAt: DateTime!
+    fullName: String
+    company: String
+    streetLine1: String!
+    streetLine2: String
+    city: String
+    province: String
+    postalCode: String
+    country: Country!
+    phoneNumber: String
+    defaultShippingAddress: Boolean
+    defaultBillingAddress: Boolean
+}

+ 14 - 0
server/src/api/schema/type/administrator.type.graphql

@@ -0,0 +1,14 @@
+type Administrator implements Node {
+    id: ID!
+    createdAt: DateTime!
+    updatedAt: DateTime!
+    firstName: String!
+    lastName: String!
+    emailAddress: String!
+    user: User!
+}
+
+type AdministratorList implements PaginatedList {
+    items: [Administrator!]!
+    totalItems: Int!
+}

+ 5 - 4
server/src/entity/asset/asset.graphql → server/src/api/schema/type/asset.type.graphql

@@ -8,12 +8,13 @@ type Asset implements Node {
     preview: String!
 }
 
+type AssetList implements PaginatedList {
+    items: [Asset!]!
+    totalItems: Int!
+}
+
 enum AssetType {
     IMAGE,
     VIDEO,
     BINARY
 }
-
-input CreateAssetInput {
-    file: Upload!
-}

+ 9 - 0
server/src/api/schema/type/auth.type.graphql

@@ -0,0 +1,9 @@
+type LoginResult {
+    user: CurrentUser!
+}
+
+type CurrentUser {
+    id: ID!
+    identifier: String!
+    channelTokens: [String!]!
+}

+ 12 - 0
server/src/api/schema/type/channel.type.graphql

@@ -0,0 +1,12 @@
+type Channel implements Node {
+    id: ID!
+    createdAt: DateTime!
+    updatedAt: DateTime!
+    code: String!
+    token: String!
+    defaultTaxZone: Zone
+    defaultShippingZone: Zone
+    defaultLanguageCode: LanguageCode!
+    currencyCode: CurrencyCode!
+    pricesIncludeTax: Boolean!
+}

+ 21 - 0
server/src/api/schema/type/country.type.graphql

@@ -0,0 +1,21 @@
+type Country implements Node {
+    id: ID!
+    languageCode: LanguageCode!
+    code: String!
+    name: String!
+    enabled: Boolean!
+    translations: [CountryTranslation!]!
+}
+
+type CountryTranslation {
+    id: ID!
+    createdAt: DateTime!
+    updatedAt: DateTime!
+    languageCode: LanguageCode!
+    name: String!
+}
+
+type CountryList implements PaginatedList {
+    items: [Country!]!
+    totalItems: Int!
+}

+ 6 - 0
server/src/api/schema/type/customer-group.type.graphql

@@ -0,0 +1,6 @@
+type CustomerGroup implements Node {
+    id: ID!
+    createdAt: DateTime!
+    updatedAt: DateTime!
+    name: String!
+}

+ 3 - 15
server/src/entity/customer/customer.graphql → server/src/api/schema/type/customer.type.graphql

@@ -12,19 +12,7 @@ type Customer implements Node {
     user: User
 }
 
-input CreateCustomerInput {
-    title: String
-    firstName: String!
-    lastName: String!
-    phoneNumber: String
-    emailAddress: String!
-}
-
-input UpdateCustomerInput {
-    id: ID!
-    title: String
-    firstName: String
-    lastName: String
-    phoneNumber: String
-    emailAddress: String
+type CustomerList implements PaginatedList {
+    items: [Customer!]!
+    totalItems: Int!
 }

+ 18 - 0
server/src/api/schema/type/facet-value.type.graphql

@@ -0,0 +1,18 @@
+type FacetValue implements Node {
+    id: ID!
+    createdAt: DateTime!
+    updatedAt: DateTime!
+    languageCode: LanguageCode!
+    facet: Facet!
+    name: String!
+    code: String!
+    translations: [FacetValueTranslation!]!
+}
+
+type FacetValueTranslation {
+    id: ID!
+    createdAt: DateTime!
+    updatedAt: DateTime!
+    languageCode: LanguageCode!
+    name: String!
+}

+ 3 - 16
server/src/entity/facet/facet.graphql → server/src/api/schema/type/facet.type.graphql

@@ -17,20 +17,7 @@ type FacetTranslation {
     name: String!
 }
 
-input FacetTranslationInput {
-    id: ID
-    languageCode: LanguageCode!
-    name: String
-}
-
-input CreateFacetInput {
-    code: String!
-    translations: [FacetTranslationInput!]!
-    values: [CreateFacetValueWithFacetInput!]
-}
-
-input UpdateFacetInput {
-    id: ID!
-    code: String
-    translations: [FacetTranslationInput!]
+type FacetList implements PaginatedList {
+    items: [Facet!]!
+    totalItems: Int!
 }

+ 0 - 4
server/src/entity/global-settings/global-settings.graphql → server/src/api/schema/type/global-settings.type.graphql

@@ -9,7 +9,3 @@ type GlobalSettings {
 type ServerConfig {
     customFields: JSON
 }
-
-input UpdateGlobalSettingsInput {
-    availableLanguages: [LanguageCode!]
-}

+ 0 - 4
server/src/api/types/import.api.graphql → server/src/api/schema/type/import.type.graphql

@@ -1,7 +1,3 @@
-type Mutation {
-    importProducts(csvFile: Upload!): ImportInfo
-}
-
 type ImportInfo {
     errors: [String!]
     processed: Int!

+ 82 - 0
server/src/api/schema/type/order.type.graphql

@@ -0,0 +1,82 @@
+type Order implements Node {
+    id: ID!
+    createdAt: DateTime!
+    updatedAt: DateTime!
+    code: String!
+    state: String!
+    active: Boolean!
+    customer: Customer
+    shippingAddress: OrderAddress
+    billingAddress: OrderAddress
+    lines: [OrderLine!]!
+    adjustments: [Adjustment!]!
+    payments: [Payment!]
+    subTotalBeforeTax: Int!
+    subTotal: Int!
+    currencyCode: CurrencyCode!
+    shipping: Int!
+    shippingMethod: ShippingMethod
+    totalBeforeTax: Int!
+    total: Int!
+}
+
+type OrderAddress {
+    fullName: String
+    company: String
+    streetLine1: String
+    streetLine2: String
+    city: String
+    province: String
+    postalCode: String
+    country: String
+    countryCode: String
+    phoneNumber: String
+}
+
+type OrderList implements PaginatedList {
+    items: [Order!]!
+    totalItems: Int!
+}
+
+type ShippingMethodQuote {
+    id: ID!
+    price: Int!
+    description: String!
+}
+
+type OrderItem implements Node {
+    id: ID!
+    createdAt: DateTime!
+    updatedAt: DateTime!
+    unitPrice: Int!
+    unitPriceWithTax: Int!
+    unitPriceIncludesTax: Boolean!
+    taxRate: Float!
+    adjustments: [Adjustment!]!
+}
+
+type OrderLine implements Node {
+    id: ID!
+    createdAt: DateTime!
+    updatedAt: DateTime!
+    productVariant: ProductVariant!
+    featuredAsset: Asset
+    unitPrice: Int!
+    unitPriceWithTax: Int!
+    quantity: Int!
+    items: [OrderItem!]!
+    totalPrice: Int!
+    adjustments: [Adjustment!]!
+    order: Order!
+}
+
+type Payment implements Node {
+    id: ID!
+    createdAt: DateTime!
+    updatedAt: DateTime!
+    method: String!
+    amount: Int!
+    state: String!
+    transactionId: String
+    metadata: JSON
+}

+ 0 - 7
server/src/entity/payment-method/payment-method.graphql → server/src/api/schema/type/payment-method.type.graphql

@@ -6,10 +6,3 @@ type PaymentMethod implements Node {
     enabled: Boolean!
     configArgs: [ConfigArg!]!
 }
-
-input UpdatePaymentMethodInput {
-    id: ID!
-    code: String
-    enabled: Boolean
-    configArgs: [ConfigArgInput!]
-}

+ 3 - 22
server/src/entity/product-category/product-category.graphql → server/src/api/schema/type/product-category.type.graphql

@@ -25,26 +25,7 @@ type ProductCategoryTranslation {
     description: String!
 }
 
-input ProductCategoryTranslationInput {
-    id: ID
-    languageCode: LanguageCode!
-    name: String
-    description: String
-}
-
-input CreateProductCategoryInput {
-    featuredAssetId: ID
-    assetIds: [ID!]
-    parentId: ID
-    facetValueIds: [ID!]
-    translations: [ProductCategoryTranslationInput!]!
-}
-
-input UpdateProductCategoryInput {
-    id: ID!
-    featuredAssetId: ID
-    parentId: ID
-    assetIds: [ID!]
-    facetValueIds: [ID!]
-    translations: [ProductCategoryTranslationInput!]!
+type ProductCategoryList implements PaginatedList {
+    items: [ProductCategory!]!
+    totalItems: Int!
 }

+ 12 - 12
server/src/entity/product-option-group/product-option-group.graphql → server/src/api/schema/type/product-option-group.type.graphql

@@ -17,20 +17,20 @@ type ProductOptionGroupTranslation {
     name: String!
 }
 
-input ProductOptionGroupTranslationInput {
-    id: ID
-    languageCode: LanguageCode!
+type ProductOption implements Node {
+    id: ID!
+    createdAt: DateTime!
+    updatedAt: DateTime!
+    languageCode: LanguageCode
+    code: String
     name: String
+    translations: [ProductOptionTranslation!]!
 }
 
-input CreateProductOptionGroupInput {
-    code: String!
-    translations: [ProductOptionGroupTranslationInput!]!
-    options: [CreateProductOptionInput!]!
-}
-
-input UpdateProductOptionGroupInput {
+type ProductOptionTranslation {
     id: ID!
-    code: String
-    translations: [ProductOptionGroupTranslationInput!]
+    createdAt: DateTime!
+    updatedAt: DateTime!
+    languageCode: LanguageCode!
+    name: String!
 }

+ 0 - 22
server/src/api/types/search.api.graphql → server/src/api/schema/type/product-search.type.graphql

@@ -1,29 +1,7 @@
-type Query {
-    search(input: SearchInput!): SearchResponse!
-}
-
-type Mutation {
-    reindex: SearchReindexResponse!
-}
-
 type SearchReindexResponse {
     success: Boolean!
 }
 
-input SearchInput {
-    term: String
-    facetIds: [String!]
-    groupByProduct: Boolean
-    take: Int
-    skip: Int
-    sort: SearchResultSortParameter
-}
-
-input SearchResultSortParameter {
-    name: SortOrder
-    price: SortOrder
-}
-
 type SearchResponse {
     items: [SearchResult!]!
     totalItems: Int!

+ 31 - 28
server/src/entity/product-variant/product-variant.graphql → server/src/api/schema/type/product.type.graphql

@@ -1,3 +1,34 @@
+type Product implements Node {
+    id: ID!
+    createdAt: DateTime!
+    updatedAt: DateTime!
+    languageCode: LanguageCode!
+    name: String!
+    slug: String!
+    description: String!
+    featuredAsset: Asset
+    assets: [Asset!]!
+    variants: [ProductVariant!]!
+    optionGroups: [ProductOptionGroup!]!
+    facetValues: [FacetValue!]!
+    translations: [ProductTranslation!]!
+}
+
+type ProductTranslation {
+    id: ID!
+    createdAt: DateTime!
+    updatedAt: DateTime!
+    languageCode: LanguageCode!
+    name: String!
+    slug: String!
+    description: String!
+}
+
+type ProductList implements PaginatedList {
+    items: [Product!]!
+    totalItems: Int!
+}
+
 type ProductVariant implements Node {
     id: ID!
     createdAt: DateTime!
@@ -25,31 +56,3 @@ type ProductVariantTranslation {
     languageCode: LanguageCode!
     name: String!
 }
-
-input ProductVariantTranslationInput {
-    id: ID
-    languageCode: LanguageCode!
-    name: String
-}
-
-input CreateProductVariantInput {
-    translations: [ProductVariantTranslationInput!]!
-    facetValueIds: [ID!]
-    sku: String!
-    price: Int
-    taxCategoryId: ID!
-    optionIds: [ID!]
-    featuredAssetId: ID
-    assetIds: [ID!]
-}
-
-input UpdateProductVariantInput {
-    id: ID!
-    translations: [ProductVariantTranslationInput!]
-    facetValueIds: [ID!]
-    sku: String
-    taxCategoryId: ID
-    price: Int
-    featuredAssetId: ID
-    assetIds: [ID!]
-}

+ 19 - 0
server/src/api/schema/type/promotion.type.graphql

@@ -0,0 +1,19 @@
+type Promotion implements Node {
+    id: ID!
+    createdAt: DateTime!
+    updatedAt: DateTime!
+    name: String!
+    enabled: Boolean!
+    conditions: [AdjustmentOperation!]!
+    actions: [AdjustmentOperation!]!
+}
+
+type AdjustmentOperations {
+    conditions: [AdjustmentOperation!]!
+    actions: [AdjustmentOperation!]!
+}
+
+type PromotionList implements PaginatedList {
+    items: [Promotion!]!
+    totalItems: Int!
+}

+ 14 - 0
server/src/api/schema/type/role.type.graphql

@@ -0,0 +1,14 @@
+type Role implements Node {
+    id: ID!
+    createdAt: DateTime!
+    updatedAt: DateTime!
+    code: String!
+    description: String!
+    permissions: [Permission!]!
+    channels: [Channel!]!
+}
+
+type RoleList implements PaginatedList {
+    items: [Role!]!
+    totalItems: Int!
+}

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

@@ -0,0 +1,14 @@
+type ShippingMethod implements Node {
+    id: ID!
+    createdAt: DateTime!
+    updatedAt: DateTime!
+    code: String!
+    description: String!
+    checker: AdjustmentOperation!
+    calculator: AdjustmentOperation!
+}
+
+type ShippingMethodList implements PaginatedList {
+    items: [ShippingMethod!]!
+    totalItems: Int!
+}

+ 0 - 10
server/src/entity/tax-category/tax-category.graphql → server/src/api/schema/type/tax-category.type.graphql

@@ -4,13 +4,3 @@ type TaxCategory implements Node {
     updatedAt: DateTime!
     name: String!
 }
-
-input CreateTaxCategoryInput {
-    name: String!
-}
-
-
-input UpdateTaxCategoryInput {
-    id: ID!
-    name: String
-}

+ 16 - 0
server/src/api/schema/type/tax-rate.type.graphql

@@ -0,0 +1,16 @@
+type TaxRate implements Node {
+    id: ID!
+    createdAt: DateTime!
+    updatedAt: DateTime!
+    name: String!
+    enabled: Boolean!
+    value: Int!
+    category: TaxCategory!
+    zone: Zone!
+    customerGroup: CustomerGroup
+}
+
+type TaxRateList implements PaginatedList {
+    items: [TaxRate!]!
+    totalItems: Int!
+}

+ 0 - 0
server/src/entity/user/user.graphql → server/src/api/schema/type/user.type.graphql


+ 0 - 10
server/src/entity/zone/zone.graphql → server/src/api/schema/type/zone.type.graphql

@@ -5,13 +5,3 @@ type Zone implements Node {
     name: String!
     members: [Country!]!
 }
-
-input CreateZoneInput {
-    name: String!
-    memberIds: [ID!]
-}
-
-input UpdateZoneInput {
-    id: ID!
-    name: String
-}

+ 0 - 13
server/src/api/types/channel.api.graphql

@@ -1,13 +0,0 @@
-type Query {
-    channels: [Channel!]!
-    channel(id: ID!): Channel
-    activeChannel: Channel!
-}
-
-type Mutation {
-    "Create a new Channel"
-    createChannel(input: CreateChannelInput!): Channel!
-
-    "Update an existing Channel"
-    updateChannel(input: UpdateChannelInput!): Channel!
-}

+ 0 - 11
server/src/api/types/product-option.api.graphql

@@ -1,11 +0,0 @@
-type Query {
-    productOptionGroups(languageCode: LanguageCode, filterTerm: String): [ProductOptionGroup!]!
-    productOptionGroup(id: ID!, languageCode: LanguageCode): ProductOptionGroup
-}
-
-type Mutation {
-    "Create a new ProductOptionGroup"
-    createProductOptionGroup(input: CreateProductOptionGroupInput!): ProductOptionGroup!
-    "Update an existing ProductOptionGroup"
-    updateProductOptionGroup(input: UpdateProductOptionGroupInput!): ProductOptionGroup!
-}

+ 0 - 45
server/src/entity/address/address.graphql

@@ -1,45 +0,0 @@
-type Address implements Node {
-    id: ID!
-    createdAt: DateTime!
-    updatedAt: DateTime!
-    fullName: String
-    company: String
-    streetLine1: String!
-    streetLine2: String
-    city: String
-    province: String
-    postalCode: String
-    country: Country!
-    phoneNumber: String
-    defaultShippingAddress: Boolean
-    defaultBillingAddress: Boolean
-}
-
-input CreateAddressInput {
-    fullName: String
-    company: String
-    streetLine1: String!
-    streetLine2: String
-    city: String
-    province: String
-    postalCode: String
-    countryCode: String!
-    phoneNumber: String
-    defaultShippingAddress: Boolean
-    defaultBillingAddress: Boolean
-}
-
-input UpdateAddressInput {
-    id: ID!
-    fullName: String
-    company: String
-    streetLine1: String
-    streetLine2: String
-    city: String
-    province: String
-    postalCode: String
-    countryCode: String
-    phoneNumber: String
-    defaultShippingAddress: Boolean
-    defaultBillingAddress: Boolean
-}

+ 0 - 26
server/src/entity/administrator/administrator.graphql

@@ -1,26 +0,0 @@
-type Administrator implements Node {
-    id: ID!
-    createdAt: DateTime!
-    updatedAt: DateTime!
-    firstName: String!
-    lastName: String!
-    emailAddress: String!
-    user: User!
-}
-
-input CreateAdministratorInput {
-    firstName: String!
-    lastName: String!
-    emailAddress: String!
-    password: String!
-    roleIds: [ID!]!
-}
-
-input UpdateAdministratorInput {
-    id: ID!
-    firstName: String
-    lastName: String
-    emailAddress: String
-    password: String
-    roleIds: [ID!]
-}

+ 0 - 36
server/src/entity/country/country.graphql

@@ -1,36 +0,0 @@
-type Country implements Node {
-    id: ID!
-    languageCode: LanguageCode!
-    code: String!
-    name: String!
-    enabled: Boolean!
-    translations: [CountryTranslation!]!
-}
-
-type CountryTranslation {
-    id: ID!
-    createdAt: DateTime!
-    updatedAt: DateTime!
-    languageCode: LanguageCode!
-    name: String!
-}
-
-input CountryTranslationInput {
-    id: ID
-    languageCode: LanguageCode!
-    name: String
-}
-
-input CreateCountryInput {
-    code: String!
-    translations: [CountryTranslationInput!]!
-    enabled: Boolean!
-}
-
-
-input UpdateCountryInput {
-    id: ID!
-    code: String
-    translations: [CountryTranslationInput!]
-    enabled: Boolean
-}

+ 0 - 16
server/src/entity/customer-group/customer-group.graphql

@@ -1,16 +0,0 @@
-type CustomerGroup implements Node {
-    id: ID!
-    createdAt: DateTime!
-    updatedAt: DateTime!
-    name: String!
-}
-
-input CreateCustomerGroupInput {
-    name: String!
-    customerIds: [ID!]
-}
-
-input UpdateCustomerGroupInput {
-    id: ID!
-    name: String
-}

+ 0 - 41
server/src/entity/facet-value/facet-value.graphql

@@ -1,41 +0,0 @@
-type FacetValue implements Node {
-    id: ID!
-    createdAt: DateTime!
-    updatedAt: DateTime!
-    languageCode: LanguageCode!
-    facet: Facet!
-    name: String!
-    code: String!
-    translations: [FacetValueTranslation!]!
-}
-
-type FacetValueTranslation {
-    id: ID!
-    createdAt: DateTime!
-    updatedAt: DateTime!
-    languageCode: LanguageCode!
-    name: String!
-}
-
-input FacetValueTranslationInput {
-    id: ID
-    languageCode: LanguageCode!
-    name: String
-}
-
-input CreateFacetValueWithFacetInput {
-    code: String!
-    translations: [FacetValueTranslationInput!]!
-}
-
-input CreateFacetValueInput {
-    facetId: ID!
-    code: String!
-    translations: [FacetValueTranslationInput!]!
-}
-
-input UpdateFacetValueInput {
-    id: ID!
-    code: String
-    translations: [FacetValueTranslationInput!]
-}

+ 0 - 10
server/src/entity/order-item/order-item.graphql

@@ -1,10 +0,0 @@
-type OrderItem implements Node {
-    id: ID!
-    createdAt: DateTime!
-    updatedAt: DateTime!
-    unitPrice: Int!
-    unitPriceWithTax: Int!
-    unitPriceIncludesTax: Boolean!
-    taxRate: Float!
-    adjustments: [Adjustment!]!
-}

+ 0 - 14
server/src/entity/order-line/order-line.graphql

@@ -1,14 +0,0 @@
-type OrderLine implements Node {
-    id: ID!
-    createdAt: DateTime!
-    updatedAt: DateTime!
-    productVariant: ProductVariant!
-    featuredAsset: Asset
-    unitPrice: Int!
-    unitPriceWithTax: Int!
-    quantity: Int!
-    items: [OrderItem!]!
-    totalPrice: Int!
-    adjustments: [Adjustment!]!
-    order: Order!
-}

+ 0 - 34
server/src/entity/order/order.graphql

@@ -1,34 +0,0 @@
-type Order implements Node {
-    id: ID!
-    createdAt: DateTime!
-    updatedAt: DateTime!
-    code: String!
-    state: String!
-    active: Boolean!
-    customer: Customer
-    shippingAddress: OrderAddress
-    billingAddress: OrderAddress
-    lines: [OrderLine!]!
-    adjustments: [Adjustment!]!
-    payments: [Payment!]
-    subTotalBeforeTax: Int!
-    subTotal: Int!
-    currencyCode: CurrencyCode!
-    shipping: Int!
-    shippingMethod: ShippingMethod
-    totalBeforeTax: Int!
-    total: Int!
-}
-
-type OrderAddress {
-    fullName: String
-    company: String
-    streetLine1: String
-    streetLine2: String
-    city: String
-    province: String
-    postalCode: String
-    country: String
-    countryCode: String
-    phoneNumber: String
-}

+ 0 - 10
server/src/entity/payment/payment.graphql

@@ -1,10 +0,0 @@
-type Payment implements Node {
-    id: ID!
-    createdAt: DateTime!
-    updatedAt: DateTime!
-    method: String!
-    amount: Int!
-    state: String!
-    transactionId: String
-    metadata: JSON
-}

+ 0 - 28
server/src/entity/product-option/product-option.graphql

@@ -1,28 +0,0 @@
-type ProductOption implements Node {
-    id: ID!
-    createdAt: DateTime!
-    updatedAt: DateTime!
-    languageCode: LanguageCode
-    code: String
-    name: String
-    translations: [ProductOptionTranslation!]!
-}
-
-type ProductOptionTranslation {
-    id: ID!
-    createdAt: DateTime!
-    updatedAt: DateTime!
-    languageCode: LanguageCode!
-    name: String!
-}
-
-input ProductOptionTranslationInput {
-    id: ID
-    languageCode: LanguageCode!
-    name: String
-}
-
-input CreateProductOptionInput {
-    code: String!
-    translations: [ProductOptionGroupTranslationInput!]!
-}

+ 0 - 48
server/src/entity/product/product.graphql

@@ -1,48 +0,0 @@
-type Product implements Node {
-    id: ID!
-    createdAt: DateTime!
-    updatedAt: DateTime!
-    languageCode: LanguageCode!
-    name: String!
-    slug: String!
-    description: String!
-    featuredAsset: Asset
-    assets: [Asset!]!
-    variants: [ProductVariant!]!
-    optionGroups: [ProductOptionGroup!]!
-    facetValues: [FacetValue!]!
-    translations: [ProductTranslation!]!
-}
-
-type ProductTranslation {
-    id: ID!
-    createdAt: DateTime!
-    updatedAt: DateTime!
-    languageCode: LanguageCode!
-    name: String!
-    slug: String!
-    description: String!
-}
-
-input ProductTranslationInput {
-    id: ID
-    languageCode: LanguageCode!
-    name: String
-    slug: String
-    description: String
-}
-
-input CreateProductInput {
-    featuredAssetId: ID
-    assetIds: [ID!]
-    facetValueIds: [ID!]
-    translations: [ProductTranslationInput!]!
-}
-
-input UpdateProductInput {
-    id: ID!
-    featuredAssetId: ID
-    assetIds: [ID!]
-    facetValueIds: [ID!]
-    translations: [ProductTranslationInput!]
-}

+ 0 - 24
server/src/entity/promotion/promotion.graphql

@@ -1,24 +0,0 @@
-type Promotion implements Node {
-    id: ID!
-    createdAt: DateTime!
-    updatedAt: DateTime!
-    name: String!
-    enabled: Boolean!
-    conditions: [AdjustmentOperation!]!
-    actions: [AdjustmentOperation!]!
-}
-
-input CreatePromotionInput {
-    name: String!
-    enabled: Boolean!
-    conditions: [AdjustmentOperationInput!]!
-    actions: [AdjustmentOperationInput!]!
-}
-
-input UpdatePromotionInput {
-    id: ID!
-    name: String
-    enabled: Boolean
-    conditions: [AdjustmentOperationInput!]
-    actions: [AdjustmentOperationInput!]
-}

+ 0 - 23
server/src/entity/role/role.graphql

@@ -1,23 +0,0 @@
-type Role implements Node {
-    id: ID!
-    createdAt: DateTime!
-    updatedAt: DateTime!
-    code: String!
-    description: String!
-    permissions: [Permission!]!
-    channels: [Channel!]!
-}
-
-input CreateRoleInput {
-    code: String!
-    description: String!
-    permissions: [Permission!]!
-}
-
-
-input UpdateRoleInput {
-    id: ID!
-    code: String
-    description: String
-    permissions: [Permission!]
-}

+ 0 - 24
server/src/entity/shipping-method/shipping-method.graphql

@@ -1,24 +0,0 @@
-type ShippingMethod implements Node {
-    id: ID!
-    createdAt: DateTime!
-    updatedAt: DateTime!
-    code: String!
-    description: String!
-    checker: AdjustmentOperation!
-    calculator: AdjustmentOperation!
-}
-
-input CreateShippingMethodInput {
-    code: String!
-    description: String!
-    checker: AdjustmentOperationInput!
-    calculator: AdjustmentOperationInput!
-}
-
-input UpdateShippingMethodInput {
-    id: ID!
-    code: String
-    description: String
-    checker: AdjustmentOperationInput
-    calculator: AdjustmentOperationInput
-}

+ 0 - 30
server/src/entity/tax-rate/tax-rate.graphql

@@ -1,30 +0,0 @@
-type TaxRate implements Node {
-    id: ID!
-    createdAt: DateTime!
-    updatedAt: DateTime!
-    name: String!
-    enabled: Boolean!
-    value: Int!
-    category: TaxCategory!
-    zone: Zone!
-    customerGroup: CustomerGroup
-}
-
-input CreateTaxRateInput {
-    name: String!
-    enabled: Boolean!
-    value: Int!
-    categoryId: ID!
-    zoneId: ID!
-    customerGroupId: ID
-}
-
-input UpdateTaxRateInput {
-    id: ID!
-    name: String
-    value: Int
-    enabled: Boolean
-    categoryId: ID
-    zoneId: ID
-    customerGroupId: ID
-}