Add delivery addresses to profile and order flow

This commit is contained in:
Ruslan Bakiev
2026-04-03 10:25:19 +07:00
parent 3ee14d508c
commit f7fb45618d
4 changed files with 278 additions and 0 deletions

View File

@@ -86,6 +86,18 @@ type CounterpartyProfile {
updatedAt: DateTime!
}
type DeliveryAddress {
id: ID!
userId: ID!
label: String
address: String!
unrestrictedValue: String
fiasId: String
isDefault: Boolean!
createdAt: DateTime!
updatedAt: DateTime!
}
type AuthCodeRequestResult {
challengeToken: String!
channel: LoginChannel!
@@ -191,6 +203,7 @@ type Order {
kind: OrderKind!
status: OrderStatus!
customerId: ID!
deliveryAddress: String
managerId: ID
clientApproved: Boolean
managerApproved: Boolean
@@ -244,6 +257,7 @@ type Query {
healthcheck: String!
me: User
myCounterpartyProfile: CounterpartyProfile
myDeliveryAddresses: [DeliveryAddress!]!
myMessengerConnections: [MessengerConnection!]!
myNotificationHistory(channel: MessengerType!, limit: Int = 50): [NotificationHistoryItem!]!
managerNotificationHistory(userId: ID!, channel: MessengerType!, limit: Int = 50): [NotificationHistoryItem!]!
@@ -310,6 +324,13 @@ input UpsertMyCounterpartyProfileInput {
signerBasis: String!
}
input CreateMyDeliveryAddressInput {
label: String
address: String!
unrestrictedValue: String
fiasId: String
}
input ReadyOrderItemInput {
productId: ID!
quantity: Float!
@@ -317,12 +338,14 @@ input ReadyOrderItemInput {
input SubmitReadyOrderInput {
items: [ReadyOrderItemInput!]!
deliveryAddressId: ID
}
input SubmitCalculationOrderInput {
productName: String!
quantity: Float!
parameters: JSON!
deliveryAddressId: ID
}
input SetOrderOfferInput {
@@ -368,6 +391,9 @@ type Mutation {
acceptInvitation(input: AcceptInvitationInput!): User!
connectMessenger(input: ConnectMessengerInput!): MessengerConnection!
upsertMyCounterpartyProfile(input: UpsertMyCounterpartyProfileInput!): CounterpartyProfile!
createMyDeliveryAddress(input: CreateMyDeliveryAddressInput!): DeliveryAddress!
setMyDefaultDeliveryAddress(addressId: ID!): DeliveryAddress!
deleteMyDeliveryAddress(addressId: ID!): Boolean!
sendTestMessengerMessage(type: MessengerType!, channelId: String, message: String): MessengerDispatchResult!
submitReadyOrder(input: SubmitReadyOrderInput!): Order!