UNPKG

pancake-client-sdk

Version:
102 lines (101 loc) 2.74 kB
import { Tag, TagGroup, CreateTagRequest, UpdateTagRequest, CreateTagGroupRequest, TagListParams, TagAssignment, TagStats, BulkTagRequest, BulkTagResponse, TagSuggestion, AutoTagRule } from '../types/tag'; import { BaseResource } from './base'; export declare class TagResource extends BaseResource { /** * Get list of tags */ list(params?: TagListParams): Promise<{ data: Tag[]; }>; /** * Get tag by ID */ getById(tagId: string): Promise<Tag>; /** * Create new tag */ create(data: CreateTagRequest): Promise<Tag>; /** * Update tag */ update(tagId: string, data: UpdateTagRequest): Promise<Tag>; /** * Delete tag */ delete(tagId: string): Promise<void>; /** * List tag groups */ listGroups(type?: string): Promise<{ data: TagGroup[]; }>; /** * Create tag group */ createGroup(data: CreateTagGroupRequest): Promise<TagGroup>; /** * Update tag group */ updateGroup(groupId: string, data: Partial<CreateTagGroupRequest>): Promise<TagGroup>; /** * Delete tag group */ deleteGroup(groupId: string): Promise<void>; /** * Get resource tags */ getResourceTags(resourceType: string, resourceId: string): Promise<{ data: TagAssignment[]; }>; /** * Add tags to resource */ addTagsToResource(resourceType: string, resourceId: string, tagIds: string[]): Promise<TagAssignment[]>; /** * Remove tag from resource */ removeTagFromResource(resourceType: string, resourceId: string, tagId: string): Promise<void>; /** * Get tag statistics */ getStats(): Promise<TagStats>; /** * Bulk tag resources */ bulkTag(data: BulkTagRequest): Promise<BulkTagResponse>; /** * Get tag suggestions for resource */ getSuggestions(resourceType: string, resourceId: string): Promise<{ data: TagSuggestion[]; }>; /** * List auto-tag rules */ listAutoTagRules(type?: string): Promise<{ data: AutoTagRule[]; }>; /** * Create auto-tag rule */ createAutoTagRule(data: Omit<AutoTagRule, 'id' | 'created_at' | 'updated_at'>): Promise<AutoTagRule>; /** * Update auto-tag rule */ updateAutoTagRule(ruleId: string, data: Partial<AutoTagRule>): Promise<AutoTagRule>; /** * Delete auto-tag rule */ deleteAutoTagRule(ruleId: string): Promise<void>; /** * Run auto-tag rules */ runAutoTagRules(params?: { type?: string; resource_ids?: string[]; }): Promise<{ processed: number; tagged: number; rules_applied: number; }>; }