@connect-plus-online/ogabai-integrations 0.0.39 → 0.0.50
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 +167 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.mts +94 -1
- package/dist/index.d.ts +94 -1
- package/dist/index.esm.js +157 -3
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -424,6 +424,23 @@ interface SubscriptionPlan {
|
|
|
424
424
|
subscriptionPlanFeatureIds: string[];
|
|
425
425
|
features: SubscriptionPlanFeature[];
|
|
426
426
|
}
|
|
427
|
+
interface Subscription {
|
|
428
|
+
id: string;
|
|
429
|
+
userId: string;
|
|
430
|
+
subscriptionPlanId: string;
|
|
431
|
+
price: number;
|
|
432
|
+
currency: string;
|
|
433
|
+
subscriptionStatus: "active" | "past_due" | "cancelled" | "trail";
|
|
434
|
+
currentPeriodStart: string;
|
|
435
|
+
currentPeriodEnd: string;
|
|
436
|
+
trialEnd: string;
|
|
437
|
+
cancelAtPeriodEnd: string;
|
|
438
|
+
canceledAt: string;
|
|
439
|
+
defaultPaymentMethodId: string;
|
|
440
|
+
version: number;
|
|
441
|
+
createdAt: string;
|
|
442
|
+
updatedAt: string;
|
|
443
|
+
}
|
|
427
444
|
|
|
428
445
|
type AuthTokenProvider = () => Promise<string | null> | string | null;
|
|
429
446
|
type HeadersFactory = () => Promise<Record<string, string>> | Record<string, string>;
|
|
@@ -1591,6 +1608,7 @@ type PaystackService = ReturnType<typeof createPaystackService>;
|
|
|
1591
1608
|
|
|
1592
1609
|
type SubscriptionPlanFeatureFields = (keyof SubscriptionPlanFeature)[];
|
|
1593
1610
|
type SubscriptionPlanFields = (keyof SubscriptionPlan)[];
|
|
1611
|
+
type SubscriptionFields = (keyof Subscription)[];
|
|
1594
1612
|
|
|
1595
1613
|
interface GetSubscriptionPlanFeatureRequest {
|
|
1596
1614
|
subscriptionPlanFeature: Partial<SubscriptionPlanFeature>;
|
|
@@ -1698,6 +1716,59 @@ interface RemoveSubscriptionPlanResponse {
|
|
|
1698
1716
|
}
|
|
1699
1717
|
declare const removeSubscriptionPlanResponse: (keyof RemoveSubscriptionPlanResponse)[];
|
|
1700
1718
|
|
|
1719
|
+
interface GetSubscriptionRequest {
|
|
1720
|
+
subscription: Partial<Subscription>;
|
|
1721
|
+
}
|
|
1722
|
+
interface GetSubscriptionResponse {
|
|
1723
|
+
subscription: Subscription;
|
|
1724
|
+
}
|
|
1725
|
+
declare const getSubscriptionResponse: (keyof GetSubscriptionResponse)[];
|
|
1726
|
+
interface GetSubscriptionResponseNestedFields {
|
|
1727
|
+
subscription: SubscriptionFields;
|
|
1728
|
+
}
|
|
1729
|
+
declare const _getSubscriptionResponseNestedFields: Omit<GetSubscriptionResponseNestedFields, "subscription">;
|
|
1730
|
+
declare const getSubscriptionResponseNestedFields: GetSubscriptionResponseNestedFields;
|
|
1731
|
+
interface GetSubscriptionsRequest {
|
|
1732
|
+
subscription?: Partial<Subscription>;
|
|
1733
|
+
subscriptionIds?: string[];
|
|
1734
|
+
search?: string;
|
|
1735
|
+
limit: number;
|
|
1736
|
+
skip: number;
|
|
1737
|
+
}
|
|
1738
|
+
interface GetSubscriptionsResponse {
|
|
1739
|
+
subscriptions: Subscription[];
|
|
1740
|
+
total: number;
|
|
1741
|
+
}
|
|
1742
|
+
declare const getSubscriptionsResponse: (keyof GetSubscriptionsResponse)[];
|
|
1743
|
+
interface GetSubscriptionsResponseNestedFields extends Omit<GetSubscriptionResponseNestedFields, "subscription"> {
|
|
1744
|
+
subscriptions: SubscriptionFields;
|
|
1745
|
+
}
|
|
1746
|
+
declare const getSubscriptionsResponseNestedFields: GetSubscriptionsResponseNestedFields;
|
|
1747
|
+
interface AddSubscriptionRequest {
|
|
1748
|
+
subscription: Partial<Subscription>;
|
|
1749
|
+
}
|
|
1750
|
+
interface AddSubscriptionResponse {
|
|
1751
|
+
subscription: Subscription;
|
|
1752
|
+
}
|
|
1753
|
+
declare const addSubscriptionResponse: (keyof AddSubscriptionResponse)[];
|
|
1754
|
+
type AddSubscriptionResponseNestedFields = GetSubscriptionResponseNestedFields;
|
|
1755
|
+
declare const addSubscriptionResponseNestedFields: AddSubscriptionResponseNestedFields;
|
|
1756
|
+
interface UpdateSubscriptionRequest {
|
|
1757
|
+
subscriptionId: string;
|
|
1758
|
+
subscription: Partial<Subscription>;
|
|
1759
|
+
}
|
|
1760
|
+
type UpdateSubscriptionResponse = GetSubscriptionResponse;
|
|
1761
|
+
declare const updateSubscriptionResponse: (keyof UpdateSubscriptionResponse)[];
|
|
1762
|
+
type UpdateSubscriptionResponseNestedFields = GetSubscriptionResponseNestedFields;
|
|
1763
|
+
declare const updateSubscriptionResponseNestedFields: UpdateSubscriptionResponseNestedFields;
|
|
1764
|
+
interface RemoveSubscriptionRequest {
|
|
1765
|
+
subscriptionId: string;
|
|
1766
|
+
}
|
|
1767
|
+
interface RemoveSubscriptionResponse {
|
|
1768
|
+
subscriptionId: string;
|
|
1769
|
+
}
|
|
1770
|
+
declare const removeSubscriptionResponse: (keyof RemoveSubscriptionResponse)[];
|
|
1771
|
+
|
|
1701
1772
|
declare const createSubscriptionPlanFeatureService: (client: GraphQLClient) => {
|
|
1702
1773
|
removeSubscriptionPlanFeature(input: RemoveSubscriptionPlanFeatureRequest, fetchFields?: {
|
|
1703
1774
|
root?: (keyof RemoveSubscriptionPlanFeatureResponse)[];
|
|
@@ -1742,4 +1813,26 @@ declare const createSubscriptionPlanService: (client: GraphQLClient) => {
|
|
|
1742
1813
|
}, option?: RequestOption): Promise<GetSubscriptionPlansResponse | null>;
|
|
1743
1814
|
};
|
|
1744
1815
|
|
|
1745
|
-
export { 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 AddStockRequest, type AddStockResponse, type AddStockResponseNestedFields, type AddStoreRequest, type AddStoreResponse, type AddStoreResponseNestedFields, type AddSubscriptionPlanFeatureRequest, type AddSubscriptionPlanFeatureResponse, type AddSubscriptionPlanFeatureResponseNestedFields, type AddSubscriptionPlanRequest, type AddSubscriptionPlanResponse, type AddSubscriptionPlanResponseNestedFields, type AddTransactionRequest, type AddTransactionResponse, type AddTransactionResponseNestedFields, type Address, type Admin, 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 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 GetSubscriptionPlanFeatureRequest, type GetSubscriptionPlanFeatureResponse, type GetSubscriptionPlanFeatureResponseNestedFields, type GetSubscriptionPlanFeaturesRequest, type GetSubscriptionPlanFeaturesResponse, type GetSubscriptionPlanFeaturesResponseNestedFields, type GetSubscriptionPlanRequest, type GetSubscriptionPlanResponse, type GetSubscriptionPlanResponseNestedFields, type GetSubscriptionPlansRequest, type GetSubscriptionPlansResponse, type GetSubscriptionPlansResponseNestedFields, 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 PaystackService, type Platform, type Price, 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 RemoveSubscriptionPlanFeatureRequest, type RemoveSubscriptionPlanFeatureResponse, type RemoveSubscriptionPlanRequest, type RemoveSubscriptionPlanResponse, 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 SubscriptionPlan, type SubscriptionPlanFeature, 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 UpdateSubscriptionPlanFeatureRequest, type UpdateSubscriptionPlanFeatureResponse, type UpdateSubscriptionPlanFeatureResponseNestedFields, type UpdateSubscriptionPlanRequest, type UpdateSubscriptionPlanResponse, type UpdateSubscriptionPlanResponseNestedFields, type UpdateTransactionRequest, type UpdateTransactionResponse, type UpdateTransactionResponseNestedFields, type UploadImageResponse, type User, type UserDevice, type UserNotification, type UserNotificationService, type UserNotificationSettings, type UserProductCounts, 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, _getSubscriptionPlanFeatureResponseNestedFields, _getSubscriptionPlanResponseNestedFields, _getTransactionResponseNestedFields, _getTransactionsResponseNestedFields, addPackageResponseFields, addPackageResponseNestedFields, addPackagesResponseFields, addPackagesResponseNestedFields, addPriceResponseFields, addPriceResponseNestedFields, addProductResponseFields, addProductResponseNestedFields, addStockResponse, addStockResponseNestedFields, addStoreResponse, addStoreResponseNestedFields, addSubscriptionPlanFeatureResponse, addSubscriptionPlanFeatureResponseNestedFields, addSubscriptionPlanResponse, addSubscriptionPlanResponseNestedFields, addTransactionResponse, addTransactionResponseNestedFields, compose, createAuthService, createOrderService, createPackageService, createPaystackService, createPriceService, createProductService, createSaleService, createStockService, createStoreCategoryProductResponseFields, createStoreCategoryProductResponseNestedFields, createStoreCategoryProductService, createStoreCategoryResponseFields, createStoreCategoryResponseNestedFields, createStoreCategoryService, createStoreService, createSubscriptionPlanFeatureService, createSubscriptionPlanService, createTransactionService, createTransport, createUserNotificationService, 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, getSubscriptionPlanFeatureResponse, getSubscriptionPlanFeatureResponseNestedFields, getSubscriptionPlanFeaturesResponse, getSubscriptionPlanFeaturesResponseNestedFields, getSubscriptionPlanResponse, getSubscriptionPlanResponseNestedFields, getSubscriptionPlansResponse, getSubscriptionPlansResponseNestedFields, getTransactionResponse, getTransactionResponseNestedFields, getTransactionsResponse, getTransactionsResponseNestedFields, orderQuery, paystackInitializePaymentResponse, removePackageResponseFields, removePriceResponseFields, removeProductResponseFields, removeStockResponse, removeStoreCategoryProductResponseFields, removeStoreCategoryResponseFields, removeStoreResponse, removeSubscriptionPlanFeatureResponse, removeSubscriptionPlanResponse, saleQuery, searchCategoriesAndTemplateResponse, searchCategoriesAndTemplateResponseNestedFields, searchProductNamesResponse, searchProductNamesResponseNestedFields, toAsyncHeadersFactory, toAsyncTokenProvider, transactionQuery, updatePackageResponseFields, updatePackageResponseNestedFields, updatePriceResponseFields, updatePriceResponseNestedFields, updateProductResponseFields, updateProductResponseNestedFields, updateSaleResponseNestedFields, updateStockResponse, updateStockResponseNestedFields, updateStoreCategoryProductResponseFields, updateStoreCategoryProductResponseNestedFields, updateStoreCategoryResponseFields, updateStoreCategoryResponseNestedFields, updateStoreResponse, updateStoreResponseNestedFields, updateSubscriptionPlanFeatureResponse, updateSubscriptionPlanFeatureResponseNestedFields, updateSubscriptionPlanResponse, updateSubscriptionPlanResponseNestedFields, updateTransactionResponse, updateTransactionResponseNestedFields };
|
|
1816
|
+
declare const createSubscriptionService: (client: GraphQLClient) => {
|
|
1817
|
+
removeSubscription(input: RemoveSubscriptionRequest, fetchFields?: {
|
|
1818
|
+
root?: (keyof RemoveSubscriptionResponse)[];
|
|
1819
|
+
}, option?: RequestOption): Promise<RemoveSubscriptionResponse | null>;
|
|
1820
|
+
updateSubscription(input: UpdateSubscriptionRequest, fetchFields?: {
|
|
1821
|
+
root?: (keyof UpdateSubscriptionResponse)[];
|
|
1822
|
+
nestedFields?: UpdateSubscriptionResponseNestedFields;
|
|
1823
|
+
}, option?: RequestOption): Promise<UpdateSubscriptionResponse | null>;
|
|
1824
|
+
addSubscription(input: AddSubscriptionRequest, fetchFields?: {
|
|
1825
|
+
root?: (keyof AddSubscriptionResponse)[];
|
|
1826
|
+
nestedFields?: AddSubscriptionResponseNestedFields;
|
|
1827
|
+
}, option?: RequestOption): Promise<AddSubscriptionResponse | null>;
|
|
1828
|
+
getSubscription(input: GetSubscriptionRequest, fetchFields?: {
|
|
1829
|
+
root?: (keyof GetSubscriptionResponse)[];
|
|
1830
|
+
nestedFields?: GetSubscriptionResponseNestedFields;
|
|
1831
|
+
}, option?: RequestOption): Promise<GetSubscriptionResponse | null>;
|
|
1832
|
+
getSubscriptions(input: GetSubscriptionsRequest, fetchFields?: {
|
|
1833
|
+
root?: (keyof GetSubscriptionsResponse)[];
|
|
1834
|
+
nestedFields?: GetSubscriptionsResponseNestedFields;
|
|
1835
|
+
}, option?: RequestOption): Promise<GetSubscriptionsResponse | null>;
|
|
1836
|
+
};
|
|
1837
|
+
|
|
1838
|
+
export { 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 AddStockRequest, type AddStockResponse, type AddStockResponseNestedFields, type AddStoreRequest, type AddStoreResponse, type AddStoreResponseNestedFields, type AddSubscriptionPlanFeatureRequest, type AddSubscriptionPlanFeatureResponse, type AddSubscriptionPlanFeatureResponseNestedFields, type AddSubscriptionPlanRequest, type AddSubscriptionPlanResponse, type AddSubscriptionPlanResponseNestedFields, type AddSubscriptionRequest, type AddSubscriptionResponse, type AddSubscriptionResponseNestedFields, type AddTransactionRequest, type AddTransactionResponse, type AddTransactionResponseNestedFields, type Address, type Admin, 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 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 GetSubscriptionPlanFeatureRequest, type GetSubscriptionPlanFeatureResponse, type GetSubscriptionPlanFeatureResponseNestedFields, type GetSubscriptionPlanFeaturesRequest, type GetSubscriptionPlanFeaturesResponse, type GetSubscriptionPlanFeaturesResponseNestedFields, type GetSubscriptionPlanRequest, type GetSubscriptionPlanResponse, type GetSubscriptionPlanResponseNestedFields, type GetSubscriptionPlansRequest, type GetSubscriptionPlansResponse, type GetSubscriptionPlansResponseNestedFields, 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 PaystackService, type Platform, type Price, 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 RemoveSubscriptionPlanFeatureRequest, type RemoveSubscriptionPlanFeatureResponse, type RemoveSubscriptionPlanRequest, type RemoveSubscriptionPlanResponse, 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 SubscriptionPlanFeature, 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 UpdateSubscriptionPlanFeatureRequest, type UpdateSubscriptionPlanFeatureResponse, type UpdateSubscriptionPlanFeatureResponseNestedFields, type UpdateSubscriptionPlanRequest, type UpdateSubscriptionPlanResponse, type UpdateSubscriptionPlanResponseNestedFields, type UpdateSubscriptionRequest, type UpdateSubscriptionResponse, type UpdateSubscriptionResponseNestedFields, type UpdateTransactionRequest, type UpdateTransactionResponse, type UpdateTransactionResponseNestedFields, type UploadImageResponse, type User, type UserDevice, type UserNotification, type UserNotificationService, type UserNotificationSettings, type UserProductCounts, 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, _getSubscriptionPlanFeatureResponseNestedFields, _getSubscriptionPlanResponseNestedFields, _getSubscriptionResponseNestedFields, _getTransactionResponseNestedFields, _getTransactionsResponseNestedFields, addPackageResponseFields, addPackageResponseNestedFields, addPackagesResponseFields, addPackagesResponseNestedFields, addPriceResponseFields, addPriceResponseNestedFields, addProductResponseFields, addProductResponseNestedFields, addStockResponse, addStockResponseNestedFields, addStoreResponse, addStoreResponseNestedFields, addSubscriptionPlanFeatureResponse, addSubscriptionPlanFeatureResponseNestedFields, addSubscriptionPlanResponse, addSubscriptionPlanResponseNestedFields, addSubscriptionResponse, addSubscriptionResponseNestedFields, addTransactionResponse, addTransactionResponseNestedFields, compose, createAuthService, createOrderService, createPackageService, createPaystackService, createPriceService, createProductService, createSaleService, createStockService, createStoreCategoryProductResponseFields, createStoreCategoryProductResponseNestedFields, createStoreCategoryProductService, createStoreCategoryResponseFields, createStoreCategoryResponseNestedFields, createStoreCategoryService, createStoreService, createSubscriptionPlanFeatureService, createSubscriptionPlanService, createSubscriptionService, createTransactionService, createTransport, createUserNotificationService, 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, getSubscriptionPlanFeatureResponse, getSubscriptionPlanFeatureResponseNestedFields, getSubscriptionPlanFeaturesResponse, getSubscriptionPlanFeaturesResponseNestedFields, getSubscriptionPlanResponse, getSubscriptionPlanResponseNestedFields, getSubscriptionPlansResponse, getSubscriptionPlansResponseNestedFields, getSubscriptionResponse, getSubscriptionResponseNestedFields, getSubscriptionsResponse, getSubscriptionsResponseNestedFields, getTransactionResponse, getTransactionResponseNestedFields, getTransactionsResponse, getTransactionsResponseNestedFields, orderQuery, paystackInitializePaymentResponse, removePackageResponseFields, removePriceResponseFields, removeProductResponseFields, removeStockResponse, removeStoreCategoryProductResponseFields, removeStoreCategoryResponseFields, removeStoreResponse, removeSubscriptionPlanFeatureResponse, removeSubscriptionPlanResponse, removeSubscriptionResponse, saleQuery, searchCategoriesAndTemplateResponse, searchCategoriesAndTemplateResponseNestedFields, searchProductNamesResponse, searchProductNamesResponseNestedFields, toAsyncHeadersFactory, toAsyncTokenProvider, transactionQuery, updatePackageResponseFields, updatePackageResponseNestedFields, updatePriceResponseFields, updatePriceResponseNestedFields, updateProductResponseFields, updateProductResponseNestedFields, updateSaleResponseNestedFields, updateStockResponse, updateStockResponseNestedFields, updateStoreCategoryProductResponseFields, updateStoreCategoryProductResponseNestedFields, updateStoreCategoryResponseFields, updateStoreCategoryResponseNestedFields, updateStoreResponse, updateStoreResponseNestedFields, updateSubscriptionPlanFeatureResponse, updateSubscriptionPlanFeatureResponseNestedFields, updateSubscriptionPlanResponse, updateSubscriptionPlanResponseNestedFields, updateSubscriptionResponse, updateSubscriptionResponseNestedFields, updateTransactionResponse, updateTransactionResponseNestedFields };
|
package/dist/index.d.ts
CHANGED
|
@@ -424,6 +424,23 @@ interface SubscriptionPlan {
|
|
|
424
424
|
subscriptionPlanFeatureIds: string[];
|
|
425
425
|
features: SubscriptionPlanFeature[];
|
|
426
426
|
}
|
|
427
|
+
interface Subscription {
|
|
428
|
+
id: string;
|
|
429
|
+
userId: string;
|
|
430
|
+
subscriptionPlanId: string;
|
|
431
|
+
price: number;
|
|
432
|
+
currency: string;
|
|
433
|
+
subscriptionStatus: "active" | "past_due" | "cancelled" | "trail";
|
|
434
|
+
currentPeriodStart: string;
|
|
435
|
+
currentPeriodEnd: string;
|
|
436
|
+
trialEnd: string;
|
|
437
|
+
cancelAtPeriodEnd: string;
|
|
438
|
+
canceledAt: string;
|
|
439
|
+
defaultPaymentMethodId: string;
|
|
440
|
+
version: number;
|
|
441
|
+
createdAt: string;
|
|
442
|
+
updatedAt: string;
|
|
443
|
+
}
|
|
427
444
|
|
|
428
445
|
type AuthTokenProvider = () => Promise<string | null> | string | null;
|
|
429
446
|
type HeadersFactory = () => Promise<Record<string, string>> | Record<string, string>;
|
|
@@ -1591,6 +1608,7 @@ type PaystackService = ReturnType<typeof createPaystackService>;
|
|
|
1591
1608
|
|
|
1592
1609
|
type SubscriptionPlanFeatureFields = (keyof SubscriptionPlanFeature)[];
|
|
1593
1610
|
type SubscriptionPlanFields = (keyof SubscriptionPlan)[];
|
|
1611
|
+
type SubscriptionFields = (keyof Subscription)[];
|
|
1594
1612
|
|
|
1595
1613
|
interface GetSubscriptionPlanFeatureRequest {
|
|
1596
1614
|
subscriptionPlanFeature: Partial<SubscriptionPlanFeature>;
|
|
@@ -1698,6 +1716,59 @@ interface RemoveSubscriptionPlanResponse {
|
|
|
1698
1716
|
}
|
|
1699
1717
|
declare const removeSubscriptionPlanResponse: (keyof RemoveSubscriptionPlanResponse)[];
|
|
1700
1718
|
|
|
1719
|
+
interface GetSubscriptionRequest {
|
|
1720
|
+
subscription: Partial<Subscription>;
|
|
1721
|
+
}
|
|
1722
|
+
interface GetSubscriptionResponse {
|
|
1723
|
+
subscription: Subscription;
|
|
1724
|
+
}
|
|
1725
|
+
declare const getSubscriptionResponse: (keyof GetSubscriptionResponse)[];
|
|
1726
|
+
interface GetSubscriptionResponseNestedFields {
|
|
1727
|
+
subscription: SubscriptionFields;
|
|
1728
|
+
}
|
|
1729
|
+
declare const _getSubscriptionResponseNestedFields: Omit<GetSubscriptionResponseNestedFields, "subscription">;
|
|
1730
|
+
declare const getSubscriptionResponseNestedFields: GetSubscriptionResponseNestedFields;
|
|
1731
|
+
interface GetSubscriptionsRequest {
|
|
1732
|
+
subscription?: Partial<Subscription>;
|
|
1733
|
+
subscriptionIds?: string[];
|
|
1734
|
+
search?: string;
|
|
1735
|
+
limit: number;
|
|
1736
|
+
skip: number;
|
|
1737
|
+
}
|
|
1738
|
+
interface GetSubscriptionsResponse {
|
|
1739
|
+
subscriptions: Subscription[];
|
|
1740
|
+
total: number;
|
|
1741
|
+
}
|
|
1742
|
+
declare const getSubscriptionsResponse: (keyof GetSubscriptionsResponse)[];
|
|
1743
|
+
interface GetSubscriptionsResponseNestedFields extends Omit<GetSubscriptionResponseNestedFields, "subscription"> {
|
|
1744
|
+
subscriptions: SubscriptionFields;
|
|
1745
|
+
}
|
|
1746
|
+
declare const getSubscriptionsResponseNestedFields: GetSubscriptionsResponseNestedFields;
|
|
1747
|
+
interface AddSubscriptionRequest {
|
|
1748
|
+
subscription: Partial<Subscription>;
|
|
1749
|
+
}
|
|
1750
|
+
interface AddSubscriptionResponse {
|
|
1751
|
+
subscription: Subscription;
|
|
1752
|
+
}
|
|
1753
|
+
declare const addSubscriptionResponse: (keyof AddSubscriptionResponse)[];
|
|
1754
|
+
type AddSubscriptionResponseNestedFields = GetSubscriptionResponseNestedFields;
|
|
1755
|
+
declare const addSubscriptionResponseNestedFields: AddSubscriptionResponseNestedFields;
|
|
1756
|
+
interface UpdateSubscriptionRequest {
|
|
1757
|
+
subscriptionId: string;
|
|
1758
|
+
subscription: Partial<Subscription>;
|
|
1759
|
+
}
|
|
1760
|
+
type UpdateSubscriptionResponse = GetSubscriptionResponse;
|
|
1761
|
+
declare const updateSubscriptionResponse: (keyof UpdateSubscriptionResponse)[];
|
|
1762
|
+
type UpdateSubscriptionResponseNestedFields = GetSubscriptionResponseNestedFields;
|
|
1763
|
+
declare const updateSubscriptionResponseNestedFields: UpdateSubscriptionResponseNestedFields;
|
|
1764
|
+
interface RemoveSubscriptionRequest {
|
|
1765
|
+
subscriptionId: string;
|
|
1766
|
+
}
|
|
1767
|
+
interface RemoveSubscriptionResponse {
|
|
1768
|
+
subscriptionId: string;
|
|
1769
|
+
}
|
|
1770
|
+
declare const removeSubscriptionResponse: (keyof RemoveSubscriptionResponse)[];
|
|
1771
|
+
|
|
1701
1772
|
declare const createSubscriptionPlanFeatureService: (client: GraphQLClient) => {
|
|
1702
1773
|
removeSubscriptionPlanFeature(input: RemoveSubscriptionPlanFeatureRequest, fetchFields?: {
|
|
1703
1774
|
root?: (keyof RemoveSubscriptionPlanFeatureResponse)[];
|
|
@@ -1742,4 +1813,26 @@ declare const createSubscriptionPlanService: (client: GraphQLClient) => {
|
|
|
1742
1813
|
}, option?: RequestOption): Promise<GetSubscriptionPlansResponse | null>;
|
|
1743
1814
|
};
|
|
1744
1815
|
|
|
1745
|
-
export { 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 AddStockRequest, type AddStockResponse, type AddStockResponseNestedFields, type AddStoreRequest, type AddStoreResponse, type AddStoreResponseNestedFields, type AddSubscriptionPlanFeatureRequest, type AddSubscriptionPlanFeatureResponse, type AddSubscriptionPlanFeatureResponseNestedFields, type AddSubscriptionPlanRequest, type AddSubscriptionPlanResponse, type AddSubscriptionPlanResponseNestedFields, type AddTransactionRequest, type AddTransactionResponse, type AddTransactionResponseNestedFields, type Address, type Admin, 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 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 GetSubscriptionPlanFeatureRequest, type GetSubscriptionPlanFeatureResponse, type GetSubscriptionPlanFeatureResponseNestedFields, type GetSubscriptionPlanFeaturesRequest, type GetSubscriptionPlanFeaturesResponse, type GetSubscriptionPlanFeaturesResponseNestedFields, type GetSubscriptionPlanRequest, type GetSubscriptionPlanResponse, type GetSubscriptionPlanResponseNestedFields, type GetSubscriptionPlansRequest, type GetSubscriptionPlansResponse, type GetSubscriptionPlansResponseNestedFields, 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 PaystackService, type Platform, type Price, 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 RemoveSubscriptionPlanFeatureRequest, type RemoveSubscriptionPlanFeatureResponse, type RemoveSubscriptionPlanRequest, type RemoveSubscriptionPlanResponse, 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 SubscriptionPlan, type SubscriptionPlanFeature, 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 UpdateSubscriptionPlanFeatureRequest, type UpdateSubscriptionPlanFeatureResponse, type UpdateSubscriptionPlanFeatureResponseNestedFields, type UpdateSubscriptionPlanRequest, type UpdateSubscriptionPlanResponse, type UpdateSubscriptionPlanResponseNestedFields, type UpdateTransactionRequest, type UpdateTransactionResponse, type UpdateTransactionResponseNestedFields, type UploadImageResponse, type User, type UserDevice, type UserNotification, type UserNotificationService, type UserNotificationSettings, type UserProductCounts, 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, _getSubscriptionPlanFeatureResponseNestedFields, _getSubscriptionPlanResponseNestedFields, _getTransactionResponseNestedFields, _getTransactionsResponseNestedFields, addPackageResponseFields, addPackageResponseNestedFields, addPackagesResponseFields, addPackagesResponseNestedFields, addPriceResponseFields, addPriceResponseNestedFields, addProductResponseFields, addProductResponseNestedFields, addStockResponse, addStockResponseNestedFields, addStoreResponse, addStoreResponseNestedFields, addSubscriptionPlanFeatureResponse, addSubscriptionPlanFeatureResponseNestedFields, addSubscriptionPlanResponse, addSubscriptionPlanResponseNestedFields, addTransactionResponse, addTransactionResponseNestedFields, compose, createAuthService, createOrderService, createPackageService, createPaystackService, createPriceService, createProductService, createSaleService, createStockService, createStoreCategoryProductResponseFields, createStoreCategoryProductResponseNestedFields, createStoreCategoryProductService, createStoreCategoryResponseFields, createStoreCategoryResponseNestedFields, createStoreCategoryService, createStoreService, createSubscriptionPlanFeatureService, createSubscriptionPlanService, createTransactionService, createTransport, createUserNotificationService, 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, getSubscriptionPlanFeatureResponse, getSubscriptionPlanFeatureResponseNestedFields, getSubscriptionPlanFeaturesResponse, getSubscriptionPlanFeaturesResponseNestedFields, getSubscriptionPlanResponse, getSubscriptionPlanResponseNestedFields, getSubscriptionPlansResponse, getSubscriptionPlansResponseNestedFields, getTransactionResponse, getTransactionResponseNestedFields, getTransactionsResponse, getTransactionsResponseNestedFields, orderQuery, paystackInitializePaymentResponse, removePackageResponseFields, removePriceResponseFields, removeProductResponseFields, removeStockResponse, removeStoreCategoryProductResponseFields, removeStoreCategoryResponseFields, removeStoreResponse, removeSubscriptionPlanFeatureResponse, removeSubscriptionPlanResponse, saleQuery, searchCategoriesAndTemplateResponse, searchCategoriesAndTemplateResponseNestedFields, searchProductNamesResponse, searchProductNamesResponseNestedFields, toAsyncHeadersFactory, toAsyncTokenProvider, transactionQuery, updatePackageResponseFields, updatePackageResponseNestedFields, updatePriceResponseFields, updatePriceResponseNestedFields, updateProductResponseFields, updateProductResponseNestedFields, updateSaleResponseNestedFields, updateStockResponse, updateStockResponseNestedFields, updateStoreCategoryProductResponseFields, updateStoreCategoryProductResponseNestedFields, updateStoreCategoryResponseFields, updateStoreCategoryResponseNestedFields, updateStoreResponse, updateStoreResponseNestedFields, updateSubscriptionPlanFeatureResponse, updateSubscriptionPlanFeatureResponseNestedFields, updateSubscriptionPlanResponse, updateSubscriptionPlanResponseNestedFields, updateTransactionResponse, updateTransactionResponseNestedFields };
|
|
1816
|
+
declare const createSubscriptionService: (client: GraphQLClient) => {
|
|
1817
|
+
removeSubscription(input: RemoveSubscriptionRequest, fetchFields?: {
|
|
1818
|
+
root?: (keyof RemoveSubscriptionResponse)[];
|
|
1819
|
+
}, option?: RequestOption): Promise<RemoveSubscriptionResponse | null>;
|
|
1820
|
+
updateSubscription(input: UpdateSubscriptionRequest, fetchFields?: {
|
|
1821
|
+
root?: (keyof UpdateSubscriptionResponse)[];
|
|
1822
|
+
nestedFields?: UpdateSubscriptionResponseNestedFields;
|
|
1823
|
+
}, option?: RequestOption): Promise<UpdateSubscriptionResponse | null>;
|
|
1824
|
+
addSubscription(input: AddSubscriptionRequest, fetchFields?: {
|
|
1825
|
+
root?: (keyof AddSubscriptionResponse)[];
|
|
1826
|
+
nestedFields?: AddSubscriptionResponseNestedFields;
|
|
1827
|
+
}, option?: RequestOption): Promise<AddSubscriptionResponse | null>;
|
|
1828
|
+
getSubscription(input: GetSubscriptionRequest, fetchFields?: {
|
|
1829
|
+
root?: (keyof GetSubscriptionResponse)[];
|
|
1830
|
+
nestedFields?: GetSubscriptionResponseNestedFields;
|
|
1831
|
+
}, option?: RequestOption): Promise<GetSubscriptionResponse | null>;
|
|
1832
|
+
getSubscriptions(input: GetSubscriptionsRequest, fetchFields?: {
|
|
1833
|
+
root?: (keyof GetSubscriptionsResponse)[];
|
|
1834
|
+
nestedFields?: GetSubscriptionsResponseNestedFields;
|
|
1835
|
+
}, option?: RequestOption): Promise<GetSubscriptionsResponse | null>;
|
|
1836
|
+
};
|
|
1837
|
+
|
|
1838
|
+
export { 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 AddStockRequest, type AddStockResponse, type AddStockResponseNestedFields, type AddStoreRequest, type AddStoreResponse, type AddStoreResponseNestedFields, type AddSubscriptionPlanFeatureRequest, type AddSubscriptionPlanFeatureResponse, type AddSubscriptionPlanFeatureResponseNestedFields, type AddSubscriptionPlanRequest, type AddSubscriptionPlanResponse, type AddSubscriptionPlanResponseNestedFields, type AddSubscriptionRequest, type AddSubscriptionResponse, type AddSubscriptionResponseNestedFields, type AddTransactionRequest, type AddTransactionResponse, type AddTransactionResponseNestedFields, type Address, type Admin, 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 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 GetSubscriptionPlanFeatureRequest, type GetSubscriptionPlanFeatureResponse, type GetSubscriptionPlanFeatureResponseNestedFields, type GetSubscriptionPlanFeaturesRequest, type GetSubscriptionPlanFeaturesResponse, type GetSubscriptionPlanFeaturesResponseNestedFields, type GetSubscriptionPlanRequest, type GetSubscriptionPlanResponse, type GetSubscriptionPlanResponseNestedFields, type GetSubscriptionPlansRequest, type GetSubscriptionPlansResponse, type GetSubscriptionPlansResponseNestedFields, 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 PaystackService, type Platform, type Price, 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 RemoveSubscriptionPlanFeatureRequest, type RemoveSubscriptionPlanFeatureResponse, type RemoveSubscriptionPlanRequest, type RemoveSubscriptionPlanResponse, 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 SubscriptionPlanFeature, 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 UpdateSubscriptionPlanFeatureRequest, type UpdateSubscriptionPlanFeatureResponse, type UpdateSubscriptionPlanFeatureResponseNestedFields, type UpdateSubscriptionPlanRequest, type UpdateSubscriptionPlanResponse, type UpdateSubscriptionPlanResponseNestedFields, type UpdateSubscriptionRequest, type UpdateSubscriptionResponse, type UpdateSubscriptionResponseNestedFields, type UpdateTransactionRequest, type UpdateTransactionResponse, type UpdateTransactionResponseNestedFields, type UploadImageResponse, type User, type UserDevice, type UserNotification, type UserNotificationService, type UserNotificationSettings, type UserProductCounts, 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, _getSubscriptionPlanFeatureResponseNestedFields, _getSubscriptionPlanResponseNestedFields, _getSubscriptionResponseNestedFields, _getTransactionResponseNestedFields, _getTransactionsResponseNestedFields, addPackageResponseFields, addPackageResponseNestedFields, addPackagesResponseFields, addPackagesResponseNestedFields, addPriceResponseFields, addPriceResponseNestedFields, addProductResponseFields, addProductResponseNestedFields, addStockResponse, addStockResponseNestedFields, addStoreResponse, addStoreResponseNestedFields, addSubscriptionPlanFeatureResponse, addSubscriptionPlanFeatureResponseNestedFields, addSubscriptionPlanResponse, addSubscriptionPlanResponseNestedFields, addSubscriptionResponse, addSubscriptionResponseNestedFields, addTransactionResponse, addTransactionResponseNestedFields, compose, createAuthService, createOrderService, createPackageService, createPaystackService, createPriceService, createProductService, createSaleService, createStockService, createStoreCategoryProductResponseFields, createStoreCategoryProductResponseNestedFields, createStoreCategoryProductService, createStoreCategoryResponseFields, createStoreCategoryResponseNestedFields, createStoreCategoryService, createStoreService, createSubscriptionPlanFeatureService, createSubscriptionPlanService, createSubscriptionService, createTransactionService, createTransport, createUserNotificationService, 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, getSubscriptionPlanFeatureResponse, getSubscriptionPlanFeatureResponseNestedFields, getSubscriptionPlanFeaturesResponse, getSubscriptionPlanFeaturesResponseNestedFields, getSubscriptionPlanResponse, getSubscriptionPlanResponseNestedFields, getSubscriptionPlansResponse, getSubscriptionPlansResponseNestedFields, getSubscriptionResponse, getSubscriptionResponseNestedFields, getSubscriptionsResponse, getSubscriptionsResponseNestedFields, getTransactionResponse, getTransactionResponseNestedFields, getTransactionsResponse, getTransactionsResponseNestedFields, orderQuery, paystackInitializePaymentResponse, removePackageResponseFields, removePriceResponseFields, removeProductResponseFields, removeStockResponse, removeStoreCategoryProductResponseFields, removeStoreCategoryResponseFields, removeStoreResponse, removeSubscriptionPlanFeatureResponse, removeSubscriptionPlanResponse, removeSubscriptionResponse, saleQuery, searchCategoriesAndTemplateResponse, searchCategoriesAndTemplateResponseNestedFields, searchProductNamesResponse, searchProductNamesResponseNestedFields, toAsyncHeadersFactory, toAsyncTokenProvider, transactionQuery, updatePackageResponseFields, updatePackageResponseNestedFields, updatePriceResponseFields, updatePriceResponseNestedFields, updateProductResponseFields, updateProductResponseNestedFields, updateSaleResponseNestedFields, updateStockResponse, updateStockResponseNestedFields, updateStoreCategoryProductResponseFields, updateStoreCategoryProductResponseNestedFields, updateStoreCategoryResponseFields, updateStoreCategoryResponseNestedFields, updateStoreResponse, updateStoreResponseNestedFields, updateSubscriptionPlanFeatureResponse, updateSubscriptionPlanFeatureResponseNestedFields, updateSubscriptionPlanResponse, updateSubscriptionPlanResponseNestedFields, updateSubscriptionResponse, updateSubscriptionResponseNestedFields, updateTransactionResponse, updateTransactionResponseNestedFields };
|
package/dist/index.esm.js
CHANGED
|
@@ -2298,6 +2298,23 @@ var createPaystackService = (client) => ({
|
|
|
2298
2298
|
});
|
|
2299
2299
|
|
|
2300
2300
|
// src/services/subscription/subscription.entity.ts
|
|
2301
|
+
var subscriptionQuery = [
|
|
2302
|
+
"cancelAtPeriodEnd",
|
|
2303
|
+
"canceledAt",
|
|
2304
|
+
"createdAt",
|
|
2305
|
+
"currency",
|
|
2306
|
+
"currentPeriodEnd",
|
|
2307
|
+
"currentPeriodStart",
|
|
2308
|
+
"defaultPaymentMethodId",
|
|
2309
|
+
"id",
|
|
2310
|
+
"price",
|
|
2311
|
+
"subscriptionPlanId",
|
|
2312
|
+
"subscriptionStatus",
|
|
2313
|
+
"trialEnd",
|
|
2314
|
+
"updatedAt",
|
|
2315
|
+
"userId",
|
|
2316
|
+
"version"
|
|
2317
|
+
];
|
|
2301
2318
|
var subscriptionPlanFeatureQuery = [
|
|
2302
2319
|
"id",
|
|
2303
2320
|
"title",
|
|
@@ -2370,6 +2387,31 @@ var removeSubscriptionPlanResponse = [
|
|
|
2370
2387
|
"subscriptionPlanId"
|
|
2371
2388
|
];
|
|
2372
2389
|
|
|
2390
|
+
// src/services/subscription/types/subscription.type.ts
|
|
2391
|
+
var getSubscriptionResponse = [
|
|
2392
|
+
"subscription"
|
|
2393
|
+
];
|
|
2394
|
+
var _getSubscriptionResponseNestedFields = {};
|
|
2395
|
+
var getSubscriptionResponseNestedFields = {
|
|
2396
|
+
..._getSubscriptionResponseNestedFields,
|
|
2397
|
+
subscription: subscriptionQuery
|
|
2398
|
+
};
|
|
2399
|
+
var getSubscriptionsResponse = [
|
|
2400
|
+
"subscriptions",
|
|
2401
|
+
"total"
|
|
2402
|
+
];
|
|
2403
|
+
var getSubscriptionsResponseNestedFields = {
|
|
2404
|
+
..._getSubscriptionResponseNestedFields,
|
|
2405
|
+
subscriptions: subscriptionQuery
|
|
2406
|
+
};
|
|
2407
|
+
var addSubscriptionResponse = getSubscriptionResponse;
|
|
2408
|
+
var addSubscriptionResponseNestedFields = getSubscriptionResponseNestedFields;
|
|
2409
|
+
var updateSubscriptionResponse = getSubscriptionResponse;
|
|
2410
|
+
var updateSubscriptionResponseNestedFields = getSubscriptionResponseNestedFields;
|
|
2411
|
+
var removeSubscriptionResponse = [
|
|
2412
|
+
"subscriptionId"
|
|
2413
|
+
];
|
|
2414
|
+
|
|
2373
2415
|
// src/services/subscription/schemas/subscription-plan-feature.schema.ts
|
|
2374
2416
|
var subscriptionPlanFeatureSchema = {
|
|
2375
2417
|
getSubscriptionPlanFeature: (query) => `
|
|
@@ -2380,7 +2422,7 @@ var subscriptionPlanFeatureSchema = {
|
|
|
2380
2422
|
}
|
|
2381
2423
|
`,
|
|
2382
2424
|
getSubscriptionPlanFeatures: (query) => `
|
|
2383
|
-
query getSubscriptionPlanFeatures($search String, $subscriptionPlanFeatureIds: [String], $subscriptionPlanFeature: SubscriptionPlanFeatureInput, $limit: Int!, $skip: Int!) {
|
|
2425
|
+
query getSubscriptionPlanFeatures($search: String, $subscriptionPlanFeatureIds: [String], $subscriptionPlanFeature: SubscriptionPlanFeatureInput, $limit: Int!, $skip: Int!) {
|
|
2384
2426
|
getSubscriptionPlanFeatures(search: $search, subscriptionPlanFeatureIds: $subscriptionPlanFeatureIds, subscriptionPlanFeature: $subscriptionPlanFeature, limit: $limit, skip: $skip) {
|
|
2385
2427
|
${query}
|
|
2386
2428
|
}
|
|
@@ -2492,7 +2534,7 @@ var subscriptionPlanSchema = {
|
|
|
2492
2534
|
}
|
|
2493
2535
|
`,
|
|
2494
2536
|
getSubscriptionPlans: (query) => `
|
|
2495
|
-
query getSubscriptionPlans($search String, $subscriptionPlanIds: [String], $subscriptionPlan: SubscriptionPlanInput, $limit: Int!, $skip: Int!) {
|
|
2537
|
+
query getSubscriptionPlans($search: String, $subscriptionPlanIds: [String], $subscriptionPlan: SubscriptionPlanInput, $limit: Int!, $skip: Int!) {
|
|
2496
2538
|
getSubscriptionPlans(search: $search, subscriptionPlanIds: $subscriptionPlanIds, subscriptionPlan: $subscriptionPlan, limit: $limit, skip: $skip) {
|
|
2497
2539
|
${query}
|
|
2498
2540
|
}
|
|
@@ -2594,6 +2636,118 @@ var createSubscriptionPlanService = (client) => ({
|
|
|
2594
2636
|
}
|
|
2595
2637
|
});
|
|
2596
2638
|
|
|
2597
|
-
|
|
2639
|
+
// src/services/subscription/schemas/subscription.schema.ts
|
|
2640
|
+
var subscriptionSchema = {
|
|
2641
|
+
getSubscription: (query) => `
|
|
2642
|
+
query getSubscription($subscription: SubscriptionInput!) {
|
|
2643
|
+
getSubscription(subscription: $subscription) {
|
|
2644
|
+
${query}
|
|
2645
|
+
}
|
|
2646
|
+
}
|
|
2647
|
+
`,
|
|
2648
|
+
getSubscriptions: (query) => `
|
|
2649
|
+
query getSubscriptions($search: String, $subscriptionIds: [String], $subscription: SubscriptionInput, $limit: Int!, $skip: Int!) {
|
|
2650
|
+
getSubscriptions(search: $search, subscriptionIds: $subscriptionIds, subscription: $subscription, limit: $limit, skip: $skip) {
|
|
2651
|
+
${query}
|
|
2652
|
+
}
|
|
2653
|
+
}
|
|
2654
|
+
`,
|
|
2655
|
+
addSubscription: (query) => `
|
|
2656
|
+
mutation addSubscription($subscription: SubscriptionInput!) {
|
|
2657
|
+
addSubscription(subscription: $subscription) {
|
|
2658
|
+
${query}
|
|
2659
|
+
}
|
|
2660
|
+
}
|
|
2661
|
+
`,
|
|
2662
|
+
updateSubscription: (query) => `
|
|
2663
|
+
mutation updateSubscription($subscriptionId: String!, $subscription: SubscriptionInput!) {
|
|
2664
|
+
updateSubscription(subscriptionId: $subcriptionId, subscription: $subscription) {
|
|
2665
|
+
${query}
|
|
2666
|
+
}
|
|
2667
|
+
}
|
|
2668
|
+
`,
|
|
2669
|
+
removeSubscription: (query) => `
|
|
2670
|
+
mutation removeSubscription($subscriptionId: String!) {
|
|
2671
|
+
removeSubscription(subscriptionId: $subcriptionId) {
|
|
2672
|
+
${query}
|
|
2673
|
+
}
|
|
2674
|
+
}
|
|
2675
|
+
`
|
|
2676
|
+
};
|
|
2677
|
+
|
|
2678
|
+
// src/services/subscription/subscription.service.ts
|
|
2679
|
+
var createSubscriptionService = (client) => ({
|
|
2680
|
+
async removeSubscription(input, fetchFields, option) {
|
|
2681
|
+
var _a, _b, _c;
|
|
2682
|
+
const res = await client.request(
|
|
2683
|
+
subscriptionSchema.removeSubscription(
|
|
2684
|
+
gqlQueryStringBuilder(
|
|
2685
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : removeSubscriptionResponse
|
|
2686
|
+
)
|
|
2687
|
+
),
|
|
2688
|
+
input,
|
|
2689
|
+
option
|
|
2690
|
+
);
|
|
2691
|
+
return (_c = (_b = res.data) == null ? void 0 : _b.removeSubscription) != null ? _c : null;
|
|
2692
|
+
},
|
|
2693
|
+
async updateSubscription(input, fetchFields, option) {
|
|
2694
|
+
var _a, _b, _c, _d;
|
|
2695
|
+
const res = await client.request(
|
|
2696
|
+
subscriptionSchema.updateSubscription(
|
|
2697
|
+
gqlQueryStringBuilder(
|
|
2698
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : updateSubscriptionResponse,
|
|
2699
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : updateSubscriptionResponseNestedFields
|
|
2700
|
+
)
|
|
2701
|
+
),
|
|
2702
|
+
input,
|
|
2703
|
+
option
|
|
2704
|
+
);
|
|
2705
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.updateSubscription) != null ? _d : null;
|
|
2706
|
+
},
|
|
2707
|
+
async addSubscription(input, fetchFields, option) {
|
|
2708
|
+
var _a, _b, _c, _d;
|
|
2709
|
+
const res = await client.request(
|
|
2710
|
+
subscriptionSchema.addSubscription(
|
|
2711
|
+
gqlQueryStringBuilder(
|
|
2712
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : addSubscriptionResponse,
|
|
2713
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : addSubscriptionResponseNestedFields
|
|
2714
|
+
)
|
|
2715
|
+
),
|
|
2716
|
+
input,
|
|
2717
|
+
option
|
|
2718
|
+
);
|
|
2719
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.addSubscription) != null ? _d : null;
|
|
2720
|
+
},
|
|
2721
|
+
async getSubscription(input, fetchFields, option) {
|
|
2722
|
+
var _a, _b, _c, _d;
|
|
2723
|
+
const res = await client.request(
|
|
2724
|
+
subscriptionSchema.getSubscription(
|
|
2725
|
+
gqlQueryStringBuilder(
|
|
2726
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getSubscriptionResponse,
|
|
2727
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getSubscriptionResponseNestedFields
|
|
2728
|
+
)
|
|
2729
|
+
),
|
|
2730
|
+
input,
|
|
2731
|
+
option
|
|
2732
|
+
);
|
|
2733
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getSubscription) != null ? _d : null;
|
|
2734
|
+
},
|
|
2735
|
+
async getSubscriptions(input, fetchFields, option) {
|
|
2736
|
+
var _a, _b, _c, _d;
|
|
2737
|
+
const res = await client.request(
|
|
2738
|
+
subscriptionSchema.getSubscriptions(
|
|
2739
|
+
gqlQueryStringBuilder(
|
|
2740
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getSubscriptionsResponse,
|
|
2741
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getSubscriptionsResponseNestedFields
|
|
2742
|
+
)
|
|
2743
|
+
),
|
|
2744
|
+
input,
|
|
2745
|
+
option
|
|
2746
|
+
);
|
|
2747
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getSubscriptions) != null ? _d : null;
|
|
2748
|
+
}
|
|
2749
|
+
});
|
|
2750
|
+
|
|
2751
|
+
export { AuthenticationError, GraphQLClient, NetworkError, SdkError, UpdateSaleResponse, _getPackageResponseNestedFields, _getProductResponseNestedFields, _getSaleResponseNestedFields, _getStoreResponseNestedFields, _getSubscriptionPlanFeatureResponseNestedFields, _getSubscriptionPlanResponseNestedFields, _getSubscriptionResponseNestedFields, _getTransactionResponseNestedFields, _getTransactionsResponseNestedFields, addPackageResponseFields, addPackageResponseNestedFields, addPackagesResponseFields, addPackagesResponseNestedFields, addPriceResponseFields, addPriceResponseNestedFields, addProductResponseFields, addProductResponseNestedFields, addStockResponse, addStockResponseNestedFields, addStoreResponse, addStoreResponseNestedFields, addSubscriptionPlanFeatureResponse, addSubscriptionPlanFeatureResponseNestedFields, addSubscriptionPlanResponse, addSubscriptionPlanResponseNestedFields, addSubscriptionResponse, addSubscriptionResponseNestedFields, addTransactionResponse, addTransactionResponseNestedFields, compose, createAuthService, createOrderService, createPackageService, createPaystackService, createPriceService, createProductService, createSaleService, createStockService, createStoreCategoryProductResponseFields, createStoreCategoryProductResponseNestedFields, createStoreCategoryProductService, createStoreCategoryResponseFields, createStoreCategoryResponseNestedFields, createStoreCategoryService, createStoreService, createSubscriptionPlanFeatureService, createSubscriptionPlanService, createSubscriptionService, createTransactionService, createTransport, createUserNotificationService, 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, getSubscriptionPlanFeatureResponse, getSubscriptionPlanFeatureResponseNestedFields, getSubscriptionPlanFeaturesResponse, getSubscriptionPlanFeaturesResponseNestedFields, getSubscriptionPlanResponse, getSubscriptionPlanResponseNestedFields, getSubscriptionPlansResponse, getSubscriptionPlansResponseNestedFields, getSubscriptionResponse, getSubscriptionResponseNestedFields, getSubscriptionsResponse, getSubscriptionsResponseNestedFields, getTransactionResponse, getTransactionResponseNestedFields, getTransactionsResponse, getTransactionsResponseNestedFields, orderQuery, paystackInitializePaymentResponse, removePackageResponseFields, removePriceResponseFields, removeProductResponseFields, removeStockResponse, removeStoreCategoryProductResponseFields, removeStoreCategoryResponseFields, removeStoreResponse, removeSubscriptionPlanFeatureResponse, removeSubscriptionPlanResponse, removeSubscriptionResponse, saleQuery, searchCategoriesAndTemplateResponse, searchCategoriesAndTemplateResponseNestedFields, searchProductNamesResponse, searchProductNamesResponseNestedFields, toAsyncHeadersFactory, toAsyncTokenProvider, transactionQuery, updatePackageResponseFields, updatePackageResponseNestedFields, updatePriceResponseFields, updatePriceResponseNestedFields, updateProductResponseFields, updateProductResponseNestedFields, updateSaleResponseNestedFields, updateStockResponse, updateStockResponseNestedFields, updateStoreCategoryProductResponseFields, updateStoreCategoryProductResponseNestedFields, updateStoreCategoryResponseFields, updateStoreCategoryResponseNestedFields, updateStoreResponse, updateStoreResponseNestedFields, updateSubscriptionPlanFeatureResponse, updateSubscriptionPlanFeatureResponseNestedFields, updateSubscriptionPlanResponse, updateSubscriptionPlanResponseNestedFields, updateSubscriptionResponse, updateSubscriptionResponseNestedFields, updateTransactionResponse, updateTransactionResponseNestedFields };
|
|
2598
2752
|
//# sourceMappingURL=index.esm.js.map
|
|
2599
2753
|
//# sourceMappingURL=index.esm.js.map
|