2023-08-17 08:54:51 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import apiFetch from '@wordpress/api-fetch';
|
2023-11-06 08:35:43 +00:00
|
|
|
import { __, sprintf } from '@wordpress/i18n';
|
2023-11-07 08:21:12 +00:00
|
|
|
import { dispatch } from '@wordpress/data';
|
|
|
|
import { Options } from '@wordpress/notices';
|
2023-11-21 07:08:26 +00:00
|
|
|
import { Icon } from '@wordpress/components';
|
|
|
|
|
2023-08-08 14:29:08 +00:00
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
2024-01-10 06:20:15 +00:00
|
|
|
import { LOCALE, getAdminSetting } from '../../utils/admin-settings';
|
2023-10-27 04:08:27 +00:00
|
|
|
import { CategoryAPIItem } from '../components/category-selector/types';
|
2023-09-28 15:09:37 +00:00
|
|
|
import {
|
2023-11-21 07:08:26 +00:00
|
|
|
MARKETPLACE_CART_PATH,
|
2023-09-04 15:00:30 +00:00
|
|
|
MARKETPLACE_CATEGORY_API_PATH,
|
2023-10-27 04:08:27 +00:00
|
|
|
MARKETPLACE_HOST,
|
2023-09-28 15:06:30 +00:00
|
|
|
MARKETPLACE_SEARCH_API_PATH,
|
2023-09-04 14:45:24 +00:00
|
|
|
} from '../components/constants';
|
2023-09-26 12:12:14 +00:00
|
|
|
import { Subscription } from '../components/my-subscriptions/types';
|
2023-10-27 04:08:27 +00:00
|
|
|
import {
|
|
|
|
Product,
|
|
|
|
ProductType,
|
|
|
|
SearchAPIJSONType,
|
|
|
|
SearchAPIProductType,
|
|
|
|
} from '../components/product-list/types';
|
2023-11-07 08:21:12 +00:00
|
|
|
import { NoticeStatus } from '../contexts/types';
|
|
|
|
import { noticeStore } from '../contexts/notice-store';
|
2023-08-08 14:29:08 +00:00
|
|
|
|
|
|
|
interface ProductGroup {
|
2023-08-15 12:37:50 +00:00
|
|
|
id: string;
|
2023-08-08 14:29:08 +00:00
|
|
|
title: string;
|
|
|
|
items: Product[];
|
|
|
|
url: string;
|
2023-10-04 16:59:34 +00:00
|
|
|
itemType: ProductType;
|
2023-08-08 14:29:08 +00:00
|
|
|
}
|
|
|
|
|
2023-09-28 16:05:51 +00:00
|
|
|
// The fetchCache stores the results of GET fetch/apiFetch calls from the Marketplace, in RAM, for performance
|
|
|
|
const maxFetchCacheSize = 100;
|
|
|
|
const fetchCache = new Map();
|
|
|
|
|
|
|
|
function maybePruneFetchCache() {
|
|
|
|
while ( fetchCache.size > maxFetchCacheSize ) {
|
|
|
|
fetchCache.delete( fetchCache.keys().next().value );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-09-28 16:14:02 +00:00
|
|
|
// Wrapper around apiFetch() that caches results in memory
|
2023-09-29 10:09:29 +00:00
|
|
|
async function apiFetchWithCache( params: object ): Promise< object > {
|
2023-09-28 16:14:02 +00:00
|
|
|
// Attempt to fetch from cache:
|
|
|
|
const cacheKey = JSON.stringify( params );
|
|
|
|
if ( fetchCache.get( cacheKey ) ) {
|
|
|
|
return new Promise( ( resolve ) => {
|
|
|
|
resolve( fetchCache.get( cacheKey ) );
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
|
|
|
// Failing that, fetch using apiCache:
|
|
|
|
return new Promise( ( resolve, reject ) => {
|
|
|
|
apiFetch( params )
|
|
|
|
.then( ( json ) => {
|
|
|
|
fetchCache.set( cacheKey, json );
|
|
|
|
maybePruneFetchCache();
|
2023-09-29 10:09:29 +00:00
|
|
|
resolve( json as object );
|
2023-09-28 16:14:02 +00:00
|
|
|
} )
|
|
|
|
.catch( () => {
|
|
|
|
reject();
|
|
|
|
} );
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
2023-09-28 15:06:30 +00:00
|
|
|
// Wrapper around fetch() that caches results in memory
|
2023-10-12 09:56:46 +00:00
|
|
|
async function fetchJsonWithCache(
|
|
|
|
url: string,
|
|
|
|
abortSignal?: AbortSignal
|
|
|
|
): Promise< object > {
|
2023-09-28 15:06:30 +00:00
|
|
|
// Attempt to fetch from cache:
|
2023-09-28 16:05:51 +00:00
|
|
|
if ( fetchCache.get( url ) ) {
|
2023-09-28 15:09:37 +00:00
|
|
|
return new Promise( ( resolve ) => {
|
2023-09-28 16:05:51 +00:00
|
|
|
resolve( fetchCache.get( url ) );
|
2023-09-28 15:09:37 +00:00
|
|
|
} );
|
2023-09-28 15:06:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Failing that, fetch from net:
|
|
|
|
return new Promise( ( resolve, reject ) => {
|
2023-10-12 09:29:43 +00:00
|
|
|
fetch( url, { signal: abortSignal } )
|
2023-09-28 15:09:44 +00:00
|
|
|
.then( ( response ) => {
|
|
|
|
if ( ! response.ok ) {
|
|
|
|
throw new Error( response.statusText );
|
|
|
|
}
|
|
|
|
return response.json();
|
|
|
|
} )
|
|
|
|
.then( ( json ) => {
|
2023-09-28 16:05:51 +00:00
|
|
|
fetchCache.set( url, json );
|
|
|
|
maybePruneFetchCache();
|
2023-09-28 15:09:44 +00:00
|
|
|
resolve( json );
|
|
|
|
} )
|
|
|
|
.catch( () => {
|
|
|
|
reject();
|
|
|
|
} );
|
2023-09-28 15:06:30 +00:00
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
2024-04-09 08:50:15 +00:00
|
|
|
// Fetch search results for a given set of URLSearchParams from the WooCommerce.com API
|
2023-09-28 15:09:37 +00:00
|
|
|
async function fetchSearchResults(
|
2023-10-12 09:29:43 +00:00
|
|
|
params: URLSearchParams,
|
|
|
|
abortSignal?: AbortSignal
|
2023-09-28 15:09:37 +00:00
|
|
|
): Promise< Product[] > {
|
2023-09-28 15:06:30 +00:00
|
|
|
const url =
|
|
|
|
MARKETPLACE_HOST +
|
|
|
|
MARKETPLACE_SEARCH_API_PATH +
|
|
|
|
'?' +
|
|
|
|
params.toString();
|
|
|
|
|
|
|
|
// Fetch data from WCCOM API
|
|
|
|
return new Promise( ( resolve, reject ) => {
|
2023-10-12 09:29:43 +00:00
|
|
|
fetchJsonWithCache( url, abortSignal )
|
2023-09-28 15:06:30 +00:00
|
|
|
.then( ( json ) => {
|
|
|
|
/**
|
|
|
|
* Product card component expects a Product type.
|
|
|
|
* So we build that object from the API response.
|
|
|
|
*/
|
2023-09-29 10:02:48 +00:00
|
|
|
const products = ( json as SearchAPIJSONType ).products.map(
|
2023-09-28 15:06:30 +00:00
|
|
|
( product: SearchAPIProductType ): Product => {
|
|
|
|
return {
|
|
|
|
id: product.id,
|
2024-01-24 20:02:20 +00:00
|
|
|
slug: product.slug,
|
2023-09-28 15:06:30 +00:00
|
|
|
title: product.title,
|
2023-10-12 09:29:43 +00:00
|
|
|
image: product.image,
|
|
|
|
type: product.type,
|
2024-05-10 20:00:05 +00:00
|
|
|
freemium_type: product.freemium_type,
|
2023-09-28 15:06:30 +00:00
|
|
|
description: product.excerpt,
|
|
|
|
vendorName: product.vendor_name,
|
|
|
|
vendorUrl: product.vendor_url,
|
|
|
|
icon: product.icon,
|
|
|
|
url: product.link,
|
|
|
|
// Due to backwards compatibility, raw_price is from search API, price is from featured API
|
|
|
|
price: product.raw_price ?? product.price,
|
2024-01-04 08:07:00 +00:00
|
|
|
averageRating: product.rating ?? null,
|
|
|
|
reviewsCount: product.reviews_count ?? null,
|
2024-01-24 20:02:20 +00:00
|
|
|
isInstallable: product.is_installable,
|
2024-05-15 12:43:06 +00:00
|
|
|
featuredImage: product.featured_image,
|
|
|
|
productCategory: product.product_category,
|
|
|
|
color: product.color,
|
2023-09-28 15:06:30 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
resolve( products );
|
|
|
|
} )
|
|
|
|
.catch( () => reject );
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
2024-04-09 08:50:15 +00:00
|
|
|
// Fetch data for the discover page from the WooCommerce.com API
|
2023-08-17 08:54:51 +00:00
|
|
|
async function fetchDiscoverPageData(): Promise< ProductGroup[] > {
|
|
|
|
let url = '/wc/v3/marketplace/featured';
|
2023-08-08 14:29:08 +00:00
|
|
|
|
2023-08-17 08:54:51 +00:00
|
|
|
if ( LOCALE.userLocale ) {
|
|
|
|
url = `${ url }?locale=${ LOCALE.userLocale }`;
|
|
|
|
}
|
|
|
|
|
|
|
|
try {
|
2023-09-29 10:09:29 +00:00
|
|
|
return ( await apiFetchWithCache( {
|
|
|
|
path: url.toString(),
|
|
|
|
} ) ) as Promise< ProductGroup[] >;
|
2023-08-17 08:54:51 +00:00
|
|
|
} catch ( error ) {
|
|
|
|
return [];
|
|
|
|
}
|
|
|
|
}
|
2023-08-08 14:29:08 +00:00
|
|
|
|
2023-10-04 16:59:34 +00:00
|
|
|
function fetchCategories( type: ProductType ): Promise< CategoryAPIItem[] > {
|
|
|
|
const url = new URL( MARKETPLACE_HOST + MARKETPLACE_CATEGORY_API_PATH );
|
2023-08-17 08:54:51 +00:00
|
|
|
|
|
|
|
if ( LOCALE.userLocale ) {
|
2023-10-04 16:59:34 +00:00
|
|
|
url.searchParams.set( 'locale', LOCALE.userLocale );
|
|
|
|
}
|
|
|
|
|
|
|
|
// We don't define parent for extensions since that is provided by default
|
|
|
|
// This is to ensure the old marketplace continues to work when this isn't defined
|
|
|
|
if ( type === ProductType.theme ) {
|
|
|
|
url.searchParams.set( 'parent', 'themes' );
|
2024-05-15 12:43:06 +00:00
|
|
|
} else if ( type === ProductType.businessService ) {
|
|
|
|
url.searchParams.set( 'parent', 'business-services' );
|
2023-08-17 08:54:51 +00:00
|
|
|
}
|
|
|
|
|
2023-09-29 10:09:29 +00:00
|
|
|
return (
|
|
|
|
fetchJsonWithCache( url.toString() ) as Promise< CategoryAPIItem[] >
|
|
|
|
)
|
2023-08-09 13:04:35 +00:00
|
|
|
.then( ( json ) => {
|
|
|
|
return json;
|
|
|
|
} )
|
|
|
|
.catch( () => {
|
|
|
|
return [];
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
2023-09-26 12:12:14 +00:00
|
|
|
async function fetchSubscriptions(): Promise< Array< Subscription > > {
|
|
|
|
const url = '/wc/v3/marketplace/subscriptions';
|
|
|
|
return await apiFetch( { path: url.toString() } );
|
|
|
|
}
|
|
|
|
|
2023-11-16 10:51:30 +00:00
|
|
|
async function refreshSubscriptions(): Promise< Array< Subscription > > {
|
|
|
|
const url = '/wc/v3/marketplace/refresh';
|
|
|
|
return await apiFetch( {
|
|
|
|
path: url.toString(),
|
|
|
|
method: 'POST',
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
2023-11-06 08:35:43 +00:00
|
|
|
function connectProduct( subscription: Subscription ): Promise< void > {
|
|
|
|
if ( subscription.active === true ) {
|
|
|
|
return Promise.resolve();
|
|
|
|
}
|
|
|
|
const url = '/wc/v3/marketplace/subscriptions/connect';
|
2023-10-18 09:14:14 +00:00
|
|
|
const data = new URLSearchParams();
|
2023-11-06 08:35:43 +00:00
|
|
|
data.append( 'product_key', subscription.product_key );
|
2023-10-18 09:14:14 +00:00
|
|
|
return apiFetch( {
|
|
|
|
path: url.toString(),
|
|
|
|
method: 'POST',
|
|
|
|
headers: {
|
|
|
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
|
|
},
|
|
|
|
body: data,
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
2023-11-06 08:35:43 +00:00
|
|
|
function disconnectProduct( subscription: Subscription ): Promise< void > {
|
|
|
|
if ( subscription.active === false ) {
|
|
|
|
return Promise.resolve();
|
|
|
|
}
|
|
|
|
const url = '/wc/v3/marketplace/subscriptions/disconnect';
|
|
|
|
const data = new URLSearchParams();
|
|
|
|
data.append( 'product_key', subscription.product_key );
|
|
|
|
return apiFetch( {
|
|
|
|
path: url.toString(),
|
|
|
|
method: 'POST',
|
|
|
|
headers: {
|
|
|
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
|
|
},
|
|
|
|
body: data,
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
2024-01-24 20:02:20 +00:00
|
|
|
type WpAjaxReponse = {
|
|
|
|
success: boolean;
|
|
|
|
data: WpAjaxResponseData;
|
|
|
|
};
|
|
|
|
|
|
|
|
type WpAjaxResponseData = {
|
|
|
|
errorMessage?: string;
|
|
|
|
activateUrl?: string;
|
|
|
|
};
|
|
|
|
|
2023-11-06 08:35:43 +00:00
|
|
|
function wpAjax(
|
|
|
|
action: string,
|
|
|
|
data: {
|
|
|
|
slug?: string;
|
|
|
|
plugin?: string;
|
|
|
|
theme?: string;
|
|
|
|
success?: boolean;
|
|
|
|
}
|
2024-01-24 20:02:20 +00:00
|
|
|
): Promise< WpAjaxReponse > {
|
2023-11-06 08:35:43 +00:00
|
|
|
return new Promise( ( resolve, reject ) => {
|
|
|
|
if ( ! window.wp.updates ) {
|
|
|
|
reject( __( 'Please reload and try again', 'woocommerce' ) );
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
window.wp.updates.ajax( action, {
|
|
|
|
...data,
|
2024-01-24 20:02:20 +00:00
|
|
|
success: ( response: WpAjaxResponseData ) => {
|
|
|
|
resolve( {
|
|
|
|
success: true,
|
|
|
|
data: response,
|
|
|
|
} );
|
2023-11-06 08:35:43 +00:00
|
|
|
},
|
2024-01-24 20:02:20 +00:00
|
|
|
error: ( error: WpAjaxResponseData ) => {
|
2023-11-06 08:35:43 +00:00
|
|
|
reject( {
|
|
|
|
success: false,
|
|
|
|
data: {
|
|
|
|
message: error.errorMessage,
|
|
|
|
},
|
|
|
|
} );
|
|
|
|
},
|
|
|
|
} );
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
|
|
|
function activateProduct( subscription: Subscription ): Promise< void > {
|
|
|
|
if ( subscription.local.active === true ) {
|
|
|
|
return Promise.resolve();
|
|
|
|
}
|
2023-10-27 04:08:27 +00:00
|
|
|
const url = '/wc/v3/marketplace/subscriptions/activate';
|
|
|
|
const data = new URLSearchParams();
|
2023-11-06 08:35:43 +00:00
|
|
|
data.append( 'product_key', subscription.product_key );
|
2023-10-27 04:08:27 +00:00
|
|
|
return apiFetch( {
|
|
|
|
path: url.toString(),
|
|
|
|
method: 'POST',
|
|
|
|
headers: {
|
|
|
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
|
|
},
|
|
|
|
body: data,
|
2023-11-06 08:35:43 +00:00
|
|
|
} )
|
|
|
|
.then( () => Promise.resolve() )
|
|
|
|
.catch( () =>
|
|
|
|
Promise.reject( {
|
|
|
|
success: false,
|
|
|
|
data: {
|
|
|
|
message: sprintf(
|
|
|
|
// translators: %s is the product name.
|
|
|
|
__(
|
|
|
|
'%s could not be activated. Please activate it manually.',
|
|
|
|
'woocommerce'
|
|
|
|
),
|
|
|
|
subscription.product_name
|
|
|
|
),
|
|
|
|
},
|
|
|
|
} )
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2023-12-20 11:52:51 +00:00
|
|
|
function getInstallUrl( subscription: Subscription ): Promise< string > {
|
|
|
|
return apiFetch( {
|
|
|
|
path:
|
|
|
|
'/wc/v3/marketplace/subscriptions/install-url?product_key=' +
|
|
|
|
subscription.product_key,
|
|
|
|
} ).then( ( response ) => {
|
|
|
|
return ( response as { data: { url: string } } )?.data.url;
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
2024-01-24 20:02:20 +00:00
|
|
|
function downloadProduct( productType: string, zipSlug: string ) {
|
|
|
|
return wpAjax( 'install-' + productType, {
|
|
|
|
// The slug prefix is required for the install to use WCCOM install filters.
|
|
|
|
slug: zipSlug,
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
2023-11-06 08:35:43 +00:00
|
|
|
function installProduct( subscription: Subscription ): Promise< void > {
|
|
|
|
return connectProduct( subscription ).then( () => {
|
2024-01-24 20:02:20 +00:00
|
|
|
return downloadProduct(
|
|
|
|
subscription.product_type,
|
|
|
|
subscription.zip_slug
|
|
|
|
)
|
2023-11-06 08:35:43 +00:00
|
|
|
.then( () => {
|
|
|
|
return activateProduct( subscription );
|
|
|
|
} )
|
|
|
|
.catch( ( error ) => {
|
|
|
|
// If install fails disconnect the product
|
|
|
|
return disconnectProduct( subscription ).finally( () =>
|
|
|
|
Promise.reject( error )
|
|
|
|
);
|
|
|
|
} );
|
2023-10-27 04:08:27 +00:00
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
2024-01-24 20:02:20 +00:00
|
|
|
function updateProduct( subscription: Subscription ): Promise< WpAjaxReponse > {
|
2023-11-07 08:21:12 +00:00
|
|
|
return wpAjax( 'update-' + subscription.product_type, {
|
|
|
|
slug: subscription.local.slug,
|
|
|
|
[ subscription.product_type ]: subscription.local.path,
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
|
|
|
function addNotice(
|
|
|
|
productKey: string,
|
|
|
|
message: string,
|
|
|
|
status?: NoticeStatus,
|
|
|
|
options?: Partial< Options >
|
|
|
|
) {
|
|
|
|
if ( status === NoticeStatus.Error ) {
|
|
|
|
dispatch( noticeStore ).addNotice(
|
|
|
|
productKey,
|
|
|
|
message,
|
|
|
|
status,
|
|
|
|
options
|
|
|
|
);
|
|
|
|
} else {
|
2023-11-21 07:08:26 +00:00
|
|
|
if ( ! options?.icon ) {
|
|
|
|
options = {
|
|
|
|
...options,
|
|
|
|
icon: <Icon icon="saved" />,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2023-11-07 08:21:12 +00:00
|
|
|
dispatch( 'core/notices' ).createSuccessNotice( message, options );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const removeNotice = ( productKey: string ) => {
|
|
|
|
dispatch( noticeStore ).removeNotice( productKey );
|
|
|
|
};
|
|
|
|
|
2023-12-14 11:45:40 +00:00
|
|
|
const subscriptionToProduct = ( subscription: Subscription ): Product => {
|
|
|
|
return {
|
|
|
|
id: subscription.product_id,
|
|
|
|
title: subscription.product_name,
|
|
|
|
image: '',
|
|
|
|
type: subscription.product_type as ProductType,
|
|
|
|
description: '',
|
|
|
|
vendorName: '',
|
|
|
|
vendorUrl: '',
|
|
|
|
icon: subscription.product_icon,
|
|
|
|
url: subscription.product_url,
|
|
|
|
price: -1,
|
2024-01-24 20:02:20 +00:00
|
|
|
averageRating: null,
|
|
|
|
reviewsCount: null,
|
|
|
|
isInstallable: false,
|
2023-12-14 11:45:40 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-08-15 08:03:27 +00:00
|
|
|
// Append UTM parameters to a URL, being aware of existing query parameters
|
2023-09-18 08:10:56 +00:00
|
|
|
const appendURLParams = (
|
2023-08-15 08:03:27 +00:00
|
|
|
url: string,
|
|
|
|
utmParams: Array< [ string, string ] >
|
|
|
|
): string => {
|
2023-10-04 16:59:34 +00:00
|
|
|
if ( ! url ) {
|
|
|
|
return url;
|
|
|
|
}
|
|
|
|
|
2023-08-15 08:03:27 +00:00
|
|
|
const urlObject = new URL( url );
|
|
|
|
if ( ! urlObject ) {
|
|
|
|
return url;
|
|
|
|
}
|
|
|
|
utmParams.forEach( ( [ key, value ] ) => {
|
|
|
|
urlObject.searchParams.set( key, value );
|
|
|
|
} );
|
|
|
|
return urlObject.toString();
|
|
|
|
};
|
|
|
|
|
2023-11-21 07:08:26 +00:00
|
|
|
const renewUrl = ( subscription: Subscription ): string => {
|
|
|
|
return appendURLParams( MARKETPLACE_CART_PATH, [
|
|
|
|
[ 'renew_product', subscription.product_id.toString() ],
|
|
|
|
[ 'product_key', subscription.product_key ],
|
|
|
|
[ 'order_id', subscription.order_id.toString() ],
|
|
|
|
] );
|
|
|
|
};
|
|
|
|
|
|
|
|
const subscribeUrl = ( subscription: Subscription ): string => {
|
|
|
|
return appendURLParams( MARKETPLACE_CART_PATH, [
|
|
|
|
[ 'add-to-cart', subscription.product_id.toString() ],
|
|
|
|
] );
|
|
|
|
};
|
|
|
|
|
2024-01-10 06:20:15 +00:00
|
|
|
const connectUrl = (): string => {
|
|
|
|
const wccomSettings = getAdminSetting( 'wccomHelper', {} );
|
|
|
|
|
|
|
|
if ( ! wccomSettings.connectURL ) {
|
|
|
|
return '';
|
|
|
|
}
|
|
|
|
|
|
|
|
return appendURLParams( wccomSettings.connectURL, [
|
|
|
|
[ 'redirect_admin_url', encodeURIComponent( window.location.href ) ],
|
|
|
|
] );
|
|
|
|
};
|
|
|
|
|
2023-08-15 08:03:27 +00:00
|
|
|
export {
|
2023-10-27 04:08:27 +00:00
|
|
|
ProductGroup,
|
|
|
|
appendURLParams,
|
|
|
|
connectProduct,
|
2023-08-15 08:03:27 +00:00
|
|
|
fetchCategories,
|
2023-10-27 04:08:27 +00:00
|
|
|
fetchDiscoverPageData,
|
|
|
|
fetchSearchResults,
|
2023-09-26 12:12:14 +00:00
|
|
|
fetchSubscriptions,
|
2023-11-16 10:51:30 +00:00
|
|
|
refreshSubscriptions,
|
2023-12-20 11:52:51 +00:00
|
|
|
getInstallUrl,
|
2024-01-24 20:02:20 +00:00
|
|
|
downloadProduct,
|
|
|
|
activateProduct,
|
2023-10-18 09:14:14 +00:00
|
|
|
installProduct,
|
2023-11-07 08:21:12 +00:00
|
|
|
updateProduct,
|
|
|
|
addNotice,
|
|
|
|
removeNotice,
|
2023-11-21 07:08:26 +00:00
|
|
|
renewUrl,
|
|
|
|
subscribeUrl,
|
2023-12-14 11:45:40 +00:00
|
|
|
subscriptionToProduct,
|
2024-01-10 06:20:15 +00:00
|
|
|
connectUrl,
|
2023-08-15 08:03:27 +00:00
|
|
|
};
|