Add delivery addresses to profile, cart, and orders
This commit is contained in:
@@ -102,6 +102,13 @@ export type CreateInvitationInput = {
|
||||
expiresInDays?: InputMaybe<Scalars['Int']['input']>;
|
||||
};
|
||||
|
||||
export type CreateMyDeliveryAddressInput = {
|
||||
address: Scalars['String']['input'];
|
||||
fiasId?: InputMaybe<Scalars['String']['input']>;
|
||||
label?: InputMaybe<Scalars['String']['input']>;
|
||||
unrestrictedValue?: InputMaybe<Scalars['String']['input']>;
|
||||
};
|
||||
|
||||
export type CreateReferralInput = {
|
||||
refereeUserId: Scalars['ID']['input'];
|
||||
};
|
||||
@@ -111,6 +118,19 @@ export enum Decision {
|
||||
Reject = 'REJECT'
|
||||
}
|
||||
|
||||
export type DeliveryAddress = {
|
||||
__typename?: 'DeliveryAddress';
|
||||
address: Scalars['String']['output'];
|
||||
createdAt: Scalars['DateTime']['output'];
|
||||
fiasId?: Maybe<Scalars['String']['output']>;
|
||||
id: Scalars['ID']['output'];
|
||||
isDefault: Scalars['Boolean']['output'];
|
||||
label?: Maybe<Scalars['String']['output']>;
|
||||
unrestrictedValue?: Maybe<Scalars['String']['output']>;
|
||||
updatedAt: Scalars['DateTime']['output'];
|
||||
userId: Scalars['ID']['output'];
|
||||
};
|
||||
|
||||
export type Invitation = {
|
||||
__typename?: 'Invitation';
|
||||
acceptedAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
@@ -163,7 +183,9 @@ export type Mutation = {
|
||||
connectMessenger: MessengerConnection;
|
||||
consumeLoginToken: AuthSession;
|
||||
createInvitation: Invitation;
|
||||
createMyDeliveryAddress: DeliveryAddress;
|
||||
createReferral: ReferralLink;
|
||||
deleteMyDeliveryAddress: Scalars['Boolean']['output'];
|
||||
managerFinalizeOrder: Order;
|
||||
managerSetOrderOffer: Order;
|
||||
registerSelf: RegistrationRequest;
|
||||
@@ -172,6 +194,7 @@ export type Mutation = {
|
||||
reviewRegistrationRequest: RegistrationRequest;
|
||||
reviewRewardWithdrawal: RewardWithdrawalRequest;
|
||||
sendTestMessengerMessage: MessengerDispatchResult;
|
||||
setMyDefaultDeliveryAddress: DeliveryAddress;
|
||||
startOrderWork: Order;
|
||||
submitCalculationOrder: Order;
|
||||
submitReadyOrder: Order;
|
||||
@@ -221,11 +244,21 @@ export type MutationCreateInvitationArgs = {
|
||||
};
|
||||
|
||||
|
||||
export type MutationCreateMyDeliveryAddressArgs = {
|
||||
input: CreateMyDeliveryAddressInput;
|
||||
};
|
||||
|
||||
|
||||
export type MutationCreateReferralArgs = {
|
||||
input: CreateReferralInput;
|
||||
};
|
||||
|
||||
|
||||
export type MutationDeleteMyDeliveryAddressArgs = {
|
||||
addressId: Scalars['ID']['input'];
|
||||
};
|
||||
|
||||
|
||||
export type MutationManagerFinalizeOrderArgs = {
|
||||
decision: Decision;
|
||||
orderId: Scalars['ID']['input'];
|
||||
@@ -269,6 +302,11 @@ export type MutationSendTestMessengerMessageArgs = {
|
||||
};
|
||||
|
||||
|
||||
export type MutationSetMyDefaultDeliveryAddressArgs = {
|
||||
addressId: Scalars['ID']['input'];
|
||||
};
|
||||
|
||||
|
||||
export type MutationStartOrderWorkArgs = {
|
||||
orderId: Scalars['ID']['input'];
|
||||
};
|
||||
@@ -311,6 +349,7 @@ export type Order = {
|
||||
code: Scalars['String']['output'];
|
||||
createdAt: Scalars['DateTime']['output'];
|
||||
customerId: Scalars['ID']['output'];
|
||||
deliveryAddress?: Maybe<Scalars['String']['output']>;
|
||||
deliveryFee?: Maybe<Scalars['Float']['output']>;
|
||||
deliveryTerms?: Maybe<Scalars['String']['output']>;
|
||||
history: Array<OrderStatusEvent>;
|
||||
@@ -384,6 +423,7 @@ export type Query = {
|
||||
me?: Maybe<User>;
|
||||
myCounterpartyProfile?: Maybe<CounterpartyProfile>;
|
||||
myCurrentOrders: Array<Order>;
|
||||
myDeliveryAddresses: Array<DeliveryAddress>;
|
||||
myMessengerConnections: Array<MessengerConnection>;
|
||||
myNotificationHistory: Array<NotificationHistoryItem>;
|
||||
myOrders: Array<Order>;
|
||||
@@ -504,12 +544,14 @@ export type SetOrderOfferInput = {
|
||||
};
|
||||
|
||||
export type SubmitCalculationOrderInput = {
|
||||
deliveryAddressId?: InputMaybe<Scalars['ID']['input']>;
|
||||
parameters: Scalars['JSON']['input'];
|
||||
productName: Scalars['String']['input'];
|
||||
quantity: Scalars['Float']['input'];
|
||||
};
|
||||
|
||||
export type SubmitReadyOrderInput = {
|
||||
deliveryAddressId?: InputMaybe<Scalars['ID']['input']>;
|
||||
items: Array<ReadyOrderItemInput>;
|
||||
};
|
||||
|
||||
@@ -637,7 +679,7 @@ export type MyCurrentOrdersQuery = { __typename?: 'Query', myCurrentOrders: Arra
|
||||
export type MyOrdersQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type MyOrdersQuery = { __typename?: 'Query', myOrders: Array<{ __typename?: 'Order', id: string, code: string, kind: OrderKind, status: OrderStatus, totalPrice?: number | null, deliveryTerms?: string | null, createdAt: any, items: Array<{ __typename?: 'OrderItem', id: string, productName: string, quantity: number }> }> };
|
||||
export type MyOrdersQuery = { __typename?: 'Query', myOrders: Array<{ __typename?: 'Order', id: string, code: string, kind: OrderKind, status: OrderStatus, deliveryAddress?: string | null, totalPrice?: number | null, deliveryTerms?: string | null, createdAt: any, items: Array<{ __typename?: 'OrderItem', id: string, productName: string, quantity: number }> }> };
|
||||
|
||||
export type SubmitCalculationOrderMutationVariables = Exact<{
|
||||
input: SubmitCalculationOrderInput;
|
||||
@@ -660,11 +702,37 @@ export type ConnectMessengerMutationVariables = Exact<{
|
||||
|
||||
export type ConnectMessengerMutation = { __typename?: 'Mutation', connectMessenger: { __typename?: 'MessengerConnection', id: string, type: MessengerType, channelId: string, isActive: boolean } };
|
||||
|
||||
export type CreateMyDeliveryAddressMutationVariables = Exact<{
|
||||
input: CreateMyDeliveryAddressInput;
|
||||
}>;
|
||||
|
||||
|
||||
export type CreateMyDeliveryAddressMutation = { __typename?: 'Mutation', createMyDeliveryAddress: { __typename?: 'DeliveryAddress', id: string, label?: string | null, address: string, unrestrictedValue?: string | null, fiasId?: string | null, isDefault: boolean, updatedAt: any } };
|
||||
|
||||
export type DeleteMyDeliveryAddressMutationVariables = Exact<{
|
||||
addressId: Scalars['ID']['input'];
|
||||
}>;
|
||||
|
||||
|
||||
export type DeleteMyDeliveryAddressMutation = { __typename?: 'Mutation', deleteMyDeliveryAddress: boolean };
|
||||
|
||||
export type MyCounterpartyProfileQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type MyCounterpartyProfileQuery = { __typename?: 'Query', myCounterpartyProfile?: { __typename?: 'CounterpartyProfile', id: string, companyName: string, companyFullName: string, inn: string, kpp?: string | null, ogrn?: string | null, legalAddress: string, bankName: string, bik: string, correspondentAccount: string, checkingAccount: string, signerFullName: string, signerPosition: string, signerBasis: string, isComplete: boolean, updatedAt: any } | null };
|
||||
|
||||
export type MyDeliveryAddressesQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type MyDeliveryAddressesQuery = { __typename?: 'Query', myDeliveryAddresses: Array<{ __typename?: 'DeliveryAddress', id: string, label?: string | null, address: string, unrestrictedValue?: string | null, fiasId?: string | null, isDefault: boolean, updatedAt: any }> };
|
||||
|
||||
export type SetMyDefaultDeliveryAddressMutationVariables = Exact<{
|
||||
addressId: Scalars['ID']['input'];
|
||||
}>;
|
||||
|
||||
|
||||
export type SetMyDefaultDeliveryAddressMutation = { __typename?: 'Mutation', setMyDefaultDeliveryAddress: { __typename?: 'DeliveryAddress', id: string, label?: string | null, address: string, unrestrictedValue?: string | null, fiasId?: string | null, isDefault: boolean, updatedAt: any } };
|
||||
|
||||
export type UpsertMyCounterpartyProfileMutationVariables = Exact<{
|
||||
input: UpsertMyCounterpartyProfileInput;
|
||||
}>;
|
||||
@@ -1061,6 +1129,7 @@ export const MyOrdersDocument = gql`
|
||||
code
|
||||
kind
|
||||
status
|
||||
deliveryAddress
|
||||
totalPrice
|
||||
deliveryTerms
|
||||
createdAt
|
||||
@@ -1188,6 +1257,68 @@ export function useConnectMessengerMutation(options: VueApolloComposable.UseMuta
|
||||
return VueApolloComposable.useMutation<ConnectMessengerMutation, ConnectMessengerMutationVariables>(ConnectMessengerDocument, options);
|
||||
}
|
||||
export type ConnectMessengerMutationCompositionFunctionResult = VueApolloComposable.UseMutationReturn<ConnectMessengerMutation, ConnectMessengerMutationVariables>;
|
||||
export const CreateMyDeliveryAddressDocument = gql`
|
||||
mutation CreateMyDeliveryAddress($input: CreateMyDeliveryAddressInput!) {
|
||||
createMyDeliveryAddress(input: $input) {
|
||||
id
|
||||
label
|
||||
address
|
||||
unrestrictedValue
|
||||
fiasId
|
||||
isDefault
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useCreateMyDeliveryAddressMutation__
|
||||
*
|
||||
* To run a mutation, you first call `useCreateMyDeliveryAddressMutation` within a Vue component and pass it any options that fit your needs.
|
||||
* When your component renders, `useCreateMyDeliveryAddressMutation` returns an object that includes:
|
||||
* - A mutate function that you can call at any time to execute the mutation
|
||||
* - Several other properties: https://v4.apollo.vuejs.org/api/use-mutation.html#return
|
||||
*
|
||||
* @param options that will be passed into the mutation, supported options are listed on: https://v4.apollo.vuejs.org/guide-composable/mutation.html#options;
|
||||
*
|
||||
* @example
|
||||
* const { mutate, loading, error, onDone } = useCreateMyDeliveryAddressMutation({
|
||||
* variables: {
|
||||
* input: // value for 'input'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useCreateMyDeliveryAddressMutation(options: VueApolloComposable.UseMutationOptions<CreateMyDeliveryAddressMutation, CreateMyDeliveryAddressMutationVariables> | ReactiveFunction<VueApolloComposable.UseMutationOptions<CreateMyDeliveryAddressMutation, CreateMyDeliveryAddressMutationVariables>> = {}) {
|
||||
return VueApolloComposable.useMutation<CreateMyDeliveryAddressMutation, CreateMyDeliveryAddressMutationVariables>(CreateMyDeliveryAddressDocument, options);
|
||||
}
|
||||
export type CreateMyDeliveryAddressMutationCompositionFunctionResult = VueApolloComposable.UseMutationReturn<CreateMyDeliveryAddressMutation, CreateMyDeliveryAddressMutationVariables>;
|
||||
export const DeleteMyDeliveryAddressDocument = gql`
|
||||
mutation DeleteMyDeliveryAddress($addressId: ID!) {
|
||||
deleteMyDeliveryAddress(addressId: $addressId)
|
||||
}
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useDeleteMyDeliveryAddressMutation__
|
||||
*
|
||||
* To run a mutation, you first call `useDeleteMyDeliveryAddressMutation` within a Vue component and pass it any options that fit your needs.
|
||||
* When your component renders, `useDeleteMyDeliveryAddressMutation` returns an object that includes:
|
||||
* - A mutate function that you can call at any time to execute the mutation
|
||||
* - Several other properties: https://v4.apollo.vuejs.org/api/use-mutation.html#return
|
||||
*
|
||||
* @param options that will be passed into the mutation, supported options are listed on: https://v4.apollo.vuejs.org/guide-composable/mutation.html#options;
|
||||
*
|
||||
* @example
|
||||
* const { mutate, loading, error, onDone } = useDeleteMyDeliveryAddressMutation({
|
||||
* variables: {
|
||||
* addressId: // value for 'addressId'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useDeleteMyDeliveryAddressMutation(options: VueApolloComposable.UseMutationOptions<DeleteMyDeliveryAddressMutation, DeleteMyDeliveryAddressMutationVariables> | ReactiveFunction<VueApolloComposable.UseMutationOptions<DeleteMyDeliveryAddressMutation, DeleteMyDeliveryAddressMutationVariables>> = {}) {
|
||||
return VueApolloComposable.useMutation<DeleteMyDeliveryAddressMutation, DeleteMyDeliveryAddressMutationVariables>(DeleteMyDeliveryAddressDocument, options);
|
||||
}
|
||||
export type DeleteMyDeliveryAddressMutationCompositionFunctionResult = VueApolloComposable.UseMutationReturn<DeleteMyDeliveryAddressMutation, DeleteMyDeliveryAddressMutationVariables>;
|
||||
export const MyCounterpartyProfileDocument = gql`
|
||||
query MyCounterpartyProfile {
|
||||
myCounterpartyProfile {
|
||||
@@ -1230,6 +1361,74 @@ export function useMyCounterpartyProfileLazyQuery(options: VueApolloComposable.U
|
||||
return VueApolloComposable.useLazyQuery<MyCounterpartyProfileQuery, MyCounterpartyProfileQueryVariables>(MyCounterpartyProfileDocument, {}, options);
|
||||
}
|
||||
export type MyCounterpartyProfileQueryCompositionFunctionResult = VueApolloComposable.UseQueryReturn<MyCounterpartyProfileQuery, MyCounterpartyProfileQueryVariables>;
|
||||
export const MyDeliveryAddressesDocument = gql`
|
||||
query MyDeliveryAddresses {
|
||||
myDeliveryAddresses {
|
||||
id
|
||||
label
|
||||
address
|
||||
unrestrictedValue
|
||||
fiasId
|
||||
isDefault
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useMyDeliveryAddressesQuery__
|
||||
*
|
||||
* To run a query within a Vue component, call `useMyDeliveryAddressesQuery` and pass it any options that fit your needs.
|
||||
* When your component renders, `useMyDeliveryAddressesQuery` returns an object from Apollo Client that contains result, loading and error properties
|
||||
* you can use to render your UI.
|
||||
*
|
||||
* @param options that will be passed into the query, supported options are listed on: https://v4.apollo.vuejs.org/guide-composable/query.html#options;
|
||||
*
|
||||
* @example
|
||||
* const { result, loading, error } = useMyDeliveryAddressesQuery();
|
||||
*/
|
||||
export function useMyDeliveryAddressesQuery(options: VueApolloComposable.UseQueryOptions<MyDeliveryAddressesQuery, MyDeliveryAddressesQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<MyDeliveryAddressesQuery, MyDeliveryAddressesQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<MyDeliveryAddressesQuery, MyDeliveryAddressesQueryVariables>> = {}) {
|
||||
return VueApolloComposable.useQuery<MyDeliveryAddressesQuery, MyDeliveryAddressesQueryVariables>(MyDeliveryAddressesDocument, {}, options);
|
||||
}
|
||||
export function useMyDeliveryAddressesLazyQuery(options: VueApolloComposable.UseQueryOptions<MyDeliveryAddressesQuery, MyDeliveryAddressesQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<MyDeliveryAddressesQuery, MyDeliveryAddressesQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<MyDeliveryAddressesQuery, MyDeliveryAddressesQueryVariables>> = {}) {
|
||||
return VueApolloComposable.useLazyQuery<MyDeliveryAddressesQuery, MyDeliveryAddressesQueryVariables>(MyDeliveryAddressesDocument, {}, options);
|
||||
}
|
||||
export type MyDeliveryAddressesQueryCompositionFunctionResult = VueApolloComposable.UseQueryReturn<MyDeliveryAddressesQuery, MyDeliveryAddressesQueryVariables>;
|
||||
export const SetMyDefaultDeliveryAddressDocument = gql`
|
||||
mutation SetMyDefaultDeliveryAddress($addressId: ID!) {
|
||||
setMyDefaultDeliveryAddress(addressId: $addressId) {
|
||||
id
|
||||
label
|
||||
address
|
||||
unrestrictedValue
|
||||
fiasId
|
||||
isDefault
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useSetMyDefaultDeliveryAddressMutation__
|
||||
*
|
||||
* To run a mutation, you first call `useSetMyDefaultDeliveryAddressMutation` within a Vue component and pass it any options that fit your needs.
|
||||
* When your component renders, `useSetMyDefaultDeliveryAddressMutation` returns an object that includes:
|
||||
* - A mutate function that you can call at any time to execute the mutation
|
||||
* - Several other properties: https://v4.apollo.vuejs.org/api/use-mutation.html#return
|
||||
*
|
||||
* @param options that will be passed into the mutation, supported options are listed on: https://v4.apollo.vuejs.org/guide-composable/mutation.html#options;
|
||||
*
|
||||
* @example
|
||||
* const { mutate, loading, error, onDone } = useSetMyDefaultDeliveryAddressMutation({
|
||||
* variables: {
|
||||
* addressId: // value for 'addressId'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useSetMyDefaultDeliveryAddressMutation(options: VueApolloComposable.UseMutationOptions<SetMyDefaultDeliveryAddressMutation, SetMyDefaultDeliveryAddressMutationVariables> | ReactiveFunction<VueApolloComposable.UseMutationOptions<SetMyDefaultDeliveryAddressMutation, SetMyDefaultDeliveryAddressMutationVariables>> = {}) {
|
||||
return VueApolloComposable.useMutation<SetMyDefaultDeliveryAddressMutation, SetMyDefaultDeliveryAddressMutationVariables>(SetMyDefaultDeliveryAddressDocument, options);
|
||||
}
|
||||
export type SetMyDefaultDeliveryAddressMutationCompositionFunctionResult = VueApolloComposable.UseMutationReturn<SetMyDefaultDeliveryAddressMutation, SetMyDefaultDeliveryAddressMutationVariables>;
|
||||
export const UpsertMyCounterpartyProfileDocument = gql`
|
||||
mutation UpsertMyCounterpartyProfile($input: UpsertMyCounterpartyProfileInput!) {
|
||||
upsertMyCounterpartyProfile(input: $input) {
|
||||
|
||||
Reference in New Issue
Block a user