@connect-plus-online/ogabai-integrations 0.0.81 → 0.0.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +180 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.mts +66 -1
- package/dist/index.d.ts +66 -1
- package/dist/index.esm.js +180 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -350,6 +350,7 @@ type SaleStatus = "paid" | "credit";
|
|
|
350
350
|
type PaymentType = "cash" | "card" | "transfer" | "wallet";
|
|
351
351
|
type Platform = "pos" | "commerce" | "wallet";
|
|
352
352
|
type TxStatus = "pending" | "processing" | "completed" | "failed";
|
|
353
|
+
type TransactionType = "sale" | "refund" | "deposit" | "withdrawal" | "customerRefund" | "customerDeposit";
|
|
353
354
|
type Transaction = {
|
|
354
355
|
_id: string;
|
|
355
356
|
from: string;
|
|
@@ -368,6 +369,8 @@ type Transaction = {
|
|
|
368
369
|
createdAt: string;
|
|
369
370
|
sales: Sale[];
|
|
370
371
|
storeId: string;
|
|
372
|
+
customerId: string;
|
|
373
|
+
transactionType: TransactionType;
|
|
371
374
|
};
|
|
372
375
|
type OrderStatus = "pending" | "processing" | "routing" | "delivered";
|
|
373
376
|
type Order = {
|
|
@@ -625,6 +628,8 @@ type UserTypeCountsFields = (keyof UserTypeCounts)[];
|
|
|
625
628
|
type UserRoleFields = (keyof UserRole)[];
|
|
626
629
|
type UserAccountFields = (keyof UserAccount)[];
|
|
627
630
|
type PrivilegeFields = (keyof Privilege)[];
|
|
631
|
+
type CustomerFields = (keyof Customer)[];
|
|
632
|
+
type CustomerStoreBalanceFields = (keyof CustomerStoreBalance)[];
|
|
628
633
|
|
|
629
634
|
type CustomersProductCountFields = (keyof CustomersProductCount)[];
|
|
630
635
|
type StoreCategoryProductFields = (keyof StoreCategoryProduct)[];
|
|
@@ -1047,6 +1052,58 @@ declare const createUserRoleService: (client: GraphQLClient) => {
|
|
|
1047
1052
|
};
|
|
1048
1053
|
type UserRoleService = ReturnType<typeof createUserRoleService>;
|
|
1049
1054
|
|
|
1055
|
+
declare const createCustomerService: (client: GraphQLClient) => {
|
|
1056
|
+
createCustomer: (input: CreateEntityRequest<Customer, "customer">, fetchFields?: {
|
|
1057
|
+
root?: "customer"[] | undefined;
|
|
1058
|
+
nestedFields?: (Record<"customer", CustomerFields> & {
|
|
1059
|
+
customerStoreBalance: CustomerStoreBalanceFields;
|
|
1060
|
+
}) | undefined;
|
|
1061
|
+
} | undefined, option?: RequestOption) => Promise<EntityResponse<Customer, "customer"> | undefined>;
|
|
1062
|
+
updateCustomer: (input: UpdateEntityRequest<Customer, "customer">, fetchFields?: {
|
|
1063
|
+
root?: "customer"[] | undefined;
|
|
1064
|
+
nestedFields?: (Record<"customer", CustomerFields> & {
|
|
1065
|
+
customerStoreBalance: CustomerStoreBalanceFields;
|
|
1066
|
+
}) | undefined;
|
|
1067
|
+
} | undefined, option?: RequestOption) => Promise<EntityResponse<Customer, "customer"> | undefined>;
|
|
1068
|
+
getCustomer: (input: GetEntityRequest<Customer, "customer">, fetchFields?: {
|
|
1069
|
+
root?: "customer"[] | undefined;
|
|
1070
|
+
nestedFields?: (Record<"customer", CustomerFields> & {
|
|
1071
|
+
customerStoreBalance: CustomerStoreBalanceFields;
|
|
1072
|
+
}) | undefined;
|
|
1073
|
+
} | undefined, option?: RequestOption) => Promise<EntityResponse<Customer, "customer"> | undefined>;
|
|
1074
|
+
deleteCustomer: (input: DeleteEntityRequest<"customer">, fetchFields?: {
|
|
1075
|
+
root?: "customerId"[] | undefined;
|
|
1076
|
+
nestedFields?: {} | undefined;
|
|
1077
|
+
} | undefined, option?: RequestOption) => Promise<DeleteEntityResponse<"customer"> | undefined>;
|
|
1078
|
+
getCustomersByStoreId: (input: {
|
|
1079
|
+
customer?: Partial<Customer> | undefined;
|
|
1080
|
+
} & {
|
|
1081
|
+
customerIds?: string[] | undefined;
|
|
1082
|
+
} & {
|
|
1083
|
+
limit: number;
|
|
1084
|
+
skip: number;
|
|
1085
|
+
search?: string;
|
|
1086
|
+
} & {
|
|
1087
|
+
storeId: string;
|
|
1088
|
+
}, fetchFields?: {
|
|
1089
|
+
root?: ("total" | "customers")[] | undefined;
|
|
1090
|
+
nestedFields?: (Record<"customers", CustomerFields> & {
|
|
1091
|
+
customerStoreBalance: CustomerStoreBalanceFields;
|
|
1092
|
+
}) | undefined;
|
|
1093
|
+
} | undefined, option?: RequestOption) => Promise<ListEntityResponse<Customer, "customer"> | undefined>;
|
|
1094
|
+
deleteFromStore: (input: {
|
|
1095
|
+
customerId: string;
|
|
1096
|
+
storeId: string;
|
|
1097
|
+
}, fetchFields?: {
|
|
1098
|
+
root?: ("customerId" | "storeId")[] | undefined;
|
|
1099
|
+
nestedFields?: {} | undefined;
|
|
1100
|
+
} | undefined, option?: RequestOption) => Promise<{
|
|
1101
|
+
customerId: string;
|
|
1102
|
+
storeId: string;
|
|
1103
|
+
} | undefined>;
|
|
1104
|
+
};
|
|
1105
|
+
type CustomerService = ReturnType<typeof createCustomerService>;
|
|
1106
|
+
|
|
1050
1107
|
interface GetCustomerProductCountsByIdsRequest {
|
|
1051
1108
|
userIds: string[];
|
|
1052
1109
|
}
|
|
@@ -1851,6 +1908,14 @@ declare const createTransactionService: (client: GraphQLClient) => {
|
|
|
1851
1908
|
root?: (keyof AddTransactionResponse)[];
|
|
1852
1909
|
nestedFields?: AddTransactionResponseNestedFields;
|
|
1853
1910
|
}, option?: RequestOption): Promise<AddTransactionResponse | null>;
|
|
1911
|
+
addCustomerDeposit(input: Pick<Transaction, "customerId" | "amountPaid">, fetchFields?: {
|
|
1912
|
+
root?: (keyof AddTransactionResponse)[];
|
|
1913
|
+
nestedFields?: AddTransactionResponseNestedFields;
|
|
1914
|
+
}, option?: RequestOption): Promise<AddTransactionResponse | null>;
|
|
1915
|
+
addCustomerRefund(input: Pick<Transaction, "customerId" | "amountPaid">, fetchFields?: {
|
|
1916
|
+
root?: (keyof AddTransactionResponse)[];
|
|
1917
|
+
nestedFields?: AddTransactionResponseNestedFields;
|
|
1918
|
+
}, option?: RequestOption): Promise<AddTransactionResponse | null>;
|
|
1854
1919
|
getTransaction(input: GetTransactionRequest, fetchFields?: {
|
|
1855
1920
|
root?: (keyof GetTransactionResponse)[];
|
|
1856
1921
|
nestedFields?: GetTransactionResponseNestedFields;
|
|
@@ -2180,4 +2245,4 @@ declare const createSubscriptionTrialService: (client: GraphQLClient) => {
|
|
|
2180
2245
|
};
|
|
2181
2246
|
type SubscriptionTrialService = ReturnType<typeof createSubscriptionTrialService>;
|
|
2182
2247
|
|
|
2183
|
-
export { APPLICATION_FEATURES, type Account, type AccountStatus, type AddPackageRequest, type AddPackageResponse, type AddPackageResponseFields, type AddPackagesRequest, type AddPackagesResponse, type AddPackagesResponseFields, type AddPriceRequest, type AddPriceResponse, type AddPriceResponseFields, type AddProductRequest, type AddProductResponse, type AddProductResponseNestedFields, type AddProductsRequest, type AddProductsResponse, type AddProductsResponseNestedFields, type AddStockRequest, type AddStockResponse, type AddStockResponseNestedFields, type AddStoreRequest, type AddStoreResponse, type AddStoreResponseNestedFields, type AddSubscriptionRequest, type AddSubscriptionResponse, type AddSubscriptionResponseNestedFields, type AddTransactionRequest, type AddTransactionResponse, type AddTransactionResponseNestedFields, type Address, type Admin, type ApplicationFeature, type Auth, type AuthService, type AuthTokenProvider, AuthenticationError, type Bank, type CategoryStatus, type ClientOptions, type CreateStockService, type CreateStoreCategoryProductRequest, type CreateStoreCategoryProductResponse, type CreateStoreCategoryProductResponseNestedFields, type CreateStoreCategoryRequest, type CreateStoreCategoryResponse, type CreateStoreCategoryResponseNestedFields, type Customer, type CustomerStoreBalance, type CustomersProductCount, type DateFilter, type Distributor, type GetCustomerProductCountsByIdsRequest, type GetCustomerProductCountsByIdsResponse, type GetCustomerProductCountsByIdsResponseNestedFields, type GetOrderRequest, type GetOrderResponse, type GetOrderResponseNestedFields, type GetOrdersRequest, type GetOrdersResponse, type GetOrdersResponseNestedFields, type GetPackageRequest, type GetPackageResponse, type GetPackageResponseFields, type GetPackagesRequest, type GetPackagesResponse, type GetPackagesResponseFields, type GetPriceRequest, type GetPriceResponse, type GetPriceResponseFields, type GetPricesRequest, type GetPricesResponse, type GetPricesResponseFields, type GetProductByBarcodeRequest, type GetProductByBarcodeResponse, type GetProductByBarcodeResponseNestedFields, type GetProductRequest, type GetProductResponse, type GetProductResponseNestedFields, type GetProductsRequest, type GetProductsResponse, type GetProductsResponseNestedFields, type GetSaleResponseNestedFields, type GetSalesRequest, type GetSalesResponse, type GetSalesResponseNestedFields, type GetStockRequest, type GetStockResponse, type GetStockResponseNestedFields, type GetStocksRequest, type GetStocksResponse, type GetStocksResponseNestedFields, type GetStoreCategoriesRequest, type GetStoreCategoriesResponse, type GetStoreCategoriesResponseNestedFields, type GetStoreCategoryProductRequest, type GetStoreCategoryProductResponse, type GetStoreCategoryProductResponseNestedFields, type GetStoreCategoryProductsRequest, type GetStoreCategoryProductsResponse, type GetStoreCategoryProductsResponseNestedFields, type GetStoreCategoryRequest, type GetStoreCategoryResponse, type GetStoreCategoryResponseNestedFields, type GetStoreCountRequest, type GetStoreCountResponse, type GetStoreRequest, type GetStoreResponse, type GetStoreResponseNestedFields, type GetStoresRequest, type GetStoresResponse, type GetStoresResponseNestedFields, type GetSubscriptionRequest, type GetSubscriptionResponse, type GetSubscriptionResponseNestedFields, type GetSubscriptionsRequest, type GetSubscriptionsResponse, type GetSubscriptionsResponseNestedFields, type GetTransactionRequest, type GetTransactionResponse, type GetTransactionResponseNestedFields, type GetTransactionsRequest, type GetTransactionsResponse, type GetTransactionsResponseNestedFields, GraphQLClient, type GraphQLError, type GraphQLRequest, type GraphQLResponse, type GraphQLVariables, type HeadersFactory, type Manufacturer, type Middleware, type MonthlyUserStat, NetworkError, type Next, type Notification, type NotificationChannels, type OTP, type Order, type OrderFields, type OrderStatus, type PackageService, type PaymentType, type PaystackInitializePaymentRequest, type PaystackInitializePaymentResponse, type PaystackInitializeSubscriptionRequest, type PaystackInitializeSubscriptionResponse, type PaystackService, type Platform, type Price, type Privilege, type PrivilegeAction, type Product, type ProductAttribute, type ProductCategory, type ProductCounts, type ProductLight, type ProductName, type ProductPackage, type ProductPackageService, type ProductService, type RemovePackageRequest, type RemovePackageResponse, type RemovePriceRequest, type RemovePriceResponse, type RemoveProductRequest, type RemoveProductResponse, type RemoveStockRequest, type RemoveStockResponse, type RemoveStoreCategoryProductRequest, type RemoveStoreCategoryProductResponse, type RemoveStoreCategoryRequest, type RemoveStoreCategoryResponse, type RemoveStoreRequest, type RemoveStoreResponse, type RemoveSubscriptionRequest, type RemoveSubscriptionResponse, type RequestContext, type RequestOption, type ResponseContext, type RestockCounts, type Sale, type SaleCounts, type SaleFields, type SaleService, type SaleStatus, SdkError, type SearchCategoriesAndTemplateRequest, type SearchCategoriesAndTemplateResponse, type SearchCategoriesAndTemplateResponseNestedFields, type SearchProductNamesRequest, type SearchProductNamesResponse, type SearchProductNamesResponseNestedFields, type ServiceUpdate, type Stock, type Store, type StoreCategory, type StoreCategoryProduct, type StoreCategoryProductService, type StoreCategoryService, type StoreService, type StoreSetting, type Subscription, type SubscriptionPlan, type SubscriptionPlanCRUD, type SubscriptionPlanFeature, type SubscriptionPlanFeatureAccess, type SubscriptionPlanFeatureAccessValue, type SubscriptionPlanFeatureBehaviour, type SubscriptionPlanFeatureBehaviourCRUD, type SubscriptionPlanFeatureBehaviourService, type SubscriptionPlanFeatureBehaviourValue, type SubscriptionPlanFeatureDefinition, type SubscriptionPlanFeatureDefinitionCRUD, type SubscriptionPlanFeatureDefinitionService, type SubscriptionPlanFeatureKey, SubscriptionPlanFeatureKeyLabels, type SubscriptionPlanFeatureLimitValue, type SubscriptionPlanFeatureStatus, type SubscriptionPlanService, type SubscriptionService, type SubscriptionTrial, type SubscriptionTrialCRUD, type SubscriptionTrialService, type Transaction, type TransactionCounts, type TransactionFields, type TransactionPin, type TransactionService, type TransportOptions, type TxStatus, type UpdatePackageRequest, type UpdatePackageResponse, type UpdatePackageResponseFields, type UpdatePackagesRequest, type UpdatePackagesResponse, type UpdatePriceRequest, type UpdatePriceResponse, type UpdatePriceResponseFields, type UpdateProductRequest, type UpdateProductResponse, type UpdateProductResponseNestedFields, type UpdateSaleRequest, UpdateSaleResponse, type UpdateSaleResponseNestedFields, type UpdateStockRequest, type UpdateStockResponse, type UpdateStockResponseNestedFields, type UpdateStoreCategoryProductRequest, type UpdateStoreCategoryProductResponse, type UpdateStoreCategoryProductResponseNestedFields, type UpdateStoreCategoryRequest, type UpdateStoreCategoryResponse, type UpdateStoreCategoryResponseNestedFields, type UpdateStoreRequest, type UpdateStoreResponse, type UpdateStoreResponseNestedFields, type UpdateSubscriptionRequest, type UpdateSubscriptionResponse, type UpdateSubscriptionResponseNestedFields, type UpdateTransactionRequest, type UpdateTransactionResponse, type UpdateTransactionResponseNestedFields, type UploadImageResponse, type User, type UserAccount, type UserAccountService, type UserDevice, type UserNotification, type UserNotificationService, type UserNotificationSettings, type UserProductCounts, type UserRole, type UserRoleService, type UserSaleCounts, type UserService, type UserSetting, type UserStatus, type UserTxAmounts, type UserType, type UserTypeCounts, type VirtualAccount, type Wallet, type WalletCurrency, type WalletStatus, _getPackageResponseNestedFields, _getProductResponseNestedFields, _getSaleResponseNestedFields, _getStoreResponseNestedFields, _getSubscriptionResponseNestedFields, _getTransactionResponseNestedFields, _getTransactionsResponseNestedFields, addPackageResponseFields, addPackageResponseNestedFields, addPackagesResponseFields, addPackagesResponseNestedFields, addPriceResponseFields, addPriceResponseNestedFields, addProductResponseFields, addProductResponseNestedFields, addProductsResponseFields, addProductsResponseNestedFields, addStockResponse, addStockResponseNestedFields, addStoreResponse, addStoreResponseNestedFields, addSubscriptionResponse, addSubscriptionResponseNestedFields, addTransactionResponse, addTransactionResponseNestedFields, compose, createAuthService, createOrderService, createPackageService, createPaystackService, createPriceService, createProductService, createSaleService, createStockService, createStoreCategoryProductResponseFields, createStoreCategoryProductResponseNestedFields, createStoreCategoryProductService, createStoreCategoryResponseFields, createStoreCategoryResponseNestedFields, createStoreCategoryService, createStoreService, createSubscriptionPlanFeatureBehaviourService, createSubscriptionPlanFeatureDefinitionService, createSubscriptionPlanService, createSubscriptionService, createSubscriptionTrialService, createTransactionService, createTransport, createUserAccountService, createUserNotificationService, createUserRoleService, createUserService, getCustomerProductCountsByIdsResponse, getCustomerProductCountsByIdsResponseNestedFields, getOrderResponse, getOrderResponseNestedFields, getOrdersResponse, getOrdersResponseNestedFields, getPackageResponseFields, getPackageResponseNestedFields, getPackagesResponseFields, getPackagesResponseNestedFields, getPriceResponseFields, getPriceResponseNestedFields, getPricesResponseFields, getPricesResponseNestedFields, getProductByBarcodeResponse, getProductByBarcodeResponseNestedFields, getProductResponseFields, getProductResponseNestedFields, getProductsResponseFields, getProductsResponseNestedFields, getSaleResponse, getSaleResponseNestedFields, getSalesResponse, getSalesResponseNestedFields, getStockResponse, getStockResponseNestedFields, getStocksResponse, getStocksResponseNestedFields, getStoreCategoriesResponseFields, getStoreCategoriesResponseNestedFields, getStoreCategoryProductResponseFields, getStoreCategoryProductResponseNestedFields, getStoreCategoryProductsResponseFields, getStoreCategoryProductsResponseNestedFields, getStoreCategoryResponseFields, getStoreCategoryResponseNestedFields, getStoreCountResponse, getStoreResponse, getStoreResponseNestedFields, getStoresResponse, getStoresResponseNestedFields, getSubscriptionResponse, getSubscriptionResponseNestedFields, getSubscriptionsResponse, getSubscriptionsResponseNestedFields, getTransactionResponse, getTransactionResponseNestedFields, getTransactionsResponse, getTransactionsResponseNestedFields, orderQuery, paystackInitializePaymentResponse, paystackInitializeSubscriptionResponse, removePackageResponseFields, removePriceResponseFields, removeProductResponseFields, removeStockResponse, removeStoreCategoryProductResponseFields, removeStoreCategoryResponseFields, removeStoreResponse, removeSubscriptionResponse, saleQuery, searchCategoriesAndTemplateResponse, searchCategoriesAndTemplateResponseNestedFields, searchProductNamesResponse, searchProductNamesResponseNestedFields, subscriptionPlanDeleteIntegration, subscriptionPlanFeatureBehaviourDeleteIntegration, subscriptionPlanFeatureBehaviourIntegration, subscriptionPlanFeatureBehaviourListIntegration, subscriptionPlanFeatureDefinitionDeleteIntegration, subscriptionPlanFeatureDefinitionIntegration, subscriptionPlanFeatureDefinitionListIntegration, subscriptionPlanIntegration, subscriptionPlanListIntegration, subscriptionTrialDeleteIntegration, subscriptionTrialIntegration, subscriptionTrialListIntegration, toAsyncHeadersFactory, toAsyncTokenProvider, transactionQuery, updatePackageResponseFields, updatePackageResponseNestedFields, updatePriceResponseFields, updatePriceResponseNestedFields, updateProductResponseFields, updateProductResponseNestedFields, updateSaleResponseNestedFields, updateStockResponse, updateStockResponseNestedFields, updateStoreCategoryProductResponseFields, updateStoreCategoryProductResponseNestedFields, updateStoreCategoryResponseFields, updateStoreCategoryResponseNestedFields, updateStoreResponse, updateStoreResponseNestedFields, updateSubscriptionResponse, updateSubscriptionResponseNestedFields, updateTransactionResponse, updateTransactionResponseNestedFields, userRoleExample };
|
|
2248
|
+
export { APPLICATION_FEATURES, type Account, type AccountStatus, type AddPackageRequest, type AddPackageResponse, type AddPackageResponseFields, type AddPackagesRequest, type AddPackagesResponse, type AddPackagesResponseFields, type AddPriceRequest, type AddPriceResponse, type AddPriceResponseFields, type AddProductRequest, type AddProductResponse, type AddProductResponseNestedFields, type AddProductsRequest, type AddProductsResponse, type AddProductsResponseNestedFields, type AddStockRequest, type AddStockResponse, type AddStockResponseNestedFields, type AddStoreRequest, type AddStoreResponse, type AddStoreResponseNestedFields, type AddSubscriptionRequest, type AddSubscriptionResponse, type AddSubscriptionResponseNestedFields, type AddTransactionRequest, type AddTransactionResponse, type AddTransactionResponseNestedFields, type Address, type Admin, type ApplicationFeature, type Auth, type AuthService, type AuthTokenProvider, AuthenticationError, type Bank, type CategoryStatus, type ClientOptions, type CreateStockService, type CreateStoreCategoryProductRequest, type CreateStoreCategoryProductResponse, type CreateStoreCategoryProductResponseNestedFields, type CreateStoreCategoryRequest, type CreateStoreCategoryResponse, type CreateStoreCategoryResponseNestedFields, type Customer, type CustomerService, type CustomerStoreBalance, type CustomersProductCount, type DateFilter, type Distributor, type GetCustomerProductCountsByIdsRequest, type GetCustomerProductCountsByIdsResponse, type GetCustomerProductCountsByIdsResponseNestedFields, type GetOrderRequest, type GetOrderResponse, type GetOrderResponseNestedFields, type GetOrdersRequest, type GetOrdersResponse, type GetOrdersResponseNestedFields, type GetPackageRequest, type GetPackageResponse, type GetPackageResponseFields, type GetPackagesRequest, type GetPackagesResponse, type GetPackagesResponseFields, type GetPriceRequest, type GetPriceResponse, type GetPriceResponseFields, type GetPricesRequest, type GetPricesResponse, type GetPricesResponseFields, type GetProductByBarcodeRequest, type GetProductByBarcodeResponse, type GetProductByBarcodeResponseNestedFields, type GetProductRequest, type GetProductResponse, type GetProductResponseNestedFields, type GetProductsRequest, type GetProductsResponse, type GetProductsResponseNestedFields, type GetSaleResponseNestedFields, type GetSalesRequest, type GetSalesResponse, type GetSalesResponseNestedFields, type GetStockRequest, type GetStockResponse, type GetStockResponseNestedFields, type GetStocksRequest, type GetStocksResponse, type GetStocksResponseNestedFields, type GetStoreCategoriesRequest, type GetStoreCategoriesResponse, type GetStoreCategoriesResponseNestedFields, type GetStoreCategoryProductRequest, type GetStoreCategoryProductResponse, type GetStoreCategoryProductResponseNestedFields, type GetStoreCategoryProductsRequest, type GetStoreCategoryProductsResponse, type GetStoreCategoryProductsResponseNestedFields, type GetStoreCategoryRequest, type GetStoreCategoryResponse, type GetStoreCategoryResponseNestedFields, type GetStoreCountRequest, type GetStoreCountResponse, type GetStoreRequest, type GetStoreResponse, type GetStoreResponseNestedFields, type GetStoresRequest, type GetStoresResponse, type GetStoresResponseNestedFields, type GetSubscriptionRequest, type GetSubscriptionResponse, type GetSubscriptionResponseNestedFields, type GetSubscriptionsRequest, type GetSubscriptionsResponse, type GetSubscriptionsResponseNestedFields, type GetTransactionRequest, type GetTransactionResponse, type GetTransactionResponseNestedFields, type GetTransactionsRequest, type GetTransactionsResponse, type GetTransactionsResponseNestedFields, GraphQLClient, type GraphQLError, type GraphQLRequest, type GraphQLResponse, type GraphQLVariables, type HeadersFactory, type Manufacturer, type Middleware, type MonthlyUserStat, NetworkError, type Next, type Notification, type NotificationChannels, type OTP, type Order, type OrderFields, type OrderStatus, type PackageService, type PaymentType, type PaystackInitializePaymentRequest, type PaystackInitializePaymentResponse, type PaystackInitializeSubscriptionRequest, type PaystackInitializeSubscriptionResponse, type PaystackService, type Platform, type Price, type Privilege, type PrivilegeAction, type Product, type ProductAttribute, type ProductCategory, type ProductCounts, type ProductLight, type ProductName, type ProductPackage, type ProductPackageService, type ProductService, type RemovePackageRequest, type RemovePackageResponse, type RemovePriceRequest, type RemovePriceResponse, type RemoveProductRequest, type RemoveProductResponse, type RemoveStockRequest, type RemoveStockResponse, type RemoveStoreCategoryProductRequest, type RemoveStoreCategoryProductResponse, type RemoveStoreCategoryRequest, type RemoveStoreCategoryResponse, type RemoveStoreRequest, type RemoveStoreResponse, type RemoveSubscriptionRequest, type RemoveSubscriptionResponse, type RequestContext, type RequestOption, type ResponseContext, type RestockCounts, type Sale, type SaleCounts, type SaleFields, type SaleService, type SaleStatus, SdkError, type SearchCategoriesAndTemplateRequest, type SearchCategoriesAndTemplateResponse, type SearchCategoriesAndTemplateResponseNestedFields, type SearchProductNamesRequest, type SearchProductNamesResponse, type SearchProductNamesResponseNestedFields, type ServiceUpdate, type Stock, type Store, type StoreCategory, type StoreCategoryProduct, type StoreCategoryProductService, type StoreCategoryService, type StoreService, type StoreSetting, type Subscription, type SubscriptionPlan, type SubscriptionPlanCRUD, type SubscriptionPlanFeature, type SubscriptionPlanFeatureAccess, type SubscriptionPlanFeatureAccessValue, type SubscriptionPlanFeatureBehaviour, type SubscriptionPlanFeatureBehaviourCRUD, type SubscriptionPlanFeatureBehaviourService, type SubscriptionPlanFeatureBehaviourValue, type SubscriptionPlanFeatureDefinition, type SubscriptionPlanFeatureDefinitionCRUD, type SubscriptionPlanFeatureDefinitionService, type SubscriptionPlanFeatureKey, SubscriptionPlanFeatureKeyLabels, type SubscriptionPlanFeatureLimitValue, type SubscriptionPlanFeatureStatus, type SubscriptionPlanService, type SubscriptionService, type SubscriptionTrial, type SubscriptionTrialCRUD, type SubscriptionTrialService, type Transaction, type TransactionCounts, type TransactionFields, type TransactionPin, type TransactionService, type TransactionType, type TransportOptions, type TxStatus, type UpdatePackageRequest, type UpdatePackageResponse, type UpdatePackageResponseFields, type UpdatePackagesRequest, type UpdatePackagesResponse, type UpdatePriceRequest, type UpdatePriceResponse, type UpdatePriceResponseFields, type UpdateProductRequest, type UpdateProductResponse, type UpdateProductResponseNestedFields, type UpdateSaleRequest, UpdateSaleResponse, type UpdateSaleResponseNestedFields, type UpdateStockRequest, type UpdateStockResponse, type UpdateStockResponseNestedFields, type UpdateStoreCategoryProductRequest, type UpdateStoreCategoryProductResponse, type UpdateStoreCategoryProductResponseNestedFields, type UpdateStoreCategoryRequest, type UpdateStoreCategoryResponse, type UpdateStoreCategoryResponseNestedFields, type UpdateStoreRequest, type UpdateStoreResponse, type UpdateStoreResponseNestedFields, type UpdateSubscriptionRequest, type UpdateSubscriptionResponse, type UpdateSubscriptionResponseNestedFields, type UpdateTransactionRequest, type UpdateTransactionResponse, type UpdateTransactionResponseNestedFields, type UploadImageResponse, type User, type UserAccount, type UserAccountService, type UserDevice, type UserNotification, type UserNotificationService, type UserNotificationSettings, type UserProductCounts, type UserRole, type UserRoleService, type UserSaleCounts, type UserService, type UserSetting, type UserStatus, type UserTxAmounts, type UserType, type UserTypeCounts, type VirtualAccount, type Wallet, type WalletCurrency, type WalletStatus, _getPackageResponseNestedFields, _getProductResponseNestedFields, _getSaleResponseNestedFields, _getStoreResponseNestedFields, _getSubscriptionResponseNestedFields, _getTransactionResponseNestedFields, _getTransactionsResponseNestedFields, addPackageResponseFields, addPackageResponseNestedFields, addPackagesResponseFields, addPackagesResponseNestedFields, addPriceResponseFields, addPriceResponseNestedFields, addProductResponseFields, addProductResponseNestedFields, addProductsResponseFields, addProductsResponseNestedFields, addStockResponse, addStockResponseNestedFields, addStoreResponse, addStoreResponseNestedFields, addSubscriptionResponse, addSubscriptionResponseNestedFields, addTransactionResponse, addTransactionResponseNestedFields, compose, createAuthService, createCustomerService, createOrderService, createPackageService, createPaystackService, createPriceService, createProductService, createSaleService, createStockService, createStoreCategoryProductResponseFields, createStoreCategoryProductResponseNestedFields, createStoreCategoryProductService, createStoreCategoryResponseFields, createStoreCategoryResponseNestedFields, createStoreCategoryService, createStoreService, createSubscriptionPlanFeatureBehaviourService, createSubscriptionPlanFeatureDefinitionService, createSubscriptionPlanService, createSubscriptionService, createSubscriptionTrialService, createTransactionService, createTransport, createUserAccountService, createUserNotificationService, createUserRoleService, createUserService, getCustomerProductCountsByIdsResponse, getCustomerProductCountsByIdsResponseNestedFields, getOrderResponse, getOrderResponseNestedFields, getOrdersResponse, getOrdersResponseNestedFields, getPackageResponseFields, getPackageResponseNestedFields, getPackagesResponseFields, getPackagesResponseNestedFields, getPriceResponseFields, getPriceResponseNestedFields, getPricesResponseFields, getPricesResponseNestedFields, getProductByBarcodeResponse, getProductByBarcodeResponseNestedFields, getProductResponseFields, getProductResponseNestedFields, getProductsResponseFields, getProductsResponseNestedFields, getSaleResponse, getSaleResponseNestedFields, getSalesResponse, getSalesResponseNestedFields, getStockResponse, getStockResponseNestedFields, getStocksResponse, getStocksResponseNestedFields, getStoreCategoriesResponseFields, getStoreCategoriesResponseNestedFields, getStoreCategoryProductResponseFields, getStoreCategoryProductResponseNestedFields, getStoreCategoryProductsResponseFields, getStoreCategoryProductsResponseNestedFields, getStoreCategoryResponseFields, getStoreCategoryResponseNestedFields, getStoreCountResponse, getStoreResponse, getStoreResponseNestedFields, getStoresResponse, getStoresResponseNestedFields, getSubscriptionResponse, getSubscriptionResponseNestedFields, getSubscriptionsResponse, getSubscriptionsResponseNestedFields, getTransactionResponse, getTransactionResponseNestedFields, getTransactionsResponse, getTransactionsResponseNestedFields, orderQuery, paystackInitializePaymentResponse, paystackInitializeSubscriptionResponse, removePackageResponseFields, removePriceResponseFields, removeProductResponseFields, removeStockResponse, removeStoreCategoryProductResponseFields, removeStoreCategoryResponseFields, removeStoreResponse, removeSubscriptionResponse, saleQuery, searchCategoriesAndTemplateResponse, searchCategoriesAndTemplateResponseNestedFields, searchProductNamesResponse, searchProductNamesResponseNestedFields, subscriptionPlanDeleteIntegration, subscriptionPlanFeatureBehaviourDeleteIntegration, subscriptionPlanFeatureBehaviourIntegration, subscriptionPlanFeatureBehaviourListIntegration, subscriptionPlanFeatureDefinitionDeleteIntegration, subscriptionPlanFeatureDefinitionIntegration, subscriptionPlanFeatureDefinitionListIntegration, subscriptionPlanIntegration, subscriptionPlanListIntegration, subscriptionTrialDeleteIntegration, subscriptionTrialIntegration, subscriptionTrialListIntegration, toAsyncHeadersFactory, toAsyncTokenProvider, transactionQuery, updatePackageResponseFields, updatePackageResponseNestedFields, updatePriceResponseFields, updatePriceResponseNestedFields, updateProductResponseFields, updateProductResponseNestedFields, updateSaleResponseNestedFields, updateStockResponse, updateStockResponseNestedFields, updateStoreCategoryProductResponseFields, updateStoreCategoryProductResponseNestedFields, updateStoreCategoryResponseFields, updateStoreCategoryResponseNestedFields, updateStoreResponse, updateStoreResponseNestedFields, updateSubscriptionResponse, updateSubscriptionResponseNestedFields, updateTransactionResponse, updateTransactionResponseNestedFields, userRoleExample };
|
package/dist/index.d.ts
CHANGED
|
@@ -350,6 +350,7 @@ type SaleStatus = "paid" | "credit";
|
|
|
350
350
|
type PaymentType = "cash" | "card" | "transfer" | "wallet";
|
|
351
351
|
type Platform = "pos" | "commerce" | "wallet";
|
|
352
352
|
type TxStatus = "pending" | "processing" | "completed" | "failed";
|
|
353
|
+
type TransactionType = "sale" | "refund" | "deposit" | "withdrawal" | "customerRefund" | "customerDeposit";
|
|
353
354
|
type Transaction = {
|
|
354
355
|
_id: string;
|
|
355
356
|
from: string;
|
|
@@ -368,6 +369,8 @@ type Transaction = {
|
|
|
368
369
|
createdAt: string;
|
|
369
370
|
sales: Sale[];
|
|
370
371
|
storeId: string;
|
|
372
|
+
customerId: string;
|
|
373
|
+
transactionType: TransactionType;
|
|
371
374
|
};
|
|
372
375
|
type OrderStatus = "pending" | "processing" | "routing" | "delivered";
|
|
373
376
|
type Order = {
|
|
@@ -625,6 +628,8 @@ type UserTypeCountsFields = (keyof UserTypeCounts)[];
|
|
|
625
628
|
type UserRoleFields = (keyof UserRole)[];
|
|
626
629
|
type UserAccountFields = (keyof UserAccount)[];
|
|
627
630
|
type PrivilegeFields = (keyof Privilege)[];
|
|
631
|
+
type CustomerFields = (keyof Customer)[];
|
|
632
|
+
type CustomerStoreBalanceFields = (keyof CustomerStoreBalance)[];
|
|
628
633
|
|
|
629
634
|
type CustomersProductCountFields = (keyof CustomersProductCount)[];
|
|
630
635
|
type StoreCategoryProductFields = (keyof StoreCategoryProduct)[];
|
|
@@ -1047,6 +1052,58 @@ declare const createUserRoleService: (client: GraphQLClient) => {
|
|
|
1047
1052
|
};
|
|
1048
1053
|
type UserRoleService = ReturnType<typeof createUserRoleService>;
|
|
1049
1054
|
|
|
1055
|
+
declare const createCustomerService: (client: GraphQLClient) => {
|
|
1056
|
+
createCustomer: (input: CreateEntityRequest<Customer, "customer">, fetchFields?: {
|
|
1057
|
+
root?: "customer"[] | undefined;
|
|
1058
|
+
nestedFields?: (Record<"customer", CustomerFields> & {
|
|
1059
|
+
customerStoreBalance: CustomerStoreBalanceFields;
|
|
1060
|
+
}) | undefined;
|
|
1061
|
+
} | undefined, option?: RequestOption) => Promise<EntityResponse<Customer, "customer"> | undefined>;
|
|
1062
|
+
updateCustomer: (input: UpdateEntityRequest<Customer, "customer">, fetchFields?: {
|
|
1063
|
+
root?: "customer"[] | undefined;
|
|
1064
|
+
nestedFields?: (Record<"customer", CustomerFields> & {
|
|
1065
|
+
customerStoreBalance: CustomerStoreBalanceFields;
|
|
1066
|
+
}) | undefined;
|
|
1067
|
+
} | undefined, option?: RequestOption) => Promise<EntityResponse<Customer, "customer"> | undefined>;
|
|
1068
|
+
getCustomer: (input: GetEntityRequest<Customer, "customer">, fetchFields?: {
|
|
1069
|
+
root?: "customer"[] | undefined;
|
|
1070
|
+
nestedFields?: (Record<"customer", CustomerFields> & {
|
|
1071
|
+
customerStoreBalance: CustomerStoreBalanceFields;
|
|
1072
|
+
}) | undefined;
|
|
1073
|
+
} | undefined, option?: RequestOption) => Promise<EntityResponse<Customer, "customer"> | undefined>;
|
|
1074
|
+
deleteCustomer: (input: DeleteEntityRequest<"customer">, fetchFields?: {
|
|
1075
|
+
root?: "customerId"[] | undefined;
|
|
1076
|
+
nestedFields?: {} | undefined;
|
|
1077
|
+
} | undefined, option?: RequestOption) => Promise<DeleteEntityResponse<"customer"> | undefined>;
|
|
1078
|
+
getCustomersByStoreId: (input: {
|
|
1079
|
+
customer?: Partial<Customer> | undefined;
|
|
1080
|
+
} & {
|
|
1081
|
+
customerIds?: string[] | undefined;
|
|
1082
|
+
} & {
|
|
1083
|
+
limit: number;
|
|
1084
|
+
skip: number;
|
|
1085
|
+
search?: string;
|
|
1086
|
+
} & {
|
|
1087
|
+
storeId: string;
|
|
1088
|
+
}, fetchFields?: {
|
|
1089
|
+
root?: ("total" | "customers")[] | undefined;
|
|
1090
|
+
nestedFields?: (Record<"customers", CustomerFields> & {
|
|
1091
|
+
customerStoreBalance: CustomerStoreBalanceFields;
|
|
1092
|
+
}) | undefined;
|
|
1093
|
+
} | undefined, option?: RequestOption) => Promise<ListEntityResponse<Customer, "customer"> | undefined>;
|
|
1094
|
+
deleteFromStore: (input: {
|
|
1095
|
+
customerId: string;
|
|
1096
|
+
storeId: string;
|
|
1097
|
+
}, fetchFields?: {
|
|
1098
|
+
root?: ("customerId" | "storeId")[] | undefined;
|
|
1099
|
+
nestedFields?: {} | undefined;
|
|
1100
|
+
} | undefined, option?: RequestOption) => Promise<{
|
|
1101
|
+
customerId: string;
|
|
1102
|
+
storeId: string;
|
|
1103
|
+
} | undefined>;
|
|
1104
|
+
};
|
|
1105
|
+
type CustomerService = ReturnType<typeof createCustomerService>;
|
|
1106
|
+
|
|
1050
1107
|
interface GetCustomerProductCountsByIdsRequest {
|
|
1051
1108
|
userIds: string[];
|
|
1052
1109
|
}
|
|
@@ -1851,6 +1908,14 @@ declare const createTransactionService: (client: GraphQLClient) => {
|
|
|
1851
1908
|
root?: (keyof AddTransactionResponse)[];
|
|
1852
1909
|
nestedFields?: AddTransactionResponseNestedFields;
|
|
1853
1910
|
}, option?: RequestOption): Promise<AddTransactionResponse | null>;
|
|
1911
|
+
addCustomerDeposit(input: Pick<Transaction, "customerId" | "amountPaid">, fetchFields?: {
|
|
1912
|
+
root?: (keyof AddTransactionResponse)[];
|
|
1913
|
+
nestedFields?: AddTransactionResponseNestedFields;
|
|
1914
|
+
}, option?: RequestOption): Promise<AddTransactionResponse | null>;
|
|
1915
|
+
addCustomerRefund(input: Pick<Transaction, "customerId" | "amountPaid">, fetchFields?: {
|
|
1916
|
+
root?: (keyof AddTransactionResponse)[];
|
|
1917
|
+
nestedFields?: AddTransactionResponseNestedFields;
|
|
1918
|
+
}, option?: RequestOption): Promise<AddTransactionResponse | null>;
|
|
1854
1919
|
getTransaction(input: GetTransactionRequest, fetchFields?: {
|
|
1855
1920
|
root?: (keyof GetTransactionResponse)[];
|
|
1856
1921
|
nestedFields?: GetTransactionResponseNestedFields;
|
|
@@ -2180,4 +2245,4 @@ declare const createSubscriptionTrialService: (client: GraphQLClient) => {
|
|
|
2180
2245
|
};
|
|
2181
2246
|
type SubscriptionTrialService = ReturnType<typeof createSubscriptionTrialService>;
|
|
2182
2247
|
|
|
2183
|
-
export { APPLICATION_FEATURES, type Account, type AccountStatus, type AddPackageRequest, type AddPackageResponse, type AddPackageResponseFields, type AddPackagesRequest, type AddPackagesResponse, type AddPackagesResponseFields, type AddPriceRequest, type AddPriceResponse, type AddPriceResponseFields, type AddProductRequest, type AddProductResponse, type AddProductResponseNestedFields, type AddProductsRequest, type AddProductsResponse, type AddProductsResponseNestedFields, type AddStockRequest, type AddStockResponse, type AddStockResponseNestedFields, type AddStoreRequest, type AddStoreResponse, type AddStoreResponseNestedFields, type AddSubscriptionRequest, type AddSubscriptionResponse, type AddSubscriptionResponseNestedFields, type AddTransactionRequest, type AddTransactionResponse, type AddTransactionResponseNestedFields, type Address, type Admin, type ApplicationFeature, type Auth, type AuthService, type AuthTokenProvider, AuthenticationError, type Bank, type CategoryStatus, type ClientOptions, type CreateStockService, type CreateStoreCategoryProductRequest, type CreateStoreCategoryProductResponse, type CreateStoreCategoryProductResponseNestedFields, type CreateStoreCategoryRequest, type CreateStoreCategoryResponse, type CreateStoreCategoryResponseNestedFields, type Customer, type CustomerStoreBalance, type CustomersProductCount, type DateFilter, type Distributor, type GetCustomerProductCountsByIdsRequest, type GetCustomerProductCountsByIdsResponse, type GetCustomerProductCountsByIdsResponseNestedFields, type GetOrderRequest, type GetOrderResponse, type GetOrderResponseNestedFields, type GetOrdersRequest, type GetOrdersResponse, type GetOrdersResponseNestedFields, type GetPackageRequest, type GetPackageResponse, type GetPackageResponseFields, type GetPackagesRequest, type GetPackagesResponse, type GetPackagesResponseFields, type GetPriceRequest, type GetPriceResponse, type GetPriceResponseFields, type GetPricesRequest, type GetPricesResponse, type GetPricesResponseFields, type GetProductByBarcodeRequest, type GetProductByBarcodeResponse, type GetProductByBarcodeResponseNestedFields, type GetProductRequest, type GetProductResponse, type GetProductResponseNestedFields, type GetProductsRequest, type GetProductsResponse, type GetProductsResponseNestedFields, type GetSaleResponseNestedFields, type GetSalesRequest, type GetSalesResponse, type GetSalesResponseNestedFields, type GetStockRequest, type GetStockResponse, type GetStockResponseNestedFields, type GetStocksRequest, type GetStocksResponse, type GetStocksResponseNestedFields, type GetStoreCategoriesRequest, type GetStoreCategoriesResponse, type GetStoreCategoriesResponseNestedFields, type GetStoreCategoryProductRequest, type GetStoreCategoryProductResponse, type GetStoreCategoryProductResponseNestedFields, type GetStoreCategoryProductsRequest, type GetStoreCategoryProductsResponse, type GetStoreCategoryProductsResponseNestedFields, type GetStoreCategoryRequest, type GetStoreCategoryResponse, type GetStoreCategoryResponseNestedFields, type GetStoreCountRequest, type GetStoreCountResponse, type GetStoreRequest, type GetStoreResponse, type GetStoreResponseNestedFields, type GetStoresRequest, type GetStoresResponse, type GetStoresResponseNestedFields, type GetSubscriptionRequest, type GetSubscriptionResponse, type GetSubscriptionResponseNestedFields, type GetSubscriptionsRequest, type GetSubscriptionsResponse, type GetSubscriptionsResponseNestedFields, type GetTransactionRequest, type GetTransactionResponse, type GetTransactionResponseNestedFields, type GetTransactionsRequest, type GetTransactionsResponse, type GetTransactionsResponseNestedFields, GraphQLClient, type GraphQLError, type GraphQLRequest, type GraphQLResponse, type GraphQLVariables, type HeadersFactory, type Manufacturer, type Middleware, type MonthlyUserStat, NetworkError, type Next, type Notification, type NotificationChannels, type OTP, type Order, type OrderFields, type OrderStatus, type PackageService, type PaymentType, type PaystackInitializePaymentRequest, type PaystackInitializePaymentResponse, type PaystackInitializeSubscriptionRequest, type PaystackInitializeSubscriptionResponse, type PaystackService, type Platform, type Price, type Privilege, type PrivilegeAction, type Product, type ProductAttribute, type ProductCategory, type ProductCounts, type ProductLight, type ProductName, type ProductPackage, type ProductPackageService, type ProductService, type RemovePackageRequest, type RemovePackageResponse, type RemovePriceRequest, type RemovePriceResponse, type RemoveProductRequest, type RemoveProductResponse, type RemoveStockRequest, type RemoveStockResponse, type RemoveStoreCategoryProductRequest, type RemoveStoreCategoryProductResponse, type RemoveStoreCategoryRequest, type RemoveStoreCategoryResponse, type RemoveStoreRequest, type RemoveStoreResponse, type RemoveSubscriptionRequest, type RemoveSubscriptionResponse, type RequestContext, type RequestOption, type ResponseContext, type RestockCounts, type Sale, type SaleCounts, type SaleFields, type SaleService, type SaleStatus, SdkError, type SearchCategoriesAndTemplateRequest, type SearchCategoriesAndTemplateResponse, type SearchCategoriesAndTemplateResponseNestedFields, type SearchProductNamesRequest, type SearchProductNamesResponse, type SearchProductNamesResponseNestedFields, type ServiceUpdate, type Stock, type Store, type StoreCategory, type StoreCategoryProduct, type StoreCategoryProductService, type StoreCategoryService, type StoreService, type StoreSetting, type Subscription, type SubscriptionPlan, type SubscriptionPlanCRUD, type SubscriptionPlanFeature, type SubscriptionPlanFeatureAccess, type SubscriptionPlanFeatureAccessValue, type SubscriptionPlanFeatureBehaviour, type SubscriptionPlanFeatureBehaviourCRUD, type SubscriptionPlanFeatureBehaviourService, type SubscriptionPlanFeatureBehaviourValue, type SubscriptionPlanFeatureDefinition, type SubscriptionPlanFeatureDefinitionCRUD, type SubscriptionPlanFeatureDefinitionService, type SubscriptionPlanFeatureKey, SubscriptionPlanFeatureKeyLabels, type SubscriptionPlanFeatureLimitValue, type SubscriptionPlanFeatureStatus, type SubscriptionPlanService, type SubscriptionService, type SubscriptionTrial, type SubscriptionTrialCRUD, type SubscriptionTrialService, type Transaction, type TransactionCounts, type TransactionFields, type TransactionPin, type TransactionService, type TransportOptions, type TxStatus, type UpdatePackageRequest, type UpdatePackageResponse, type UpdatePackageResponseFields, type UpdatePackagesRequest, type UpdatePackagesResponse, type UpdatePriceRequest, type UpdatePriceResponse, type UpdatePriceResponseFields, type UpdateProductRequest, type UpdateProductResponse, type UpdateProductResponseNestedFields, type UpdateSaleRequest, UpdateSaleResponse, type UpdateSaleResponseNestedFields, type UpdateStockRequest, type UpdateStockResponse, type UpdateStockResponseNestedFields, type UpdateStoreCategoryProductRequest, type UpdateStoreCategoryProductResponse, type UpdateStoreCategoryProductResponseNestedFields, type UpdateStoreCategoryRequest, type UpdateStoreCategoryResponse, type UpdateStoreCategoryResponseNestedFields, type UpdateStoreRequest, type UpdateStoreResponse, type UpdateStoreResponseNestedFields, type UpdateSubscriptionRequest, type UpdateSubscriptionResponse, type UpdateSubscriptionResponseNestedFields, type UpdateTransactionRequest, type UpdateTransactionResponse, type UpdateTransactionResponseNestedFields, type UploadImageResponse, type User, type UserAccount, type UserAccountService, type UserDevice, type UserNotification, type UserNotificationService, type UserNotificationSettings, type UserProductCounts, type UserRole, type UserRoleService, type UserSaleCounts, type UserService, type UserSetting, type UserStatus, type UserTxAmounts, type UserType, type UserTypeCounts, type VirtualAccount, type Wallet, type WalletCurrency, type WalletStatus, _getPackageResponseNestedFields, _getProductResponseNestedFields, _getSaleResponseNestedFields, _getStoreResponseNestedFields, _getSubscriptionResponseNestedFields, _getTransactionResponseNestedFields, _getTransactionsResponseNestedFields, addPackageResponseFields, addPackageResponseNestedFields, addPackagesResponseFields, addPackagesResponseNestedFields, addPriceResponseFields, addPriceResponseNestedFields, addProductResponseFields, addProductResponseNestedFields, addProductsResponseFields, addProductsResponseNestedFields, addStockResponse, addStockResponseNestedFields, addStoreResponse, addStoreResponseNestedFields, addSubscriptionResponse, addSubscriptionResponseNestedFields, addTransactionResponse, addTransactionResponseNestedFields, compose, createAuthService, createOrderService, createPackageService, createPaystackService, createPriceService, createProductService, createSaleService, createStockService, createStoreCategoryProductResponseFields, createStoreCategoryProductResponseNestedFields, createStoreCategoryProductService, createStoreCategoryResponseFields, createStoreCategoryResponseNestedFields, createStoreCategoryService, createStoreService, createSubscriptionPlanFeatureBehaviourService, createSubscriptionPlanFeatureDefinitionService, createSubscriptionPlanService, createSubscriptionService, createSubscriptionTrialService, createTransactionService, createTransport, createUserAccountService, createUserNotificationService, createUserRoleService, createUserService, getCustomerProductCountsByIdsResponse, getCustomerProductCountsByIdsResponseNestedFields, getOrderResponse, getOrderResponseNestedFields, getOrdersResponse, getOrdersResponseNestedFields, getPackageResponseFields, getPackageResponseNestedFields, getPackagesResponseFields, getPackagesResponseNestedFields, getPriceResponseFields, getPriceResponseNestedFields, getPricesResponseFields, getPricesResponseNestedFields, getProductByBarcodeResponse, getProductByBarcodeResponseNestedFields, getProductResponseFields, getProductResponseNestedFields, getProductsResponseFields, getProductsResponseNestedFields, getSaleResponse, getSaleResponseNestedFields, getSalesResponse, getSalesResponseNestedFields, getStockResponse, getStockResponseNestedFields, getStocksResponse, getStocksResponseNestedFields, getStoreCategoriesResponseFields, getStoreCategoriesResponseNestedFields, getStoreCategoryProductResponseFields, getStoreCategoryProductResponseNestedFields, getStoreCategoryProductsResponseFields, getStoreCategoryProductsResponseNestedFields, getStoreCategoryResponseFields, getStoreCategoryResponseNestedFields, getStoreCountResponse, getStoreResponse, getStoreResponseNestedFields, getStoresResponse, getStoresResponseNestedFields, getSubscriptionResponse, getSubscriptionResponseNestedFields, getSubscriptionsResponse, getSubscriptionsResponseNestedFields, getTransactionResponse, getTransactionResponseNestedFields, getTransactionsResponse, getTransactionsResponseNestedFields, orderQuery, paystackInitializePaymentResponse, paystackInitializeSubscriptionResponse, removePackageResponseFields, removePriceResponseFields, removeProductResponseFields, removeStockResponse, removeStoreCategoryProductResponseFields, removeStoreCategoryResponseFields, removeStoreResponse, removeSubscriptionResponse, saleQuery, searchCategoriesAndTemplateResponse, searchCategoriesAndTemplateResponseNestedFields, searchProductNamesResponse, searchProductNamesResponseNestedFields, subscriptionPlanDeleteIntegration, subscriptionPlanFeatureBehaviourDeleteIntegration, subscriptionPlanFeatureBehaviourIntegration, subscriptionPlanFeatureBehaviourListIntegration, subscriptionPlanFeatureDefinitionDeleteIntegration, subscriptionPlanFeatureDefinitionIntegration, subscriptionPlanFeatureDefinitionListIntegration, subscriptionPlanIntegration, subscriptionPlanListIntegration, subscriptionTrialDeleteIntegration, subscriptionTrialIntegration, subscriptionTrialListIntegration, toAsyncHeadersFactory, toAsyncTokenProvider, transactionQuery, updatePackageResponseFields, updatePackageResponseNestedFields, updatePriceResponseFields, updatePriceResponseNestedFields, updateProductResponseFields, updateProductResponseNestedFields, updateSaleResponseNestedFields, updateStockResponse, updateStockResponseNestedFields, updateStoreCategoryProductResponseFields, updateStoreCategoryProductResponseNestedFields, updateStoreCategoryResponseFields, updateStoreCategoryResponseNestedFields, updateStoreResponse, updateStoreResponseNestedFields, updateSubscriptionResponse, updateSubscriptionResponseNestedFields, updateTransactionResponse, updateTransactionResponseNestedFields, userRoleExample };
|
|
2248
|
+
export { APPLICATION_FEATURES, type Account, type AccountStatus, type AddPackageRequest, type AddPackageResponse, type AddPackageResponseFields, type AddPackagesRequest, type AddPackagesResponse, type AddPackagesResponseFields, type AddPriceRequest, type AddPriceResponse, type AddPriceResponseFields, type AddProductRequest, type AddProductResponse, type AddProductResponseNestedFields, type AddProductsRequest, type AddProductsResponse, type AddProductsResponseNestedFields, type AddStockRequest, type AddStockResponse, type AddStockResponseNestedFields, type AddStoreRequest, type AddStoreResponse, type AddStoreResponseNestedFields, type AddSubscriptionRequest, type AddSubscriptionResponse, type AddSubscriptionResponseNestedFields, type AddTransactionRequest, type AddTransactionResponse, type AddTransactionResponseNestedFields, type Address, type Admin, type ApplicationFeature, type Auth, type AuthService, type AuthTokenProvider, AuthenticationError, type Bank, type CategoryStatus, type ClientOptions, type CreateStockService, type CreateStoreCategoryProductRequest, type CreateStoreCategoryProductResponse, type CreateStoreCategoryProductResponseNestedFields, type CreateStoreCategoryRequest, type CreateStoreCategoryResponse, type CreateStoreCategoryResponseNestedFields, type Customer, type CustomerService, type CustomerStoreBalance, type CustomersProductCount, type DateFilter, type Distributor, type GetCustomerProductCountsByIdsRequest, type GetCustomerProductCountsByIdsResponse, type GetCustomerProductCountsByIdsResponseNestedFields, type GetOrderRequest, type GetOrderResponse, type GetOrderResponseNestedFields, type GetOrdersRequest, type GetOrdersResponse, type GetOrdersResponseNestedFields, type GetPackageRequest, type GetPackageResponse, type GetPackageResponseFields, type GetPackagesRequest, type GetPackagesResponse, type GetPackagesResponseFields, type GetPriceRequest, type GetPriceResponse, type GetPriceResponseFields, type GetPricesRequest, type GetPricesResponse, type GetPricesResponseFields, type GetProductByBarcodeRequest, type GetProductByBarcodeResponse, type GetProductByBarcodeResponseNestedFields, type GetProductRequest, type GetProductResponse, type GetProductResponseNestedFields, type GetProductsRequest, type GetProductsResponse, type GetProductsResponseNestedFields, type GetSaleResponseNestedFields, type GetSalesRequest, type GetSalesResponse, type GetSalesResponseNestedFields, type GetStockRequest, type GetStockResponse, type GetStockResponseNestedFields, type GetStocksRequest, type GetStocksResponse, type GetStocksResponseNestedFields, type GetStoreCategoriesRequest, type GetStoreCategoriesResponse, type GetStoreCategoriesResponseNestedFields, type GetStoreCategoryProductRequest, type GetStoreCategoryProductResponse, type GetStoreCategoryProductResponseNestedFields, type GetStoreCategoryProductsRequest, type GetStoreCategoryProductsResponse, type GetStoreCategoryProductsResponseNestedFields, type GetStoreCategoryRequest, type GetStoreCategoryResponse, type GetStoreCategoryResponseNestedFields, type GetStoreCountRequest, type GetStoreCountResponse, type GetStoreRequest, type GetStoreResponse, type GetStoreResponseNestedFields, type GetStoresRequest, type GetStoresResponse, type GetStoresResponseNestedFields, type GetSubscriptionRequest, type GetSubscriptionResponse, type GetSubscriptionResponseNestedFields, type GetSubscriptionsRequest, type GetSubscriptionsResponse, type GetSubscriptionsResponseNestedFields, type GetTransactionRequest, type GetTransactionResponse, type GetTransactionResponseNestedFields, type GetTransactionsRequest, type GetTransactionsResponse, type GetTransactionsResponseNestedFields, GraphQLClient, type GraphQLError, type GraphQLRequest, type GraphQLResponse, type GraphQLVariables, type HeadersFactory, type Manufacturer, type Middleware, type MonthlyUserStat, NetworkError, type Next, type Notification, type NotificationChannels, type OTP, type Order, type OrderFields, type OrderStatus, type PackageService, type PaymentType, type PaystackInitializePaymentRequest, type PaystackInitializePaymentResponse, type PaystackInitializeSubscriptionRequest, type PaystackInitializeSubscriptionResponse, type PaystackService, type Platform, type Price, type Privilege, type PrivilegeAction, type Product, type ProductAttribute, type ProductCategory, type ProductCounts, type ProductLight, type ProductName, type ProductPackage, type ProductPackageService, type ProductService, type RemovePackageRequest, type RemovePackageResponse, type RemovePriceRequest, type RemovePriceResponse, type RemoveProductRequest, type RemoveProductResponse, type RemoveStockRequest, type RemoveStockResponse, type RemoveStoreCategoryProductRequest, type RemoveStoreCategoryProductResponse, type RemoveStoreCategoryRequest, type RemoveStoreCategoryResponse, type RemoveStoreRequest, type RemoveStoreResponse, type RemoveSubscriptionRequest, type RemoveSubscriptionResponse, type RequestContext, type RequestOption, type ResponseContext, type RestockCounts, type Sale, type SaleCounts, type SaleFields, type SaleService, type SaleStatus, SdkError, type SearchCategoriesAndTemplateRequest, type SearchCategoriesAndTemplateResponse, type SearchCategoriesAndTemplateResponseNestedFields, type SearchProductNamesRequest, type SearchProductNamesResponse, type SearchProductNamesResponseNestedFields, type ServiceUpdate, type Stock, type Store, type StoreCategory, type StoreCategoryProduct, type StoreCategoryProductService, type StoreCategoryService, type StoreService, type StoreSetting, type Subscription, type SubscriptionPlan, type SubscriptionPlanCRUD, type SubscriptionPlanFeature, type SubscriptionPlanFeatureAccess, type SubscriptionPlanFeatureAccessValue, type SubscriptionPlanFeatureBehaviour, type SubscriptionPlanFeatureBehaviourCRUD, type SubscriptionPlanFeatureBehaviourService, type SubscriptionPlanFeatureBehaviourValue, type SubscriptionPlanFeatureDefinition, type SubscriptionPlanFeatureDefinitionCRUD, type SubscriptionPlanFeatureDefinitionService, type SubscriptionPlanFeatureKey, SubscriptionPlanFeatureKeyLabels, type SubscriptionPlanFeatureLimitValue, type SubscriptionPlanFeatureStatus, type SubscriptionPlanService, type SubscriptionService, type SubscriptionTrial, type SubscriptionTrialCRUD, type SubscriptionTrialService, type Transaction, type TransactionCounts, type TransactionFields, type TransactionPin, type TransactionService, type TransactionType, type TransportOptions, type TxStatus, type UpdatePackageRequest, type UpdatePackageResponse, type UpdatePackageResponseFields, type UpdatePackagesRequest, type UpdatePackagesResponse, type UpdatePriceRequest, type UpdatePriceResponse, type UpdatePriceResponseFields, type UpdateProductRequest, type UpdateProductResponse, type UpdateProductResponseNestedFields, type UpdateSaleRequest, UpdateSaleResponse, type UpdateSaleResponseNestedFields, type UpdateStockRequest, type UpdateStockResponse, type UpdateStockResponseNestedFields, type UpdateStoreCategoryProductRequest, type UpdateStoreCategoryProductResponse, type UpdateStoreCategoryProductResponseNestedFields, type UpdateStoreCategoryRequest, type UpdateStoreCategoryResponse, type UpdateStoreCategoryResponseNestedFields, type UpdateStoreRequest, type UpdateStoreResponse, type UpdateStoreResponseNestedFields, type UpdateSubscriptionRequest, type UpdateSubscriptionResponse, type UpdateSubscriptionResponseNestedFields, type UpdateTransactionRequest, type UpdateTransactionResponse, type UpdateTransactionResponseNestedFields, type UploadImageResponse, type User, type UserAccount, type UserAccountService, type UserDevice, type UserNotification, type UserNotificationService, type UserNotificationSettings, type UserProductCounts, type UserRole, type UserRoleService, type UserSaleCounts, type UserService, type UserSetting, type UserStatus, type UserTxAmounts, type UserType, type UserTypeCounts, type VirtualAccount, type Wallet, type WalletCurrency, type WalletStatus, _getPackageResponseNestedFields, _getProductResponseNestedFields, _getSaleResponseNestedFields, _getStoreResponseNestedFields, _getSubscriptionResponseNestedFields, _getTransactionResponseNestedFields, _getTransactionsResponseNestedFields, addPackageResponseFields, addPackageResponseNestedFields, addPackagesResponseFields, addPackagesResponseNestedFields, addPriceResponseFields, addPriceResponseNestedFields, addProductResponseFields, addProductResponseNestedFields, addProductsResponseFields, addProductsResponseNestedFields, addStockResponse, addStockResponseNestedFields, addStoreResponse, addStoreResponseNestedFields, addSubscriptionResponse, addSubscriptionResponseNestedFields, addTransactionResponse, addTransactionResponseNestedFields, compose, createAuthService, createCustomerService, createOrderService, createPackageService, createPaystackService, createPriceService, createProductService, createSaleService, createStockService, createStoreCategoryProductResponseFields, createStoreCategoryProductResponseNestedFields, createStoreCategoryProductService, createStoreCategoryResponseFields, createStoreCategoryResponseNestedFields, createStoreCategoryService, createStoreService, createSubscriptionPlanFeatureBehaviourService, createSubscriptionPlanFeatureDefinitionService, createSubscriptionPlanService, createSubscriptionService, createSubscriptionTrialService, createTransactionService, createTransport, createUserAccountService, createUserNotificationService, createUserRoleService, createUserService, getCustomerProductCountsByIdsResponse, getCustomerProductCountsByIdsResponseNestedFields, getOrderResponse, getOrderResponseNestedFields, getOrdersResponse, getOrdersResponseNestedFields, getPackageResponseFields, getPackageResponseNestedFields, getPackagesResponseFields, getPackagesResponseNestedFields, getPriceResponseFields, getPriceResponseNestedFields, getPricesResponseFields, getPricesResponseNestedFields, getProductByBarcodeResponse, getProductByBarcodeResponseNestedFields, getProductResponseFields, getProductResponseNestedFields, getProductsResponseFields, getProductsResponseNestedFields, getSaleResponse, getSaleResponseNestedFields, getSalesResponse, getSalesResponseNestedFields, getStockResponse, getStockResponseNestedFields, getStocksResponse, getStocksResponseNestedFields, getStoreCategoriesResponseFields, getStoreCategoriesResponseNestedFields, getStoreCategoryProductResponseFields, getStoreCategoryProductResponseNestedFields, getStoreCategoryProductsResponseFields, getStoreCategoryProductsResponseNestedFields, getStoreCategoryResponseFields, getStoreCategoryResponseNestedFields, getStoreCountResponse, getStoreResponse, getStoreResponseNestedFields, getStoresResponse, getStoresResponseNestedFields, getSubscriptionResponse, getSubscriptionResponseNestedFields, getSubscriptionsResponse, getSubscriptionsResponseNestedFields, getTransactionResponse, getTransactionResponseNestedFields, getTransactionsResponse, getTransactionsResponseNestedFields, orderQuery, paystackInitializePaymentResponse, paystackInitializeSubscriptionResponse, removePackageResponseFields, removePriceResponseFields, removeProductResponseFields, removeStockResponse, removeStoreCategoryProductResponseFields, removeStoreCategoryResponseFields, removeStoreResponse, removeSubscriptionResponse, saleQuery, searchCategoriesAndTemplateResponse, searchCategoriesAndTemplateResponseNestedFields, searchProductNamesResponse, searchProductNamesResponseNestedFields, subscriptionPlanDeleteIntegration, subscriptionPlanFeatureBehaviourDeleteIntegration, subscriptionPlanFeatureBehaviourIntegration, subscriptionPlanFeatureBehaviourListIntegration, subscriptionPlanFeatureDefinitionDeleteIntegration, subscriptionPlanFeatureDefinitionIntegration, subscriptionPlanFeatureDefinitionListIntegration, subscriptionPlanIntegration, subscriptionPlanListIntegration, subscriptionTrialDeleteIntegration, subscriptionTrialIntegration, subscriptionTrialListIntegration, toAsyncHeadersFactory, toAsyncTokenProvider, transactionQuery, updatePackageResponseFields, updatePackageResponseNestedFields, updatePriceResponseFields, updatePriceResponseNestedFields, updateProductResponseFields, updateProductResponseNestedFields, updateSaleResponseNestedFields, updateStockResponse, updateStockResponseNestedFields, updateStoreCategoryProductResponseFields, updateStoreCategoryProductResponseNestedFields, updateStoreCategoryResponseFields, updateStoreCategoryResponseNestedFields, updateStoreResponse, updateStoreResponseNestedFields, updateSubscriptionResponse, updateSubscriptionResponseNestedFields, updateTransactionResponse, updateTransactionResponseNestedFields, userRoleExample };
|
package/dist/index.esm.js
CHANGED
|
@@ -276,6 +276,23 @@ var userSchema = {
|
|
|
276
276
|
var user_schema_default = userSchema;
|
|
277
277
|
|
|
278
278
|
// src/services/user/user.entity.ts
|
|
279
|
+
var customerQuery = [
|
|
280
|
+
"createdAt",
|
|
281
|
+
"email",
|
|
282
|
+
"id",
|
|
283
|
+
"name",
|
|
284
|
+
"phone",
|
|
285
|
+
"customerStoreBalance",
|
|
286
|
+
"storeIds"
|
|
287
|
+
];
|
|
288
|
+
var customerStoreBalanceQuery = [
|
|
289
|
+
"balance",
|
|
290
|
+
"createdAt",
|
|
291
|
+
"customerId",
|
|
292
|
+
"id",
|
|
293
|
+
"owed",
|
|
294
|
+
"storeId"
|
|
295
|
+
];
|
|
279
296
|
var privilegeQuery = [
|
|
280
297
|
"actions",
|
|
281
298
|
"feature"
|
|
@@ -1861,6 +1878,139 @@ var createUserRoleService = (client) => ({
|
|
|
1861
1878
|
)
|
|
1862
1879
|
});
|
|
1863
1880
|
|
|
1881
|
+
// src/services/user/types/customer.type.ts
|
|
1882
|
+
var ENTITY7 = "customer";
|
|
1883
|
+
var customerIntegration = createStandardEntityIntegration({
|
|
1884
|
+
key: ENTITY7,
|
|
1885
|
+
fields: customerQuery,
|
|
1886
|
+
nested: {
|
|
1887
|
+
customerStoreBalance: customerStoreBalanceQuery
|
|
1888
|
+
}
|
|
1889
|
+
});
|
|
1890
|
+
var customerListIntegration = createListIntegration({
|
|
1891
|
+
key: "customers",
|
|
1892
|
+
fields: customerQuery,
|
|
1893
|
+
nested: {
|
|
1894
|
+
customerStoreBalance: customerStoreBalanceQuery
|
|
1895
|
+
}
|
|
1896
|
+
});
|
|
1897
|
+
var customerDeleteIntegration = createDeleteIntegration(ENTITY7);
|
|
1898
|
+
|
|
1899
|
+
// src/services/user/schemas/customer.schema.ts
|
|
1900
|
+
var customerSchema = {
|
|
1901
|
+
get: {
|
|
1902
|
+
operation: "query",
|
|
1903
|
+
name: "getCustomer",
|
|
1904
|
+
variables: "($customer: CustomerInput!)",
|
|
1905
|
+
field: "(customer: $customer)"
|
|
1906
|
+
},
|
|
1907
|
+
create: {
|
|
1908
|
+
operation: "mutation",
|
|
1909
|
+
name: "createCustomer",
|
|
1910
|
+
variables: "($customer: CustomerInput!)",
|
|
1911
|
+
field: "(customer: $customer)"
|
|
1912
|
+
},
|
|
1913
|
+
update: {
|
|
1914
|
+
operation: "mutation",
|
|
1915
|
+
name: "updateCustomer",
|
|
1916
|
+
variables: "($customerId: String!, $customer: CustomerInput!)",
|
|
1917
|
+
field: "(customerId: $customerId, customer: $customer)"
|
|
1918
|
+
},
|
|
1919
|
+
delete: {
|
|
1920
|
+
operation: "mutation",
|
|
1921
|
+
name: "deleteCustomer",
|
|
1922
|
+
variables: "($customerId: String!)",
|
|
1923
|
+
field: "(customerId: $customerId)"
|
|
1924
|
+
},
|
|
1925
|
+
// important to have this separate from the general list query to avoid confusion and potential bugs with the storeId variable
|
|
1926
|
+
listByStoreId: {
|
|
1927
|
+
operation: "query",
|
|
1928
|
+
name: "getCustomersByStoreId",
|
|
1929
|
+
variables: "($limit: Int!, $skip: Int!, $storeId: String!, $search: String, $customer: CustomerInput, $customerIds: [String])",
|
|
1930
|
+
field: "(limit: $limit, skip: $skip, storeId: $storeId, search: $search, customer: $customer, customerIds: $customerIds)"
|
|
1931
|
+
},
|
|
1932
|
+
deleteFromStore: {
|
|
1933
|
+
operation: "mutation",
|
|
1934
|
+
name: "deleteCustomerFromStore",
|
|
1935
|
+
variables: "($customerId: String!, $storeId: String!)",
|
|
1936
|
+
field: "(customerId: $customerId, storeId: $storeId)"
|
|
1937
|
+
}
|
|
1938
|
+
};
|
|
1939
|
+
|
|
1940
|
+
// src/services/user/customer.service.ts
|
|
1941
|
+
var createCustomerService = (client) => ({
|
|
1942
|
+
createCustomer: createOperationExecutor(
|
|
1943
|
+
client,
|
|
1944
|
+
"createCustomer",
|
|
1945
|
+
{
|
|
1946
|
+
schema: buildSchema(customerSchema.create),
|
|
1947
|
+
defaultRootFields: customerIntegration.create.responseFields,
|
|
1948
|
+
defaultNestedFields: customerIntegration.create.nestedFields
|
|
1949
|
+
}
|
|
1950
|
+
),
|
|
1951
|
+
updateCustomer: createOperationExecutor(
|
|
1952
|
+
client,
|
|
1953
|
+
"updateCustomer",
|
|
1954
|
+
{
|
|
1955
|
+
schema: buildSchema(customerSchema.update),
|
|
1956
|
+
defaultRootFields: customerIntegration.update.responseFields,
|
|
1957
|
+
defaultNestedFields: customerIntegration.update.nestedFields
|
|
1958
|
+
}
|
|
1959
|
+
),
|
|
1960
|
+
getCustomer: createOperationExecutor(
|
|
1961
|
+
client,
|
|
1962
|
+
"getCustomer",
|
|
1963
|
+
{
|
|
1964
|
+
schema: buildSchema(customerSchema.get),
|
|
1965
|
+
defaultRootFields: customerIntegration.get.responseFields,
|
|
1966
|
+
defaultNestedFields: customerIntegration.get.nestedFields
|
|
1967
|
+
}
|
|
1968
|
+
),
|
|
1969
|
+
// only for admin
|
|
1970
|
+
deleteCustomer: createOperationExecutor(
|
|
1971
|
+
client,
|
|
1972
|
+
"deleteCustomer",
|
|
1973
|
+
{
|
|
1974
|
+
schema: buildSchema(customerSchema.delete),
|
|
1975
|
+
defaultRootFields: customerDeleteIntegration.responseFields,
|
|
1976
|
+
defaultNestedFields: {}
|
|
1977
|
+
}
|
|
1978
|
+
),
|
|
1979
|
+
// only admin
|
|
1980
|
+
// getCustomers: createOperationExecutor<
|
|
1981
|
+
// "getCustomers",
|
|
1982
|
+
// CustomerCRUD["ListRequest"],
|
|
1983
|
+
// CustomerCRUD["ListResponse"],
|
|
1984
|
+
// typeof customerListIntegration.nestedFields
|
|
1985
|
+
// >(
|
|
1986
|
+
// client,
|
|
1987
|
+
// "getCustomers",
|
|
1988
|
+
// {
|
|
1989
|
+
// schema: buildSchema(customerSchema.list),
|
|
1990
|
+
// defaultRootFields: [...customerListIntegration.responseFields],
|
|
1991
|
+
// defaultNestedFields: customerListIntegration.nestedFields,
|
|
1992
|
+
// }
|
|
1993
|
+
// ),
|
|
1994
|
+
getCustomersByStoreId: createOperationExecutor(
|
|
1995
|
+
client,
|
|
1996
|
+
"getCustomersByStoreId",
|
|
1997
|
+
{
|
|
1998
|
+
schema: buildSchema(customerSchema.listByStoreId),
|
|
1999
|
+
defaultRootFields: [...customerListIntegration.responseFields],
|
|
2000
|
+
defaultNestedFields: customerListIntegration.nestedFields
|
|
2001
|
+
}
|
|
2002
|
+
),
|
|
2003
|
+
deleteFromStore: createOperationExecutor(
|
|
2004
|
+
client,
|
|
2005
|
+
"deleteFromStore",
|
|
2006
|
+
{
|
|
2007
|
+
schema: buildSchema(customerSchema.deleteFromStore),
|
|
2008
|
+
defaultRootFields: [...customerDeleteIntegration.responseFields, "storeId"],
|
|
2009
|
+
defaultNestedFields: {}
|
|
2010
|
+
}
|
|
2011
|
+
)
|
|
2012
|
+
});
|
|
2013
|
+
|
|
1864
2014
|
// src/services/inventory/types/product.type.ts
|
|
1865
2015
|
var getCustomerProductCountsByIdsResponse = [
|
|
1866
2016
|
"customersProductCounts"
|
|
@@ -3068,7 +3218,9 @@ var transactionQuery = [
|
|
|
3068
3218
|
"storeId",
|
|
3069
3219
|
"to",
|
|
3070
3220
|
"toWallet",
|
|
3071
|
-
"txStatus"
|
|
3221
|
+
"txStatus",
|
|
3222
|
+
"customerId",
|
|
3223
|
+
"transactionType"
|
|
3072
3224
|
];
|
|
3073
3225
|
var orderQuery = [
|
|
3074
3226
|
"_id",
|
|
@@ -3291,6 +3443,32 @@ var createTransactionService = (client) => ({
|
|
|
3291
3443
|
);
|
|
3292
3444
|
return (_d = (_c = res.data) == null ? void 0 : _c.addTransaction) != null ? _d : null;
|
|
3293
3445
|
},
|
|
3446
|
+
async addCustomerDeposit(input, fetchFields, option) {
|
|
3447
|
+
return this.addTransaction(
|
|
3448
|
+
{
|
|
3449
|
+
transaction: {
|
|
3450
|
+
...input,
|
|
3451
|
+
transactionType: "customerDeposit",
|
|
3452
|
+
platform: "pos"
|
|
3453
|
+
}
|
|
3454
|
+
},
|
|
3455
|
+
fetchFields,
|
|
3456
|
+
option
|
|
3457
|
+
);
|
|
3458
|
+
},
|
|
3459
|
+
async addCustomerRefund(input, fetchFields, option) {
|
|
3460
|
+
return this.addTransaction(
|
|
3461
|
+
{
|
|
3462
|
+
transaction: {
|
|
3463
|
+
...input,
|
|
3464
|
+
transactionType: "customerRefund",
|
|
3465
|
+
platform: "pos"
|
|
3466
|
+
}
|
|
3467
|
+
},
|
|
3468
|
+
fetchFields,
|
|
3469
|
+
option
|
|
3470
|
+
);
|
|
3471
|
+
},
|
|
3294
3472
|
async getTransaction(input, fetchFields, option) {
|
|
3295
3473
|
var _a, _b, _c, _d;
|
|
3296
3474
|
const res = await client.request(
|
|
@@ -3321,6 +3499,6 @@ var createTransactionService = (client) => ({
|
|
|
3321
3499
|
}
|
|
3322
3500
|
});
|
|
3323
3501
|
|
|
3324
|
-
export { APPLICATION_FEATURES, AuthenticationError, GraphQLClient, NetworkError, SdkError, SubscriptionPlanFeatureKeyLabels, UpdateSaleResponse, _getPackageResponseNestedFields, _getProductResponseNestedFields, _getSaleResponseNestedFields, _getStoreResponseNestedFields, _getSubscriptionResponseNestedFields, _getTransactionResponseNestedFields, _getTransactionsResponseNestedFields, addPackageResponseFields, addPackageResponseNestedFields, addPackagesResponseFields, addPackagesResponseNestedFields, addPriceResponseFields, addPriceResponseNestedFields, addProductResponseFields, addProductResponseNestedFields, addProductsResponseFields, addProductsResponseNestedFields, addStockResponse, addStockResponseNestedFields, addStoreResponse, addStoreResponseNestedFields, addSubscriptionResponse, addSubscriptionResponseNestedFields, addTransactionResponse, addTransactionResponseNestedFields, compose, createAuthService, createOrderService, createPackageService, createPaystackService, createPriceService, createProductService, createSaleService, createStockService, createStoreCategoryProductResponseFields, createStoreCategoryProductResponseNestedFields, createStoreCategoryProductService, createStoreCategoryResponseFields, createStoreCategoryResponseNestedFields, createStoreCategoryService, createStoreService, createSubscriptionPlanFeatureBehaviourService, createSubscriptionPlanFeatureDefinitionService, createSubscriptionPlanService, createSubscriptionService, createSubscriptionTrialService, createTransactionService, createTransport, createUserAccountService, createUserNotificationService, createUserRoleService, createUserService, getCustomerProductCountsByIdsResponse, getCustomerProductCountsByIdsResponseNestedFields, getOrderResponse, getOrderResponseNestedFields, getOrdersResponse, getOrdersResponseNestedFields, getPackageResponseFields, getPackageResponseNestedFields, getPackagesResponseFields, getPackagesResponseNestedFields, getPriceResponseFields, getPriceResponseNestedFields, getPricesResponseFields, getPricesResponseNestedFields, getProductByBarcodeResponse, getProductByBarcodeResponseNestedFields, getProductResponseFields, getProductResponseNestedFields, getProductsResponseFields, getProductsResponseNestedFields, getSaleResponse, getSaleResponseNestedFields, getSalesResponse, getSalesResponseNestedFields, getStockResponse, getStockResponseNestedFields, getStocksResponse, getStocksResponseNestedFields, getStoreCategoriesResponseFields, getStoreCategoriesResponseNestedFields, getStoreCategoryProductResponseFields, getStoreCategoryProductResponseNestedFields, getStoreCategoryProductsResponseFields, getStoreCategoryProductsResponseNestedFields, getStoreCategoryResponseFields, getStoreCategoryResponseNestedFields, getStoreCountResponse, getStoreResponse, getStoreResponseNestedFields, getStoresResponse, getStoresResponseNestedFields, getSubscriptionResponse, getSubscriptionResponseNestedFields, getSubscriptionsResponse, getSubscriptionsResponseNestedFields, getTransactionResponse, getTransactionResponseNestedFields, getTransactionsResponse, getTransactionsResponseNestedFields, orderQuery, paystackInitializePaymentResponse, paystackInitializeSubscriptionResponse, removePackageResponseFields, removePriceResponseFields, removeProductResponseFields, removeStockResponse, removeStoreCategoryProductResponseFields, removeStoreCategoryResponseFields, removeStoreResponse, removeSubscriptionResponse, saleQuery, searchCategoriesAndTemplateResponse, searchCategoriesAndTemplateResponseNestedFields, searchProductNamesResponse, searchProductNamesResponseNestedFields, subscriptionPlanDeleteIntegration, subscriptionPlanFeatureBehaviourDeleteIntegration, subscriptionPlanFeatureBehaviourIntegration, subscriptionPlanFeatureBehaviourListIntegration, subscriptionPlanFeatureDefinitionDeleteIntegration, subscriptionPlanFeatureDefinitionIntegration, subscriptionPlanFeatureDefinitionListIntegration, subscriptionPlanIntegration, subscriptionPlanListIntegration, subscriptionTrialDeleteIntegration, subscriptionTrialIntegration, subscriptionTrialListIntegration, toAsyncHeadersFactory, toAsyncTokenProvider, transactionQuery, updatePackageResponseFields, updatePackageResponseNestedFields, updatePriceResponseFields, updatePriceResponseNestedFields, updateProductResponseFields, updateProductResponseNestedFields, updateSaleResponseNestedFields, updateStockResponse, updateStockResponseNestedFields, updateStoreCategoryProductResponseFields, updateStoreCategoryProductResponseNestedFields, updateStoreCategoryResponseFields, updateStoreCategoryResponseNestedFields, updateStoreResponse, updateStoreResponseNestedFields, updateSubscriptionResponse, updateSubscriptionResponseNestedFields, updateTransactionResponse, updateTransactionResponseNestedFields, userRoleExample };
|
|
3502
|
+
export { APPLICATION_FEATURES, AuthenticationError, GraphQLClient, NetworkError, SdkError, SubscriptionPlanFeatureKeyLabels, UpdateSaleResponse, _getPackageResponseNestedFields, _getProductResponseNestedFields, _getSaleResponseNestedFields, _getStoreResponseNestedFields, _getSubscriptionResponseNestedFields, _getTransactionResponseNestedFields, _getTransactionsResponseNestedFields, addPackageResponseFields, addPackageResponseNestedFields, addPackagesResponseFields, addPackagesResponseNestedFields, addPriceResponseFields, addPriceResponseNestedFields, addProductResponseFields, addProductResponseNestedFields, addProductsResponseFields, addProductsResponseNestedFields, addStockResponse, addStockResponseNestedFields, addStoreResponse, addStoreResponseNestedFields, addSubscriptionResponse, addSubscriptionResponseNestedFields, addTransactionResponse, addTransactionResponseNestedFields, compose, createAuthService, createCustomerService, createOrderService, createPackageService, createPaystackService, createPriceService, createProductService, createSaleService, createStockService, createStoreCategoryProductResponseFields, createStoreCategoryProductResponseNestedFields, createStoreCategoryProductService, createStoreCategoryResponseFields, createStoreCategoryResponseNestedFields, createStoreCategoryService, createStoreService, createSubscriptionPlanFeatureBehaviourService, createSubscriptionPlanFeatureDefinitionService, createSubscriptionPlanService, createSubscriptionService, createSubscriptionTrialService, createTransactionService, createTransport, createUserAccountService, createUserNotificationService, createUserRoleService, createUserService, getCustomerProductCountsByIdsResponse, getCustomerProductCountsByIdsResponseNestedFields, getOrderResponse, getOrderResponseNestedFields, getOrdersResponse, getOrdersResponseNestedFields, getPackageResponseFields, getPackageResponseNestedFields, getPackagesResponseFields, getPackagesResponseNestedFields, getPriceResponseFields, getPriceResponseNestedFields, getPricesResponseFields, getPricesResponseNestedFields, getProductByBarcodeResponse, getProductByBarcodeResponseNestedFields, getProductResponseFields, getProductResponseNestedFields, getProductsResponseFields, getProductsResponseNestedFields, getSaleResponse, getSaleResponseNestedFields, getSalesResponse, getSalesResponseNestedFields, getStockResponse, getStockResponseNestedFields, getStocksResponse, getStocksResponseNestedFields, getStoreCategoriesResponseFields, getStoreCategoriesResponseNestedFields, getStoreCategoryProductResponseFields, getStoreCategoryProductResponseNestedFields, getStoreCategoryProductsResponseFields, getStoreCategoryProductsResponseNestedFields, getStoreCategoryResponseFields, getStoreCategoryResponseNestedFields, getStoreCountResponse, getStoreResponse, getStoreResponseNestedFields, getStoresResponse, getStoresResponseNestedFields, getSubscriptionResponse, getSubscriptionResponseNestedFields, getSubscriptionsResponse, getSubscriptionsResponseNestedFields, getTransactionResponse, getTransactionResponseNestedFields, getTransactionsResponse, getTransactionsResponseNestedFields, orderQuery, paystackInitializePaymentResponse, paystackInitializeSubscriptionResponse, removePackageResponseFields, removePriceResponseFields, removeProductResponseFields, removeStockResponse, removeStoreCategoryProductResponseFields, removeStoreCategoryResponseFields, removeStoreResponse, removeSubscriptionResponse, saleQuery, searchCategoriesAndTemplateResponse, searchCategoriesAndTemplateResponseNestedFields, searchProductNamesResponse, searchProductNamesResponseNestedFields, subscriptionPlanDeleteIntegration, subscriptionPlanFeatureBehaviourDeleteIntegration, subscriptionPlanFeatureBehaviourIntegration, subscriptionPlanFeatureBehaviourListIntegration, subscriptionPlanFeatureDefinitionDeleteIntegration, subscriptionPlanFeatureDefinitionIntegration, subscriptionPlanFeatureDefinitionListIntegration, subscriptionPlanIntegration, subscriptionPlanListIntegration, subscriptionTrialDeleteIntegration, subscriptionTrialIntegration, subscriptionTrialListIntegration, toAsyncHeadersFactory, toAsyncTokenProvider, transactionQuery, updatePackageResponseFields, updatePackageResponseNestedFields, updatePriceResponseFields, updatePriceResponseNestedFields, updateProductResponseFields, updateProductResponseNestedFields, updateSaleResponseNestedFields, updateStockResponse, updateStockResponseNestedFields, updateStoreCategoryProductResponseFields, updateStoreCategoryProductResponseNestedFields, updateStoreCategoryResponseFields, updateStoreCategoryResponseNestedFields, updateStoreResponse, updateStoreResponseNestedFields, updateSubscriptionResponse, updateSubscriptionResponseNestedFields, updateTransactionResponse, updateTransactionResponseNestedFields, userRoleExample };
|
|
3325
3503
|
//# sourceMappingURL=index.esm.js.map
|
|
3326
3504
|
//# sourceMappingURL=index.esm.js.map
|