diff --git a/apps/client/src/Products/ProductsCatalogue.tsx b/apps/client/src/Products/ProductsCatalogue.tsx index 0622c633..d1ea8cec 100644 --- a/apps/client/src/Products/ProductsCatalogue.tsx +++ b/apps/client/src/Products/ProductsCatalogue.tsx @@ -1,9 +1,9 @@ -import { useEffect, useState } from "react"; -import { useFetchProducts } from "@/hooks/products"; -import { Card, List, ListHeader } from "ui"; -import { formatCost } from "@sahil/lib"; -import { useOrderItemsStore } from "@/hooks/useOrderItemsStore"; -import Link from "next/link"; +import { useEffect, useState } from 'react'; +import { useFetchProducts } from '@/hooks/products'; +import { Card, List, ListHeader } from 'ui'; +import { formatCost } from '@sahil/lib'; +import { useOrderItemsStore } from '@/hooks/useOrderItemsStore'; +import Link from 'next/link'; import { HiArrowSmallLeft, HiArrowSmallRight, @@ -15,7 +15,8 @@ import { HiOutlineBanknotes, HiArrowPath, HiSignalSlash, -} from "react-icons/hi2"; +} from 'react-icons/hi2'; +import { Products } from '@sahil/lib/graphql/__generated__/graphql'; export const ProductsCatalogue = () => { const [offset, setOffset] = useState(0); @@ -38,22 +39,22 @@ export const ProductsCatalogue = () => { ); useEffect(() => { - setProducts(products); + setProducts(products as Products[]); }, [products, setProducts]); if (error) { return ( - - + +

Products aren't loading due to a technical problem on our side. Please - try again. If the issue continues,{" "} - contact support. + try again. If the issue continues,{' '} + contact support.

-
-
@@ -63,10 +64,10 @@ export const ProductsCatalogue = () => { if (loading) { return ( - -
+ +
- +

Loading Products

@@ -82,7 +83,7 @@ export const ProductsCatalogue = () => { }); }; const onRemoveOrderItem = (product: any) => { - console.log("remove product to order", product); + console.log('remove product to order', product); }; return ( @@ -90,14 +91,14 @@ export const ProductsCatalogue = () => { setOffset((prev) => prev + 12)} onPreviousPage={() => setOffset((prev) => prev - 12)} - isNextDisabled={offset + 12 >= productsCount} + isNextDisabled={offset + 12 >= productsCount!} isPrevDisabled={offset === 0} size={productsCount} limit={12} - sizeLabel="Products" + sizeLabel='Products' /> { ); }} /> -
- +
+ Proceed to checkout
@@ -138,55 +139,55 @@ export const ProductSummary = ({ }: ProductSummaryProps) => { return ( -
-

{product.name}

+
+

{product.name}

{product.discount && product.discount !== 0 && ( -
{product.discount}%
+
{product.discount}%
)}
-
-
- +
+
+ {formatCost(product.price)}
-
+
{!isInCart ? ( ) : ( -
+
-
+
-
1
+
1
diff --git a/apps/client/src/hooks/products.ts b/apps/client/src/hooks/products.ts index 918cf16e..166bc1d2 100644 --- a/apps/client/src/hooks/products.ts +++ b/apps/client/src/hooks/products.ts @@ -1,6 +1,7 @@ -import { useMutation, useQuery } from "@apollo/client"; -import { FETCH_PRODUCTS, FETCH_PRODUCTS_BY_NAME } from "@sahil/lib/graphql"; -import { useRouter } from "next/router"; +import { useMutation, useQuery } from '@apollo/client'; +import { FETCH_PRODUCTS, FETCH_PRODUCTS_BY_NAME } from '@sahil/lib/graphql'; +import { GetProductsQuery } from '@sahil/lib/graphql/__generated__/graphql'; +import { useRouter } from 'next/router'; export const useFetchProducts = ({ offset = 0, @@ -14,7 +15,7 @@ export const useFetchProducts = ({ const graphqlQuery = name ? FETCH_PRODUCTS_BY_NAME : FETCH_PRODUCTS; - const { error, data, loading } = useQuery(graphqlQuery, { + const { error, data, loading } = useQuery(graphqlQuery, { variables: { offset, limit, @@ -25,6 +26,6 @@ export const useFetchProducts = ({ error, data: data?.products, loading, - productsCount: data?.products_aggregate?.aggregate.count, + productsCount: data?.products_aggregate?.aggregate?.count, }; }; diff --git a/apps/client/src/hooks/useOrderItemsStore.ts b/apps/client/src/hooks/useOrderItemsStore.ts index caecf8b4..27a458a9 100644 --- a/apps/client/src/hooks/useOrderItemsStore.ts +++ b/apps/client/src/hooks/useOrderItemsStore.ts @@ -1,18 +1,13 @@ import { create } from 'zustand'; - -type OrderItem = { - productId: string; - quantity: number; - price: number; -}; +import { Order_Item, Products } from '@sahil/lib/graphql/__generated__/graphql'; type OrderItemsStore = { - orderItems: OrderItem[]; + orderItems: Order_Item[]; products: any[]; - addOrderItem: (item: OrderItem) => void; - removeOrderItem: (item: OrderItem) => void; - updateOrderItem: (item: OrderItem) => void; - setProducts: (products: any[]) => void; + addOrderItem: (item: Order_Item) => void; + removeOrderItem: (item: Order_Item) => void; + updateOrderItem: (item: Order_Item) => void; + setProducts: (products: Products[]) => void; }; const INITIAL_STATE = { diff --git a/apps/client/src/pages/checkout/index.tsx b/apps/client/src/pages/checkout/index.tsx index 3b724de1..b7be0877 100644 --- a/apps/client/src/pages/checkout/index.tsx +++ b/apps/client/src/pages/checkout/index.tsx @@ -9,6 +9,7 @@ import { } from 'react-icons/hi2'; import { usePlaceBusinessOrder } from '@/hooks/orders'; import { Key } from 'react'; +import { Order_Item } from '@sahil/lib/graphql/__generated__/graphql'; export const OrderItem = ({ price, @@ -78,9 +79,7 @@ export const OrderItems = ({ items }: { items: any }) => { ); }; -function calculateTotal( - arr: { productId: string; quantity: number; price: number }[] -) { +function calculateTotal(arr: Order_Item[]) { // Initialize total items and total price let totalItems = 0; let totalPrice = 0; @@ -114,6 +113,7 @@ export default function CheckoutPage() { const { totalItems, totalPrice } = calculateTotal(orderItems); const router = useRouter(); + console.log(orderItems); const onConfirmOrder = async () => {}; return ( diff --git a/packages/lib/graphql/__generated__/graphql.ts b/packages/lib/graphql/__generated__/graphql.ts index c8fd36f6..a00fccc0 100644 --- a/packages/lib/graphql/__generated__/graphql.ts +++ b/packages/lib/graphql/__generated__/graphql.ts @@ -35,6 +35,29 @@ export type Scalars = { uuid: { input: any; output: any }; }; +export type AccountBalanceResponse = { + __typename?: "AccountBalanceResponse"; + availableBalance?: Maybe; + currency?: Maybe; +}; + +export type Address = { + __typename?: "Address"; + location?: Maybe; + placeId?: Maybe; + types?: Maybe>>; +}; + +export type BasicUserInfoResponse = { + __typename?: "BasicUserInfoResponse"; + birthdate?: Maybe; + family_name?: Maybe; + gender?: Maybe; + given_name?: Maybe; + locale?: Maybe; + status?: Maybe; +}; + /** Boolean expression to compare columns of type "Boolean". All fields are combined with logical 'AND'. */ export type Boolean_Comparison_Exp = { _eq?: InputMaybe; @@ -48,6 +71,37 @@ export type Boolean_Comparison_Exp = { _nin?: InputMaybe>; }; +export type CreateAccessTokenResponse = { + __typename?: "CreateAccessTokenResponse"; + expires_in?: Maybe; + token?: Maybe; +}; + +export type DirectionLeg = { + __typename?: "DirectionLeg"; + distance?: Maybe; + duration?: Maybe; +}; + +export type DirectionRoute = { + __typename?: "DirectionRoute"; + legs?: Maybe>>; + name?: Maybe; +}; + +export type Directions = { + __typename?: "Directions"; + endLocation?: Maybe; + routes?: Maybe; + startLocation?: Maybe; +}; + +export type GeoCoords = { + __typename?: "GeoCoords"; + lat?: Maybe; + lng?: Maybe; +}; + /** Boolean expression to compare columns of type "Int". All fields are combined with logical 'AND'. */ export type Int_Comparison_Exp = { _eq?: InputMaybe; @@ -61,6 +115,25 @@ export type Int_Comparison_Exp = { _nin?: InputMaybe>; }; +export type LegDistance = { + __typename?: "LegDistance"; + text?: Maybe; + value?: Maybe; +}; + +export type LegDuration = { + __typename?: "LegDuration"; + text?: Maybe; + value?: Maybe; +}; + +export type LocationByCoords = { + __typename?: "LocationByCoords"; + location?: Maybe; + placeId?: Maybe; + types?: Maybe>>; +}; + export type OrdersActionInput = { created_at: Scalars["timestamptz"]["input"]; customerId?: InputMaybe; @@ -82,6 +155,66 @@ export type OrdersActionType = { processedBy?: Maybe; }; +export type PayerInput = { + partyId: Scalars["String"]["input"]; + partyIdType: Scalars["String"]["input"]; +}; + +export type PaymentStatusResponse = { + __typename?: "PaymentStatusResponse"; + financialTransactionId?: Maybe; + reason?: Maybe; + referenceId?: Maybe; + status?: Maybe; +}; + +export type Places = { + __typename?: "Places"; + address?: Maybe; + lat?: Maybe; + lng?: Maybe; + location?: Maybe; + name?: Maybe; +}; + +export type PreApprovalStatusResponse = { + __typename?: "PreApprovalStatusResponse"; + expirationDateTime?: Maybe; + payer?: Maybe; + payerCurrency?: Maybe; + payerMessage?: Maybe; + reason?: Maybe; + status?: Maybe; +}; + +export type RequestToPayInput = { + amount: Scalars["Float"]["input"]; + currency?: InputMaybe; + externalId: Scalars["String"]["input"]; + payeeNote?: InputMaybe; + payer: PayerInput; + payerMessage?: InputMaybe; +}; + +export type RequestToPayResponse = { + __typename?: "RequestToPayResponse"; + message?: Maybe; + status?: Maybe; +}; + +export type RequestToPayTransactionStatusResponse = { + __typename?: "RequestToPayTransactionStatusResponse"; + amount?: Maybe; + currency?: Maybe; + externalId?: Maybe; + financialTransactionId?: Maybe; + payeeNote?: Maybe; + payer?: Maybe; + payerMessage?: Maybe; + reason?: Maybe; + status?: Maybe; +}; + /** Boolean expression to compare columns of type "String". All fields are combined with logical 'AND'. */ export type String_Comparison_Exp = { _eq?: InputMaybe; @@ -115,6 +248,34 @@ export type String_Comparison_Exp = { _similar?: InputMaybe; }; +export type UserInfoWithConsentResponse = { + __typename?: "UserInfoWithConsentResponse"; + active?: Maybe; + address?: Maybe; + birthdate?: Maybe; + city_of_birth?: Maybe; + country_of_birth?: Maybe; + credit_score?: Maybe; + email?: Maybe; + email_verified?: Maybe; + employer_name?: Maybe; + family_name?: Maybe; + gender?: Maybe; + given_name?: Maybe; + identification_type?: Maybe; + identification_value?: Maybe; + locale?: Maybe; + middle_name?: Maybe; + name?: Maybe; + occupation?: Maybe; + phone_number?: Maybe; + phone_number_verified?: Maybe; + region_of_birth?: Maybe; + status?: Maybe; + sub?: Maybe; + updated_at?: Maybe; +}; + /** columns and relationships of "addresses" */ export type Addresses = { __typename?: "addresses"; @@ -3570,6 +3731,7 @@ export type Locations_Updates = { /** mutation root */ export type Mutation_Root = { __typename?: "mutation_root"; + createAccessToken?: Maybe; /** delete data from the table: "addresses" */ delete_addresses?: Maybe; /** delete single row from the table: "addresses" */ @@ -3834,6 +3996,7 @@ export type Mutation_Root = { insert_users?: Maybe; /** insert a single row into the table: "users" */ insert_users_one?: Maybe; + requestToPay?: Maybe; /** update data of the table: "addresses" */ update_addresses?: Maybe; /** update single row of the table: "addresses" */ @@ -4790,6 +4953,11 @@ export type Mutation_RootInsert_Users_OneArgs = { on_conflict?: InputMaybe; }; +/** mutation root */ +export type Mutation_RootRequestToPayArgs = { + object?: InputMaybe; +}; + /** mutation root */ export type Mutation_RootUpdate_AddressesArgs = { _inc?: InputMaybe; @@ -5061,12 +5229,14 @@ export type Mutation_RootUpdate_Order_Fulfillment_Type_ManyArgs = { /** mutation root */ export type Mutation_RootUpdate_Order_ItemArgs = { + _inc?: InputMaybe; _set?: InputMaybe; where: Order_Item_Bool_Exp; }; /** mutation root */ export type Mutation_RootUpdate_Order_Item_By_PkArgs = { + _inc?: InputMaybe; _set?: InputMaybe; pk_columns: Order_Item_Pk_Columns_Input; }; @@ -5526,9 +5696,11 @@ export type Order_Item = { /** An object relationship */ order?: Maybe; orderId?: Maybe; + price: Scalars["Int"]["output"]; /** An object relationship */ - product?: Maybe; - productId?: Maybe; + product: Products; + productId: Scalars["uuid"]["output"]; + quantity: Scalars["Int"]["output"]; }; /** aggregated selection of "order_item" */ @@ -5552,9 +5724,17 @@ export type Order_Item_Aggregate_Bool_Exp_Count = { /** aggregate fields of "order_item" */ export type Order_Item_Aggregate_Fields = { __typename?: "order_item_aggregate_fields"; + avg?: Maybe; count: Scalars["Int"]["output"]; max?: Maybe; min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; }; /** aggregate fields of "order_item" */ @@ -5565,9 +5745,17 @@ export type Order_Item_Aggregate_FieldsCountArgs = { /** order by aggregate values of table "order_item" */ export type Order_Item_Aggregate_Order_By = { + avg?: InputMaybe; count?: InputMaybe; max?: InputMaybe; min?: InputMaybe; + stddev?: InputMaybe; + stddev_pop?: InputMaybe; + stddev_samp?: InputMaybe; + sum?: InputMaybe; + var_pop?: InputMaybe; + var_samp?: InputMaybe; + variance?: InputMaybe; }; /** input type for inserting array relation for remote table "order_item" */ @@ -5577,6 +5765,19 @@ export type Order_Item_Arr_Rel_Insert_Input = { on_conflict?: InputMaybe; }; +/** aggregate avg on columns */ +export type Order_Item_Avg_Fields = { + __typename?: "order_item_avg_fields"; + price?: Maybe; + quantity?: Maybe; +}; + +/** order by avg() on columns of table "order_item" */ +export type Order_Item_Avg_Order_By = { + price?: InputMaybe; + quantity?: InputMaybe; +}; + /** Boolean expression to filter rows from the table "order_item". All fields are combined with a logical 'AND'. */ export type Order_Item_Bool_Exp = { _and?: InputMaybe>; @@ -5586,8 +5787,10 @@ export type Order_Item_Bool_Exp = { id?: InputMaybe; order?: InputMaybe; orderId?: InputMaybe; + price?: InputMaybe; product?: InputMaybe; productId?: InputMaybe; + quantity?: InputMaybe; }; /** unique or primary key constraints on table "order_item" */ @@ -5596,14 +5799,22 @@ export enum Order_Item_Constraint { OrderItemsPkey = "order_items_pkey", } +/** input type for incrementing numeric columns in table "order_item" */ +export type Order_Item_Inc_Input = { + price?: InputMaybe; + quantity?: InputMaybe; +}; + /** input type for inserting data into table "order_item" */ export type Order_Item_Insert_Input = { created_at?: InputMaybe; id?: InputMaybe; order?: InputMaybe; orderId?: InputMaybe; + price?: InputMaybe; product?: InputMaybe; productId?: InputMaybe; + quantity?: InputMaybe; }; /** aggregate max on columns */ @@ -5612,7 +5823,9 @@ export type Order_Item_Max_Fields = { created_at?: Maybe; id?: Maybe; orderId?: Maybe; + price?: Maybe; productId?: Maybe; + quantity?: Maybe; }; /** order by max() on columns of table "order_item" */ @@ -5620,7 +5833,9 @@ export type Order_Item_Max_Order_By = { created_at?: InputMaybe; id?: InputMaybe; orderId?: InputMaybe; + price?: InputMaybe; productId?: InputMaybe; + quantity?: InputMaybe; }; /** aggregate min on columns */ @@ -5629,7 +5844,9 @@ export type Order_Item_Min_Fields = { created_at?: Maybe; id?: Maybe; orderId?: Maybe; + price?: Maybe; productId?: Maybe; + quantity?: Maybe; }; /** order by min() on columns of table "order_item" */ @@ -5637,7 +5854,9 @@ export type Order_Item_Min_Order_By = { created_at?: InputMaybe; id?: InputMaybe; orderId?: InputMaybe; + price?: InputMaybe; productId?: InputMaybe; + quantity?: InputMaybe; }; /** response of any mutation on the table "order_item" */ @@ -5662,8 +5881,10 @@ export type Order_Item_Order_By = { id?: InputMaybe; order?: InputMaybe; orderId?: InputMaybe; + price?: InputMaybe; product?: InputMaybe; productId?: InputMaybe; + quantity?: InputMaybe; }; /** primary key columns input for table: order_item */ @@ -5680,7 +5901,11 @@ export enum Order_Item_Select_Column { /** column name */ OrderId = "orderId", /** column name */ + Price = "price", + /** column name */ ProductId = "productId", + /** column name */ + Quantity = "quantity", } /** input type for updating data in table "order_item" */ @@ -5688,7 +5913,48 @@ export type Order_Item_Set_Input = { created_at?: InputMaybe; id?: InputMaybe; orderId?: InputMaybe; + price?: InputMaybe; productId?: InputMaybe; + quantity?: InputMaybe; +}; + +/** aggregate stddev on columns */ +export type Order_Item_Stddev_Fields = { + __typename?: "order_item_stddev_fields"; + price?: Maybe; + quantity?: Maybe; +}; + +/** order by stddev() on columns of table "order_item" */ +export type Order_Item_Stddev_Order_By = { + price?: InputMaybe; + quantity?: InputMaybe; +}; + +/** aggregate stddev_pop on columns */ +export type Order_Item_Stddev_Pop_Fields = { + __typename?: "order_item_stddev_pop_fields"; + price?: Maybe; + quantity?: Maybe; +}; + +/** order by stddev_pop() on columns of table "order_item" */ +export type Order_Item_Stddev_Pop_Order_By = { + price?: InputMaybe; + quantity?: InputMaybe; +}; + +/** aggregate stddev_samp on columns */ +export type Order_Item_Stddev_Samp_Fields = { + __typename?: "order_item_stddev_samp_fields"; + price?: Maybe; + quantity?: Maybe; +}; + +/** order by stddev_samp() on columns of table "order_item" */ +export type Order_Item_Stddev_Samp_Order_By = { + price?: InputMaybe; + quantity?: InputMaybe; }; /** Streaming cursor of the table "order_item" */ @@ -5704,7 +5970,22 @@ export type Order_Item_Stream_Cursor_Value_Input = { created_at?: InputMaybe; id?: InputMaybe; orderId?: InputMaybe; + price?: InputMaybe; productId?: InputMaybe; + quantity?: InputMaybe; +}; + +/** aggregate sum on columns */ +export type Order_Item_Sum_Fields = { + __typename?: "order_item_sum_fields"; + price?: Maybe; + quantity?: Maybe; +}; + +/** order by sum() on columns of table "order_item" */ +export type Order_Item_Sum_Order_By = { + price?: InputMaybe; + quantity?: InputMaybe; }; /** update columns of table "order_item" */ @@ -5716,16 +5997,61 @@ export enum Order_Item_Update_Column { /** column name */ OrderId = "orderId", /** column name */ + Price = "price", + /** column name */ ProductId = "productId", + /** column name */ + Quantity = "quantity", } export type Order_Item_Updates = { + /** increments the numeric columns with given value of the filtered values */ + _inc?: InputMaybe; /** sets the columns of the filtered rows to the given values */ _set?: InputMaybe; /** filter the rows which have to be updated */ where: Order_Item_Bool_Exp; }; +/** aggregate var_pop on columns */ +export type Order_Item_Var_Pop_Fields = { + __typename?: "order_item_var_pop_fields"; + price?: Maybe; + quantity?: Maybe; +}; + +/** order by var_pop() on columns of table "order_item" */ +export type Order_Item_Var_Pop_Order_By = { + price?: InputMaybe; + quantity?: InputMaybe; +}; + +/** aggregate var_samp on columns */ +export type Order_Item_Var_Samp_Fields = { + __typename?: "order_item_var_samp_fields"; + price?: Maybe; + quantity?: Maybe; +}; + +/** order by var_samp() on columns of table "order_item" */ +export type Order_Item_Var_Samp_Order_By = { + price?: InputMaybe; + quantity?: InputMaybe; +}; + +/** aggregate variance on columns */ +export type Order_Item_Variance_Fields = { + __typename?: "order_item_variance_fields"; + price?: Maybe; + quantity?: Maybe; +}; + +/** order by variance() on columns of table "order_item" */ +export type Order_Item_Variance_Order_By = { + price?: InputMaybe; + quantity?: InputMaybe; +}; + /** columns and relationships of "order_preference" */ export type Order_Preference = { __typename?: "order_preference"; @@ -6267,7 +6593,7 @@ export type Orders = { destination?: Maybe; fulfillment_type?: Maybe; id: Scalars["uuid"]["output"]; - orderId?: Maybe; + orderId?: Maybe; /** An array relationship */ order_items: Array; /** An aggregate relationship */ @@ -6397,7 +6723,7 @@ export type Orders_Bool_Exp = { destination?: InputMaybe; fulfillment_type?: InputMaybe; id?: InputMaybe; - orderId?: InputMaybe; + orderId?: InputMaybe; order_items?: InputMaybe; order_items_aggregate?: InputMaybe; order_status?: InputMaybe; @@ -6424,7 +6750,7 @@ export type Orders_Insert_Input = { destination?: InputMaybe; fulfillment_type?: InputMaybe; id?: InputMaybe; - orderId?: InputMaybe; + orderId?: InputMaybe; order_items?: InputMaybe; order_status?: InputMaybe; order_suppliers?: InputMaybe; @@ -6440,7 +6766,7 @@ export type Orders_Max_Fields = { customerId?: Maybe; destination?: Maybe; id?: Maybe; - orderId?: Maybe; + orderId?: Maybe; origin?: Maybe; processedBy?: Maybe; }; @@ -6463,7 +6789,7 @@ export type Orders_Min_Fields = { customerId?: Maybe; destination?: Maybe; id?: Maybe; - orderId?: Maybe; + orderId?: Maybe; origin?: Maybe; processedBy?: Maybe; }; @@ -6555,7 +6881,7 @@ export type Orders_Set_Input = { destination?: InputMaybe; fulfillment_type?: InputMaybe; id?: InputMaybe; - orderId?: InputMaybe; + orderId?: InputMaybe; origin?: InputMaybe; processedBy?: InputMaybe; status?: InputMaybe; @@ -6576,7 +6902,7 @@ export type Orders_Stream_Cursor_Value_Input = { destination?: InputMaybe; fulfillment_type?: InputMaybe; id?: InputMaybe; - orderId?: InputMaybe; + orderId?: InputMaybe; origin?: InputMaybe; processedBy?: InputMaybe; status?: InputMaybe; @@ -7088,6 +7414,8 @@ export type Products_Variance_Order_By = { export type Query_Root = { __typename?: "query_root"; + accountBalance?: Maybe; + address?: Maybe
; /** An array relationship */ addresses: Array; /** An aggregate relationship */ @@ -7106,6 +7434,7 @@ export type Query_Root = { agent_type_aggregate: Agent_Type_Aggregate; /** fetch data from the table: "agent_type" using primary key columns */ agent_type_by_pk?: Maybe; + basicUserInfo?: Maybe; /** fetch data from the table: "business" */ business: Array; /** fetch aggregated fields from the table: "business" */ @@ -7130,6 +7459,7 @@ export type Query_Root = { contact_details_aggregate: Contact_Details_Aggregate; /** fetch data from the table: "contact_details" using primary key columns */ contact_details_by_pk?: Maybe; + coords?: Maybe; /** An array relationship */ courier_rides: Array; /** An aggregate relationship */ @@ -7166,6 +7496,7 @@ export type Query_Root = { delivery_status_aggregate: Delivery_Status_Aggregate; /** fetch data from the table: "delivery_status" using primary key columns */ delivery_status_by_pk?: Maybe; + directions?: Maybe; /** fetch data from the table: "geography_columns" */ geography_columns: Array; /** fetch aggregated fields from the table: "geography_columns" */ @@ -7218,6 +7549,9 @@ export type Query_Root = { orders_aggregate: Orders_Aggregate; /** fetch data from the table: "orders" using primary key columns */ orders_by_pk?: Maybe; + paymentStatus?: Maybe; + places?: Maybe>>; + preApprovalStatus?: Maybe; /** An array relationship */ products: Array; /** An aggregate relationship */ @@ -7236,6 +7570,7 @@ export type Query_Root = { reports_aggregate: Reports_Aggregate; /** fetch data from the table: "reports" using primary key columns */ reports_by_pk?: Maybe; + requestToPayTransactionStatus?: Maybe; /** fetch data from the table: "ride_status" */ ride_status: Array; /** fetch aggregated fields from the table: "ride_status" */ @@ -7278,6 +7613,7 @@ export type Query_Root = { suppliers_categories_aggregate: Suppliers_Categories_Aggregate; /** fetch data from the table: "suppliers_categories" using primary key columns */ suppliers_categories_by_pk?: Maybe; + userInfoWithConsent?: Maybe; /** fetch data from the table: "user_role" */ user_role: Array; /** fetch aggregated fields from the table: "user_role" */ @@ -7292,6 +7628,11 @@ export type Query_Root = { users_by_pk?: Maybe; }; +export type Query_RootAddressArgs = { + lat: Scalars["Float"]["input"]; + lng: Scalars["Float"]["input"]; +}; + export type Query_RootAddressesArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7352,6 +7693,10 @@ export type Query_RootAgent_Type_By_PkArgs = { type: Scalars["String"]["input"]; }; +export type Query_RootBasicUserInfoArgs = { + accountHolderMSISDN: Scalars["String"]["input"]; +}; + export type Query_RootBusinessArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7432,6 +7777,10 @@ export type Query_RootContact_Details_By_PkArgs = { id: Scalars["uuid"]["input"]; }; +export type Query_RootCoordsArgs = { + address: Scalars["String"]["input"]; +}; + export type Query_RootCourier_RidesArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7552,6 +7901,11 @@ export type Query_RootDelivery_Status_By_PkArgs = { status: Scalars["String"]["input"]; }; +export type Query_RootDirectionsArgs = { + destination: Scalars["String"]["input"]; + origin: Scalars["String"]["input"]; +}; + export type Query_RootGeography_ColumnsArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7728,6 +8082,19 @@ export type Query_RootOrders_By_PkArgs = { id: Scalars["uuid"]["input"]; }; +export type Query_RootPaymentStatusArgs = { + referenceId: Scalars["String"]["input"]; +}; + +export type Query_RootPlacesArgs = { + lat: Scalars["Float"]["input"]; + lng: Scalars["Float"]["input"]; +}; + +export type Query_RootPreApprovalStatusArgs = { + referenceId: Scalars["String"]["input"]; +}; + export type Query_RootProductsArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -7788,6 +8155,10 @@ export type Query_RootReports_By_PkArgs = { id: Scalars["uuid"]["input"]; }; +export type Query_RootRequestToPayTransactionStatusArgs = { + referenceId: Scalars["String"]["input"]; +}; + export type Query_RootRide_StatusArgs = { distinct_on?: InputMaybe>; limit?: InputMaybe; @@ -11636,7 +12007,7 @@ export type GetBusinessOrdersQuery = { id: any; created_at: any; destination?: string | null; - orderId?: string | null; + orderId?: any | null; customerId?: any | null; origin?: string | null; status?: Order_Status_Enum | null; @@ -11733,7 +12104,7 @@ export type GetOrdersQuery = { id: any; created_at: any; destination?: string | null; - orderId?: string | null; + orderId?: any | null; customerId?: any | null; origin?: string | null; status?: Order_Status_Enum | null; @@ -11764,20 +12135,20 @@ export type GetorderByPkQuery = { id: any; created_at: any; destination?: string | null; - orderId?: string | null; + orderId?: any | null; customerId?: any | null; origin?: string | null; status?: Order_Status_Enum | null; order_items: Array<{ __typename?: "order_item"; id: any; - product?: { + product: { __typename?: "products"; id: any; name?: string | null; quantity: number; price?: number | null; - } | null; + }; }>; agent?: { __typename?: "agent"; name: string } | null; order_items_aggregate: { @@ -11913,7 +12284,7 @@ export type GetSupplierOrdersQuery = { id: any; created_at: any; destination?: string | null; - orderId?: string | null; + orderId?: any | null; customerId?: any | null; origin?: string | null; status?: Order_Status_Enum | null;