@simpleapps-com/augur-api
Version:
TypeScript client library for Augur microservices API endpoints
290 lines • 9.87 kB
TypeScript
import { CreateAttributeRequest, UpdateAttributeRequest, CreateAttributeValueRequest, UpdateAttributeValueRequest } from '../schemas';
import type { ItemsClient } from '../client';
type ExecuteRequest = ItemsClient['executeRequest'];
/**
* Creates the attributes resource methods
* OpenAPI Path: /attributes → attributes.*
* @description Methods for managing product attributes
*/
export declare function createAttributesResource(executeRequest: ExecuteRequest): {
/**
* List all attributes
* @description Retrieve a paginated list of available attributes
* @fullPath api.items.attributes.list
* @service items
* @domain inventory-management
* @discoverable true
* @dataMethod attributesData.list
*/
list: (params?: Record<string, unknown>) => Promise<{
params: Record<string, unknown> | unknown[];
data: import("zod").objectInputType<{
attributeUid: import("zod").ZodNumber;
}, import("zod").ZodTypeAny, "passthrough">[];
options: Record<string, unknown> | unknown[];
status: number;
message: string;
count: number;
total: number;
totalResults: number;
}>;
/**
* Create new attribute
* @description Create a new product attribute
* @fullPath api.items.attributes.create
* @service items
* @domain inventory-management
* @discoverable true
*/
create: (data: CreateAttributeRequest) => Promise<{
params: Record<string, unknown> | unknown[];
data: {
attributeUid: number;
} & {
[k: string]: unknown;
};
options: Record<string, unknown> | unknown[];
status: number;
message: string;
count: number;
total: number;
totalResults: number;
}>;
/**
* Get attribute by ID
* @description Retrieve specific attribute details
* @fullPath api.items.attributes.get
* @service items
* @domain inventory-management
* @discoverable true
*/
get: (attributeUid: number) => Promise<{
params: Record<string, unknown> | unknown[];
data: {
attributeUid: number;
} & {
[k: string]: unknown;
};
options: Record<string, unknown> | unknown[];
status: number;
message: string;
count: number;
total: number;
totalResults: number;
}>;
/**
* Update attribute
* @description Update existing attribute
* @fullPath api.items.attributes.update
* @service items
* @domain inventory-management
* @discoverable true
*/
update: (attributeUid: number, data: UpdateAttributeRequest) => Promise<{
params: Record<string, unknown> | unknown[];
data: {
attributeUid: number;
} & {
[k: string]: unknown;
};
options: Record<string, unknown> | unknown[];
status: number;
message: string;
count: number;
total: number;
totalResults: number;
}>;
/**
* Delete attribute
* @description Delete existing attribute
* @fullPath api.items.attributes.delete
* @service items
* @domain inventory-management
* @discoverable true
*/
delete: (attributeUid: number) => Promise<{
params: Record<string, unknown> | unknown[];
data: {
attributeUid: number;
} & {
[k: string]: unknown;
};
options: Record<string, unknown> | unknown[];
status: number;
message: string;
count: number;
total: number;
totalResults: number;
}>;
/**
* OpenAPI Path: /attributes/{attributeUid}/values → attributes.values.*
* @description Nested path for managing values within attributes
*/
values: {
/**
* List attribute values
* @description List all values for a specific attribute
* @fullPath api.items.attributes.values.list
* @service items
* @domain inventory-management
* @discoverable true
*/
list: (attributeUid: number, params?: Record<string, unknown>) => Promise<{
params: Record<string, unknown> | unknown[];
data: import("zod").objectInputType<{
attributeValueUid: import("zod").ZodNumber;
}, import("zod").ZodTypeAny, "passthrough">[];
options: Record<string, unknown> | unknown[];
status: number;
message: string;
count: number;
total: number;
totalResults: number;
}>;
/**
* Create attribute value
* @description Create new value for an attribute
* @fullPath api.items.attributes.values.create
* @service items
* @domain inventory-management
* @discoverable true
*/
create: (attributeUid: number, data: CreateAttributeValueRequest) => Promise<{
params: Record<string, unknown> | unknown[];
data: {
attributeValueUid: number;
} & {
[k: string]: unknown;
};
options: Record<string, unknown> | unknown[];
status: number;
message: string;
count: number;
total: number;
totalResults: number;
}>;
/**
* Get attribute value
* @description Get specific attribute value details
* @fullPath api.items.attributes.values.get
* @service items
* @domain inventory-management
* @discoverable true
*/
get: (attributeUid: number, attributeValueUid: number) => Promise<{
params: Record<string, unknown> | unknown[];
data: {
attributeValueUid: number;
} & {
[k: string]: unknown;
};
options: Record<string, unknown> | unknown[];
status: number;
message: string;
count: number;
total: number;
totalResults: number;
}>;
/**
* Update attribute value
* @description Update existing attribute value
* @fullPath api.items.attributes.values.update
* @service items
* @domain inventory-management
* @discoverable true
*/
update: (attributeUid: number, attributeValueUid: number, data: UpdateAttributeValueRequest) => Promise<{
params: Record<string, unknown> | unknown[];
data: {
attributeValueUid: number;
} & {
[k: string]: unknown;
};
options: Record<string, unknown> | unknown[];
status: number;
message: string;
count: number;
total: number;
totalResults: number;
}>;
/**
* Delete attribute value
* @description Delete existing attribute value
* @fullPath api.items.attributes.values.delete
* @service items
* @domain inventory-management
* @discoverable true
*/
delete: (attributeUid: number, attributeValueUid: number) => Promise<{
params: Record<string, unknown> | unknown[];
data: {
attributeValueUid: number;
} & {
[k: string]: unknown;
};
options: Record<string, unknown> | unknown[];
status: number;
message: string;
count: number;
total: number;
totalResults: number;
}>;
};
};
/**
* Creates the attributesData resource methods (data-only versions)
*/
export declare function createAttributesDataResource(attributes: ReturnType<typeof createAttributesResource>): {
list: (params?: Record<string, unknown>) => Promise<import("zod").objectInputType<{
attributeUid: import("zod").ZodNumber;
}, import("zod").ZodTypeAny, "passthrough">[]>;
create: (data: CreateAttributeRequest) => Promise<{
attributeUid: number;
} & {
[k: string]: unknown;
}>;
get: (attributeUid: number) => Promise<{
attributeUid: number;
} & {
[k: string]: unknown;
}>;
update: (attributeUid: number, data: UpdateAttributeRequest) => Promise<{
attributeUid: number;
} & {
[k: string]: unknown;
}>;
delete: (attributeUid: number) => Promise<{
attributeUid: number;
} & {
[k: string]: unknown;
}>;
values: {
list: (attributeUid: number, params?: Record<string, unknown>) => Promise<import("zod").objectInputType<{
attributeValueUid: import("zod").ZodNumber;
}, import("zod").ZodTypeAny, "passthrough">[]>;
create: (attributeUid: number, data: CreateAttributeValueRequest) => Promise<{
attributeValueUid: number;
} & {
[k: string]: unknown;
}>;
get: (attributeUid: number, attributeValueUid: number) => Promise<{
attributeValueUid: number;
} & {
[k: string]: unknown;
}>;
update: (attributeUid: number, attributeValueUid: number, data: UpdateAttributeValueRequest) => Promise<{
attributeValueUid: number;
} & {
[k: string]: unknown;
}>;
delete: (attributeUid: number, attributeValueUid: number) => Promise<{
attributeValueUid: number;
} & {
[k: string]: unknown;
}>;
};
};
export type AttributesResource = ReturnType<typeof createAttributesResource>;
export type AttributesDataResource = ReturnType<typeof createAttributesDataResource>;
export {};
//# sourceMappingURL=attributes.d.ts.map