diff --git a/design-documents/graph-ql/coverage/b2b/company.md b/design-documents/graph-ql/coverage/b2b/company.md index 8d411c184..f977322ef 100644 --- a/design-documents/graph-ql/coverage/b2b/company.md +++ b/design-documents/graph-ql/coverage/b2b/company.md @@ -53,7 +53,8 @@ type CompanyLegalAddress @doc(description: "Company legal address output data sc street: [String] @doc(description: "An array of strings that defines the Company's street address.") city: String @doc(description: "City name.") region: CustomerAddressRegion @doc(description: "An object containing region data for the Company.") - country_code: CountryCodeEnum @doc(description: "Country code.") + country_code: String @doc(description: "Country code.") @deprecated(reason: "Use country instead") + country: Country postcode: String @doc(description: "ZIP/postal code.") telephone: String @doc(description: "Company's phone number.") } @@ -230,7 +231,8 @@ input CompanyAdminInput @doc(description: "Defines the Company's Administrator i input CompanyLegalAddressCreateInput @doc(description: "Defines the Company legal address input data schema for creating a new entity.") { street: [String!]! @doc(description: "An array of strings that define the Company street address. Required array value for a field with strings as values of array.") city: String! @doc(description: "Company's city name. Required.") - country_id: CountryCodeEnum! @doc(description: "Company's country ID. Required. See 'countries' query. Required.") + country_id: String! @doc(description: "Company's country ID. Required. See 'countries' query. Required.") @deprecated(reason: "Use `country_code` instead") + country_code: String! @doc(description: "Company's country code. Required. See 'countries query. Required.") region: CustomerAddressRegionInput! @doc(description: "An object containing the region name and/or region ID. Required.") postcode: String! @doc(description: "Company's ZIP/postal code. Required.") telephone: String! @doc(description: "Company's phone number. Required.") @@ -248,7 +250,8 @@ input CompanyUpdateInput @doc(description: "Defines the Company input data schem input CompanyLegalAddressUpdateInput @doc(description: "Defines the Company legal address input data schema for updating an existing entity. Allows only needed fields to be passed for update.") { street: [String!] @doc(description: "An array of strings that define the Company street address.") city: String @doc(description: "Company's city name.") - country_id: CountryCodeEnum @doc(description: "Company's country ID. See 'countries' query.") + country_id: String @doc(description: "Company's country ID. See 'countries' query.") @deprecated(reason: "Use `country_code` instead") + country_code: String @doc(description: "Company's country ID. See 'countries' query.") region: CustomerAddressRegionInput @doc(description: "An object containing the region name and/or region ID. Required.") postcode: String @doc(description: "Company's ZIP/postal code.") telephone: String @doc(description: "Company's phone number.") diff --git a/design-documents/graph-ql/coverage/cart/Cart.graphqls b/design-documents/graph-ql/coverage/cart/Cart.graphqls index e50fdf455..dd9485cfe 100644 --- a/design-documents/graph-ql/coverage/cart/Cart.graphqls +++ b/design-documents/graph-ql/coverage/cart/Cart.graphqls @@ -181,6 +181,7 @@ type CheckoutCustomer { enum GenderEnum { MALE FEMALE + OTHER } type CheckoutPaymentMethod { diff --git a/design-documents/graph-ql/coverage/cart/CartAddressOperations.graphqls b/design-documents/graph-ql/coverage/cart/CartAddressOperations.graphqls index 42630f71d..22747752c 100644 --- a/design-documents/graph-ql/coverage/cart/CartAddressOperations.graphqls +++ b/design-documents/graph-ql/coverage/cart/CartAddressOperations.graphqls @@ -38,18 +38,26 @@ input ShippingAddressInput { } input CartAddressInput { + prefix: String @doc(description: "An honorific, such as Dr., Mr., or Mrs. See StoreConfig.address_prefix and StoreConfig.address_prefix_options") firstname: String! + middlename: String @doc(description: "Middlename of a person. See StoreConfig.address_middlename") lastname: String! - company: String + suffix: String @doc(description: "A value such as Sr., Jr., or III. See StoreConfig.address_suffix and StoreConfig.address_suffix_options") + gender: GenderEnum @doc(description: "Please check StoreConfig.address_gender if field is required") + company: String @doc(description: "Please check StoreConfig.address_company if field is required") street: [String!]! city: String! - region: String - postcode: String + region: String @doc(description: "See Country type for field requirements") + postcode: String @doc(description: "See Country type for field requirements") country_code: String! - telephone: String! + date_of_birth: String @doc(description: "Please check StoreConfig.address_date_of_birth if field is required"), + telephone: String @doc(description: "Please check StoreConfig.address_telephone if field is required"), + fax: String @doc(description: "Please check StoreConfig.address_fax if field is required"), + vat_id: String @doc(description: "Please check StoreConfig.address_taxvat if field is required"), save_in_address_book: Boolean! } + type SetShippingAddressesOnCartOutput { cart: Cart! } @@ -68,15 +76,24 @@ type Cart { } interface CartAddressInterface { - firstname: String - lastname: String + prefix: String @doc(description: "An honorific, such as Dr., Mr., or Mrs.") + firstname: String! + middlename: String + lastname: String! + suffix: String @doc(description: "A value such as Sr., Jr., or III.") + gender: GenderEnum company: String street: [String] - city: String - region: CartAddressRegion + city: String! + region: CartAddressRegion @deprecated(reason: "Deprecated use `region_v2`") + region_v2: Region postcode: String - country: CartAddressCountry + country: CartAddressCountry @deprecated(reason: "Deprecated use `country_v2`") + country_v2: Country + date_of_birth: String telephone: String + fax: String + vat_id: String } type ShippingCartAddress implements CartAddressInterface { diff --git a/design-documents/graph-ql/coverage/customer.graphqls b/design-documents/graph-ql/coverage/customer.graphqls index 959c93483..3a49fb3b1 100644 --- a/design-documents/graph-ql/coverage/customer.graphqls +++ b/design-documents/graph-ql/coverage/customer.graphqls @@ -39,8 +39,9 @@ input CustomerAddressInput { city: String @doc(description: "The city or town") region: CustomerAddressRegionInput @doc(description: "An object containing the region name, region code, and region ID") postcode: String @doc(description: "The customer's ZIP or postal code") - country_id: CountryCodeEnum @doc(description: "Deprecated: use `country_code` instead.") - country_code: CountryCodeEnum @doc(description: "The customer's country") + country_id: CountryCodeEnum @deprecated(reason: "Use `country_code_v2` instead.") + country_code: CountryCodeEnum @doc(description: "The customer's country") @deprecated(reason: "Use `country_code_v2` instead.") + country_code_v2: String @doc(description: "The customer's country. See 'countries' query.") default_shipping: Boolean @doc(description: "Indicates whether the address is the default shipping address") default_billing: Boolean @doc(description: "Indicates whether the address is the default billing address") fax: String @doc(description: "The fax number") @@ -143,8 +144,9 @@ type CustomerAddress @doc(description: "CustomerAddress contains detailed inform customer_id: Int @doc(description: "The customer ID") @deprecated(reason: "customer_id is not needed as part of CustomerAddress, address ID (id) is unique identifier for the addresses.") region: CustomerAddressRegion @doc(description: "An object containing the region name, region code, and region ID") region_id: Int @doc(description: "The unique ID for a pre-defined region") - country_id: String @doc(description: "The customer's country") @deprecated(reason: "Use `country_code` instead.") - country_code: CountryCodeEnum @doc(description: "The customer's country") + country_id: String @doc(description: "The customer's country") @deprecated(reason: "Use `country` instead.") + country_code: String @doc(description: "The customer's country") @deprecated(reason: "Use `country` instead.") + country: Country @descrption(description: "The country of the user") street: [String] @doc(description: "An array of strings that define the street number and name") company: String @doc(description: "The customer's company") telephone: String @doc(description: "The telephone number") @@ -178,7 +180,27 @@ type IsEmailAvailableOutput { is_email_available: Boolean @doc(description: "Is email availabel value") } -enum CountryCodeEnum @doc(description: "The list of countries codes") { +enum AddressFieldVisibilityEnum { + HIDDEN + OPTIONAL + REQUIRED +} + +type StoreConfig { + address_prefix: AddressFieldVisibilityEnum! @doc(description: "Should field be hidden, optional or required") + address_prefix_options: [String!] @doc(description: "Possible dropdown options, returns null if it is free to fill in") + address_middlename: AddressFieldVisibilityEnum! @doc(description: "Should field be hidden, optional or required") + address_suffix: AddressFieldVisibilityEnum! @doc(description: "Possible dropdown options, returns null if it is free to fill in") + address_suffix_options: [String!] @doc(description: "Should field be hidden, optional or required") + address_date_of_birth: AddressFieldVisibilityEnum! @doc(description: "Should field be hidden, optional or required") + address_gender: AddressFieldVisibilityEnum! @doc(description: "Should field be hidden, optional or required") + address_telephone: AddressFieldVisibilityEnum! @doc(description: "Should field be hidden, optional or required") + address_fax: AddressFieldVisibilityEnum! @doc(description: "Should field be hidden, optional or required") + address_company: AddressFieldVisibilityEnum! @doc(description: "Should field be hidden, optional or required") + address_vat_id: AddressFieldVisibilityEnum! @doc(description: "Should field be hidden, optional or required") +} + +enum CountryCodeEnum @doc(description: "The list of countries codes") @deprecated(reason: "Use in favor of the id type Country") { AF @doc(description: "Afghanistan") AX @doc(description: "Åland Islands") AL @doc(description: "Albania") diff --git a/design-documents/graph-ql/coverage/customer/customer-orders.md b/design-documents/graph-ql/coverage/customer/customer-orders.md index 6472608fe..8db98afe7 100644 --- a/design-documents/graph-ql/coverage/customer/customer-orders.md +++ b/design-documents/graph-ql/coverage/customer/customer-orders.md @@ -386,7 +386,8 @@ type OrderAddress @doc(description: "OrderAddress contains detailed information middlename: String @doc(description: "The middle name of the person associated with the shipping/billing address") region: String @doc(description: "The state or province name") region_id: ID @doc(description: "The unique ID for a pre-defined region") - country_code: CountryCodeEnum @doc(description: "The customer's order country") + country_code: CountryCodeEnum @doc(description: "The customer's order country") @deprecated(reason: "Use `country`") + country: Country @doc(description: "The customer's order country) street: [String!] @doc(description: "An array of strings that define the street number and name") company: String @doc(description: "The customer's order company") telephone: String! @doc(description: "The telephone number") diff --git a/design-documents/graph-ql/coverage/customer/customer.graphqls b/design-documents/graph-ql/coverage/customer/customer.graphqls index 42075d0f8..2ed83a4dd 100644 --- a/design-documents/graph-ql/coverage/customer/customer.graphqls +++ b/design-documents/graph-ql/coverage/customer/customer.graphqls @@ -27,6 +27,7 @@ type Mutation { resetPassword(email: String!, resetPasswordToken: String!, newPassword: String!): Boolean @resolver(class: "\\Magento\\CustomerGraphQl\\Model\\Resolver\\ResetPassword") @doc(description: "Reset a customer's password using the reset password token that the customer received in an email after requesting it using requestPasswordResetEmail.") } +# todo: We have a problem here that some fields should be required, but that is a breaking schema change? input CustomerAddressInput { firstname: String @doc(description: "The first name of the person associated with the shipping/billing address") lastname: String @doc(description: "The family name of the person associated with the shipping/billing address") @@ -36,8 +37,9 @@ input CustomerAddressInput { city: String @doc(description: "The city or town") region: CustomerAddressRegionInput @doc(description: "An object containing the region name, region code, and region ID") postcode: String @doc(description: "The customer's ZIP or postal code") - country_id: CountryCodeEnum @doc(description: "Deprecated: use `country_code` instead.") - country_code: CountryCodeEnum @doc(description: "The customer's country") + country_id: CountryCodeEnum @deprecated(reason: "Use `country_code_v2` instead.") + country_code: CountryCodeEnum @doc(description: "The customer's country") @deprecated(reason: "Use `country_code_v2` instead.") + country_code_v2: String @doc(description: "The customer's country. See 'countries' query.") default_shipping: Boolean @doc(description: "Indicates whether the address is the default shipping address") default_billing: Boolean @doc(description: "Indicates whether the address is the default billing address") fax: String @doc(description: "The fax number") @@ -147,7 +149,7 @@ type IsEmailAvailableOutput { is_email_available: Boolean @doc(description: "Is email availabel value") } -enum CountryCodeEnum @doc(description: "The list of countries codes") { +enum CountryCodeEnum @doc(description: "The list of countries codes") @deprecated(reason: "Use in favor of the id type Country") { AF @doc(description: "Afghanistan") AX @doc(description: "Åland Islands") AL @doc(description: "Albania")