/** * Wechaty Chatbot SDK - https://github.com/wechaty/wechaty * * @copyright 2016 Huan LI (李卓桓) , and * Wechaty Contributors . * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ import * as PUPPET from '@juzi/wechaty-puppet'; import type { TagQueryFilter } from '@juzi/wechaty-puppet/dist/esm/src/schemas/tag.js'; import type { Constructor } from 'clone-class'; import type { ContactInterface } from './contact.js'; import type { TagGroupInterface } from './tag-group.js'; declare const MixinBase: ((abstract new (...args: any[]) => { readonly wechaty: import("../wechaty/wechaty-impl.js").WechatyInterface; }) & { readonly wechaty: import("../wechaty/wechaty-impl.js").WechatyInterface; }) & ((abstract new (...args: any[]) => {}) & { _pool?: Map | undefined; readonly pool: Map; load & { new (...args: any[]): TagImplInterface; prototype: TagImplInterface; } & import("../user-mixins/poolify.js").PoolifyMixin>(this: L, id: string): TagImplInterface; }) & ObjectConstructor; declare class TagMixin extends MixinBase { readonly id: string; /** * * Instance properties * @ignore * */ payload?: PUPPET.payloads.Tag; /** * @hideconstructor */ constructor(id: string); type(): PUPPET.types.Tag; name(): string; groupId(): string; group(): Promise; static list(): Promise; static find(filter: TagQueryFilter): Promise; static findMulti(filters: TagQueryFilter[]): Promise; /** * Force reload data for Tag, Sync data from low-level API again. * * @returns {Promise} * @example * await tag.sync() */ sync(): Promise; /** * @ignore */ isReady(): boolean; /** * `ready()` is For FrameWork ONLY! * * Please not to use `ready()` at the user land. * If you want to sync data, use `sync()` instead. * * @ignore */ ready(forceSync?: boolean): Promise; contactList(): Promise; tag(contacts: ContactInterface | ContactInterface[]): Promise; static createTag(name: string, tagGroup?: TagGroupInterface): Promise; static createMultiTag(nameList: string[], tagGroup?: TagGroupInterface): Promise; static deleteTag(tagInstance: TagInterface): Promise; static deleteMultiTag(tagInstances: TagInterface[]): Promise; static modifyTag(tagInstance: TagInterface, tagNewName: string): Promise; static modifyMultiTag(tagInfos: Array<{ tag: TagInterface; newName: string; }>): Promise; toString(): string; } declare const TagImplBase_base: { new (...args: any[]): {}; valid: (o: any) => o is TagImplInterface; validInstance: (target: any) => target is TagMixin; validInterface: (target: any) => target is TagImplInterface; } & typeof TagMixin; declare class TagImplBase extends TagImplBase_base { } interface TagImplInterface extends TagImplBase { } declare type TagProtectedProperty = 'ready'; declare type TagInterface = Omit; declare const TagImpl_base: { new (...args: any[]): {}; valid: (o: any) => o is TagInterface; validInstance: (target: any) => target is TagImplBase; validInterface: (target: any) => target is TagInterface; } & typeof TagImplBase; declare class TagImpl extends TagImpl_base { } declare type TagConstructor = Constructor>; export type { TagConstructor, TagProtectedProperty, TagInterface, }; export { TagImpl, }; //# sourceMappingURL=tag.d.ts.map