@simpleapps-com/augur-api
Version:
TypeScript client library for Augur microservices API endpoints
64 lines • 3.27 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BrandFolderClient = void 0;
const base_client_1 = require("../../core/base-client");
const resources_1 = require("./resources");
/**
* Brand Folder Service Client
* @description Client for interacting with Brand Folder API endpoints for category focus management and brand organization
* @fullPath api.brandFolder
* @service brand-folder
* @domain brand-management
* @discoverable true
* @searchTerms ["brand-folder", "category focus", "brand management", "category organization", "brand configuration", "focus management"]
* @relatedEndpoints ["api.brandFolder.healthCheck.get", "api.brandFolder.categories.focus.create", "api.items.categories.list", "api.commerce.brands.list"]
* @commonPatterns ["Brand management", "Category focus configuration", "Brand organization", "Category prioritization"]
* @workflow ["brand-management", "category-organization", "content-management", "merchandising"]
* @functionalArea "brand-and-category-management"
* @businessRules ["Requires valid bearer authentication", "Category focus configuration", "Brand-category associations", "Priority-based organization"]
* @performance "Optimized for brand management workflows and category focus operations"
* @example
* ```typescript
* import { HTTPClient } from '@augur/api-client/core';
* import { BrandFolderClient } from '@augur/api-client/services/brand-folder';
*
* const http = new HTTPClient('brand-folder', { siteId: 'your-site-id', bearerToken: 'your-token' });
* const brandFolder = new BrandFolderClient(http);
*
* // Check service health
* const health = await brandFolder.healthCheck.get();
* const healthData = await brandFolder.healthCheckData.get();
*
* // Set category focus
* const focusConfig = {
* categoryId: 'cat-123',
* focusLevel: 'primary' as const,
* priority: 95,
* isActive: true
* };
* const focus = await brandFolder.categories.focus.create(focusConfig);
* const focusData = await brandFolder.categoriesData.focus.create(focusConfig);
* ```
*/
class BrandFolderClient extends base_client_1.BaseServiceClient {
constructor(http, baseUrl) {
super('brand-folder', http, baseUrl || 'https://brand-folder.augur-api.com');
// Bind executeRequest for resource factories
const boundExecuteRequest = (config, params, pathParams) => {
if (params !== undefined || config.paramsSchema !== undefined) {
return this.executeRequest(config, params, pathParams);
}
return this.executeRequest(config, undefined, pathParams);
};
// Initialize resources
this.healthCheck = (0, resources_1.createHealthCheckResource)(boundExecuteRequest);
this.healthCheckData = (0, resources_1.createHealthCheckDataResource)(this.healthCheck);
this.categories = (0, resources_1.createCategoriesResource)(boundExecuteRequest);
this.categoriesData = (0, resources_1.createCategoriesDataResource)(this.categories);
}
getServiceDescription() {
return 'Brand folder management service for category focus configuration and brand organization';
}
}
exports.BrandFolderClient = BrandFolderClient;
//# sourceMappingURL=client.js.map