// Force strict mode and setup for ESM
"use strict";
import {
  require_axios,
  require_ws
} from "./chunk-I3G5JWBV.js";
import "./chunk-JE7KQ2UP.js";
import "./chunk-K6KS3LTN.js";
import {
  require_lib
} from "./chunk-FC4KQFCS.js";
import "./chunk-T3CHYWJZ.js";
import {
  ChannelBase,
  ChannelProactiveDeliveryError,
  isChannelProactiveDeliveryError,
  isTerminalTaskLifecycleType
} from "./chunk-DIEFUBV6.js";
import "./chunk-UDXSXLER.js";
import "./chunk-H6XPXXMH.js";
import {
  require_minimal2 as require_minimal
} from "./chunk-4WKAA4KS.js";
import "./chunk-CR3C7WXL.js";
import "./chunk-DMTGGOSA.js";
import "./chunk-YQ3U5MUC.js";
import "./chunk-FCMNKVXT.js";
import {
  __qwen_dirname,
  init_esbuild_shims
} from "./chunk-5O2XNYP6.js";
import {
  __commonJS,
  __name,
  __require,
  __toESM
} from "./chunk-J2S4EL5Y.js";

// node_modules/lodash.identity/index.js
var require_lodash = __commonJS({
  "node_modules/lodash.identity/index.js"(exports, module) {
    init_esbuild_shims();
    function identity(value) {
      return value;
    }
    __name(identity, "identity");
    module.exports = identity;
  }
});

// node_modules/lodash.pickby/index.js
var require_lodash2 = __commonJS({
  "node_modules/lodash.pickby/index.js"(exports, module) {
    init_esbuild_shims();
    var LARGE_ARRAY_SIZE = 200;
    var FUNC_ERROR_TEXT = "Expected a function";
    var HASH_UNDEFINED = "__lodash_hash_undefined__";
    var UNORDERED_COMPARE_FLAG = 1;
    var PARTIAL_COMPARE_FLAG = 2;
    var INFINITY = 1 / 0;
    var MAX_SAFE_INTEGER = 9007199254740991;
    var argsTag = "[object Arguments]";
    var arrayTag = "[object Array]";
    var boolTag = "[object Boolean]";
    var dateTag = "[object Date]";
    var errorTag = "[object Error]";
    var funcTag = "[object Function]";
    var genTag = "[object GeneratorFunction]";
    var mapTag = "[object Map]";
    var numberTag = "[object Number]";
    var objectTag = "[object Object]";
    var promiseTag = "[object Promise]";
    var regexpTag = "[object RegExp]";
    var setTag = "[object Set]";
    var stringTag = "[object String]";
    var symbolTag = "[object Symbol]";
    var weakMapTag = "[object WeakMap]";
    var arrayBufferTag = "[object ArrayBuffer]";
    var dataViewTag = "[object DataView]";
    var float32Tag = "[object Float32Array]";
    var float64Tag = "[object Float64Array]";
    var int8Tag = "[object Int8Array]";
    var int16Tag = "[object Int16Array]";
    var int32Tag = "[object Int32Array]";
    var uint8Tag = "[object Uint8Array]";
    var uint8ClampedTag = "[object Uint8ClampedArray]";
    var uint16Tag = "[object Uint16Array]";
    var uint32Tag = "[object Uint32Array]";
    var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
    var reIsPlainProp = /^\w*$/;
    var reLeadingDot = /^\./;
    var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
    var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
    var reEscapeChar = /\\(\\)?/g;
    var reIsHostCtor = /^\[object .+?Constructor\]$/;
    var reIsUint = /^(?:0|[1-9]\d*)$/;
    var typedArrayTags = {};
    typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
    typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
    var freeGlobal = typeof globalThis == "object" && globalThis && globalThis.Object === Object && globalThis;
    var freeSelf = typeof self == "object" && self && self.Object === Object && self;
    var root = freeGlobal || freeSelf || Function("return this")();
    var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
    var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
    var moduleExports = freeModule && freeModule.exports === freeExports;
    var freeProcess = moduleExports && freeGlobal.process;
    var nodeUtil = function() {
      try {
        return freeProcess && freeProcess.binding("util");
      } catch (e) {
      }
    }();
    var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
    function arrayPush(array, values) {
      var index = -1, length = values.length, offset = array.length;
      while (++index < length) {
        array[offset + index] = values[index];
      }
      return array;
    }
    __name(arrayPush, "arrayPush");
    function arraySome(array, predicate) {
      var index = -1, length = array ? array.length : 0;
      while (++index < length) {
        if (predicate(array[index], index, array)) {
          return true;
        }
      }
      return false;
    }
    __name(arraySome, "arraySome");
    function baseProperty(key) {
      return function(object) {
        return object == null ? void 0 : object[key];
      };
    }
    __name(baseProperty, "baseProperty");
    function baseTimes(n, iteratee) {
      var index = -1, result = Array(n);
      while (++index < n) {
        result[index] = iteratee(index);
      }
      return result;
    }
    __name(baseTimes, "baseTimes");
    function baseUnary(func) {
      return function(value) {
        return func(value);
      };
    }
    __name(baseUnary, "baseUnary");
    function getValue(object, key) {
      return object == null ? void 0 : object[key];
    }
    __name(getValue, "getValue");
    function isHostObject(value) {
      var result = false;
      if (value != null && typeof value.toString != "function") {
        try {
          result = !!(value + "");
        } catch (e) {
        }
      }
      return result;
    }
    __name(isHostObject, "isHostObject");
    function mapToArray(map) {
      var index = -1, result = Array(map.size);
      map.forEach(function(value, key) {
        result[++index] = [key, value];
      });
      return result;
    }
    __name(mapToArray, "mapToArray");
    function overArg(func, transform) {
      return function(arg) {
        return func(transform(arg));
      };
    }
    __name(overArg, "overArg");
    function setToArray(set) {
      var index = -1, result = Array(set.size);
      set.forEach(function(value) {
        result[++index] = value;
      });
      return result;
    }
    __name(setToArray, "setToArray");
    var arrayProto = Array.prototype;
    var funcProto = Function.prototype;
    var objectProto = Object.prototype;
    var coreJsData = root["__core-js_shared__"];
    var maskSrcKey = function() {
      var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
      return uid ? "Symbol(src)_1." + uid : "";
    }();
    var funcToString = funcProto.toString;
    var hasOwnProperty = objectProto.hasOwnProperty;
    var objectToString = objectProto.toString;
    var reIsNative = RegExp(
      "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
    );
    var Symbol2 = root.Symbol;
    var Uint8Array2 = root.Uint8Array;
    var getPrototype = overArg(Object.getPrototypeOf, Object);
    var propertyIsEnumerable = objectProto.propertyIsEnumerable;
    var splice = arrayProto.splice;
    var nativeGetSymbols = Object.getOwnPropertySymbols;
    var nativeKeys = overArg(Object.keys, Object);
    var DataView = getNative(root, "DataView");
    var Map2 = getNative(root, "Map");
    var Promise2 = getNative(root, "Promise");
    var Set2 = getNative(root, "Set");
    var WeakMap = getNative(root, "WeakMap");
    var nativeCreate = getNative(Object, "create");
    var dataViewCtorString = toSource(DataView);
    var mapCtorString = toSource(Map2);
    var promiseCtorString = toSource(Promise2);
    var setCtorString = toSource(Set2);
    var weakMapCtorString = toSource(WeakMap);
    var symbolProto = Symbol2 ? Symbol2.prototype : void 0;
    var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
    var symbolToString = symbolProto ? symbolProto.toString : void 0;
    function Hash(entries) {
      var index = -1, length = entries ? entries.length : 0;
      this.clear();
      while (++index < length) {
        var entry = entries[index];
        this.set(entry[0], entry[1]);
      }
    }
    __name(Hash, "Hash");
    function hashClear() {
      this.__data__ = nativeCreate ? nativeCreate(null) : {};
    }
    __name(hashClear, "hashClear");
    function hashDelete(key) {
      return this.has(key) && delete this.__data__[key];
    }
    __name(hashDelete, "hashDelete");
    function hashGet(key) {
      var data = this.__data__;
      if (nativeCreate) {
        var result = data[key];
        return result === HASH_UNDEFINED ? void 0 : result;
      }
      return hasOwnProperty.call(data, key) ? data[key] : void 0;
    }
    __name(hashGet, "hashGet");
    function hashHas(key) {
      var data = this.__data__;
      return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
    }
    __name(hashHas, "hashHas");
    function hashSet(key, value) {
      var data = this.__data__;
      data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
      return this;
    }
    __name(hashSet, "hashSet");
    Hash.prototype.clear = hashClear;
    Hash.prototype["delete"] = hashDelete;
    Hash.prototype.get = hashGet;
    Hash.prototype.has = hashHas;
    Hash.prototype.set = hashSet;
    function ListCache(entries) {
      var index = -1, length = entries ? entries.length : 0;
      this.clear();
      while (++index < length) {
        var entry = entries[index];
        this.set(entry[0], entry[1]);
      }
    }
    __name(ListCache, "ListCache");
    function listCacheClear() {
      this.__data__ = [];
    }
    __name(listCacheClear, "listCacheClear");
    function listCacheDelete(key) {
      var data = this.__data__, index = assocIndexOf(data, key);
      if (index < 0) {
        return false;
      }
      var lastIndex = data.length - 1;
      if (index == lastIndex) {
        data.pop();
      } else {
        splice.call(data, index, 1);
      }
      return true;
    }
    __name(listCacheDelete, "listCacheDelete");
    function listCacheGet(key) {
      var data = this.__data__, index = assocIndexOf(data, key);
      return index < 0 ? void 0 : data[index][1];
    }
    __name(listCacheGet, "listCacheGet");
    function listCacheHas(key) {
      return assocIndexOf(this.__data__, key) > -1;
    }
    __name(listCacheHas, "listCacheHas");
    function listCacheSet(key, value) {
      var data = this.__data__, index = assocIndexOf(data, key);
      if (index < 0) {
        data.push([key, value]);
      } else {
        data[index][1] = value;
      }
      return this;
    }
    __name(listCacheSet, "listCacheSet");
    ListCache.prototype.clear = listCacheClear;
    ListCache.prototype["delete"] = listCacheDelete;
    ListCache.prototype.get = listCacheGet;
    ListCache.prototype.has = listCacheHas;
    ListCache.prototype.set = listCacheSet;
    function MapCache(entries) {
      var index = -1, length = entries ? entries.length : 0;
      this.clear();
      while (++index < length) {
        var entry = entries[index];
        this.set(entry[0], entry[1]);
      }
    }
    __name(MapCache, "MapCache");
    function mapCacheClear() {
      this.__data__ = {
        "hash": new Hash(),
        "map": new (Map2 || ListCache)(),
        "string": new Hash()
      };
    }
    __name(mapCacheClear, "mapCacheClear");
    function mapCacheDelete(key) {
      return getMapData(this, key)["delete"](key);
    }
    __name(mapCacheDelete, "mapCacheDelete");
    function mapCacheGet(key) {
      return getMapData(this, key).get(key);
    }
    __name(mapCacheGet, "mapCacheGet");
    function mapCacheHas(key) {
      return getMapData(this, key).has(key);
    }
    __name(mapCacheHas, "mapCacheHas");
    function mapCacheSet(key, value) {
      getMapData(this, key).set(key, value);
      return this;
    }
    __name(mapCacheSet, "mapCacheSet");
    MapCache.prototype.clear = mapCacheClear;
    MapCache.prototype["delete"] = mapCacheDelete;
    MapCache.prototype.get = mapCacheGet;
    MapCache.prototype.has = mapCacheHas;
    MapCache.prototype.set = mapCacheSet;
    function SetCache(values) {
      var index = -1, length = values ? values.length : 0;
      this.__data__ = new MapCache();
      while (++index < length) {
        this.add(values[index]);
      }
    }
    __name(SetCache, "SetCache");
    function setCacheAdd(value) {
      this.__data__.set(value, HASH_UNDEFINED);
      return this;
    }
    __name(setCacheAdd, "setCacheAdd");
    function setCacheHas(value) {
      return this.__data__.has(value);
    }
    __name(setCacheHas, "setCacheHas");
    SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
    SetCache.prototype.has = setCacheHas;
    function Stack(entries) {
      this.__data__ = new ListCache(entries);
    }
    __name(Stack, "Stack");
    function stackClear() {
      this.__data__ = new ListCache();
    }
    __name(stackClear, "stackClear");
    function stackDelete(key) {
      return this.__data__["delete"](key);
    }
    __name(stackDelete, "stackDelete");
    function stackGet(key) {
      return this.__data__.get(key);
    }
    __name(stackGet, "stackGet");
    function stackHas(key) {
      return this.__data__.has(key);
    }
    __name(stackHas, "stackHas");
    function stackSet(key, value) {
      var cache = this.__data__;
      if (cache instanceof ListCache) {
        var pairs = cache.__data__;
        if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
          pairs.push([key, value]);
          return this;
        }
        cache = this.__data__ = new MapCache(pairs);
      }
      cache.set(key, value);
      return this;
    }
    __name(stackSet, "stackSet");
    Stack.prototype.clear = stackClear;
    Stack.prototype["delete"] = stackDelete;
    Stack.prototype.get = stackGet;
    Stack.prototype.has = stackHas;
    Stack.prototype.set = stackSet;
    function arrayLikeKeys(value, inherited) {
      var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : [];
      var length = result.length, skipIndexes = !!length;
      for (var key in value) {
        if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) {
          result.push(key);
        }
      }
      return result;
    }
    __name(arrayLikeKeys, "arrayLikeKeys");
    function assocIndexOf(array, key) {
      var length = array.length;
      while (length--) {
        if (eq(array[length][0], key)) {
          return length;
        }
      }
      return -1;
    }
    __name(assocIndexOf, "assocIndexOf");
    function baseGet(object, path) {
      path = isKey(path, object) ? [path] : castPath(path);
      var index = 0, length = path.length;
      while (object != null && index < length) {
        object = object[toKey(path[index++])];
      }
      return index && index == length ? object : void 0;
    }
    __name(baseGet, "baseGet");
    function baseGetAllKeys(object, keysFunc, symbolsFunc) {
      var result = keysFunc(object);
      return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
    }
    __name(baseGetAllKeys, "baseGetAllKeys");
    function baseGetTag(value) {
      return objectToString.call(value);
    }
    __name(baseGetTag, "baseGetTag");
    function baseHasIn(object, key) {
      return object != null && key in Object(object);
    }
    __name(baseHasIn, "baseHasIn");
    function baseIsEqual(value, other, customizer, bitmask, stack) {
      if (value === other) {
        return true;
      }
      if (value == null || other == null || !isObject(value) && !isObjectLike(other)) {
        return value !== value && other !== other;
      }
      return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
    }
    __name(baseIsEqual, "baseIsEqual");
    function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
      var objIsArr = isArray(object), othIsArr = isArray(other), objTag = arrayTag, othTag = arrayTag;
      if (!objIsArr) {
        objTag = getTag(object);
        objTag = objTag == argsTag ? objectTag : objTag;
      }
      if (!othIsArr) {
        othTag = getTag(other);
        othTag = othTag == argsTag ? objectTag : othTag;
      }
      var objIsObj = objTag == objectTag && !isHostObject(object), othIsObj = othTag == objectTag && !isHostObject(other), isSameTag = objTag == othTag;
      if (isSameTag && !objIsObj) {
        stack || (stack = new Stack());
        return objIsArr || isTypedArray(object) ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
      }
      if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
        var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
        if (objIsWrapped || othIsWrapped) {
          var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
          stack || (stack = new Stack());
          return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);
        }
      }
      if (!isSameTag) {
        return false;
      }
      stack || (stack = new Stack());
      return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
    }
    __name(baseIsEqualDeep, "baseIsEqualDeep");
    function baseIsMatch(object, source, matchData, customizer) {
      var index = matchData.length, length = index, noCustomizer = !customizer;
      if (object == null) {
        return !length;
      }
      object = Object(object);
      while (index--) {
        var data = matchData[index];
        if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
          return false;
        }
      }
      while (++index < length) {
        data = matchData[index];
        var key = data[0], objValue = object[key], srcValue = data[1];
        if (noCustomizer && data[2]) {
          if (objValue === void 0 && !(key in object)) {
            return false;
          }
        } else {
          var stack = new Stack();
          if (customizer) {
            var result = customizer(objValue, srcValue, key, object, source, stack);
          }
          if (!(result === void 0 ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack) : result)) {
            return false;
          }
        }
      }
      return true;
    }
    __name(baseIsMatch, "baseIsMatch");
    function baseIsNative(value) {
      if (!isObject(value) || isMasked(value)) {
        return false;
      }
      var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
      return pattern.test(toSource(value));
    }
    __name(baseIsNative, "baseIsNative");
    function baseIsTypedArray(value) {
      return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
    }
    __name(baseIsTypedArray, "baseIsTypedArray");
    function baseIteratee(value) {
      if (typeof value == "function") {
        return value;
      }
      if (value == null) {
        return identity;
      }
      if (typeof value == "object") {
        return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
      }
      return property(value);
    }
    __name(baseIteratee, "baseIteratee");
    function baseKeys(object) {
      if (!isPrototype(object)) {
        return nativeKeys(object);
      }
      var result = [];
      for (var key in Object(object)) {
        if (hasOwnProperty.call(object, key) && key != "constructor") {
          result.push(key);
        }
      }
      return result;
    }
    __name(baseKeys, "baseKeys");
    function baseKeysIn(object) {
      if (!isObject(object)) {
        return nativeKeysIn(object);
      }
      var isProto = isPrototype(object), result = [];
      for (var key in object) {
        if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) {
          result.push(key);
        }
      }
      return result;
    }
    __name(baseKeysIn, "baseKeysIn");
    function baseMatches(source) {
      var matchData = getMatchData(source);
      if (matchData.length == 1 && matchData[0][2]) {
        return matchesStrictComparable(matchData[0][0], matchData[0][1]);
      }
      return function(object) {
        return object === source || baseIsMatch(object, source, matchData);
      };
    }
    __name(baseMatches, "baseMatches");
    function baseMatchesProperty(path, srcValue) {
      if (isKey(path) && isStrictComparable(srcValue)) {
        return matchesStrictComparable(toKey(path), srcValue);
      }
      return function(object) {
        var objValue = get(object, path);
        return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, void 0, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
      };
    }
    __name(baseMatchesProperty, "baseMatchesProperty");
    function basePickBy(object, props, predicate) {
      var index = -1, length = props.length, result = {};
      while (++index < length) {
        var key = props[index], value = object[key];
        if (predicate(value, key)) {
          result[key] = value;
        }
      }
      return result;
    }
    __name(basePickBy, "basePickBy");
    function basePropertyDeep(path) {
      return function(object) {
        return baseGet(object, path);
      };
    }
    __name(basePropertyDeep, "basePropertyDeep");
    function baseToString(value) {
      if (typeof value == "string") {
        return value;
      }
      if (isSymbol(value)) {
        return symbolToString ? symbolToString.call(value) : "";
      }
      var result = value + "";
      return result == "0" && 1 / value == -INFINITY ? "-0" : result;
    }
    __name(baseToString, "baseToString");
    function castPath(value) {
      return isArray(value) ? value : stringToPath(value);
    }
    __name(castPath, "castPath");
    function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
      var isPartial = bitmask & PARTIAL_COMPARE_FLAG, arrLength = array.length, othLength = other.length;
      if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
        return false;
      }
      var stacked = stack.get(array);
      if (stacked && stack.get(other)) {
        return stacked == other;
      }
      var index = -1, result = true, seen = bitmask & UNORDERED_COMPARE_FLAG ? new SetCache() : void 0;
      stack.set(array, other);
      stack.set(other, array);
      while (++index < arrLength) {
        var arrValue = array[index], othValue = other[index];
        if (customizer) {
          var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
        }
        if (compared !== void 0) {
          if (compared) {
            continue;
          }
          result = false;
          break;
        }
        if (seen) {
          if (!arraySome(other, function(othValue2, othIndex) {
            if (!seen.has(othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, customizer, bitmask, stack))) {
              return seen.add(othIndex);
            }
          })) {
            result = false;
            break;
          }
        } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
          result = false;
          break;
        }
      }
      stack["delete"](array);
      stack["delete"](other);
      return result;
    }
    __name(equalArrays, "equalArrays");
    function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
      switch (tag) {
        case dataViewTag:
          if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
            return false;
          }
          object = object.buffer;
          other = other.buffer;
        case arrayBufferTag:
          if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) {
            return false;
          }
          return true;
        case boolTag:
        case dateTag:
        case numberTag:
          return eq(+object, +other);
        case errorTag:
          return object.name == other.name && object.message == other.message;
        case regexpTag:
        case stringTag:
          return object == other + "";
        case mapTag:
          var convert = mapToArray;
        case setTag:
          var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
          convert || (convert = setToArray);
          if (object.size != other.size && !isPartial) {
            return false;
          }
          var stacked = stack.get(object);
          if (stacked) {
            return stacked == other;
          }
          bitmask |= UNORDERED_COMPARE_FLAG;
          stack.set(object, other);
          var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
          stack["delete"](object);
          return result;
        case symbolTag:
          if (symbolValueOf) {
            return symbolValueOf.call(object) == symbolValueOf.call(other);
          }
      }
      return false;
    }
    __name(equalByTag, "equalByTag");
    function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
      var isPartial = bitmask & PARTIAL_COMPARE_FLAG, objProps = keys(object), objLength = objProps.length, othProps = keys(other), othLength = othProps.length;
      if (objLength != othLength && !isPartial) {
        return false;
      }
      var index = objLength;
      while (index--) {
        var key = objProps[index];
        if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
          return false;
        }
      }
      var stacked = stack.get(object);
      if (stacked && stack.get(other)) {
        return stacked == other;
      }
      var result = true;
      stack.set(object, other);
      stack.set(other, object);
      var skipCtor = isPartial;
      while (++index < objLength) {
        key = objProps[index];
        var objValue = object[key], othValue = other[key];
        if (customizer) {
          var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
        }
        if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack) : compared)) {
          result = false;
          break;
        }
        skipCtor || (skipCtor = key == "constructor");
      }
      if (result && !skipCtor) {
        var objCtor = object.constructor, othCtor = other.constructor;
        if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
          result = false;
        }
      }
      stack["delete"](object);
      stack["delete"](other);
      return result;
    }
    __name(equalObjects, "equalObjects");
    function getAllKeysIn(object) {
      return baseGetAllKeys(object, keysIn, getSymbolsIn);
    }
    __name(getAllKeysIn, "getAllKeysIn");
    function getMapData(map, key) {
      var data = map.__data__;
      return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
    }
    __name(getMapData, "getMapData");
    function getMatchData(object) {
      var result = keys(object), length = result.length;
      while (length--) {
        var key = result[length], value = object[key];
        result[length] = [key, value, isStrictComparable(value)];
      }
      return result;
    }
    __name(getMatchData, "getMatchData");
    function getNative(object, key) {
      var value = getValue(object, key);
      return baseIsNative(value) ? value : void 0;
    }
    __name(getNative, "getNative");
    var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
    var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
      var result = [];
      while (object) {
        arrayPush(result, getSymbols(object));
        object = getPrototype(object);
      }
      return result;
    };
    var getTag = baseGetTag;
    if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
      getTag = /* @__PURE__ */ __name(function(value) {
        var result = objectToString.call(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : void 0;
        if (ctorString) {
          switch (ctorString) {
            case dataViewCtorString:
              return dataViewTag;
            case mapCtorString:
              return mapTag;
            case promiseCtorString:
              return promiseTag;
            case setCtorString:
              return setTag;
            case weakMapCtorString:
              return weakMapTag;
          }
        }
        return result;
      }, "getTag");
    }
    function hasPath(object, path, hasFunc) {
      path = isKey(path, object) ? [path] : castPath(path);
      var result, index = -1, length = path.length;
      while (++index < length) {
        var key = toKey(path[index]);
        if (!(result = object != null && hasFunc(object, key))) {
          break;
        }
        object = object[key];
      }
      if (result) {
        return result;
      }
      var length = object ? object.length : 0;
      return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
    }
    __name(hasPath, "hasPath");
    function isIndex(value, length) {
      length = length == null ? MAX_SAFE_INTEGER : length;
      return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
    }
    __name(isIndex, "isIndex");
    function isKey(value, object) {
      if (isArray(value)) {
        return false;
      }
      var type = typeof value;
      if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
        return true;
      }
      return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
    }
    __name(isKey, "isKey");
    function isKeyable(value) {
      var type = typeof value;
      return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
    }
    __name(isKeyable, "isKeyable");
    function isMasked(func) {
      return !!maskSrcKey && maskSrcKey in func;
    }
    __name(isMasked, "isMasked");
    function isPrototype(value) {
      var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
      return value === proto;
    }
    __name(isPrototype, "isPrototype");
    function isStrictComparable(value) {
      return value === value && !isObject(value);
    }
    __name(isStrictComparable, "isStrictComparable");
    function matchesStrictComparable(key, srcValue) {
      return function(object) {
        if (object == null) {
          return false;
        }
        return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
      };
    }
    __name(matchesStrictComparable, "matchesStrictComparable");
    function nativeKeysIn(object) {
      var result = [];
      if (object != null) {
        for (var key in Object(object)) {
          result.push(key);
        }
      }
      return result;
    }
    __name(nativeKeysIn, "nativeKeysIn");
    var stringToPath = memoize(function(string) {
      string = toString(string);
      var result = [];
      if (reLeadingDot.test(string)) {
        result.push("");
      }
      string.replace(rePropName, function(match, number, quote, string2) {
        result.push(quote ? string2.replace(reEscapeChar, "$1") : number || match);
      });
      return result;
    });
    function toKey(value) {
      if (typeof value == "string" || isSymbol(value)) {
        return value;
      }
      var result = value + "";
      return result == "0" && 1 / value == -INFINITY ? "-0" : result;
    }
    __name(toKey, "toKey");
    function toSource(func) {
      if (func != null) {
        try {
          return funcToString.call(func);
        } catch (e) {
        }
        try {
          return func + "";
        } catch (e) {
        }
      }
      return "";
    }
    __name(toSource, "toSource");
    function memoize(func, resolver) {
      if (typeof func != "function" || resolver && typeof resolver != "function") {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      var memoized = /* @__PURE__ */ __name(function() {
        var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
        if (cache.has(key)) {
          return cache.get(key);
        }
        var result = func.apply(this, args);
        memoized.cache = cache.set(key, result);
        return result;
      }, "memoized");
      memoized.cache = new (memoize.Cache || MapCache)();
      return memoized;
    }
    __name(memoize, "memoize");
    memoize.Cache = MapCache;
    function eq(value, other) {
      return value === other || value !== value && other !== other;
    }
    __name(eq, "eq");
    function isArguments(value) {
      return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag);
    }
    __name(isArguments, "isArguments");
    var isArray = Array.isArray;
    function isArrayLike(value) {
      return value != null && isLength(value.length) && !isFunction(value);
    }
    __name(isArrayLike, "isArrayLike");
    function isArrayLikeObject(value) {
      return isObjectLike(value) && isArrayLike(value);
    }
    __name(isArrayLikeObject, "isArrayLikeObject");
    function isFunction(value) {
      var tag = isObject(value) ? objectToString.call(value) : "";
      return tag == funcTag || tag == genTag;
    }
    __name(isFunction, "isFunction");
    function isLength(value) {
      return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
    }
    __name(isLength, "isLength");
    function isObject(value) {
      var type = typeof value;
      return !!value && (type == "object" || type == "function");
    }
    __name(isObject, "isObject");
    function isObjectLike(value) {
      return !!value && typeof value == "object";
    }
    __name(isObjectLike, "isObjectLike");
    function isSymbol(value) {
      return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
    }
    __name(isSymbol, "isSymbol");
    var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
    function toString(value) {
      return value == null ? "" : baseToString(value);
    }
    __name(toString, "toString");
    function get(object, path, defaultValue) {
      var result = object == null ? void 0 : baseGet(object, path);
      return result === void 0 ? defaultValue : result;
    }
    __name(get, "get");
    function hasIn(object, path) {
      return object != null && hasPath(object, path, baseHasIn);
    }
    __name(hasIn, "hasIn");
    function keys(object) {
      return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
    }
    __name(keys, "keys");
    function keysIn(object) {
      return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
    }
    __name(keysIn, "keysIn");
    function pickBy(object, predicate) {
      return object == null ? {} : basePickBy(object, getAllKeysIn(object), baseIteratee(predicate));
    }
    __name(pickBy, "pickBy");
    function identity(value) {
      return value;
    }
    __name(identity, "identity");
    function property(path) {
      return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
    }
    __name(property, "property");
    function stubArray() {
      return [];
    }
    __name(stubArray, "stubArray");
    module.exports = pickBy;
  }
});

// node_modules/lodash.merge/index.js
var require_lodash3 = __commonJS({
  "node_modules/lodash.merge/index.js"(exports, module) {
    init_esbuild_shims();
    var LARGE_ARRAY_SIZE = 200;
    var HASH_UNDEFINED = "__lodash_hash_undefined__";
    var HOT_COUNT = 800;
    var HOT_SPAN = 16;
    var MAX_SAFE_INTEGER = 9007199254740991;
    var argsTag = "[object Arguments]";
    var arrayTag = "[object Array]";
    var asyncTag = "[object AsyncFunction]";
    var boolTag = "[object Boolean]";
    var dateTag = "[object Date]";
    var errorTag = "[object Error]";
    var funcTag = "[object Function]";
    var genTag = "[object GeneratorFunction]";
    var mapTag = "[object Map]";
    var numberTag = "[object Number]";
    var nullTag = "[object Null]";
    var objectTag = "[object Object]";
    var proxyTag = "[object Proxy]";
    var regexpTag = "[object RegExp]";
    var setTag = "[object Set]";
    var stringTag = "[object String]";
    var undefinedTag = "[object Undefined]";
    var weakMapTag = "[object WeakMap]";
    var arrayBufferTag = "[object ArrayBuffer]";
    var dataViewTag = "[object DataView]";
    var float32Tag = "[object Float32Array]";
    var float64Tag = "[object Float64Array]";
    var int8Tag = "[object Int8Array]";
    var int16Tag = "[object Int16Array]";
    var int32Tag = "[object Int32Array]";
    var uint8Tag = "[object Uint8Array]";
    var uint8ClampedTag = "[object Uint8ClampedArray]";
    var uint16Tag = "[object Uint16Array]";
    var uint32Tag = "[object Uint32Array]";
    var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
    var reIsHostCtor = /^\[object .+?Constructor\]$/;
    var reIsUint = /^(?:0|[1-9]\d*)$/;
    var typedArrayTags = {};
    typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
    typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
    var freeGlobal = typeof globalThis == "object" && globalThis && globalThis.Object === Object && globalThis;
    var freeSelf = typeof self == "object" && self && self.Object === Object && self;
    var root = freeGlobal || freeSelf || Function("return this")();
    var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
    var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
    var moduleExports = freeModule && freeModule.exports === freeExports;
    var freeProcess = moduleExports && freeGlobal.process;
    var nodeUtil = function() {
      try {
        var types = freeModule && freeModule.require && freeModule.require("util").types;
        if (types) {
          return types;
        }
        return freeProcess && freeProcess.binding && freeProcess.binding("util");
      } catch (e) {
      }
    }();
    var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
    function apply(func, thisArg, args) {
      switch (args.length) {
        case 0:
          return func.call(thisArg);
        case 1:
          return func.call(thisArg, args[0]);
        case 2:
          return func.call(thisArg, args[0], args[1]);
        case 3:
          return func.call(thisArg, args[0], args[1], args[2]);
      }
      return func.apply(thisArg, args);
    }
    __name(apply, "apply");
    function baseTimes(n, iteratee) {
      var index = -1, result = Array(n);
      while (++index < n) {
        result[index] = iteratee(index);
      }
      return result;
    }
    __name(baseTimes, "baseTimes");
    function baseUnary(func) {
      return function(value) {
        return func(value);
      };
    }
    __name(baseUnary, "baseUnary");
    function getValue(object, key) {
      return object == null ? void 0 : object[key];
    }
    __name(getValue, "getValue");
    function overArg(func, transform) {
      return function(arg) {
        return func(transform(arg));
      };
    }
    __name(overArg, "overArg");
    var arrayProto = Array.prototype;
    var funcProto = Function.prototype;
    var objectProto = Object.prototype;
    var coreJsData = root["__core-js_shared__"];
    var funcToString = funcProto.toString;
    var hasOwnProperty = objectProto.hasOwnProperty;
    var maskSrcKey = function() {
      var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
      return uid ? "Symbol(src)_1." + uid : "";
    }();
    var nativeObjectToString = objectProto.toString;
    var objectCtorString = funcToString.call(Object);
    var reIsNative = RegExp(
      "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
    );
    var Buffer2 = moduleExports ? root.Buffer : void 0;
    var Symbol2 = root.Symbol;
    var Uint8Array2 = root.Uint8Array;
    var allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : void 0;
    var getPrototype = overArg(Object.getPrototypeOf, Object);
    var objectCreate = Object.create;
    var propertyIsEnumerable = objectProto.propertyIsEnumerable;
    var splice = arrayProto.splice;
    var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
    var defineProperty = function() {
      try {
        var func = getNative(Object, "defineProperty");
        func({}, "", {});
        return func;
      } catch (e) {
      }
    }();
    var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
    var nativeMax = Math.max;
    var nativeNow = Date.now;
    var Map2 = getNative(root, "Map");
    var nativeCreate = getNative(Object, "create");
    var baseCreate = /* @__PURE__ */ function() {
      function object() {
      }
      __name(object, "object");
      return function(proto) {
        if (!isObject(proto)) {
          return {};
        }
        if (objectCreate) {
          return objectCreate(proto);
        }
        object.prototype = proto;
        var result = new object();
        object.prototype = void 0;
        return result;
      };
    }();
    function Hash(entries) {
      var index = -1, length = entries == null ? 0 : entries.length;
      this.clear();
      while (++index < length) {
        var entry = entries[index];
        this.set(entry[0], entry[1]);
      }
    }
    __name(Hash, "Hash");
    function hashClear() {
      this.__data__ = nativeCreate ? nativeCreate(null) : {};
      this.size = 0;
    }
    __name(hashClear, "hashClear");
    function hashDelete(key) {
      var result = this.has(key) && delete this.__data__[key];
      this.size -= result ? 1 : 0;
      return result;
    }
    __name(hashDelete, "hashDelete");
    function hashGet(key) {
      var data = this.__data__;
      if (nativeCreate) {
        var result = data[key];
        return result === HASH_UNDEFINED ? void 0 : result;
      }
      return hasOwnProperty.call(data, key) ? data[key] : void 0;
    }
    __name(hashGet, "hashGet");
    function hashHas(key) {
      var data = this.__data__;
      return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
    }
    __name(hashHas, "hashHas");
    function hashSet(key, value) {
      var data = this.__data__;
      this.size += this.has(key) ? 0 : 1;
      data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
      return this;
    }
    __name(hashSet, "hashSet");
    Hash.prototype.clear = hashClear;
    Hash.prototype["delete"] = hashDelete;
    Hash.prototype.get = hashGet;
    Hash.prototype.has = hashHas;
    Hash.prototype.set = hashSet;
    function ListCache(entries) {
      var index = -1, length = entries == null ? 0 : entries.length;
      this.clear();
      while (++index < length) {
        var entry = entries[index];
        this.set(entry[0], entry[1]);
      }
    }
    __name(ListCache, "ListCache");
    function listCacheClear() {
      this.__data__ = [];
      this.size = 0;
    }
    __name(listCacheClear, "listCacheClear");
    function listCacheDelete(key) {
      var data = this.__data__, index = assocIndexOf(data, key);
      if (index < 0) {
        return false;
      }
      var lastIndex = data.length - 1;
      if (index == lastIndex) {
        data.pop();
      } else {
        splice.call(data, index, 1);
      }
      --this.size;
      return true;
    }
    __name(listCacheDelete, "listCacheDelete");
    function listCacheGet(key) {
      var data = this.__data__, index = assocIndexOf(data, key);
      return index < 0 ? void 0 : data[index][1];
    }
    __name(listCacheGet, "listCacheGet");
    function listCacheHas(key) {
      return assocIndexOf(this.__data__, key) > -1;
    }
    __name(listCacheHas, "listCacheHas");
    function listCacheSet(key, value) {
      var data = this.__data__, index = assocIndexOf(data, key);
      if (index < 0) {
        ++this.size;
        data.push([key, value]);
      } else {
        data[index][1] = value;
      }
      return this;
    }
    __name(listCacheSet, "listCacheSet");
    ListCache.prototype.clear = listCacheClear;
    ListCache.prototype["delete"] = listCacheDelete;
    ListCache.prototype.get = listCacheGet;
    ListCache.prototype.has = listCacheHas;
    ListCache.prototype.set = listCacheSet;
    function MapCache(entries) {
      var index = -1, length = entries == null ? 0 : entries.length;
      this.clear();
      while (++index < length) {
        var entry = entries[index];
        this.set(entry[0], entry[1]);
      }
    }
    __name(MapCache, "MapCache");
    function mapCacheClear() {
      this.size = 0;
      this.__data__ = {
        "hash": new Hash(),
        "map": new (Map2 || ListCache)(),
        "string": new Hash()
      };
    }
    __name(mapCacheClear, "mapCacheClear");
    function mapCacheDelete(key) {
      var result = getMapData(this, key)["delete"](key);
      this.size -= result ? 1 : 0;
      return result;
    }
    __name(mapCacheDelete, "mapCacheDelete");
    function mapCacheGet(key) {
      return getMapData(this, key).get(key);
    }
    __name(mapCacheGet, "mapCacheGet");
    function mapCacheHas(key) {
      return getMapData(this, key).has(key);
    }
    __name(mapCacheHas, "mapCacheHas");
    function mapCacheSet(key, value) {
      var data = getMapData(this, key), size = data.size;
      data.set(key, value);
      this.size += data.size == size ? 0 : 1;
      return this;
    }
    __name(mapCacheSet, "mapCacheSet");
    MapCache.prototype.clear = mapCacheClear;
    MapCache.prototype["delete"] = mapCacheDelete;
    MapCache.prototype.get = mapCacheGet;
    MapCache.prototype.has = mapCacheHas;
    MapCache.prototype.set = mapCacheSet;
    function Stack(entries) {
      var data = this.__data__ = new ListCache(entries);
      this.size = data.size;
    }
    __name(Stack, "Stack");
    function stackClear() {
      this.__data__ = new ListCache();
      this.size = 0;
    }
    __name(stackClear, "stackClear");
    function stackDelete(key) {
      var data = this.__data__, result = data["delete"](key);
      this.size = data.size;
      return result;
    }
    __name(stackDelete, "stackDelete");
    function stackGet(key) {
      return this.__data__.get(key);
    }
    __name(stackGet, "stackGet");
    function stackHas(key) {
      return this.__data__.has(key);
    }
    __name(stackHas, "stackHas");
    function stackSet(key, value) {
      var data = this.__data__;
      if (data instanceof ListCache) {
        var pairs = data.__data__;
        if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
          pairs.push([key, value]);
          this.size = ++data.size;
          return this;
        }
        data = this.__data__ = new MapCache(pairs);
      }
      data.set(key, value);
      this.size = data.size;
      return this;
    }
    __name(stackSet, "stackSet");
    Stack.prototype.clear = stackClear;
    Stack.prototype["delete"] = stackDelete;
    Stack.prototype.get = stackGet;
    Stack.prototype.has = stackHas;
    Stack.prototype.set = stackSet;
    function arrayLikeKeys(value, inherited) {
      var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
      for (var key in value) {
        if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
        (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
        isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
        isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
        isIndex(key, length)))) {
          result.push(key);
        }
      }
      return result;
    }
    __name(arrayLikeKeys, "arrayLikeKeys");
    function assignMergeValue(object, key, value) {
      if (value !== void 0 && !eq(object[key], value) || value === void 0 && !(key in object)) {
        baseAssignValue(object, key, value);
      }
    }
    __name(assignMergeValue, "assignMergeValue");
    function assignValue(object, key, value) {
      var objValue = object[key];
      if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
        baseAssignValue(object, key, value);
      }
    }
    __name(assignValue, "assignValue");
    function assocIndexOf(array, key) {
      var length = array.length;
      while (length--) {
        if (eq(array[length][0], key)) {
          return length;
        }
      }
      return -1;
    }
    __name(assocIndexOf, "assocIndexOf");
    function baseAssignValue(object, key, value) {
      if (key == "__proto__" && defineProperty) {
        defineProperty(object, key, {
          "configurable": true,
          "enumerable": true,
          "value": value,
          "writable": true
        });
      } else {
        object[key] = value;
      }
    }
    __name(baseAssignValue, "baseAssignValue");
    var baseFor = createBaseFor();
    function baseGetTag(value) {
      if (value == null) {
        return value === void 0 ? undefinedTag : nullTag;
      }
      return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
    }
    __name(baseGetTag, "baseGetTag");
    function baseIsArguments(value) {
      return isObjectLike(value) && baseGetTag(value) == argsTag;
    }
    __name(baseIsArguments, "baseIsArguments");
    function baseIsNative(value) {
      if (!isObject(value) || isMasked(value)) {
        return false;
      }
      var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
      return pattern.test(toSource(value));
    }
    __name(baseIsNative, "baseIsNative");
    function baseIsTypedArray(value) {
      return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
    }
    __name(baseIsTypedArray, "baseIsTypedArray");
    function baseKeysIn(object) {
      if (!isObject(object)) {
        return nativeKeysIn(object);
      }
      var isProto = isPrototype(object), result = [];
      for (var key in object) {
        if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) {
          result.push(key);
        }
      }
      return result;
    }
    __name(baseKeysIn, "baseKeysIn");
    function baseMerge(object, source, srcIndex, customizer, stack) {
      if (object === source) {
        return;
      }
      baseFor(source, function(srcValue, key) {
        stack || (stack = new Stack());
        if (isObject(srcValue)) {
          baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
        } else {
          var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : void 0;
          if (newValue === void 0) {
            newValue = srcValue;
          }
          assignMergeValue(object, key, newValue);
        }
      }, keysIn);
    }
    __name(baseMerge, "baseMerge");
    function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
      var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue);
      if (stacked) {
        assignMergeValue(object, key, stacked);
        return;
      }
      var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : void 0;
      var isCommon = newValue === void 0;
      if (isCommon) {
        var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue);
        newValue = srcValue;
        if (isArr || isBuff || isTyped) {
          if (isArray(objValue)) {
            newValue = objValue;
          } else if (isArrayLikeObject(objValue)) {
            newValue = copyArray(objValue);
          } else if (isBuff) {
            isCommon = false;
            newValue = cloneBuffer(srcValue, true);
          } else if (isTyped) {
            isCommon = false;
            newValue = cloneTypedArray(srcValue, true);
          } else {
            newValue = [];
          }
        } else if (isPlainObject(srcValue) || isArguments(srcValue)) {
          newValue = objValue;
          if (isArguments(objValue)) {
            newValue = toPlainObject(objValue);
          } else if (!isObject(objValue) || isFunction(objValue)) {
            newValue = initCloneObject(srcValue);
          }
        } else {
          isCommon = false;
        }
      }
      if (isCommon) {
        stack.set(srcValue, newValue);
        mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
        stack["delete"](srcValue);
      }
      assignMergeValue(object, key, newValue);
    }
    __name(baseMergeDeep, "baseMergeDeep");
    function baseRest(func, start) {
      return setToString(overRest(func, start, identity), func + "");
    }
    __name(baseRest, "baseRest");
    var baseSetToString = !defineProperty ? identity : function(func, string) {
      return defineProperty(func, "toString", {
        "configurable": true,
        "enumerable": false,
        "value": constant(string),
        "writable": true
      });
    };
    function cloneBuffer(buffer, isDeep) {
      if (isDeep) {
        return buffer.slice();
      }
      var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
      buffer.copy(result);
      return result;
    }
    __name(cloneBuffer, "cloneBuffer");
    function cloneArrayBuffer(arrayBuffer) {
      var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
      new Uint8Array2(result).set(new Uint8Array2(arrayBuffer));
      return result;
    }
    __name(cloneArrayBuffer, "cloneArrayBuffer");
    function cloneTypedArray(typedArray, isDeep) {
      var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
      return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
    }
    __name(cloneTypedArray, "cloneTypedArray");
    function copyArray(source, array) {
      var index = -1, length = source.length;
      array || (array = Array(length));
      while (++index < length) {
        array[index] = source[index];
      }
      return array;
    }
    __name(copyArray, "copyArray");
    function copyObject(source, props, object, customizer) {
      var isNew = !object;
      object || (object = {});
      var index = -1, length = props.length;
      while (++index < length) {
        var key = props[index];
        var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
        if (newValue === void 0) {
          newValue = source[key];
        }
        if (isNew) {
          baseAssignValue(object, key, newValue);
        } else {
          assignValue(object, key, newValue);
        }
      }
      return object;
    }
    __name(copyObject, "copyObject");
    function createAssigner(assigner) {
      return baseRest(function(object, sources) {
        var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : void 0, guard = length > 2 ? sources[2] : void 0;
        customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : void 0;
        if (guard && isIterateeCall(sources[0], sources[1], guard)) {
          customizer = length < 3 ? void 0 : customizer;
          length = 1;
        }
        object = Object(object);
        while (++index < length) {
          var source = sources[index];
          if (source) {
            assigner(object, source, index, customizer);
          }
        }
        return object;
      });
    }
    __name(createAssigner, "createAssigner");
    function createBaseFor(fromRight) {
      return function(object, iteratee, keysFunc) {
        var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
        while (length--) {
          var key = props[fromRight ? length : ++index];
          if (iteratee(iterable[key], key, iterable) === false) {
            break;
          }
        }
        return object;
      };
    }
    __name(createBaseFor, "createBaseFor");
    function getMapData(map, key) {
      var data = map.__data__;
      return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
    }
    __name(getMapData, "getMapData");
    function getNative(object, key) {
      var value = getValue(object, key);
      return baseIsNative(value) ? value : void 0;
    }
    __name(getNative, "getNative");
    function getRawTag(value) {
      var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
      try {
        value[symToStringTag] = void 0;
        var unmasked = true;
      } catch (e) {
      }
      var result = nativeObjectToString.call(value);
      if (unmasked) {
        if (isOwn) {
          value[symToStringTag] = tag;
        } else {
          delete value[symToStringTag];
        }
      }
      return result;
    }
    __name(getRawTag, "getRawTag");
    function initCloneObject(object) {
      return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
    }
    __name(initCloneObject, "initCloneObject");
    function isIndex(value, length) {
      var type = typeof value;
      length = length == null ? MAX_SAFE_INTEGER : length;
      return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
    }
    __name(isIndex, "isIndex");
    function isIterateeCall(value, index, object) {
      if (!isObject(object)) {
        return false;
      }
      var type = typeof index;
      if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) {
        return eq(object[index], value);
      }
      return false;
    }
    __name(isIterateeCall, "isIterateeCall");
    function isKeyable(value) {
      var type = typeof value;
      return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
    }
    __name(isKeyable, "isKeyable");
    function isMasked(func) {
      return !!maskSrcKey && maskSrcKey in func;
    }
    __name(isMasked, "isMasked");
    function isPrototype(value) {
      var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
      return value === proto;
    }
    __name(isPrototype, "isPrototype");
    function nativeKeysIn(object) {
      var result = [];
      if (object != null) {
        for (var key in Object(object)) {
          result.push(key);
        }
      }
      return result;
    }
    __name(nativeKeysIn, "nativeKeysIn");
    function objectToString(value) {
      return nativeObjectToString.call(value);
    }
    __name(objectToString, "objectToString");
    function overRest(func, start, transform) {
      start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
      return function() {
        var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
        while (++index < length) {
          array[index] = args[start + index];
        }
        index = -1;
        var otherArgs = Array(start + 1);
        while (++index < start) {
          otherArgs[index] = args[index];
        }
        otherArgs[start] = transform(array);
        return apply(func, this, otherArgs);
      };
    }
    __name(overRest, "overRest");
    function safeGet(object, key) {
      if (key === "constructor" && typeof object[key] === "function") {
        return;
      }
      if (key == "__proto__") {
        return;
      }
      return object[key];
    }
    __name(safeGet, "safeGet");
    var setToString = shortOut(baseSetToString);
    function shortOut(func) {
      var count = 0, lastCalled = 0;
      return function() {
        var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
        lastCalled = stamp;
        if (remaining > 0) {
          if (++count >= HOT_COUNT) {
            return arguments[0];
          }
        } else {
          count = 0;
        }
        return func.apply(void 0, arguments);
      };
    }
    __name(shortOut, "shortOut");
    function toSource(func) {
      if (func != null) {
        try {
          return funcToString.call(func);
        } catch (e) {
        }
        try {
          return func + "";
        } catch (e) {
        }
      }
      return "";
    }
    __name(toSource, "toSource");
    function eq(value, other) {
      return value === other || value !== value && other !== other;
    }
    __name(eq, "eq");
    var isArguments = baseIsArguments(/* @__PURE__ */ function() {
      return arguments;
    }()) ? baseIsArguments : function(value) {
      return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
    };
    var isArray = Array.isArray;
    function isArrayLike(value) {
      return value != null && isLength(value.length) && !isFunction(value);
    }
    __name(isArrayLike, "isArrayLike");
    function isArrayLikeObject(value) {
      return isObjectLike(value) && isArrayLike(value);
    }
    __name(isArrayLikeObject, "isArrayLikeObject");
    var isBuffer = nativeIsBuffer || stubFalse;
    function isFunction(value) {
      if (!isObject(value)) {
        return false;
      }
      var tag = baseGetTag(value);
      return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
    }
    __name(isFunction, "isFunction");
    function isLength(value) {
      return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
    }
    __name(isLength, "isLength");
    function isObject(value) {
      var type = typeof value;
      return value != null && (type == "object" || type == "function");
    }
    __name(isObject, "isObject");
    function isObjectLike(value) {
      return value != null && typeof value == "object";
    }
    __name(isObjectLike, "isObjectLike");
    function isPlainObject(value) {
      if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
        return false;
      }
      var proto = getPrototype(value);
      if (proto === null) {
        return true;
      }
      var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor;
      return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
    }
    __name(isPlainObject, "isPlainObject");
    var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
    function toPlainObject(value) {
      return copyObject(value, keysIn(value));
    }
    __name(toPlainObject, "toPlainObject");
    function keysIn(object) {
      return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
    }
    __name(keysIn, "keysIn");
    var merge = createAssigner(function(object, source, srcIndex) {
      baseMerge(object, source, srcIndex);
    });
    function constant(value) {
      return function() {
        return value;
      };
    }
    __name(constant, "constant");
    function identity(value) {
      return value;
    }
    __name(identity, "identity");
    function stubFalse() {
      return false;
    }
    __name(stubFalse, "stubFalse");
    module.exports = merge;
  }
});

// node_modules/@larksuiteoapi/node-sdk/lib/index.js
var require_lib2 = __commonJS({
  "node_modules/@larksuiteoapi/node-sdk/lib/index.js"(exports) {
    "use strict";
    init_esbuild_shims();
    Object.defineProperty(exports, "__esModule", { value: true });
    var axios = require_axios();
    var fs = __require("fs");
    var path = __require("path");
    var crypto = __require("crypto");
    var qs = require_lib();
    var identity = require_lodash();
    var pickBy = require_lodash2();
    var merge = require_lodash3();
    var qs$1 = __require("querystring");
    var WebSocket = require_ws();
    var http = __require("http");
    var https = __require("https");
    var dns = __require("dns");
    var net = __require("net");
    function _interopDefaultLegacy(e) {
      return e && typeof e === "object" && "default" in e ? e : { "default": e };
    }
    __name(_interopDefaultLegacy, "_interopDefaultLegacy");
    var axios__default = /* @__PURE__ */ _interopDefaultLegacy(axios);
    var fs__default = /* @__PURE__ */ _interopDefaultLegacy(fs);
    var path__default = /* @__PURE__ */ _interopDefaultLegacy(path);
    var crypto__default = /* @__PURE__ */ _interopDefaultLegacy(crypto);
    var identity__default = /* @__PURE__ */ _interopDefaultLegacy(identity);
    var pickBy__default = /* @__PURE__ */ _interopDefaultLegacy(pickBy);
    var merge__default = /* @__PURE__ */ _interopDefaultLegacy(merge);
    var qs__default = /* @__PURE__ */ _interopDefaultLegacy(qs$1);
    var WebSocket__default = /* @__PURE__ */ _interopDefaultLegacy(WebSocket);
    var http__default = /* @__PURE__ */ _interopDefaultLegacy(http);
    var https__default = /* @__PURE__ */ _interopDefaultLegacy(https);
    function __rest(s, e) {
      var t = {};
      for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
      if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
          if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
            t[p[i]] = s[p[i]];
        }
      return t;
    }
    __name(__rest, "__rest");
    function __awaiter(thisArg, _arguments, P, generator) {
      function adopt(value) {
        return value instanceof P ? value : new P(function(resolve) {
          resolve(value);
        });
      }
      __name(adopt, "adopt");
      return new (P || (P = Promise))(function(resolve, reject) {
        function fulfilled(value) {
          try {
            step(generator.next(value));
          } catch (e) {
            reject(e);
          }
        }
        __name(fulfilled, "fulfilled");
        function rejected(value) {
          try {
            step(generator["throw"](value));
          } catch (e) {
            reject(e);
          }
        }
        __name(rejected, "rejected");
        function step(result) {
          result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
        }
        __name(step, "step");
        step((generator = generator.apply(thisArg, _arguments || [])).next());
      });
    }
    __name(__awaiter, "__awaiter");
    function __values(o) {
      var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
      if (m) return m.call(o);
      if (o && typeof o.length === "number") return {
        next: /* @__PURE__ */ __name(function() {
          if (o && i >= o.length) o = void 0;
          return { value: o && o[i++], done: !o };
        }, "next")
      };
      throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
    }
    __name(__values, "__values");
    function __await(v) {
      return this instanceof __await ? (this.v = v, this) : new __await(v);
    }
    __name(__await, "__await");
    function __asyncGenerator(thisArg, _arguments, generator) {
      if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
      var g = generator.apply(thisArg, _arguments || []), i, q = [];
      return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
        return this;
      }, i;
      function verb(n) {
        if (g[n]) i[n] = function(v) {
          return new Promise(function(a, b) {
            q.push([n, v, a, b]) > 1 || resume(n, v);
          });
        };
      }
      __name(verb, "verb");
      function resume(n, v) {
        try {
          step(g[n](v));
        } catch (e) {
          settle(q[0][3], e);
        }
      }
      __name(resume, "resume");
      function step(r) {
        r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
      }
      __name(step, "step");
      function fulfill(value) {
        resume("next", value);
      }
      __name(fulfill, "fulfill");
      function reject(value) {
        resume("throw", value);
      }
      __name(reject, "reject");
      function settle(f, v) {
        if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
      }
      __name(settle, "settle");
    }
    __name(__asyncGenerator, "__asyncGenerator");
    function __asyncValues(o) {
      if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
      var m = o[Symbol.asyncIterator], i;
      return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
        return this;
      }, i);
      function verb(n) {
        i[n] = o[n] && function(v) {
          return new Promise(function(resolve, reject) {
            v = o[n](v), settle(resolve, reject, v.done, v.value);
          });
        };
      }
      __name(verb, "verb");
      function settle(resolve, reject, d, v) {
        Promise.resolve(v).then(function(v2) {
          resolve({ value: v2, done: d });
        }, reject);
      }
      __name(settle, "settle");
    }
    __name(__asyncValues, "__asyncValues");
    var cachedVersion;
    function getSdkVersion() {
      if (cachedVersion !== void 0)
        return cachedVersion;
      const candidates = [
        path__default["default"].resolve(__qwen_dirname, "..", "package.json"),
        path__default["default"].resolve(__qwen_dirname, "..", "..", "package.json")
      ];
      for (const p of candidates) {
        try {
          const pkg = JSON.parse(fs__default["default"].readFileSync(p, "utf-8"));
          if (pkg.name === "@larksuiteoapi/node-sdk" && typeof pkg.version === "string") {
            cachedVersion = pkg.version;
            return pkg.version;
          }
        } catch (_a) {
        }
      }
      cachedVersion = "unknown";
      return "unknown";
    }
    __name(getSdkVersion, "getSdkVersion");
    function sanitizeSource(raw) {
      return raw.replace(/[^a-zA-Z0-9._-]/g, "_").slice(0, 64);
    }
    __name(sanitizeSource, "sanitizeSource");
    function buildUserAgent(source, opts) {
      let ua = `oapi-node-sdk/${getSdkVersion()}`;
      if (source) {
        const clean = sanitizeSource(source);
        if (clean)
          ua += ` source/${clean}`;
      }
      if (opts === null || opts === void 0 ? void 0 : opts.extraTags) {
        for (const t of opts.extraTags) {
          const clean = sanitizeSource(t);
          if (clean)
            ua += ` ${clean}`;
        }
      }
      return ua;
    }
    __name(buildUserAgent, "buildUserAgent");
    var defaultHttpInstance = axios__default["default"].create();
    var FALLBACK_UA = buildUserAgent();
    defaultHttpInstance.interceptors.request.use((req) => {
      if (req.headers && !req.headers["User-Agent"]) {
        req.headers["User-Agent"] = FALLBACK_UA;
      }
      return req;
    }, void 0, { synchronous: true });
    defaultHttpInstance.interceptors.response.use((resp) => {
      if (resp.config["$return_headers"]) {
        return {
          data: resp.data,
          headers: resp.headers
        };
      }
      return resp.data;
    });
    exports.AppType = void 0;
    (function(AppType) {
      AppType[AppType["SelfBuild"] = 0] = "SelfBuild";
      AppType[AppType["ISV"] = 1] = "ISV";
    })(exports.AppType || (exports.AppType = {}));
    exports.Domain = void 0;
    (function(Domain) {
      Domain[Domain["Feishu"] = 0] = "Feishu";
      Domain[Domain["Lark"] = 1] = "Lark";
    })(exports.Domain || (exports.Domain = {}));
    exports.LoggerLevel = void 0;
    (function(LoggerLevel2) {
      LoggerLevel2[LoggerLevel2["fatal"] = 0] = "fatal";
      LoggerLevel2[LoggerLevel2["error"] = 1] = "error";
      LoggerLevel2[LoggerLevel2["warn"] = 2] = "warn";
      LoggerLevel2[LoggerLevel2["info"] = 3] = "info";
      LoggerLevel2[LoggerLevel2["debug"] = 4] = "debug";
      LoggerLevel2[LoggerLevel2["trace"] = 5] = "trace";
    })(exports.LoggerLevel || (exports.LoggerLevel = {}));
    var CEventType = Symbol("event-type");
    var CTenantKey = Symbol("tenant-key");
    var CAppTicket = Symbol("app-ticket");
    var CTenantAccessToken = Symbol("tenant-access-token");
    var CWithHelpdeskAuthorization = Symbol("with-helpdesk-authorization");
    var CWithUserAccessToken = Symbol("with-user-access-token");
    var CUserAccessToken = Symbol("user-access-token");
    var CAilySessionRecord = Symbol("aily-session-record");
    var string2Base64 = /* @__PURE__ */ __name((content) => Buffer.from(content).toString("base64"), "string2Base64");
    var DefaultCache = class {
      static {
        __name(this, "DefaultCache");
      }
      constructor() {
        this.values = /* @__PURE__ */ new Map();
      }
      // When there is a namespace, splice the namespace and key to form a new key
      getCacheKey(key, namespace) {
        if (namespace) {
          return `${namespace}/${key.toString()}`;
        }
        return key;
      }
      get(key, options) {
        return __awaiter(this, void 0, void 0, function* () {
          const cacheKey = this.getCacheKey(key, options === null || options === void 0 ? void 0 : options.namespace);
          const data = this.values.get(cacheKey);
          if (data) {
            const { value, expiredTime } = data;
            if (!expiredTime || expiredTime - (/* @__PURE__ */ new Date()).getTime() > 0) {
              return value;
            }
          }
          return void 0;
        });
      }
      set(key, value, expiredTime, options) {
        return __awaiter(this, void 0, void 0, function* () {
          const cacheKey = this.getCacheKey(key, options === null || options === void 0 ? void 0 : options.namespace);
          this.values.set(cacheKey, {
            value,
            expiredTime
          });
          return true;
        });
      }
    };
    var internalCache = new DefaultCache();
    var AESCipher = class {
      static {
        __name(this, "AESCipher");
      }
      constructor(key) {
        const hash = crypto__default["default"].createHash("sha256");
        hash.update(key);
        this.key = hash.digest();
      }
      decrypt(encrypt) {
        const encryptBuffer = Buffer.from(encrypt, "base64");
        const decipher = crypto__default["default"].createDecipheriv("aes-256-cbc", this.key, encryptBuffer.slice(0, 16));
        let decrypted = decipher.update(encryptBuffer.slice(16).toString("hex"), "hex", "utf8");
        decrypted += decipher.final("utf8");
        return decrypted;
      }
    };
    var formatDomain = /* @__PURE__ */ __name((domain) => {
      switch (domain) {
        case exports.Domain.Feishu:
          return "https://open.feishu.cn";
        case exports.Domain.Lark:
          return "https://open.larksuite.com";
        default:
          return domain;
      }
    }, "formatDomain");
    var fillApiPath = /* @__PURE__ */ __name((apiPath, pathSupplement = {}) => apiPath.replace(/:([^/]+)/g, (_, $1) => {
      if (pathSupplement[$1] !== void 0) {
        return pathSupplement[$1];
      }
      throw new Error(`request miss ${$1} path argument`);
    }), "fillApiPath");
    var assert = /* @__PURE__ */ __name((predication, callback) => __awaiter(void 0, void 0, void 0, function* () {
      const isInvoke = typeof predication === "function" ? predication() : predication;
      if (isInvoke) {
        yield callback();
      }
    }), "assert");
    var formatUrl = /* @__PURE__ */ __name((url) => url ? url.replace(/^\//, "") : "", "formatUrl");
    var pick = /* @__PURE__ */ __name((obj, keys = []) => {
      const result = {};
      if (!obj) {
        return result;
      }
      keys.forEach((key) => {
        if (Object.prototype.hasOwnProperty.call(obj, key)) {
          result[key] = obj[key];
        }
      });
      return result;
    }, "pick");
    var formatErrors = /* @__PURE__ */ __name((e) => {
      var _a;
      if (e instanceof axios.AxiosError) {
        const { message, response, request, config } = pick(e, [
          "message",
          "response",
          "request",
          "config"
        ]);
        const filteredErrorInfo = {
          message,
          config: pick(config, ["data", "url", "params", "method"]),
          request: pick(request, ["protocol", "host", "path", "method"]),
          response: pick(response, ["data", "status", "statusText"])
        };
        const errors = [filteredErrorInfo];
        const specificError = (_a = e === null || e === void 0 ? void 0 : e.response) === null || _a === void 0 ? void 0 : _a.data;
        if (specificError) {
          errors.push(Object.assign(Object.assign({}, specificError), specificError.error ? specificError.error : {}));
        }
        return errors;
      }
      return [e];
    }, "formatErrors");
    var Client$16 = class {
      static {
        __name(this, "Client$16");
      }
      constructor() {
        this.acs = {
          /**
           * access_record.access_photo
           */
          accessRecordAccessPhoto: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=acs&resource=access_record.access_photo&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/access_record-access_photo/get document }
             *
             * 下载开门时的人脸识别图片
             *
             * 用户在门禁考勤机上成功开门或打卡后，智能门禁应用都会生成一条门禁记录，对于使用人脸识别方式进行开门的识别记录，还会有抓拍图。;;可以用该接口下载开门时的人脸识别照片。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/acs/v1/access_records/:access_record_id/access_photo`, path2),
                method: "GET",
                headers,
                data,
                params,
                responseType: "stream",
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                $return_headers: true
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              const checkIsReadable = /* @__PURE__ */ __name(() => {
                const consumedError = "The stream has already been consumed";
                if (!res.data.readable) {
                  this.logger.error(consumedError);
                  throw new Error(consumedError);
                }
              }, "checkIsReadable");
              return {
                writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                  checkIsReadable();
                  return new Promise((resolve, reject) => {
                    const writableStream = fs__default["default"].createWriteStream(filePath);
                    writableStream.on("finish", () => {
                      resolve(filePath);
                    });
                    writableStream.on("error", (e) => {
                      reject(e);
                    });
                    res.data.pipe(writableStream);
                  });
                }), "writeFile"),
                getReadableStream: /* @__PURE__ */ __name(() => {
                  checkIsReadable();
                  return res.data;
                }, "getReadableStream"),
                headers: res.headers
              };
            }), "get")
          },
          /**
           * 门禁记录
           */
          accessRecord: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/acs/v1/access_records`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=acs&resource=access_record&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/access_record/list document }
             *
             * 获取门禁记录列表
             *
             * 用户在门禁考勤机上成功开门或打卡后，智能门禁应用都会生成一条门禁记录。;;该接口返回满足查询参数的识别记录。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/acs/v1/access_records`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 门禁设备
           */
          device: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=acs&resource=device&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/device/list document }
             *
             * 获取门禁设备列表
             *
             * 使用该接口获取租户内所有门禁设备。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/acs/v1/devices`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * rule_external
           */
          ruleExternal: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=acs&resource=rule_external&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=acs&resource=rule_external&version=v1 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/acs/v1/rule_external`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=acs&resource=rule_external&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=acs&resource=rule_external&version=v1 document }
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/acs/v1/rule_external`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=acs&resource=rule_external&apiName=device_bind&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=device_bind&project=acs&resource=rule_external&version=v1 document }
             */
            deviceBind: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/acs/v1/rule_external/device_bind`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "deviceBind"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=acs&resource=rule_external&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=acs&resource=rule_external&version=v1 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/acs/v1/rule_external`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          /**
           * user.face
           */
          userFace: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=acs&resource=user.face&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/user-face/get document }
             *
             * 下载人脸图片
             *
             * 对于已经录入人脸图片的用户，可以使用该接口下载用户人脸图片。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/acs/v1/users/:user_id/face`, path2),
                method: "GET",
                headers,
                data,
                params,
                responseType: "stream",
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                $return_headers: true
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              const checkIsReadable = /* @__PURE__ */ __name(() => {
                const consumedError = "The stream has already been consumed";
                if (!res.data.readable) {
                  this.logger.error(consumedError);
                  throw new Error(consumedError);
                }
              }, "checkIsReadable");
              return {
                writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                  checkIsReadable();
                  return new Promise((resolve, reject) => {
                    const writableStream = fs__default["default"].createWriteStream(filePath);
                    writableStream.on("finish", () => {
                      resolve(filePath);
                    });
                    writableStream.on("error", (e) => {
                      reject(e);
                    });
                    res.data.pipe(writableStream);
                  });
                }), "writeFile"),
                getReadableStream: /* @__PURE__ */ __name(() => {
                  checkIsReadable();
                  return res.data;
                }, "getReadableStream"),
                headers: res.headers
              };
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=acs&resource=user.face&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/user-face/update document }
             *
             * 上传人脸图片
             *
             * 用户需要录入人脸图片才可以使用门禁考勤机。使用该 API 上传门禁用户的人脸图片。
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/acs/v1/users/:user_id/face`, path2),
                method: "PUT",
                data,
                params,
                headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              return (res === null || res === void 0 ? void 0 : res.data) || null;
            }), "update")
          },
          /**
           * 用户管理
           */
          user: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=acs&resource=user&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/user/get document }
             *
             * 获取单个用户信息
             *
             * 该接口用于获取智能门禁中单个用户的信息。
             *
             * 只能获取已加入智能门禁权限组的用户
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/acs/v1/users/:user_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/acs/v1/users`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=acs&resource=user&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/user/list document }
             *
             * 获取用户列表
             *
             * 使用该接口获取智能门禁中所有用户信息。
             *
             * 只能获取已加入智能门禁权限组的用户。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/acs/v1/users`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=acs&resource=user&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/user/patch document }
             *
             * 修改用户部分信息
             *
             * 飞书智能门禁在人脸识别成功后会有韦根信号输出，输出用户的卡号。;对于使用韦根协议的门禁系统，企业可使用该接口录入用户卡号。
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/acs/v1/users/:user_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * visitor
           */
          visitor: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=acs&resource=visitor&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=acs&resource=visitor&version=v1 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/acs/v1/visitors`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=acs&resource=visitor&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=acs&resource=visitor&version=v1 document }
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/acs/v1/visitors/:visitor_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete")
          },
          v1: {
            /**
             * access_record.access_photo
             */
            accessRecordAccessPhoto: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=acs&resource=access_record.access_photo&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/access_record-access_photo/get document }
               *
               * 下载开门时的人脸识别图片
               *
               * 用户在门禁考勤机上成功开门或打卡后，智能门禁应用都会生成一条门禁记录，对于使用人脸识别方式进行开门的识别记录，还会有抓拍图。;;可以用该接口下载开门时的人脸识别照片。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/acs/v1/access_records/:access_record_id/access_photo`, path2),
                  method: "GET",
                  headers,
                  data,
                  params,
                  responseType: "stream",
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                  $return_headers: true
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                const checkIsReadable = /* @__PURE__ */ __name(() => {
                  const consumedError = "The stream has already been consumed";
                  if (!res.data.readable) {
                    this.logger.error(consumedError);
                    throw new Error(consumedError);
                  }
                }, "checkIsReadable");
                return {
                  writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                    checkIsReadable();
                    return new Promise((resolve, reject) => {
                      const writableStream = fs__default["default"].createWriteStream(filePath);
                      writableStream.on("finish", () => {
                        resolve(filePath);
                      });
                      writableStream.on("error", (e) => {
                        reject(e);
                      });
                      res.data.pipe(writableStream);
                    });
                  }), "writeFile"),
                  getReadableStream: /* @__PURE__ */ __name(() => {
                    checkIsReadable();
                    return res.data;
                  }, "getReadableStream"),
                  headers: res.headers
                };
              }), "get")
            },
            /**
             * 门禁记录
             */
            accessRecord: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/acs/v1/access_records`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=acs&resource=access_record&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/access_record/list document }
               *
               * 获取门禁记录列表
               *
               * 用户在门禁考勤机上成功开门或打卡后，智能门禁应用都会生成一条门禁记录。;;该接口返回满足查询参数的识别记录。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/acs/v1/access_records`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 门禁设备
             */
            device: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=acs&resource=device&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/device/list document }
               *
               * 获取门禁设备列表
               *
               * 使用该接口获取租户内所有门禁设备。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/acs/v1/devices`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * rule_external
             */
            ruleExternal: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=acs&resource=rule_external&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=acs&resource=rule_external&version=v1 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/acs/v1/rule_external`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=acs&resource=rule_external&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=acs&resource=rule_external&version=v1 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/acs/v1/rule_external`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=acs&resource=rule_external&apiName=device_bind&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=device_bind&project=acs&resource=rule_external&version=v1 document }
               */
              deviceBind: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/acs/v1/rule_external/device_bind`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "deviceBind"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=acs&resource=rule_external&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=acs&resource=rule_external&version=v1 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/acs/v1/rule_external`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * user.face
             */
            userFace: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=acs&resource=user.face&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/user-face/get document }
               *
               * 下载人脸图片
               *
               * 对于已经录入人脸图片的用户，可以使用该接口下载用户人脸图片。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/acs/v1/users/:user_id/face`, path2),
                  method: "GET",
                  headers,
                  data,
                  params,
                  responseType: "stream",
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                  $return_headers: true
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                const checkIsReadable = /* @__PURE__ */ __name(() => {
                  const consumedError = "The stream has already been consumed";
                  if (!res.data.readable) {
                    this.logger.error(consumedError);
                    throw new Error(consumedError);
                  }
                }, "checkIsReadable");
                return {
                  writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                    checkIsReadable();
                    return new Promise((resolve, reject) => {
                      const writableStream = fs__default["default"].createWriteStream(filePath);
                      writableStream.on("finish", () => {
                        resolve(filePath);
                      });
                      writableStream.on("error", (e) => {
                        reject(e);
                      });
                      res.data.pipe(writableStream);
                    });
                  }), "writeFile"),
                  getReadableStream: /* @__PURE__ */ __name(() => {
                    checkIsReadable();
                    return res.data;
                  }, "getReadableStream"),
                  headers: res.headers
                };
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=acs&resource=user.face&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/user-face/update document }
               *
               * 上传人脸图片
               *
               * 用户需要录入人脸图片才可以使用门禁考勤机。使用该 API 上传门禁用户的人脸图片。
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/acs/v1/users/:user_id/face`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "update")
            },
            /**
             * 用户管理
             */
            user: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=acs&resource=user&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/user/get document }
               *
               * 获取单个用户信息
               *
               * 该接口用于获取智能门禁中单个用户的信息。
               *
               * 只能获取已加入智能门禁权限组的用户
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/acs/v1/users/:user_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/acs/v1/users`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=acs&resource=user&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/user/list document }
               *
               * 获取用户列表
               *
               * 使用该接口获取智能门禁中所有用户信息。
               *
               * 只能获取已加入智能门禁权限组的用户。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/acs/v1/users`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=acs&resource=user&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/user/patch document }
               *
               * 修改用户部分信息
               *
               * 飞书智能门禁在人脸识别成功后会有韦根信号输出，输出用户的卡号。;对于使用韦根协议的门禁系统，企业可使用该接口录入用户卡号。
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/acs/v1/users/:user_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * visitor
             */
            visitor: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=acs&resource=visitor&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=acs&resource=visitor&version=v1 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/acs/v1/visitors`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=acs&resource=visitor&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=acs&resource=visitor&version=v1 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/acs/v1/visitors/:visitor_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete")
            }
          }
        };
      }
    };
    var Client$15 = class extends Client$16 {
      static {
        __name(this, "Client$15");
      }
      constructor() {
        super(...arguments);
        this.admin = {
          /**
           * 部门维度的数据报表
           */
          adminDeptStat: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=admin&resource=admin_dept_stat&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/admin_dept_stat/list document }
             *
             * 获取部门维度的用户活跃和功能使用数据
             *
             * 该接口用于获取部门维度的用户活跃和功能使用数据，即IM（即时通讯）、日历、云文档、音视频会议功能的使用数据。
             *
             * - 只有企业自建应用才有权限调用此接口;;- 当天的数据会在第二天的早上九点半产出（UTC+8）
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/admin/v1/admin_dept_stats`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 用户维度的数据报表
           */
          adminUserStat: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=admin&resource=admin_user_stat&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/admin_user_stat/list document }
             *
             * 获取用户维度的用户活跃和功能使用数据
             *
             * 用于获取用户维度的用户活跃和功能使用数据，即IM（即时通讯）、日历、云文档、音视频会议功能的使用数据。
             *
             * - 只有企业自建应用才有权限调用此接口;;- 当天的数据会在第二天的早上九点半产出（UTC+8）
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/admin/v1/admin_user_stats`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 行为审计日志（灰度租户可见）
           */
          auditInfo: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/admin/v1/audit_infos`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=admin&resource=audit_info&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uQjM5YjL0ITO24CNykjN/audit_log/audit_data_get document }
             *
             * 用户行为日志搜索
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/admin/v1/audit_infos`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 勋章
           */
          badge: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=admin&resource=badge&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge/create document }
             *
             * 创建勋章
             *
             * 使用该接口可以创建一枚完整的勋章信息，一个租户下最多可创建1000枚勋章。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/admin/v1/badges`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=admin&resource=badge&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge/get document }
             *
             * 获取勋章详情
             *
             * 可以通过该接口查询勋章的详情
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/admin/v1/badges/:badge_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/admin/v1/badges`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=admin&resource=badge&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge/list document }
             *
             * 获取勋章列表
             *
             * 可以通过该接口列出租户下所有的勋章，勋章的排列顺序是按照创建时间倒序排列。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/admin/v1/badges`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=admin&resource=badge&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge/update document }
             *
             * 修改勋章信息
             *
             * 通过该接口可以修改勋章的信息
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/admin/v1/badges/:badge_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 勋章授予名单
           */
          badgeGrant: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=admin&resource=badge.grant&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge-grant/create document }
             *
             * 创建勋章的授予名单
             *
             * 通过该接口可以为特定勋章创建一份授予名单，一枚勋章下最多可创建1000份授予名单。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=admin&resource=badge.grant&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge-grant/delete document }
             *
             * 删除授予名单
             *
             * 通过该接口可以删除特定授予名单的信息
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=admin&resource=badge.grant&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge-grant/get document }
             *
             * 获取授予名单的信息
             *
             * 通过该接口可以获取特定授予名单的信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=admin&resource=badge.grant&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge-grant/list document }
             *
             * 获取勋章的授予名单列表
             *
             * 通过该接口可以获取特定勋章下的授予名单列表，授予名单的排列顺序按照创建时间倒序排列。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=admin&resource=badge.grant&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge-grant/update document }
             *
             * 修改授予名单
             *
             * 通过该接口可以修改特定授予名单的相关信息
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 勋章图片
           */
          badgeImage: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=admin&resource=badge_image&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge_image/create document }
             *
             * 上传勋章图片
             *
             * 通过该接口可以上传勋章详情图、挂饰图的文件，获取对应的文件key
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/admin/v1/badge_images`, path2),
                method: "POST",
                data,
                params,
                headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              return (res === null || res === void 0 ? void 0 : res.data) || null;
            }), "create")
          },
          /**
           * 登录密码管理
           */
          password: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=admin&resource=password&apiName=reset&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/password/reset document }
             *
             * 重置密码
             *
             * 重置用户的企业邮箱密码，仅当用户的邮箱和企业邮箱(别名)一致时生效，可用于处理飞书企业邮箱登录死锁的问题。;;邮箱死锁：当用户的登录凭证与飞书企业邮箱一致时，目前飞书登录流程要求用户输入验证码，由于飞书邮箱无单独的帐号体系，则未登录时无法收取邮箱验证码，即陷入死锁
             */
            reset: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/admin/v1/password/reset`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "reset")
          },
          v1: {
            /**
             * 部门维度的数据报表
             */
            adminDeptStat: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=admin&resource=admin_dept_stat&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/admin_dept_stat/list document }
               *
               * 获取部门维度的用户活跃和功能使用数据
               *
               * 该接口用于获取部门维度的用户活跃和功能使用数据，即IM（即时通讯）、日历、云文档、音视频会议功能的使用数据。
               *
               * - 只有企业自建应用才有权限调用此接口;;- 当天的数据会在第二天的早上九点半产出（UTC+8）
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/admin/v1/admin_dept_stats`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 用户维度的数据报表
             */
            adminUserStat: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=admin&resource=admin_user_stat&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/admin_user_stat/list document }
               *
               * 获取用户维度的用户活跃和功能使用数据
               *
               * 用于获取用户维度的用户活跃和功能使用数据，即IM（即时通讯）、日历、云文档、音视频会议功能的使用数据。
               *
               * - 只有企业自建应用才有权限调用此接口;;- 当天的数据会在第二天的早上九点半产出（UTC+8）
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/admin/v1/admin_user_stats`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 行为审计日志（灰度租户可见）
             */
            auditInfo: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/admin/v1/audit_infos`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=admin&resource=audit_info&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uQjM5YjL0ITO24CNykjN/audit_log/audit_data_get document }
               *
               * 用户行为日志搜索
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/admin/v1/audit_infos`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 勋章
             */
            badge: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=admin&resource=badge&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge/create document }
               *
               * 创建勋章
               *
               * 使用该接口可以创建一枚完整的勋章信息，一个租户下最多可创建1000枚勋章。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/admin/v1/badges`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=admin&resource=badge&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge/get document }
               *
               * 获取勋章详情
               *
               * 可以通过该接口查询勋章的详情
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/admin/v1/badges/:badge_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/admin/v1/badges`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=admin&resource=badge&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge/list document }
               *
               * 获取勋章列表
               *
               * 可以通过该接口列出租户下所有的勋章，勋章的排列顺序是按照创建时间倒序排列。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/admin/v1/badges`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=admin&resource=badge&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge/update document }
               *
               * 修改勋章信息
               *
               * 通过该接口可以修改勋章的信息
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/admin/v1/badges/:badge_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 勋章授予名单
             */
            badgeGrant: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=admin&resource=badge.grant&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge-grant/create document }
               *
               * 创建勋章的授予名单
               *
               * 通过该接口可以为特定勋章创建一份授予名单，一枚勋章下最多可创建1000份授予名单。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=admin&resource=badge.grant&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge-grant/delete document }
               *
               * 删除授予名单
               *
               * 通过该接口可以删除特定授予名单的信息
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=admin&resource=badge.grant&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge-grant/get document }
               *
               * 获取授予名单的信息
               *
               * 通过该接口可以获取特定授予名单的信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=admin&resource=badge.grant&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge-grant/list document }
               *
               * 获取勋章的授予名单列表
               *
               * 通过该接口可以获取特定勋章下的授予名单列表，授予名单的排列顺序按照创建时间倒序排列。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=admin&resource=badge.grant&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge-grant/update document }
               *
               * 修改授予名单
               *
               * 通过该接口可以修改特定授予名单的相关信息
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/admin/v1/badges/:badge_id/grants/:grant_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 勋章图片
             */
            badgeImage: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=admin&resource=badge_image&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge_image/create document }
               *
               * 上传勋章图片
               *
               * 通过该接口可以上传勋章详情图、挂饰图的文件，获取对应的文件key
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/admin/v1/badge_images`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "create")
            },
            /**
             * 登录密码管理
             */
            password: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=admin&resource=password&apiName=reset&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/password/reset document }
               *
               * 重置密码
               *
               * 重置用户的企业邮箱密码，仅当用户的邮箱和企业邮箱(别名)一致时生效，可用于处理飞书企业邮箱登录死锁的问题。;;邮箱死锁：当用户的登录凭证与飞书企业邮箱一致时，目前飞书登录流程要求用户输入验证码，由于飞书邮箱无单独的帐号体系，则未登录时无法收取邮箱验证码，即陷入死锁
               */
              reset: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/admin/v1/password/reset`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "reset")
            }
          }
        };
      }
    };
    var Client$14 = class extends Client$15 {
      static {
        __name(this, "Client$14");
      }
      constructor() {
        super(...arguments);
        this.aily = {
          v1: {
            /**
             * aily_session.aily_message
             */
            ailySessionAilyMessage: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=aily&resource=aily_session.aily_message&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=aily&resource=aily_session.aily_message&version=v1 document }
               *
               * 该 API 用于向某个飞书智能伙伴应用发送一条消息（Message）。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=aily&resource=aily_session.aily_message&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=aily&resource=aily_session.aily_message&version=v1 document }
               *
               * 该 API 用于获取某个飞书智能伙伴应用的消息（Message）的详细信息；包括消息的内容、发送人等。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages/:aily_message_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=aily&resource=aily_session.aily_message&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=aily&resource=aily_session.aily_message&version=v1 document }
               *
               * 该 API 用于批量获取飞书智能伙伴应用的消息（Message）的详细信息
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/messages`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * aily_session
             */
            ailySession: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=aily&resource=aily_session&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=aily&resource=aily_session&version=v1 document }
               *
               * 该 API 用于创建与某个飞书智能伙伴应用的一次会话（Session）。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/aily/v1/sessions`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=aily&resource=aily_session&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=aily&resource=aily_session&version=v1 document }
               *
               * 该 API 用于销毁与某个飞书智能伙伴应用的一次会话（Session），当会话销毁后、无法继续在会话中创建 / 拉取消息。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=aily&resource=aily_session&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=aily&resource=aily_session&version=v1 document }
               *
               * 该 API 用于获取与某个飞书智能伙伴应用的一次会话（Session）的详细信息，包括会话的状态、渠道信息、创建时间等。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=aily&resource=aily_session&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=aily&resource=aily_session&version=v1 document }
               *
               * 该 API 用于更新与某个飞书智能伙伴应用的一次会话（Session）。
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * aily_session.run
             */
            ailySessionRun: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=aily&resource=aily_session.run&apiName=cancel&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=cancel&project=aily&resource=aily_session.run&version=v1 document }
               *
               * 该 API 用于取消指定的运行（Run）。
               */
              cancel: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs/:run_id/cancel`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "cancel"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=aily&resource=aily_session.run&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=aily&resource=aily_session.run&version=v1 document }
               *
               * 该 API 用于启动一次运行（Run）。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=aily&resource=aily_session.run&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=aily&resource=aily_session.run&version=v1 document }
               *
               * 该 API 用于获取运行（Run）的详细信息。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs/:run_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=aily&resource=aily_session.run&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=aily&resource=aily_session.run&version=v1 document }
               *
               * 该 API 用于批量获取运行（Run）的详细信息。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/aily/v1/sessions/:aily_session_id/runs`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * app.data_asset
             */
            appDataAsset: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.data_asset&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=aily&resource=app.data_asset&version=v1 document }
               *
               * 创建数据知识
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.data_asset&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=aily&resource=app.data_asset&version=v1 document }
               *
               * 删除数据知识
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets/:data_asset_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.data_asset&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=aily&resource=app.data_asset&version=v1 document }
               *
               * 获取数据知识
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets/:data_asset_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.data_asset&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=aily&resource=app.data_asset&version=v1 document }
               *
               * 获取数据与知识列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.data_asset&apiName=upload_file&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=upload_file&project=aily&resource=app.data_asset&version=v1 document }
               *
               * 上传数据知识文件
               */
              uploadFile: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets/upload_file`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "uploadFile")
            },
            /**
             * app.data_asset_tag
             */
            appDataAssetTag: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_asset_tags`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.data_asset_tag&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=aily&resource=app.data_asset_tag&version=v1 document }
               *
               * 获取数据与知识分类列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_asset_tags`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * app.knowledge
             */
            appKnowledge: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.knowledge&apiName=ask&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=ask&project=aily&resource=app.knowledge&version=v1 document }
               *
               * 执行一次数据知识问答
               */
              ask: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/knowledges/ask`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "ask")
            },
            /**
             * app.skill
             */
            appSkill: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.skill&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=aily&resource=app.skill&version=v1 document }
               *
               * 该 API 用于获取某个飞书智能伙伴应用的技能（Skill）的详细信息。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills/:skill_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.skill&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=aily&resource=app.skill&version=v1 document }
               *
               * 该 API 用于批量获取飞书智能伙伴应用的技能（Skill）的详细信息
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.skill&apiName=start&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=start&project=aily&resource=app.skill&version=v1 document }
               *
               * 该 API 用于执行飞书智能伙伴应用的技能（Skill）获取输出
               */
              start: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills/:skill_id/start`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "start")
            }
          }
        };
      }
    };
    var Client$13 = class extends Client$14 {
      static {
        __name(this, "Client$13");
      }
      constructor() {
        super(...arguments);
        this.apaas = {
          v1: {
            /**
             * app
             */
            app: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/apaas/v1/apps`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=app&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=apaas&resource=app&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/apps`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * application.audit_log
             */
            applicationAuditLog: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=application.audit_log&apiName=audit_log_list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=audit_log_list&project=apaas&resource=application.audit_log&version=v1 document }
               *
               * 获取审计日志列表
               */
              auditLogList: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log/audit_log_list`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "auditLogList"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=application.audit_log&apiName=data_change_log_detail&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=data_change_log_detail&project=apaas&resource=application.audit_log&version=v1 document }
               *
               * 获取数据变更日志详情
               */
              dataChangeLogDetail: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log/data_change_log_detail`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "dataChangeLogDetail"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=application.audit_log&apiName=data_change_logs_list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=data_change_logs_list&project=apaas&resource=application.audit_log&version=v1 document }
               *
               * 获取数据变更日志列表
               */
              dataChangeLogsList: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log/data_change_logs_list`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "dataChangeLogsList"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=application.audit_log&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=apaas&resource=application.audit_log&version=v1 document }
               *
               * 获取审计日志详情
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/applications/:namespace/audit_log`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * application.environment_variable
             */
            applicationEnvironmentVariable: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=application.environment_variable&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=apaas&resource=application.environment_variable&version=v1 document }
               *
               * 查询环境变量详情
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/applications/:namespace/environment_variables/:environment_variable_api_name`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=application.environment_variable&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=apaas&resource=application.environment_variable&version=v1 document }
               *
               * 查询环境变量列表
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/applications/:namespace/environment_variables/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * application.flow
             */
            applicationFlow: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=application.flow&apiName=execute&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=execute&project=apaas&resource=application.flow&version=v1 document }
               *
               * 流程执行接口
               */
              execute: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/applications/:namespace/flows/:flow_id/execute`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "execute")
            },
            /**
             * application.function
             */
            applicationFunction: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=application.function&apiName=invoke&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=invoke&project=apaas&resource=application.function&version=v1 document }
               *
               * 执行函数
               */
              invoke: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/applications/:namespace/functions/:function_api_name/invoke`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "invoke")
            },
            /**
             * application.object
             */
            applicationObject: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=application.object&apiName=oql_query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=oql_query&project=apaas&resource=application.object&version=v1 document }
               *
               * 执行 OQL
               */
              oqlQuery: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/oql_query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "oqlQuery"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=application.object&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=apaas&resource=application.object&version=v1 document }
               *
               * 搜索记录
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * application.object.record
             */
            applicationObjectRecord: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=application.object.record&apiName=batch_create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=apaas&resource=application.object.record&version=v1 document }
               *
               * 记录批量创建
               */
              batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_create`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchCreate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=application.object.record&apiName=batch_delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=apaas&resource=application.object.record&version=v1 document }
               *
               * 记录批量删除
               */
              batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_delete`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchDelete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=application.object.record&apiName=batch_query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_query&project=apaas&resource=application.object.record&version=v1 document }
               *
               * 批量查询对象记录
               */
              batchQuery: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchQuery"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=application.object.record&apiName=batch_update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_update&project=apaas&resource=application.object.record&version=v1 document }
               *
               * 记录批量更新
               */
              batchUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_update`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchUpdate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=application.object.record&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=apaas&resource=application.object.record&version=v1 document }
               *
               * 创建记录
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=application.object.record&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=apaas&resource=application.object.record&version=v1 document }
               *
               * 删除记录
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=application.object.record&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=apaas&resource=application.object.record&version=v1 document }
               *
               * 更新记录
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=application.object.record&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=apaas&resource=application.object.record&version=v1 document }
               *
               * 获取记录
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * application.record_permission.member
             */
            applicationRecordPermissionMember: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=application.record_permission.member&apiName=batch_create_authorization&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create_authorization&project=apaas&resource=application.record_permission.member&version=v1 document }
               */
              batchCreateAuthorization: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/applications/:namespace/record_permissions/:record_permission_api_name/member/batch_create_authorization`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchCreateAuthorization"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=application.record_permission.member&apiName=batch_remove_authorization&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_remove_authorization&project=apaas&resource=application.record_permission.member&version=v1 document }
               */
              batchRemoveAuthorization: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/applications/:namespace/record_permissions/:record_permission_api_name/member/batch_remove_authorization`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchRemoveAuthorization")
            },
            /**
             * application.role.member
             */
            applicationRoleMember: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=application.role.member&apiName=batch_create_authorization&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create_authorization&project=apaas&resource=application.role.member&version=v1 document }
               *
               * 批量添加角色成员用户和部门
               */
              batchCreateAuthorization: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member/batch_create_authorization`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchCreateAuthorization"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=application.role.member&apiName=batch_remove_authorization&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_remove_authorization&project=apaas&resource=application.role.member&version=v1 document }
               *
               * 批量删除角色成员用户和部门
               */
              batchRemoveAuthorization: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member/batch_remove_authorization`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchRemoveAuthorization"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=application.role.member&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=apaas&resource=application.role.member&version=v1 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * approval_instance
             */
            approvalInstance: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=approval_instance&apiName=cancel&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=cancel&project=apaas&resource=approval_instance&version=v1 document }
               */
              cancel: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/approval_instances/:approval_instance_id/cancel`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "cancel")
            },
            /**
             * approval_task
             */
            approvalTask: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=approval_task&apiName=add_assignee&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=add_assignee&project=apaas&resource=approval_task&version=v1 document }
               */
              addAssignee: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/add_assignee`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "addAssignee"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=approval_task&apiName=agree&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=agree&project=apaas&resource=approval_task&version=v1 document }
               */
              agree: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/agree`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "agree"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=approval_task&apiName=reject&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=reject&project=apaas&resource=approval_task&version=v1 document }
               */
              reject: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/reject`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "reject"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=approval_task&apiName=transfer&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=transfer&project=apaas&resource=approval_task&version=v1 document }
               */
              transfer: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/approval_tasks/:approval_task_id/transfer`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "transfer")
            },
            /**
             * seat_activity
             */
            seatActivity: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/apaas/v1/seat_activities`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=seat_activity&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=apaas&resource=seat_activity&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/seat_activities`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * seat_assignment
             */
            seatAssignment: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/apaas/v1/seat_assignments`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=seat_assignment&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=apaas&resource=seat_assignment&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/seat_assignments`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * user_task
             */
            userTask: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=user_task&apiName=cc&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=cc&project=apaas&resource=user_task&version=v1 document }
               */
              cc: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/cc`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "cc"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=user_task&apiName=chat_group&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=chat_group&project=apaas&resource=user_task&version=v1 document }
               */
              chatGroup: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/chat_group`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "chatGroup"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=user_task&apiName=expediting&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=expediting&project=apaas&resource=user_task&version=v1 document }
               */
              expediting: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/expediting`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "expediting"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=user_task&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=apaas&resource=user_task&version=v1 document }
               *
               * 获取任务列表
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/user_task/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=user_task&apiName=rollback&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=rollback&project=apaas&resource=user_task&version=v1 document }
               */
              rollback: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/rollback`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "rollback"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=user_task&apiName=rollback_points&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=rollback_points&project=apaas&resource=user_task&version=v1 document }
               */
              rollbackPoints: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/user_tasks/:task_id/rollback_points`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "rollbackPoints")
            },
            /**
             * workspace.enum
             */
            workspaceEnum: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace.enum&apiName=enum_get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=enum_get&project=apaas&resource=workspace.enum&version=v1 document }
               *
               * 获取自定义枚举详细信息
               */
              enumGet: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/enums/:enum_name`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "enumGet"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace.enum&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=apaas&resource=workspace.enum&version=v1 document }
               *
               * 获取工作空间下的自定义枚举列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/enums`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * workspace
             */
            workspace: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace&apiName=sql_commands&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=sql_commands&project=apaas&resource=workspace&version=v1 document }
               *
               * 执行 SQL
               */
              sqlCommands: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/sql_commands`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "sqlCommands")
            },
            /**
             * workspace.table
             */
            workspaceTable: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace.table&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=apaas&resource=workspace.table&version=v1 document }
               *
               * 获取工作空间下的数据表列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace.table&apiName=records_batch_update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=records_batch_update&project=apaas&resource=workspace.table&version=v1 document }
               *
               * 批量更新数据表中的记录
               */
              recordsBatchUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records_batch_update`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "recordsBatchUpdate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace.table&apiName=records_delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=records_delete&project=apaas&resource=workspace.table&version=v1 document }
               *
               * 删除数据表中的记录
               */
              recordsDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "recordsDelete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace.table&apiName=records_get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=records_get&project=apaas&resource=workspace.table&version=v1 document }
               *
               * 查询数据表数据记录
               */
              recordsGet: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "recordsGet"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace.table&apiName=records_patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=records_patch&project=apaas&resource=workspace.table&version=v1 document }
               *
               * 按条件更新数据表中的记录
               */
              recordsPatch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "recordsPatch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace.table&apiName=records_post&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=records_post&project=apaas&resource=workspace.table&version=v1 document }
               *
               * 向数据表中添加或更新记录
               */
              recordsPost: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "recordsPost"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace.table&apiName=table_get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=table_get&project=apaas&resource=workspace.table&version=v1 document }
               *
               * 获取数据表详细信息
               */
              tableGet: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "tableGet")
            },
            /**
             * workspace.view
             */
            workspaceView: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace.view&apiName=views_get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=views_get&project=apaas&resource=workspace.view&version=v1 document }
               */
              viewsGet: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/views/:view_name/records`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "viewsGet")
            }
          }
        };
      }
    };
    var Client$12 = class extends Client$13 {
      static {
        __name(this, "Client$12");
      }
      constructor() {
        super(...arguments);
        this.application = {
          /**
           * 应用红点
           */
          appBadge: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=app_badge&apiName=set&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/app_badge/set document }
             *
             * 更新应用红点
             *
             * 更新应用红点信息，用于工作台场景
             */
            set: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/app_badge/set`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "set")
          },
          /**
           * 我的常用推荐规则
           */
          appRecommendRule: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/app_recommend_rules`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=app_recommend_rule&apiName=list&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/app_recommend_rule/list document }
             *
             * 获取当前设置的推荐规则列表
             *
             * 获取当前设置的推荐规则列表。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/app_recommend_rules`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 应用使用情况
           */
          applicationAppUsage: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_usage&apiName=department_overview&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_usage/department_overview document }
             *
             * 获取多部门应用使用概览（灰度租户可见）
             *
             * 查看应用在某一天/某一周/某一个月的使用数据，可以根据部门做多层子部门的筛选
             *
             * 1. 仅支持企业版/旗舰版租户使用;2. 一般每天早上10点产出前一天的数据;3. 已经支持的指标包括：应用的活跃用户数、累计用户数、新增用户数、访问页面数、打开次数;4. 按照部门查看数据时，可以分别展示当前部门以及其子部门的使用情况;5. 如果查询的部门在查询日期没有使用过应用，只返回指标：应用的活跃用户数指标;6. 数据从飞书4.10版本开始统计，使用飞书版本4.10及以下版本的用户数据不会被统计到;7. 调用频控为100次/分
             */
            departmentOverview: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/department_overview`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "departmentOverview"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_usage&apiName=message_push_overview&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_usage/message_push_overview document }
             *
             * 获取消息推送概览（灰度租户可见）
             *
             * 目标：查看应用在某一天/某一周/某一个月的机器人消息推送数据，可以根据部门做筛选
             *
             * 1. 仅支持企业版/旗舰版租户使用;2. 一般每天早上10点产出两天前的数据。;3. 已经支持的指标包括：消息推送给用户的次数、消息触达的人数、消息1小时阅读量、消息12小时阅读量;4. 按照部门查看数据时，会展示当前部门以及其子部门的整体使用情况;5. 调用频控为100次/分
             */
            messagePushOverview: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/message_push_overview`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "messagePushOverview"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_usage&apiName=overview&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_usage/overview document }
             *
             * 获取应用使用概览
             *
             * 查看应用在某一天/某一周/某一个月的使用数据，可以查看租户整体对应用的使用情况，也可以分部门查看。
             *
             * 1. 仅支持企业版/旗舰版租户使用;2. 一般每天早上10点产出前一天的数据;3. 已经支持的指标包括：应用的活跃用户数、累计用户数、新增用户数、访问页面数、打开次数;4. 数据从飞书4.10版本开始统计，使用飞书版本4.10及以下版本的用户数据不会被统计到;5. 按照部门查看数据时，会展示当前部门以及其子部门的整体使用情况;6. 调用频控为100次/分
             */
            overview: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/overview`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "overview")
          },
          /**
           * 事件
           */
          applicationAppVersion: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_version&apiName=contacts_range_suggest&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=contacts_range_suggest&project=application&resource=application.app_version&version=v6 document }
             *
             * 获取应用版本通讯录权限范围建议
             */
            contactsRangeSuggest: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id/contacts_range_suggest`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "contactsRangeSuggest"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_version&apiName=get&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/get document }
             *
             * 获取应用版本信息
             *
             * 根据应用 ID 和应用版本 ID 来获取同租户下的应用版本的信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_version&apiName=list&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/list document }
             *
             * 获取应用版本列表
             *
             * 根据 app_id 获取对应应用版本列表。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_version&apiName=patch&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/patch document }
             *
             * 更新应用审核状态
             *
             * 通过接口来更新应用版本的审核结果：通过后应用可以直接上架；拒绝后则开发者可以看到拒绝理由，并在修改后再次申请发布。
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * application.collaborators
           */
          applicationCollaborators: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.collaborators&apiName=get&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=application&resource=application.collaborators&version=v6 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.collaborators&apiName=update&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=application&resource=application.collaborators&version=v6 document }
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * application.contacts_range
           */
          applicationContactsRange: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.contacts_range&apiName=patch&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=application&resource=application.contacts_range&version=v6 document }
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 应用
           */
          application: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=contacts_range_configuration&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=contacts_range_configuration&project=application&resource=application&version=v6 document }
             */
            contactsRangeConfiguration: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range_configuration`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "contactsRangeConfiguration"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=get&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/get document }
             *
             * 获取应用信息
             *
             * 根据app_id获取应用的基础信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/applications`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=list&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/list document }
             *
             * 获取企业安装的应用
             *
             * 该接口用于查询企业安装的应用列表，只能被企业自建应用调用。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/applications`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=patch&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/patch document }
             *
             * 更新应用分组信息
             *
             * 更新应用的分组信息（分组会影响应用在工作台中的分类情况，请谨慎更新）
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch"),
            underauditlistWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/underauditlist`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "underauditlistWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=underauditlist&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/underauditlist document }
             *
             * 查看待审核的应用列表
             *
             * 查看本企业下所有待审核的自建应用列表
             */
            underauditlist: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/underauditlist`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "underauditlist")
          },
          /**
           * 应用反馈
           */
          applicationFeedback: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.feedback&apiName=list&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-feedback/list document }
             *
             * 获取应用反馈列表
             *
             * 查询应用的反馈数据
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.feedback&apiName=patch&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-feedback/patch document }
             *
             * 更新应用反馈
             *
             * 更新应用的反馈数据
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks/:feedback_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * application.management
           */
          applicationManagement: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.management&apiName=update&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=application&resource=application.management&version=v6 document }
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/management`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * application.owner
           */
          applicationOwner: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.owner&apiName=update&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=application&resource=application.owner&version=v6 document }
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/owner`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 事件
           */
          applicationVisibility: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.visibility&apiName=check_white_black_list&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=check_white_black_list&project=application&resource=application.visibility&version=v6 document }
             */
            checkWhiteBlackList: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility/check_white_black_list`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "checkWhiteBlackList"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.visibility&apiName=patch&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=application&resource=application.visibility&version=v6 document }
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * scope
           */
          scope: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=scope&apiName=apply&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=apply&project=application&resource=scope&version=v6 document }
             */
            apply: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/scopes/apply`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "apply"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=application&resource=scope&apiName=list&version=v6 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=application&resource=scope&version=v6 document }
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/application/v6/scopes`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          v6: {
            /**
             * 应用红点
             */
            appBadge: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=app_badge&apiName=set&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/app_badge/set document }
               *
               * 更新应用红点
               *
               * 更新应用红点信息，用于工作台场景
               */
              set: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/app_badge/set`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "set")
            },
            /**
             * 我的常用推荐规则
             */
            appRecommendRule: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/application/v6/app_recommend_rules`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=app_recommend_rule&apiName=list&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/app_recommend_rule/list document }
               *
               * 获取当前设置的推荐规则列表
               *
               * 获取当前设置的推荐规则列表。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/app_recommend_rules`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 应用使用情况
             */
            applicationAppUsage: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_usage&apiName=department_overview&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_usage/department_overview document }
               *
               * 获取多部门应用使用概览（灰度租户可见）
               *
               * 查看应用在某一天/某一周/某一个月的使用数据，可以根据部门做多层子部门的筛选
               *
               * 1. 仅支持企业版/旗舰版租户使用;2. 一般每天早上10点产出前一天的数据;3. 已经支持的指标包括：应用的活跃用户数、累计用户数、新增用户数、访问页面数、打开次数;4. 按照部门查看数据时，可以分别展示当前部门以及其子部门的使用情况;5. 如果查询的部门在查询日期没有使用过应用，只返回指标：应用的活跃用户数指标;6. 数据从飞书4.10版本开始统计，使用飞书版本4.10及以下版本的用户数据不会被统计到;7. 调用频控为100次/分
               */
              departmentOverview: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/department_overview`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "departmentOverview"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_usage&apiName=message_push_overview&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_usage/message_push_overview document }
               *
               * 获取消息推送概览（灰度租户可见）
               *
               * 目标：查看应用在某一天/某一周/某一个月的机器人消息推送数据，可以根据部门做筛选
               *
               * 1. 仅支持企业版/旗舰版租户使用;2. 一般每天早上10点产出两天前的数据。;3. 已经支持的指标包括：消息推送给用户的次数、消息触达的人数、消息1小时阅读量、消息12小时阅读量;4. 按照部门查看数据时，会展示当前部门以及其子部门的整体使用情况;5. 调用频控为100次/分
               */
              messagePushOverview: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/message_push_overview`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "messagePushOverview"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_usage&apiName=overview&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_usage/overview document }
               *
               * 获取应用使用概览
               *
               * 查看应用在某一天/某一周/某一个月的使用数据，可以查看租户整体对应用的使用情况，也可以分部门查看。
               *
               * 1. 仅支持企业版/旗舰版租户使用;2. 一般每天早上10点产出前一天的数据;3. 已经支持的指标包括：应用的活跃用户数、累计用户数、新增用户数、访问页面数、打开次数;4. 数据从飞书4.10版本开始统计，使用飞书版本4.10及以下版本的用户数据不会被统计到;5. 按照部门查看数据时，会展示当前部门以及其子部门的整体使用情况;6. 调用频控为100次/分
               */
              overview: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/app_usage/overview`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "overview")
            },
            /**
             * 事件
             */
            applicationAppVersion: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_version&apiName=contacts_range_suggest&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=contacts_range_suggest&project=application&resource=application.app_version&version=v6 document }
               *
               * 获取应用版本通讯录权限范围建议
               */
              contactsRangeSuggest: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id/contacts_range_suggest`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "contactsRangeSuggest"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_version&apiName=get&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/get document }
               *
               * 获取应用版本信息
               *
               * 根据应用 ID 和应用版本 ID 来获取同租户下的应用版本的信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_version&apiName=list&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/list document }
               *
               * 获取应用版本列表
               *
               * 根据 app_id 获取对应应用版本列表。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_version&apiName=patch&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/patch document }
               *
               * 更新应用审核状态
               *
               * 通过接口来更新应用版本的审核结果：通过后应用可以直接上架；拒绝后则开发者可以看到拒绝理由，并在修改后再次申请发布。
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * application.collaborators
             */
            applicationCollaborators: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.collaborators&apiName=get&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=application&resource=application.collaborators&version=v6 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.collaborators&apiName=update&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=application&resource=application.collaborators&version=v6 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * application.contacts_range
             */
            applicationContactsRange: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.contacts_range&apiName=patch&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=application&resource=application.contacts_range&version=v6 document }
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 应用
             */
            application: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=contacts_range_configuration&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=contacts_range_configuration&project=application&resource=application&version=v6 document }
               */
              contactsRangeConfiguration: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range_configuration`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "contactsRangeConfiguration"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=get&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/get document }
               *
               * 获取应用信息
               *
               * 根据app_id获取应用的基础信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/application/v6/applications`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=list&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/list document }
               *
               * 获取企业安装的应用
               *
               * 该接口用于查询企业安装的应用列表，只能被企业自建应用调用。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/applications`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=patch&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/patch document }
               *
               * 更新应用分组信息
               *
               * 更新应用的分组信息（分组会影响应用在工作台中的分类情况，请谨慎更新）
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              underauditlistWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/underauditlist`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "underauditlistWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=underauditlist&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/underauditlist document }
               *
               * 查看待审核的应用列表
               *
               * 查看本企业下所有待审核的自建应用列表
               */
              underauditlist: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/underauditlist`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "underauditlist")
            },
            /**
             * 应用反馈
             */
            applicationFeedback: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.feedback&apiName=list&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-feedback/list document }
               *
               * 获取应用反馈列表
               *
               * 查询应用的反馈数据
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.feedback&apiName=patch&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-feedback/patch document }
               *
               * 更新应用反馈
               *
               * 更新应用的反馈数据
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks/:feedback_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * application.management
             */
            applicationManagement: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.management&apiName=update&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=application&resource=application.management&version=v6 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/management`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * application.owner
             */
            applicationOwner: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.owner&apiName=update&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=application&resource=application.owner&version=v6 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/owner`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 事件
             */
            applicationVisibility: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.visibility&apiName=check_white_black_list&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=check_white_black_list&project=application&resource=application.visibility&version=v6 document }
               */
              checkWhiteBlackList: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility/check_white_black_list`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "checkWhiteBlackList"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.visibility&apiName=patch&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=application&resource=application.visibility&version=v6 document }
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * scope
             */
            scope: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=scope&apiName=apply&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=apply&project=application&resource=scope&version=v6 document }
               */
              apply: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/scopes/apply`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "apply"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=application&resource=scope&apiName=list&version=v6 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=application&resource=scope&version=v6 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/application/v6/scopes`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            }
          }
        };
      }
    };
    var Client$11 = class extends Client$12 {
      static {
        __name(this, "Client$11");
      }
      constructor() {
        super(...arguments);
        this.approval = {
          /**
           * 原生审批定义
           */
          approval: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=approval&apiName=create&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/approval/create document }
             *
             * 创建审批定义
             *
             * 用于通过接口创建简单的审批定义，可以灵活指定定义的基础信息、表单和流程等。创建成功后，不支持从审批管理后台删除该定义。不推荐企业自建应用使用，如有需要尽量联系管理员在审批管理后台创建定义。
             *
             * 接口谨慎调用，创建后的审批定义无法停用/删除
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/approvals`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=approval&apiName=get&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/approval/get document }
             *
             * 查看审批定义
             *
             * 根据 Approval Code 获取某个审批定义的详情，用于构造创建审批实例的请求。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/approvals/:approval_code`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=approval&apiName=subscribe&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/approval/subscribe document }
             *
             * 订阅审批事件
             *
             * 应用订阅 approval_code 后，该应用就可以收到该审批定义对应实例的事件通知。同一应用只需要订阅一次，无需重复订阅。;;当应用不希望再收到审批事件时，可以使用取消订阅接口进行取消，取消后将不再给应用推送消息。;;订阅和取消订阅都是应用维度的，多个应用可以同时订阅同一个 approval_code，每个应用都能收到审批事件。
             */
            subscribe: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/subscribe`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "subscribe"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=approval&apiName=unsubscribe&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/approval/unsubscribe document }
             *
             * 取消订阅审批事件
             *
             * 取消订阅 approval_code 后，无法再收到该审批定义对应实例的事件通知
             */
            unsubscribe: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/unsubscribe`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "unsubscribe")
          },
          /**
           * district
           */
          district: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/districts`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=district&apiName=list&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=approval&resource=district&version=v4 document }
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/districts`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/districts/search`, path2),
                  method: "POST",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "searchWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=district&apiName=search&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=approval&resource=district&version=v4 document }
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/districts/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search")
          },
          /**
           * 三方审批定义
           */
          externalApproval: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=external_approval&apiName=create&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/external_approval/create document }
             *
             * 三方审批定义创建
             *
             * 审批定义是审批的描述，包括审批名称、图标、描述等基础信息。创建好审批定义，用户就可以在审批应用的发起页中看到审批，如果用户点击发起，则会跳转到配置的发起三方系统地址去发起审批。;;另外，审批定义还配置了审批操作时的回调地址：审批人在待审批列表中进行【同意】【拒绝】操作时，审批中心会调用回调地址通知三方系统。
             *
             * 注意，审批中心不负责审批流程的流转，只负责展示、操作、消息通知。因此审批定义创建时没有审批流程的信息。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/external_approvals`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=external_approval&apiName=get&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=approval&resource=external_approval&version=v4 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/external_approvals/:approval_code`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          /**
           * 三方审批实例
           */
          externalInstance: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=external_instance&apiName=check&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/external_instance/check document }
             *
             * 三方审批实例校验
             *
             * 校验三方审批实例数据，用于判断服务端数据是否为最新的。用户提交实例最新更新时间，如果服务端不存在该实例，或者服务端实例更新时间不是最新的，则返回对应实例 id。;;例如，用户可以每隔5分钟，将最近5分钟产生的实例使用该接口进行对比。
             */
            check: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/external_instances/check`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "check"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=external_instance&apiName=create&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/external_instance/create document }
             *
             * 三方审批实例同步
             *
             * 审批中心不负责审批的流转，审批的流转在三方系统，三方系统在审批流转后生成的审批实例、审批任务、审批抄送数据同步到审批中心。;;用户可以在审批中心中浏览三方系统同步过来的实例、任务、抄送信息，并且可以跳转回三方系统进行更详细的查看和操作，其中实例信息在【已发起】列表，任务信息在【待审批】和【已审批】列表，抄送信息在【抄送我】列表;;:::html;<img src="//sf3-cn.feishucdn.com/obj/open-platform-opendoc/9dff4434afbeb0ef69de7f36b9a6e995_z5iwmTzEgg.png" alt="" style="zoom:17%;" />;;;<img src="//sf3-cn.feishucdn.com/obj/open-platform-opendoc/ca6e0e984a7a6d64e1b16a0bac4bf868_tfqjCiaJQM.png" alt="" style="zoom:17%;" />;;;<img src="//sf3-cn.feishucdn.com/obj/open-platform-opendoc/529377e238df78d391bbd22e962ad195_T7eefLI1GA.png" alt="" style="zoom:17%;" />;:::;;对于审批任务，三方系统也可以配置审批任务的回调接口，这样审批人可以在审批中心中直接进行审批操作，审批中心会回调三方系统，三方系统收到回调后更新任务信息，并将新的任务信息同步回审批中心，形成闭环。;;:::html;<img src="//sf3-cn.feishucdn.com/obj/open-platform-opendoc/721c35428bc1187db3318c572f9979ad_je75QpElcg.png" alt=""  style="zoom:25%;" />;:::;<br>
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/external_instances`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create")
          },
          /**
           * 三方审批任务
           */
          externalTask: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/external_tasks`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=external_task&apiName=list&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/external_task/list document }
             *
             * 获取三方审批任务状态
             *
             * 该接口用于获取三方审批的状态。用户传入查询条件，接口返回满足条件的审批实例的状态。该接口支持多种参数的组合，包括如下组合：;;1.通过 instance_ids 获取指定实例的任务状态;;2.通过 user_ids 获取指定用户的任务状态;;3.通过 status 获取指定状态的所有任务;;4.通过page_token获取下一批数据
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/external_tasks`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 原生审批实例
           */
          instance: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=add_sign&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/ukTM5UjL5ETO14SOxkTN/approval-task-addsign document }
             */
            addSign: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/add_sign`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "addSign"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=cancel&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/cancel document }
             *
             * 审批实例撤回
             *
             * 对于状态为“审批中”的单个审批实例进行撤销操作，撤销后审批流程结束
             */
            cancel: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/cancel`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "cancel"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=cc&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/cc document }
             *
             * 审批实例抄送
             *
             * 通过接口可以将当前审批实例抄送给其他人。
             */
            cc: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/cc`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "cc"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=create&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/create document }
             *
             * 创建审批实例
             *
             * 创建一个审批实例，调用方需对审批定义的表单有详细了解，将按照定义的表单结构，将表单 Value 通过接口传入
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=get&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/get document }
             *
             * 获取单个审批实例详情
             *
             * 通过审批实例 Instance Code  获取审批实例详情。Instance Code 由 [批量获取审批实例](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/list) 接口获取。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=list&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/list document }
             *
             * 批量获取审批实例ID
             *
             * 根据 approval_code 批量获取审批实例的 instance_code，用于拉取租户下某个审批定义的全部审批实例。默认以审批创建时间先后顺序排列
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=preview&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/ukTM5UjL5ETO14SOxkTN/approval-preview document }
             */
            preview: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/preview`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "preview"),
            queryWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/query`, path2),
                  method: "POST",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "queryWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=query&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/query document }
             *
             * 查询实例列表
             *
             * 该接口通过不同条件查询审批系统中符合条件的审批实例列表。
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=search_cc&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/search_cc document }
             *
             * 查询抄送列表
             *
             * 该接口通过不同条件查询审批系统中符合条件的审批抄送列表。
             */
            searchCc: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/search_cc`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "searchCc"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=specified_rollback&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/specified_rollback document }
             *
             * 审批任务退回
             *
             * 从当前审批任务，退回到已审批的一个或多个任务节点。退回后，已审批节点重新生成审批任务
             */
            specifiedRollback: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/specified_rollback`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "specifiedRollback")
          },
          /**
           * 原生审批评论
           */
          instanceComment: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance.comment&apiName=create&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/create document }
             *
             * 创建评论
             *
             * 在某审批实例下创建、修改评论或评论回复（不包含审批同意、拒绝、转交等附加的理由或意见）。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance.comment&apiName=delete&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/delete document }
             *
             * 删除评论
             *
             * 逻辑删除某审批实例下的一条评论或评论回复（不包含审批同意、拒绝、转交等附加的理由或意见）。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/:comment_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance.comment&apiName=list&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/list document }
             *
             * 获取评论
             *
             * 根据 Instance Code 获取某个审批实例下的全部评论与评论回复（不包含审批同意、拒绝、转交等附加的理由或意见）。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance.comment&apiName=remove&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/remove document }
             *
             * 清空评论
             *
             * 删除某审批实例下的全部评论与评论回复。
             */
            remove: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/remove`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "remove")
          },
          /**
           * 审批查询
           */
          task: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=task&apiName=approve&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/task/approve document }
             *
             * 审批任务同意
             *
             * 对于单个审批任务进行同意操作。同意后审批流程会流转到下一个审批人。
             */
            approve: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/tasks/approve`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "approve"),
            queryWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/tasks/query`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "queryWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=task&apiName=query&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/task/query document }
             *
             * 用户角度列出任务
             *
             * 根据用户和任务分组查询任务列表
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/tasks/query`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=task&apiName=reject&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/task/reject document }
             *
             * 审批任务拒绝
             *
             * 对于单个审批任务进行拒绝操作。拒绝后审批流程结束。
             */
            reject: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/tasks/reject`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "reject"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=task&apiName=resubmit&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/task/resubmit document }
             *
             * 审批任务重新提交
             *
             * 对于单个退回到发起人的审批任务进行重新发起操作。发起后审批流程会流转到下一个审批人。
             */
            resubmit: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/tasks/resubmit`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "resubmit"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=task&apiName=search&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/task/search document }
             *
             * 查询任务列表
             *
             * 该接口通过不同条件查询审批系统中符合条件的审批任务列表
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/tasks/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=approval&resource=task&apiName=transfer&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/task/transfer document }
             *
             * 审批任务转交
             *
             * 对于单个审批任务进行转交操作。转交后审批流程流转给被转交人。
             */
            transfer: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/approval/v4/tasks/transfer`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "transfer")
          },
          v4: {
            /**
             * 原生审批定义
             */
            approval: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=approval&apiName=create&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/approval/create document }
               *
               * 创建审批定义
               *
               * 用于通过接口创建简单的审批定义，可以灵活指定定义的基础信息、表单和流程等。创建成功后，不支持从审批管理后台删除该定义。不推荐企业自建应用使用，如有需要尽量联系管理员在审批管理后台创建定义。
               *
               * 接口谨慎调用，创建后的审批定义无法停用/删除
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/approvals`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=approval&apiName=get&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/approval/get document }
               *
               * 查看审批定义
               *
               * 根据 Approval Code 获取某个审批定义的详情，用于构造创建审批实例的请求。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/approvals/:approval_code`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=approval&apiName=subscribe&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/approval/subscribe document }
               *
               * 订阅审批事件
               *
               * 应用订阅 approval_code 后，该应用就可以收到该审批定义对应实例的事件通知。同一应用只需要订阅一次，无需重复订阅。;;当应用不希望再收到审批事件时，可以使用取消订阅接口进行取消，取消后将不再给应用推送消息。;;订阅和取消订阅都是应用维度的，多个应用可以同时订阅同一个 approval_code，每个应用都能收到审批事件。
               */
              subscribe: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/subscribe`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "subscribe"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=approval&apiName=unsubscribe&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/approval/unsubscribe document }
               *
               * 取消订阅审批事件
               *
               * 取消订阅 approval_code 后，无法再收到该审批定义对应实例的事件通知
               */
              unsubscribe: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/approvals/:approval_code/unsubscribe`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "unsubscribe")
            },
            /**
             * district
             */
            district: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/approval/v4/districts`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=district&apiName=list&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=approval&resource=district&version=v4 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/districts`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/approval/v4/districts/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=district&apiName=search&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=approval&resource=district&version=v4 document }
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/districts/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * 三方审批定义
             */
            externalApproval: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=external_approval&apiName=create&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/external_approval/create document }
               *
               * 三方审批定义创建
               *
               * 审批定义是审批的描述，包括审批名称、图标、描述等基础信息。创建好审批定义，用户就可以在审批应用的发起页中看到审批，如果用户点击发起，则会跳转到配置的发起三方系统地址去发起审批。;;另外，审批定义还配置了审批操作时的回调地址：审批人在待审批列表中进行【同意】【拒绝】操作时，审批中心会调用回调地址通知三方系统。
               *
               * 注意，审批中心不负责审批流程的流转，只负责展示、操作、消息通知。因此审批定义创建时没有审批流程的信息。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/external_approvals`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=external_approval&apiName=get&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=approval&resource=external_approval&version=v4 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/external_approvals/:approval_code`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * 三方审批实例
             */
            externalInstance: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=external_instance&apiName=check&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/external_instance/check document }
               *
               * 三方审批实例校验
               *
               * 校验三方审批实例数据，用于判断服务端数据是否为最新的。用户提交实例最新更新时间，如果服务端不存在该实例，或者服务端实例更新时间不是最新的，则返回对应实例 id。;;例如，用户可以每隔5分钟，将最近5分钟产生的实例使用该接口进行对比。
               */
              check: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/external_instances/check`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "check"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=external_instance&apiName=create&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/external_instance/create document }
               *
               * 三方审批实例同步
               *
               * 审批中心不负责审批的流转，审批的流转在三方系统，三方系统在审批流转后生成的审批实例、审批任务、审批抄送数据同步到审批中心。;;用户可以在审批中心中浏览三方系统同步过来的实例、任务、抄送信息，并且可以跳转回三方系统进行更详细的查看和操作，其中实例信息在【已发起】列表，任务信息在【待审批】和【已审批】列表，抄送信息在【抄送我】列表;;:::html;<img src="//sf3-cn.feishucdn.com/obj/open-platform-opendoc/9dff4434afbeb0ef69de7f36b9a6e995_z5iwmTzEgg.png" alt="" style="zoom:17%;" />;;;<img src="//sf3-cn.feishucdn.com/obj/open-platform-opendoc/ca6e0e984a7a6d64e1b16a0bac4bf868_tfqjCiaJQM.png" alt="" style="zoom:17%;" />;;;<img src="//sf3-cn.feishucdn.com/obj/open-platform-opendoc/529377e238df78d391bbd22e962ad195_T7eefLI1GA.png" alt="" style="zoom:17%;" />;:::;;对于审批任务，三方系统也可以配置审批任务的回调接口，这样审批人可以在审批中心中直接进行审批操作，审批中心会回调三方系统，三方系统收到回调后更新任务信息，并将新的任务信息同步回审批中心，形成闭环。;;:::html;<img src="//sf3-cn.feishucdn.com/obj/open-platform-opendoc/721c35428bc1187db3318c572f9979ad_je75QpElcg.png" alt=""  style="zoom:25%;" />;:::;<br>
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/external_instances`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create")
            },
            /**
             * 三方审批任务
             */
            externalTask: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/approval/v4/external_tasks`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=external_task&apiName=list&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/external_task/list document }
               *
               * 获取三方审批任务状态
               *
               * 该接口用于获取三方审批的状态。用户传入查询条件，接口返回满足条件的审批实例的状态。该接口支持多种参数的组合，包括如下组合：;;1.通过 instance_ids 获取指定实例的任务状态;;2.通过 user_ids 获取指定用户的任务状态;;3.通过 status 获取指定状态的所有任务;;4.通过page_token获取下一批数据
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/external_tasks`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 原生审批实例
             */
            instance: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=add_sign&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/ukTM5UjL5ETO14SOxkTN/approval-task-addsign document }
               */
              addSign: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/add_sign`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "addSign"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=cancel&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/cancel document }
               *
               * 审批实例撤回
               *
               * 对于状态为“审批中”的单个审批实例进行撤销操作，撤销后审批流程结束
               */
              cancel: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/cancel`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "cancel"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=cc&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/cc document }
               *
               * 审批实例抄送
               *
               * 通过接口可以将当前审批实例抄送给其他人。
               */
              cc: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/cc`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "cc"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=create&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/create document }
               *
               * 创建审批实例
               *
               * 创建一个审批实例，调用方需对审批定义的表单有详细了解，将按照定义的表单结构，将表单 Value 通过接口传入
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=get&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/get document }
               *
               * 获取单个审批实例详情
               *
               * 通过审批实例 Instance Code  获取审批实例详情。Instance Code 由 [批量获取审批实例](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/list) 接口获取。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=list&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/list document }
               *
               * 批量获取审批实例ID
               *
               * 根据 approval_code 批量获取审批实例的 instance_code，用于拉取租户下某个审批定义的全部审批实例。默认以审批创建时间先后顺序排列
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=preview&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/ukTM5UjL5ETO14SOxkTN/approval-preview document }
               */
              preview: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/preview`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "preview"),
              queryWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/query`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "queryWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=query&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/query document }
               *
               * 查询实例列表
               *
               * 该接口通过不同条件查询审批系统中符合条件的审批实例列表。
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=search_cc&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/search_cc document }
               *
               * 查询抄送列表
               *
               * 该接口通过不同条件查询审批系统中符合条件的审批抄送列表。
               */
              searchCc: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/search_cc`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "searchCc"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=specified_rollback&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/specified_rollback document }
               *
               * 审批任务退回
               *
               * 从当前审批任务，退回到已审批的一个或多个任务节点。退回后，已审批节点重新生成审批任务
               */
              specifiedRollback: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/specified_rollback`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "specifiedRollback")
            },
            /**
             * 原生审批评论
             */
            instanceComment: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance.comment&apiName=create&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/create document }
               *
               * 创建评论
               *
               * 在某审批实例下创建、修改评论或评论回复（不包含审批同意、拒绝、转交等附加的理由或意见）。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance.comment&apiName=delete&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/delete document }
               *
               * 删除评论
               *
               * 逻辑删除某审批实例下的一条评论或评论回复（不包含审批同意、拒绝、转交等附加的理由或意见）。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/:comment_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance.comment&apiName=list&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/list document }
               *
               * 获取评论
               *
               * 根据 Instance Code 获取某个审批实例下的全部评论与评论回复（不包含审批同意、拒绝、转交等附加的理由或意见）。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance.comment&apiName=remove&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/remove document }
               *
               * 清空评论
               *
               * 删除某审批实例下的全部评论与评论回复。
               */
              remove: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/remove`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "remove")
            },
            /**
             * 审批查询
             */
            task: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=task&apiName=approve&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/task/approve document }
               *
               * 审批任务同意
               *
               * 对于单个审批任务进行同意操作。同意后审批流程会流转到下一个审批人。
               */
              approve: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/tasks/approve`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "approve"),
              queryWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/approval/v4/tasks/query`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "queryWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=task&apiName=query&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/task/query document }
               *
               * 用户角度列出任务
               *
               * 根据用户和任务分组查询任务列表
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/tasks/query`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=task&apiName=reject&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/task/reject document }
               *
               * 审批任务拒绝
               *
               * 对于单个审批任务进行拒绝操作。拒绝后审批流程结束。
               */
              reject: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/tasks/reject`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "reject"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=task&apiName=resubmit&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/task/resubmit document }
               *
               * 审批任务重新提交
               *
               * 对于单个退回到发起人的审批任务进行重新发起操作。发起后审批流程会流转到下一个审批人。
               */
              resubmit: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/tasks/resubmit`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "resubmit"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=task&apiName=search&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/task/search document }
               *
               * 查询任务列表
               *
               * 该接口通过不同条件查询审批系统中符合条件的审批任务列表
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/tasks/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=approval&resource=task&apiName=transfer&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/task/transfer document }
               *
               * 审批任务转交
               *
               * 对于单个审批任务进行转交操作。转交后审批流程流转给被转交人。
               */
              transfer: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/approval/v4/tasks/transfer`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "transfer")
            }
          }
        };
      }
    };
    var Client$10 = class extends Client$11 {
      static {
        __name(this, "Client$10");
      }
      constructor() {
        super(...arguments);
        this.attendance = {
          /**
           * approval_info
           */
          approvalInfo: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=approval_info&apiName=process&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/approval_info/process document }
             *
             * 通知审批状态更新
             *
             * 对于只使用飞书考勤系统而未使用飞书审批系统的企业，可以通过该接口更新写入飞书考勤系统中的三方系统审批状态，例如请假、加班、外出、出差、补卡等审批，状态包括通过、不通过、撤销等。
             *
             * 发起状态的审批才可以被更新为通过、不通过，已经通过的审批才可以被更新为撤销。
             */
            process: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/approval_infos/process`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "process")
          },
          /**
           * archive_rule
           */
          archiveRule: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=archive_rule&apiName=del_report&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=del_report&project=attendance&resource=archive_rule&version=v1 document }
             */
            delReport: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/archive_rule/del_report`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delReport"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/archive_rule`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=archive_rule&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=attendance&resource=archive_rule&version=v1 document }
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/archive_rule`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=archive_rule&apiName=upload_report&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=upload_report&project=attendance&resource=archive_rule&version=v1 document }
             */
            uploadReport: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/archive_rule/upload_report`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "uploadReport"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=archive_rule&apiName=user_stats_fields_query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=user_stats_fields_query&project=attendance&resource=archive_rule&version=v1 document }
             */
            userStatsFieldsQuery: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/archive_rule/user_stats_fields_query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "userStatsFieldsQuery")
          },
          /**
           * 文件
           */
          file: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=file&apiName=download&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/file/download document }
             *
             * 下载文件
             *
             * 通过文件 ID 下载指定的文件。
             */
            download: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/files/:file_id/download`, path2),
                method: "GET",
                headers,
                data,
                params,
                responseType: "stream",
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                $return_headers: true
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              const checkIsReadable = /* @__PURE__ */ __name(() => {
                const consumedError = "The stream has already been consumed";
                if (!res.data.readable) {
                  this.logger.error(consumedError);
                  throw new Error(consumedError);
                }
              }, "checkIsReadable");
              return {
                writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                  checkIsReadable();
                  return new Promise((resolve, reject) => {
                    const writableStream = fs__default["default"].createWriteStream(filePath);
                    writableStream.on("finish", () => {
                      resolve(filePath);
                    });
                    writableStream.on("error", (e) => {
                      reject(e);
                    });
                    res.data.pipe(writableStream);
                  });
                }), "writeFile"),
                getReadableStream: /* @__PURE__ */ __name(() => {
                  checkIsReadable();
                  return res.data;
                }, "getReadableStream"),
                headers: res.headers
              };
            }), "download"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=file&apiName=upload&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/file/upload document }
             *
             * 上传文件
             *
             * 上传文件并获取文件 ID，可用于“修改用户设置”接口中的 face_key 参数。
             */
            upload: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/files/upload`, path2),
                method: "POST",
                data,
                params,
                headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              return (res === null || res === void 0 ? void 0 : res.data) || null;
            }), "upload")
          },
          /**
           * 考勤组管理
           */
          group: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=group&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/group/create document }
             *
             * 创建或修改考勤组
             *
             * 考勤组，是对部门或者员工在某个特定场所及特定时间段内的出勤情况（包括上下班、迟到、早退、病假、婚假、丧假、公休、工作时间、加班情况等）的一种规则设定。;;通过设置考勤组，可以从部门、员工两个维度，来设定考勤方式、考勤时间、考勤地点等考勤规则。
             *
             * 出于安全考虑，目前通过该接口只允许修改自己创建的考勤组。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/groups`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=group&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/group/delete document }
             *
             * 删除考勤组
             *
             * 通过班次 ID 删除班次。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/groups/:group_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=group&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/group/get document }
             *
             * 获取考勤组详情
             *
             * 通过考勤组 ID 获取考勤组详情。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/groups/:group_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/groups`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=group&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/group/list document }
             *
             * 获取考勤组列表
             *
             * 翻页获取所有考勤组列表。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/groups`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=group&apiName=list_user&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list_user&project=attendance&resource=group&version=v1 document }
             */
            listUser: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/groups/:group_id/list_user`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "listUser"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=group&apiName=search&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/group/search document }
             *
             * 按名称查询考勤组
             *
             * 按考勤组名称查询考勤组摘要信息。查询条件支持名称精确匹配和模糊匹配两种方式。查询结果按考勤组修改时间 desc 排序，且最大记录数为 10 条。
             *
             * 该接口依赖的数据和考勤组主数据间存在数据同步延时（正常数据同步 2 秒以内），因此在使用该接口时需注意评估数据延迟潜在风险。
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/groups/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search")
          },
          /**
           * leave_accrual_record
           */
          leaveAccrualRecord: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=leave_accrual_record&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=attendance&resource=leave_accrual_record&version=v1 document }
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/leave_accrual_record/:leave_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * leave_employ_expire_record
           */
          leaveEmployExpireRecord: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=leave_employ_expire_record&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=attendance&resource=leave_employ_expire_record&version=v1 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/leave_employ_expire_records/:leave_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          /**
           * 考勤班次
           */
          shift: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=shift&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/shift/create document }
             *
             * 创建班次
             *
             * 班次是描述一次考勤任务时间规则的统称，比如一天打多少次卡，每次卡的上下班时间，晚到多长时间算迟到，晚到多长时间算缺卡等。
             *
             * - 创建一个考勤组前，必须先创建一个或者多个班次。;- 一个公司内的班次是共享的，你可以直接引用他人创建的班次，但是需要注意的是，若他人修改了班次，会影响到你的考勤组及其考勤结果。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/shifts`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=shift&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/shift/delete document }
             *
             * 删除班次
             *
             * 通过班次 ID 删除班次。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=shift&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/shift/get document }
             *
             * 获取班次详情
             *
             * 通过班次 ID 获取班次详情。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/shifts`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=shift&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/shift/list document }
             *
             * 获取班次列表
             *
             * 翻页获取所有班次列表。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/shifts`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=shift&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/shift/query document }
             *
             * 按名称查询班次
             *
             * 通过班次的名称查询班次信息。
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/shifts/query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query")
          },
          /**
           * 假勤审批
           */
          userApproval: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_approval&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_approval/create document }
             *
             * 写入审批结果
             *
             * 由于部分企业使用的是自己的审批系统，而不是飞书审批系统，因此员工的请假、加班等数据无法流入到飞书考勤系统中，导致员工在请假时间段内依然收到打卡提醒，并且被记为缺卡。;;对于这些只使用飞书考勤系统，而未使用飞书审批系统的企业，可以通过考勤开放接口的形式，将三方审批结果数据回写到飞书考勤系统中。
             *
             * 目前支持写入加班、请假、出差和外出这四种审批结果，写入只会追加(insert)，不会覆盖(update)（开放接口导入的加班假期记录，在管理后台的假期加班里查不到，只能通过[获取审批通过数据](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_approval/query)来查询）
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_approvals`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_approval&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_approval/query document }
             *
             * 获取审批通过数据
             *
             * 获取员工在某段时间内的请假、加班、外出和出差四种审批的通过数据。
             *
             * 请假的假期时长字段，暂未开放提供，待后续提供。
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_approvals/query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query")
          },
          /**
           * 考勤排班
           */
          userDailyShift: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_daily_shift&apiName=batch_create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_daily_shift/batch_create document }
             *
             * 创建或修改班表
             *
             * 班表是用来描述考勤组内人员每天按哪个班次进行上班。目前班表支持按一个整月对一位或多位人员进行排班。
             */
            batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchCreate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_daily_shift&apiName=batch_create_temp&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create_temp&project=attendance&resource=user_daily_shift&version=v1 document }
             */
            batchCreateTemp: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create_temp`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchCreateTemp"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_daily_shift&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_daily_shift/query document }
             *
             * 查询班表信息
             *
             * 支持查询多个用户的排班情况，查询的时间跨度不能超过 30 天。
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query")
          },
          /**
           * user_flow
           */
          userFlow: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_flow&apiName=batch_create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_flow/batch_create document }
             *
             * 导入打卡流水记录
             *
             * 导入授权内员工的打卡流水记录。导入后，会根据员工所在的考勤组班次规则，计算最终的打卡状态与结果。
             *
             * 适用于考勤机数据导入等场景。
             */
            batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_flows/batch_create`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchCreate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_flow&apiName=batch_del&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_del&project=attendance&resource=user_flow&version=v1 document }
             *
             * 批量删除流水
             */
            batchDel: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_flows/batch_del`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchDel"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_flow&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_flow/get document }
             *
             * 获取打卡流水记录
             *
             * 通过打卡记录 ID 获取用户的打卡流水记录。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_flows/:user_flow_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_flow&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_flow/query document }
             *
             * 批量查询打卡流水记录
             *
             * 批量查询授权内员工的实际打卡流水记录。例如，企业给一个员工设定的班次是上午 9 点和下午 6 点各打一次上下班卡，但是该员工在这期间打了多次卡，该接口会把所有的打卡记录都返回。
             *
             * 如果只需获取打卡结果，而不需要详细的打卡数据，可使用“获取打卡结果”的接口。
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_flows/query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query")
          },
          /**
           * 用户设置
           */
          userSetting: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_setting&apiName=modify&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_setting/modify document }
             *
             * 修改用户设置
             *
             * 修改授权内员工的用户设置信息，包括人脸照片文件 ID。
             */
            modify: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_settings/modify`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "modify"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_setting&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_setting/query document }
             *
             * 批量查询用户设置
             *
             * 批量查询授权内员工的用户设置信息，包括人脸照片文件 ID、人脸照片更新时间。
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_settings/query`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query")
          },
          /**
           * 考勤统计
           */
          userStatsData: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_stats_data&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_stats_data/query document }
             *
             * 查询统计数据
             *
             * 查询日度统计或月度统计的统计数据。
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_stats_datas/query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query")
          },
          /**
           * user_stats_field
           */
          userStatsField: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_stats_field&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_stats_field/query document }
             *
             * 查询统计表头
             *
             * 查询考勤统计支持的日度统计或月度统计的统计表头。
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_stats_fields/query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query")
          },
          /**
           * user_stats_view
           */
          userStatsView: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_stats_view&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_stats_view/query document }
             *
             * 查询统计设置
             *
             * 查询开发者定制的日度统计或月度统计的统计报表表头设置信息。
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_stats_views/query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_stats_view&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_stats_view/update document }
             *
             * 更新统计设置
             *
             * 更新开发者定制的日度统计或月度统计的统计报表表头设置信息。
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_stats_views/:user_stats_view_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 考勤记录
           */
          userTask: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_task&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_task/query document }
             *
             * 获取打卡结果
             *
             * 获取企业内员工的实际打卡结果，包括上班打卡结果和下班打卡结果。
             *
             * - 如果企业给一个员工设定的班次是上午 9 点和下午 6 点各打一次上下班卡，即使员工在这期间打了多次卡，该接口也只会返回 1 条记录。;- 如果要获取打卡的详细数据，如打卡位置等信息，可使用“获取打卡流水记录”或“批量查询打卡流水记录”的接口。
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_tasks/query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query")
          },
          /**
           * 考勤补卡
           */
          userTaskRemedy: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_task_remedy&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_task_remedy/create document }
             *
             * 通知补卡审批发起
             *
             * 对于只使用飞书考勤系统而未使用飞书审批系统的企业，可以通过该接口，将在三方审批系统中发起的补卡审批数据，写入到飞书考勤系统中，状态为审批中。写入后可以由[通知审批状态更新](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/approval_info/process) 进行状态更新
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_task_remedys`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_task_remedy&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_task_remedy/query document }
             *
             * 获取补卡记录
             *
             * 获取授权内员工的补卡记录。
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_task_remedy&apiName=query_user_allowed_remedys&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_task_remedy/query_user_allowed_remedys document }
             *
             * 获取用户可补卡时间
             *
             * 获取用户某天可以补的第几次上 / 下班卡的时间。
             */
            queryUserAllowedRemedys: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query_user_allowed_remedys`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "queryUserAllowedRemedys")
          },
          v1: {
            /**
             * approval_info
             */
            approvalInfo: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=approval_info&apiName=process&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/approval_info/process document }
               *
               * 通知审批状态更新
               *
               * 对于只使用飞书考勤系统而未使用飞书审批系统的企业，可以通过该接口更新写入飞书考勤系统中的三方系统审批状态，例如请假、加班、外出、出差、补卡等审批，状态包括通过、不通过、撤销等。
               *
               * 发起状态的审批才可以被更新为通过、不通过，已经通过的审批才可以被更新为撤销。
               */
              process: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/approval_infos/process`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "process")
            },
            /**
             * archive_rule
             */
            archiveRule: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=archive_rule&apiName=del_report&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=del_report&project=attendance&resource=archive_rule&version=v1 document }
               */
              delReport: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/archive_rule/del_report`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delReport"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/attendance/v1/archive_rule`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=archive_rule&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=attendance&resource=archive_rule&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/archive_rule`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=archive_rule&apiName=upload_report&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=upload_report&project=attendance&resource=archive_rule&version=v1 document }
               */
              uploadReport: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/archive_rule/upload_report`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "uploadReport"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=archive_rule&apiName=user_stats_fields_query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=user_stats_fields_query&project=attendance&resource=archive_rule&version=v1 document }
               */
              userStatsFieldsQuery: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/archive_rule/user_stats_fields_query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "userStatsFieldsQuery")
            },
            /**
             * 文件
             */
            file: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=file&apiName=download&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/file/download document }
               *
               * 下载文件
               *
               * 通过文件 ID 下载指定的文件。
               */
              download: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/files/:file_id/download`, path2),
                  method: "GET",
                  headers,
                  data,
                  params,
                  responseType: "stream",
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                  $return_headers: true
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                const checkIsReadable = /* @__PURE__ */ __name(() => {
                  const consumedError = "The stream has already been consumed";
                  if (!res.data.readable) {
                    this.logger.error(consumedError);
                    throw new Error(consumedError);
                  }
                }, "checkIsReadable");
                return {
                  writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                    checkIsReadable();
                    return new Promise((resolve, reject) => {
                      const writableStream = fs__default["default"].createWriteStream(filePath);
                      writableStream.on("finish", () => {
                        resolve(filePath);
                      });
                      writableStream.on("error", (e) => {
                        reject(e);
                      });
                      res.data.pipe(writableStream);
                    });
                  }), "writeFile"),
                  getReadableStream: /* @__PURE__ */ __name(() => {
                    checkIsReadable();
                    return res.data;
                  }, "getReadableStream"),
                  headers: res.headers
                };
              }), "download"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=file&apiName=upload&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/file/upload document }
               *
               * 上传文件
               *
               * 上传文件并获取文件 ID，可用于“修改用户设置”接口中的 face_key 参数。
               */
              upload: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/files/upload`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "upload")
            },
            /**
             * 考勤组管理
             */
            group: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=group&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/group/create document }
               *
               * 创建或修改考勤组
               *
               * 考勤组，是对部门或者员工在某个特定场所及特定时间段内的出勤情况（包括上下班、迟到、早退、病假、婚假、丧假、公休、工作时间、加班情况等）的一种规则设定。;;通过设置考勤组，可以从部门、员工两个维度，来设定考勤方式、考勤时间、考勤地点等考勤规则。
               *
               * 出于安全考虑，目前通过该接口只允许修改自己创建的考勤组。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/groups`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=group&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/group/delete document }
               *
               * 删除考勤组
               *
               * 通过班次 ID 删除班次。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/groups/:group_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=group&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/group/get document }
               *
               * 获取考勤组详情
               *
               * 通过考勤组 ID 获取考勤组详情。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/groups/:group_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/attendance/v1/groups`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=group&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/group/list document }
               *
               * 获取考勤组列表
               *
               * 翻页获取所有考勤组列表。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/groups`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=group&apiName=list_user&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list_user&project=attendance&resource=group&version=v1 document }
               */
              listUser: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/groups/:group_id/list_user`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "listUser"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=group&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/group/search document }
               *
               * 按名称查询考勤组
               *
               * 按考勤组名称查询考勤组摘要信息。查询条件支持名称精确匹配和模糊匹配两种方式。查询结果按考勤组修改时间 desc 排序，且最大记录数为 10 条。
               *
               * 该接口依赖的数据和考勤组主数据间存在数据同步延时（正常数据同步 2 秒以内），因此在使用该接口时需注意评估数据延迟潜在风险。
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/groups/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * leave_accrual_record
             */
            leaveAccrualRecord: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=leave_accrual_record&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=attendance&resource=leave_accrual_record&version=v1 document }
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/leave_accrual_record/:leave_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * leave_employ_expire_record
             */
            leaveEmployExpireRecord: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=leave_employ_expire_record&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=attendance&resource=leave_employ_expire_record&version=v1 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/leave_employ_expire_records/:leave_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * 考勤班次
             */
            shift: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=shift&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/shift/create document }
               *
               * 创建班次
               *
               * 班次是描述一次考勤任务时间规则的统称，比如一天打多少次卡，每次卡的上下班时间，晚到多长时间算迟到，晚到多长时间算缺卡等。
               *
               * - 创建一个考勤组前，必须先创建一个或者多个班次。;- 一个公司内的班次是共享的，你可以直接引用他人创建的班次，但是需要注意的是，若他人修改了班次，会影响到你的考勤组及其考勤结果。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/shifts`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=shift&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/shift/delete document }
               *
               * 删除班次
               *
               * 通过班次 ID 删除班次。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=shift&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/shift/get document }
               *
               * 获取班次详情
               *
               * 通过班次 ID 获取班次详情。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/shifts/:shift_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/attendance/v1/shifts`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=shift&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/shift/list document }
               *
               * 获取班次列表
               *
               * 翻页获取所有班次列表。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/shifts`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=shift&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/shift/query document }
               *
               * 按名称查询班次
               *
               * 通过班次的名称查询班次信息。
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/shifts/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * 假勤审批
             */
            userApproval: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_approval&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_approval/create document }
               *
               * 写入审批结果
               *
               * 由于部分企业使用的是自己的审批系统，而不是飞书审批系统，因此员工的请假、加班等数据无法流入到飞书考勤系统中，导致员工在请假时间段内依然收到打卡提醒，并且被记为缺卡。;;对于这些只使用飞书考勤系统，而未使用飞书审批系统的企业，可以通过考勤开放接口的形式，将三方审批结果数据回写到飞书考勤系统中。
               *
               * 目前支持写入加班、请假、出差和外出这四种审批结果，写入只会追加(insert)，不会覆盖(update)（开放接口导入的加班假期记录，在管理后台的假期加班里查不到，只能通过[获取审批通过数据](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_approval/query)来查询）
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_approvals`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_approval&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_approval/query document }
               *
               * 获取审批通过数据
               *
               * 获取员工在某段时间内的请假、加班、外出和出差四种审批的通过数据。
               *
               * 请假的假期时长字段，暂未开放提供，待后续提供。
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_approvals/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * 考勤排班
             */
            userDailyShift: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_daily_shift&apiName=batch_create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_daily_shift/batch_create document }
               *
               * 创建或修改班表
               *
               * 班表是用来描述考勤组内人员每天按哪个班次进行上班。目前班表支持按一个整月对一位或多位人员进行排班。
               */
              batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchCreate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_daily_shift&apiName=batch_create_temp&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create_temp&project=attendance&resource=user_daily_shift&version=v1 document }
               */
              batchCreateTemp: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/batch_create_temp`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchCreateTemp"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_daily_shift&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_daily_shift/query document }
               *
               * 查询班表信息
               *
               * 支持查询多个用户的排班情况，查询的时间跨度不能超过 30 天。
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_daily_shifts/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * user_flow
             */
            userFlow: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_flow&apiName=batch_create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_flow/batch_create document }
               *
               * 导入打卡流水记录
               *
               * 导入授权内员工的打卡流水记录。导入后，会根据员工所在的考勤组班次规则，计算最终的打卡状态与结果。
               *
               * 适用于考勤机数据导入等场景。
               */
              batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_flows/batch_create`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchCreate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_flow&apiName=batch_del&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_del&project=attendance&resource=user_flow&version=v1 document }
               *
               * 批量删除流水
               */
              batchDel: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_flows/batch_del`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchDel"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_flow&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_flow/get document }
               *
               * 获取打卡流水记录
               *
               * 通过打卡记录 ID 获取用户的打卡流水记录。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_flows/:user_flow_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_flow&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_flow/query document }
               *
               * 批量查询打卡流水记录
               *
               * 批量查询授权内员工的实际打卡流水记录。例如，企业给一个员工设定的班次是上午 9 点和下午 6 点各打一次上下班卡，但是该员工在这期间打了多次卡，该接口会把所有的打卡记录都返回。
               *
               * 如果只需获取打卡结果，而不需要详细的打卡数据，可使用“获取打卡结果”的接口。
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_flows/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * 用户设置
             */
            userSetting: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_setting&apiName=modify&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_setting/modify document }
               *
               * 修改用户设置
               *
               * 修改授权内员工的用户设置信息，包括人脸照片文件 ID。
               */
              modify: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_settings/modify`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "modify"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_setting&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_setting/query document }
               *
               * 批量查询用户设置
               *
               * 批量查询授权内员工的用户设置信息，包括人脸照片文件 ID、人脸照片更新时间。
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_settings/query`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * 考勤统计
             */
            userStatsData: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_stats_data&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_stats_data/query document }
               *
               * 查询统计数据
               *
               * 查询日度统计或月度统计的统计数据。
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_stats_datas/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * user_stats_field
             */
            userStatsField: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_stats_field&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_stats_field/query document }
               *
               * 查询统计表头
               *
               * 查询考勤统计支持的日度统计或月度统计的统计表头。
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_stats_fields/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * user_stats_view
             */
            userStatsView: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_stats_view&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_stats_view/query document }
               *
               * 查询统计设置
               *
               * 查询开发者定制的日度统计或月度统计的统计报表表头设置信息。
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_stats_views/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_stats_view&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_stats_view/update document }
               *
               * 更新统计设置
               *
               * 更新开发者定制的日度统计或月度统计的统计报表表头设置信息。
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_stats_views/:user_stats_view_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 考勤记录
             */
            userTask: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_task&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_task/query document }
               *
               * 获取打卡结果
               *
               * 获取企业内员工的实际打卡结果，包括上班打卡结果和下班打卡结果。
               *
               * - 如果企业给一个员工设定的班次是上午 9 点和下午 6 点各打一次上下班卡，即使员工在这期间打了多次卡，该接口也只会返回 1 条记录。;- 如果要获取打卡的详细数据，如打卡位置等信息，可使用“获取打卡流水记录”或“批量查询打卡流水记录”的接口。
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_tasks/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * 考勤补卡
             */
            userTaskRemedy: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_task_remedy&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_task_remedy/create document }
               *
               * 通知补卡审批发起
               *
               * 对于只使用飞书考勤系统而未使用飞书审批系统的企业，可以通过该接口，将在三方审批系统中发起的补卡审批数据，写入到飞书考勤系统中，状态为审批中。写入后可以由[通知审批状态更新](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/approval_info/process) 进行状态更新
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_task_remedys`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_task_remedy&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_task_remedy/query document }
               *
               * 获取补卡记录
               *
               * 获取授权内员工的补卡记录。
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_task_remedy&apiName=query_user_allowed_remedys&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_task_remedy/query_user_allowed_remedys document }
               *
               * 获取用户可补卡时间
               *
               * 获取用户某天可以补的第几次上 / 下班卡的时间。
               */
              queryUserAllowedRemedys: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_task_remedys/query_user_allowed_remedys`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "queryUserAllowedRemedys")
            }
          }
        };
      }
    };
    var Client$$ = class extends Client$10 {
      static {
        __name(this, "Client$$");
      }
      constructor() {
        super(...arguments);
        this.auth = {
          /**
           * app_access_token
           */
          appAccessToken: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=auth&resource=app_access_token&apiName=create&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=auth&resource=app_access_token&version=v3 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/auth/v3/app_access_token`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=auth&resource=app_access_token&apiName=internal&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=internal&project=auth&resource=app_access_token&version=v3 document }
             */
            internal: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/auth/v3/app_access_token/internal`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "internal")
          },
          /**
           * app_ticket
           */
          appTicket: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=auth&resource=app_ticket&apiName=resend&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=resend&project=auth&resource=app_ticket&version=v3 document }
             */
            resend: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/auth/v3/app_ticket/resend`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "resend")
          },
          /**
           * tenant_access_token
           */
          tenantAccessToken: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=auth&resource=tenant_access_token&apiName=create&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=auth&resource=tenant_access_token&version=v3 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/auth/v3/tenant_access_token`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=auth&resource=tenant_access_token&apiName=internal&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=internal&project=auth&resource=tenant_access_token&version=v3 document }
             */
            internal: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/auth/v3/tenant_access_token/internal`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "internal")
          },
          v3: {
            /**
             * app_access_token
             */
            appAccessToken: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=auth&resource=app_access_token&apiName=create&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=auth&resource=app_access_token&version=v3 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/auth/v3/app_access_token`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=auth&resource=app_access_token&apiName=internal&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=internal&project=auth&resource=app_access_token&version=v3 document }
               */
              internal: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/auth/v3/app_access_token/internal`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "internal")
            },
            /**
             * app_ticket
             */
            appTicket: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=auth&resource=app_ticket&apiName=resend&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=resend&project=auth&resource=app_ticket&version=v3 document }
               */
              resend: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/auth/v3/app_ticket/resend`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "resend")
            },
            /**
             * tenant_access_token
             */
            tenantAccessToken: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=auth&resource=tenant_access_token&apiName=create&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=auth&resource=tenant_access_token&version=v3 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/auth/v3/tenant_access_token`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=auth&resource=tenant_access_token&apiName=internal&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=internal&project=auth&resource=tenant_access_token&version=v3 document }
               */
              internal: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/auth/v3/tenant_access_token/internal`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "internal")
            }
          }
        };
      }
    };
    var Client$_ = class extends Client$$ {
      static {
        __name(this, "Client$_");
      }
      constructor() {
        super(...arguments);
        this.authen = {
          /**
           * access_token
           */
          accessToken: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=authen&resource=access_token&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=authen&resource=access_token&version=v1 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/authen/v1/access_token`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create")
          },
          /**
           * oidc.access_token
           */
          oidcAccessToken: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=authen&resource=oidc.access_token&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=authen&resource=oidc.access_token&version=v1 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/authen/v1/oidc/access_token`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create")
          },
          /**
           * oidc.refresh_access_token
           */
          oidcRefreshAccessToken: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=authen&resource=oidc.refresh_access_token&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=authen&resource=oidc.refresh_access_token&version=v1 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/authen/v1/oidc/refresh_access_token`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create")
          },
          /**
           * refresh_access_token
           */
          refreshAccessToken: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=authen&resource=refresh_access_token&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=authen&resource=refresh_access_token&version=v1 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/authen/v1/refresh_access_token`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create")
          },
          /**
           * user_info
           */
          userInfo: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=authen&resource=user_info&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=authen&resource=user_info&version=v1 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/authen/v1/user_info`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          v1: {
            /**
             * access_token
             */
            accessToken: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=authen&resource=access_token&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=authen&resource=access_token&version=v1 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/authen/v1/access_token`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create")
            },
            /**
             * oidc.access_token
             */
            oidcAccessToken: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=authen&resource=oidc.access_token&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=authen&resource=oidc.access_token&version=v1 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/authen/v1/oidc/access_token`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create")
            },
            /**
             * oidc.refresh_access_token
             */
            oidcRefreshAccessToken: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=authen&resource=oidc.refresh_access_token&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=authen&resource=oidc.refresh_access_token&version=v1 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/authen/v1/oidc/refresh_access_token`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create")
            },
            /**
             * refresh_access_token
             */
            refreshAccessToken: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=authen&resource=refresh_access_token&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=authen&resource=refresh_access_token&version=v1 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/authen/v1/refresh_access_token`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create")
            },
            /**
             * user_info
             */
            userInfo: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=authen&resource=user_info&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=authen&resource=user_info&version=v1 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/authen/v1/user_info`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            }
          }
        };
      }
    };
    var Client$Z = class extends Client$_ {
      static {
        __name(this, "Client$Z");
      }
      constructor() {
        super(...arguments);
        this.aweme_ecosystem = {};
      }
    };
    var Client$Y = class extends Client$Z {
      static {
        __name(this, "Client$Y");
      }
      constructor() {
        super(...arguments);
        this.baike = {
          /**
           * 分类
           */
          classification: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/baike/v1/classifications`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=baike&resource=classification&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/classification/list document }
             *
             * 获取百科分类
             *
             * 获取企业百科当前分类。;企业百科目前为二级分类体系，每个词条可添加多个二级分类，但每个一级分类下只能添加一个分类。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/baike/v1/classifications`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 草稿
           */
          draft: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=baike&resource=draft&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/draft/create document }
             *
             * 创建草稿
             *
             * 草稿并非百科词条，而是指通过 API 发起创建新词条或更新现有词条的申请。百科管理员审核通过后，草稿将变为新的词条或覆盖已有词条。
             *
             * · 创建新的百科词条时，无需传入 entity_id 字段;· 更新已有百科词条时，请传入对应词条的 entity_id 或 outer_info
             *
             * 以用户身份创建草稿（即 Authorization 使用 user_access_token），对应用户将收到由企业百科 Bot 发送的审核结果；以应用身份创建草稿（即 Authorization 使用 tenant_access_toke），不会收到任何通知。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/baike/v1/drafts`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=baike&resource=draft&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/draft/update document }
             *
             * 更新草稿
             *
             * 根据 draft_id 更新草稿内容，已审批的草稿无法编辑
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/baike/v1/drafts/:draft_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 词条
           */
          entity: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=baike&resource=entity&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/create document }
             *
             * 创建免审词条
             *
             * 通过此接口创建的词条，不需要百科管理员审核可直接写入词库，请慎重使用【租户管理员请慎重审批】。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/baike/v1/entities`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=baike&resource=entity&apiName=extract&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/extract document }
             *
             * 提取潜在的百科词条
             *
             * 提取文本中可能成为百科词条的词语，且不会过滤已经成为百科词条的词语。同时，会返回推荐的别名。
             */
            extract: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/baike/v1/entities/extract`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "extract"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=baike&resource=entity&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/get document }
             *
             * 获取词条详情
             *
             * 通过词条 id 拉取对应的词条详情信息。
             *
             * 也支持通过 provider 和 outer_id 返回对应实体的详情数据。此时路径中的 entity_id 为固定的 enterprise_0
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/baike/v1/entities/:entity_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=baike&resource=entity&apiName=highlight&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/highlight document }
             *
             * 词条高亮
             *
             * 传入一句话，智能识别句中对应的词条，并返回词条位置和 entity_id，可在外部系统中快速实现百科词条智能高亮。
             */
            highlight: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/baike/v1/entities/highlight`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "highlight"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/baike/v1/entities`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=baike&resource=entity&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/list document }
             *
             * 获取词条列表
             *
             * 分页拉取词条列表数据，支持拉取租户内的全部词条。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/baike/v1/entities`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=baike&resource=entity&apiName=match&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/match document }
             *
             * 精准搜索词条
             *
             * 将关键词与词条名、别名精准匹配，并返回对应的 词条 ID。
             */
            match: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/baike/v1/entities/match`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "match"),
            searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/baike/v1/entities/search`, path2),
                  method: "POST",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "searchWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=baike&resource=entity&apiName=search&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/search document }
             *
             * 模糊搜索词条
             *
             * 传入关键词，与词条名、别名、释义等信息进行模糊匹配，返回搜到的词条信息。
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/baike/v1/entities/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=baike&resource=entity&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/update document }
             *
             * 更新免审词条
             *
             * 通过此接口更新已有的词条，不需要百科管理员审核可直接写入词库，请慎重使用【租户管理员请慎重审批】。
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/baike/v1/entities/:entity_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 文件
           */
          file: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=baike&resource=file&apiName=download&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/file/download document }
             *
             * 图片下载
             *
             * 通过 file_token 下载原图片
             */
            download: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/baike/v1/files/:file_token/download`, path2),
                method: "GET",
                headers,
                data,
                params,
                responseType: "stream",
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                $return_headers: true
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              const checkIsReadable = /* @__PURE__ */ __name(() => {
                const consumedError = "The stream has already been consumed";
                if (!res.data.readable) {
                  this.logger.error(consumedError);
                  throw new Error(consumedError);
                }
              }, "checkIsReadable");
              return {
                writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                  checkIsReadable();
                  return new Promise((resolve, reject) => {
                    const writableStream = fs__default["default"].createWriteStream(filePath);
                    writableStream.on("finish", () => {
                      resolve(filePath);
                    });
                    writableStream.on("error", (e) => {
                      reject(e);
                    });
                    res.data.pipe(writableStream);
                  });
                }), "writeFile"),
                getReadableStream: /* @__PURE__ */ __name(() => {
                  checkIsReadable();
                  return res.data;
                }, "getReadableStream"),
                headers: res.headers
              };
            }), "download"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=baike&resource=file&apiName=upload&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/file/upload document }
             *
             * 图片上传
             *
             * 百科词条图片资源上传。
             */
            upload: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/baike/v1/files/upload`, path2),
                method: "POST",
                data,
                params,
                headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              return (res === null || res === void 0 ? void 0 : res.data) || null;
            }), "upload")
          },
          v1: {
            /**
             * 分类
             */
            classification: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/baike/v1/classifications`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=baike&resource=classification&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/classification/list document }
               *
               * 获取百科分类
               *
               * 获取企业百科当前分类。;企业百科目前为二级分类体系，每个词条可添加多个二级分类，但每个一级分类下只能添加一个分类。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/baike/v1/classifications`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 草稿
             */
            draft: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=baike&resource=draft&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/draft/create document }
               *
               * 创建草稿
               *
               * 草稿并非百科词条，而是指通过 API 发起创建新词条或更新现有词条的申请。百科管理员审核通过后，草稿将变为新的词条或覆盖已有词条。
               *
               * · 创建新的百科词条时，无需传入 entity_id 字段;· 更新已有百科词条时，请传入对应词条的 entity_id 或 outer_info
               *
               * 以用户身份创建草稿（即 Authorization 使用 user_access_token），对应用户将收到由企业百科 Bot 发送的审核结果；以应用身份创建草稿（即 Authorization 使用 tenant_access_toke），不会收到任何通知。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/baike/v1/drafts`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=baike&resource=draft&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/draft/update document }
               *
               * 更新草稿
               *
               * 根据 draft_id 更新草稿内容，已审批的草稿无法编辑
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/baike/v1/drafts/:draft_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 词条
             */
            entity: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=baike&resource=entity&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/create document }
               *
               * 创建免审词条
               *
               * 通过此接口创建的词条，不需要百科管理员审核可直接写入词库，请慎重使用【租户管理员请慎重审批】。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/baike/v1/entities`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=baike&resource=entity&apiName=extract&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/extract document }
               *
               * 提取潜在的百科词条
               *
               * 提取文本中可能成为百科词条的词语，且不会过滤已经成为百科词条的词语。同时，会返回推荐的别名。
               */
              extract: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/baike/v1/entities/extract`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "extract"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=baike&resource=entity&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/get document }
               *
               * 获取词条详情
               *
               * 通过词条 id 拉取对应的词条详情信息。
               *
               * 也支持通过 provider 和 outer_id 返回对应实体的详情数据。此时路径中的 entity_id 为固定的 enterprise_0
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/baike/v1/entities/:entity_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=baike&resource=entity&apiName=highlight&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/highlight document }
               *
               * 词条高亮
               *
               * 传入一句话，智能识别句中对应的词条，并返回词条位置和 entity_id，可在外部系统中快速实现百科词条智能高亮。
               */
              highlight: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/baike/v1/entities/highlight`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "highlight"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/baike/v1/entities`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=baike&resource=entity&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/list document }
               *
               * 获取词条列表
               *
               * 分页拉取词条列表数据，支持拉取租户内的全部词条。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/baike/v1/entities`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=baike&resource=entity&apiName=match&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/match document }
               *
               * 精准搜索词条
               *
               * 将关键词与词条名、别名精准匹配，并返回对应的 词条 ID。
               */
              match: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/baike/v1/entities/match`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "match"),
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/baike/v1/entities/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=baike&resource=entity&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/search document }
               *
               * 模糊搜索词条
               *
               * 传入关键词，与词条名、别名、释义等信息进行模糊匹配，返回搜到的词条信息。
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/baike/v1/entities/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=baike&resource=entity&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/update document }
               *
               * 更新免审词条
               *
               * 通过此接口更新已有的词条，不需要百科管理员审核可直接写入词库，请慎重使用【租户管理员请慎重审批】。
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/baike/v1/entities/:entity_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 文件
             */
            file: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=baike&resource=file&apiName=download&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/file/download document }
               *
               * 图片下载
               *
               * 通过 file_token 下载原图片
               */
              download: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/baike/v1/files/:file_token/download`, path2),
                  method: "GET",
                  headers,
                  data,
                  params,
                  responseType: "stream",
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                  $return_headers: true
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                const checkIsReadable = /* @__PURE__ */ __name(() => {
                  const consumedError = "The stream has already been consumed";
                  if (!res.data.readable) {
                    this.logger.error(consumedError);
                    throw new Error(consumedError);
                  }
                }, "checkIsReadable");
                return {
                  writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                    checkIsReadable();
                    return new Promise((resolve, reject) => {
                      const writableStream = fs__default["default"].createWriteStream(filePath);
                      writableStream.on("finish", () => {
                        resolve(filePath);
                      });
                      writableStream.on("error", (e) => {
                        reject(e);
                      });
                      res.data.pipe(writableStream);
                    });
                  }), "writeFile"),
                  getReadableStream: /* @__PURE__ */ __name(() => {
                    checkIsReadable();
                    return res.data;
                  }, "getReadableStream"),
                  headers: res.headers
                };
              }), "download"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=baike&resource=file&apiName=upload&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/file/upload document }
               *
               * 图片上传
               *
               * 百科词条图片资源上传。
               */
              upload: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/baike/v1/files/upload`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "upload")
            }
          }
        };
      }
    };
    var Client$X = class extends Client$Y {
      static {
        __name(this, "Client$X");
      }
      constructor() {
        super(...arguments);
        this.base = {
          v2: {
            /**
             * app.role
             */
            appRole: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=base&resource=app.role&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=base&resource=app.role&version=v2 document }
               *
               * 新增自定义角色
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/base/v2/apps/:app_token/roles`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/base/v2/apps/:app_token/roles`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=base&resource=app.role&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=base&resource=app.role&version=v2 document }
               *
               * 列出自定义角色
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/base/v2/apps/:app_token/roles`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=base&resource=app.role&apiName=update&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=base&resource=app.role&version=v2 document }
               *
               * 更新自定义角色
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/base/v2/apps/:app_token/roles/:role_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            }
          }
        };
      }
    };
    var Client$W = class extends Client$X {
      static {
        __name(this, "Client$W");
      }
      constructor() {
        super(...arguments);
        this.bitable = {
          /**
           * 多维表格
           */
          app: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app&apiName=copy&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=copy&project=bitable&resource=app&version=v1 document }
             */
            copy: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/copy`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "copy"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=bitable&resource=app&version=v1 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app/get document }
             *
             * 获取多维表格元数据
             *
             * 获取指定多维表格的元数据信息，包括多维表格名称，多维表格版本号，多维表格是否开启高级权限等。
             *
             * 该接口支持调用频率上限为 20 QPS（Query Per Second，每秒请求率）
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app/update document }
             *
             * 更新多维表格元数据
             *
             * 通过 app_token 更新多维表格元数据
             *
             * 该接口支持调用频率上限为 10 QPS
             *
             * - 飞书文档、飞书表格、知识库中的多维表格不支持开启高级权限;- 此接口非原子操作，先修改多维表格名字，后开关高级权限。可能存在部分成功的情况
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 仪表盘
           */
          appDashboard: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.dashboard&apiName=copy&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-dashboard/copy document }
             *
             * 复制仪表盘
             *
             * 该接口用于根据现有仪表盘复制出新的仪表盘
             */
            copy: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards/:block_id/copy`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "copy"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.dashboard&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-dashboard/list document }
             *
             * 列出仪表盘
             *
             * 根据 app_token，获取多维表格下的所有仪表盘
             *
             * 该接口支持调用频率上限为 20 QPS
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 自定义角色
           */
          appRole: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.role&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-role/create document }
             *
             * 新增自定义角色
             *
             * 新增自定义角色
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.role&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-role/delete document }
             *
             * 删除自定义角色
             *
             * 删除自定义角色
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.role&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-role/list document }
             *
             * 列出自定义角色
             *
             * 列出自定义角色
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.role&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-role/update document }
             *
             * 更新自定义角色
             *
             * 更新自定义角色
             *
             * 更新自定义角色是全量更新，会完全覆盖旧的自定义角色设置
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 协作者
           */
          appRoleMember: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.role.member&apiName=batch_create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-role-member/batch_create document }
             *
             * 批量新增协作者
             *
             * 批量新增自定义角色的协作者
             */
            batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_create`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchCreate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.role.member&apiName=batch_delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-role-member/batch_delete document }
             *
             * 批量删除协作者
             *
             * 批量删除自定义角色的协作者
             */
            batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_delete`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchDelete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.role.member&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-role-member/create document }
             *
             * 新增协作者
             *
             * 新增自定义角色的协作者
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.role.member&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-role-member/delete document }
             *
             * 删除协作者
             *
             * 删除自定义角色的协作者
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/:member_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.role.member&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-role-member/list document }
             *
             * 列出协作者
             *
             * 列出自定义角色的协作者
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 数据表
           */
          appTable: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table&apiName=batch_create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table/batch_create document }
             *
             * 新增多个数据表
             *
             * 新增多个数据表
             *
             * 该接口支持调用频率上限为 10 QPS
             */
            batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_create`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchCreate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table&apiName=batch_delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table/batch_delete document }
             *
             * 删除多个数据表
             *
             * 删除多个数据表
             *
             * 该接口支持调用频率上限为 10 QPS
             */
            batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_delete`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchDelete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table/create document }
             *
             * 新增数据表
             *
             * 新增一个数据表
             *
             * 该接口支持调用频率上限为 10 QPS
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table/delete document }
             *
             * 删除数据表
             *
             * 删除一个数据表
             *
             * 该接口支持调用频率上限为 10 QPS
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table/list document }
             *
             * 列出数据表
             *
             * 根据  app_token，获取多维表格下的所有数据表
             *
             * 该接口支持调用频率上限为 20 QPS
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table/patch document }
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 字段
           */
          appTableField: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.field&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-field/create document }
             *
             * 新增字段
             *
             * 该接口用于在数据表中新增一个字段
             *
             * 该接口支持调用频率上限为 10 QPS
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.field&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-field/delete document }
             *
             * 删除字段
             *
             * 该接口用于在数据表中删除一个字段
             *
             * 该接口支持调用频率上限为 10 QPS
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.field&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-field/list document }
             *
             * 列出字段
             *
             * 根据 app_token 和 table_id，获取数据表的所有字段
             *
             * 该接口支持调用频率上限为 20 QPS
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.field&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-field/update document }
             *
             * 更新字段
             *
             * 该接口用于在数据表中更新一个字段
             *
             * 该接口支持调用频率上限为 10 QPS
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 表单
           */
          appTableFormField: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.form.field&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-form-field/list document }
             *
             * 列出表单问题
             *
             * 列出表单的所有问题项
             *
             * 该接口支持调用频率上限为 20 QPS
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.form.field&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-form-field/patch document }
             *
             * 更新表单问题
             *
             * 该接口用于更新表单中的问题项
             *
             * 该接口支持调用频率上限为 10 QPS
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields/:field_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 表单
           */
          appTableForm: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.form&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-form/get document }
             *
             * 获取表单元数据
             *
             * 获取表单的所有元数据项
             *
             * 该接口支持调用频率上限为 20 QPS
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.form&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-form/patch document }
             *
             * 更新表单元数据
             *
             * 该接口用于更新表单中的元数据项
             *
             * 该接口支持调用频率上限为 10 QPS
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 记录
           */
          appTableRecord: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.record&apiName=batch_create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-record/batch_create document }
             *
             * 新增多条记录
             *
             * 该接口用于在数据表中新增多条记录，单次调用最多新增 500 条记录。
             *
             * 该接口支持调用频率上限为 10 QPS（Query Per Second，每秒请求率）
             */
            batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_create`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchCreate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.record&apiName=batch_delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-record/batch_delete document }
             *
             * 删除多条记录
             *
             * 该接口用于删除数据表中现有的多条记录，单次调用中最多删除 500 条记录。
             *
             * 该接口支持调用频率上限为 10 QPS
             */
            batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_delete`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchDelete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.record&apiName=batch_get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=bitable&resource=app.table.record&version=v1 document }
             *
             * 批量获取多维表格记录
             */
            batchGet: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_get`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchGet"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.record&apiName=batch_update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-record/batch_update document }
             *
             * 更新多条记录
             *
             * 该接口用于更新数据表中的多条记录，单次调用最多更新 500 条记录。
             *
             * 该接口支持调用频率上限为 10 QPS
             */
            batchUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_update`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchUpdate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.record&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-record/create document }
             *
             * 新增记录
             *
             * 该接口用于在数据表中新增一条记录
             *
             * 该接口支持调用频率上限为 10 QPS（Query Per Second，每秒请求率）
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.record&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-record/delete document }
             *
             * 删除记录
             *
             * 该接口用于删除数据表中的一条记录
             *
             * 该接口支持调用频率上限为 10 QPS
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.record&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-record/get document }
             *
             * 检索记录
             *
             * 该接口用于根据 record_id 的值检索现有记录
             *
             * 该接口支持调用频率上限为 20 QPS
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.record&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-record/list document }
             *
             * 列出记录
             *
             * 该接口用于列出数据表中的现有记录，单次最多列出 500 行记录，支持分页获取。
             *
             * 该接口支持调用频率上限为 10 QPS（Query Per Second，每秒请求率），1000 QPM（Query Per Minute，每分钟请求率）
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`, path2),
                  method: "POST",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "searchWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.record&apiName=search&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=bitable&resource=app.table.record&version=v1 document }
             *
             * 查找多维表格记录
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.record&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-record/update document }
             *
             * 更新记录
             *
             * 该接口用于更新数据表中的一条记录
             *
             * 该接口支持调用频率上限为 10 QPS（Query Per Second，每秒请求率）
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 视图
           */
          appTableView: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.view&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-view/create document }
             *
             * 新增视图
             *
             * 在数据表中新增一个视图
             *
             * 该接口支持调用频率上限为 10 QPS
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.view&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-view/delete document }
             *
             * 删除视图
             *
             * 删除数据表中的视图
             *
             * 该接口支持调用频率上限为 10 QPS
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.view&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-view/get document }
             *
             * 检索视图
             *
             * 该接口根据 view_id 检索现有视图
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.view&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-view/list document }
             *
             * 列出视图
             *
             * 根据 app_token 和 table_id，获取数据表的所有视图
             *
             * 该接口支持调用频率上限为 20 QPS
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.view&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-view/patch document }
             *
             * 更新视图
             *
             * 该接口用于增量修改视图信息
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * app.workflow
           */
          appWorkflow: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.workflow&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=bitable&resource=app.workflow&version=v1 document }
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.workflow&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=bitable&resource=app.workflow&version=v1 document }
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows/:workflow_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          v1: {
            /**
             * 多维表格
             */
            app: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app&apiName=copy&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=copy&project=bitable&resource=app&version=v1 document }
               */
              copy: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/copy`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "copy"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=bitable&resource=app&version=v1 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app/get document }
               *
               * 获取多维表格元数据
               *
               * 获取指定多维表格的元数据信息，包括多维表格名称，多维表格版本号，多维表格是否开启高级权限等。
               *
               * 该接口支持调用频率上限为 20 QPS（Query Per Second，每秒请求率）
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app/update document }
               *
               * 更新多维表格元数据
               *
               * 通过 app_token 更新多维表格元数据
               *
               * 该接口支持调用频率上限为 10 QPS
               *
               * - 飞书文档、飞书表格、知识库中的多维表格不支持开启高级权限;- 此接口非原子操作，先修改多维表格名字，后开关高级权限。可能存在部分成功的情况
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 仪表盘
             */
            appDashboard: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.dashboard&apiName=copy&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-dashboard/copy document }
               *
               * 复制仪表盘
               *
               * 该接口用于根据现有仪表盘复制出新的仪表盘
               */
              copy: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards/:block_id/copy`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "copy"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.dashboard&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-dashboard/list document }
               *
               * 列出仪表盘
               *
               * 根据 app_token，获取多维表格下的所有仪表盘
               *
               * 该接口支持调用频率上限为 20 QPS
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/dashboards`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 自定义角色
             */
            appRole: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.role&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-role/create document }
               *
               * 新增自定义角色
               *
               * 新增自定义角色
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.role&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-role/delete document }
               *
               * 删除自定义角色
               *
               * 删除自定义角色
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.role&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-role/list document }
               *
               * 列出自定义角色
               *
               * 列出自定义角色
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.role&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-role/update document }
               *
               * 更新自定义角色
               *
               * 更新自定义角色
               *
               * 更新自定义角色是全量更新，会完全覆盖旧的自定义角色设置
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 协作者
             */
            appRoleMember: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.role.member&apiName=batch_create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-role-member/batch_create document }
               *
               * 批量新增协作者
               *
               * 批量新增自定义角色的协作者
               */
              batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_create`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchCreate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.role.member&apiName=batch_delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-role-member/batch_delete document }
               *
               * 批量删除协作者
               *
               * 批量删除自定义角色的协作者
               */
              batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/batch_delete`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchDelete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.role.member&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-role-member/create document }
               *
               * 新增协作者
               *
               * 新增自定义角色的协作者
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.role.member&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-role-member/delete document }
               *
               * 删除协作者
               *
               * 删除自定义角色的协作者
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members/:member_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.role.member&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-role-member/list document }
               *
               * 列出协作者
               *
               * 列出自定义角色的协作者
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/roles/:role_id/members`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 数据表
             */
            appTable: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table&apiName=batch_create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table/batch_create document }
               *
               * 新增多个数据表
               *
               * 新增多个数据表
               *
               * 该接口支持调用频率上限为 10 QPS
               */
              batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_create`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchCreate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table&apiName=batch_delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table/batch_delete document }
               *
               * 删除多个数据表
               *
               * 删除多个数据表
               *
               * 该接口支持调用频率上限为 10 QPS
               */
              batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/batch_delete`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchDelete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table/create document }
               *
               * 新增数据表
               *
               * 新增一个数据表
               *
               * 该接口支持调用频率上限为 10 QPS
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table/delete document }
               *
               * 删除数据表
               *
               * 删除一个数据表
               *
               * 该接口支持调用频率上限为 10 QPS
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table/list document }
               *
               * 列出数据表
               *
               * 根据  app_token，获取多维表格下的所有数据表
               *
               * 该接口支持调用频率上限为 20 QPS
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table/patch document }
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 字段
             */
            appTableField: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.field&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-field/create document }
               *
               * 新增字段
               *
               * 该接口用于在数据表中新增一个字段
               *
               * 该接口支持调用频率上限为 10 QPS
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.field&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-field/delete document }
               *
               * 删除字段
               *
               * 该接口用于在数据表中删除一个字段
               *
               * 该接口支持调用频率上限为 10 QPS
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.field&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-field/list document }
               *
               * 列出字段
               *
               * 根据 app_token 和 table_id，获取数据表的所有字段
               *
               * 该接口支持调用频率上限为 20 QPS
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.field&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-field/update document }
               *
               * 更新字段
               *
               * 该接口用于在数据表中更新一个字段
               *
               * 该接口支持调用频率上限为 10 QPS
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 表单
             */
            appTableFormField: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.form.field&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-form-field/list document }
               *
               * 列出表单问题
               *
               * 列出表单的所有问题项
               *
               * 该接口支持调用频率上限为 20 QPS
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.form.field&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-form-field/patch document }
               *
               * 更新表单问题
               *
               * 该接口用于更新表单中的问题项
               *
               * 该接口支持调用频率上限为 10 QPS
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/fields/:field_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 表单
             */
            appTableForm: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.form&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-form/get document }
               *
               * 获取表单元数据
               *
               * 获取表单的所有元数据项
               *
               * 该接口支持调用频率上限为 20 QPS
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.form&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-form/patch document }
               *
               * 更新表单元数据
               *
               * 该接口用于更新表单中的元数据项
               *
               * 该接口支持调用频率上限为 10 QPS
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 记录
             */
            appTableRecord: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.record&apiName=batch_create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-record/batch_create document }
               *
               * 新增多条记录
               *
               * 该接口用于在数据表中新增多条记录，单次调用最多新增 500 条记录。
               *
               * 该接口支持调用频率上限为 10 QPS（Query Per Second，每秒请求率）
               */
              batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_create`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchCreate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.record&apiName=batch_delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-record/batch_delete document }
               *
               * 删除多条记录
               *
               * 该接口用于删除数据表中现有的多条记录，单次调用中最多删除 500 条记录。
               *
               * 该接口支持调用频率上限为 10 QPS
               */
              batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_delete`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchDelete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.record&apiName=batch_get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=bitable&resource=app.table.record&version=v1 document }
               *
               * 批量获取多维表格记录
               */
              batchGet: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_get`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchGet"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.record&apiName=batch_update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-record/batch_update document }
               *
               * 更新多条记录
               *
               * 该接口用于更新数据表中的多条记录，单次调用最多更新 500 条记录。
               *
               * 该接口支持调用频率上限为 10 QPS
               */
              batchUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/batch_update`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchUpdate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.record&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-record/create document }
               *
               * 新增记录
               *
               * 该接口用于在数据表中新增一条记录
               *
               * 该接口支持调用频率上限为 10 QPS（Query Per Second，每秒请求率）
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.record&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-record/delete document }
               *
               * 删除记录
               *
               * 该接口用于删除数据表中的一条记录
               *
               * 该接口支持调用频率上限为 10 QPS
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.record&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-record/get document }
               *
               * 检索记录
               *
               * 该接口用于根据 record_id 的值检索现有记录
               *
               * 该接口支持调用频率上限为 20 QPS
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.record&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-record/list document }
               *
               * 列出记录
               *
               * 该接口用于列出数据表中的现有记录，单次最多列出 500 行记录，支持分页获取。
               *
               * 该接口支持调用频率上限为 10 QPS（Query Per Second，每秒请求率），1000 QPM（Query Per Minute，每分钟请求率）
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.record&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=bitable&resource=app.table.record&version=v1 document }
               *
               * 查找多维表格记录
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.record&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-record/update document }
               *
               * 更新记录
               *
               * 该接口用于更新数据表中的一条记录
               *
               * 该接口支持调用频率上限为 10 QPS（Query Per Second，每秒请求率）
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/:record_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 视图
             */
            appTableView: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.view&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-view/create document }
               *
               * 新增视图
               *
               * 在数据表中新增一个视图
               *
               * 该接口支持调用频率上限为 10 QPS
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.view&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-view/delete document }
               *
               * 删除视图
               *
               * 删除数据表中的视图
               *
               * 该接口支持调用频率上限为 10 QPS
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.view&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-view/get document }
               *
               * 检索视图
               *
               * 该接口根据 view_id 检索现有视图
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.view&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-view/list document }
               *
               * 列出视图
               *
               * 根据 app_token 和 table_id，获取数据表的所有视图
               *
               * 该接口支持调用频率上限为 20 QPS
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table.view&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-view/patch document }
               *
               * 更新视图
               *
               * 该接口用于增量修改视图信息
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id/views/:view_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * app.workflow
             */
            appWorkflow: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.workflow&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=bitable&resource=app.workflow&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.workflow&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=bitable&resource=app.workflow&version=v1 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/workflows/:workflow_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            }
          }
        };
      }
    };
    var Client$V = class extends Client$W {
      static {
        __name(this, "Client$V");
      }
      constructor() {
        super(...arguments);
        this.block = {
          /**
           * 服务端 API
           */
          entity: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=block&resource=entity&apiName=create&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/block-v2/entity/create document }
             *
             * 创建 BlockEntity
             *
             * 开发者可以通过该接口将部分或全部数据存放于 BlockEntity。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/block/v2/entities`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=block&resource=entity&apiName=update&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/block-v2/entity/update document }
             *
             * 更新BlockEntity
             *
             * 开发者通过该接口可以更新存储在BlockEntity中的数据，并实时推送到端侧。
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/block/v2/entities/:block_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 服务端 API
           */
          message: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=block&resource=message&apiName=create&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/block-v2/message/create document }
             *
             * Block协同数据推送
             *
             * 根据BlockID向指定用户列表推送协同数据。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/block/v2/message`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create")
          },
          v2: {
            /**
             * 服务端 API
             */
            entity: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=block&resource=entity&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/block-v2/entity/create document }
               *
               * 创建 BlockEntity
               *
               * 开发者可以通过该接口将部分或全部数据存放于 BlockEntity。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/block/v2/entities`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=block&resource=entity&apiName=update&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/block-v2/entity/update document }
               *
               * 更新BlockEntity
               *
               * 开发者通过该接口可以更新存储在BlockEntity中的数据，并实时推送到端侧。
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/block/v2/entities/:block_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 服务端 API
             */
            message: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=block&resource=message&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/block-v2/message/create document }
               *
               * Block协同数据推送
               *
               * 根据BlockID向指定用户列表推送协同数据。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/block/v2/message`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create")
            }
          }
        };
      }
    };
    var Client$U = class extends Client$V {
      static {
        __name(this, "Client$U");
      }
      constructor() {
        super(...arguments);
        this.board = {
          v1: {
            /**
             * whiteboard
             */
            whiteboard: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=board&resource=whiteboard&apiName=download_as_image&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=download_as_image&project=board&resource=whiteboard&version=v1 document }
               *
               * 下载画板为图片
               */
              downloadAsImage: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/download_as_image`, path2),
                  method: "GET",
                  headers,
                  data,
                  params,
                  responseType: "stream",
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                  $return_headers: true
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                const checkIsReadable = /* @__PURE__ */ __name(() => {
                  const consumedError = "The stream has already been consumed";
                  if (!res.data.readable) {
                    this.logger.error(consumedError);
                    throw new Error(consumedError);
                  }
                }, "checkIsReadable");
                return {
                  writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                    checkIsReadable();
                    return new Promise((resolve, reject) => {
                      const writableStream = fs__default["default"].createWriteStream(filePath);
                      writableStream.on("finish", () => {
                        resolve(filePath);
                      });
                      writableStream.on("error", (e) => {
                        reject(e);
                      });
                      res.data.pipe(writableStream);
                    });
                  }), "writeFile"),
                  getReadableStream: /* @__PURE__ */ __name(() => {
                    checkIsReadable();
                    return res.data;
                  }, "getReadableStream"),
                  headers: res.headers
                };
              }), "downloadAsImage"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=board&resource=whiteboard&apiName=theme&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=theme&project=board&resource=whiteboard&version=v1 document }
               *
               * 获取画板的主题
               */
              theme: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/theme`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "theme"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=board&resource=whiteboard&apiName=update_theme&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update_theme&project=board&resource=whiteboard&version=v1 document }
               *
               * 更新画板主题
               */
              updateTheme: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/update_theme`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "updateTheme")
            },
            /**
             * whiteboard.node
             */
            whiteboardNode: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=board&resource=whiteboard.node&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=board&resource=whiteboard.node&version=v1 document }
               *
               * 在画板中创建节点
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=board&resource=whiteboard.node&apiName=create_plantuml&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create_plantuml&project=board&resource=whiteboard.node&version=v1 document }
               *
               * 创建 plant uml 图形
               */
              createPlantuml: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes/plantuml`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "createPlantuml"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=board&resource=whiteboard.node&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=board&resource=whiteboard.node&version=v1 document }
               *
               * 列出画板内的节点数据
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            }
          }
        };
      }
    };
    var Client$T = class extends Client$U {
      static {
        __name(this, "Client$T");
      }
      constructor() {
        super(...arguments);
        this.calendar = {
          /**
           * 日历访问控制
           */
          calendarAcl: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.acl&apiName=create&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-acl/create document }
             *
             * 创建访问控制
             *
             * 该接口用于以当前身份（应用 / 用户）给日历添加访问控制权限，即日历成员。;;身份由 Header Authorization 的 Token 类型决定。
             *
             * 当前身份需要有日历的 owner 权限，并且日历的类型只能为 primary 或 shared。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.acl&apiName=delete&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-acl/delete document }
             *
             * 删除访问控制
             *
             * 该接口用于以当前身份（应用 / 用户）删除日历的控制权限，即日历成员。;;身份由 Header Authorization 的 Token 类型决定。
             *
             * 当前身份需要有日历的 owner 权限，并且日历的类型只能为 primary 或 shared。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/:acl_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.acl&apiName=list&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-acl/list document }
             *
             * 获取访问控制列表
             *
             * 该接口用于以当前身份（应用 / 用户）获取日历的控制权限列表。;;身份由 Header Authorization 的 Token 类型决定。
             *
             * 当前身份需要有日历的 owner 权限，并且日历的类型只能为 primary 或 shared。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.acl&apiName=subscription&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-acl/subscription document }
             *
             * 订阅日历访问控制变更事件;
             *
             * 该接口用于以用户身份订阅指定日历下的日历成员变更事件。
             *
             * 用户必须对日历有访问权限。
             */
            subscription: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/subscription`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "subscription"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.acl&apiName=unsubscription&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-acl/unsubscription document }
             *
             * 取消订阅日历访问控制变更事件
             *
             * 该接口用于以用户身份取消订阅指定日历下的日历成员变更事件。
             *
             * 用户必须对日历有访问权限。
             */
            unsubscription: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/unsubscription`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "unsubscription")
          },
          /**
           * 日历管理
           */
          calendar: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=create&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/create document }
             *
             * 创建共享日历
             *
             * 该接口用于为当前身份（应用 / 用户）创建一个共享日历。;;身份由 Header Authorization 的 Token 类型决定。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=delete&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/delete document }
             *
             * 删除共享日历
             *
             * 该接口用于以当前身份（应用 / 用户）删除一个共享日历。;;身份由 Header Authorization 的 Token 类型决定。
             *
             * 当前身份必须对日历具有 owner 权限。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=get&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/get document }
             *
             * 查询日历信息
             *
             * 该接口用于以当前身份（应用 / 用户）根据日历 ID 获取日历信息。;;身份由 Header Authorization 的 Token 类型决定。
             *
             * 当前身份必须对日历有访问权限。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=list&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/list document }
             *
             * 查询日历列表
             *
             * 该接口用于分页获得当前身份（应用 / 用户）的日历列表。;;身份由 Header Authorization 的 Token 类型决定。
             *
             * 调用时首先使用 page_token 分页拉取存量数据，之后使用 sync_token 增量同步变更数据。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=mget&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=mget&project=calendar&resource=calendar&version=v4 document }
             */
            mget: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/mget`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "mget"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=patch&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/patch document }
             *
             * 更新日历信息
             *
             * 该接口用于以当前身份（应用 / 用户）修改日历信息。;;身份由 Header Authorization 的 Token 类型决定。
             *
             * 当前身份对日历有 owner 权限时，可修改全局字段：summary, description, permission。;;当前身份对日历不具有 owner 权限时，仅可修改对自己生效的字段：color, summary_alias。
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=primary&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/primary document }
             *
             * 查询主日历信息
             *
             * 获取当前身份的主日历信息。
             */
            primary: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/primary`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "primary"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=primarys&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=primarys&project=calendar&resource=calendar&version=v4 document }
             */
            primarys: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/primarys`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "primarys"),
            searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/search`, path2),
                  method: "POST",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "searchWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=search&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/search document }
             *
             * 搜索日历
             *
             * 该接口用于通过关键字查询公共日历或用户主日历。
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=subscribe&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/subscribe document }
             *
             * 订阅日历
             *
             * 该接口用于以当前身份（应用 / 用户）订阅某个日历。;;身份由 Header Authorization 的 Token 类型决定。
             *
             * - 仅可订阅类型为 primary 或 shared 的公开日历。;- 可订阅日历数量上限为1000。
             */
            subscribe: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/subscribe`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "subscribe"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=subscription&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/subscription document }
             *
             * 订阅日历变更事件
             *
             * 该接口用于以用户身份订阅当前身份下日历列表中的所有日历变更。
             */
            subscription: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/subscription`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "subscription"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=unsubscribe&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/unsubscribe document }
             *
             * 取消订阅日历
             *
             * 该接口用于以当前身份（应用 / 用户）取消对某日历的订阅状态。;;身份由 Header Authorization 的 Token 类型决定。
             *
             * 仅可操作已经被当前身份订阅的日历。
             */
            unsubscribe: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/unsubscribe`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "unsubscribe"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=unsubscription&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/unsubscription document }
             *
             * 取消订阅日历变更事件
             *
             * 该接口用于以用户身份取消订阅当前身份下日历列表中的日历变更事件。
             */
            unsubscription: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/unsubscription`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "unsubscription")
          },
          /**
           * 日程参与人
           */
          calendarEventAttendee: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.attendee&apiName=batch_delete&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/batch_delete document }
             *
             * 删除日程参与人
             *
             * 批量删除日程的参与人。
             *
             * - 当前身份需要有日历的 writer 或 owner 权限，并且日历的类型只能为 primary 或 shared。;;- 当前身份需要是日程的组织者。
             */
            batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/batch_delete`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchDelete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.attendee&apiName=create&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/create document }
             *
             * 创建日程参与人;
             *
             * 批量给日程添加参与人。
             *
             * - 当前身份需要有日历的 writer 或 owner 权限，并且日历的类型只能为 primary 或 shared。;;- 当前身份需要是日程的组织者，或日程设置了「参与人可邀请其它参与人」权限。;;- 新添加的日程参与人必须与日程组织者在同一个企业内。;;- 使用该接口添加会议室后，会议室会进入异步的预约流程，请求结束不代表会议室预约成功，需后续再查询预约状态。;;- 每个日程最多只能有 3000 名参与人。;;- 开启管理员能力后预约会议室可不受会议室预约范围的限制（当前不支持用管理员身份给其他人的日程预约会议室）
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.attendee&apiName=list&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/list document }
             *
             * 获取日程参与人列表
             *
             * 获取日程的参与人列表，若参与者列表中有群组，请使用 [获取参与人群成员列表](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee-chat_member/list) 。
             *
             * - 当前身份必须对日历有reader、writer或owner权限（调用[获取日历](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/get)接口，role字段可查看权限）。;;- 当前身份必须有权限查看日程的参与人列表。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 日程参与人群成员
           */
          calendarEventAttendeeChatMember: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.attendee.chat_member&apiName=list&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee-chat_member/list document }
             *
             * 获取日程参与群成员列表
             *
             * 获取日程的群参与人的群成员列表。
             *
             * - 当前身份必须有权限查看日程的参与人列表。;;- 当前身份必须在群聊中，或有权限查看群成员列表。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 日程
           */
          calendarEvent: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event&apiName=create&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/create document }
             *
             * 创建日程
             *
             * 该接口用于以当前身份（应用 / 用户）在日历上创建一个日程。;;身份由 Header Authorization 的 Token 类型决定。
             *
             * 当前身份必须对日历有 writer 或 owner 权限，并且日历的类型只能为 primary 或 shared。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event&apiName=delete&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/delete document }
             *
             * 删除日程
             *
             * 该接口用于以当前身份（应用 / 用户）删除日历上的一个日程。;;身份由 Header Authorization 的 Token 类型决定。
             *
             * 当前身份必须对日历有 writer 或 owner 权限，并且日历的类型只能为 primary 或 shared。;;当前身份必须是日程的组织者。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event&apiName=get&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/get document }
             *
             * 获取日程
             *
             * 该接口用于以当前身份（应用 / 用户）获取日历上的一个日程。;身份由 Header Authorization 的 Token 类型决定。
             *
             * - 当前身份必须对日历有reader、writer或owner权限才会返回日程详细信息（调用[获取日历](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/get)接口，role字段可查看权限）。;- [例外日程](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/introduction#71c5ec78)可通过event_id的非0时间戳后缀，来获取修改的重复性日程的哪一天日程的时间信息。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event&apiName=instance_view&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=instance_view&project=calendar&resource=calendar.event&version=v4 document }
             */
            instanceView: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/instance_view`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "instanceView"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event&apiName=instances&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=instances&project=calendar&resource=calendar.event&version=v4 document }
             */
            instances: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/instances`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "instances"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event&apiName=list&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/list document }
             *
             * 获取日程列表
             *
             * 该接口用于以当前身份（应用 / 用户）获取日历下的日程列表。;身份由 Header Authorization 的 Token 类型决定。
             *
             * - 当前身份必须对日历有reader、writer或owner权限才会返回日程详细信息（调用[获取日历](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/get)接口，role字段可查看权限）。;;- 仅支持primary、shared和resource类型的日历获取日程列表。;;- page_token 分页拉取存量数据，sync_token 增量同步变更数据；目前仅传anchor_time时，会返回page_token。;;- 为了确保调用方日程同步数据的一致性，在使用sync_token时，不能同时使用start_time和end_time，否则可能造成日程数据缺失。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event&apiName=patch&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/patch document }
             *
             * 更新日程
             *
             * 该接口用于以当前身份（应用 / 用户）更新日历上的一个日程。;;身份由 Header Authorization 的 Token 类型决定。
             *
             * 当前身份必须对日历有 writer 或 owner 权限，并且日历的类型只能为 primary 或 shared。;;当前身份为日程组织者时，可修改所有可编辑字段。;;当前身份为日程参与者时，仅可编辑部分字段。（如：visibility, free_busy_status, color, reminders）
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event&apiName=reply&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=reply&project=calendar&resource=calendar.event&version=v4 document }
             */
            reply: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/reply`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "reply"),
            searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`, path2),
                  method: "POST",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "searchWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event&apiName=search&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/search document }
             *
             * 搜索日程
             *
             * 该接口用于以用户身份搜索某日历下的相关日程。;;身份由 Header Authorization 的 Token 类型决定。
             *
             * 当前身份必须对日历有reader、writer或owner权限（调用[获取日历](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/get)接口，role字段可查看权限）。
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event&apiName=subscription&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/subscription document }
             *
             * 订阅日程变更事件
             *
             * 该接口用于以用户身份订阅指定日历下的日程变更事件。
             *
             * 当前身份必须对日历有reader、writer或owner权限（调用[获取日历](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/get)接口，role字段可查看权限）。
             */
            subscription: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/subscription`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "subscription"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event&apiName=unsubscription&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/unsubscription document }
             *
             * 取消订阅日程变更事件
             *
             * 该接口用于以用户身份取消订阅指定日历下的日程变更事件。
             *
             * 当前身份必须对日历有reader、writer或owner权限（调用[获取日历](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/get)接口，role字段可查看权限）。
             */
            unsubscription: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/unsubscription`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "unsubscription")
          },
          /**
           * calendar.event.meeting_chat
           */
          calendarEventMeetingChat: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.meeting_chat&apiName=create&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=calendar&resource=calendar.event.meeting_chat&version=v4 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.meeting_chat&apiName=delete&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=calendar&resource=calendar.event.meeting_chat&version=v4 document }
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete")
          },
          /**
           * calendar.event.meeting_minute
           */
          calendarEventMeetingMinute: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.meeting_minute&apiName=create&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=calendar&resource=calendar.event.meeting_minute&version=v4 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_minute`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create")
          },
          /**
           * Exchange绑定
           */
          exchangeBinding: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=exchange_binding&apiName=create&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/exchange_binding/create document }
             *
             * 创建Exchange绑定关系
             *
             * 本接口将Exchange账户绑定到飞书账户，进而支持Exchange日历的导入
             *
             * 操作用户需要是企业超级管理员
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/exchange_bindings`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=exchange_binding&apiName=delete&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/exchange_binding/delete document }
             *
             * 解除Exchange绑定关系
             *
             * 本接口解除Exchange账户和飞书账户的绑定关系，Exchange账户解除绑定后才能绑定其他飞书账户
             *
             * 操作用户需要是企业超级管理员
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=exchange_binding&apiName=get&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/exchange_binding/get document }
             *
             * 获取绑定状态
             *
             * 本接口获取Exchange账户的绑定状态，包括exchange日历是否同步完成。
             *
             * 操作用户需要是企业超级管理员
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          /**
           * freebusy
           */
          freebusy: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=freebusy&apiName=batch&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch&project=calendar&resource=freebusy&version=v4 document }
             */
            batch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/freebusy/batch`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batch"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=freebusy&apiName=list&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/freebusy/list document }
             *
             * 查询主日历忙闲信息
             *
             * 查询用户主日历或会议室的忙闲信息。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/freebusy/list`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 日历设置
           */
          setting: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=setting&apiName=generate_caldav_conf&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/setting/generate_caldav_conf document }
             *
             * 生成CalDAV配置
             *
             * 用于为当前用户生成一个CalDAV账号密码，用于将飞书日历信息同步到本地设备日历。
             */
            generateCaldavConf: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/settings/generate_caldav_conf`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "generateCaldavConf")
          },
          /**
           * 请假
           */
          timeoffEvent: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=timeoff_event&apiName=create&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/timeoff_event/create document }
             *
             * 创建请假日程
             *
             * 为指定用户创建一个请假日程，可以是一个普通请假日程，也可以是一个全天日程。;创建请假日程后，会在相应时间内，在用户个人签名页展示请假信息。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/timeoff_events`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=timeoff_event&apiName=delete&version=v4 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/timeoff_event/delete document }
             *
             * 删除请假日程
             *
             * 删除一个指定的请假日程，请假日程删除，用户个人签名页的请假信息也会消失。;一个应用只能删除自己创建的请假日程。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/calendar/v4/timeoff_events/:timeoff_event_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete")
          },
          v4: {
            /**
             * 日历访问控制
             */
            calendarAcl: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.acl&apiName=create&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-acl/create document }
               *
               * 创建访问控制
               *
               * 该接口用于以当前身份（应用 / 用户）给日历添加访问控制权限，即日历成员。;;身份由 Header Authorization 的 Token 类型决定。
               *
               * 当前身份需要有日历的 owner 权限，并且日历的类型只能为 primary 或 shared。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.acl&apiName=delete&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-acl/delete document }
               *
               * 删除访问控制
               *
               * 该接口用于以当前身份（应用 / 用户）删除日历的控制权限，即日历成员。;;身份由 Header Authorization 的 Token 类型决定。
               *
               * 当前身份需要有日历的 owner 权限，并且日历的类型只能为 primary 或 shared。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/:acl_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.acl&apiName=list&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-acl/list document }
               *
               * 获取访问控制列表
               *
               * 该接口用于以当前身份（应用 / 用户）获取日历的控制权限列表。;;身份由 Header Authorization 的 Token 类型决定。
               *
               * 当前身份需要有日历的 owner 权限，并且日历的类型只能为 primary 或 shared。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.acl&apiName=subscription&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-acl/subscription document }
               *
               * 订阅日历访问控制变更事件;
               *
               * 该接口用于以用户身份订阅指定日历下的日历成员变更事件。
               *
               * 用户必须对日历有访问权限。
               */
              subscription: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/subscription`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "subscription"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.acl&apiName=unsubscription&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-acl/unsubscription document }
               *
               * 取消订阅日历访问控制变更事件
               *
               * 该接口用于以用户身份取消订阅指定日历下的日历成员变更事件。
               *
               * 用户必须对日历有访问权限。
               */
              unsubscription: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/acls/unsubscription`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "unsubscription")
            },
            /**
             * 日历管理
             */
            calendar: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=create&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/create document }
               *
               * 创建共享日历
               *
               * 该接口用于为当前身份（应用 / 用户）创建一个共享日历。;;身份由 Header Authorization 的 Token 类型决定。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=delete&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/delete document }
               *
               * 删除共享日历
               *
               * 该接口用于以当前身份（应用 / 用户）删除一个共享日历。;;身份由 Header Authorization 的 Token 类型决定。
               *
               * 当前身份必须对日历具有 owner 权限。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=get&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/get document }
               *
               * 查询日历信息
               *
               * 该接口用于以当前身份（应用 / 用户）根据日历 ID 获取日历信息。;;身份由 Header Authorization 的 Token 类型决定。
               *
               * 当前身份必须对日历有访问权限。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=list&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/list document }
               *
               * 查询日历列表
               *
               * 该接口用于分页获得当前身份（应用 / 用户）的日历列表。;;身份由 Header Authorization 的 Token 类型决定。
               *
               * 调用时首先使用 page_token 分页拉取存量数据，之后使用 sync_token 增量同步变更数据。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=mget&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=mget&project=calendar&resource=calendar&version=v4 document }
               */
              mget: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/mget`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "mget"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=patch&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/patch document }
               *
               * 更新日历信息
               *
               * 该接口用于以当前身份（应用 / 用户）修改日历信息。;;身份由 Header Authorization 的 Token 类型决定。
               *
               * 当前身份对日历有 owner 权限时，可修改全局字段：summary, description, permission。;;当前身份对日历不具有 owner 权限时，仅可修改对自己生效的字段：color, summary_alias。
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=primary&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/primary document }
               *
               * 查询主日历信息
               *
               * 获取当前身份的主日历信息。
               */
              primary: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/primary`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "primary"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=primarys&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=primarys&project=calendar&resource=calendar&version=v4 document }
               */
              primarys: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/primarys`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "primarys"),
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=search&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/search document }
               *
               * 搜索日历
               *
               * 该接口用于通过关键字查询公共日历或用户主日历。
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=subscribe&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/subscribe document }
               *
               * 订阅日历
               *
               * 该接口用于以当前身份（应用 / 用户）订阅某个日历。;;身份由 Header Authorization 的 Token 类型决定。
               *
               * - 仅可订阅类型为 primary 或 shared 的公开日历。;- 可订阅日历数量上限为1000。
               */
              subscribe: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/subscribe`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "subscribe"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=subscription&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/subscription document }
               *
               * 订阅日历变更事件
               *
               * 该接口用于以用户身份订阅当前身份下日历列表中的所有日历变更。
               */
              subscription: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/subscription`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "subscription"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=unsubscribe&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/unsubscribe document }
               *
               * 取消订阅日历
               *
               * 该接口用于以当前身份（应用 / 用户）取消对某日历的订阅状态。;;身份由 Header Authorization 的 Token 类型决定。
               *
               * 仅可操作已经被当前身份订阅的日历。
               */
              unsubscribe: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/unsubscribe`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "unsubscribe"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=unsubscription&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/unsubscription document }
               *
               * 取消订阅日历变更事件
               *
               * 该接口用于以用户身份取消订阅当前身份下日历列表中的日历变更事件。
               */
              unsubscription: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/unsubscription`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "unsubscription")
            },
            /**
             * 日程参与人
             */
            calendarEventAttendee: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.attendee&apiName=batch_delete&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/batch_delete document }
               *
               * 删除日程参与人
               *
               * 批量删除日程的参与人。
               *
               * - 当前身份需要有日历的 writer 或 owner 权限，并且日历的类型只能为 primary 或 shared。;;- 当前身份需要是日程的组织者。
               */
              batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/batch_delete`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchDelete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.attendee&apiName=create&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/create document }
               *
               * 创建日程参与人;
               *
               * 批量给日程添加参与人。
               *
               * - 当前身份需要有日历的 writer 或 owner 权限，并且日历的类型只能为 primary 或 shared。;;- 当前身份需要是日程的组织者，或日程设置了「参与人可邀请其它参与人」权限。;;- 新添加的日程参与人必须与日程组织者在同一个企业内。;;- 使用该接口添加会议室后，会议室会进入异步的预约流程，请求结束不代表会议室预约成功，需后续再查询预约状态。;;- 每个日程最多只能有 3000 名参与人。;;- 开启管理员能力后预约会议室可不受会议室预约范围的限制（当前不支持用管理员身份给其他人的日程预约会议室）
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.attendee&apiName=list&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/list document }
               *
               * 获取日程参与人列表
               *
               * 获取日程的参与人列表，若参与者列表中有群组，请使用 [获取参与人群成员列表](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee-chat_member/list) 。
               *
               * - 当前身份必须对日历有reader、writer或owner权限（调用[获取日历](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/get)接口，role字段可查看权限）。;;- 当前身份必须有权限查看日程的参与人列表。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 日程参与人群成员
             */
            calendarEventAttendeeChatMember: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.attendee.chat_member&apiName=list&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee-chat_member/list document }
               *
               * 获取日程参与群成员列表
               *
               * 获取日程的群参与人的群成员列表。
               *
               * - 当前身份必须有权限查看日程的参与人列表。;;- 当前身份必须在群聊中，或有权限查看群成员列表。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/:attendee_id/chat_members`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 日程
             */
            calendarEvent: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event&apiName=create&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/create document }
               *
               * 创建日程
               *
               * 该接口用于以当前身份（应用 / 用户）在日历上创建一个日程。;;身份由 Header Authorization 的 Token 类型决定。
               *
               * 当前身份必须对日历有 writer 或 owner 权限，并且日历的类型只能为 primary 或 shared。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event&apiName=delete&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/delete document }
               *
               * 删除日程
               *
               * 该接口用于以当前身份（应用 / 用户）删除日历上的一个日程。;;身份由 Header Authorization 的 Token 类型决定。
               *
               * 当前身份必须对日历有 writer 或 owner 权限，并且日历的类型只能为 primary 或 shared。;;当前身份必须是日程的组织者。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event&apiName=get&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/get document }
               *
               * 获取日程
               *
               * 该接口用于以当前身份（应用 / 用户）获取日历上的一个日程。;身份由 Header Authorization 的 Token 类型决定。
               *
               * - 当前身份必须对日历有reader、writer或owner权限才会返回日程详细信息（调用[获取日历](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/get)接口，role字段可查看权限）。;- [例外日程](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/introduction#71c5ec78)可通过event_id的非0时间戳后缀，来获取修改的重复性日程的哪一天日程的时间信息。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event&apiName=instance_view&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=instance_view&project=calendar&resource=calendar.event&version=v4 document }
               */
              instanceView: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/instance_view`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "instanceView"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event&apiName=instances&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=instances&project=calendar&resource=calendar.event&version=v4 document }
               */
              instances: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/instances`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "instances"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event&apiName=list&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/list document }
               *
               * 获取日程列表
               *
               * 该接口用于以当前身份（应用 / 用户）获取日历下的日程列表。;身份由 Header Authorization 的 Token 类型决定。
               *
               * - 当前身份必须对日历有reader、writer或owner权限才会返回日程详细信息（调用[获取日历](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/get)接口，role字段可查看权限）。;;- 仅支持primary、shared和resource类型的日历获取日程列表。;;- page_token 分页拉取存量数据，sync_token 增量同步变更数据；目前仅传anchor_time时，会返回page_token。;;- 为了确保调用方日程同步数据的一致性，在使用sync_token时，不能同时使用start_time和end_time，否则可能造成日程数据缺失。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event&apiName=patch&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/patch document }
               *
               * 更新日程
               *
               * 该接口用于以当前身份（应用 / 用户）更新日历上的一个日程。;;身份由 Header Authorization 的 Token 类型决定。
               *
               * 当前身份必须对日历有 writer 或 owner 权限，并且日历的类型只能为 primary 或 shared。;;当前身份为日程组织者时，可修改所有可编辑字段。;;当前身份为日程参与者时，仅可编辑部分字段。（如：visibility, free_busy_status, color, reminders）
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event&apiName=reply&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=reply&project=calendar&resource=calendar.event&version=v4 document }
               */
              reply: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/reply`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "reply"),
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event&apiName=search&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/search document }
               *
               * 搜索日程
               *
               * 该接口用于以用户身份搜索某日历下的相关日程。;;身份由 Header Authorization 的 Token 类型决定。
               *
               * 当前身份必须对日历有reader、writer或owner权限（调用[获取日历](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/get)接口，role字段可查看权限）。
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event&apiName=subscription&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/subscription document }
               *
               * 订阅日程变更事件
               *
               * 该接口用于以用户身份订阅指定日历下的日程变更事件。
               *
               * 当前身份必须对日历有reader、writer或owner权限（调用[获取日历](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/get)接口，role字段可查看权限）。
               */
              subscription: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/subscription`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "subscription"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event&apiName=unsubscription&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/unsubscription document }
               *
               * 取消订阅日程变更事件
               *
               * 该接口用于以用户身份取消订阅指定日历下的日程变更事件。
               *
               * 当前身份必须对日历有reader、writer或owner权限（调用[获取日历](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/get)接口，role字段可查看权限）。
               */
              unsubscription: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/unsubscription`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "unsubscription")
            },
            /**
             * calendar.event.meeting_chat
             */
            calendarEventMeetingChat: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.meeting_chat&apiName=create&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=calendar&resource=calendar.event.meeting_chat&version=v4 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.meeting_chat&apiName=delete&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=calendar&resource=calendar.event.meeting_chat&version=v4 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete")
            },
            /**
             * calendar.event.meeting_minute
             */
            calendarEventMeetingMinute: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.meeting_minute&apiName=create&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=calendar&resource=calendar.event.meeting_minute&version=v4 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_minute`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create")
            },
            /**
             * Exchange绑定
             */
            exchangeBinding: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=exchange_binding&apiName=create&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/exchange_binding/create document }
               *
               * 创建Exchange绑定关系
               *
               * 本接口将Exchange账户绑定到飞书账户，进而支持Exchange日历的导入
               *
               * 操作用户需要是企业超级管理员
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/exchange_bindings`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=exchange_binding&apiName=delete&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/exchange_binding/delete document }
               *
               * 解除Exchange绑定关系
               *
               * 本接口解除Exchange账户和飞书账户的绑定关系，Exchange账户解除绑定后才能绑定其他飞书账户
               *
               * 操作用户需要是企业超级管理员
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=exchange_binding&apiName=get&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/exchange_binding/get document }
               *
               * 获取绑定状态
               *
               * 本接口获取Exchange账户的绑定状态，包括exchange日历是否同步完成。
               *
               * 操作用户需要是企业超级管理员
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/exchange_bindings/:exchange_binding_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * freebusy
             */
            freebusy: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=freebusy&apiName=batch&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch&project=calendar&resource=freebusy&version=v4 document }
               */
              batch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/freebusy/batch`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=freebusy&apiName=list&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/freebusy/list document }
               *
               * 查询主日历忙闲信息
               *
               * 查询用户主日历或会议室的忙闲信息。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/freebusy/list`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 日历设置
             */
            setting: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=setting&apiName=generate_caldav_conf&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/setting/generate_caldav_conf document }
               *
               * 生成CalDAV配置
               *
               * 用于为当前用户生成一个CalDAV账号密码，用于将飞书日历信息同步到本地设备日历。
               */
              generateCaldavConf: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/settings/generate_caldav_conf`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "generateCaldavConf")
            },
            /**
             * 请假
             */
            timeoffEvent: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=timeoff_event&apiName=create&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/timeoff_event/create document }
               *
               * 创建请假日程
               *
               * 为指定用户创建一个请假日程，可以是一个普通请假日程，也可以是一个全天日程。;创建请假日程后，会在相应时间内，在用户个人签名页展示请假信息。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/timeoff_events`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=timeoff_event&apiName=delete&version=v4 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/timeoff_event/delete document }
               *
               * 删除请假日程
               *
               * 删除一个指定的请假日程，请假日程删除，用户个人签名页的请假信息也会消失。;一个应用只能删除自己创建的请假日程。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/calendar/v4/timeoff_events/:timeoff_event_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete")
            }
          }
        };
      }
    };
    var Client$S = class extends Client$T {
      static {
        __name(this, "Client$S");
      }
      constructor() {
        super(...arguments);
        this.cardkit = {
          v1: {
            /**
             * card
             */
            card: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=cardkit&resource=card&apiName=batch_update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_update&project=cardkit&resource=card&version=v1 document }
               *
               * 按指定的多个操作批量局部更新卡片，支持更新卡片设置、添加组件、删除组件、更新组件
               */
              batchUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/batch_update`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchUpdate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=cardkit&resource=card&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=cardkit&resource=card&version=v1 document }
               *
               * 创建卡片实例，成功后可通过发送消息等接口发送卡片实例
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/cardkit/v1/cards`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=cardkit&resource=card&apiName=id_convert&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=id_convert&project=cardkit&resource=card&version=v1 document }
               *
               * 获取消息 id 对应的卡片 id
               */
              idConvert: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/cardkit/v1/cards/id_convert`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "idConvert"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=cardkit&resource=card&apiName=settings&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=settings&project=cardkit&resource=card&version=v1 document }
               *
               * 更新指定的卡片设置
               */
              settings: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/settings`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "settings"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=cardkit&resource=card&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=cardkit&resource=card&version=v1 document }
               *
               * 对卡片进行全量更新，即：以全新的卡片内容更新已有卡片
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/cardkit/v1/cards/:card_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * card.element
             */
            cardElement: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=cardkit&resource=card.element&apiName=content&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=content&project=cardkit&resource=card.element&version=v1 document }
               *
               * 以传入的文本内容覆盖已有卡片组件内容，卡片将自动识别其中的增量变更内容，并以“打字机”效果输出。
               */
              content: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id/content`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "content"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=cardkit&resource=card.element&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=cardkit&resource=card.element&version=v1 document }
               *
               * 在卡片内指定位置添加组件
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=cardkit&resource=card.element&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=cardkit&resource=card.element&version=v1 document }
               *
               * 删除卡片内的指定组件
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=cardkit&resource=card.element&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=cardkit&resource=card.element&version=v1 document }
               *
               * 以传入的配置覆盖指定组件的已有配置
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=cardkit&resource=card.element&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=cardkit&resource=card.element&version=v1 document }
               *
               * 以新组件全量替换更新指定组件
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/cardkit/v1/cards/:card_id/elements/:element_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            }
          }
        };
      }
    };
    var Client$R = class extends Client$S {
      static {
        __name(this, "Client$R");
      }
      constructor() {
        super(...arguments);
        this.comment_sdk = {};
      }
    };
    var Client$Q = class extends Client$R {
      static {
        __name(this, "Client$Q");
      }
      constructor() {
        super(...arguments);
        this.compensation = {
          v1: {
            /**
             * archive
             */
            archive: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=archive&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=compensation&resource=archive&version=v1 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/compensation/v1/archives`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=archive&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=compensation&resource=archive&version=v1 document }
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/compensation/v1/archives/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * change_reason
             */
            changeReason: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/compensation/v1/change_reasons`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=change_reason&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=compensation&resource=change_reason&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/compensation/v1/change_reasons`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * indicator
             */
            indicator: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/compensation/v1/indicators`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=indicator&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=compensation&resource=indicator&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/compensation/v1/indicators`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * item
             */
            item: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/compensation/v1/items`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=item&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=compensation&resource=item&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/compensation/v1/items`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * item_category
             */
            itemCategory: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/compensation/v1/item_categories`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=item_category&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=compensation&resource=item_category&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/compensation/v1/item_categories`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * lump_sum_payment
             */
            lumpSumPayment: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=lump_sum_payment&apiName=batch_create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=compensation&resource=lump_sum_payment&version=v1 document }
               */
              batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_create`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchCreate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=lump_sum_payment&apiName=batch_remove&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_remove&project=compensation&resource=lump_sum_payment&version=v1 document }
               */
              batchRemove: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_remove`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchRemove"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=lump_sum_payment&apiName=batch_update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_update&project=compensation&resource=lump_sum_payment&version=v1 document }
               */
              batchUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_update`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchUpdate"),
              queryWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "queryWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=lump_sum_payment&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=compensation&resource=lump_sum_payment&version=v1 document }
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query"),
              queryDetailWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query_detail`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "queryDetailWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=lump_sum_payment&apiName=query_detail&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_detail&project=compensation&resource=lump_sum_payment&version=v1 document }
               */
              queryDetail: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query_detail`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "queryDetail")
            },
            /**
             * plan
             */
            plan: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/compensation/v1/plans`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=plan&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=compensation&resource=plan&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/compensation/v1/plans`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * recurring_payment
             */
            recurringPayment: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=recurring_payment&apiName=batch_create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=compensation&resource=recurring_payment&version=v1 document }
               *
               * 创建经常性支付记录
               */
              batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_create`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchCreate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=recurring_payment&apiName=batch_remove&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_remove&project=compensation&resource=recurring_payment&version=v1 document }
               *
               * 删除经常性支付记录
               */
              batchRemove: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_remove`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchRemove"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=recurring_payment&apiName=batch_update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_update&project=compensation&resource=recurring_payment&version=v1 document }
               *
               * 更新经常性支付记录
               */
              batchUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_update`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchUpdate"),
              queryWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/compensation/v1/recurring_payment/query`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "queryWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=recurring_payment&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=compensation&resource=recurring_payment&version=v1 document }
               *
               * 查询经常性支付记录
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/compensation/v1/recurring_payment/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * social_archive
             */
            socialArchive: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=social_archive&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=compensation&resource=social_archive&version=v1 document }
               *
               * 通过员工ID和生效时间查询参保档案
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/compensation/v1/social_archive/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * social_archive_adjust_record
             */
            socialArchiveAdjustRecord: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=social_archive_adjust_record&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=compensation&resource=social_archive_adjust_record&version=v1 document }
               *
               * 根据员工ID查询待增员、待减员记录
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/compensation/v1/social_archive_adjust_record/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * social_insurance
             */
            socialInsurance: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=social_insurance&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=compensation&resource=social_insurance&version=v1 document }
               *
               * 获取险种列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/compensation/v1/social_insurances`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * social_plan
             */
            socialPlan: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/compensation/v1/social_plans`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=social_plan&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=compensation&resource=social_plan&version=v1 document }
               *
               * 分页获取参保方案列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/compensation/v1/social_plans`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=social_plan&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=compensation&resource=social_plan&version=v1 document }
               *
               * 批量查询参保方案
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/compensation/v1/social_plans/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            }
          }
        };
      }
    };
    var Client$P = class extends Client$Q {
      static {
        __name(this, "Client$P");
      }
      constructor() {
        super(...arguments);
        this.contact = {
          /**
           * 自定义用户字段
           */
          customAttr: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/custom_attrs`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=custom_attr&apiName=list&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/custom_attr/list document }
             *
             * 获取企业自定义用户字段
             *
             * 获取企业自定义的用户字段配置信息
             *
             * 调用该接口前，需要先确认[企业管理员](https://www.feishu.cn/hc/zh-CN/articles/360049067822)在[企业管理后台 - 组织架构 - 成员字段管理](http://www.feishu.cn/admin/contacts/employee-field-new/custom) 自定义字段管理栏开启了“允许开放平台API调用“。;;![通讯录.gif](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/544738c94f13ef0b9ebaff53a5133cc7_E9EGMkXyzX.gif)
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/custom_attrs`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 部门
           */
          department: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=batch&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch&project=contact&resource=department&version=v3 document }
             */
            batch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/batch`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batch"),
            childrenWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "childrenWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=children&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/children document }
             *
             * 获取子部门列表
             *
             * 通过部门ID获取部门的子部门列表。
             *
             * - 部门ID 必填，根部门的部门ID 为0。;- 使用 `user_access_token` 时，返回该用户组织架构可见性范围（[登陆企业管理后台进行权限配置](https://www.feishu.cn/admin/security/permission/visibility)）内的所有可见部门。当进行递归查询时，最多1000个部门对该用户可见。;;- 使用 ;`tenant_access_token` 则基于应用的通讯录权限范围进行权限校验与过滤。;如果部门ID为0，会检验应用是否有全员通讯录权限，如果是非0 部门ID，则会校验应用是否有该部门的通讯录权限。无部门权限返回无部门通讯录权限错误码，有权限则返回部门下子部门列表（根据fetch_child决定是否递归）。
             */
            children: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "children"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=create&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/create document }
             *
             * 创建部门
             *
             * 该接口用于向通讯录中创建部门。
             *
             * 只可在应用的通讯录权限范围内的部门下创建部门。若需要在根部门下创建子部门，则应用通讯录权限范围需要设置为“全部成员”。应用商店应用无权限调用此接口。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=delete&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/delete document }
             *
             * 删除部门
             *
             * 该接口用于从通讯录中删除部门。
             *
             * 应用需要同时拥有待删除部门及其父部门的通讯录授权。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/:department_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=get&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/get document }
             *
             * 获取单个部门信息
             *
             * 该接口用于向通讯录获取单个部门信息。
             *
             * - 使用`tenant_access_token`时，应用需要拥有待查询部门的通讯录授权。如果需要获取根部门信息，则需要拥有全员权限。;- 使用`user_access_token`时，用户需要有待查询部门的可见性，如果需要获取根部门信息，则要求员工可见所有人。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/:department_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=list&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=contact&resource=department&version=v3 document }
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            parentWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/parent`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "parentWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=parent&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/parent document }
             *
             * 获取父部门信息
             *
             * 该接口用来递归获取部门父部门的信息，并按照由子到父的顺序返回有权限的父部门信息列表。
             *
             * 使用`tenant_access_token`时,该接口只返回可见性范围内的父部门信息。;例如：A >>B>>C>>D四级部门，通讯录权限只到B，那么查询D部门的parent，会返回B和C两级部门。;使用user_access_token时,该接口只返回对于用户可见的父部门信息。
             */
            parent: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/parent`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "parent"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=patch&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/patch document }
             *
             * 修改部门部分信息
             *
             * 该接口用于更新通讯录中部门的信息。
             *
             * 调用该接口需要具有该部门以及更新操作涉及的部门的通讯录权限。
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/:department_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch"),
            searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/search`, path2),
                  method: "POST",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "searchWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=search&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/search document }
             *
             * 搜索部门
             *
             * 搜索部门，用户通过关键词查询可见的部门数据，部门可见性需要管理员在后台配置。
             *
             * 部门存在，但用户搜索不到并不一定是搜索有问题，可能是管理员在后台配置了权限控制，导致用户无法搜索到该部门。
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=unbind_department_chat&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/unbind_department_chat document }
             *
             * 部门群转为普通群
             *
             * 通过该接口将部门群转为普通群。
             */
            unbindDepartmentChat: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/unbind_department_chat`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "unbindDepartmentChat"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=update&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/update document }
             *
             * 更新部门所有信息
             *
             * 该接口用于更新当前部门所有信息。
             *
             * - 调用该接口需要具有该部门与更新部门信息涉及的通讯录权限。;; - 没有填写的字段会被置为空值（order字段除外）。
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/:department_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=update_department_id&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update_department_id&project=contact&resource=department&version=v3 document }
             */
            updateDepartmentId: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/:department_id/update_department_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "updateDepartmentId")
          },
          /**
           * 人员类型
           */
          employeeTypeEnum: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=employee_type_enum&apiName=create&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/employee_type_enum/create document }
             *
             * 新增人员类型
             *
             * 新增自定义人员类型
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/employee_type_enums`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=employee_type_enum&apiName=delete&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/employee_type_enum/delete document }
             *
             * 删除人员类型
             *
             * 删除自定义人员类型
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/employee_type_enums`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=employee_type_enum&apiName=list&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/employee_type_enum/list document }
             *
             * 查询人员类型
             *
             * 该接口用于获取员工的人员类型
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/employee_type_enums`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=employee_type_enum&apiName=update&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/employee_type_enum/update document }
             *
             * 更新人员类型
             *
             * 更新自定义人员类型
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * functional_role
           */
          functionalRole: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role&apiName=create&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=contact&resource=functional_role&version=v3 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role&apiName=delete&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=contact&resource=functional_role&version=v3 document }
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role&apiName=update&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=contact&resource=functional_role&version=v3 document }
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * functional_role.member
           */
          functionalRoleMember: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role.member&apiName=batch_create&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=contact&resource=functional_role.member&version=v3 document }
             */
            batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_create`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchCreate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role.member&apiName=batch_delete&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=contact&resource=functional_role.member&version=v3 document }
             */
            batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_delete`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchDelete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role.member&apiName=get&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=contact&resource=functional_role.member&version=v3 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/:member_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role.member&apiName=list&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=contact&resource=functional_role.member&version=v3 document }
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role.member&apiName=scopes&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=scopes&project=contact&resource=functional_role.member&version=v3 document }
             */
            scopes: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/scopes`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "scopes")
          },
          /**
           * 用户组
           */
          group: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=group&apiName=create&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/create document }
             *
             * 创建用户组
             *
             * 使用该接口创建用户组，请注意创建用户组时应用的通讯录权限范围需为“全部员工”，否则会创建失败，[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/group`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=group&apiName=delete&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/delete document }
             *
             * 删除用户组
             *
             * 通过该接口可删除企业中的用户组，请注意删除用户组时应用的通讯录权限范围需为“全部员工”，否则会删除失败，[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=group&apiName=get&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/get document }
             *
             * 查询用户组
             *
             * 根据用户组 ID 查询某个用户组的基本信息，支持查询普通用户组和动态用户组。请确保应用的通讯录权限范围里包括该用户组或者是“全部员工”，[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=group&apiName=member_belong&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/member_belong document }
             *
             * 查询用户所属用户组
             *
             * 通过该接口可查询该用户所属的用户组列表，可分别查询普通用户组和动态用户组。如果应用的通讯录权限范围是“全部员工”，则可获取该员工所属的全部用户组列表。如果应用的通讯录权限范围不是“全部员工”，则仅可获取通讯录权限范围内该员工所属的用户组。[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
             */
            memberBelong: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/member_belong`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "memberBelong"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=group&apiName=patch&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/patch document }
             *
             * 更新用户组
             *
             * 使用该接口更新用户组信息，请注意更新用户组时应用的通讯录权限范围需为“全部员工”，否则会更新失败。[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch"),
            simplelistWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/simplelist`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "simplelistWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=group&apiName=simplelist&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/simplelist document }
             *
             * 查询用户组列表
             *
             * 通过该接口可查询企业的用户组列表，可分别查询普通用户组或动态用户组。如果应用的通讯录权限范围是“全部员工”，则可获取企业全部用户组列表。如果应用的通讯录权限范围不是“全部员工”，则仅可获取通讯录权限范围内的用户组。[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
             */
            simplelist: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/simplelist`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "simplelist")
          },
          /**
           * 用户组成员
           */
          groupMember: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=group.member&apiName=add&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/add document }
             *
             * 添加用户组成员
             *
             * 向用户组中添加成员(目前成员仅支持用户，未来会支持部门)，如果应用的通讯录权限范围是“全部员工”，则可将任何成员添加到任何用户组。如果应用的通讯录权限范围不是“全部员工”，则仅可将通讯录权限范围中的成员添加到通讯录权限范围的用户组中，[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
             */
            add: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id/member/add`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "add"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=group.member&apiName=batch_add&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/batch_add document }
             *
             * 批量添加用户组成员
             *
             * 向普通用户组中批量添加成员(目前仅支持添加用户，暂不支持添加部门），如果应用的通讯录权限范围是“全部员工”，则可将任何成员添加到任何用户组。如果应用的通讯录权限范围不是“全部员工”，则仅可将通讯录权限范围中的成员添加到通讯录权限范围的用户组中，[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
             *
             * 请求体中的member_type，目前仅支持user， 未来将支持department。
             */
            batchAdd: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_add`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchAdd"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=group.member&apiName=batch_remove&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/batch_remove document }
             *
             * 批量移除用户组成员
             *
             * 从普通用户组中批量移除成员 (目前仅支持移除用户，暂不支持移除部门）。如果应用的通讯录权限范围是“全部员工”，则可将任何成员移出任何用户组。如果应用的通讯录权限范围不是“全部员工”，则仅可将通讯录权限范围中的成员从通讯录权限范围的用户组中移除， [点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
             *
             * 请求体中的member_type，目前仅支持user， 未来将支持department。
             */
            batchRemove: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_remove`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchRemove"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=group.member&apiName=remove&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/remove document }
             *
             * 移除用户组成员
             *
             * 从用户组中移除成员 (目前成员仅支持用户，未来会支持部门)，如果应用的通讯录权限范围是“全部员工”，则可将任何成员移出任何用户组。如果应用的通讯录权限范围不是“全部员工”，则仅可将通讯录权限范围中的成员从通讯录权限范围的用户组中移除， [点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
             */
            remove: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id/member/remove`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "remove"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=group.member&apiName=simplelist&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/simplelist document }
             *
             * 查询用户组成员列表
             *
             * 通过该接口可查询某个用户组的成员列表（支持查询成员中的用户和部门）, 本接口支持普通用户组和动态用户组。如果应用的通讯录权限范围是“全部员工”，则可查询企业内任何用户组的成员列表。如果应用的通讯录权限范围不是“全部员工”，则仅可查询通讯录权限范围中的用户组的成员列表，[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
             */
            simplelist: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id/member/simplelist`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "simplelist")
          },
          /**
           * job_family
           */
          jobFamily: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_family&apiName=create&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=contact&resource=job_family&version=v3 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_families`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_family&apiName=delete&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=contact&resource=job_family&version=v3 document }
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_family&apiName=get&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=contact&resource=job_family&version=v3 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_families`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_family&apiName=list&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=contact&resource=job_family&version=v3 document }
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_families`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_family&apiName=update&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=contact&resource=job_family&version=v3 document }
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * job_level
           */
          jobLevel: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_level&apiName=create&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=contact&resource=job_level&version=v3 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_levels`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_level&apiName=delete&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=contact&resource=job_level&version=v3 document }
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_level&apiName=get&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=contact&resource=job_level&version=v3 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_levels`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_level&apiName=list&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=contact&resource=job_level&version=v3 document }
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_levels`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_level&apiName=update&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=contact&resource=job_level&version=v3 document }
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * job_title
           */
          jobTitle: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_title&apiName=get&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=contact&resource=job_title&version=v3 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_titles/:job_title_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_titles`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_title&apiName=list&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=contact&resource=job_title&version=v3 document }
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_titles`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 通讯录权限范围
           */
          scope: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/scopes`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=scope&apiName=list&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/scope/list document }
             *
             * 获取通讯录授权范围
             *
             * 该接口用于获取应用被授权可访问的通讯录范围，包括可访问的部门列表、用户列表和用户组列表。;授权范围为全员时，返回的部门列表为该企业所有的一级部门；否则返回的部门为管理员在设置授权范围时勾选的部门（不包含勾选部门的子部门）。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/scopes`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 单位
           */
          unit: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=unit&apiName=bind_department&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/unit/bind_department document }
             *
             * 建立部门与单位的绑定关系
             *
             * 通过该接口建立部门与单位的绑定关系。由于单位是旗舰版付费功能，企业需开通相关版本，否则会绑定失败，不同版本请参考[飞书版本对比](https://www.feishu.cn/service)
             */
            bindDepartment: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/unit/bind_department`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "bindDepartment"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=unit&apiName=create&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/unit/create document }
             *
             * 创建单位
             *
             * 该接口用于创建单位。注意：单位功能属于旗舰版付费功能，企业需开通对应版本才可以创建单位，不同版本请参考[飞书版本对比](https://www.feishu.cn/service)。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/unit`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=unit&apiName=delete&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/unit/delete document }
             *
             * 删除单位
             *
             * 使用该接口删除单位，需要有更新单位的权限。注意：如果单位的单位类型被其它的业务使用，不允许删除。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/unit/:unit_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=unit&apiName=get&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/unit/get document }
             *
             * 获取单位信息
             *
             * 该接口用于获取单位信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/unit/:unit_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=unit&apiName=list&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/unit/list document }
             *
             * 批量获取单位列表
             *
             * 通过该接口获取企业的单位列表，需获取单位的权限
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/unit`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=unit&apiName=list_department&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/unit/list_department document }
             *
             * 获取单位绑定的部门列表
             *
             * 通过该接口获取单位绑定的部门列表，需具有获取单位的权限
             */
            listDepartment: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/unit/list_department`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "listDepartment"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=unit&apiName=patch&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/unit/patch document }
             *
             * 修改单位信息
             *
             * 调用该接口，需要有更新单位的权限。注意：单位功能属于旗舰版付费功能，企业需开通对应版本才可以修改单位
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/unit/:unit_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=unit&apiName=unbind_department&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/unit/unbind_department document }
             *
             * 解除部门与单位的绑定关系
             *
             * 通过该接口解除部门与单位的绑定关系，需更新单位的权限，需对应部门的通讯录权限。由于单位是旗舰版付费功能，企业需开通相关功能，否则会解绑失败
             */
            unbindDepartment: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/unit/unbind_department`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "unbindDepartment")
          },
          /**
           * 用户
           */
          user: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=basic_batch&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=basic_batch&project=contact&resource=user&version=v3 document }
             *
             * 批量获取用户基本信息
             */
            basicBatch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/basic_batch`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "basicBatch"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=batch&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch&project=contact&resource=user&version=v3 document }
             */
            batch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/batch`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batch"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=batch_get_id&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/batch_get_id document }
             *
             * 通过手机号或邮箱获取用户 ID
             *
             * 通过该接口，可使用手机号/邮箱获取用户的 ID 信息，具体获取支持的 ID 类型包括 open_id、user_id、union_id，可通过查询参数指定。
             *
             * 如果查询的手机号、邮箱不存在，或者无权限查看对应的用户，则返回的用户ID列表为空。
             */
            batchGetId: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/batch_get_id`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchGetId"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=create&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/create document }
             *
             * 创建用户
             *
             * 使用该接口向通讯录创建一个用户，可以理解为员工入职。创建用户后只返回有数据权限的数据。具体的数据权限的与字段的对应关系请参照[应用权限](https://open.feishu.cn/document/ukTMukTMukTM/uQjN3QjL0YzN04CN2cDN)。
             *
             * - 新增用户的所有部门必须都在当前应用的通讯录授权范围内才允许新增用户，如果想要在根部门下新增用户，必须要有全员权限。;- 应用商店应用无权限调用此接口。;- 创建用户后，会给用户发送邀请短信/邮件，用户在操作同意后才可访问团队。;- 返回数据中不返回手机号，如果需要请重新查询用户信息获取手机号。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/users`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=delete&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/delete document }
             *
             * 删除用户
             *
             * 该接口用于从通讯录删除一个用户信息，可以理解为员工离职。
             *
             * - 若用户归属部门A、部门B，应用的通讯录权限范围必须包括部门A和部门B才可以删除用户。;- 用户可以在删除员工时设置删除员工数据（如文档）的接收者，如果不设置则由其leader接收，如果该员工没有leader，则会将该员工的数据删除。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/:user_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            findByDepartmentWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/find_by_department`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "findByDepartmentWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=find_by_department&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/find_by_department document }
             *
             * 获取部门直属用户列表
             *
             * 基于部门ID获取部门直属用户列表。
             *
             * - 部门ID 必填，根部门的部门ID为0。;- 使用 `user_access_token` 情况下根据个人组织架构的通讯录可见范围进行权限过滤，返回个人组织架构通讯录范围（[登录企业管理后台进行权限配置](https://www.feishu.cn/admin/security/permission/visibility)）内可见的用户数据。;- 使用`tenant_access_token`会根据应用通讯录的范围进行权限过滤。 如果请求的部门ID为0，则校验应用是否具有全员通讯录权限； 如果是非0的部门ID，则会验证应用是否具有该部门的通讯录权限。 无权限返回无权限错误码，有权限则返回对应部门下的直接用户列表。
             */
            findByDepartment: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/find_by_department`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "findByDepartment"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=get&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/get document }
             *
             * 获取单个用户信息
             *
             * 该接口用于获取通讯录中单个用户的信息。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/:user_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/users`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=list&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=contact&resource=user&version=v3 document }
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/users`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=patch&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/patch document }
             *
             * 修改用户部分信息
             *
             * 该接口用于更新通讯录中用户的字段，未传递的参数不会更新。
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/:user_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=resurrect&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/resurrect document }
             *
             * 恢复已删除用户
             *
             * 该接口用于恢复已删除用户（已离职的成员），仅自建应用可申请，应用商店应用无权调用接口。
             *
             * - 仅支持恢复离职 30 天内的成员。恢复后，部分用户数据仍不可恢复，请谨慎调用。;- 待恢复成员的用户 ID 不能被企业内其他成员使用。如有重复，请先离职对应的成员，否则接口会报错。;- 待恢复成员的手机号和邮箱不能被企业内其他成员使用。如有重复，请先修改对应成员的信息，否则接口会报错。
             */
            resurrect: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/:user_id/resurrect`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "resurrect"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=update&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/update document }
             *
             * 更新用户所有信息
             *
             * 该接口用于更新通讯录中用户的字段。
             *
             * 应用需要拥有待更新用户的通讯录授权，如果涉及到用户部门变更，还需要同时拥有变更前、后所有新部门的通讯录授权。
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/:user_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=update_user_id&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update_user_id&project=contact&resource=user&version=v3 document }
             */
            updateUserId: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/:user_id/update_user_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "updateUserId")
          },
          /**
           * work_city
           */
          workCity: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=work_city&apiName=get&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=contact&resource=work_city&version=v3 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/work_cities/:work_city_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/work_cities`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=contact&resource=work_city&apiName=list&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=contact&resource=work_city&version=v3 document }
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/contact/v3/work_cities`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          v3: {
            /**
             * 自定义用户字段
             */
            customAttr: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/contact/v3/custom_attrs`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=custom_attr&apiName=list&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/custom_attr/list document }
               *
               * 获取企业自定义用户字段
               *
               * 获取企业自定义的用户字段配置信息
               *
               * 调用该接口前，需要先确认[企业管理员](https://www.feishu.cn/hc/zh-CN/articles/360049067822)在[企业管理后台 - 组织架构 - 成员字段管理](http://www.feishu.cn/admin/contacts/employee-field-new/custom) 自定义字段管理栏开启了“允许开放平台API调用“。;;![通讯录.gif](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/544738c94f13ef0b9ebaff53a5133cc7_E9EGMkXyzX.gif)
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/custom_attrs`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 部门
             */
            department: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=batch&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch&project=contact&resource=department&version=v3 document }
               */
              batch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/batch`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batch"),
              childrenWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "childrenWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=children&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/children document }
               *
               * 获取子部门列表
               *
               * 通过部门ID获取部门的子部门列表。
               *
               * - 部门ID 必填，根部门的部门ID 为0。;- 使用 `user_access_token` 时，返回该用户组织架构可见性范围（[登陆企业管理后台进行权限配置](https://www.feishu.cn/admin/security/permission/visibility)）内的所有可见部门。当进行递归查询时，最多1000个部门对该用户可见。;;- 使用 ;`tenant_access_token` 则基于应用的通讯录权限范围进行权限校验与过滤。;如果部门ID为0，会检验应用是否有全员通讯录权限，如果是非0 部门ID，则会校验应用是否有该部门的通讯录权限。无部门权限返回无部门通讯录权限错误码，有权限则返回部门下子部门列表（根据fetch_child决定是否递归）。
               */
              children: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/:department_id/children`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "children"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=create&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/create document }
               *
               * 创建部门
               *
               * 该接口用于向通讯录中创建部门。
               *
               * 只可在应用的通讯录权限范围内的部门下创建部门。若需要在根部门下创建子部门，则应用通讯录权限范围需要设置为“全部成员”。应用商店应用无权限调用此接口。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=delete&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/delete document }
               *
               * 删除部门
               *
               * 该接口用于从通讯录中删除部门。
               *
               * 应用需要同时拥有待删除部门及其父部门的通讯录授权。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/:department_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=get&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/get document }
               *
               * 获取单个部门信息
               *
               * 该接口用于向通讯录获取单个部门信息。
               *
               * - 使用`tenant_access_token`时，应用需要拥有待查询部门的通讯录授权。如果需要获取根部门信息，则需要拥有全员权限。;- 使用`user_access_token`时，用户需要有待查询部门的可见性，如果需要获取根部门信息，则要求员工可见所有人。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/:department_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=list&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=contact&resource=department&version=v3 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              parentWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/parent`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "parentWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=parent&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/parent document }
               *
               * 获取父部门信息
               *
               * 该接口用来递归获取部门父部门的信息，并按照由子到父的顺序返回有权限的父部门信息列表。
               *
               * 使用`tenant_access_token`时,该接口只返回可见性范围内的父部门信息。;例如：A >>B>>C>>D四级部门，通讯录权限只到B，那么查询D部门的parent，会返回B和C两级部门。;使用user_access_token时,该接口只返回对于用户可见的父部门信息。
               */
              parent: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/parent`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "parent"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=patch&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/patch document }
               *
               * 修改部门部分信息
               *
               * 该接口用于更新通讯录中部门的信息。
               *
               * 调用该接口需要具有该部门以及更新操作涉及的部门的通讯录权限。
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/:department_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=search&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/search document }
               *
               * 搜索部门
               *
               * 搜索部门，用户通过关键词查询可见的部门数据，部门可见性需要管理员在后台配置。
               *
               * 部门存在，但用户搜索不到并不一定是搜索有问题，可能是管理员在后台配置了权限控制，导致用户无法搜索到该部门。
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=unbind_department_chat&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/unbind_department_chat document }
               *
               * 部门群转为普通群
               *
               * 通过该接口将部门群转为普通群。
               */
              unbindDepartmentChat: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/unbind_department_chat`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "unbindDepartmentChat"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=update&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/update document }
               *
               * 更新部门所有信息
               *
               * 该接口用于更新当前部门所有信息。
               *
               * - 调用该接口需要具有该部门与更新部门信息涉及的通讯录权限。;; - 没有填写的字段会被置为空值（order字段除外）。
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/:department_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=update_department_id&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update_department_id&project=contact&resource=department&version=v3 document }
               */
              updateDepartmentId: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/:department_id/update_department_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "updateDepartmentId")
            },
            /**
             * 人员类型
             */
            employeeTypeEnum: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=employee_type_enum&apiName=create&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/employee_type_enum/create document }
               *
               * 新增人员类型
               *
               * 新增自定义人员类型
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/employee_type_enums`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=employee_type_enum&apiName=delete&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/employee_type_enum/delete document }
               *
               * 删除人员类型
               *
               * 删除自定义人员类型
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/contact/v3/employee_type_enums`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=employee_type_enum&apiName=list&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/employee_type_enum/list document }
               *
               * 查询人员类型
               *
               * 该接口用于获取员工的人员类型
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/employee_type_enums`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=employee_type_enum&apiName=update&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/employee_type_enum/update document }
               *
               * 更新人员类型
               *
               * 更新自定义人员类型
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/employee_type_enums/:enum_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * functional_role
             */
            functionalRole: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role&apiName=create&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=contact&resource=functional_role&version=v3 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role&apiName=delete&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=contact&resource=functional_role&version=v3 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role&apiName=update&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=contact&resource=functional_role&version=v3 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * functional_role.member
             */
            functionalRoleMember: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role.member&apiName=batch_create&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=contact&resource=functional_role.member&version=v3 document }
               */
              batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_create`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchCreate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role.member&apiName=batch_delete&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=contact&resource=functional_role.member&version=v3 document }
               */
              batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_delete`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchDelete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role.member&apiName=get&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=contact&resource=functional_role.member&version=v3 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/:member_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role.member&apiName=list&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=contact&resource=functional_role.member&version=v3 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role.member&apiName=scopes&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=scopes&project=contact&resource=functional_role.member&version=v3 document }
               */
              scopes: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/scopes`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "scopes")
            },
            /**
             * 用户组
             */
            group: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=group&apiName=create&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/create document }
               *
               * 创建用户组
               *
               * 使用该接口创建用户组，请注意创建用户组时应用的通讯录权限范围需为“全部员工”，否则会创建失败，[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/group`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=group&apiName=delete&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/delete document }
               *
               * 删除用户组
               *
               * 通过该接口可删除企业中的用户组，请注意删除用户组时应用的通讯录权限范围需为“全部员工”，否则会删除失败，[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=group&apiName=get&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/get document }
               *
               * 查询用户组
               *
               * 根据用户组 ID 查询某个用户组的基本信息，支持查询普通用户组和动态用户组。请确保应用的通讯录权限范围里包括该用户组或者是“全部员工”，[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=group&apiName=member_belong&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/member_belong document }
               *
               * 查询用户所属用户组
               *
               * 通过该接口可查询该用户所属的用户组列表，可分别查询普通用户组和动态用户组。如果应用的通讯录权限范围是“全部员工”，则可获取该员工所属的全部用户组列表。如果应用的通讯录权限范围不是“全部员工”，则仅可获取通讯录权限范围内该员工所属的用户组。[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
               */
              memberBelong: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/member_belong`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "memberBelong"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=group&apiName=patch&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/patch document }
               *
               * 更新用户组
               *
               * 使用该接口更新用户组信息，请注意更新用户组时应用的通讯录权限范围需为“全部员工”，否则会更新失败。[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              simplelistWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/simplelist`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "simplelistWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=group&apiName=simplelist&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/simplelist document }
               *
               * 查询用户组列表
               *
               * 通过该接口可查询企业的用户组列表，可分别查询普通用户组或动态用户组。如果应用的通讯录权限范围是“全部员工”，则可获取企业全部用户组列表。如果应用的通讯录权限范围不是“全部员工”，则仅可获取通讯录权限范围内的用户组。[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
               */
              simplelist: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/simplelist`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "simplelist")
            },
            /**
             * 用户组成员
             */
            groupMember: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=group.member&apiName=add&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/add document }
               *
               * 添加用户组成员
               *
               * 向用户组中添加成员(目前成员仅支持用户，未来会支持部门)，如果应用的通讯录权限范围是“全部员工”，则可将任何成员添加到任何用户组。如果应用的通讯录权限范围不是“全部员工”，则仅可将通讯录权限范围中的成员添加到通讯录权限范围的用户组中，[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
               */
              add: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id/member/add`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "add"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=group.member&apiName=batch_add&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/batch_add document }
               *
               * 批量添加用户组成员
               *
               * 向普通用户组中批量添加成员(目前仅支持添加用户，暂不支持添加部门），如果应用的通讯录权限范围是“全部员工”，则可将任何成员添加到任何用户组。如果应用的通讯录权限范围不是“全部员工”，则仅可将通讯录权限范围中的成员添加到通讯录权限范围的用户组中，[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
               *
               * 请求体中的member_type，目前仅支持user， 未来将支持department。
               */
              batchAdd: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_add`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchAdd"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=group.member&apiName=batch_remove&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/batch_remove document }
               *
               * 批量移除用户组成员
               *
               * 从普通用户组中批量移除成员 (目前仅支持移除用户，暂不支持移除部门）。如果应用的通讯录权限范围是“全部员工”，则可将任何成员移出任何用户组。如果应用的通讯录权限范围不是“全部员工”，则仅可将通讯录权限范围中的成员从通讯录权限范围的用户组中移除， [点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
               *
               * 请求体中的member_type，目前仅支持user， 未来将支持department。
               */
              batchRemove: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_remove`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchRemove"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=group.member&apiName=remove&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/remove document }
               *
               * 移除用户组成员
               *
               * 从用户组中移除成员 (目前成员仅支持用户，未来会支持部门)，如果应用的通讯录权限范围是“全部员工”，则可将任何成员移出任何用户组。如果应用的通讯录权限范围不是“全部员工”，则仅可将通讯录权限范围中的成员从通讯录权限范围的用户组中移除， [点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
               */
              remove: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id/member/remove`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "remove"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=group.member&apiName=simplelist&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/simplelist document }
               *
               * 查询用户组成员列表
               *
               * 通过该接口可查询某个用户组的成员列表（支持查询成员中的用户和部门）, 本接口支持普通用户组和动态用户组。如果应用的通讯录权限范围是“全部员工”，则可查询企业内任何用户组的成员列表。如果应用的通讯录权限范围不是“全部员工”，则仅可查询通讯录权限范围中的用户组的成员列表，[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
               */
              simplelist: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id/member/simplelist`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "simplelist")
            },
            /**
             * job_family
             */
            jobFamily: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_family&apiName=create&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=contact&resource=job_family&version=v3 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_families`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_family&apiName=delete&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=contact&resource=job_family&version=v3 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_family&apiName=get&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=contact&resource=job_family&version=v3 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_families`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_family&apiName=list&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=contact&resource=job_family&version=v3 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_families`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_family&apiName=update&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=contact&resource=job_family&version=v3 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * job_level
             */
            jobLevel: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_level&apiName=create&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=contact&resource=job_level&version=v3 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_levels`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_level&apiName=delete&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=contact&resource=job_level&version=v3 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_level&apiName=get&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=contact&resource=job_level&version=v3 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_levels`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_level&apiName=list&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=contact&resource=job_level&version=v3 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_levels`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_level&apiName=update&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=contact&resource=job_level&version=v3 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * job_title
             */
            jobTitle: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_title&apiName=get&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=contact&resource=job_title&version=v3 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_titles/:job_title_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_titles`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_title&apiName=list&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=contact&resource=job_title&version=v3 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_titles`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 通讯录权限范围
             */
            scope: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/contact/v3/scopes`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=scope&apiName=list&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/scope/list document }
               *
               * 获取通讯录授权范围
               *
               * 该接口用于获取应用被授权可访问的通讯录范围，包括可访问的部门列表、用户列表和用户组列表。;授权范围为全员时，返回的部门列表为该企业所有的一级部门；否则返回的部门为管理员在设置授权范围时勾选的部门（不包含勾选部门的子部门）。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/scopes`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 单位
             */
            unit: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=unit&apiName=bind_department&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/unit/bind_department document }
               *
               * 建立部门与单位的绑定关系
               *
               * 通过该接口建立部门与单位的绑定关系。由于单位是旗舰版付费功能，企业需开通相关版本，否则会绑定失败，不同版本请参考[飞书版本对比](https://www.feishu.cn/service)
               */
              bindDepartment: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/unit/bind_department`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "bindDepartment"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=unit&apiName=create&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/unit/create document }
               *
               * 创建单位
               *
               * 该接口用于创建单位。注意：单位功能属于旗舰版付费功能，企业需开通对应版本才可以创建单位，不同版本请参考[飞书版本对比](https://www.feishu.cn/service)。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/unit`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=unit&apiName=delete&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/unit/delete document }
               *
               * 删除单位
               *
               * 使用该接口删除单位，需要有更新单位的权限。注意：如果单位的单位类型被其它的业务使用，不允许删除。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/unit/:unit_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=unit&apiName=get&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/unit/get document }
               *
               * 获取单位信息
               *
               * 该接口用于获取单位信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/unit/:unit_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=unit&apiName=list&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/unit/list document }
               *
               * 批量获取单位列表
               *
               * 通过该接口获取企业的单位列表，需获取单位的权限
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/unit`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=unit&apiName=list_department&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/unit/list_department document }
               *
               * 获取单位绑定的部门列表
               *
               * 通过该接口获取单位绑定的部门列表，需具有获取单位的权限
               */
              listDepartment: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/unit/list_department`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "listDepartment"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=unit&apiName=patch&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/unit/patch document }
               *
               * 修改单位信息
               *
               * 调用该接口，需要有更新单位的权限。注意：单位功能属于旗舰版付费功能，企业需开通对应版本才可以修改单位
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/unit/:unit_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=unit&apiName=unbind_department&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/unit/unbind_department document }
               *
               * 解除部门与单位的绑定关系
               *
               * 通过该接口解除部门与单位的绑定关系，需更新单位的权限，需对应部门的通讯录权限。由于单位是旗舰版付费功能，企业需开通相关功能，否则会解绑失败
               */
              unbindDepartment: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/unit/unbind_department`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "unbindDepartment")
            },
            /**
             * 用户
             */
            user: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=basic_batch&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=basic_batch&project=contact&resource=user&version=v3 document }
               *
               * 批量获取用户基本信息
               */
              basicBatch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/basic_batch`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "basicBatch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=batch&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch&project=contact&resource=user&version=v3 document }
               */
              batch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/batch`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=batch_get_id&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/batch_get_id document }
               *
               * 通过手机号或邮箱获取用户 ID
               *
               * 通过该接口，可使用手机号/邮箱获取用户的 ID 信息，具体获取支持的 ID 类型包括 open_id、user_id、union_id，可通过查询参数指定。
               *
               * 如果查询的手机号、邮箱不存在，或者无权限查看对应的用户，则返回的用户ID列表为空。
               */
              batchGetId: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/batch_get_id`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchGetId"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=create&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/create document }
               *
               * 创建用户
               *
               * 使用该接口向通讯录创建一个用户，可以理解为员工入职。创建用户后只返回有数据权限的数据。具体的数据权限的与字段的对应关系请参照[应用权限](https://open.feishu.cn/document/ukTMukTMukTM/uQjN3QjL0YzN04CN2cDN)。
               *
               * - 新增用户的所有部门必须都在当前应用的通讯录授权范围内才允许新增用户，如果想要在根部门下新增用户，必须要有全员权限。;- 应用商店应用无权限调用此接口。;- 创建用户后，会给用户发送邀请短信/邮件，用户在操作同意后才可访问团队。;- 返回数据中不返回手机号，如果需要请重新查询用户信息获取手机号。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/users`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=delete&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/delete document }
               *
               * 删除用户
               *
               * 该接口用于从通讯录删除一个用户信息，可以理解为员工离职。
               *
               * - 若用户归属部门A、部门B，应用的通讯录权限范围必须包括部门A和部门B才可以删除用户。;- 用户可以在删除员工时设置删除员工数据（如文档）的接收者，如果不设置则由其leader接收，如果该员工没有leader，则会将该员工的数据删除。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/:user_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              findByDepartmentWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/find_by_department`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "findByDepartmentWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=find_by_department&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/find_by_department document }
               *
               * 获取部门直属用户列表
               *
               * 基于部门ID获取部门直属用户列表。
               *
               * - 部门ID 必填，根部门的部门ID为0。;- 使用 `user_access_token` 情况下根据个人组织架构的通讯录可见范围进行权限过滤，返回个人组织架构通讯录范围（[登录企业管理后台进行权限配置](https://www.feishu.cn/admin/security/permission/visibility)）内可见的用户数据。;- 使用`tenant_access_token`会根据应用通讯录的范围进行权限过滤。 如果请求的部门ID为0，则校验应用是否具有全员通讯录权限； 如果是非0的部门ID，则会验证应用是否具有该部门的通讯录权限。 无权限返回无权限错误码，有权限则返回对应部门下的直接用户列表。
               */
              findByDepartment: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/find_by_department`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "findByDepartment"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=get&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/get document }
               *
               * 获取单个用户信息
               *
               * 该接口用于获取通讯录中单个用户的信息。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/:user_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/contact/v3/users`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=list&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=contact&resource=user&version=v3 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/users`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=patch&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/patch document }
               *
               * 修改用户部分信息
               *
               * 该接口用于更新通讯录中用户的字段，未传递的参数不会更新。
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/:user_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=resurrect&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/resurrect document }
               *
               * 恢复已删除用户
               *
               * 该接口用于恢复已删除用户（已离职的成员），仅自建应用可申请，应用商店应用无权调用接口。
               *
               * - 仅支持恢复离职 30 天内的成员。恢复后，部分用户数据仍不可恢复，请谨慎调用。;- 待恢复成员的用户 ID 不能被企业内其他成员使用。如有重复，请先离职对应的成员，否则接口会报错。;- 待恢复成员的手机号和邮箱不能被企业内其他成员使用。如有重复，请先修改对应成员的信息，否则接口会报错。
               */
              resurrect: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/:user_id/resurrect`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "resurrect"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=update&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/update document }
               *
               * 更新用户所有信息
               *
               * 该接口用于更新通讯录中用户的字段。
               *
               * 应用需要拥有待更新用户的通讯录授权，如果涉及到用户部门变更，还需要同时拥有变更前、后所有新部门的通讯录授权。
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/:user_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=update_user_id&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update_user_id&project=contact&resource=user&version=v3 document }
               */
              updateUserId: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/:user_id/update_user_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "updateUserId")
            },
            /**
             * work_city
             */
            workCity: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=work_city&apiName=get&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=contact&resource=work_city&version=v3 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/work_cities/:work_city_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/contact/v3/work_cities`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=contact&resource=work_city&apiName=list&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=contact&resource=work_city&version=v3 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/contact/v3/work_cities`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            }
          }
        };
      }
    };
    var Client$O = class extends Client$P {
      static {
        __name(this, "Client$O");
      }
      constructor() {
        super(...arguments);
        this.content_check = {};
      }
    };
    var Client$N = class extends Client$O {
      static {
        __name(this, "Client$N");
      }
      constructor() {
        super(...arguments);
        this.contract = {};
      }
    };
    var Client$M = class extends Client$N {
      static {
        __name(this, "Client$M");
      }
      constructor() {
        super(...arguments);
        this.corehr = {
          /**
           * assigned_user
           */
          assignedUser: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=assigned_user&apiName=search&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/assigned_user/search document }
             *
             * 获取组织类角色授权列表
             *
             * 查询组织类角色的授权信息
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/assigned_users/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search")
          },
          /**
           * authorization
           */
          authorization: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=authorization&apiName=add_role_assign&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=add_role_assign&project=corehr&resource=authorization&version=v1 document }
             *
             * 追加更新组织类授权
             */
            addRoleAssign: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/authorizations/add_role_assign`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "addRoleAssign"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=authorization&apiName=get_by_param&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get_by_param&project=corehr&resource=authorization&version=v1 document }
             *
             * 根据ID查询单个用户授权
             */
            getByParam: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/authorizations/get_by_param`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "getByParam"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=authorization&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=authorization&version=v1 document }
             *
             * 批量查询用户授权
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/authorizations/query`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=authorization&apiName=remove_role_assign&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=remove_role_assign&project=corehr&resource=authorization&version=v1 document }
             *
             * 删除组织类授权
             */
            removeRoleAssign: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/authorizations/remove_role_assign`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "removeRoleAssign"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=authorization&apiName=update_role_assign&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update_role_assign&project=corehr&resource=authorization&version=v1 document }
             *
             * 覆盖更新组织类授权
             */
            updateRoleAssign: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/authorizations/update_role_assign`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "updateRoleAssign")
          },
          /**
           * common_data.id
           */
          commonDataId: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=common_data.id&apiName=convert&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=convert&project=corehr&resource=common_data.id&version=v1 document }
             */
            convert: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/common_data/id/convert`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "convert")
          },
          /**
           * common_data.meta_data
           */
          commonDataMetaData: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=common_data.meta_data&apiName=add_enum_option&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=add_enum_option&project=corehr&resource=common_data.meta_data&version=v1 document }
             */
            addEnumOption: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/add_enum_option`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "addEnumOption"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=common_data.meta_data&apiName=edit_enum_option&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=edit_enum_option&project=corehr&resource=common_data.meta_data&version=v1 document }
             */
            editEnumOption: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/edit_enum_option`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "editEnumOption")
          },
          /**
           * 公司
           */
          company: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/create document }
             *
             * 创建公司
             *
             * 创建公司
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/companies`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/delete document }
             *
             * 删除公司
             *
             * 删除公司
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/companies/:company_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/get document }
             *
             * 查询单个公司
             *
             * 根据 ID 查询单个公司
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/companies/:company_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/list document }
             *
             * 批量查询公司
             *
             * 批量查询公司
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/companies`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=company&version=v1 document }
             *
             * 更新公司数据
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/companies/:company_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * compensation_standard
           */
          compensationStandard: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=compensation_standard&apiName=match&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=match&project=corehr&resource=compensation_standard&version=v1 document }
             *
             * 分页查询地点数据
             */
            match: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/compensation_standards/match`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "match")
          },
          /**
           * 合同
           */
          contract: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=contract&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/contract/create document }
             *
             * 创建合同
             *
             * 创建合同
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/contracts`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=contract&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/contract/delete document }
             *
             * 删除合同
             *
             * 删除合同
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=contract&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/contract/get document }
             *
             * 查询单个合同
             *
             * 根据 ID 查询单个合同
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=contract&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/contract/list document }
             *
             * 批量查询合同
             *
             * 批量查询合同
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/contracts`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=contract&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/contract/patch document }
             *
             * 更新合同
             *
             * 更新合同
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 地理库信息
           */
          countryRegion: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=country_region&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/country_region/get document }
             *
             * 查询单条国家/地区信息
             *
             * 查询单条国家/地区信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/country_regions/:country_region_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=country_region&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/country_region/list document }
             *
             * 批量查询国家/地区信息
             *
             * 批量查询国家/地区信息
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/country_regions`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 货币信息
           */
          currency: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=currency&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/currency/get document }
             *
             * 查询单个货币信息
             *
             * 查询单个货币信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/currencies/:currency_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=currency&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/currency/list document }
             *
             * 批量查询货币信息
             *
             * 批量查询货币信息
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/currencies`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 自定义字段
           */
          customField: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=custom_field&apiName=get_by_param&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/custom_field/get_by_param document }
             *
             * 获取自定义字段详情
             *
             * 获取「飞书人事」具体对象下某自定义字段的详细信息
             */
            getByParam: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/custom_fields/get_by_param`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "getByParam"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=custom_field&apiName=list_object_api_name&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/custom_field/list_object_api_name document }
             *
             * 获取飞书人事对象列表
             *
             * 获取「飞书人事」中的对象列表，含系统预置对象与自定义对象
             */
            listObjectApiName: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/custom_fields/list_object_api_name`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "listObjectApiName"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=custom_field&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/custom_field/query document }
             *
             * 获取自定义字段列表
             *
             * 获取「飞书人事」具体对象下的自定义字段列表
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/custom_fields/query`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query")
          },
          /**
           * 部门
           */
          department: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/create document }
             *
             * 创建部门
             *
             * 创建部门
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/departments`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/delete document }
             *
             * 删除部门
             *
             * 删除部门
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/departments/:department_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/get document }
             *
             * 查询单个部门
             *
             * 根据 ID 查询单个部门
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/departments/:department_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/list document }
             *
             * 批量查询部门
             *
             * 批量查询部门
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/departments`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/patch document }
             *
             * 更新部门
             *
             * 更新部门
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/departments/:department_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 人员类型
           */
          employeeType: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee_type&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employee_type/create document }
             *
             * 创建人员类型
             *
             * 创建人员类型
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employee_types`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee_type&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employee_type/delete document }
             *
             * 删除人员类型
             *
             * 删除人员类型
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee_type&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employee_type/get document }
             *
             * 查询单个人员类型
             *
             * 根据 ID 查询单个人员类型
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee_type&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employee_type/list document }
             *
             * 批量查询人员类型
             *
             * 批量查询人员类型
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employee_types`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee_type&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employee_type/patch document }
             *
             * 更新人员类型数据
             *
             * 更新人员类型数据
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 雇佣信息
           */
          employment: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employment&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employment/create document }
             *
             * 创建雇佣信息
             *
             * 创建人员的雇佣信息
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employments`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employment&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employment/delete document }
             *
             * 删除雇佣信息
             *
             * 删除人员的雇佣信息
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employment&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employment/patch document }
             *
             * 更新雇佣信息
             *
             * 更新雇佣信息
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * file
           */
          file: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=file&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=corehr&resource=file&version=v1 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/files/:id`, path2),
                method: "GET",
                headers,
                data,
                params,
                responseType: "stream",
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                $return_headers: true
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              const checkIsReadable = /* @__PURE__ */ __name(() => {
                const consumedError = "The stream has already been consumed";
                if (!res.data.readable) {
                  this.logger.error(consumedError);
                  throw new Error(consumedError);
                }
              }, "checkIsReadable");
              return {
                writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                  checkIsReadable();
                  return new Promise((resolve, reject) => {
                    const writableStream = fs__default["default"].createWriteStream(filePath);
                    writableStream.on("finish", () => {
                      resolve(filePath);
                    });
                    writableStream.on("error", (e) => {
                      reject(e);
                    });
                    res.data.pipe(writableStream);
                  });
                }), "writeFile"),
                getReadableStream: /* @__PURE__ */ __name(() => {
                  checkIsReadable();
                  return res.data;
                }, "getReadableStream"),
                headers: res.headers
              };
            }), "get")
          },
          /**
           * 职务
           */
          job: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job/create document }
             *
             * 创建职务
             *
             * 创建职务
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/jobs`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job/delete document }
             *
             * 删除职务
             *
             * 删除职务
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job/get document }
             *
             * 查询单个职务
             *
             * 根据 ID 查询单个职务
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job/list document }
             *
             * 批量查询职务
             *
             * 批量查询职务
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/jobs`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job/patch document }
             *
             * 更新职务
             *
             * 更新职务
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 异动信息
           */
          jobChange: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_change&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_change/create document }
             *
             * 发起员工异动
             *
             * 创建员工异动信息
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_changes`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create")
          },
          /**
           * 任职信息
           */
          jobData: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_data&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/create document }
             *
             * 创建任职信息
             *
             * 在系统中第一次创建员工任职数据，通常在员工入职或者做数据批量导入的时候使用，【任职原因】只支持填写“入职”
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_datas`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_data&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/delete document }
             *
             * 删除任职信息
             *
             * 删除人员的任职信息
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_data&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/get document }
             *
             * 查询单个任职信息
             *
             * 根据 ID 查询单任职信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_data&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/list document }
             *
             * 批量查询任职信息
             *
             * 批量查询人员的任职信息
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_datas`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_data&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/patch document }
             *
             * 更新任职信息
             *
             * 更新任职信息
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 职务序列
           */
          jobFamily: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_family/create document }
             *
             * 创建职务序列
             *
             * 创建职务序列
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_families`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_family/delete document }
             *
             * 删除职务序列
             *
             * 删除职务序列
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_family/get document }
             *
             * 查询单个职务序列
             *
             * 根据 ID 查询单个职务序列
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_family/list document }
             *
             * 批量查询职务序列
             *
             * 批量查询职务序列
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_families`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_family/patch document }
             *
             * 更新职务序列
             *
             * 更新职务序列
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 职务级别
           */
          jobLevel: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_level&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_level/create document }
             *
             * 创建职务级别
             *
             * 创建职务级别
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_levels`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_level&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_level/delete document }
             *
             * 删除职务级别
             *
             * 删除职务级别
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_level&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_level/get document }
             *
             * 查询单个职务级别
             *
             * 根据 ID 查询单个职务级别
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_level&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_level/list document }
             *
             * 批量查询职务级别
             *
             * 批量查询职务级别
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_levels`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_level&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_level/patch document }
             *
             * 更新职务级别
             *
             * 更新职务级别
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 休假管理
           */
          leave: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=calendar_by_scope&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=calendar_by_scope&project=corehr&resource=leave&version=v1 document }
             */
            calendarByScope: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/calendar_by_scope`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "calendarByScope"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=leave_balances&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave/leave_balances document }
             *
             * 批量查询员工假期余额
             *
             * 批量获取员工各个假期的余额数据
             */
            leaveBalances: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/leave_balances`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "leaveBalances"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=leave_request_history&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave/leave_request_history document }
             *
             * 批量查询员工请假记录
             *
             * 批量获取员工的请假记录数据
             */
            leaveRequestHistory: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/leave_request_history`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "leaveRequestHistory"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=leave_types&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave/leave_types document }
             *
             * 获取假期类型列表
             *
             * 获取休假设置后台配置的假期类型列表（比如年假、事假、婚假等）
             */
            leaveTypes: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/leave_types`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "leaveTypes"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=work_calendar&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=work_calendar&project=corehr&resource=leave&version=v1 document }
             */
            workCalendar: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "workCalendar"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=work_calendar_date&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=work_calendar_date&project=corehr&resource=leave&version=v1 document }
             */
            workCalendarDate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar_date`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "workCalendarDate")
          },
          /**
           * leave_granting_record
           */
          leaveGrantingRecord: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave_granting_record&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave_granting_record/create document }
             *
             * 创建假期授予记录
             *
             * 向飞书人事休假系统写入假期授予记录
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leave_granting_records`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave_granting_record&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave_granting_record/delete document }
             *
             * 删除假期授予记录
             *
             * 删除飞书人事休假系统中的假期授予记录（仅支持删除授予来源是「手动授予」或「外部系统授予」的记录）
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leave_granting_records/:leave_granting_record_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete")
          },
          /**
           * 地点
           */
          location: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/location/create document }
             *
             * 创建地点
             *
             * 创建地点
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/locations`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/location/delete document }
             *
             * 删除地点
             *
             * 删除地点
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/locations/:location_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/location/get document }
             *
             * 查询单个地点
             *
             * 根据 ID 查询单个地点
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/locations/:location_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/location/list document }
             *
             * 批量查询地点
             *
             * 批量查询地点
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/locations`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 国家证件类型
           */
          nationalIdType: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=national_id_type&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/national_id_type/create document }
             *
             * 创建国家证件类型
             *
             * 创建国家证件类型
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/national_id_types`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=national_id_type&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/national_id_type/delete document }
             *
             * 删除国家证件类型
             *
             * 删除国家证件类型
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=national_id_type&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/national_id_type/get document }
             *
             * 查询单个国家证件类型
             *
             * 根据 ID 查询单个国家证件类型
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=national_id_type&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/national_id_type/list document }
             *
             * 批量查询国家证件类型
             *
             * 批量查询国家证件类型
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/national_id_types`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=national_id_type&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/national_id_type/patch document }
             *
             * 更新国家证件类型
             *
             * 更新国家证件类型
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 员工离职
           */
          offboarding: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=offboarding&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/offboarding/query document }
             *
             * 查询员工离职原因列表
             *
             * 查询「飞书人事」-「离职设置」中的离职原因
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/offboardings/query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query"),
            searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/offboardings/search`, path2),
                  method: "POST",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "searchWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=offboarding&apiName=search&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=offboarding&version=v1 document }
             *
             * 根据 雇佣 ID 查询员工离职信息
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/offboardings/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=offboarding&apiName=submit&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/offboarding/submit document }
             *
             * 操作员工离职
             *
             * 操作员工直接离职
             */
            submit: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/offboardings/submit`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "submit")
          },
          /**
           * 个人信息
           */
          person: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/person/create document }
             *
             * 创建个人信息
             *
             * 创建人员的个人信息
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/persons`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/person/delete document }
             *
             * 删除个人信息
             *
             * 删除人员的个人信息
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/persons/:person_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/person/get document }
             *
             * 查询单个个人信息
             *
             * 根据 ID 查询单个人员的个人信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/persons/:person_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/person/patch document }
             *
             * 更新个人信息
             *
             * 更新个人信息
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/persons/:person_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=upload&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/person/upload document }
             *
             * 上传文件
             *
             * 上传文件
             */
            upload: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/persons/upload`, path2),
                method: "POST",
                data,
                params,
                headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              return (res === null || res === void 0 ? void 0 : res.data) || null;
            }), "upload")
          },
          /**
           * 待入职
           */
          preHire: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/pre_hire/delete document }
             *
             * 删除待入职人员
             *
             * 删除待入职人员
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/pre_hire/get document }
             *
             * 查询单个待入职人员
             *
             * 根据 ID 查询单个待入职人员
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/pre_hire/list document }
             *
             * 批量查询待入职人员
             *
             * 批量查询待入职人员
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/pre_hires`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/pre_hire/patch document }
             *
             * 更新待入职数据
             *
             * 更新待入职数据
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 流程管理
           */
          processFormVariableData: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process.form_variable_data&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/process-form_variable_data/get document }
             *
             * 获取流程表单数据
             *
             * 获取流程表单数据
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/processes/:process_id/form_variable_data`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          /**
           * security_group
           */
          securityGroup: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=security_group&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/security_group/list document }
             *
             * 批量获取角色列表
             *
             * 批量查询「飞书人事」-「权限设置」-「角色设置」中的角色列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/security_groups`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=security_group&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/security_group/query document }
             *
             * HRBP/属地 BP 查询
             *
             * 通过部门或工作地点，查询对应的 HRBP/属地 BP
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/security_groups/query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query")
          },
          /**
           * 地理库信息
           */
          subdivision: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=subdivision&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/subdivision/get document }
             *
             * 查询单条省份/行政区信息
             *
             * 查询单条省份/行政区信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/subdivisions/:subdivision_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=subdivision&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/subdivision/list document }
             *
             * 批量查询省份/行政区信息
             *
             * 批量查询省份/行政区信息
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/subdivisions`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 地理库信息
           */
          subregion: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=subregion&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/subregion/get document }
             *
             * 查询单条城市/区域信息
             *
             * 查询单条城市/区域信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/subregions/:subregion_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=subregion&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/subregion/list document }
             *
             * 批量查询城市/区域信息
             *
             * 批量查询城市/区域信息
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/subregions`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 异动原因
           */
          transferReason: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=transfer_reason&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/transfer_reason/query document }
             *
             * 获取异动原因列表
             *
             * 获取异动原因列表
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/transfer_reasons/query`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query")
          },
          /**
           * 异动类型
           */
          transferType: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=transfer_type&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/transfer_type/query document }
             *
             * 获取异动类型列表
             *
             * 获取异动类型列表
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/transfer_types/query`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query")
          },
          /**
           * 工时制度
           */
          workingHoursType: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=working_hours_type&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/working_hours_type/create document }
             *
             * 创建工时制度
             *
             * 创建工时制度
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/working_hours_types`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=working_hours_type&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/working_hours_type/delete document }
             *
             * 删除工时制度
             *
             * 删除工时制度
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=working_hours_type&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/working_hours_type/get document }
             *
             * 查询单个工时制度
             *
             * 根据 ID 查询单个工时制度
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=working_hours_type&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/working_hours_type/list document }
             *
             * 批量查询工时制度
             *
             * 批量查询工时制度
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/working_hours_types`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=working_hours_type&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/working_hours_type/patch document }
             *
             * 更新工时制度
             *
             * 更新工时制度
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          v1: {
            /**
             * assigned_user
             */
            assignedUser: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=assigned_user&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/assigned_user/search document }
               *
               * 获取组织类角色授权列表
               *
               * 查询组织类角色的授权信息
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/assigned_users/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * authorization
             */
            authorization: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=authorization&apiName=add_role_assign&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=add_role_assign&project=corehr&resource=authorization&version=v1 document }
               *
               * 追加更新组织类授权
               */
              addRoleAssign: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/authorizations/add_role_assign`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "addRoleAssign"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=authorization&apiName=get_by_param&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get_by_param&project=corehr&resource=authorization&version=v1 document }
               *
               * 根据ID查询单个用户授权
               */
              getByParam: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/authorizations/get_by_param`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "getByParam"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=authorization&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=authorization&version=v1 document }
               *
               * 批量查询用户授权
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/authorizations/query`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=authorization&apiName=remove_role_assign&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=remove_role_assign&project=corehr&resource=authorization&version=v1 document }
               *
               * 删除组织类授权
               */
              removeRoleAssign: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/authorizations/remove_role_assign`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "removeRoleAssign"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=authorization&apiName=update_role_assign&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update_role_assign&project=corehr&resource=authorization&version=v1 document }
               *
               * 覆盖更新组织类授权
               */
              updateRoleAssign: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/authorizations/update_role_assign`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "updateRoleAssign")
            },
            /**
             * common_data.id
             */
            commonDataId: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=common_data.id&apiName=convert&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=convert&project=corehr&resource=common_data.id&version=v1 document }
               */
              convert: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/common_data/id/convert`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "convert")
            },
            /**
             * common_data.meta_data
             */
            commonDataMetaData: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=common_data.meta_data&apiName=add_enum_option&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=add_enum_option&project=corehr&resource=common_data.meta_data&version=v1 document }
               */
              addEnumOption: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/add_enum_option`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "addEnumOption"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=common_data.meta_data&apiName=edit_enum_option&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=edit_enum_option&project=corehr&resource=common_data.meta_data&version=v1 document }
               */
              editEnumOption: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/common_data/meta_data/edit_enum_option`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "editEnumOption")
            },
            /**
             * 公司
             */
            company: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/create document }
               *
               * 创建公司
               *
               * 创建公司
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/companies`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/delete document }
               *
               * 删除公司
               *
               * 删除公司
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/companies/:company_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/get document }
               *
               * 查询单个公司
               *
               * 根据 ID 查询单个公司
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/companies/:company_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/list document }
               *
               * 批量查询公司
               *
               * 批量查询公司
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/companies`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=company&version=v1 document }
               *
               * 更新公司数据
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/companies/:company_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * compensation_standard
             */
            compensationStandard: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=compensation_standard&apiName=match&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=match&project=corehr&resource=compensation_standard&version=v1 document }
               *
               * 分页查询地点数据
               */
              match: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/compensation_standards/match`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "match")
            },
            /**
             * 合同
             */
            contract: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=contract&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/contract/create document }
               *
               * 创建合同
               *
               * 创建合同
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/contracts`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=contract&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/contract/delete document }
               *
               * 删除合同
               *
               * 删除合同
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=contract&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/contract/get document }
               *
               * 查询单个合同
               *
               * 根据 ID 查询单个合同
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=contract&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/contract/list document }
               *
               * 批量查询合同
               *
               * 批量查询合同
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/contracts`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=contract&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/contract/patch document }
               *
               * 更新合同
               *
               * 更新合同
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 地理库信息
             */
            countryRegion: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=country_region&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/country_region/get document }
               *
               * 查询单条国家/地区信息
               *
               * 查询单条国家/地区信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/country_regions/:country_region_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=country_region&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/country_region/list document }
               *
               * 批量查询国家/地区信息
               *
               * 批量查询国家/地区信息
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/country_regions`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 货币信息
             */
            currency: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=currency&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/currency/get document }
               *
               * 查询单个货币信息
               *
               * 查询单个货币信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/currencies/:currency_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=currency&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/currency/list document }
               *
               * 批量查询货币信息
               *
               * 批量查询货币信息
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/currencies`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 自定义字段
             */
            customField: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=custom_field&apiName=get_by_param&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/custom_field/get_by_param document }
               *
               * 获取自定义字段详情
               *
               * 获取「飞书人事」具体对象下某自定义字段的详细信息
               */
              getByParam: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/custom_fields/get_by_param`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "getByParam"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=custom_field&apiName=list_object_api_name&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/custom_field/list_object_api_name document }
               *
               * 获取飞书人事对象列表
               *
               * 获取「飞书人事」中的对象列表，含系统预置对象与自定义对象
               */
              listObjectApiName: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/custom_fields/list_object_api_name`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "listObjectApiName"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=custom_field&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/custom_field/query document }
               *
               * 获取自定义字段列表
               *
               * 获取「飞书人事」具体对象下的自定义字段列表
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/custom_fields/query`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * 部门
             */
            department: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/create document }
               *
               * 创建部门
               *
               * 创建部门
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/departments`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/delete document }
               *
               * 删除部门
               *
               * 删除部门
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/departments/:department_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/get document }
               *
               * 查询单个部门
               *
               * 根据 ID 查询单个部门
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/departments/:department_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/list document }
               *
               * 批量查询部门
               *
               * 批量查询部门
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/departments`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/patch document }
               *
               * 更新部门
               *
               * 更新部门
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/departments/:department_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 人员类型
             */
            employeeType: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee_type&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employee_type/create document }
               *
               * 创建人员类型
               *
               * 创建人员类型
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employee_types`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee_type&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employee_type/delete document }
               *
               * 删除人员类型
               *
               * 删除人员类型
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee_type&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employee_type/get document }
               *
               * 查询单个人员类型
               *
               * 根据 ID 查询单个人员类型
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee_type&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employee_type/list document }
               *
               * 批量查询人员类型
               *
               * 批量查询人员类型
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employee_types`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee_type&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employee_type/patch document }
               *
               * 更新人员类型数据
               *
               * 更新人员类型数据
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 雇佣信息
             */
            employment: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employment&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employment/create document }
               *
               * 创建雇佣信息
               *
               * 创建人员的雇佣信息
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employments`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employment&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employment/delete document }
               *
               * 删除雇佣信息
               *
               * 删除人员的雇佣信息
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employment&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employment/patch document }
               *
               * 更新雇佣信息
               *
               * 更新雇佣信息
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * file
             */
            file: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=file&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=corehr&resource=file&version=v1 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/files/:id`, path2),
                  method: "GET",
                  headers,
                  data,
                  params,
                  responseType: "stream",
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                  $return_headers: true
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                const checkIsReadable = /* @__PURE__ */ __name(() => {
                  const consumedError = "The stream has already been consumed";
                  if (!res.data.readable) {
                    this.logger.error(consumedError);
                    throw new Error(consumedError);
                  }
                }, "checkIsReadable");
                return {
                  writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                    checkIsReadable();
                    return new Promise((resolve, reject) => {
                      const writableStream = fs__default["default"].createWriteStream(filePath);
                      writableStream.on("finish", () => {
                        resolve(filePath);
                      });
                      writableStream.on("error", (e) => {
                        reject(e);
                      });
                      res.data.pipe(writableStream);
                    });
                  }), "writeFile"),
                  getReadableStream: /* @__PURE__ */ __name(() => {
                    checkIsReadable();
                    return res.data;
                  }, "getReadableStream"),
                  headers: res.headers
                };
              }), "get")
            },
            /**
             * 职务
             */
            job: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job/create document }
               *
               * 创建职务
               *
               * 创建职务
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/jobs`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job/delete document }
               *
               * 删除职务
               *
               * 删除职务
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job/get document }
               *
               * 查询单个职务
               *
               * 根据 ID 查询单个职务
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job/list document }
               *
               * 批量查询职务
               *
               * 批量查询职务
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/jobs`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job/patch document }
               *
               * 更新职务
               *
               * 更新职务
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 异动信息
             */
            jobChange: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_change&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_change/create document }
               *
               * 发起员工异动
               *
               * 创建员工异动信息
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_changes`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create")
            },
            /**
             * 任职信息
             */
            jobData: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_data&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/create document }
               *
               * 创建任职信息
               *
               * 在系统中第一次创建员工任职数据，通常在员工入职或者做数据批量导入的时候使用，【任职原因】只支持填写“入职”
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_datas`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_data&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/delete document }
               *
               * 删除任职信息
               *
               * 删除人员的任职信息
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_data&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/get document }
               *
               * 查询单个任职信息
               *
               * 根据 ID 查询单任职信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_data&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/list document }
               *
               * 批量查询任职信息
               *
               * 批量查询人员的任职信息
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_datas`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_data&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/patch document }
               *
               * 更新任职信息
               *
               * 更新任职信息
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 职务序列
             */
            jobFamily: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_family/create document }
               *
               * 创建职务序列
               *
               * 创建职务序列
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_families`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_family/delete document }
               *
               * 删除职务序列
               *
               * 删除职务序列
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_family/get document }
               *
               * 查询单个职务序列
               *
               * 根据 ID 查询单个职务序列
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_family/list document }
               *
               * 批量查询职务序列
               *
               * 批量查询职务序列
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_families`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_family/patch document }
               *
               * 更新职务序列
               *
               * 更新职务序列
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 职务级别
             */
            jobLevel: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_level&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_level/create document }
               *
               * 创建职务级别
               *
               * 创建职务级别
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_levels`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_level&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_level/delete document }
               *
               * 删除职务级别
               *
               * 删除职务级别
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_level&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_level/get document }
               *
               * 查询单个职务级别
               *
               * 根据 ID 查询单个职务级别
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_level&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_level/list document }
               *
               * 批量查询职务级别
               *
               * 批量查询职务级别
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_levels`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_level&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_level/patch document }
               *
               * 更新职务级别
               *
               * 更新职务级别
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 休假管理
             */
            leave: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=calendar_by_scope&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=calendar_by_scope&project=corehr&resource=leave&version=v1 document }
               */
              calendarByScope: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/calendar_by_scope`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "calendarByScope"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=leave_balances&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave/leave_balances document }
               *
               * 批量查询员工假期余额
               *
               * 批量获取员工各个假期的余额数据
               */
              leaveBalances: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/leave_balances`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "leaveBalances"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=leave_request_history&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave/leave_request_history document }
               *
               * 批量查询员工请假记录
               *
               * 批量获取员工的请假记录数据
               */
              leaveRequestHistory: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/leave_request_history`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "leaveRequestHistory"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=leave_types&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave/leave_types document }
               *
               * 获取假期类型列表
               *
               * 获取休假设置后台配置的假期类型列表（比如年假、事假、婚假等）
               */
              leaveTypes: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/leave_types`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "leaveTypes"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=work_calendar&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=work_calendar&project=corehr&resource=leave&version=v1 document }
               */
              workCalendar: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "workCalendar"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=work_calendar_date&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=work_calendar_date&project=corehr&resource=leave&version=v1 document }
               */
              workCalendarDate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar_date`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "workCalendarDate")
            },
            /**
             * leave_granting_record
             */
            leaveGrantingRecord: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave_granting_record&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave_granting_record/create document }
               *
               * 创建假期授予记录
               *
               * 向飞书人事休假系统写入假期授予记录
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leave_granting_records`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave_granting_record&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave_granting_record/delete document }
               *
               * 删除假期授予记录
               *
               * 删除飞书人事休假系统中的假期授予记录（仅支持删除授予来源是「手动授予」或「外部系统授予」的记录）
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leave_granting_records/:leave_granting_record_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete")
            },
            /**
             * 地点
             */
            location: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/location/create document }
               *
               * 创建地点
               *
               * 创建地点
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/locations`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/location/delete document }
               *
               * 删除地点
               *
               * 删除地点
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/locations/:location_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/location/get document }
               *
               * 查询单个地点
               *
               * 根据 ID 查询单个地点
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/locations/:location_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/location/list document }
               *
               * 批量查询地点
               *
               * 批量查询地点
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/locations`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 国家证件类型
             */
            nationalIdType: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=national_id_type&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/national_id_type/create document }
               *
               * 创建国家证件类型
               *
               * 创建国家证件类型
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/national_id_types`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=national_id_type&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/national_id_type/delete document }
               *
               * 删除国家证件类型
               *
               * 删除国家证件类型
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=national_id_type&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/national_id_type/get document }
               *
               * 查询单个国家证件类型
               *
               * 根据 ID 查询单个国家证件类型
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=national_id_type&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/national_id_type/list document }
               *
               * 批量查询国家证件类型
               *
               * 批量查询国家证件类型
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/national_id_types`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=national_id_type&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/national_id_type/patch document }
               *
               * 更新国家证件类型
               *
               * 更新国家证件类型
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 员工离职
             */
            offboarding: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=offboarding&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/offboarding/query document }
               *
               * 查询员工离职原因列表
               *
               * 查询「飞书人事」-「离职设置」中的离职原因
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/offboardings/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query"),
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v1/offboardings/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=offboarding&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=offboarding&version=v1 document }
               *
               * 根据 雇佣 ID 查询员工离职信息
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/offboardings/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=offboarding&apiName=submit&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/offboarding/submit document }
               *
               * 操作员工离职
               *
               * 操作员工直接离职
               */
              submit: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/offboardings/submit`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "submit")
            },
            /**
             * 个人信息
             */
            person: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/person/create document }
               *
               * 创建个人信息
               *
               * 创建人员的个人信息
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/persons`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/person/delete document }
               *
               * 删除个人信息
               *
               * 删除人员的个人信息
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/persons/:person_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/person/get document }
               *
               * 查询单个个人信息
               *
               * 根据 ID 查询单个人员的个人信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/persons/:person_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/person/patch document }
               *
               * 更新个人信息
               *
               * 更新个人信息
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/persons/:person_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=upload&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/person/upload document }
               *
               * 上传文件
               *
               * 上传文件
               */
              upload: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/persons/upload`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "upload")
            },
            /**
             * 待入职
             */
            preHire: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/pre_hire/delete document }
               *
               * 删除待入职人员
               *
               * 删除待入职人员
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/pre_hire/get document }
               *
               * 查询单个待入职人员
               *
               * 根据 ID 查询单个待入职人员
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/pre_hire/list document }
               *
               * 批量查询待入职人员
               *
               * 批量查询待入职人员
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/pre_hires`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/pre_hire/patch document }
               *
               * 更新待入职数据
               *
               * 更新待入职数据
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 流程管理
             */
            processFormVariableData: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process.form_variable_data&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/process-form_variable_data/get document }
               *
               * 获取流程表单数据
               *
               * 获取流程表单数据
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/processes/:process_id/form_variable_data`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * security_group
             */
            securityGroup: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=security_group&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/security_group/list document }
               *
               * 批量获取角色列表
               *
               * 批量查询「飞书人事」-「权限设置」-「角色设置」中的角色列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/security_groups`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=security_group&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/security_group/query document }
               *
               * HRBP/属地 BP 查询
               *
               * 通过部门或工作地点，查询对应的 HRBP/属地 BP
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/security_groups/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * 地理库信息
             */
            subdivision: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=subdivision&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/subdivision/get document }
               *
               * 查询单条省份/行政区信息
               *
               * 查询单条省份/行政区信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/subdivisions/:subdivision_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=subdivision&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/subdivision/list document }
               *
               * 批量查询省份/行政区信息
               *
               * 批量查询省份/行政区信息
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/subdivisions`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 地理库信息
             */
            subregion: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=subregion&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/subregion/get document }
               *
               * 查询单条城市/区域信息
               *
               * 查询单条城市/区域信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/subregions/:subregion_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=subregion&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/subregion/list document }
               *
               * 批量查询城市/区域信息
               *
               * 批量查询城市/区域信息
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/subregions`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 异动原因
             */
            transferReason: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=transfer_reason&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/transfer_reason/query document }
               *
               * 获取异动原因列表
               *
               * 获取异动原因列表
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/transfer_reasons/query`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * 异动类型
             */
            transferType: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=transfer_type&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/transfer_type/query document }
               *
               * 获取异动类型列表
               *
               * 获取异动类型列表
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/transfer_types/query`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * 工时制度
             */
            workingHoursType: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=working_hours_type&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/working_hours_type/create document }
               *
               * 创建工时制度
               *
               * 创建工时制度
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/working_hours_types`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=working_hours_type&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/working_hours_type/delete document }
               *
               * 删除工时制度
               *
               * 删除工时制度
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=working_hours_type&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/working_hours_type/get document }
               *
               * 查询单个工时制度
               *
               * 根据 ID 查询单个工时制度
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=working_hours_type&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/working_hours_type/list document }
               *
               * 批量查询工时制度
               *
               * 批量查询工时制度
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/working_hours_types`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=working_hours_type&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/working_hours_type/patch document }
               *
               * 更新工时制度
               *
               * 更新工时制度
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            }
          },
          v2: {
            /**
             * approval_groups
             */
            approvalGroups: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=approval_groups&apiName=get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=corehr&resource=approval_groups&version=v2 document }
               *
               * 获取审批组信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/approval_groups/:process_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=approval_groups&apiName=open_query_department_change_list_by_ids&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=open_query_department_change_list_by_ids&project=corehr&resource=approval_groups&version=v2 document }
               *
               * 获取部门调整信息详情
               */
              openQueryDepartmentChangeListByIds: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_department_change_list_by_ids`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "openQueryDepartmentChangeListByIds"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=approval_groups&apiName=open_query_job_change_list_by_ids&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=open_query_job_change_list_by_ids&project=corehr&resource=approval_groups&version=v2 document }
               */
              openQueryJobChangeListByIds: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_job_change_list_by_ids`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "openQueryJobChangeListByIds"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=approval_groups&apiName=open_query_position_change_list_by_ids&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=open_query_position_change_list_by_ids&project=corehr&resource=approval_groups&version=v2 document }
               *
               * 获取岗位调整信息详情
               */
              openQueryPositionChangeListByIds: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_position_change_list_by_ids`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "openQueryPositionChangeListByIds")
            },
            /**
             * approver
             */
            approver: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/approvers`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=approver&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=approver&version=v2 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/approvers`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * basic_info.bank
             */
            basicInfoBank: {
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/banks/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=basic_info.bank&apiName=search&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=basic_info.bank&version=v2 document }
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/banks/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * basic_info.bank_branch
             */
            basicInfoBankBranch: {
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/bank_branchs/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=basic_info.bank_branch&apiName=search&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=basic_info.bank_branch&version=v2 document }
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/bank_branchs/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * basic_info.city
             */
            basicInfoCity: {
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/cities/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=basic_info.city&apiName=search&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=basic_info.city&version=v2 document }
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/cities/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * basic_info.country_region
             */
            basicInfoCountryRegion: {
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/country_regions/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=basic_info.country_region&apiName=search&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=basic_info.country_region&version=v2 document }
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/country_regions/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * basic_info.country_region_subdivision
             */
            basicInfoCountryRegionSubdivision: {
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/country_region_subdivisions/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=basic_info.country_region_subdivision&apiName=search&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=basic_info.country_region_subdivision&version=v2 document }
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/country_region_subdivisions/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * basic_info.currency
             */
            basicInfoCurrency: {
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/currencies/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=basic_info.currency&apiName=search&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=basic_info.currency&version=v2 document }
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/currencies/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * basic_info.district
             */
            basicInfoDistrict: {
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/districts/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=basic_info.district&apiName=search&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=basic_info.district&version=v2 document }
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/districts/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * basic_info.language
             */
            basicInfoLanguage: {
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/languages/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=basic_info.language&apiName=search&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=basic_info.language&version=v2 document }
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/languages/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * basic_info.nationality
             */
            basicInfoNationality: {
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/nationalities/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=basic_info.nationality&apiName=search&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=basic_info.nationality&version=v2 document }
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/nationalities/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * basic_info.time_zone
             */
            basicInfoTimeZone: {
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/time_zones/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=basic_info.time_zone&apiName=search&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=basic_info.time_zone&version=v2 document }
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/time_zones/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * bp
             */
            bp: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=bp&apiName=get_by_department&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get_by_department&project=corehr&resource=bp&version=v2 document }
               */
              getByDepartment: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/bps/get_by_department`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "getByDepartment"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/bps`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=bp&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=bp&version=v2 document }
               *
               * 待补充
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/bps`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * company
             */
            company: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=active&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=active&project=corehr&resource=company&version=v2 document }
               */
              active: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/companies/active`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "active"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=batch_get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=company&version=v2 document }
               *
               * 通过公司 ID 批量获取公司信息
               */
              batchGet: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/companies/batch_get`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchGet"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=query_multi_timeline&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_multi_timeline&project=corehr&resource=company&version=v2 document }
               *
               * 查询生效时间在指定时间范围的公司
               */
              queryMultiTimeline: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/companies/query_multi_timeline`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "queryMultiTimeline"),
              queryRecentChangeWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/companies/query_recent_change`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "queryRecentChangeWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=query_recent_change&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_recent_change&project=corehr&resource=company&version=v2 document }
               */
              queryRecentChange: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/companies/query_recent_change`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "queryRecentChange")
            },
            /**
             * contract
             */
            contract: {
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/contracts/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=contract&apiName=search&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=contract&version=v2 document }
               *
               * 根据合同 ID 、雇佣 ID 查询合同信息
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/contracts/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * cost_allocation
             */
            costAllocation: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=cost_allocation&apiName=batch_query&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_query&project=corehr&resource=cost_allocation&version=v2 document }
               *
               * 通过员工ID批量获取通道信息
               */
              batchQuery: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/cost_allocations/batch_query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchQuery"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=cost_allocation&apiName=create_version&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create_version&project=corehr&resource=cost_allocation&version=v2 document }
               *
               * 创建成本分摊
               */
              createVersion: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/cost_allocations/create_version`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "createVersion"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=cost_allocation&apiName=remove_version&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=remove_version&project=corehr&resource=cost_allocation&version=v2 document }
               *
               * 删除成本分摊
               */
              removeVersion: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/cost_allocations/remove_version`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "removeVersion"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=cost_allocation&apiName=update_version&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update_version&project=corehr&resource=cost_allocation&version=v2 document }
               *
               * 更新成本分摊
               */
              updateVersion: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/cost_allocations/update_version`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "updateVersion")
            },
            /**
             * cost_center
             */
            costCenter: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=cost_center&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=cost_center&version=v2 document }
               *
               * 创建成本中心
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/cost_centers`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=cost_center&apiName=delete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=cost_center&version=v2 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=cost_center&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=cost_center&version=v2 document }
               *
               * 创建成本中心版本
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=cost_center&apiName=query_multi_timeline&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_multi_timeline&project=corehr&resource=cost_center&version=v2 document }
               *
               * 查询指定时间范围成本中心版本
               */
              queryMultiTimeline: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/cost_centers/query_multi_timeline`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "queryMultiTimeline"),
              queryRecentChangeWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/cost_centers/query_recent_change`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "queryRecentChangeWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=cost_center&apiName=query_recent_change&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_recent_change&project=corehr&resource=cost_center&version=v2 document }
               */
              queryRecentChange: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/cost_centers/query_recent_change`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "queryRecentChange"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=cost_center&apiName=search&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=cost_center&version=v2 document }
               *
               * 查询成本中心信息
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/cost_centers/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=cost_center&apiName=tree&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=tree&project=corehr&resource=cost_center&version=v2 document }
               *
               * 查询指定生效日期的成本中心架构树
               */
              tree: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/cost_centers/tree`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "tree")
            },
            /**
             * cost_center.version
             */
            costCenterVersion: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=cost_center.version&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=cost_center.version&version=v2 document }
               *
               * 创建成本中心版本
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id/versions`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=cost_center.version&apiName=delete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=cost_center.version&version=v2 document }
               *
               * 撤销成本中心版本
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id/versions/:version_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=cost_center.version&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=cost_center.version&version=v2 document }
               *
               * 创建成本中心版本
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/cost_centers/:cost_center_id/versions/:version_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * custom_org
             */
            customOrg: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=custom_org&apiName=active&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=active&project=corehr&resource=custom_org&version=v2 document }
               *
               * 启/停用自定义组织
               */
              active: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/custom_orgs/active`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "active"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=custom_org&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=custom_org&version=v2 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/custom_orgs`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=custom_org&apiName=delete_org&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete_org&project=corehr&resource=custom_org&version=v2 document }
               *
               * 删除自定义组织
               */
              deleteOrg: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/custom_orgs/delete_org`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "deleteOrg"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=custom_org&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=custom_org&version=v2 document }
               *
               * 更新自定义组织
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/custom_orgs/:org_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=custom_org&apiName=query&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=custom_org&version=v2 document }
               *
               * 查询自定义组织信息
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/custom_orgs/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query"),
              queryRecentChangeWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/custom_orgs/query_recent_change`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "queryRecentChangeWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=custom_org&apiName=query_recent_change&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_recent_change&project=corehr&resource=custom_org&version=v2 document }
               */
              queryRecentChange: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/custom_orgs/query_recent_change`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "queryRecentChange"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=custom_org&apiName=update_rule&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update_rule&project=corehr&resource=custom_org&version=v2 document }
               *
               * 更新匹配规则
               */
              updateRule: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/custom_orgs/update_rule`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "updateRule")
            },
            /**
             * default_cost_center
             */
            defaultCostCenter: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=default_cost_center&apiName=batch_query&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_query&project=corehr&resource=default_cost_center&version=v2 document }
               */
              batchQuery: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/default_cost_centers/batch_query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchQuery"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=default_cost_center&apiName=create_version&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create_version&project=corehr&resource=default_cost_center&version=v2 document }
               */
              createVersion: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/default_cost_centers/create_version`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "createVersion"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=default_cost_center&apiName=remove_version&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=remove_version&project=corehr&resource=default_cost_center&version=v2 document }
               */
              removeVersion: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/default_cost_centers/remove_version`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "removeVersion"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=default_cost_center&apiName=update_version&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update_version&project=corehr&resource=default_cost_center&version=v2 document }
               */
              updateVersion: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/default_cost_centers/update_version`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "updateVersion")
            },
            /**
             * department
             */
            department: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=batch_get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=department&version=v2 document }
               */
              batchGet: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/batch_get`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchGet"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=delete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=department&version=v2 document }
               *
               * 删除部门数据
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/:department_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=parents&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=parents&project=corehr&resource=department&version=v2 document }
               */
              parents: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/parents`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "parents"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=department&version=v2 document }
               *
               * 更新部门数据
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/:department_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=query_multi_timeline&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_multi_timeline&project=corehr&resource=department&version=v2 document }
               *
               * 查询任意日期部门信息
               */
              queryMultiTimeline: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/query_multi_timeline`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "queryMultiTimeline"),
              queryOperationLogsWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/query_operation_logs`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "queryOperationLogsWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=query_operation_logs&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_operation_logs&project=corehr&resource=department&version=v2 document }
               *
               * 查询操作日志
               */
              queryOperationLogs: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/query_operation_logs`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "queryOperationLogs"),
              queryRecentChangeWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/query_recent_change`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "queryRecentChangeWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=query_recent_change&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_recent_change&project=corehr&resource=department&version=v2 document }
               */
              queryRecentChange: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/query_recent_change`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "queryRecentChange"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=query_timeline&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_timeline&project=corehr&resource=department&version=v2 document }
               *
               * 查询任意日期部门信息
               */
              queryTimeline: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/query_timeline`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "queryTimeline"),
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=search&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=department&version=v2 document }
               *
               * 根据部门 ID，上级部门查询部门列表
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=tree&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=tree&project=corehr&resource=department&version=v2 document }
               */
              tree: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/tree`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "tree")
            },
            /**
             * draft
             */
            draft: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=draft&apiName=get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=corehr&resource=draft&version=v2 document }
               *
               * 根据组织架构调整 ID 查询调整流程信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/drafts/:draft_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * employee
             */
            employee: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee&apiName=batch_get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=employee&version=v2 document }
               *
               * 通过员工 ID 批量获取员工信息
               */
              batchGet: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/batch_get`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchGet"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=employee&version=v2 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee&apiName=search&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=employee&version=v2 document }
               *
               * 根据 email、工号、个人电话等条件查询员工雇佣信息以及个人基础信息
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * employee.custom_org
             */
            employeeCustomOrg: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee.custom_org&apiName=create_emp_custom_org&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create_emp_custom_org&project=corehr&resource=employee.custom_org&version=v2 document }
               */
              createEmpCustomOrg: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/custom_org/create_emp_custom_org`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "createEmpCustomOrg"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee.custom_org&apiName=del&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=del&project=corehr&resource=employee.custom_org&version=v2 document }
               */
              del: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/custom_org/del`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "del"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee.custom_org&apiName=edit_emp_custom_org&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=edit_emp_custom_org&project=corehr&resource=employee.custom_org&version=v2 document }
               */
              editEmpCustomOrg: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/custom_org/edit_emp_custom_org`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "editEmpCustomOrg"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee.custom_org&apiName=employment_custom_org_record&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=employment_custom_org_record&project=corehr&resource=employee.custom_org&version=v2 document }
               */
              employmentCustomOrgRecord: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/custom_org/employment_custom_org_record`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "employmentCustomOrgRecord"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee.custom_org&apiName=querybyid&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=querybyid&project=corehr&resource=employee.custom_org&version=v2 document }
               */
              querybyid: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/custom_org/querybyid`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "querybyid")
            },
            /**
             * employees.additional_job
             */
            employeesAdditionalJob: {
              batchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/batch`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "batchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.additional_job&apiName=batch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch&project=corehr&resource=employees.additional_job&version=v2 document }
               *
               * 批量查询兼职信息
               */
              batch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/batch`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.additional_job&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=employees.additional_job&version=v2 document }
               *
               * 创建兼职
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.additional_job&apiName=delete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=employees.additional_job&version=v2 document }
               *
               * 删除兼职
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/:additional_job_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.additional_job&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=employees.additional_job&version=v2 document }
               *
               * 更新兼职
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/:additional_job_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * employees.bp
             */
            employeesBp: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.bp&apiName=batch_get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=employees.bp&version=v2 document }
               */
              batchGet: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/bps/batch_get`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchGet")
            },
            /**
             * employees.international_assignment
             */
            employeesInternationalAssignment: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.international_assignment&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=employees.international_assignment&version=v2 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/international_assignments`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.international_assignment&apiName=delete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=employees.international_assignment&version=v2 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/international_assignments/:international_assignment_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/international_assignments`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.international_assignment&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=employees.international_assignment&version=v2 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/international_assignments`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.international_assignment&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=employees.international_assignment&version=v2 document }
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/international_assignments/:international_assignment_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * employees.job_data
             */
            employeesJobData: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.job_data&apiName=batch_get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=employees.job_data&version=v2 document }
               */
              batchGet: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/job_datas/batch_get`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchGet"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.job_data&apiName=query&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=employees.job_data&version=v2 document }
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/job_datas/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * enum
             */
            enum: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=enum&apiName=search&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=enum&version=v2 document }
               *
               * 通过apiname批量获取枚举信息
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/enums/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * job
             */
            job: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=batch_get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=job&version=v2 document }
               *
               * 批量获取职务信息
               */
              batchGet: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs/batch_get`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchGet"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=corehr&resource=job&version=v2 document }
               *
               * 根据 ID 查询单个职务。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs/:job_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=job&version=v2 document }
               *
               * 分页查询职务数据
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=query_multi_timeline&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_multi_timeline&project=corehr&resource=job&version=v2 document }
               *
               * 查询生效时间在指定时间范围的职务
               */
              queryMultiTimeline: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs/query_multi_timeline`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "queryMultiTimeline"),
              queryRecentChangeWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs/query_recent_change`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "queryRecentChangeWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=query_recent_change&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_recent_change&project=corehr&resource=job&version=v2 document }
               */
              queryRecentChange: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs/query_recent_change`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "queryRecentChange")
            },
            /**
             * job_change
             */
            jobChange: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_change&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=job_change&version=v2 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_changes`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_change&apiName=revoke&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=revoke&project=corehr&resource=job_change&version=v2 document }
               */
              revoke: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_changes/:job_change_id/revoke`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "revoke"),
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_changes/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_change&apiName=search&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=job_change&version=v2 document }
               *
               * 获取员工异动列表
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_changes/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * job_family
             */
            jobFamily: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=batch_get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=job_family&version=v2 document }
               *
               * 批量获取序列信息
               */
              batchGet: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_families/batch_get`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchGet"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=query_multi_timeline&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_multi_timeline&project=corehr&resource=job_family&version=v2 document }
               *
               * 查询生效时间在指定时间范围的序列
               */
              queryMultiTimeline: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_families/query_multi_timeline`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "queryMultiTimeline"),
              queryRecentChangeWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_families/query_recent_change`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "queryRecentChangeWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=query_recent_change&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_recent_change&project=corehr&resource=job_family&version=v2 document }
               */
              queryRecentChange: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_families/query_recent_change`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "queryRecentChange")
            },
            /**
             * job_grade
             */
            jobGrade: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_grade&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=job_grade&version=v2 document }
               *
               * 创建职等数据
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_grades`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_grade&apiName=delete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=job_grade&version=v2 document }
               *
               * 删除职等信息
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_grades/:job_grade_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_grade&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=job_grade&version=v2 document }
               *
               * 更新职等信息
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_grades/:job_grade_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_grade&apiName=query&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=job_grade&version=v2 document }
               *
               * 查询职等信息
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_grades/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query"),
              queryRecentChangeWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_grades/query_recent_change`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "queryRecentChangeWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_grade&apiName=query_recent_change&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_recent_change&project=corehr&resource=job_grade&version=v2 document }
               */
              queryRecentChange: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_grades/query_recent_change`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "queryRecentChange")
            },
            /**
             * job_level
             */
            jobLevel: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_level&apiName=batch_get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=job_level&version=v2 document }
               *
               * 批量获取职级信息
               */
              batchGet: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_levels/batch_get`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchGet"),
              queryRecentChangeWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_levels/query_recent_change`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "queryRecentChangeWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_level&apiName=query_recent_change&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_recent_change&project=corehr&resource=job_level&version=v2 document }
               */
              queryRecentChange: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_levels/query_recent_change`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "queryRecentChange")
            },
            /**
             * location
             */
            location: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=active&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=active&project=corehr&resource=location&version=v2 document }
               *
               * 启停/停用地点
               */
              active: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/active`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "active"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=batch_get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=location&version=v2 document }
               *
               * 通过地点 ID 批量获取地点信息
               */
              batchGet: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/batch_get`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchGet"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=location&version=v2 document }
               *
               * 更新地点
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/:location_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=query_multi_timeline&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_multi_timeline&project=corehr&resource=location&version=v2 document }
               *
               * 查询生效时间在指定时间范围的地点
               */
              queryMultiTimeline: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/query_multi_timeline`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "queryMultiTimeline"),
              queryRecentChangeWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/query_recent_change`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "queryRecentChangeWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=query_recent_change&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_recent_change&project=corehr&resource=location&version=v2 document }
               */
              queryRecentChange: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/query_recent_change`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "queryRecentChange")
            },
            /**
             * location.address
             */
            locationAddress: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location.address&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=location.address&version=v2 document }
               *
               * 添加地点地址
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location.address&apiName=delete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=location.address&version=v2 document }
               *
               * 删除地点地址
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses/:address_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location.address&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=location.address&version=v2 document }
               *
               * 更新地点地址
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses/:address_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * offboarding
             */
            offboarding: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=offboarding&apiName=edit&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=edit&project=corehr&resource=offboarding&version=v2 document }
               *
               * 编辑离职信息
               */
              edit: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/offboardings/edit`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "edit"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=offboarding&apiName=revoke&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=revoke&project=corehr&resource=offboarding&version=v2 document }
               *
               * 撤销离职信息
               */
              revoke: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/offboardings/revoke`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "revoke"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=offboarding&apiName=submit_v2&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=submit_v2&project=corehr&resource=offboarding&version=v2 document }
               */
              submitV2: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/offboardings/submit_v2`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "submitV2")
            },
            /**
             * pathway
             */
            pathway: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pathway&apiName=active&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=active&project=corehr&resource=pathway&version=v2 document }
               *
               * 启/停用通道
               */
              active: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pathways/active`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "active"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pathway&apiName=batch_get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=pathway&version=v2 document }
               *
               * 通过通道 ID 批量获取通道信息
               */
              batchGet: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pathways/batch_get`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchGet"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pathway&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=pathway&version=v2 document }
               *
               * 创建通道
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pathways`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pathway&apiName=delete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=pathway&version=v2 document }
               *
               * 删除通道
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pathways/:pathway_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pathway&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=pathway&version=v2 document }
               *
               * 更新通道信息
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pathways/:pathway_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * person
             */
            person: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=person&version=v2 document }
               *
               * 创建个人信息数据
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/persons`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=person&version=v2 document }
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/persons/:person_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * position
             */
            position: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=active&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=active&project=corehr&resource=position&version=v2 document }
               *
               * 启/停用岗位
               */
              active: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/active`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "active"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=position&version=v2 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=del_position&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=del_position&project=corehr&resource=position&version=v2 document }
               *
               * 删除岗位
               */
              delPosition: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/del_position`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delPosition"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=position&version=v2 document }
               *
               * 更新岗位
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/:position_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=query&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=position&version=v2 document }
               *
               * 查询岗位信息
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query"),
              queryRecentChangeWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "queryRecentChangeWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=query_recent_change&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_recent_change&project=corehr&resource=position&version=v2 document }
               */
              queryRecentChange: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "queryRecentChange")
            },
            /**
             * 待入职
             */
            preHire: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=complete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=complete&project=corehr&resource=pre_hire&version=v2 document }
               *
               * 完成入职
               */
              complete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/complete`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "complete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/pre_hire/create document }
               *
               * 创建待入职人员
               *
               * 创建待入职人员
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=delete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=pre_hire&version=v2 document }
               *
               * 删除待入职
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=pre_hire&version=v2 document }
               *
               * 更新待入职
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              queryWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/query`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "queryWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=query&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=pre_hire&version=v2 document }
               *
               * 批量查询待入职数据
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=restore_flow_instance&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=restore_flow_instance&project=corehr&resource=pre_hire&version=v2 document }
               */
              restoreFlowInstance: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/restore_flow_instance`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "restoreFlowInstance"),
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=search&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=pre_hire&version=v2 document }
               *
               * 根据部门 ID，上级部门查询部门列表
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=transform_onboarding_task&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=transform_onboarding_task&project=corehr&resource=pre_hire&version=v2 document }
               *
               * 入职常规任务的流转，支持手动开启任务，提交任务以及审批任务
               */
              transformOnboardingTask: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/transform_onboarding_task`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "transformOnboardingTask"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=transit_task&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=transit_task&project=corehr&resource=pre_hire&version=v2 document }
               *
               * 任务流转
               */
              transitTask: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/transit_task`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "transitTask"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=withdraw_onboarding&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=withdraw_onboarding&project=corehr&resource=pre_hire&version=v2 document }
               */
              withdrawOnboarding: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/withdraw_onboarding`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "withdrawOnboarding")
            },
            /**
             * probation.assessment
             */
            probationAssessment: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation.assessment&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=probation.assessment&version=v2 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/assessments`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation.assessment&apiName=delete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=probation.assessment&version=v2 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation.assessment&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=probation.assessment&version=v2 document }
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * probation
             */
            probation: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation&apiName=edit&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=edit&project=corehr&resource=probation&version=v2 document }
               */
              edit: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/edit`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "edit"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation&apiName=enable_disable_assessment&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=enable_disable_assessment&project=corehr&resource=probation&version=v2 document }
               */
              enableDisableAssessment: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/enable_disable_assessment`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "enableDisableAssessment"),
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation&apiName=search&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=probation&version=v2 document }
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation&apiName=submit&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=submit&project=corehr&resource=probation&version=v2 document }
               */
              submit: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/submit`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "submit"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation&apiName=withdraw&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=withdraw&project=corehr&resource=probation&version=v2 document }
               */
              withdraw: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/withdraw`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "withdraw")
            },
            /**
             * process.approver
             */
            processApprover: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process.approver&apiName=update&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=corehr&resource=process.approver&version=v2 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes/:process_id/approvers/:approver_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * process.extra
             */
            processExtra: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process.extra&apiName=update&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=corehr&resource=process.extra&version=v2 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes/:process_id/extra`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * process
             */
            process: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process&apiName=flow_variable_data&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=flow_variable_data&project=corehr&resource=process&version=v2 document }
               */
              flowVariableData: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes/:process_id/flow_variable_data`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "flowVariableData"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process&apiName=get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=corehr&resource=process&version=v2 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes/:process_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=process&version=v2 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * process.form_variable_data
             */
            processFormVariableData: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process.form_variable_data&apiName=get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=corehr&resource=process.form_variable_data&version=v2 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes/:process_id/form_variable_data`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * process.query_flow_data_template
             */
            processQueryFlowDataTemplate: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process.query_flow_data_template&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=process.query_flow_data_template&version=v2 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/query_flow_data_template`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create")
            },
            /**
             * process.transfer
             */
            processTransfer: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process.transfer&apiName=update&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=corehr&resource=process.transfer&version=v2 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes/:process_id/transfer`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * process_revoke
             */
            processRevoke: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process_revoke&apiName=update&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=corehr&resource=process_revoke&version=v2 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/process_revoke/:process_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * process_start
             */
            processStart: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process_start&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=process_start&version=v2 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/process_start`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create")
            },
            /**
             * process_withdraw
             */
            processWithdraw: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process_withdraw&apiName=update&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=corehr&resource=process_withdraw&version=v2 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/process_withdraw/:process_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * report_detail_row
             */
            reportDetailRow: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=report_detail_row&apiName=batchDelete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batchDelete&project=corehr&resource=report_detail_row&version=v2 document }
               *
               * 批量删除填报行
               */
              batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/report_detail_row/batchDelete`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchDelete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=report_detail_row&apiName=batchSave&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batchSave&project=corehr&resource=report_detail_row&version=v2 document }
               *
               * 批量创建/更新填报行
               */
              batchSave: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/report_detail_row/batchSave`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchSave")
            },
            /**
             * signature_file
             */
            signatureFile: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_file&apiName=download&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=download&project=corehr&resource=signature_file&version=v2 document }
               */
              download: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files/:signature_file_id/download`, path2),
                  method: "POST",
                  headers,
                  data,
                  params,
                  responseType: "stream",
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                  $return_headers: true
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                const checkIsReadable = /* @__PURE__ */ __name(() => {
                  const consumedError = "The stream has already been consumed";
                  if (!res.data.readable) {
                    this.logger.error(consumedError);
                    throw new Error(consumedError);
                  }
                }, "checkIsReadable");
                return {
                  writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                    checkIsReadable();
                    return new Promise((resolve, reject) => {
                      const writableStream = fs__default["default"].createWriteStream(filePath);
                      writableStream.on("finish", () => {
                        resolve(filePath);
                      });
                      writableStream.on("error", (e) => {
                        reject(e);
                      });
                      res.data.pipe(writableStream);
                    });
                  }), "writeFile"),
                  getReadableStream: /* @__PURE__ */ __name(() => {
                    checkIsReadable();
                    return res.data;
                  }, "getReadableStream"),
                  headers: res.headers
                };
              }), "download"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_file&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=signature_file&version=v2 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_file&apiName=list_by_biz_id&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list_by_biz_id&project=corehr&resource=signature_file&version=v2 document }
               */
              listByBizId: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files/list_by_biz_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "listByBizId"),
              queryWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files/query`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "queryWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_file&apiName=query&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=signature_file&version=v2 document }
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_file&apiName=terminate&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=terminate&project=corehr&resource=signature_file&version=v2 document }
               */
              terminate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files/terminate`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "terminate")
            },
            /**
             * signature_node
             */
            signatureNode: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_node&apiName=list_by_file_id&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list_by_file_id&project=corehr&resource=signature_node&version=v2 document }
               */
              listByFileId: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_nodes/list_by_file_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "listByFileId")
            },
            /**
             * signature_template
             */
            signatureTemplate: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_template&apiName=search&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=signature_template&version=v2 document }
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_templates/search`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * signature_template_info_with_thumbnail
             */
            signatureTemplateInfoWithThumbnail: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_template_info_with_thumbnail&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=signature_template_info_with_thumbnail&version=v2 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * workforce_plan
             */
            workforcePlan: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/corehr/v2/workforce_plans`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=workforce_plan&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=workforce_plan&version=v2 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/workforce_plans`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * workforce_plan_detail
             */
            workforcePlanDetail: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=workforce_plan_detail&apiName=batch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch&project=corehr&resource=workforce_plan_detail&version=v2 document }
               */
              batch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/workforce_plan_details/batch`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=workforce_plan_detail&apiName=batch_v2&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_v2&project=corehr&resource=workforce_plan_detail&version=v2 document }
               */
              batchV2: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/workforce_plan_details/batch_v2`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchV2")
            },
            /**
             * workforce_plan_detail_row
             */
            workforcePlanDetailRow: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=workforce_plan_detail_row&apiName=batchDelete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batchDelete&project=corehr&resource=workforce_plan_detail_row&version=v2 document }
               *
               * 批量删除明细行
               */
              batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/workforce_plan_detail_row/batchDelete`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchDelete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=workforce_plan_detail_row&apiName=batchSave&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batchSave&project=corehr&resource=workforce_plan_detail_row&version=v2 document }
               *
               * 批量创建/更新明细行
               */
              batchSave: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/corehr/v2/workforce_plan_detail_row/batchSave`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchSave")
            }
          }
        };
      }
    };
    var Client$L = class extends Client$M {
      static {
        __name(this, "Client$L");
      }
      constructor() {
        super(...arguments);
        this.directory = {
          v1: {
            /**
             * collaboration_rule
             */
            collaborationRule: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=directory&resource=collaboration_rule&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=directory&resource=collaboration_rule&version=v1 document }
               *
               * 创建关联组织规则
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/directory/v1/collaboration_rules`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=directory&resource=collaboration_rule&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=directory&resource=collaboration_rule&version=v1 document }
               *
               * 删除关联组织的规则
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/directory/v1/collaboration_rules/:collaboration_rule_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/directory/v1/collaboration_rules`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=directory&resource=collaboration_rule&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=directory&resource=collaboration_rule&version=v1 document }
               *
               * 获取关联组织规则列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/directory/v1/collaboration_rules`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=directory&resource=collaboration_rule&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=directory&resource=collaboration_rule&version=v1 document }
               *
               * 更新关联组织规则
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/directory/v1/collaboration_rules/:collaboration_rule_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * collaboration_tenant
             */
            collaborationTenant: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/directory/v1/collaboration_tenants`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=directory&resource=collaboration_tenant&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=directory&resource=collaboration_tenant&version=v1 document }
               *
               * 在创建规则时，需要知道对方租户的tenant key，为拿到有效的tenant key，这里提供一个专门给管理员获取关联组织租户的接口，该接口可以直接请求到所有关联组织列表。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/directory/v1/collaboration_tenants`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * collboration_share_entity
             */
            collborationShareEntity: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/directory/v1/share_entities`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=directory&resource=collboration_share_entity&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=directory&resource=collboration_share_entity&version=v1 document }
               *
               * 获取双方租户分享的实体ID,完成可见性规则的设置
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/directory/v1/share_entities`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * department
             */
            department: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=directory&resource=department&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=directory&resource=department&version=v1 document }
               *
               * 创建部门信息
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/directory/v1/departments`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=directory&resource=department&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=directory&resource=department&version=v1 document }
               *
               * 删除部门信息
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/directory/v1/departments/:department_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=directory&resource=department&apiName=filter&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=filter&project=directory&resource=department&version=v1 document }
               *
               * 查询部门ID列表
               */
              filter: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/directory/v1/departments/filter`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "filter"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=directory&resource=department&apiName=mget&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=mget&project=directory&resource=department&version=v1 document }
               *
               * 查询部门
               */
              mget: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/directory/v1/departments/mget`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "mget"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=directory&resource=department&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=directory&resource=department&version=v1 document }
               *
               * 更新部门信息
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/directory/v1/departments/:department_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=directory&resource=department&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=directory&resource=department&version=v1 document }
               *
               * 搜索租户内部门
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/directory/v1/departments/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * employee
             */
            employee: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=directory&resource=employee&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=directory&resource=employee&version=v1 document }
               *
               * 创建员工信息
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/directory/v1/employees`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=directory&resource=employee&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=directory&resource=employee&version=v1 document }
               *
               * 离职员工信息
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/directory/v1/employees/:employee_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=directory&resource=employee&apiName=filter&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=filter&project=directory&resource=employee&version=v1 document }
               *
               * 查询员工ID列表
               */
              filter: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/directory/v1/employees/filter`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "filter"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=directory&resource=employee&apiName=mget&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=mget&project=directory&resource=employee&version=v1 document }
               *
               * 批量获取员工数据
               */
              mget: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/directory/v1/employees/mget`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "mget"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=directory&resource=employee&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=directory&resource=employee&version=v1 document }
               *
               * 更新员工信息
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/directory/v1/employees/:employee_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=directory&resource=employee&apiName=regular&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=regular&project=directory&resource=employee&version=v1 document }
               *
               * 待离职雇员恢复成在职状态
               */
              regular: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/directory/v1/employees/:employee_id/regular`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "regular"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=directory&resource=employee&apiName=resurrect&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=resurrect&project=directory&resource=employee&version=v1 document }
               *
               * 恢复员工信息
               */
              resurrect: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/directory/v1/employees/:employee_id/resurrect`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "resurrect"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=directory&resource=employee&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=directory&resource=employee&version=v1 document }
               *
               * 搜索租户内员工
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/directory/v1/employees/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=directory&resource=employee&apiName=to_be_resigned&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=to_be_resigned&project=directory&resource=employee&version=v1 document }
               *
               * 更新在职雇员到待离职状态
               */
              toBeResigned: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/directory/v1/employees/:employee_id/to_be_resigned`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "toBeResigned")
            }
          }
        };
      }
    };
    var Client$K = class extends Client$L {
      static {
        __name(this, "Client$K");
      }
      constructor() {
        super(...arguments);
        this.docs_tool = {};
      }
    };
    var Client$J = class extends Client$K {
      static {
        __name(this, "Client$J");
      }
      constructor() {
        super(...arguments);
        this.docs = {
          v1: {
            /**
             * content
             */
            content: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=docs&resource=content&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=docs&resource=content&version=v1 document }
               *
               * 获取云文档正文内容
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/docs/v1/content`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            }
          }
        };
      }
    };
    var Client$I = class extends Client$J {
      static {
        __name(this, "Client$I");
      }
      constructor() {
        super(...arguments);
        this.document_ai = {
          v1: {
            /**
             * bank_card
             */
            bankCard: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=bank_card&apiName=recognize&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=bank_card&version=v1 document }
               */
              recognize: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/bank_card/recognize`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "recognize")
            },
            /**
             * business_card
             */
            businessCard: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=business_card&apiName=recognize&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=business_card&version=v1 document }
               */
              recognize: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/business_card/recognize`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "recognize")
            },
            /**
             * business_license
             */
            businessLicense: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=business_license&apiName=recognize&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=business_license&version=v1 document }
               */
              recognize: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/business_license/recognize`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "recognize")
            },
            /**
             * chinese_passport
             */
            chinesePassport: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=chinese_passport&apiName=recognize&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=chinese_passport&version=v1 document }
               */
              recognize: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/chinese_passport/recognize`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "recognize")
            },
            /**
             * contract
             */
            contract: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=contract&apiName=field_extraction&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=field_extraction&project=document_ai&resource=contract&version=v1 document }
               */
              fieldExtraction: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/contract/field_extraction`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "fieldExtraction")
            },
            /**
             * driving_license
             */
            drivingLicense: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=driving_license&apiName=recognize&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=driving_license&version=v1 document }
               */
              recognize: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/driving_license/recognize`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "recognize")
            },
            /**
             * food_manage_license
             */
            foodManageLicense: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=food_manage_license&apiName=recognize&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=food_manage_license&version=v1 document }
               */
              recognize: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/food_manage_license/recognize`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "recognize")
            },
            /**
             * food_produce_license
             */
            foodProduceLicense: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=food_produce_license&apiName=recognize&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=food_produce_license&version=v1 document }
               */
              recognize: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/food_produce_license/recognize`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "recognize")
            },
            /**
             * health_certificate
             */
            healthCertificate: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=health_certificate&apiName=recognize&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=health_certificate&version=v1 document }
               */
              recognize: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/health_certificate/recognize`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "recognize")
            },
            /**
             * hkm_mainland_travel_permit
             */
            hkmMainlandTravelPermit: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=hkm_mainland_travel_permit&apiName=recognize&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=hkm_mainland_travel_permit&version=v1 document }
               */
              recognize: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/hkm_mainland_travel_permit/recognize`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "recognize")
            },
            /**
             * id_card
             */
            idCard: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=id_card&apiName=recognize&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=id_card&version=v1 document }
               */
              recognize: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/id_card/recognize`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "recognize")
            },
            /**
             * resume
             */
            resume: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=resume&apiName=parse&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=parse&project=document_ai&resource=resume&version=v1 document }
               */
              parse: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/resume/parse`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "parse")
            },
            /**
             * taxi_invoice
             */
            taxiInvoice: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=taxi_invoice&apiName=recognize&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=taxi_invoice&version=v1 document }
               */
              recognize: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/taxi_invoice/recognize`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "recognize")
            },
            /**
             * train_invoice
             */
            trainInvoice: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=train_invoice&apiName=recognize&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=train_invoice&version=v1 document }
               */
              recognize: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/train_invoice/recognize`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "recognize")
            },
            /**
             * tw_mainland_travel_permit
             */
            twMainlandTravelPermit: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=tw_mainland_travel_permit&apiName=recognize&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=tw_mainland_travel_permit&version=v1 document }
               */
              recognize: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/tw_mainland_travel_permit/recognize`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "recognize")
            },
            /**
             * vat_invoice
             */
            vatInvoice: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=vat_invoice&apiName=recognize&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=vat_invoice&version=v1 document }
               */
              recognize: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/vat_invoice/recognize`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "recognize")
            },
            /**
             * vehicle_invoice
             */
            vehicleInvoice: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=vehicle_invoice&apiName=recognize&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=vehicle_invoice&version=v1 document }
               */
              recognize: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/vehicle_invoice/recognize`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "recognize")
            },
            /**
             * vehicle_license
             */
            vehicleLicense: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=vehicle_license&apiName=recognize&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=vehicle_license&version=v1 document }
               */
              recognize: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/vehicle_license/recognize`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "recognize")
            }
          }
        };
      }
    };
    var Client$H = class extends Client$I {
      static {
        __name(this, "Client$H");
      }
      constructor() {
        super(...arguments);
        this.docx = {
          /**
           * chat.announcement.block
           */
          chatAnnouncementBlock: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=docx&resource=chat.announcement.block&apiName=batch_update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_update&project=docx&resource=chat.announcement.block&version=v1 document }
             */
            batchUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/batch_update`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchUpdate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=docx&resource=chat.announcement.block&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=docx&resource=chat.announcement.block&version=v1 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=docx&resource=chat.announcement.block&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=docx&resource=chat.announcement.block&version=v1 document }
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * chat.announcement.block.children
           */
          chatAnnouncementBlockChildren: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=docx&resource=chat.announcement.block.children&apiName=batch_delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=docx&resource=chat.announcement.block.children&version=v1 document }
             */
            batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children/batch_delete`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchDelete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=docx&resource=chat.announcement.block.children&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=docx&resource=chat.announcement.block.children&version=v1 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=docx&resource=chat.announcement.block.children&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=docx&resource=chat.announcement.block.children&version=v1 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          /**
           * chat.announcement
           */
          chatAnnouncement: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=docx&resource=chat.announcement&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=docx&resource=chat.announcement&version=v1 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          /**
           * 块
           */
          documentBlock: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block&apiName=batch_update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/batch_update document }
             *
             * 批量更新块
             *
             * 批量更新块的富文本内容。
             *
             * 频率限制：单个应用调用频率上限为每秒 3 次。
             *
             * 在调用此接口前，请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcnMiwAKCiE6oQEkPyhvmmQEe)，了解相关规则及约束。
             */
            batchUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/batch_update`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchUpdate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/get document }
             *
             * 获取块
             *
             * 获取指定块的富文本内容。
             *
             * 频率限制：单个应用调用频率上限为每秒 5 次。
             *
             * 在调用此接口前，请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnamKaccZKqIMopnREJCZUMe#doxcnWEMWYAg2YMkEq0SZXHzaih)，了解相关规则及约束。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/list document }
             *
             * 获取文档所有块
             *
             * 获取文档所有块的富文本内容并分页返回。
             *
             * 频率限制：单个应用调用频率上限为每秒 5 次。
             *
             * 在调用此接口前，请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnamKaccZKqIMopnREJCZUMe#doxcn6AkCE2AUUm2WwxID7lS7Xc)，了解相关规则及约束。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/patch document }
             *
             * 更新块
             *
             * 更新指定的块。
             *
             * 频率限制：单个应用调用频率上限为每秒 3 次。
             *
             * 在调用此接口前，请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcnEeyS0I8MMqoieIMpK7jm8g)，了解相关规则及约束。
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * document.block.children
           */
          documentBlockChildren: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block.children&apiName=batch_delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/batch_delete document }
             *
             * 删除块
             *
             * 指定需要操作的块，删除其指定范围的子块。如果操作成功，接口将返回应用删除操作后的文档版本号。
             *
             * 频率限制：单个应用调用频率上限为每秒 3 次。
             *
             * 在调用此接口前，请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcngCsscGk0WacO258mYDgM6b)，了解相关规则及约束。
             */
            batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children/batch_delete`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchDelete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block.children&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/create document }
             *
             * 创建块
             *
             * 指定需要操作的块，为其创建一批子块，并插入到指定位置。如果操作成功，接口将返回新创建子块的富文本内容。
             *
             * 频率限制：单个应用调用频率上限为每秒 3 次。
             *
             * 在调用此接口前，请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcnm0ooUe0s20GwwVB3a05rtb)，了解相关规则及约束。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            getWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "getWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block.children&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/get document }
             *
             * 获取所有子块
             *
             * 给定一个指定版本的文档，并指定需要操作的块，分页遍历其所有子块富文本内容 。如果不指定版本，则会默认查询最新版本。
             *
             * 频率限制：单个应用调用频率上限为每秒 5 次。
             *
             * 在调用此接口前，请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcnE2UK2yY0gEGK8nBMPtB0vd)，了解相关规则及约束。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          /**
           * document.block.descendant
           */
          documentBlockDescendant: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block.descendant&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=docx&resource=document.block.descendant&version=v1 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/descendant`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create")
          },
          /**
           * 文档
           */
          document: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=convert&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=convert&project=docx&resource=document&version=v1 document }
             */
            convert: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/blocks/convert`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "convert"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document/create document }
             *
             * 创建文档
             *
             * 创建新版文档，文档标题和目录可选。
             *
             * 频率限制：单个应用调用频率上限为每秒 3 次。
             *
             * 在调用此接口前，请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcnyoyCgwS8ywWwMtQr9yjZ2f)，了解相关规则及约束。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document/get document }
             *
             * 获取文档基本信息
             *
             * 获取文档最新版本号、标题等
             *
             * 频率限制：单个应用调用频率上限为每秒 5 次。
             *
             * 在调用此接口前，请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcnWKAE4aSaIU4GcdLInSaVde)，了解相关规则及约束。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=raw_content&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document/raw_content document }
             *
             * 获取文档纯文本内容
             *
             * 获取文档的纯文本内容。
             *
             * 频率限制：单个应用调用频率上限为每秒 5 次。
             *
             * 在调用此接口前，请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcnQeqI4wiKIMis6GNvCOBuqg)，了解相关规则及约束。
             */
            rawContent: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/raw_content`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "rawContent")
          },
          v1: {
            /**
             * chat.announcement.block
             */
            chatAnnouncementBlock: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=docx&resource=chat.announcement.block&apiName=batch_update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_update&project=docx&resource=chat.announcement.block&version=v1 document }
               */
              batchUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/batch_update`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchUpdate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=docx&resource=chat.announcement.block&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=docx&resource=chat.announcement.block&version=v1 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=docx&resource=chat.announcement.block&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=docx&resource=chat.announcement.block&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * chat.announcement.block.children
             */
            chatAnnouncementBlockChildren: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=docx&resource=chat.announcement.block.children&apiName=batch_delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=docx&resource=chat.announcement.block.children&version=v1 document }
               */
              batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children/batch_delete`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchDelete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=docx&resource=chat.announcement.block.children&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=docx&resource=chat.announcement.block.children&version=v1 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=docx&resource=chat.announcement.block.children&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=docx&resource=chat.announcement.block.children&version=v1 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement/blocks/:block_id/children`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * chat.announcement
             */
            chatAnnouncement: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=docx&resource=chat.announcement&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=docx&resource=chat.announcement&version=v1 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/docx/v1/chats/:chat_id/announcement`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * 块
             */
            documentBlock: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block&apiName=batch_update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/batch_update document }
               *
               * 批量更新块
               *
               * 批量更新块的富文本内容。
               *
               * 频率限制：单个应用调用频率上限为每秒 3 次。
               *
               * 在调用此接口前，请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcnMiwAKCiE6oQEkPyhvmmQEe)，了解相关规则及约束。
               */
              batchUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/batch_update`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchUpdate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/get document }
               *
               * 获取块
               *
               * 获取指定块的富文本内容。
               *
               * 频率限制：单个应用调用频率上限为每秒 5 次。
               *
               * 在调用此接口前，请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnamKaccZKqIMopnREJCZUMe#doxcnWEMWYAg2YMkEq0SZXHzaih)，了解相关规则及约束。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/list document }
               *
               * 获取文档所有块
               *
               * 获取文档所有块的富文本内容并分页返回。
               *
               * 频率限制：单个应用调用频率上限为每秒 5 次。
               *
               * 在调用此接口前，请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnamKaccZKqIMopnREJCZUMe#doxcn6AkCE2AUUm2WwxID7lS7Xc)，了解相关规则及约束。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/patch document }
               *
               * 更新块
               *
               * 更新指定的块。
               *
               * 频率限制：单个应用调用频率上限为每秒 3 次。
               *
               * 在调用此接口前，请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcnEeyS0I8MMqoieIMpK7jm8g)，了解相关规则及约束。
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * document.block.children
             */
            documentBlockChildren: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block.children&apiName=batch_delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/batch_delete document }
               *
               * 删除块
               *
               * 指定需要操作的块，删除其指定范围的子块。如果操作成功，接口将返回应用删除操作后的文档版本号。
               *
               * 频率限制：单个应用调用频率上限为每秒 3 次。
               *
               * 在调用此接口前，请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcngCsscGk0WacO258mYDgM6b)，了解相关规则及约束。
               */
              batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children/batch_delete`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchDelete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block.children&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/create document }
               *
               * 创建块
               *
               * 指定需要操作的块，为其创建一批子块，并插入到指定位置。如果操作成功，接口将返回新创建子块的富文本内容。
               *
               * 频率限制：单个应用调用频率上限为每秒 3 次。
               *
               * 在调用此接口前，请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcnm0ooUe0s20GwwVB3a05rtb)，了解相关规则及约束。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              getWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "getWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block.children&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/get document }
               *
               * 获取所有子块
               *
               * 给定一个指定版本的文档，并指定需要操作的块，分页遍历其所有子块富文本内容 。如果不指定版本，则会默认查询最新版本。
               *
               * 频率限制：单个应用调用频率上限为每秒 5 次。
               *
               * 在调用此接口前，请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcnE2UK2yY0gEGK8nBMPtB0vd)，了解相关规则及约束。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * document.block.descendant
             */
            documentBlockDescendant: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block.descendant&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=docx&resource=document.block.descendant&version=v1 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/descendant`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create")
            },
            /**
             * 文档
             */
            document: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=convert&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=convert&project=docx&resource=document&version=v1 document }
               */
              convert: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/blocks/convert`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "convert"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document/create document }
               *
               * 创建文档
               *
               * 创建新版文档，文档标题和目录可选。
               *
               * 频率限制：单个应用调用频率上限为每秒 3 次。
               *
               * 在调用此接口前，请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcnyoyCgwS8ywWwMtQr9yjZ2f)，了解相关规则及约束。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document/get document }
               *
               * 获取文档基本信息
               *
               * 获取文档最新版本号、标题等
               *
               * 频率限制：单个应用调用频率上限为每秒 5 次。
               *
               * 在调用此接口前，请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcnWKAE4aSaIU4GcdLInSaVde)，了解相关规则及约束。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=raw_content&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document/raw_content document }
               *
               * 获取文档纯文本内容
               *
               * 获取文档的纯文本内容。
               *
               * 频率限制：单个应用调用频率上限为每秒 5 次。
               *
               * 在调用此接口前，请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcnQeqI4wiKIMis6GNvCOBuqg)，了解相关规则及约束。
               */
              rawContent: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/raw_content`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "rawContent")
            }
          }
        };
      }
    };
    var Client$G = class extends Client$H {
      static {
        __name(this, "Client$G");
      }
      constructor() {
        super(...arguments);
        this.drive = {
          /**
           * 导出
           */
          exportTask: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=export_task&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/export_task/create document }
             *
             * 创建导出任务
             *
             * 创建导出任务，将云文件导出为指定格式的本地文件。该接口为异步接口，需要通过轮询 [查询导出任务结果](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/export_task/get) 接口获取任务结果。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/export_tasks`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=export_task&apiName=download&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/export_task/download document }
             *
             * 下载导出文件
             *
             * 根据任务导出结果的token，下载导出文件
             */
            download: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/export_tasks/file/:file_token/download`, path2),
                method: "GET",
                headers,
                data,
                params,
                responseType: "stream",
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                $return_headers: true
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              const checkIsReadable = /* @__PURE__ */ __name(() => {
                const consumedError = "The stream has already been consumed";
                if (!res.data.readable) {
                  this.logger.error(consumedError);
                  throw new Error(consumedError);
                }
              }, "checkIsReadable");
              return {
                writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                  checkIsReadable();
                  return new Promise((resolve, reject) => {
                    const writableStream = fs__default["default"].createWriteStream(filePath);
                    writableStream.on("finish", () => {
                      resolve(filePath);
                    });
                    writableStream.on("error", (e) => {
                      reject(e);
                    });
                    res.data.pipe(writableStream);
                  });
                }), "writeFile"),
                getReadableStream: /* @__PURE__ */ __name(() => {
                  checkIsReadable();
                  return res.data;
                }, "getReadableStream"),
                headers: res.headers
              };
            }), "download"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=export_task&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/export_task/get document }
             *
             * 查询导出任务结果
             *
             * 根据[创建导出任务](/ssl::ttdoc//uAjLw4CM/ukTMukTMukTM/reference/drive-v1/export_task/create)的ticket查询导出任务的结果，前提条件需要先调用创建导出任务接口。;;通过该接口获取到下载文件的 token 后调用[下载导出文件接口](/ssl::ttdoc//uAjLw4CM/ukTMukTMukTM/reference/drive-v1/export_task/download)将文件进行下载
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/export_tasks/:ticket`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          /**
           * 评论
           */
          fileComment: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.comment&apiName=batch_query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/batch_query document }
             *
             * 批量获取评论
             *
             * 该接口用于根据评论 ID 列表批量获取评论。
             */
            batchQuery: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/batch_query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchQuery"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.comment&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/create document }
             *
             * 添加评论
             *
             * 往云文档添加一条全局评论。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.comment&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/get document }
             *
             * 获取评论
             *
             * 获取云文档中的某条评论。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.comment&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/list document }
             *
             * 分页获取文档评论
             *
             * 该接口用于根据文档 token 分页获取文档评论。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.comment&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/patch document }
             *
             * 解决/恢复 评论
             *
             * 解决或恢复云文档中的评论。
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 评论
           */
          fileCommentReply: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.comment.reply&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=drive&resource=file.comment.reply&version=v1 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.comment.reply&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment-reply/delete document }
             *
             * 删除回复
             *
             * 删除云文档中的某条回复。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.comment.reply&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment-reply/list document }
             *
             * 获取回复
             *
             * 该接口用于根据评论 ID 以及分页参数，获取回复。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.comment.reply&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment-reply/update document }
             *
             * 更新回复
             *
             * 更新云文档中的某条回复。
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 分片上传
           */
          file: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=copy&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/copy document }
             *
             * 复制文件
             *
             * 将文件复制到用户云空间的其他文件夹中。不支持复制文件夹。;;如果目标文件夹是我的空间，则复制的文件会在「**我的空间**」的「**归我所有**」列表里。
             *
             * 该接口不支持并发拷贝多个文件，且调用频率上限为 5QPS 且 10000次/天
             */
            copy: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/copy`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "copy"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=create_folder&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/create_folder document }
             *
             * 新建文件夹
             *
             * 在用户云空间的指定文件夹中创建一个新的空文件夹。
             *
             * 该接口不支持并发创建，且调用频率上限为 5QPS 以及 10000次/天
             */
            createFolder: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/create_folder`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "createFolder"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=create_shortcut&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create_shortcut&project=drive&resource=file&version=v1 document }
             */
            createShortcut: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/create_shortcut`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "createShortcut"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/delete document }
             *
             * 删除文件
             *
             * 删除用户在云空间内的文件或者文件夹。文件或者文件夹被删除后，会进入用户回收站里。
             *
             * 该接口不支持并发调用，且调用频率上限为5QPS。删除文件夹会异步执行并返回一个task_id，可以使用[task_check](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/task_check)接口查询任务执行状态。
             *
             * 要删除文件需要确保应用具有下述两种权限之一：;1. 该应用是文件所有者并且具有该文件所在父文件夹的编辑权限。;2. 该应用并非文件所有者，但是是该文件所在父文件夹的所有者或者拥有该父文件夹的所有权限（full access）。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=delete_subscribe&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/delete_subscribe document }
             *
             * 取消云文档事件订阅情况
             *
             * 该接口**仅支持文档拥有者**取消订阅自己文档的通知事件，可订阅的文档类型为**旧版文档**、**新版文档**、**电子表格**和**多维表格**。在调用该接口之前请确保正确[配置事件回调网址和订阅事件类型](https://open.feishu.cn/document/ukTMukTMukTM/uUTNz4SN1MjL1UzM#2eb3504a)，事件类型参考[事件列表](https://open.feishu.cn/document/ukTMukTMukTM/uYDNxYjL2QTM24iN0EjN/event-list)。
             */
            deleteSubscribe: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/delete_subscribe`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "deleteSubscribe"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=download&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/download document }
             *
             * 下载文件
             *
             * 使用该接口可以下载在云空间目录下的文件（不含飞书文档/表格/思维导图等在线文档）。支持range下载。
             *
             * 该接口支持调用频率上限为5QPS
             */
            download: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/download`, path2),
                method: "GET",
                headers,
                data,
                params,
                responseType: "stream",
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                $return_headers: true
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              const checkIsReadable = /* @__PURE__ */ __name(() => {
                const consumedError = "The stream has already been consumed";
                if (!res.data.readable) {
                  this.logger.error(consumedError);
                  throw new Error(consumedError);
                }
              }, "checkIsReadable");
              return {
                writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                  checkIsReadable();
                  return new Promise((resolve, reject) => {
                    const writableStream = fs__default["default"].createWriteStream(filePath);
                    writableStream.on("finish", () => {
                      resolve(filePath);
                    });
                    writableStream.on("error", (e) => {
                      reject(e);
                    });
                    res.data.pipe(writableStream);
                  });
                }), "writeFile"),
                getReadableStream: /* @__PURE__ */ __name(() => {
                  checkIsReadable();
                  return res.data;
                }, "getReadableStream"),
                headers: res.headers
              };
            }), "download"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=get_subscribe&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/get_subscribe document }
             *
             * 查询云文档事件订阅状态
             *
             * 该接口**仅支持文档拥有者**查询自己文档的订阅状态，可订阅的文档类型为**旧版文档**、**新版文档**、**电子表格**和**多维表格**。在调用该接口之前请确保正确[配置事件回调网址和订阅事件类型](https://open.feishu.cn/document/ukTMukTMukTM/uUTNz4SN1MjL1UzM#2eb3504a)，事件类型参考[事件列表](https://open.feishu.cn/document/ukTMukTMukTM/uYDNxYjL2QTM24iN0EjN/event-list)。
             */
            getSubscribe: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/get_subscribe`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "getSubscribe"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/list document }
             *
             * 获取文件夹下的清单
             *
             * 获取用户云空间中指定文件夹下的文件清单。清单类型包括文件、各种在线文档（文档、电子表格、多维表格、思维笔记）、文件夹和快捷方式。该接口支持分页，但是不会递归的获取子文件夹的清单。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=move&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/move document }
             *
             * 移动文件
             *
             * 将文件或者文件夹移动到用户云空间的其他位置。
             */
            move: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/move`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "move"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=subscribe&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/subscribe document }
             *
             * 订阅云文档事件
             *
             * 该接口仅支持**文档拥有者**订阅自己文档的通知事件，可订阅的文档类型为**旧版文档**、**新版文档**、**电子表格**和**多维表格**。在调用该接口之前请确保正确[配置事件回调网址和订阅事件类型](https://open.feishu.cn/document/ukTMukTMukTM/uUTNz4SN1MjL1UzM#2eb3504a)(暂不支持单独订阅文档维度的某类事件)，事件类型参考[事件列表](https://open.feishu.cn/document/ukTMukTMukTM/uYDNxYjL2QTM24iN0EjN/event-list)。
             */
            subscribe: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/subscribe`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "subscribe"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=task_check&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/task_check document }
             *
             * 查询异步任务状态
             *
             * 查询删除文件夹等异步任务的状态信息。
             */
            taskCheck: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/task_check`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "taskCheck"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=upload_all&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/upload_all document }
             *
             * 上传文件
             *
             * 向云空间指定目录下上传一个小文件。
             *
             * 该接口支持调用频率上限为5QPS
             *
             * 请不要使用这个接口上传大于20MB的文件，如果有这个需求可以尝试使用[分片上传接口](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/multipart-upload-file-/introduction)。
             */
            uploadAll: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/upload_all`, path2),
                method: "POST",
                data,
                params,
                headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              return (res === null || res === void 0 ? void 0 : res.data) || null;
            }), "uploadAll"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=upload_finish&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/upload_finish document }
             *
             * 分片上传文件（完成上传）
             *
             * 触发完成上传。
             *
             * 该接口不支持太高的并发，且调用频率上限为5QPS
             */
            uploadFinish: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/upload_finish`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "uploadFinish"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=upload_part&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/upload_part document }
             *
             * 分片上传文件（上传分片）
             *
             * 上传对应的文件块。
             *
             * 该接口不支持太高的并发，且调用频率上限为5QPS
             */
            uploadPart: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/upload_part`, path2),
                method: "POST",
                data,
                params,
                headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              return (res === null || res === void 0 ? void 0 : res.data) || null;
            }), "uploadPart"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=upload_prepare&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/upload_prepare document }
             *
             * 分片上传文件（预上传）
             *
             * 发送初始化请求获取上传事务ID和分块策略，目前是以4MB大小进行定长分片。
             *
             * 该接口不支持太高的并发，且调用频率上限为5QPS
             *
             * 你在24小时内可保存上传事务ID和上传进度，以便可以恢复上传
             */
            uploadPrepare: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/upload_prepare`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "uploadPrepare")
          },
          /**
           * file.statistics
           */
          fileStatistics: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.statistics&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-statistics/get document }
             *
             * 获取文件统计信息
             *
             * 此接口用于获取文件统计信息，包括文档阅读人数、次数和点赞数。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/statistics`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          /**
           * 订阅
           */
          fileSubscription: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.subscription&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-subscription/create document }
             *
             * 创建订阅
             *
             * 订阅文档中的变更事件，当前支持文档评论订阅，订阅后文档评论更新会有“云文档助手”推送给订阅的用户
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.subscription&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-subscription/get document }
             *
             * 获取订阅状态
             *
             * 根据订阅ID获取该订阅的状态
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.subscription&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-subscription/patch document }
             *
             * 更新订阅状态
             *
             * 根据订阅ID更新订阅状态
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 文档版本
           */
          fileVersion: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.version&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/create document }
             *
             * 创建文档版本
             *
             * 创建文档版本。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.version&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/delete document }
             *
             * 删除文档版本
             *
             * 删除文档版本。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.version&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/get document }
             *
             * 获取文档版本
             *
             * 获取文档版本。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.version&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/list document }
             *
             * 获取文档版本列表
             *
             * 获取文档所有版本。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * file.view_record
           */
          fileViewRecord: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.view_record&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=drive&resource=file.view_record&version=v1 document }
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 导入
           */
          importTask: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=import_task&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/import_task/create document }
             *
             * 创建导入任务
             *
             * 创建导入任务。支持导入为 doc、docx、sheet、bitable，参考[导入用户指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/import_task/import-user-guide)
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/import_tasks`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=import_task&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/import_task/get document }
             *
             * 查询导入结果
             *
             * 根据创建导入任务返回的 ticket 查询导入结果。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/import_tasks/:ticket`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          /**
           * 分片上传
           */
          media: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=media&apiName=batch_get_tmp_download_url&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/batch_get_tmp_download_url document }
             *
             * 获取素材临时下载链接
             *
             * 通过file_token获取素材临时下载链接，链接时效性是24小时，过期失效。
             *
             * 该接口不支持太高的并发，且调用频率上限为5QPS
             */
            batchGetTmpDownloadUrl: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/medias/batch_get_tmp_download_url`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchGetTmpDownloadUrl"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=media&apiName=download&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/download document }
             *
             * 下载素材
             *
             * 使用该接口可以下载素材。素材表示在各种创作容器里的文件，如Doc文档内的图片，文件均属于素材。支持range下载。
             *
             * 该接口不支持太高的并发，且调用频率上限为5QPS
             */
            download: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/medias/:file_token/download`, path2),
                method: "GET",
                headers,
                data,
                params,
                responseType: "stream",
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                $return_headers: true
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              const checkIsReadable = /* @__PURE__ */ __name(() => {
                const consumedError = "The stream has already been consumed";
                if (!res.data.readable) {
                  this.logger.error(consumedError);
                  throw new Error(consumedError);
                }
              }, "checkIsReadable");
              return {
                writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                  checkIsReadable();
                  return new Promise((resolve, reject) => {
                    const writableStream = fs__default["default"].createWriteStream(filePath);
                    writableStream.on("finish", () => {
                      resolve(filePath);
                    });
                    writableStream.on("error", (e) => {
                      reject(e);
                    });
                    res.data.pipe(writableStream);
                  });
                }), "writeFile"),
                getReadableStream: /* @__PURE__ */ __name(() => {
                  checkIsReadable();
                  return res.data;
                }, "getReadableStream"),
                headers: res.headers
              };
            }), "download"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=media&apiName=upload_all&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/upload_all document }
             *
             * 上传素材
             *
             * 将文件、图片、视频等素材文件上传到指定云文档中。素材文件在云空间中不会显示，只会显示在对应云文档中。
             *
             * 该接口支持调用频率上限为5QPS
             *
             * 请不要使用这个接口上传大于20MB的文件，如果有这个需求可以尝试使用[分片上传接口](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/multipart-upload-media/introduction)。
             */
            uploadAll: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/medias/upload_all`, path2),
                method: "POST",
                data,
                params,
                headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              return (res === null || res === void 0 ? void 0 : res.data) || null;
            }), "uploadAll"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=media&apiName=upload_finish&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/upload_finish document }
             *
             * 分片上传素材（完成上传）
             *
             * 触发完成上传。
             *
             * 该接口不支持太高的并发，且调用频率上限为5QPS
             */
            uploadFinish: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/medias/upload_finish`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "uploadFinish"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=media&apiName=upload_part&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/upload_part document }
             *
             * 分片上传素材（上传分片）
             *
             * 上传对应的文件块。
             *
             * 该接口不支持太高的并发，且调用频率上限为5QPS
             */
            uploadPart: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/medias/upload_part`, path2),
                method: "POST",
                data,
                params,
                headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              return (res === null || res === void 0 ? void 0 : res.data) || null;
            }), "uploadPart"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=media&apiName=upload_prepare&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/upload_prepare document }
             *
             * 分片上传素材（预上传）
             *
             * 发送初始化请求获取上传事务ID和分块策略，目前是以4MB大小进行定长分片。
             *
             * 该接口不支持太高的并发，且调用频率上限为5QPS
             *
             * 您在24小时内可保存上传事务ID和上传进度，以便可以恢复上传
             */
            uploadPrepare: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/medias/upload_prepare`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "uploadPrepare")
          },
          /**
           * meta
           */
          meta: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=meta&apiName=batch_query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/meta/batch_query document }
             *
             * 获取文档元数据
             *
             * 该接口用于根据 token 获取各类文件的元数据
             */
            batchQuery: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/metas/batch_query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchQuery")
          },
          /**
           * 成员
           */
          permissionMember: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.member&apiName=auth&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=auth&project=drive&resource=permission.member&version=v1 document }
             */
            auth: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/members/auth`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "auth"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.member&apiName=batch_create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=drive&resource=permission.member&version=v1 document }
             */
            batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/members/batch_create`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchCreate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.member&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/create document }
             *
             * 增加协作者权限
             *
             * 该接口用于根据 filetoken 给用户增加文档的权限。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/members`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.member&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/delete document }
             *
             * 移除协作者权限
             *
             * 该接口用于根据 filetoken 移除文档协作者的权限。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.member&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/list document }
             *
             * 获取协作者列表
             *
             * 该接口用于根据 filetoken 查询协作者
             *
             * - 你能获取到协作者列表的前提是你对该文档有分享权限;- 目前仅支持人、群、组织架构三种类型的协作者
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/members`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.member&apiName=transfer_owner&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=transfer_owner&project=drive&resource=permission.member&version=v1 document }
             */
            transferOwner: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/members/transfer_owner`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "transferOwner"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.member&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/update document }
             *
             * 更新协作者权限
             *
             * 该接口用于根据 filetoken 更新文档协作者的权限。
             *
             * 该接口要求文档协作者已存在，如还未对文档协作者授权请先调用[「增加权限」 ](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/create)接口进行授权。
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 设置
           */
          permissionPublic: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.public&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-public/get document }
             *
             * 获取云文档权限设置
             *
             * 该接口用于根据 filetoken 获取云文档的权限设置。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/public`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.public&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-public/patch document }
             *
             * 更新云文档权限设置
             *
             * 该接口用于根据 filetoken 更新云文档的权限设置。
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/public`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * permission.public.password
           */
          permissionPublicPassword: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.public.password&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=drive&resource=permission.public.password&version=v1 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.public.password&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=drive&resource=permission.public.password&version=v1 document }
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.public.password&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=drive&resource=permission.public.password&version=v1 document }
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * user
           */
          user: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=user&apiName=remove_subscription&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=remove_subscription&project=drive&resource=user&version=v1 document }
             */
            removeSubscription: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/user/remove_subscription`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "removeSubscription"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=user&apiName=subscription&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=subscription&project=drive&resource=user&version=v1 document }
             */
            subscription: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/user/subscription`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "subscription"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=drive&resource=user&apiName=subscription_status&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=subscription_status&project=drive&resource=user&version=v1 document }
             */
            subscriptionStatus: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/drive/v1/user/subscription_status`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "subscriptionStatus")
          },
          v1: {
            /**
             * 导出
             */
            exportTask: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=export_task&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/export_task/create document }
               *
               * 创建导出任务
               *
               * 创建导出任务，将云文件导出为指定格式的本地文件。该接口为异步接口，需要通过轮询 [查询导出任务结果](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/export_task/get) 接口获取任务结果。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/export_tasks`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=export_task&apiName=download&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/export_task/download document }
               *
               * 下载导出文件
               *
               * 根据任务导出结果的token，下载导出文件
               */
              download: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/export_tasks/file/:file_token/download`, path2),
                  method: "GET",
                  headers,
                  data,
                  params,
                  responseType: "stream",
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                  $return_headers: true
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                const checkIsReadable = /* @__PURE__ */ __name(() => {
                  const consumedError = "The stream has already been consumed";
                  if (!res.data.readable) {
                    this.logger.error(consumedError);
                    throw new Error(consumedError);
                  }
                }, "checkIsReadable");
                return {
                  writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                    checkIsReadable();
                    return new Promise((resolve, reject) => {
                      const writableStream = fs__default["default"].createWriteStream(filePath);
                      writableStream.on("finish", () => {
                        resolve(filePath);
                      });
                      writableStream.on("error", (e) => {
                        reject(e);
                      });
                      res.data.pipe(writableStream);
                    });
                  }), "writeFile"),
                  getReadableStream: /* @__PURE__ */ __name(() => {
                    checkIsReadable();
                    return res.data;
                  }, "getReadableStream"),
                  headers: res.headers
                };
              }), "download"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=export_task&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/export_task/get document }
               *
               * 查询导出任务结果
               *
               * 根据[创建导出任务](/ssl::ttdoc//uAjLw4CM/ukTMukTMukTM/reference/drive-v1/export_task/create)的ticket查询导出任务的结果，前提条件需要先调用创建导出任务接口。;;通过该接口获取到下载文件的 token 后调用[下载导出文件接口](/ssl::ttdoc//uAjLw4CM/ukTMukTMukTM/reference/drive-v1/export_task/download)将文件进行下载
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/export_tasks/:ticket`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * 评论
             */
            fileComment: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.comment&apiName=batch_query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/batch_query document }
               *
               * 批量获取评论
               *
               * 该接口用于根据评论 ID 列表批量获取评论。
               */
              batchQuery: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/batch_query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchQuery"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.comment&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/create document }
               *
               * 添加评论
               *
               * 往云文档添加一条全局评论。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.comment&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/get document }
               *
               * 获取评论
               *
               * 获取云文档中的某条评论。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.comment&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/list document }
               *
               * 分页获取文档评论
               *
               * 该接口用于根据文档 token 分页获取文档评论。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.comment&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/patch document }
               *
               * 解决/恢复 评论
               *
               * 解决或恢复云文档中的评论。
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 评论
             */
            fileCommentReply: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.comment.reply&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=drive&resource=file.comment.reply&version=v1 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.comment.reply&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment-reply/delete document }
               *
               * 删除回复
               *
               * 删除云文档中的某条回复。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.comment.reply&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment-reply/list document }
               *
               * 获取回复
               *
               * 该接口用于根据评论 ID 以及分页参数，获取回复。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.comment.reply&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment-reply/update document }
               *
               * 更新回复
               *
               * 更新云文档中的某条回复。
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 分片上传
             */
            file: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=copy&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/copy document }
               *
               * 复制文件
               *
               * 将文件复制到用户云空间的其他文件夹中。不支持复制文件夹。;;如果目标文件夹是我的空间，则复制的文件会在「**我的空间**」的「**归我所有**」列表里。
               *
               * 该接口不支持并发拷贝多个文件，且调用频率上限为 5QPS 且 10000次/天
               */
              copy: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/copy`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "copy"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=create_folder&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/create_folder document }
               *
               * 新建文件夹
               *
               * 在用户云空间的指定文件夹中创建一个新的空文件夹。
               *
               * 该接口不支持并发创建，且调用频率上限为 5QPS 以及 10000次/天
               */
              createFolder: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/create_folder`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "createFolder"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=create_shortcut&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create_shortcut&project=drive&resource=file&version=v1 document }
               */
              createShortcut: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/create_shortcut`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "createShortcut"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/delete document }
               *
               * 删除文件
               *
               * 删除用户在云空间内的文件或者文件夹。文件或者文件夹被删除后，会进入用户回收站里。
               *
               * 该接口不支持并发调用，且调用频率上限为5QPS。删除文件夹会异步执行并返回一个task_id，可以使用[task_check](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/task_check)接口查询任务执行状态。
               *
               * 要删除文件需要确保应用具有下述两种权限之一：;1. 该应用是文件所有者并且具有该文件所在父文件夹的编辑权限。;2. 该应用并非文件所有者，但是是该文件所在父文件夹的所有者或者拥有该父文件夹的所有权限（full access）。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=delete_subscribe&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/delete_subscribe document }
               *
               * 取消云文档事件订阅情况
               *
               * 该接口**仅支持文档拥有者**取消订阅自己文档的通知事件，可订阅的文档类型为**旧版文档**、**新版文档**、**电子表格**和**多维表格**。在调用该接口之前请确保正确[配置事件回调网址和订阅事件类型](https://open.feishu.cn/document/ukTMukTMukTM/uUTNz4SN1MjL1UzM#2eb3504a)，事件类型参考[事件列表](https://open.feishu.cn/document/ukTMukTMukTM/uYDNxYjL2QTM24iN0EjN/event-list)。
               */
              deleteSubscribe: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/delete_subscribe`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "deleteSubscribe"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=download&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/download document }
               *
               * 下载文件
               *
               * 使用该接口可以下载在云空间目录下的文件（不含飞书文档/表格/思维导图等在线文档）。支持range下载。
               *
               * 该接口支持调用频率上限为5QPS
               */
              download: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/download`, path2),
                  method: "GET",
                  headers,
                  data,
                  params,
                  responseType: "stream",
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                  $return_headers: true
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                const checkIsReadable = /* @__PURE__ */ __name(() => {
                  const consumedError = "The stream has already been consumed";
                  if (!res.data.readable) {
                    this.logger.error(consumedError);
                    throw new Error(consumedError);
                  }
                }, "checkIsReadable");
                return {
                  writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                    checkIsReadable();
                    return new Promise((resolve, reject) => {
                      const writableStream = fs__default["default"].createWriteStream(filePath);
                      writableStream.on("finish", () => {
                        resolve(filePath);
                      });
                      writableStream.on("error", (e) => {
                        reject(e);
                      });
                      res.data.pipe(writableStream);
                    });
                  }), "writeFile"),
                  getReadableStream: /* @__PURE__ */ __name(() => {
                    checkIsReadable();
                    return res.data;
                  }, "getReadableStream"),
                  headers: res.headers
                };
              }), "download"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=get_subscribe&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/get_subscribe document }
               *
               * 查询云文档事件订阅状态
               *
               * 该接口**仅支持文档拥有者**查询自己文档的订阅状态，可订阅的文档类型为**旧版文档**、**新版文档**、**电子表格**和**多维表格**。在调用该接口之前请确保正确[配置事件回调网址和订阅事件类型](https://open.feishu.cn/document/ukTMukTMukTM/uUTNz4SN1MjL1UzM#2eb3504a)，事件类型参考[事件列表](https://open.feishu.cn/document/ukTMukTMukTM/uYDNxYjL2QTM24iN0EjN/event-list)。
               */
              getSubscribe: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/get_subscribe`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "getSubscribe"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/drive/v1/files`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/list document }
               *
               * 获取文件夹下的清单
               *
               * 获取用户云空间中指定文件夹下的文件清单。清单类型包括文件、各种在线文档（文档、电子表格、多维表格、思维笔记）、文件夹和快捷方式。该接口支持分页，但是不会递归的获取子文件夹的清单。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=move&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/move document }
               *
               * 移动文件
               *
               * 将文件或者文件夹移动到用户云空间的其他位置。
               */
              move: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/move`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "move"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=subscribe&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/subscribe document }
               *
               * 订阅云文档事件
               *
               * 该接口仅支持**文档拥有者**订阅自己文档的通知事件，可订阅的文档类型为**旧版文档**、**新版文档**、**电子表格**和**多维表格**。在调用该接口之前请确保正确[配置事件回调网址和订阅事件类型](https://open.feishu.cn/document/ukTMukTMukTM/uUTNz4SN1MjL1UzM#2eb3504a)(暂不支持单独订阅文档维度的某类事件)，事件类型参考[事件列表](https://open.feishu.cn/document/ukTMukTMukTM/uYDNxYjL2QTM24iN0EjN/event-list)。
               */
              subscribe: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/subscribe`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "subscribe"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=task_check&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/task_check document }
               *
               * 查询异步任务状态
               *
               * 查询删除文件夹等异步任务的状态信息。
               */
              taskCheck: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/task_check`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "taskCheck"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=upload_all&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/upload_all document }
               *
               * 上传文件
               *
               * 向云空间指定目录下上传一个小文件。
               *
               * 该接口支持调用频率上限为5QPS
               *
               * 请不要使用这个接口上传大于20MB的文件，如果有这个需求可以尝试使用[分片上传接口](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/multipart-upload-file-/introduction)。
               */
              uploadAll: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/upload_all`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "uploadAll"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=upload_finish&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/upload_finish document }
               *
               * 分片上传文件（完成上传）
               *
               * 触发完成上传。
               *
               * 该接口不支持太高的并发，且调用频率上限为5QPS
               */
              uploadFinish: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/upload_finish`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "uploadFinish"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=upload_part&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/upload_part document }
               *
               * 分片上传文件（上传分片）
               *
               * 上传对应的文件块。
               *
               * 该接口不支持太高的并发，且调用频率上限为5QPS
               */
              uploadPart: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/upload_part`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "uploadPart"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=upload_prepare&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/upload_prepare document }
               *
               * 分片上传文件（预上传）
               *
               * 发送初始化请求获取上传事务ID和分块策略，目前是以4MB大小进行定长分片。
               *
               * 该接口不支持太高的并发，且调用频率上限为5QPS
               *
               * 你在24小时内可保存上传事务ID和上传进度，以便可以恢复上传
               */
              uploadPrepare: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/upload_prepare`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "uploadPrepare")
            },
            /**
             * file.statistics
             */
            fileStatistics: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.statistics&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-statistics/get document }
               *
               * 获取文件统计信息
               *
               * 此接口用于获取文件统计信息，包括文档阅读人数、次数和点赞数。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/statistics`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * 订阅
             */
            fileSubscription: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.subscription&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-subscription/create document }
               *
               * 创建订阅
               *
               * 订阅文档中的变更事件，当前支持文档评论订阅，订阅后文档评论更新会有“云文档助手”推送给订阅的用户
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.subscription&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-subscription/get document }
               *
               * 获取订阅状态
               *
               * 根据订阅ID获取该订阅的状态
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.subscription&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-subscription/patch document }
               *
               * 更新订阅状态
               *
               * 根据订阅ID更新订阅状态
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 文档版本
             */
            fileVersion: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.version&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/create document }
               *
               * 创建文档版本
               *
               * 创建文档版本。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.version&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/delete document }
               *
               * 删除文档版本
               *
               * 删除文档版本。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.version&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/get document }
               *
               * 获取文档版本
               *
               * 获取文档版本。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.version&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/list document }
               *
               * 获取文档版本列表
               *
               * 获取文档所有版本。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * file.view_record
             */
            fileViewRecord: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.view_record&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=drive&resource=file.view_record&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 导入
             */
            importTask: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=import_task&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/import_task/create document }
               *
               * 创建导入任务
               *
               * 创建导入任务。支持导入为 doc、docx、sheet、bitable，参考[导入用户指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/import_task/import-user-guide)
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/import_tasks`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=import_task&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/import_task/get document }
               *
               * 查询导入结果
               *
               * 根据创建导入任务返回的 ticket 查询导入结果。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/import_tasks/:ticket`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * 分片上传
             */
            media: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=media&apiName=batch_get_tmp_download_url&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/batch_get_tmp_download_url document }
               *
               * 获取素材临时下载链接
               *
               * 通过file_token获取素材临时下载链接，链接时效性是24小时，过期失效。
               *
               * 该接口不支持太高的并发，且调用频率上限为5QPS
               */
              batchGetTmpDownloadUrl: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/medias/batch_get_tmp_download_url`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchGetTmpDownloadUrl"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=media&apiName=download&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/download document }
               *
               * 下载素材
               *
               * 使用该接口可以下载素材。素材表示在各种创作容器里的文件，如Doc文档内的图片，文件均属于素材。支持range下载。
               *
               * 该接口不支持太高的并发，且调用频率上限为5QPS
               */
              download: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/medias/:file_token/download`, path2),
                  method: "GET",
                  headers,
                  data,
                  params,
                  responseType: "stream",
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                  $return_headers: true
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                const checkIsReadable = /* @__PURE__ */ __name(() => {
                  const consumedError = "The stream has already been consumed";
                  if (!res.data.readable) {
                    this.logger.error(consumedError);
                    throw new Error(consumedError);
                  }
                }, "checkIsReadable");
                return {
                  writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                    checkIsReadable();
                    return new Promise((resolve, reject) => {
                      const writableStream = fs__default["default"].createWriteStream(filePath);
                      writableStream.on("finish", () => {
                        resolve(filePath);
                      });
                      writableStream.on("error", (e) => {
                        reject(e);
                      });
                      res.data.pipe(writableStream);
                    });
                  }), "writeFile"),
                  getReadableStream: /* @__PURE__ */ __name(() => {
                    checkIsReadable();
                    return res.data;
                  }, "getReadableStream"),
                  headers: res.headers
                };
              }), "download"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=media&apiName=upload_all&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/upload_all document }
               *
               * 上传素材
               *
               * 将文件、图片、视频等素材文件上传到指定云文档中。素材文件在云空间中不会显示，只会显示在对应云文档中。
               *
               * 该接口支持调用频率上限为5QPS
               *
               * 请不要使用这个接口上传大于20MB的文件，如果有这个需求可以尝试使用[分片上传接口](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/multipart-upload-media/introduction)。
               */
              uploadAll: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/medias/upload_all`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "uploadAll"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=media&apiName=upload_finish&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/upload_finish document }
               *
               * 分片上传素材（完成上传）
               *
               * 触发完成上传。
               *
               * 该接口不支持太高的并发，且调用频率上限为5QPS
               */
              uploadFinish: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/medias/upload_finish`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "uploadFinish"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=media&apiName=upload_part&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/upload_part document }
               *
               * 分片上传素材（上传分片）
               *
               * 上传对应的文件块。
               *
               * 该接口不支持太高的并发，且调用频率上限为5QPS
               */
              uploadPart: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/medias/upload_part`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "uploadPart"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=media&apiName=upload_prepare&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/upload_prepare document }
               *
               * 分片上传素材（预上传）
               *
               * 发送初始化请求获取上传事务ID和分块策略，目前是以4MB大小进行定长分片。
               *
               * 该接口不支持太高的并发，且调用频率上限为5QPS
               *
               * 您在24小时内可保存上传事务ID和上传进度，以便可以恢复上传
               */
              uploadPrepare: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/medias/upload_prepare`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "uploadPrepare")
            },
            /**
             * meta
             */
            meta: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=meta&apiName=batch_query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/meta/batch_query document }
               *
               * 获取文档元数据
               *
               * 该接口用于根据 token 获取各类文件的元数据
               */
              batchQuery: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/metas/batch_query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchQuery")
            },
            /**
             * 成员
             */
            permissionMember: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.member&apiName=auth&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=auth&project=drive&resource=permission.member&version=v1 document }
               */
              auth: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/members/auth`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "auth"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.member&apiName=batch_create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=drive&resource=permission.member&version=v1 document }
               */
              batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/members/batch_create`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchCreate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.member&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/create document }
               *
               * 增加协作者权限
               *
               * 该接口用于根据 filetoken 给用户增加文档的权限。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/members`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.member&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/delete document }
               *
               * 移除协作者权限
               *
               * 该接口用于根据 filetoken 移除文档协作者的权限。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.member&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/list document }
               *
               * 获取协作者列表
               *
               * 该接口用于根据 filetoken 查询协作者
               *
               * - 你能获取到协作者列表的前提是你对该文档有分享权限;- 目前仅支持人、群、组织架构三种类型的协作者
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/members`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.member&apiName=transfer_owner&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=transfer_owner&project=drive&resource=permission.member&version=v1 document }
               */
              transferOwner: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/members/transfer_owner`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "transferOwner"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.member&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/update document }
               *
               * 更新协作者权限
               *
               * 该接口用于根据 filetoken 更新文档协作者的权限。
               *
               * 该接口要求文档协作者已存在，如还未对文档协作者授权请先调用[「增加权限」 ](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/create)接口进行授权。
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/members/:member_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 设置
             */
            permissionPublic: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.public&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-public/get document }
               *
               * 获取云文档权限设置
               *
               * 该接口用于根据 filetoken 获取云文档的权限设置。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/public`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.public&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-public/patch document }
               *
               * 更新云文档权限设置
               *
               * 该接口用于根据 filetoken 更新云文档的权限设置。
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/public`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * permission.public.password
             */
            permissionPublicPassword: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.public.password&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=drive&resource=permission.public.password&version=v1 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.public.password&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=drive&resource=permission.public.password&version=v1 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.public.password&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=drive&resource=permission.public.password&version=v1 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * user
             */
            user: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=user&apiName=remove_subscription&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=remove_subscription&project=drive&resource=user&version=v1 document }
               */
              removeSubscription: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/user/remove_subscription`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "removeSubscription"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=user&apiName=subscription&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=subscription&project=drive&resource=user&version=v1 document }
               */
              subscription: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/user/subscription`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "subscription"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=user&apiName=subscription_status&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=subscription_status&project=drive&resource=user&version=v1 document }
               */
              subscriptionStatus: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v1/user/subscription_status`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "subscriptionStatus")
            }
          },
          v2: {
            /**
             * comment_reaction
             */
            commentReaction: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=comment_reaction&apiName=update_reaction&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update_reaction&project=drive&resource=comment_reaction&version=v2 document }
               *
               * 开放平台：添加/删除 reaction
               */
              updateReaction: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v2/files/:file_token/comments/reaction`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "updateReaction")
            },
            /**
             * file.like
             */
            fileLike: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/drive/v2/files/:file_token/likes`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.like&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=drive&resource=file.like&version=v2 document }
               *
               * 获取指定文件的点赞者列表并分页返回。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v2/files/:file_token/likes`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * permission.public
             */
            permissionPublic: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.public&apiName=get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=drive&resource=permission.public&version=v2 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v2/permissions/:token/public`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.public&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=drive&resource=permission.public&version=v2 document }
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/drive/v2/permissions/:token/public`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            }
          }
        };
      }
    };
    var Client$F = class extends Client$G {
      static {
        __name(this, "Client$F");
      }
      constructor() {
        super(...arguments);
        this.edu = {};
      }
    };
    var Client$E = class extends Client$F {
      static {
        __name(this, "Client$E");
      }
      constructor() {
        super(...arguments);
        this.ehr = {
          /**
           * 飞书人事（标准版)
           */
          attachment: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=ehr&resource=attachment&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/ehr/ehr-v1/attachment/get document }
             *
             * 下载附件
             *
             * 根据文件 token 下载文件。;;调用 「批量获取员工花名册信息」接口的返回值中，「文件」类型的字段 id，即是文件 token
             *
             * ![image.png](//sf1-ttcdn-tos.pstatp.com/obj/open-platform-opendoc/bed391d2a8ce6ed2d5985ea69bf92850_9GY1mnuDXP.png)
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/ehr/v1/attachments/:token`, path2),
                method: "GET",
                headers,
                data,
                params,
                responseType: "stream",
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                $return_headers: true
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              const checkIsReadable = /* @__PURE__ */ __name(() => {
                const consumedError = "The stream has already been consumed";
                if (!res.data.readable) {
                  this.logger.error(consumedError);
                  throw new Error(consumedError);
                }
              }, "checkIsReadable");
              return {
                writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                  checkIsReadable();
                  return new Promise((resolve, reject) => {
                    const writableStream = fs__default["default"].createWriteStream(filePath);
                    writableStream.on("finish", () => {
                      resolve(filePath);
                    });
                    writableStream.on("error", (e) => {
                      reject(e);
                    });
                    res.data.pipe(writableStream);
                  });
                }), "writeFile"),
                getReadableStream: /* @__PURE__ */ __name(() => {
                  checkIsReadable();
                  return res.data;
                }, "getReadableStream"),
                headers: res.headers
              };
            }), "get")
          },
          /**
           * 飞书人事（标准版)
           */
          employee: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/ehr/v1/employees`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=ehr&resource=employee&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/ehr/ehr-v1/employee/list document }
             *
             * 批量获取员工花名册信息
             *
             * 根据员工飞书用户 ID / 员工状态 / 雇员类型等搜索条件 ，批量获取员工花名册字段信息。字段包括「系统标准字段 / system_fields」和「自定义字段 / custom_fields」
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/ehr/v1/employees`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          v1: {
            /**
             * 飞书人事（标准版)
             */
            attachment: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=ehr&resource=attachment&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/ehr/ehr-v1/attachment/get document }
               *
               * 下载附件
               *
               * 根据文件 token 下载文件。;;调用 「批量获取员工花名册信息」接口的返回值中，「文件」类型的字段 id，即是文件 token
               *
               * ![image.png](//sf1-ttcdn-tos.pstatp.com/obj/open-platform-opendoc/bed391d2a8ce6ed2d5985ea69bf92850_9GY1mnuDXP.png)
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/ehr/v1/attachments/:token`, path2),
                  method: "GET",
                  headers,
                  data,
                  params,
                  responseType: "stream",
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                  $return_headers: true
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                const checkIsReadable = /* @__PURE__ */ __name(() => {
                  const consumedError = "The stream has already been consumed";
                  if (!res.data.readable) {
                    this.logger.error(consumedError);
                    throw new Error(consumedError);
                  }
                }, "checkIsReadable");
                return {
                  writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                    checkIsReadable();
                    return new Promise((resolve, reject) => {
                      const writableStream = fs__default["default"].createWriteStream(filePath);
                      writableStream.on("finish", () => {
                        resolve(filePath);
                      });
                      writableStream.on("error", (e) => {
                        reject(e);
                      });
                      res.data.pipe(writableStream);
                    });
                  }), "writeFile"),
                  getReadableStream: /* @__PURE__ */ __name(() => {
                    checkIsReadable();
                    return res.data;
                  }, "getReadableStream"),
                  headers: res.headers
                };
              }), "get")
            },
            /**
             * 飞书人事（标准版)
             */
            employee: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/ehr/v1/employees`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=ehr&resource=employee&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/ehr/ehr-v1/employee/list document }
               *
               * 批量获取员工花名册信息
               *
               * 根据员工飞书用户 ID / 员工状态 / 雇员类型等搜索条件 ，批量获取员工花名册字段信息。字段包括「系统标准字段 / system_fields」和「自定义字段 / custom_fields」
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/ehr/v1/employees`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            }
          }
        };
      }
    };
    var Client$D = class extends Client$E {
      static {
        __name(this, "Client$D");
      }
      constructor() {
        super(...arguments);
        this.elearning = {};
      }
    };
    var Client$C = class extends Client$D {
      static {
        __name(this, "Client$C");
      }
      constructor() {
        super(...arguments);
        this.event = {
          /**
           * 事件订阅
           */
          outboundIp: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/event/v1/outbound_ip`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=event&resource=outbound_ip&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uYDNxYjL2QTM24iN0EjN/event-v1/outbound_ip/list document }
             *
             * 获取事件出口 IP
             *
             * 飞书开放平台向应用配置的回调地址推送事件时，是通过特定的 IP 发送出去的，应用可以通过本接口获取所有相关的 IP 地址。
             *
             * IP 地址有变更可能，建议应用每隔 6 小时定时拉取最新的 IP 地址，以免由于企业防火墙设置，导致应用无法及时接收到飞书开放平台推送的事件。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/event/v1/outbound_ip`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          v1: {
            /**
             * 事件订阅
             */
            outboundIp: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/event/v1/outbound_ip`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=event&resource=outbound_ip&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uYDNxYjL2QTM24iN0EjN/event-v1/outbound_ip/list document }
               *
               * 获取事件出口 IP
               *
               * 飞书开放平台向应用配置的回调地址推送事件时，是通过特定的 IP 发送出去的，应用可以通过本接口获取所有相关的 IP 地址。
               *
               * IP 地址有变更可能，建议应用每隔 6 小时定时拉取最新的 IP 地址，以免由于企业防火墙设置，导致应用无法及时接收到飞书开放平台推送的事件。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/event/v1/outbound_ip`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            }
          }
        };
      }
    };
    var Client$B = class extends Client$C {
      static {
        __name(this, "Client$B");
      }
      constructor() {
        super(...arguments);
        this.exam = {};
      }
    };
    var Client$A = class extends Client$B {
      static {
        __name(this, "Client$A");
      }
      constructor() {
        super(...arguments);
        this.face_detection = {};
      }
    };
    var Client$z = class extends Client$A {
      static {
        __name(this, "Client$z");
      }
      constructor() {
        super(...arguments);
        this.feelgood = {};
      }
    };
    var Client$y = class extends Client$z {
      static {
        __name(this, "Client$y");
      }
      constructor() {
        super(...arguments);
        this.helpdesk = {
          /**
           * 客服
           */
          agent: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent&apiName=agent_email&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent/agent_email document }
             *
             * 获取客服邮箱地址
             *
             * 该接口用于获取客服邮箱地址
             */
            agentEmail: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agent_emails`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "agentEmail"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent/patch document }
             *
             * 更新客服信息
             *
             * 更新客服状态等信息
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 客服工作日程
           */
          agentSchedules: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent.schedules&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent-schedules/delete document }
             *
             * 删除客服
             *
             * 该接口用于删除客服
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent.schedules&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent-schedules/get document }
             *
             * 获取客服工作日程;
             *
             * 该接口用于获取客服信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent.schedules&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent-schedules/patch document }
             *
             * 更新客服日程
             *
             * 该接口用于更新客服的日程
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * agent_schedule
           */
          agentSchedule: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent_schedule&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent_schedule/create document }
             *
             * 创建客服
             *
             * 该接口用于创建客服
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent_schedule&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent_schedule/list document }
             *
             * 获取全部客服工作日程
             *
             * 该接口用于获取所有客服信息
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 客服技能
           */
          agentSkill: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent_skill&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent_skill/create document }
             *
             * 创建客服技能
             *
             * 该接口用于创建客服技能
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agent_skills`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent_skill&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent_skill/delete document }
             *
             * 删除客服技能
             *
             * 该接口用于删除客服技能
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent_skill&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent_skill/get document }
             *
             * 获取客服技能
             *
             * 该接口用于获取客服技能
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent_skill&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent_skill/list document }
             *
             * 获取全部客服技能
             *
             * 获取全部客服技能
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agent_skills`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent_skill&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent_skill/patch document }
             *
             * 更新客服技能
             *
             * 该接口用于更新客服技能
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 客服技能规则
           */
          agentSkillRule: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent_skill_rule&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent_skill_rule/list document }
             *
             * 获取客服技能列表
             *
             * 该接口用于获取全部客服技能。仅支持自建应用。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agent_skill_rules`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 机器人消息
           */
          botMessage: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=bot.message&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/bot-message/create document }
             *
             * 服务台机器人发送消息
             *
             * 通过服务台机器人给指定用户的服务台专属群或私聊发送消息，支持文本、富文本、卡片、图片。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/message`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create")
          },
          /**
           * 知识库分类
           */
          category: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=category&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/category/create document }
             *
             * 创建知识库分类
             *
             * 该接口用于创建知识库分类。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/categories`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=category&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/category/delete document }
             *
             * 删除知识库分类详情
             *
             * 该接口用于删除知识库分类详情。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/categories/:id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=category&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/category/get document }
             *
             * 获取知识库分类
             *
             * 该接口用于获取知识库分类。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/categories/:id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=category&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/category/list document }
             *
             * 获取全部知识库分类 - meta
             *
             * 该接口用于获取服务台知识库所有分类
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/categories`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=category&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/category/patch document }
             *
             * 更新知识库分类详情
             *
             * 该接口用于更新知识库分类详情。
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/categories/:id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 事件订阅
           */
          event: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=event&apiName=subscribe&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/event/subscribe document }
             *
             * 订阅服务台事件
             *
             * 用于订阅服务台事件
             */
            subscribe: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/events/subscribe`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "subscribe"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=event&apiName=unsubscribe&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/event/unsubscribe document }
             *
             * 取消订阅服务台事件
             *
             * 用于取消订阅服务台事件
             */
            unsubscribe: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/events/unsubscribe`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "unsubscribe")
          },
          /**
           * 知识库
           */
          faq: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=faq&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/faq/create document }
             *
             * 创建知识库
             *
             * 该接口用于创建知识库。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/faqs`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=faq&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/faq/delete document }
             *
             * 删除知识库
             *
             * 该接口用于删除知识库。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=faq&apiName=faq_image&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/faq/faq_image document }
             *
             * 获取知识库图像
             *
             * 该接口用于获取知识库图像。
             */
            faqImage: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/faqs/:id/image/:image_key`, path2),
                method: "GET",
                headers,
                data,
                params,
                responseType: "stream",
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                $return_headers: true
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              const checkIsReadable = /* @__PURE__ */ __name(() => {
                const consumedError = "The stream has already been consumed";
                if (!res.data.readable) {
                  this.logger.error(consumedError);
                  throw new Error(consumedError);
                }
              }, "checkIsReadable");
              return {
                writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                  checkIsReadable();
                  return new Promise((resolve, reject) => {
                    const writableStream = fs__default["default"].createWriteStream(filePath);
                    writableStream.on("finish", () => {
                      resolve(filePath);
                    });
                    writableStream.on("error", (e) => {
                      reject(e);
                    });
                    res.data.pipe(writableStream);
                  });
                }), "writeFile"),
                getReadableStream: /* @__PURE__ */ __name(() => {
                  checkIsReadable();
                  return res.data;
                }, "getReadableStream"),
                headers: res.headers
              };
            }), "faqImage"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=faq&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/faq/get document }
             *
             * 获取知识库详情
             *
             * 该接口用于获取服务台知识库详情。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/faqs`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=faq&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/faq/list document }
             *
             * 获取全部知识库详情
             *
             * 该接口用于获取服务台知识库详情。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/faqs`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=faq&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/faq/patch document }
             *
             * 修改知识库
             *
             * 该接口用于修改知识库。
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch"),
            searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/faqs/search`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "searchWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=faq&apiName=search&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/faq/search document }
             *
             * 搜索知识库
             *
             * 该接口用于搜索服务台知识库。
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/faqs/search`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search")
          },
          /**
           * 推送中心
           */
          notification: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=notification&apiName=cancel_approve&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/notification/cancel_approve document }
             *
             * 取消审核
             *
             * 提交审核后，如果需要取消审核，则调用此接口
             */
            cancelApprove: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_approve`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "cancelApprove"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=notification&apiName=cancel_send&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/notification/cancel_send document }
             *
             * 取消推送
             *
             * 取消推送接口，审核通过后待调度可以调用，发送过程中可以调用（会撤回已发送的消息），发送完成后可以需要推送（会撤回所有已发送的消息）
             */
            cancelSend: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_send`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "cancelSend"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=notification&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/notification/create document }
             *
             * 创建推送
             *
             * 调用接口创建推送，创建成功后为草稿状态
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/notifications`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=notification&apiName=execute_send&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/notification/execute_send document }
             *
             * 执行推送
             *
             * 审核通过后调用此接口设置推送时间，等待调度系统调度，发送消息
             */
            executeSend: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/execute_send`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "executeSend"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=notification&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/notification/get document }
             *
             * 查询推送
             *
             * 查询推送详情
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=notification&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/notification/patch document }
             *
             * 更新推送
             *
             * 更新推送信息，只有在草稿状态下才可以调用此接口进行更新
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=notification&apiName=preview&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/notification/preview document }
             *
             * 预览推送内容
             *
             * 在正式执行推送之前是可以调用此接口预览设置的推送内容
             */
            preview: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/preview`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "preview"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=notification&apiName=submit_approve&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/notification/submit_approve document }
             *
             * 提交审核
             *
             * 正常情况下调用创建推送接口后，就可以调用提交审核接口，如果创建人是服务台owner则会自动审核通过，否则会通知服务台owner审核此推送信息
             */
            submitApprove: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/submit_approve`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "submitApprove")
          },
          /**
           * 工单
           */
          ticket: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket&apiName=answer_user_query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket/answer_user_query document }
             *
             * 回复用户提问结果至工单
             *
             * 该接口用于回复用户提问结果至工单，需要工单仍处于进行中且未接入人工状态。仅支持自建应用。
             */
            answerUserQuery: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/answer_user_query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "answerUserQuery"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket&apiName=customized_fields&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket/customized_fields document }
             *
             * 获取服务台自定义字段详情
             *
             * 该接口用于获取服务台自定义字段详情。
             */
            customizedFields: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/customized_fields`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "customizedFields"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket/get document }
             *
             * 获取工单详情
             *
             * 该接口用于获取单个服务台工单详情。仅支持自建应用。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket/list document }
             *
             * 获取全部工单详情
             *
             * 该接口用于获取全部工单详情。仅支持自建应用。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/tickets`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket&apiName=start_service&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket/start_service document }
             *
             * 创建服务台对话
             *
             * 该接口用于创建服务台对话。
             */
            startService: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/start_service`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "startService"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket&apiName=ticket_image&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket/ticket_image document }
             *
             * 获取服务台工单内消息图像
             *
             * 该接口用于获取服务台工单消息图象。仅支持自建应用。
             */
            ticketImage: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/ticket_images`, path2),
                method: "GET",
                headers,
                data,
                params,
                responseType: "stream",
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                $return_headers: true
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              const checkIsReadable = /* @__PURE__ */ __name(() => {
                const consumedError = "The stream has already been consumed";
                if (!res.data.readable) {
                  this.logger.error(consumedError);
                  throw new Error(consumedError);
                }
              }, "checkIsReadable");
              return {
                writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                  checkIsReadable();
                  return new Promise((resolve, reject) => {
                    const writableStream = fs__default["default"].createWriteStream(filePath);
                    writableStream.on("finish", () => {
                      resolve(filePath);
                    });
                    writableStream.on("error", (e) => {
                      reject(e);
                    });
                    res.data.pipe(writableStream);
                  });
                }), "writeFile"),
                getReadableStream: /* @__PURE__ */ __name(() => {
                  checkIsReadable();
                  return res.data;
                }, "getReadableStream"),
                headers: res.headers
              };
            }), "ticketImage"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket/update document }
             *
             * 更新工单详情
             *
             * 该接口用于更新服务台工单详情。只会更新数据，不会触发相关操作。如修改工单状态到关单，不会关闭聊天页面。仅支持自建应用。要更新的工单字段必须至少输入一项。
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 事件
           */
          ticketMessage: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket.message&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket-message/create document }
             *
             * 工单发送消息
             *
             * 该接口用于工单发送消息。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket.message&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket-message/list document }
             *
             * 获取服务台工单消息详情
             *
             * 该接口用于获取服务台工单消息详情。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 工单自定义字段
           */
          ticketCustomizedField: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket_customized_field&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket_customized_field/create document }
             *
             * 创建工单自定义字段
             *
             * 该接口用于创建自定义字段
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket_customized_field&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket_customized_field/delete document }
             *
             * 删除工单自定义字段
             *
             * 该接口用于删除工单自定义字段。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket_customized_field&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket_customized_field/get document }
             *
             * 获取工单自定义字段
             *
             * 该接口用于获取工单自定义字段详情。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket_customized_field&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket_customized_field/list document }
             *
             * 获取全部工单自定义字段
             *
             * 该接口用于获取全部工单自定义字段。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket_customized_field&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket_customized_field/patch document }
             *
             * 更新工单自定义字段
             *
             * 该接口用于更新自定义字段。
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          v1: {
            /**
             * 客服
             */
            agent: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent&apiName=agent_email&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent/agent_email document }
               *
               * 获取客服邮箱地址
               *
               * 该接口用于获取客服邮箱地址
               */
              agentEmail: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agent_emails`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "agentEmail"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent/patch document }
               *
               * 更新客服信息
               *
               * 更新客服状态等信息
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 客服工作日程
             */
            agentSchedules: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent.schedules&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent-schedules/delete document }
               *
               * 删除客服
               *
               * 该接口用于删除客服
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent.schedules&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent-schedules/get document }
               *
               * 获取客服工作日程;
               *
               * 该接口用于获取客服信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent.schedules&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent-schedules/patch document }
               *
               * 更新客服日程
               *
               * 该接口用于更新客服的日程
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agents/:agent_id/schedules`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * agent_schedule
             */
            agentSchedule: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent_schedule&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent_schedule/create document }
               *
               * 创建客服
               *
               * 该接口用于创建客服
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent_schedule&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent_schedule/list document }
               *
               * 获取全部客服工作日程
               *
               * 该接口用于获取所有客服信息
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agent_schedules`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 客服技能
             */
            agentSkill: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent_skill&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent_skill/create document }
               *
               * 创建客服技能
               *
               * 该接口用于创建客服技能
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agent_skills`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent_skill&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent_skill/delete document }
               *
               * 删除客服技能
               *
               * 该接口用于删除客服技能
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent_skill&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent_skill/get document }
               *
               * 获取客服技能
               *
               * 该接口用于获取客服技能
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent_skill&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent_skill/list document }
               *
               * 获取全部客服技能
               *
               * 获取全部客服技能
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agent_skills`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent_skill&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent_skill/patch document }
               *
               * 更新客服技能
               *
               * 该接口用于更新客服技能
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agent_skills/:agent_skill_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 客服技能规则
             */
            agentSkillRule: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=agent_skill_rule&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent_skill_rule/list document }
               *
               * 获取客服技能列表
               *
               * 该接口用于获取全部客服技能。仅支持自建应用。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/agent_skill_rules`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 机器人消息
             */
            botMessage: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=bot.message&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/bot-message/create document }
               *
               * 服务台机器人发送消息
               *
               * 通过服务台机器人给指定用户的服务台专属群或私聊发送消息，支持文本、富文本、卡片、图片。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/message`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create")
            },
            /**
             * 知识库分类
             */
            category: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=category&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/category/create document }
               *
               * 创建知识库分类
               *
               * 该接口用于创建知识库分类。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/categories`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=category&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/category/delete document }
               *
               * 删除知识库分类详情
               *
               * 该接口用于删除知识库分类详情。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/categories/:id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=category&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/category/get document }
               *
               * 获取知识库分类
               *
               * 该接口用于获取知识库分类。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/categories/:id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=category&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/category/list document }
               *
               * 获取全部知识库分类 - meta
               *
               * 该接口用于获取服务台知识库所有分类
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/categories`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=category&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/category/patch document }
               *
               * 更新知识库分类详情
               *
               * 该接口用于更新知识库分类详情。
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/categories/:id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 事件订阅
             */
            event: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=event&apiName=subscribe&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/event/subscribe document }
               *
               * 订阅服务台事件
               *
               * 用于订阅服务台事件
               */
              subscribe: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/events/subscribe`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "subscribe"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=event&apiName=unsubscribe&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/event/unsubscribe document }
               *
               * 取消订阅服务台事件
               *
               * 用于取消订阅服务台事件
               */
              unsubscribe: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/events/unsubscribe`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "unsubscribe")
            },
            /**
             * 知识库
             */
            faq: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=faq&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/faq/create document }
               *
               * 创建知识库
               *
               * 该接口用于创建知识库。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/faqs`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=faq&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/faq/delete document }
               *
               * 删除知识库
               *
               * 该接口用于删除知识库。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=faq&apiName=faq_image&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/faq/faq_image document }
               *
               * 获取知识库图像
               *
               * 该接口用于获取知识库图像。
               */
              faqImage: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/faqs/:id/image/:image_key`, path2),
                  method: "GET",
                  headers,
                  data,
                  params,
                  responseType: "stream",
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                  $return_headers: true
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                const checkIsReadable = /* @__PURE__ */ __name(() => {
                  const consumedError = "The stream has already been consumed";
                  if (!res.data.readable) {
                    this.logger.error(consumedError);
                    throw new Error(consumedError);
                  }
                }, "checkIsReadable");
                return {
                  writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                    checkIsReadable();
                    return new Promise((resolve, reject) => {
                      const writableStream = fs__default["default"].createWriteStream(filePath);
                      writableStream.on("finish", () => {
                        resolve(filePath);
                      });
                      writableStream.on("error", (e) => {
                        reject(e);
                      });
                      res.data.pipe(writableStream);
                    });
                  }), "writeFile"),
                  getReadableStream: /* @__PURE__ */ __name(() => {
                    checkIsReadable();
                    return res.data;
                  }, "getReadableStream"),
                  headers: res.headers
                };
              }), "faqImage"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=faq&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/faq/get document }
               *
               * 获取知识库详情
               *
               * 该接口用于获取服务台知识库详情。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/faqs`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=faq&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/faq/list document }
               *
               * 获取全部知识库详情
               *
               * 该接口用于获取服务台知识库详情。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/faqs`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=faq&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/faq/patch document }
               *
               * 修改知识库
               *
               * 该接口用于修改知识库。
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/faqs/:id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/faqs/search`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=faq&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/faq/search document }
               *
               * 搜索知识库
               *
               * 该接口用于搜索服务台知识库。
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/faqs/search`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * 推送中心
             */
            notification: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=notification&apiName=cancel_approve&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/notification/cancel_approve document }
               *
               * 取消审核
               *
               * 提交审核后，如果需要取消审核，则调用此接口
               */
              cancelApprove: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_approve`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "cancelApprove"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=notification&apiName=cancel_send&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/notification/cancel_send document }
               *
               * 取消推送
               *
               * 取消推送接口，审核通过后待调度可以调用，发送过程中可以调用（会撤回已发送的消息），发送完成后可以需要推送（会撤回所有已发送的消息）
               */
              cancelSend: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/cancel_send`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "cancelSend"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=notification&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/notification/create document }
               *
               * 创建推送
               *
               * 调用接口创建推送，创建成功后为草稿状态
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/notifications`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=notification&apiName=execute_send&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/notification/execute_send document }
               *
               * 执行推送
               *
               * 审核通过后调用此接口设置推送时间，等待调度系统调度，发送消息
               */
              executeSend: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/execute_send`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "executeSend"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=notification&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/notification/get document }
               *
               * 查询推送
               *
               * 查询推送详情
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=notification&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/notification/patch document }
               *
               * 更新推送
               *
               * 更新推送信息，只有在草稿状态下才可以调用此接口进行更新
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=notification&apiName=preview&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/notification/preview document }
               *
               * 预览推送内容
               *
               * 在正式执行推送之前是可以调用此接口预览设置的推送内容
               */
              preview: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/preview`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "preview"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=notification&apiName=submit_approve&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/notification/submit_approve document }
               *
               * 提交审核
               *
               * 正常情况下调用创建推送接口后，就可以调用提交审核接口，如果创建人是服务台owner则会自动审核通过，否则会通知服务台owner审核此推送信息
               */
              submitApprove: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/notifications/:notification_id/submit_approve`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "submitApprove")
            },
            /**
             * 工单
             */
            ticket: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket&apiName=answer_user_query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket/answer_user_query document }
               *
               * 回复用户提问结果至工单
               *
               * 该接口用于回复用户提问结果至工单，需要工单仍处于进行中且未接入人工状态。仅支持自建应用。
               */
              answerUserQuery: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/answer_user_query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "answerUserQuery"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket&apiName=customized_fields&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket/customized_fields document }
               *
               * 获取服务台自定义字段详情
               *
               * 该接口用于获取服务台自定义字段详情。
               */
              customizedFields: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/customized_fields`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "customizedFields"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket/get document }
               *
               * 获取工单详情
               *
               * 该接口用于获取单个服务台工单详情。仅支持自建应用。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket/list document }
               *
               * 获取全部工单详情
               *
               * 该接口用于获取全部工单详情。仅支持自建应用。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/tickets`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket&apiName=start_service&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket/start_service document }
               *
               * 创建服务台对话
               *
               * 该接口用于创建服务台对话。
               */
              startService: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/start_service`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "startService"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket&apiName=ticket_image&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket/ticket_image document }
               *
               * 获取服务台工单内消息图像
               *
               * 该接口用于获取服务台工单消息图象。仅支持自建应用。
               */
              ticketImage: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/ticket_images`, path2),
                  method: "GET",
                  headers,
                  data,
                  params,
                  responseType: "stream",
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                  $return_headers: true
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                const checkIsReadable = /* @__PURE__ */ __name(() => {
                  const consumedError = "The stream has already been consumed";
                  if (!res.data.readable) {
                    this.logger.error(consumedError);
                    throw new Error(consumedError);
                  }
                }, "checkIsReadable");
                return {
                  writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                    checkIsReadable();
                    return new Promise((resolve, reject) => {
                      const writableStream = fs__default["default"].createWriteStream(filePath);
                      writableStream.on("finish", () => {
                        resolve(filePath);
                      });
                      writableStream.on("error", (e) => {
                        reject(e);
                      });
                      res.data.pipe(writableStream);
                    });
                  }), "writeFile"),
                  getReadableStream: /* @__PURE__ */ __name(() => {
                    checkIsReadable();
                    return res.data;
                  }, "getReadableStream"),
                  headers: res.headers
                };
              }), "ticketImage"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket/update document }
               *
               * 更新工单详情
               *
               * 该接口用于更新服务台工单详情。只会更新数据，不会触发相关操作。如修改工单状态到关单，不会关闭聊天页面。仅支持自建应用。要更新的工单字段必须至少输入一项。
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 事件
             */
            ticketMessage: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket.message&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket-message/create document }
               *
               * 工单发送消息
               *
               * 该接口用于工单发送消息。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket.message&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket-message/list document }
               *
               * 获取服务台工单消息详情
               *
               * 该接口用于获取服务台工单消息详情。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/tickets/:ticket_id/messages`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 工单自定义字段
             */
            ticketCustomizedField: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket_customized_field&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket_customized_field/create document }
               *
               * 创建工单自定义字段
               *
               * 该接口用于创建自定义字段
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket_customized_field&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket_customized_field/delete document }
               *
               * 删除工单自定义字段
               *
               * 该接口用于删除工单自定义字段。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket_customized_field&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket_customized_field/get document }
               *
               * 获取工单自定义字段
               *
               * 该接口用于获取工单自定义字段详情。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket_customized_field&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket_customized_field/list document }
               *
               * 获取全部工单自定义字段
               *
               * 该接口用于获取全部工单自定义字段。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=helpdesk&resource=ticket_customized_field&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket_customized_field/patch document }
               *
               * 更新工单自定义字段
               *
               * 该接口用于更新自定义字段。
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            }
          }
        };
      }
    };
    var Client$x = class extends Client$y {
      static {
        __name(this, "Client$x");
      }
      constructor() {
        super(...arguments);
        this.hire = {
          /**
           * advertisement
           */
          advertisement: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=advertisement&apiName=publish&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/advertisement/publish document }
             *
             * 职位发布至官网
             *
             * 支持把职位发布至招聘官网、内推平台
             */
            publish: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/advertisements/:advertisement_id/publish`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "publish")
          },
          /**
           * 猎头（灰度租户可见）
           */
          agency: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=agency&apiName=batch_query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_query&project=hire&resource=agency&version=v1 document }
             */
            batchQuery: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/agencies/batch_query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchQuery"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=agency&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/agency/get document }
             *
             * 获取猎头供应商信息
             *
             * 根据猎头供应商 ID 获取猎头供应商信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/agencies/:agency_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=agency&apiName=get_agency_account&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get_agency_account&project=hire&resource=agency&version=v1 document }
             */
            getAgencyAccount: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/agencies/get_agency_account`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "getAgencyAccount"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=agency&apiName=operate_agency_account&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=operate_agency_account&project=hire&resource=agency&version=v1 document }
             */
            operateAgencyAccount: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/agencies/operate_agency_account`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "operateAgencyAccount"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=agency&apiName=protect&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/agency/protect document }
             *
             * 设置猎头保护期
             *
             * 设置猎头保护期
             */
            protect: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/agencies/protect`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "protect"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=agency&apiName=protect_search&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=protect_search&project=hire&resource=agency&version=v1 document }
             */
            protectSearch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/agencies/protection_period/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "protectSearch"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=agency&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/agency/query document }
             *
             * 查询猎头供应商信息
             *
             * 根据猎头供应商名称查询猎头供应商信息
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/agencies/query`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query")
          },
          /**
           * 投递
           */
          application: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application&apiName=cancel_onboard&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/application/cancel_onboard document }
             *
             * 取消候选人入职
             *
             * 操作候选人取消入职
             */
            cancelOnboard: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications/:application_id/cancel_onboard`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "cancelOnboard"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/application/create document }
             *
             * 创建投递
             *
             * 根据人才 ID 和职位 ID 创建投递
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/application/get document }
             *
             * 获取投递信息
             *
             * 根据投递 ID 获取单个投递信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications/:application_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application&apiName=get_detail&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get_detail&project=hire&resource=application&version=v1 document }
             */
            getDetail: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications/:application_id/get_detail`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "getDetail"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/application/list document }
             *
             * 获取投递列表
             *
             * 根据限定条件获取投递列表信息
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application&apiName=offer&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/application/offer document }
             *
             * 获取 Offer 信息
             *
             * 根据投递 ID 获取 Offer 信息
             */
            offer: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications/:application_id/offer`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "offer"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application&apiName=recover&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recover&project=hire&resource=application&version=v1 document }
             */
            recover: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications/:application_id/recover`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "recover"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application&apiName=terminate&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/application/terminate document }
             *
             * 终止投递
             *
             * 根据投递 ID 修改投递状态为「已终止」
             */
            terminate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications/:application_id/terminate`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "terminate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application&apiName=transfer_onboard&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/application/transfer_onboard document }
             *
             * 操作候选人入职
             *
             * 根据投递 ID 操作候选人入职并创建员工。投递须处于「待入职」阶段，可通过「转移阶段」接口变更投递状态
             */
            transferOnboard: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_onboard`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "transferOnboard"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application&apiName=transfer_stage&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/application/transfer_stage document }
             *
             * 转移阶段
             *
             * 转移投递阶段
             */
            transferStage: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_stage`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "transferStage")
          },
          /**
           * application.interview
           */
          applicationInterview: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application.interview&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=application.interview&version=v1 document }
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications/:application_id/interviews`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 附件
           */
          attachment: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=attachment&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uIDN1YjLyQTN24iM0UjN/create_attachment document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/attachments`, path2),
                method: "POST",
                data,
                params,
                headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              return (res === null || res === void 0 ? void 0 : res.data) || null;
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=attachment&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/attachment/get document }
             *
             * 获取附件信息
             *
             * 获取招聘系统中附件的元信息，比如文件名、创建时间、文件url等
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=attachment&apiName=preview&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/attachment/preview document }
             *
             * 获取附件预览信息
             *
             * 根据附件 ID 获取附件预览信息
             */
            preview: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id/preview`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "preview")
          },
          /**
           * 背调 （灰度租户可见）
           */
          backgroundCheckOrder: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=background_check_order&apiName=batch_query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_query&project=hire&resource=background_check_order&version=v1 document }
             */
            batchQuery: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/background_check_orders/batch_query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchQuery"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=background_check_order&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/background_check_order/list document }
             *
             * 获取背调信息
             *
             * 根据投递ID或背调更新时间获取背调信息
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/background_check_orders`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * diversity_inclusion
           */
          diversityInclusion: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=diversity_inclusion&apiName=search&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=hire&resource=diversity_inclusion&version=v1 document }
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications/diversity_inclusions/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search")
          },
          /**
           * 生态对接账号自定义字段
           */
          ecoAccountCustomField: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_account_custom_field&apiName=batch_delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_account_custom_field/batch_delete document }
             *
             * 删除帐号自定义字段
             *
             * 删除用户在服务商处的身份标示字段（如用户在服务商处的租户 ID）。删除后，不影响已添加帐号对应的自定义字段的值。但在添加新帐号时，将不能再使用此自定义字段。删除不支持撤销，对应的 key 将无法再次复用。
             */
            batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_delete`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchDelete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_account_custom_field&apiName=batch_update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_account_custom_field/batch_update document }
             *
             * 更新帐号自定义字段
             *
             * 更新用户在服务商处的身份标示字段（如用户在服务商处的租户 ID），此方法只会更新同一 scope 内 key 一致的自定义字段。
             */
            batchUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_update`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchUpdate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_account_custom_field&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_account_custom_field/create document }
             *
             * 创建帐号自定义字段
             *
             * 定制用户在服务商处的身份标示字段（如用户在服务商处的租户 ID）。用户在飞书招聘后台添加帐号后，系统会推送「帐号绑定」事件给开发者，事件将携带用户填写的自定义字段信息，开发者可根据此信息识别飞书招聘用户在服务商处的身份信息，完成飞书招聘用户和服务商帐号的绑定，并以此来推送对应的套餐或试卷列表等。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create")
          },
          /**
           * 背调订单
           */
          ecoBackgroundCheck: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check&apiName=cancel&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check/cancel document }
             *
             * 终止背调订单
             *
             * 终止背调订单
             */
            cancel: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_checks/cancel`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "cancel"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check&apiName=update_progress&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check/update_progress document }
             *
             * 更新背调进度
             *
             * 更新指定背调的进度信息
             */
            updateProgress: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_progress`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "updateProgress"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check&apiName=update_result&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check/update_result document }
             *
             * 回传背调的最终结果
             *
             * 回传背调的最终结果
             */
            updateResult: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_result`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "updateResult")
          },
          /**
           * 背调自定义字段
           */
          ecoBackgroundCheckCustomField: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_custom_field&apiName=batch_delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_custom_field/batch_delete document }
             *
             * 删除背调自定义字段
             *
             * 删除用户在发起背调时的自定义字段，删除不影响已创建的背调，删除后对应的自定义字段的 key 不能再复用。
             */
            batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_delete`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchDelete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_custom_field&apiName=batch_update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_custom_field/batch_update document }
             *
             * 更新背调自定义字段
             *
             * 更新用户在发起背调时的自定义字段。更新操作不支持更新自定义字段类型，且将影响已发起的背调表单展示。
             */
            batchUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_update`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchUpdate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_custom_field&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_custom_field/create document }
             *
             * 创建背调自定义字段
             *
             * 定制用户在发起背调时的自定义字段
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create")
          },
          /**
           * 背调套餐和附加调查项
           */
          ecoBackgroundCheckPackage: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_package&apiName=batch_delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_package/batch_delete document }
             *
             * 删除背调套餐和附加调查项
             *
             * 删除指定帐号的指定背调套餐和附加调查项信息，删除不会影响已创建的背调。
             */
            batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_delete`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchDelete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_package&apiName=batch_update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_package/batch_update document }
             *
             * 更新背调套餐和附加调查项
             *
             * 更新指定帐号可用的背调套餐和附加调查项信息，更新将影响已发起背调的表单项展示
             */
            batchUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_update`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchUpdate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_package&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_package/create document }
             *
             * 推送背调套餐和附加调查项
             *
             * 定制指定帐号可用的背调套餐和附加调查项信息
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_packages`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create")
          },
          /**
           * eco_exam
           */
          ecoExam: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam&apiName=login_info&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=login_info&project=hire&resource=eco_exam&version=v1 document }
             */
            loginInfo: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/login_info`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "loginInfo"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam&apiName=update_result&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update_result&project=hire&resource=eco_exam&version=v1 document }
             */
            updateResult: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/update_result`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "updateResult")
          },
          /**
           * eco_exam_paper
           */
          ecoExamPaper: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam_paper&apiName=batch_delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=hire&resource=eco_exam_paper&version=v1 document }
             */
            batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_delete`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchDelete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam_paper&apiName=batch_update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_update&project=hire&resource=eco_exam_paper&version=v1 document }
             */
            batchUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_update`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchUpdate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam_paper&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=eco_exam_paper&version=v1 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exam_papers`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create")
          },
          /**
           * 导入 e-HR
           */
          ehrImportTask: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=ehr_import_task&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/ehr_import_task/patch document }
             *
             * 更新 e-HR 导入任务结果
             *
             * 在处理完导入 e-HR 事件后，可调用该接口，更新  e-HR 导入任务结果
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/ehr_import_tasks/:ehr_import_task_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 入职
           */
          employee: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=employee&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/employee/get document }
             *
             * 通过员工 ID 获取入职信息
             *
             * 通过员工 ID 获取入职信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/employees/:employee_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=employee&apiName=get_by_application&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/employee/get_by_application document }
             *
             * 通过投递 ID 获取入职信息
             *
             * 通过投递 ID 获取入职信息
             */
            getByApplication: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/employees/get_by_application`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "getByApplication"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=employee&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/employee/patch document }
             *
             * 更新入职状态
             *
             * 根据员工 ID 更新员工转正、离职状态
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/employees/:employee_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 评估（灰度租户可见）
           */
          evaluation: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/evaluations`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=evaluation&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/evaluation/list document }
             *
             * 获取简历评估信息
             *
             * 获取简历评估信息
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/evaluations`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 评估任务
           */
          evaluationTask: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/evaluation_tasks`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=evaluation_task&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/evaluation_task/list document }
             *
             * 获取员工评估任务
             *
             * 获取员工评估任务
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/evaluation_tasks`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 笔试 (灰度租户可见)
           */
          exam: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=exam&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/exam/create document }
             *
             * 添加笔试结果
             *
             * 根据投递 ID 添加该投递下的笔试结果
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/exams`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create")
          },
          /**
           * 笔试阅卷任务
           */
          examMarkingTask: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=exam_marking_task&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/exam_marking_task/list document }
             *
             * 获取员工笔试阅卷任务
             *
             * 获取员工笔试阅卷任务
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 导入外部系统信息（灰度租户可见）
           */
          externalApplication: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_application&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_application/create document }
             *
             * 创建外部投递
             *
             * 导入来自其他系统的投递信息，创建为外部投递
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_applications`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_application&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=hire&resource=external_application&version=v1 document }
             *
             * 删除外部投递
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_applications`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_application&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=external_application&version=v1 document }
             *
             * 根据人才 id 获取外部投递列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_applications`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_application&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=hire&resource=external_application&version=v1 document }
             *
             * 更新外部投递
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 导入外部系统信息（灰度租户可见）
           */
          externalBackgroundCheck: {
            batchQueryWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`, path2),
                  method: "POST",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "batchQueryWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_background_check&apiName=batch_query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_query&project=hire&resource=external_background_check&version=v1 document }
             */
            batchQuery: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchQuery"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_background_check&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_background_check/create document }
             *
             * 创建外部背调
             *
             * 导入来自其他系统的背调信息，创建为外部背调
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_background_checks`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_background_check&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=hire&resource=external_background_check&version=v1 document }
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_background_check&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=hire&resource=external_background_check&version=v1 document }
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 导入外部系统信息（灰度租户可见）
           */
          externalInterview: {
            batchQueryWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`, path2),
                  method: "POST",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "batchQueryWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_interview&apiName=batch_query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_query&project=hire&resource=external_interview&version=v1 document }
             */
            batchQuery: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchQuery"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_interview&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_interview/create document }
             *
             * 创建外部面试
             *
             * 导入来自其他系统的面试信息，创建为外部面试
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_interviews`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_interview&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=hire&resource=external_interview&version=v1 document }
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_interview&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=hire&resource=external_interview&version=v1 document }
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 导入外部系统信息（灰度租户可见）
           */
          externalInterviewAssessment: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_interview_assessment&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_interview_assessment/create document }
             *
             * 创建外部面评
             *
             * 导入来自其他系统的面评信息，创建为外部面评
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_interview_assessments`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_interview_assessment&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=hire&resource=external_interview_assessment&version=v1 document }
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_interview_assessments/:external_interview_assessment_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * external_offer
           */
          externalOffer: {
            batchQueryWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`, path2),
                  method: "POST",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "batchQueryWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_offer&apiName=batch_query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_query&project=hire&resource=external_offer&version=v1 document }
             */
            batchQuery: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchQuery"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_offer&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=external_offer&version=v1 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_offers`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_offer&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=hire&resource=external_offer&version=v1 document }
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_offer&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=hire&resource=external_offer&version=v1 document }
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * external_referral_reward
           */
          externalReferralReward: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_referral_reward&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=external_referral_reward&version=v1 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_referral_rewards`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_referral_reward&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=hire&resource=external_referral_reward&version=v1 document }
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_referral_rewards/:external_referral_reward_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete")
          },
          /**
           * 面试
           */
          interview: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interview&apiName=get_by_talent&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview/get_by_talent document }
             *
             * 获取人才面试信息
             *
             * 获取人才面试信息
             */
            getByTalent: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/interviews/get_by_talent`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "getByTalent"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interview&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview/list document }
             *
             * 获取面试信息
             *
             * 根据投递 ID 或面试时间获取面试信息
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/interviews`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * interview_feedback_form
           */
          interviewFeedbackForm: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interview_feedback_form&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=interview_feedback_form&version=v1 document }
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * interview_record.attachment
           */
          interviewRecordAttachment: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interview_record.attachment&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=hire&resource=interview_record.attachment&version=v1 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/interview_records/attachments`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          /**
           * interview_record
           */
          interviewRecord: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interview_record&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview_record/get document }
             *
             * 获取面试评价详细信息
             *
             * 获取面试评价详细信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/interview_records/:interview_record_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/interview_records`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interview_record&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=interview_record&version=v1 document }
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/interview_records`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * interview_registration_schema
           */
          interviewRegistrationSchema: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interview_registration_schema&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview_registration_schema/list document }
             *
             * 获取面试登记表模板列表
             *
             * 获取面试登记表模板列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 面试轮次类型
           */
          interviewRoundType: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interview_round_type&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview_round_type/list document }
             *
             * 获取面试轮次类型列表
             *
             * 获取面试轮次类型列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/interview_round_types`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 面试任务
           */
          interviewTask: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/interview_tasks`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interview_task&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview_task/list document }
             *
             * 获取员工面试任务
             *
             * 获取员工面试任务
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/interview_tasks`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * interviewer
           */
          interviewer: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/interviewers`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interviewer&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=interviewer&version=v1 document }
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/interviewers`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interviewer&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=hire&resource=interviewer&version=v1 document }
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/interviewers/:interviewer_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 职位
           */
          job: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=close&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/close document }
             *
             * 关闭职位
             *
             * 支持关闭职位，关闭后，职位将同步从官网、内推、猎头渠道下线
             */
            close: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id/close`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "close"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=combined_create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/combined_create document }
             *
             * 新建职位
             *
             * 新建职位，字段的是否必填，以系统中的「职位字段管理」中的设置为准。
             */
            combinedCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/combined_create`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "combinedCreate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=combined_update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/combined_update document }
             *
             * 更新职位
             *
             * 更新职位信息，该接口为全量更新，若字段没有返回值，则原有值将会被清空。字段的是否必填，将以系统中的「职位字段管理」中的设置为准。
             */
            combinedUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id/combined_update`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "combinedUpdate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=config&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/config document }
             *
             * 获取职位设置
             *
             * 获取职位设置
             */
            config: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id/config`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "config"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/get document }
             *
             * 获取职位信息
             *
             * 根据职位 ID 获取职位信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=get_detail&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get_detail&project=hire&resource=job&version=v1 document }
             */
            getDetail: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id/get_detail`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "getDetail"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/list document }
             *
             * 获取职位列表
             *
             * 根据更新时间获取职位列表，仅支持获取默认字段信息，获取详细信息可调用[获取职位详细](https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/get)接口
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=open&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/open document }
             *
             * 重启职位
             *
             * 支持开启职位
             */
            open: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id/open`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "open"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=recruiter&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recruiter&project=hire&resource=job&version=v1 document }
             */
            recruiter: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id/recruiter`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "recruiter"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=update_config&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/update_config document }
             *
             * 更新职位设置
             *
             * 更新职位设置，包括面试评价表、Offer 申请表等。接口将按照所选择的「更新选项」进行设置参数校验和更新。
             */
            updateConfig: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id/update_config`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "updateConfig")
          },
          /**
           * job.manager
           */
          jobManager: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job.manager&apiName=batch_update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job-manager/batch_update document }
             *
             * 更新职位相关人员
             *
             * 更新职位相关人员
             */
            batchUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/batch_update`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchUpdate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job.manager&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job-manager/get document }
             *
             * 获取职位上的招聘人员信息
             *
             * 根据职位 ID 获取职位上的招聘人员信息，如招聘负责人、用人经理
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/:manager_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          /**
           * job_function
           */
          jobFunction: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_functions`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_function&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_function/list document }
             *
             * 获取职能分类列表
             *
             * 获取职能分类列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_functions`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 流程
           */
          jobProcess: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_process&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_process/list document }
             *
             * 获取招聘流程信息
             *
             * 获取全部招聘流程信息
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_processes`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * job_publish_record
           */
          jobPublishRecord: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_publish_record&apiName=search&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_publish_record/search document }
             *
             * 获取职位广告发布记录
             *
             * 获取职位广告发布记录
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_publish_records/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search")
          },
          /**
           * 招聘需求（灰度租户可见）
           */
          jobRequirement: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_requirement&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement/create document }
             *
             * 创建招聘需求
             *
             * 创建招聘需求，除招聘需求编号为必填外，其他字段是否必填与飞书招聘「招聘需求字段管理」内设置一致
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_requirements`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_requirement&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement/delete document }
             *
             * 删除招聘需求
             *
             * 删除招聘需求
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_requirement&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement/list document }
             *
             * 获取招聘需求列表
             *
             * 获取招聘需求列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_requirements`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_requirement&apiName=list_by_id&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list_by_id&project=hire&resource=job_requirement&version=v1 document }
             *
             * 获取招聘需求信息
             */
            listById: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_requirements/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "listById"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_requirement&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement/update document }
             *
             * 更新招聘需求
             *
             * 更新招聘需求
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * job_requirement_schema
           */
          jobRequirementSchema: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_requirement_schema&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement_schema/list document }
             *
             * 获取招聘需求模板
             *
             * 获取招聘需求模板
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_requirement_schemas`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * job_schema
           */
          jobSchema: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_schema&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_schema/list document }
             *
             * 获取职位模板
             *
             * 获取社招、校招职位模板中的职位字段，包括系统默认字段和自定义字段
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_schemas`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * job_type
           */
          jobType: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_types`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_type&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=job_type&version=v1 document }
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_types`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 地址（灰度租户可见）
           */
          location: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/locations`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=location&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/location/list document }
             *
             * 获取地址列表
             *
             * 获取地址列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/locations`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=location&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=hire&resource=location&version=v1 document }
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/locations/query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query")
          },
          /**
           * minutes
           */
          minutes: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=minutes&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=hire&resource=minutes&version=v1 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/minutes`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          /**
           * 备注
           */
          note: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=note&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/note/create document }
             *
             * 创建备注
             *
             * 创建备注信息
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/notes`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=note&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=hire&resource=note&version=v1 document }
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/notes/:note_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=note&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/note/get document }
             *
             * 获取备注
             *
             * 根据备注 ID 获取备注信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/notes/:note_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=note&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/note/list document }
             *
             * 获取备注列表
             *
             * 获取备注列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/notes`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=note&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/note/patch document }
             *
             * 更新备注
             *
             * 根据备注 ID 更新备注信息
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/notes/:note_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * Offer
           */
          offer: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer/create document }
             *
             * 创建 Offer
             *
             * 创建 Offer 时，需传入本文档中标注为必传的参数，其余参数是否必传参考「获取 Offer 申请表模板信息」的参数定义
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/offers`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer/get document }
             *
             * 获取 Offer 详情
             *
             * 根据 Offer ID 获取 Offer 详细信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/offers/:offer_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer&apiName=intern_offer_status&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer/intern_offer_status document }
             *
             * 更新实习 Offer 入/离职状态
             *
             * 对「实习待入职」状态的实习 Offer 确认入职、放弃入职，或对「实习已入职」状态的实习 Offer 操作离职
             */
            internOfferStatus: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/offers/:offer_id/intern_offer_status`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "internOfferStatus"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer/list document }
             *
             * 获取 Offer 列表
             *
             * 根据人才 ID 获取 Offer 列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/offers`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer&apiName=offer_status&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=offer_status&project=hire&resource=offer&version=v1 document }
             */
            offerStatus: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/offers/:offer_id/offer_status`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "offerStatus"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer/update document }
             *
             * 更新 Offer 信息
             *
             * 1. 更新 Offer 时，需传入本文档中标注为必传的参数，其余参数是否必传参考「获取 Offer 申请表模板信息」的参数定义；;2. 对系统中已存在的 offer 进行更新的，若更新 offer 中含有「修改需审批」的字段，更新后原 Offer 的审批会自动撤回，需要重新发起审批
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/offers/:offer_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * Offer 申请表（灰度租户可见）
           */
          offerApplicationForm: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer_application_form&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer_application_form/get document }
             *
             * 获取Offer申请表模板信息
             *
             * 获取Offer申请表模板信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/offer_application_forms/:offer_application_form_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer_application_form&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer_application_form/list document }
             *
             * 获取 Offer 申请表列表
             *
             * 获取 Offer 申请表列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/offer_application_forms`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * Offer 审批流配置（灰度租户可见）
           */
          offerApprovalTemplate: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer_approval_template&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer_approval_template/list document }
             *
             * 获取 Offer 审批流配置列表
             *
             * 获取 Offer 审批流配置列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/offer_approval_templates`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * offer_custom_field
           */
          offerCustomField: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer_custom_field&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer_custom_field/update document }
             *
             * 更新 Offer 申请表自定义字段
             *
             * - 本文档支持通过接口更新「飞书招聘」-「设置」-「Offer 申请表设置」中 Offer 申请表的自定义字段配置；;- 当前修改申请表信息（包括更新自定义字段）后，所有申请表的 schema_id 均会更新，即所有申请表均会新增一个版本，申请表的 schema_id 会在创建 offer、更新 offer 中使用；;- 「飞书招聘」中 Offer 申请表自定义字段创建后，不支持修改字段类型，本接口亦不支持更新字段类型；;- 当前字段类型为「公式」的，不支持通过接口更新
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/offer_custom_fields/:offer_custom_field_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * offer_schema
           */
          offerSchema: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer_schema&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=hire&resource=offer_schema&version=v1 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/offer_schemas/:offer_schema_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          /**
           * portal_apply_schema
           */
          portalApplySchema: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=portal_apply_schema&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=portal_apply_schema&version=v1 document }
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 问卷（灰度租户可见）
           */
          questionnaire: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=questionnaire&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/questionnaire/list document }
             *
             * 获取面试满意度问卷列表
             *
             * 获取面试满意度问卷列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/questionnaires`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 内推
           */
          referral: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral&apiName=get_by_application&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/referral/get_by_application document }
             *
             * 获取内推信息
             *
             * 根据投递 ID 获取内推信息
             */
            getByApplication: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/referrals/get_by_application`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "getByApplication"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral&apiName=search&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=hire&resource=referral&version=v1 document }
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/referrals/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search")
          },
          /**
           * referral_account
           */
          referralAccount: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=referral_account&version=v1 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=deactivate&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=deactivate&project=hire&resource=referral_account&version=v1 document }
             */
            deactivate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/deactivate`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "deactivate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=enable&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=enable&project=hire&resource=referral_account&version=v1 document }
             */
            enable: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account/enable`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "enable"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=get_account_assets&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get_account_assets&project=hire&resource=referral_account&version=v1 document }
             */
            getAccountAssets: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account/get_account_assets`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "getAccountAssets"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=reconciliation&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=reconciliation&project=hire&resource=referral_account&version=v1 document }
             */
            reconciliation: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account/reconciliation`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "reconciliation"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=withdraw&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=withdraw&project=hire&resource=referral_account&version=v1 document }
             */
            withdraw: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/withdraw`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "withdraw")
          },
          /**
           * referral_website.job_post
           */
          referralWebsiteJobPost: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_website.job_post&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=hire&resource=referral_website.job_post&version=v1 document }
             *
             * 获取内推官网下职位广告详情
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts/:job_post_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_website.job_post&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=referral_website.job_post&version=v1 document }
             *
             * 获取内推官网下的职位列表。自定义数据暂不支持列表获取，请从「获取内推官网下职位广告详情」接口获取
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * registration_schema
           */
          registrationSchema: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/registration_schemas`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=registration_schema&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=registration_schema&version=v1 document }
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/registration_schemas`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 简历来源
           */
          resumeSource: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/resume_sources`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=resume_source&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/resume_source/list document }
             *
             * 获取简历来源列表
             *
             * 获取简历来源列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/resume_sources`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 权限
           */
          role: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=role&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=hire&resource=role&version=v1 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/roles/:role_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/roles`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=role&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/role/list document }
             *
             * 获取角色列表
             *
             * 获取角色列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/roles`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 项目（灰度租户可见）
           */
          subject: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=subject&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/subject/list document }
             *
             * 获取项目列表
             *
             * 获取项目列表（概念上一批集体启动和管理的职位可以定义为一个项目，例如 「2012 秋招项目」）
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/subjects`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 人才
           */
          talent: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=add_to_folder&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent/add_to_folder document }
             *
             * 将人才加入指定文件夹
             *
             * 将人才加入指定文件夹
             */
            addToFolder: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/add_to_folder`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "addToFolder"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=batch_get_id&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent/batch_get_id document }
             *
             * 通过人才信息获取人才 ID
             *
             * 通过人才信息获取人才 ID
             */
            batchGetId: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/batch_get_id`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchGetId"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=combined_create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent/combined_create document }
             *
             * 创建人才
             *
             * 用于在企业内创建一个人才。姓名为系统预设的必填字段，邮箱/电话字段请在飞书招聘标准简历模板设置中确认是否必填。可配合[获取人才字段](https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent_object/query)接口获取自定义字段信息。
             */
            combinedCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/combined_create`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "combinedCreate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=combined_update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent/combined_update document }
             *
             * 更新人才信息
             *
             * 用于在企业内更新一个人才。姓名为系统预设的必填字段，邮箱/电话字段请在飞书招聘标准简历模板设置中确认是否必填。可配合[获取人才字段](https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent_object/query)接口获取自定义字段信息。
             */
            combinedUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/combined_update`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "combinedUpdate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent/get document }
             *
             * 获取人才信息
             *
             * 根据人才 ID 获取人才信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/:talent_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent/list document }
             *
             * 获取人才列表
             *
             * 根据更新时间获取人才列表，仅支持获取默认字段信息，获取详细信息可调用「获取人才详细」接口
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=onboard_status&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=onboard_status&project=hire&resource=talent&version=v1 document }
             */
            onboardStatus: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/:talent_id/onboard_status`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "onboardStatus"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=remove_to_folder&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=remove_to_folder&project=hire&resource=talent&version=v1 document }
             */
            removeToFolder: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/remove_to_folder`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "removeToFolder"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=tag&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=tag&project=hire&resource=talent&version=v1 document }
             */
            tag: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/:talent_id/tag`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "tag")
          },
          /**
           * 导入外部系统信息（灰度租户可见）
           */
          talentExternalInfo: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent.external_info&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent-external_info/create document }
             *
             * 创建人才外部信息
             *
             * 创建人才外部信息
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent.external_info&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent-external_info/update document }
             *
             * 更新人才外部信息
             *
             * 更新人才外部信息
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * talent_blocklist
           */
          talentBlocklist: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_blocklist&apiName=change_talent_block&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=change_talent_block&project=hire&resource=talent_blocklist&version=v1 document }
             */
            changeTalentBlock: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_blocklist/change_talent_block`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "changeTalentBlock")
          },
          /**
           * talent_folder
           */
          talentFolder: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_folders`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_folder&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent_folder/list document }
             *
             * 获取人才文件夹信息
             *
             * 用于获取招聘系统中人才文件夹信息
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_folders`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * talent_object
           */
          talentObject: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_object&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent_object/query document }
             *
             * 获取人才字段
             *
             * 获取人才字段
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_objects/query`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query")
          },
          /**
           * talent_operation_log
           */
          talentOperationLog: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_operation_log&apiName=search&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent/talent_operation_log/search document }
             *
             * 查询操作人对人才的操作记录
             *
             * 查询操作人对人才的操作记录
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_operation_logs/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search")
          },
          /**
           * talent_pool
           */
          talentPool: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_pool&apiName=batch_change_talent_pool&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_change_talent_pool&project=hire&resource=talent_pool&version=v1 document }
             */
            batchChangeTalentPool: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/batch_change_talent_pool`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchChangeTalentPool"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_pool&apiName=move_talent&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=move_talent&project=hire&resource=talent_pool&version=v1 document }
             */
            moveTalent: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/talent_relationship`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "moveTalent"),
            searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_pools/`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "searchWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_pool&apiName=search&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=hire&resource=talent_pool&version=v1 document }
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_pools/`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search")
          },
          /**
           * talent_tag
           */
          talentTag: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_tags`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_tag&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=talent_tag&version=v1 document }
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_tags`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * termination_reason
           */
          terminationReason: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/termination_reasons`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=termination_reason&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/termination_reason/list document }
             *
             * 获取终止投递原因
             *
             * 获取终止投递原因
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/termination_reasons`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * test
           */
          test: {
            searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/tests/search`, path2),
                  method: "POST",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "searchWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=test&apiName=search&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/test/search document }
             *
             * 获取笔试列表
             *
             * 批量获取人才在某投递流程中的笔试信息，如作答状态、笔试得分等。（目前仅支持获取 1w 条数据，若数据量较大，可通过控制 test_start_time 查询条件分批次获取全量数据）
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/tests/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search")
          },
          /**
           * 待办
           */
          todo: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/todos`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=todo&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/todo/list document }
             *
             * 获取待办列表
             *
             * 获取待办列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/todos`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * tripartite_agreement
           */
          tripartiteAgreement: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=tripartite_agreement&version=v1 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=hire&resource=tripartite_agreement&version=v1 document }
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=tripartite_agreement&version=v1 document }
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=hire&resource=tripartite_agreement&version=v1 document }
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 权限
           */
          userRole: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/user_roles`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=user_role&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/user_role/list document }
             *
             * 获取用户角色列表
             *
             * 获取用户角色列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/user_roles`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * website.channel
           */
          websiteChannel: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=website.channel&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-channel/create document }
             *
             * 创建官网推广渠道
             *
             * 根据官网 ID 和推广渠道名称创建官网推广渠道
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=website.channel&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-channel/delete document }
             *
             * 删除官网推广渠道
             *
             * 根据官网 ID 和推广渠道 ID 删除官网推广渠道
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=website.channel&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-channel/list document }
             *
             * 获取官网推广渠道列表
             *
             * 根据官网 ID 分页获取推广渠道列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=website.channel&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-channel/update document }
             *
             * 更新官网推广渠道
             *
             * 根据官网 ID 和推广渠道 ID 更改推广渠道名称
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * website.delivery
           */
          websiteDelivery: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=website.delivery&apiName=create_by_attachment&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-delivery/create_by_attachment document }
             *
             * 根据简历附件解析创建官网投递
             *
             * 根据简历附件解析创建官网投递
             */
            createByAttachment: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_attachment`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "createByAttachment"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=website.delivery&apiName=create_by_resume&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-delivery/create_by_resume document }
             *
             * 创建官网投递
             *
             * 创建官网投递。
             *
             * 对于自定义字段，若字段类型为单行文本，传值格式为"这是一个单行文本"；若字段类型为多行文本，传值格式为"这是一个多行文本"；若字段类型为单选，传值内容为选项的 ID，格式为"1";若字段类型为多选，传值内容为选项的ID 列表，格式为"["2", "3" ]"；若字段类型为时间段，传值格式为"["1609430400000", "1612108800000" ]"，单位是毫米级时间戳，结束时间是「至今」时，用「"-1"」表示；若字段类型为年份选择，传值格式为"1609430400000"，单位是毫秒级时间戳；若字段类型为月份选择，传值格式为"1625068800000"，单位是毫秒级时间戳；若字段类型为数字，传值格式为"1"
             */
            createByResume: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_resume`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "createByResume")
          },
          /**
           * website.delivery_task
           */
          websiteDeliveryTask: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=website.delivery_task&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-delivery_task/get document }
             *
             * 获取简历解析创建官网投递任务结果
             *
             * 获取官网投递任务信息;，如果获取到的数据data为空，仍然继续轮询，直到data不为空时，再查询data里面的数据
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/delivery_tasks/:delivery_task_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          /**
           * website.job_post
           */
          websiteJobPost: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=website.job_post&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-job_post/get document }
             *
             * 获取自定义官网下职位广告详情
             *
             * 获取自定义官网下职位广告详情
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/:job_post_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=website.job_post&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-job_post/list document }
             *
             * 获取自定义官网下的职位列表
             *
             * 获取自定义官网下的职位列表。自定义数据暂不支持列表获取，请从「获取自定义官网下职位广告详情」接口获取。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`, path2),
                  method: "POST",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "searchWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=website.job_post&apiName=search&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-job_post/search document }
             *
             * 搜索自定义官网下的职位列表
             *
             * 搜索自定义官网下的职位列表
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search")
          },
          /**
           * 官网（灰度租户可见）
           */
          website: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=website&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website/list document }
             *
             * 获取自定义官网列表
             *
             * 获取自定义官网列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * website.site_user
           */
          websiteSiteUser: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=hire&resource=website.site_user&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-site_user/create document }
             *
             * 创建官网用户
             *
             * 创建官网用户
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/site_users`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create")
          },
          v1: {
            /**
             * advertisement
             */
            advertisement: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=advertisement&apiName=publish&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/advertisement/publish document }
               *
               * 职位发布至官网
               *
               * 支持把职位发布至招聘官网、内推平台
               */
              publish: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/advertisements/:advertisement_id/publish`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "publish")
            },
            /**
             * 猎头（灰度租户可见）
             */
            agency: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=agency&apiName=batch_query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_query&project=hire&resource=agency&version=v1 document }
               */
              batchQuery: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/agencies/batch_query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchQuery"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=agency&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/agency/get document }
               *
               * 获取猎头供应商信息
               *
               * 根据猎头供应商 ID 获取猎头供应商信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/agencies/:agency_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=agency&apiName=get_agency_account&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get_agency_account&project=hire&resource=agency&version=v1 document }
               */
              getAgencyAccount: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/agencies/get_agency_account`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "getAgencyAccount"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=agency&apiName=operate_agency_account&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=operate_agency_account&project=hire&resource=agency&version=v1 document }
               */
              operateAgencyAccount: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/agencies/operate_agency_account`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "operateAgencyAccount"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=agency&apiName=protect&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/agency/protect document }
               *
               * 设置猎头保护期
               *
               * 设置猎头保护期
               */
              protect: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/agencies/protect`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "protect"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=agency&apiName=protect_search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=protect_search&project=hire&resource=agency&version=v1 document }
               */
              protectSearch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/agencies/protection_period/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "protectSearch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=agency&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/agency/query document }
               *
               * 查询猎头供应商信息
               *
               * 根据猎头供应商名称查询猎头供应商信息
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/agencies/query`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * 投递
             */
            application: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application&apiName=cancel_onboard&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/application/cancel_onboard document }
               *
               * 取消候选人入职
               *
               * 操作候选人取消入职
               */
              cancelOnboard: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications/:application_id/cancel_onboard`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "cancelOnboard"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/application/create document }
               *
               * 创建投递
               *
               * 根据人才 ID 和职位 ID 创建投递
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/application/get document }
               *
               * 获取投递信息
               *
               * 根据投递 ID 获取单个投递信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications/:application_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application&apiName=get_detail&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get_detail&project=hire&resource=application&version=v1 document }
               */
              getDetail: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications/:application_id/get_detail`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "getDetail"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/application/list document }
               *
               * 获取投递列表
               *
               * 根据限定条件获取投递列表信息
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application&apiName=offer&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/application/offer document }
               *
               * 获取 Offer 信息
               *
               * 根据投递 ID 获取 Offer 信息
               */
              offer: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications/:application_id/offer`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "offer"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application&apiName=recover&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recover&project=hire&resource=application&version=v1 document }
               */
              recover: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications/:application_id/recover`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "recover"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application&apiName=terminate&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/application/terminate document }
               *
               * 终止投递
               *
               * 根据投递 ID 修改投递状态为「已终止」
               */
              terminate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications/:application_id/terminate`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "terminate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application&apiName=transfer_onboard&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/application/transfer_onboard document }
               *
               * 操作候选人入职
               *
               * 根据投递 ID 操作候选人入职并创建员工。投递须处于「待入职」阶段，可通过「转移阶段」接口变更投递状态
               */
              transferOnboard: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_onboard`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "transferOnboard"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application&apiName=transfer_stage&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/application/transfer_stage document }
               *
               * 转移阶段
               *
               * 转移投递阶段
               */
              transferStage: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications/:application_id/transfer_stage`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "transferStage")
            },
            /**
             * application.interview
             */
            applicationInterview: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application.interview&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=application.interview&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications/:application_id/interviews`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 附件
             */
            attachment: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=attachment&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uIDN1YjLyQTN24iM0UjN/create_attachment document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/attachments`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=attachment&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/attachment/get document }
               *
               * 获取附件信息
               *
               * 获取招聘系统中附件的元信息，比如文件名、创建时间、文件url等
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=attachment&apiName=preview&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/attachment/preview document }
               *
               * 获取附件预览信息
               *
               * 根据附件 ID 获取附件预览信息
               */
              preview: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/attachments/:attachment_id/preview`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "preview")
            },
            /**
             * 背调 （灰度租户可见）
             */
            backgroundCheckOrder: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=background_check_order&apiName=batch_query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_query&project=hire&resource=background_check_order&version=v1 document }
               */
              batchQuery: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/background_check_orders/batch_query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchQuery"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=background_check_order&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/background_check_order/list document }
               *
               * 获取背调信息
               *
               * 根据投递ID或背调更新时间获取背调信息
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/background_check_orders`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * diversity_inclusion
             */
            diversityInclusion: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=diversity_inclusion&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=hire&resource=diversity_inclusion&version=v1 document }
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications/diversity_inclusions/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * 生态对接账号自定义字段
             */
            ecoAccountCustomField: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_account_custom_field&apiName=batch_delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_account_custom_field/batch_delete document }
               *
               * 删除帐号自定义字段
               *
               * 删除用户在服务商处的身份标示字段（如用户在服务商处的租户 ID）。删除后，不影响已添加帐号对应的自定义字段的值。但在添加新帐号时，将不能再使用此自定义字段。删除不支持撤销，对应的 key 将无法再次复用。
               */
              batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_delete`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchDelete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_account_custom_field&apiName=batch_update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_account_custom_field/batch_update document }
               *
               * 更新帐号自定义字段
               *
               * 更新用户在服务商处的身份标示字段（如用户在服务商处的租户 ID），此方法只会更新同一 scope 内 key 一致的自定义字段。
               */
              batchUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_update`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchUpdate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_account_custom_field&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_account_custom_field/create document }
               *
               * 创建帐号自定义字段
               *
               * 定制用户在服务商处的身份标示字段（如用户在服务商处的租户 ID）。用户在飞书招聘后台添加帐号后，系统会推送「帐号绑定」事件给开发者，事件将携带用户填写的自定义字段信息，开发者可根据此信息识别飞书招聘用户在服务商处的身份信息，完成飞书招聘用户和服务商帐号的绑定，并以此来推送对应的套餐或试卷列表等。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create")
            },
            /**
             * 背调订单
             */
            ecoBackgroundCheck: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check&apiName=cancel&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check/cancel document }
               *
               * 终止背调订单
               *
               * 终止背调订单
               */
              cancel: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_checks/cancel`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "cancel"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check&apiName=update_progress&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check/update_progress document }
               *
               * 更新背调进度
               *
               * 更新指定背调的进度信息
               */
              updateProgress: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_progress`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "updateProgress"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check&apiName=update_result&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check/update_result document }
               *
               * 回传背调的最终结果
               *
               * 回传背调的最终结果
               */
              updateResult: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_result`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "updateResult")
            },
            /**
             * 背调自定义字段
             */
            ecoBackgroundCheckCustomField: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_custom_field&apiName=batch_delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_custom_field/batch_delete document }
               *
               * 删除背调自定义字段
               *
               * 删除用户在发起背调时的自定义字段，删除不影响已创建的背调，删除后对应的自定义字段的 key 不能再复用。
               */
              batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_delete`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchDelete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_custom_field&apiName=batch_update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_custom_field/batch_update document }
               *
               * 更新背调自定义字段
               *
               * 更新用户在发起背调时的自定义字段。更新操作不支持更新自定义字段类型，且将影响已发起的背调表单展示。
               */
              batchUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_update`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchUpdate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_custom_field&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_custom_field/create document }
               *
               * 创建背调自定义字段
               *
               * 定制用户在发起背调时的自定义字段
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create")
            },
            /**
             * 背调套餐和附加调查项
             */
            ecoBackgroundCheckPackage: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_package&apiName=batch_delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_package/batch_delete document }
               *
               * 删除背调套餐和附加调查项
               *
               * 删除指定帐号的指定背调套餐和附加调查项信息，删除不会影响已创建的背调。
               */
              batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_delete`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchDelete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_package&apiName=batch_update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_package/batch_update document }
               *
               * 更新背调套餐和附加调查项
               *
               * 更新指定帐号可用的背调套餐和附加调查项信息，更新将影响已发起背调的表单项展示
               */
              batchUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_update`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchUpdate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_package&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_package/create document }
               *
               * 推送背调套餐和附加调查项
               *
               * 定制指定帐号可用的背调套餐和附加调查项信息
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_packages`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create")
            },
            /**
             * eco_exam
             */
            ecoExam: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam&apiName=login_info&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=login_info&project=hire&resource=eco_exam&version=v1 document }
               */
              loginInfo: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/login_info`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "loginInfo"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam&apiName=update_result&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update_result&project=hire&resource=eco_exam&version=v1 document }
               */
              updateResult: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/update_result`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "updateResult")
            },
            /**
             * eco_exam_paper
             */
            ecoExamPaper: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam_paper&apiName=batch_delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=hire&resource=eco_exam_paper&version=v1 document }
               */
              batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_delete`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchDelete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam_paper&apiName=batch_update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_update&project=hire&resource=eco_exam_paper&version=v1 document }
               */
              batchUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_update`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchUpdate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam_paper&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=eco_exam_paper&version=v1 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exam_papers`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create")
            },
            /**
             * 导入 e-HR
             */
            ehrImportTask: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=ehr_import_task&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/ehr_import_task/patch document }
               *
               * 更新 e-HR 导入任务结果
               *
               * 在处理完导入 e-HR 事件后，可调用该接口，更新  e-HR 导入任务结果
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/ehr_import_tasks/:ehr_import_task_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 入职
             */
            employee: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=employee&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/employee/get document }
               *
               * 通过员工 ID 获取入职信息
               *
               * 通过员工 ID 获取入职信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/employees/:employee_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=employee&apiName=get_by_application&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/employee/get_by_application document }
               *
               * 通过投递 ID 获取入职信息
               *
               * 通过投递 ID 获取入职信息
               */
              getByApplication: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/employees/get_by_application`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "getByApplication"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=employee&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/employee/patch document }
               *
               * 更新入职状态
               *
               * 根据员工 ID 更新员工转正、离职状态
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/employees/:employee_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 评估（灰度租户可见）
             */
            evaluation: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/evaluations`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=evaluation&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/evaluation/list document }
               *
               * 获取简历评估信息
               *
               * 获取简历评估信息
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/evaluations`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 评估任务
             */
            evaluationTask: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/evaluation_tasks`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=evaluation_task&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/evaluation_task/list document }
               *
               * 获取员工评估任务
               *
               * 获取员工评估任务
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/evaluation_tasks`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 笔试 (灰度租户可见)
             */
            exam: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=exam&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/exam/create document }
               *
               * 添加笔试结果
               *
               * 根据投递 ID 添加该投递下的笔试结果
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/exams`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create")
            },
            /**
             * 笔试阅卷任务
             */
            examMarkingTask: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=exam_marking_task&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/exam_marking_task/list document }
               *
               * 获取员工笔试阅卷任务
               *
               * 获取员工笔试阅卷任务
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/exam_marking_tasks`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 导入外部系统信息（灰度租户可见）
             */
            externalApplication: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_application&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_application/create document }
               *
               * 创建外部投递
               *
               * 导入来自其他系统的投递信息，创建为外部投递
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_applications`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_application&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=hire&resource=external_application&version=v1 document }
               *
               * 删除外部投递
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_applications`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_application&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=external_application&version=v1 document }
               *
               * 根据人才 id 获取外部投递列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_applications`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_application&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=hire&resource=external_application&version=v1 document }
               *
               * 更新外部投递
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 导入外部系统信息（灰度租户可见）
             */
            externalBackgroundCheck: {
              batchQueryWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "batchQueryWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_background_check&apiName=batch_query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_query&project=hire&resource=external_background_check&version=v1 document }
               */
              batchQuery: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_background_checks/batch_query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchQuery"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_background_check&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_background_check/create document }
               *
               * 创建外部背调
               *
               * 导入来自其他系统的背调信息，创建为外部背调
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_background_checks`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_background_check&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=hire&resource=external_background_check&version=v1 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_background_check&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=hire&resource=external_background_check&version=v1 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_background_checks/:external_background_check_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 导入外部系统信息（灰度租户可见）
             */
            externalInterview: {
              batchQueryWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "batchQueryWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_interview&apiName=batch_query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_query&project=hire&resource=external_interview&version=v1 document }
               */
              batchQuery: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_interviews/batch_query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchQuery"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_interview&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_interview/create document }
               *
               * 创建外部面试
               *
               * 导入来自其他系统的面试信息，创建为外部面试
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_interviews`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_interview&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=hire&resource=external_interview&version=v1 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_interview&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=hire&resource=external_interview&version=v1 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_interviews/:external_interview_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 导入外部系统信息（灰度租户可见）
             */
            externalInterviewAssessment: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_interview_assessment&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_interview_assessment/create document }
               *
               * 创建外部面评
               *
               * 导入来自其他系统的面评信息，创建为外部面评
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_interview_assessments`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_interview_assessment&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=hire&resource=external_interview_assessment&version=v1 document }
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_interview_assessments/:external_interview_assessment_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * external_offer
             */
            externalOffer: {
              batchQueryWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "batchQueryWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_offer&apiName=batch_query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_query&project=hire&resource=external_offer&version=v1 document }
               */
              batchQuery: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_offers/batch_query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchQuery"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_offer&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=external_offer&version=v1 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_offers`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_offer&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=hire&resource=external_offer&version=v1 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_offer&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=hire&resource=external_offer&version=v1 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_offers/:external_offer_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * external_referral_reward
             */
            externalReferralReward: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_referral_reward&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=external_referral_reward&version=v1 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_referral_rewards`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_referral_reward&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=hire&resource=external_referral_reward&version=v1 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_referral_rewards/:external_referral_reward_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete")
            },
            /**
             * 面试
             */
            interview: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interview&apiName=get_by_talent&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview/get_by_talent document }
               *
               * 获取人才面试信息
               *
               * 获取人才面试信息
               */
              getByTalent: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/interviews/get_by_talent`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "getByTalent"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interview&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview/list document }
               *
               * 获取面试信息
               *
               * 根据投递 ID 或面试时间获取面试信息
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/interviews`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * interview_feedback_form
             */
            interviewFeedbackForm: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interview_feedback_form&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=interview_feedback_form&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/interview_feedback_forms`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * interview_record.attachment
             */
            interviewRecordAttachment: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interview_record.attachment&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=hire&resource=interview_record.attachment&version=v1 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/interview_records/attachments`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * interview_record
             */
            interviewRecord: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interview_record&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview_record/get document }
               *
               * 获取面试评价详细信息
               *
               * 获取面试评价详细信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/interview_records/:interview_record_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/interview_records`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interview_record&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=interview_record&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/interview_records`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * interview_registration_schema
             */
            interviewRegistrationSchema: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interview_registration_schema&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview_registration_schema/list document }
               *
               * 获取面试登记表模板列表
               *
               * 获取面试登记表模板列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/interview_registration_schemas`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 面试轮次类型
             */
            interviewRoundType: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interview_round_type&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview_round_type/list document }
               *
               * 获取面试轮次类型列表
               *
               * 获取面试轮次类型列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/interview_round_types`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 面试任务
             */
            interviewTask: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/interview_tasks`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interview_task&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview_task/list document }
               *
               * 获取员工面试任务
               *
               * 获取员工面试任务
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/interview_tasks`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * interviewer
             */
            interviewer: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/interviewers`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interviewer&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=interviewer&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/interviewers`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interviewer&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=hire&resource=interviewer&version=v1 document }
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/interviewers/:interviewer_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 职位
             */
            job: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=close&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/close document }
               *
               * 关闭职位
               *
               * 支持关闭职位，关闭后，职位将同步从官网、内推、猎头渠道下线
               */
              close: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id/close`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "close"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=combined_create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/combined_create document }
               *
               * 新建职位
               *
               * 新建职位，字段的是否必填，以系统中的「职位字段管理」中的设置为准。
               */
              combinedCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/combined_create`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "combinedCreate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=combined_update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/combined_update document }
               *
               * 更新职位
               *
               * 更新职位信息，该接口为全量更新，若字段没有返回值，则原有值将会被清空。字段的是否必填，将以系统中的「职位字段管理」中的设置为准。
               */
              combinedUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id/combined_update`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "combinedUpdate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=config&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/config document }
               *
               * 获取职位设置
               *
               * 获取职位设置
               */
              config: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id/config`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "config"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/get document }
               *
               * 获取职位信息
               *
               * 根据职位 ID 获取职位信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=get_detail&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get_detail&project=hire&resource=job&version=v1 document }
               */
              getDetail: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id/get_detail`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "getDetail"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/list document }
               *
               * 获取职位列表
               *
               * 根据更新时间获取职位列表，仅支持获取默认字段信息，获取详细信息可调用[获取职位详细](https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/get)接口
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=open&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/open document }
               *
               * 重启职位
               *
               * 支持开启职位
               */
              open: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id/open`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "open"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=recruiter&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recruiter&project=hire&resource=job&version=v1 document }
               */
              recruiter: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id/recruiter`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "recruiter"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=update_config&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/update_config document }
               *
               * 更新职位设置
               *
               * 更新职位设置，包括面试评价表、Offer 申请表等。接口将按照所选择的「更新选项」进行设置参数校验和更新。
               */
              updateConfig: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id/update_config`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "updateConfig")
            },
            /**
             * job.manager
             */
            jobManager: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job.manager&apiName=batch_update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job-manager/batch_update document }
               *
               * 更新职位相关人员
               *
               * 更新职位相关人员
               */
              batchUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/batch_update`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchUpdate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job.manager&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job-manager/get document }
               *
               * 获取职位上的招聘人员信息
               *
               * 根据职位 ID 获取职位上的招聘人员信息，如招聘负责人、用人经理
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/:manager_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * job_function
             */
            jobFunction: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_functions`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_function&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_function/list document }
               *
               * 获取职能分类列表
               *
               * 获取职能分类列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_functions`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 流程
             */
            jobProcess: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_process&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_process/list document }
               *
               * 获取招聘流程信息
               *
               * 获取全部招聘流程信息
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_processes`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * job_publish_record
             */
            jobPublishRecord: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_publish_record&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_publish_record/search document }
               *
               * 获取职位广告发布记录
               *
               * 获取职位广告发布记录
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_publish_records/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * 招聘需求（灰度租户可见）
             */
            jobRequirement: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_requirement&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement/create document }
               *
               * 创建招聘需求
               *
               * 创建招聘需求，除招聘需求编号为必填外，其他字段是否必填与飞书招聘「招聘需求字段管理」内设置一致
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_requirements`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_requirement&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement/delete document }
               *
               * 删除招聘需求
               *
               * 删除招聘需求
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_requirement&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement/list document }
               *
               * 获取招聘需求列表
               *
               * 获取招聘需求列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_requirements`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_requirement&apiName=list_by_id&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list_by_id&project=hire&resource=job_requirement&version=v1 document }
               *
               * 获取招聘需求信息
               */
              listById: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_requirements/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "listById"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_requirement&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement/update document }
               *
               * 更新招聘需求
               *
               * 更新招聘需求
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * job_requirement_schema
             */
            jobRequirementSchema: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_requirement_schema&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement_schema/list document }
               *
               * 获取招聘需求模板
               *
               * 获取招聘需求模板
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_requirement_schemas`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * job_schema
             */
            jobSchema: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_schema&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_schema/list document }
               *
               * 获取职位模板
               *
               * 获取社招、校招职位模板中的职位字段，包括系统默认字段和自定义字段
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_schemas`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * job_type
             */
            jobType: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_types`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_type&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=job_type&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_types`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 地址（灰度租户可见）
             */
            location: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/locations`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=location&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/location/list document }
               *
               * 获取地址列表
               *
               * 获取地址列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/locations`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=location&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=hire&resource=location&version=v1 document }
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/locations/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * minutes
             */
            minutes: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=minutes&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=hire&resource=minutes&version=v1 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/minutes`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * 备注
             */
            note: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=note&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/note/create document }
               *
               * 创建备注
               *
               * 创建备注信息
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/notes`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=note&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=hire&resource=note&version=v1 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/notes/:note_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=note&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/note/get document }
               *
               * 获取备注
               *
               * 根据备注 ID 获取备注信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/notes/:note_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=note&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/note/list document }
               *
               * 获取备注列表
               *
               * 获取备注列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/notes`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=note&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/note/patch document }
               *
               * 更新备注
               *
               * 根据备注 ID 更新备注信息
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/notes/:note_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * Offer
             */
            offer: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer/create document }
               *
               * 创建 Offer
               *
               * 创建 Offer 时，需传入本文档中标注为必传的参数，其余参数是否必传参考「获取 Offer 申请表模板信息」的参数定义
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/offers`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer/get document }
               *
               * 获取 Offer 详情
               *
               * 根据 Offer ID 获取 Offer 详细信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/offers/:offer_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer&apiName=intern_offer_status&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer/intern_offer_status document }
               *
               * 更新实习 Offer 入/离职状态
               *
               * 对「实习待入职」状态的实习 Offer 确认入职、放弃入职，或对「实习已入职」状态的实习 Offer 操作离职
               */
              internOfferStatus: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/offers/:offer_id/intern_offer_status`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "internOfferStatus"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer/list document }
               *
               * 获取 Offer 列表
               *
               * 根据人才 ID 获取 Offer 列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/offers`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer&apiName=offer_status&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=offer_status&project=hire&resource=offer&version=v1 document }
               */
              offerStatus: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/offers/:offer_id/offer_status`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "offerStatus"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer/update document }
               *
               * 更新 Offer 信息
               *
               * 1. 更新 Offer 时，需传入本文档中标注为必传的参数，其余参数是否必传参考「获取 Offer 申请表模板信息」的参数定义；;2. 对系统中已存在的 offer 进行更新的，若更新 offer 中含有「修改需审批」的字段，更新后原 Offer 的审批会自动撤回，需要重新发起审批
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/offers/:offer_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * Offer 申请表（灰度租户可见）
             */
            offerApplicationForm: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer_application_form&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer_application_form/get document }
               *
               * 获取Offer申请表模板信息
               *
               * 获取Offer申请表模板信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/offer_application_forms/:offer_application_form_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer_application_form&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer_application_form/list document }
               *
               * 获取 Offer 申请表列表
               *
               * 获取 Offer 申请表列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/offer_application_forms`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * Offer 审批流配置（灰度租户可见）
             */
            offerApprovalTemplate: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer_approval_template&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer_approval_template/list document }
               *
               * 获取 Offer 审批流配置列表
               *
               * 获取 Offer 审批流配置列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/offer_approval_templates`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * offer_custom_field
             */
            offerCustomField: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer_custom_field&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer_custom_field/update document }
               *
               * 更新 Offer 申请表自定义字段
               *
               * - 本文档支持通过接口更新「飞书招聘」-「设置」-「Offer 申请表设置」中 Offer 申请表的自定义字段配置；;- 当前修改申请表信息（包括更新自定义字段）后，所有申请表的 schema_id 均会更新，即所有申请表均会新增一个版本，申请表的 schema_id 会在创建 offer、更新 offer 中使用；;- 「飞书招聘」中 Offer 申请表自定义字段创建后，不支持修改字段类型，本接口亦不支持更新字段类型；;- 当前字段类型为「公式」的，不支持通过接口更新
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/offer_custom_fields/:offer_custom_field_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * offer_schema
             */
            offerSchema: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer_schema&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=hire&resource=offer_schema&version=v1 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/offer_schemas/:offer_schema_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * portal_apply_schema
             */
            portalApplySchema: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=portal_apply_schema&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=portal_apply_schema&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 问卷（灰度租户可见）
             */
            questionnaire: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=questionnaire&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/questionnaire/list document }
               *
               * 获取面试满意度问卷列表
               *
               * 获取面试满意度问卷列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/questionnaires`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 内推
             */
            referral: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral&apiName=get_by_application&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/referral/get_by_application document }
               *
               * 获取内推信息
               *
               * 根据投递 ID 获取内推信息
               */
              getByApplication: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/referrals/get_by_application`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "getByApplication"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=hire&resource=referral&version=v1 document }
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/referrals/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * referral_account
             */
            referralAccount: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=referral_account&version=v1 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=deactivate&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=deactivate&project=hire&resource=referral_account&version=v1 document }
               */
              deactivate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/deactivate`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "deactivate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=enable&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=enable&project=hire&resource=referral_account&version=v1 document }
               */
              enable: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account/enable`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "enable"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=get_account_assets&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get_account_assets&project=hire&resource=referral_account&version=v1 document }
               */
              getAccountAssets: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account/get_account_assets`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "getAccountAssets"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=reconciliation&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=reconciliation&project=hire&resource=referral_account&version=v1 document }
               */
              reconciliation: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account/reconciliation`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "reconciliation"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=withdraw&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=withdraw&project=hire&resource=referral_account&version=v1 document }
               */
              withdraw: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/withdraw`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "withdraw")
            },
            /**
             * referral_website.job_post
             */
            referralWebsiteJobPost: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_website.job_post&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=hire&resource=referral_website.job_post&version=v1 document }
               *
               * 获取内推官网下职位广告详情
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts/:job_post_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_website.job_post&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=referral_website.job_post&version=v1 document }
               *
               * 获取内推官网下的职位列表。自定义数据暂不支持列表获取，请从「获取内推官网下职位广告详情」接口获取
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * registration_schema
             */
            registrationSchema: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/registration_schemas`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=registration_schema&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=registration_schema&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/registration_schemas`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 简历来源
             */
            resumeSource: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/resume_sources`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=resume_source&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/resume_source/list document }
               *
               * 获取简历来源列表
               *
               * 获取简历来源列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/resume_sources`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 权限
             */
            role: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=role&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=hire&resource=role&version=v1 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/roles/:role_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/roles`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=role&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/role/list document }
               *
               * 获取角色列表
               *
               * 获取角色列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/roles`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 项目（灰度租户可见）
             */
            subject: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=subject&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/subject/list document }
               *
               * 获取项目列表
               *
               * 获取项目列表（概念上一批集体启动和管理的职位可以定义为一个项目，例如 「2012 秋招项目」）
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/subjects`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 人才
             */
            talent: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=add_to_folder&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent/add_to_folder document }
               *
               * 将人才加入指定文件夹
               *
               * 将人才加入指定文件夹
               */
              addToFolder: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/add_to_folder`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "addToFolder"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=batch_get_id&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent/batch_get_id document }
               *
               * 通过人才信息获取人才 ID
               *
               * 通过人才信息获取人才 ID
               */
              batchGetId: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/batch_get_id`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchGetId"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=combined_create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent/combined_create document }
               *
               * 创建人才
               *
               * 用于在企业内创建一个人才。姓名为系统预设的必填字段，邮箱/电话字段请在飞书招聘标准简历模板设置中确认是否必填。可配合[获取人才字段](https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent_object/query)接口获取自定义字段信息。
               */
              combinedCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/combined_create`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "combinedCreate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=combined_update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent/combined_update document }
               *
               * 更新人才信息
               *
               * 用于在企业内更新一个人才。姓名为系统预设的必填字段，邮箱/电话字段请在飞书招聘标准简历模板设置中确认是否必填。可配合[获取人才字段](https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent_object/query)接口获取自定义字段信息。
               */
              combinedUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/combined_update`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "combinedUpdate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent/get document }
               *
               * 获取人才信息
               *
               * 根据人才 ID 获取人才信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/:talent_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent/list document }
               *
               * 获取人才列表
               *
               * 根据更新时间获取人才列表，仅支持获取默认字段信息，获取详细信息可调用「获取人才详细」接口
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=onboard_status&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=onboard_status&project=hire&resource=talent&version=v1 document }
               */
              onboardStatus: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/:talent_id/onboard_status`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "onboardStatus"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=remove_to_folder&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=remove_to_folder&project=hire&resource=talent&version=v1 document }
               */
              removeToFolder: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/remove_to_folder`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "removeToFolder"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=tag&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=tag&project=hire&resource=talent&version=v1 document }
               */
              tag: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/:talent_id/tag`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "tag")
            },
            /**
             * 导入外部系统信息（灰度租户可见）
             */
            talentExternalInfo: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent.external_info&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent-external_info/create document }
               *
               * 创建人才外部信息
               *
               * 创建人才外部信息
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent.external_info&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent-external_info/update document }
               *
               * 更新人才外部信息
               *
               * 更新人才外部信息
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/:talent_id/external_info`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * talent_blocklist
             */
            talentBlocklist: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_blocklist&apiName=change_talent_block&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=change_talent_block&project=hire&resource=talent_blocklist&version=v1 document }
               */
              changeTalentBlock: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_blocklist/change_talent_block`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "changeTalentBlock")
            },
            /**
             * talent_folder
             */
            talentFolder: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_folders`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_folder&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent_folder/list document }
               *
               * 获取人才文件夹信息
               *
               * 用于获取招聘系统中人才文件夹信息
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_folders`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * talent_object
             */
            talentObject: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_object&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent_object/query document }
               *
               * 获取人才字段
               *
               * 获取人才字段
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_objects/query`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * talent_operation_log
             */
            talentOperationLog: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_operation_log&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent/talent_operation_log/search document }
               *
               * 查询操作人对人才的操作记录
               *
               * 查询操作人对人才的操作记录
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_operation_logs/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * talent_pool
             */
            talentPool: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_pool&apiName=batch_change_talent_pool&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_change_talent_pool&project=hire&resource=talent_pool&version=v1 document }
               */
              batchChangeTalentPool: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/batch_change_talent_pool`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchChangeTalentPool"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_pool&apiName=move_talent&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=move_talent&project=hire&resource=talent_pool&version=v1 document }
               */
              moveTalent: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_pools/:talent_pool_id/talent_relationship`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "moveTalent"),
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_pools/`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_pool&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=hire&resource=talent_pool&version=v1 document }
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_pools/`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * talent_tag
             */
            talentTag: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_tags`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_tag&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=talent_tag&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_tags`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * termination_reason
             */
            terminationReason: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/termination_reasons`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=termination_reason&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/termination_reason/list document }
               *
               * 获取终止投递原因
               *
               * 获取终止投递原因
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/termination_reasons`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * test
             */
            test: {
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/tests/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=test&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/test/search document }
               *
               * 获取笔试列表
               *
               * 批量获取人才在某投递流程中的笔试信息，如作答状态、笔试得分等。（目前仅支持获取 1w 条数据，若数据量较大，可通过控制 test_start_time 查询条件分批次获取全量数据）
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/tests/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * 待办
             */
            todo: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/todos`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=todo&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/todo/list document }
               *
               * 获取待办列表
               *
               * 获取待办列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/todos`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * tripartite_agreement
             */
            tripartiteAgreement: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=tripartite_agreement&version=v1 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=hire&resource=tripartite_agreement&version=v1 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=tripartite_agreement&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=hire&resource=tripartite_agreement&version=v1 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 权限
             */
            userRole: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/user_roles`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=user_role&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/user_role/list document }
               *
               * 获取用户角色列表
               *
               * 获取用户角色列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/user_roles`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * website.channel
             */
            websiteChannel: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=website.channel&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-channel/create document }
               *
               * 创建官网推广渠道
               *
               * 根据官网 ID 和推广渠道名称创建官网推广渠道
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=website.channel&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-channel/delete document }
               *
               * 删除官网推广渠道
               *
               * 根据官网 ID 和推广渠道 ID 删除官网推广渠道
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=website.channel&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-channel/list document }
               *
               * 获取官网推广渠道列表
               *
               * 根据官网 ID 分页获取推广渠道列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=website.channel&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-channel/update document }
               *
               * 更新官网推广渠道
               *
               * 根据官网 ID 和推广渠道 ID 更改推广渠道名称
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/channels/:channel_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * website.delivery
             */
            websiteDelivery: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=website.delivery&apiName=create_by_attachment&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-delivery/create_by_attachment document }
               *
               * 根据简历附件解析创建官网投递
               *
               * 根据简历附件解析创建官网投递
               */
              createByAttachment: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_attachment`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "createByAttachment"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=website.delivery&apiName=create_by_resume&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-delivery/create_by_resume document }
               *
               * 创建官网投递
               *
               * 创建官网投递。
               *
               * 对于自定义字段，若字段类型为单行文本，传值格式为"这是一个单行文本"；若字段类型为多行文本，传值格式为"这是一个多行文本"；若字段类型为单选，传值内容为选项的 ID，格式为"1";若字段类型为多选，传值内容为选项的ID 列表，格式为"["2", "3" ]"；若字段类型为时间段，传值格式为"["1609430400000", "1612108800000" ]"，单位是毫米级时间戳，结束时间是「至今」时，用「"-1"」表示；若字段类型为年份选择，传值格式为"1609430400000"，单位是毫秒级时间戳；若字段类型为月份选择，传值格式为"1625068800000"，单位是毫秒级时间戳；若字段类型为数字，传值格式为"1"
               */
              createByResume: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/deliveries/create_by_resume`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "createByResume")
            },
            /**
             * website.delivery_task
             */
            websiteDeliveryTask: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=website.delivery_task&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-delivery_task/get document }
               *
               * 获取简历解析创建官网投递任务结果
               *
               * 获取官网投递任务信息;，如果获取到的数据data为空，仍然继续轮询，直到data不为空时，再查询data里面的数据
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/delivery_tasks/:delivery_task_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * website.job_post
             */
            websiteJobPost: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=website.job_post&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-job_post/get document }
               *
               * 获取自定义官网下职位广告详情
               *
               * 获取自定义官网下职位广告详情
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/:job_post_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=website.job_post&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-job_post/list document }
               *
               * 获取自定义官网下的职位列表
               *
               * 获取自定义官网下的职位列表。自定义数据暂不支持列表获取，请从「获取自定义官网下职位广告详情」接口获取。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=website.job_post&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-job_post/search document }
               *
               * 搜索自定义官网下的职位列表
               *
               * 搜索自定义官网下的职位列表
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/job_posts/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * 官网（灰度租户可见）
             */
            website: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=website&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website/list document }
               *
               * 获取自定义官网列表
               *
               * 获取自定义官网列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * website.site_user
             */
            websiteSiteUser: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=website.site_user&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-site_user/create document }
               *
               * 创建官网用户
               *
               * 创建官网用户
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v1/websites/:website_id/site_users`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create")
            }
          },
          v2: {
            /**
             * interview_record
             */
            interviewRecord: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interview_record&apiName=get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=hire&resource=interview_record&version=v2 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v2/interview_records/:interview_record_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/hire/v2/interview_records`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interview_record&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=interview_record&version=v2 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v2/interview_records`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 人才
             */
            talent: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/hire-v2/talent/get document }
               *
               * 获取人才信息V2
               *
               * 根据人才 ID 获取人才信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/hire/v2/talents/:talent_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            }
          }
        };
      }
    };
    var Client$w = class extends Client$x {
      static {
        __name(this, "Client$w");
      }
      constructor() {
        super(...arguments);
        this.human_authentication = {
          /**
           * 实名认证
           */
          identity: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=human_authentication&resource=identity&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/human_authentication-v1/identity/create document }
             *
             * 录入身份信息
             *
             * 该接口用于录入实名认证的身份信息，在唤起有源活体认证前，需要使用该接口进行实名认证。
             *
             * 实名认证接口会有计费管理，接入前请联系飞书开放平台工作人员，邮箱：openplatform@bytedance.com。;;仅通过计费申请的应用，才能在[开发者后台](https://open.feishu.cn/app)查找并申请该接口的权限。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/human_authentication/v1/identities`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create")
          },
          v1: {
            /**
             * 实名认证
             */
            identity: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=human_authentication&resource=identity&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/human_authentication-v1/identity/create document }
               *
               * 录入身份信息
               *
               * 该接口用于录入实名认证的身份信息，在唤起有源活体认证前，需要使用该接口进行实名认证。
               *
               * 实名认证接口会有计费管理，接入前请联系飞书开放平台工作人员，邮箱：openplatform@bytedance.com。;;仅通过计费申请的应用，才能在[开发者后台](https://open.feishu.cn/app)查找并申请该接口的权限。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/human_authentication/v1/identities`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create")
            }
          }
        };
      }
    };
    var Client$v = class extends Client$w {
      static {
        __name(this, "Client$v");
      }
      constructor() {
        super(...arguments);
        this.im = {
          /**
           * 消息 - 批量消息
           */
          batchMessage: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=batch_message&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/batch_message/delete document }
             *
             * 批量撤回消息
             *
             * 批量撤回通过[批量发送消息](https://open.feishu.cn/document/ukTMukTMukTM/ucDO1EjL3gTNx4yN4UTM)接口发送的消息。
             *
             * 注意事项：;- 应用需要启用[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability) ;- 撤回单条发送的消息请使用[撤回消息](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/delete)接口;- 不支持撤回发出时间超过1天的消息;- 一次调用涉及大量消息，所以为异步接口，会有一定延迟。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=batch_message&apiName=get_progress&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/batch_message/get_progress document }
             *
             * 查询批量消息整体进度
             *
             * 该接口在[查询批量消息推送和阅读人数](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/batch_message/read_user)查询结果的基础上，增加了批量请求中有效的userid数量以及消息撤回进度数据。
             *
             * 注意事项:;* 该接口返回的数据为查询时刻的快照数据
             */
            getProgress: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/get_progress`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "getProgress"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=batch_message&apiName=read_user&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/batch_message/read_user document }
             *
             * 查询批量消息推送和阅读人数
             *
             * 批量发送消息后，可以通过该接口查询批量消息推送的总人数和阅读人数。
             *
             * 注意事项：;- 只能查询通过[批量发送消息](https://open.feishu.cn/document/ukTMukTMukTM/ucDO1EjL3gTNx4yN4UTM)接口产生的消息;- 该接口返回的数据为查询时刻的快照数据
             */
            readUser: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/read_user`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "readUser")
          },
          /**
           * 群组 - 群公告
           */
          chatAnnouncement: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.announcement&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-announcement/get document }
             *
             * 获取群公告信息
             *
             * 获取会话中的群公告信息，公告信息格式与[云文档](https://open.feishu.cn/document/ukTMukTMukTM/uAzM5YjLwMTO24CMzkjN)格式相同。
             *
             * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 机器人或授权用户必须在群里;- 获取内部群信息时，操作者须与群组在同一租户下
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.announcement&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-announcement/patch document }
             *
             * 更新群公告信息
             *
             * 更新会话中的群公告信息，更新公告信息的格式和更新[云文档](https://open.feishu.cn/document/ukTMukTMukTM/uAzM5YjLwMTO24CMzkjN)格式相同。
             *
             * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 机器人或授权用户必须在群里;- 操作者需要拥有群公告文档的阅读权限;- 获取内部群信息时，操作者须与群组在同一租户下;- 若群开启了 ==仅群主和群管理员可编辑群信息== 配置，群主/群管理员 或 创建群组且具备 ==更新应用所创建群的群信息== 权限的机器人，可更新群公告;- 若群未开启 ==仅群主和群管理员可编辑群信息== 配置，所有成员可以更新群公告
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 群组
           */
          chat: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/create document }
             *
             * 创建群
             *
             * 创建群并设置群头像、群名、群描述等。
             *
             * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 本接口支持在创建群的同时拉用户或机器人进群；如果仅需要拉用户或者机器人入群参考 [将用户或机器人拉入群聊](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/create)接口
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/delete document }
             *
             * 解散群
             *
             * 解散群组。
             *
             * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 如果使用tenant_access_token，需要机器人符合以下任一情况才可解散群：;    - 机器人是群主;    - 机器人是群的创建者且具备==更新应用所创建群的群信息==权限;- 如果使用user_access_token，需要对应的用户是群主才可解散群
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/get document }
             *
             * 获取群信息
             *
             * 获取群名称、群描述、群头像、群主 ID 等群基本信息。
             *
             * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability); - 机器人或授权用户必须在群里（否则只会返回群名称、群头像等基本信息）;- 获取内部群信息时，操作者须与群组在同一租户下
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat&apiName=link&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/link document }
             *
             * 获取群分享链接
             *
             * 获取指定群的分享链接。
             *
             * 注意事项:;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability); - access_token所对应的 **机器人** 或 **授权用户** 必须在`chat_id`参数指定的群组中;- 单聊、密聊、团队群不支持分享群链接;- 当Bot被停用或Bot退出群组时，Bot生成的群链接也将停用;- 当群聊开启了 ==仅群主和群管理员可添加群成员/分享群== 设置时，仅**群主**和**群管理员**可以获取群分享链接;- 获取内部群分享链接时，操作者须与群组在同一租户下
             */
            link: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/link`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "link"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/list document }
             *
             * 获取用户或机器人所在的群列表
             *
             * 获取用户或者机器人所在群列表。
             *
             * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 请注意区分本接口和[获取群信息](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/get)的请求 URL;- 获取的群列表不包含P2P单聊
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/search`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "searchWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat&apiName=search&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/search document }
             *
             * 搜索对用户或机器人可见的群列表
             *
             * 搜索对用户或机器人可见的群列表，包括：用户或机器人所在的群、对用户或机器人公开的群。;搜索可获得的群信息包括：群ID（chat_id）、群名称、群描述等。
             *
             * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/search`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/update document }
             *
             * 更新群信息
             *
             * 更新群头像、群名称、群描述、群配置、转让群主等。
             *
             * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 对于群主/群管理员 或 创建群组且具备 ==更新应用所创建群的群信息== 权限的机器人，可更新所有信息;- 对于不满足上述权限条件的群成员或机器人：;    - 若未开启 ==仅群主和群管理员可编辑群信息== 配置，仅可更新群头像、群名称、群描述、群国际化名称信息;    - 若开启了 ==仅群主和群管理员可编辑群信息== 配置，任何群信息都不能修改;- 如果同时更新 ==邀请用户或机器人入群权限== 和 ==群分享权限== 这两项设置需要满足以下条件：;    - 若未开启 ==仅群主和管理员可以邀请用户或机器人入群==，需要设置 ==群分享权限== 为 ==允许分享==;    - 若开启了 ==仅群主和管理员可以邀请用户或机器人入群==，需要设置 ==群分享权限== 为 ==不允许分享==
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 群组 - 群成员
           */
          chatManagers: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.managers&apiName=add_managers&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-managers/add_managers document }
             *
             * 指定群管理员
             *
             * 将用户或机器人指定为群管理员。
             *
             * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 仅有群主可以指定群管理员
             */
            addManagers: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/add_managers`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "addManagers"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.managers&apiName=delete_managers&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-managers/delete_managers document }
             *
             * 删除群管理员
             *
             * 删除指定的群管理员（用户或机器人）。
             *
             * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 仅有群主可以删除群管理员
             */
            deleteManagers: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/delete_managers`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "deleteManagers")
          },
          /**
           * 群组 - 群成员
           */
          chatMembers: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.members&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/create document }
             *
             * 将用户或机器人拉入群聊
             *
             * 将用户或机器人拉入群聊。
             *
             * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability); - 如需拉用户进群，需要机器人对用户有[可用性](https://open.feishu.cn/document/home/introduction-to-scope-and-authorization/availability); - 机器人或授权用户必须在群组中;- 外部租户不能被加入到内部群中;- 操作内部群时，操作者须与群组在同一租户下; - 在开启 ==仅群主和群管理员可添加群成员== 的设置时，仅有群主/管理员 或 创建群组且具备 ==更新应用所创建群的群信息== 权限的机器人，可以拉用户或者机器人进群; - 在未开启 ==仅群主和群管理员可添加群成员== 的设置时，所有群成员都可以拉用户或机器人进群
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.members&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/delete document }
             *
             * 将用户或机器人移出群聊
             *
             * 将用户或机器人移出群聊。
             *
             * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 用户或机器人在任何条件下均可移除自己出群（即主动退群）;- 仅有群主/管理员 或 创建群组并且具备 ==更新应用所创建群的群信息== 权限的机器人，可以移除其他用户或者机器人;- 每次请求，最多移除50个用户或者5个机器人;- 操作内部群时，操作者须与群组在同一租户下
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            getWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "getWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.members&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/get document }
             *
             * 获取群成员列表
             *
             * 获取用户/机器人所在群的群成员列表。
             *
             * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability); - 机器人或授权用户必须在群组中; - 该接口不会返回群内的机器人成员; - 由于返回的群成员列表会过滤掉机器人成员，因此返回的群成员个数可能会小于指定的page_size; - 如果有同一时间加入群的群成员，会一次性返回，这会导致返回的群成员个数可能会大于指定的page_size;- 获取内部群信息时，操作者须与群组在同一租户下
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.members&apiName=is_in_chat&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/is_in_chat document }
             *
             * 判断用户或机器人是否在群里
             *
             * 根据使用的access_token判断对应的用户或者机器人是否在群里。
             *
             * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 获取内部群信息时，操作者须与群组在同一租户下
             */
            isInChat: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/is_in_chat`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "isInChat"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.members&apiName=me_join&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/me_join document }
             *
             * 用户或机器人主动加入群聊
             *
             * 用户或机器人主动加入群聊。
             *
             * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 目前仅支持加入公开群;- 操作内部群时，操作者须与群组在同一租户下
             */
            meJoin: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/me_join`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "meJoin")
          },
          /**
           * chat.menu_item
           */
          chatMenuItem: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.menu_item&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_item/patch document }
             *
             * 修改群菜单元信息
             *
             * 修改某个一级菜单或者二级菜单的元信息。
             *
             * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 机器人必须在群里。
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_items/:menu_item_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 群组 - 群菜单
           */
          chatMenuTree: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.menu_tree&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_tree/create document }
             *
             * 添加群菜单
             *
             * 向群内添加群菜单。
             *
             * 注意事项：;- 该API是向群内追加菜单，群内原来存在的菜单并不会被覆盖。操作API后，将返回群内所有菜单。;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 机器人必须在群里。;- 一个群内，一级菜单最多有3个，每个一级菜单最多有5个二级菜单。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.menu_tree&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_tree/delete document }
             *
             * 删除群菜单。
             *
             * 删除群内菜单。
             *
             * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 机器人必须在群里。;- 操作API后，将返回群内所有菜单。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.menu_tree&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_tree/get document }
             *
             * 获取群内菜单
             *
             * 通过群ID获取群内菜单。
             *
             * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 机器人必须在群里。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.menu_tree&apiName=sort&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_tree/sort document }
             *
             * 排序群菜单
             *
             * 给一个群内的一级菜单排序。
             *
             * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 机器人必须在群里。;- 操作API后，将返回群内所有菜单。
             */
            sort: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree/sort`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "sort")
          },
          /**
           * chat.moderation
           */
          chatModeration: {
            getWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "getWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.moderation&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-moderation/get document }
             *
             * 获取群成员发言权限
             *
             * 获取群发言模式、可发言用户名单等
             *
             * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability); - 机器人 或 授权用户 必须在群里
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.moderation&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-moderation/update document }
             *
             * 更新群发言权限
             *
             * 更新群组的发言权限设置，可设置为全员可发言、仅管理员可发言  或 指定用户可发言。
             *
             * 注意事项：; - 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 若以用户授权调用接口，**当授权用户是群主**时，可更新群发言权限;- 若以租户授权调用接口(即以机器人身份调用接口)，当**机器人是群主** 或者 **机器人是群组创建者、具备==更新应用所创建群的群信息==权限且仍在群内**时，可更新群发言权限
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 群组 - 会话标签页
           */
          chatTab: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.tab&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-tab/create document }
             *
             * 添加会话标签页
             *
             * 添加自定义会话标签页。
             *
             * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 机器人或授权用户必须在群里;- 只允许添加类型为`doc`和`url`的会话标签页;- 添加doc类型时，操作者（access token对应的身份）需要拥有对应文档的权限;- tab_config字段当前只对`url`类型的会话标签页生效;- 在开启 ==仅群主和管理员可管理标签页== 的设置时，仅群主和群管理员可以添加会话标签页;- 操作内部群时，操作者须与群组在同一租户下
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.tab&apiName=delete_tabs&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-tab/delete_tabs document }
             *
             * 删除会话标签页
             *
             * 删除会话标签页。
             *
             * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 机器人或授权用户必须在群里;- 只允许删除类型为`doc`和`url`的会话标签页;- 在开启 ==仅群主和管理员可管理标签页== 的设置时，仅群主和群管理员可以删除会话标签页;- 操作内部群时，操作者须与群组在同一租户下
             */
            deleteTabs: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/delete_tabs`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "deleteTabs"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.tab&apiName=list_tabs&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-tab/list_tabs document }
             *
             * 拉取会话标签页
             *
             * 拉取会话标签页。
             *
             * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 机器人或授权用户必须在群里;- 操作内部群时，操作者须与群组在同一租户下
             */
            listTabs: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/list_tabs`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "listTabs"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.tab&apiName=sort_tabs&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-tab/sort_tabs document }
             *
             * 会话标签页排序
             *
             * 会话标签页排序。
             *
             * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 机器人或授权用户必须在群里;- 消息标签页强制固定为第一顺位，不参与排序，但是请求体中必须包含该标签页的Tab ID;- 操作内部群时，操作者须与群组在同一租户下
             */
            sortTabs: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/sort_tabs`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "sortTabs"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.tab&apiName=update_tabs&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-tab/update_tabs document }
             *
             * 更新会话标签页
             *
             * 更新会话标签页
             *
             * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 机器人或授权用户必须在群里;- 只允许更新类型为`doc`和`url`的会话标签页;- 更新doc类型时，操作者（access token对应的身份）需要拥有对应文档的权限;- 在开启 ==仅群主和管理员可管理标签页== 的设置时，仅群主和群管理员可以更新会话标签页;- 操作内部群时，操作者须与群组在同一租户下
             */
            updateTabs: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/update_tabs`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "updateTabs")
          },
          /**
           * chat.top_notice
           */
          chatTopNotice: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.top_notice&apiName=delete_top_notice&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-top_notice/delete_top_notice document }
             *
             * 撤销群置顶
             *
             * 撤销会话中的置顶。
             *
             * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability); - 机器人或授权用户必须在群组中;- 撤销内部群置顶时，操作者须与群组在同一租户下
             */
            deleteTopNotice: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/delete_top_notice`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "deleteTopNotice"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.top_notice&apiName=put_top_notice&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-top_notice/put_top_notice document }
             *
             * 更新群置顶
             *
             * 更新会话中的群置顶信息，可以将群中的某一条消息，或者群公告置顶显示。
             *
             * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability); - 机器人或授权用户必须在群组中;- 更新内部群置顶时，操作者须与群组在同一租户下
             */
            putTopNotice: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/put_top_notice`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "putTopNotice")
          },
          /**
           * 消息 - 文件信息
           */
          file: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=file&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/file/create document }
             *
             * 上传文件
             *
             * 上传文件，可以上传视频，音频和常见的文件类型。
             *
             * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 文件大小不得超过30M，且不允许上传空文件
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/files`, path2),
                method: "POST",
                data,
                params,
                headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              return (res === null || res === void 0 ? void 0 : res.data) || null;
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=file&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/file/get document }
             *
             * 下载文件
             *
             * 下载文件接口，只能下载应用自己上传的文件。
             *
             * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 只能下载机器人自己上传的文件;- 下载用户发送的资源，请使用[获取消息中的资源文件](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-resource/get)接口;- 下载的资源大小不能超过100M;- 如果需要Content-Disposition header，发起请求的时候需要在header中设置Content-Type为application/json
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/files/:file_key`, path2),
                method: "GET",
                headers,
                data,
                params,
                responseType: "stream",
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                $return_headers: true
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              const checkIsReadable = /* @__PURE__ */ __name(() => {
                const consumedError = "The stream has already been consumed";
                if (!res.data.readable) {
                  this.logger.error(consumedError);
                  throw new Error(consumedError);
                }
              }, "checkIsReadable");
              return {
                writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                  checkIsReadable();
                  return new Promise((resolve, reject) => {
                    const writableStream = fs__default["default"].createWriteStream(filePath);
                    writableStream.on("finish", () => {
                      resolve(filePath);
                    });
                    writableStream.on("error", (e) => {
                      reject(e);
                    });
                    res.data.pipe(writableStream);
                  });
                }), "writeFile"),
                getReadableStream: /* @__PURE__ */ __name(() => {
                  checkIsReadable();
                  return res.data;
                }, "getReadableStream"),
                headers: res.headers
              };
            }), "get")
          },
          /**
           * 消息 - 图片信息
           */
          image: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=image&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/image/create document }
             *
             * 上传图片
             *
             * 上传图片接口，支持上传 JPEG、PNG、WEBP、GIF、TIFF、BMP、ICO格式图片。
             *
             * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 图片大小不得超过10M，且不支持上传大小为0的图片
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/images`, path2),
                method: "POST",
                data,
                params,
                headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              return (res === null || res === void 0 ? void 0 : res.data) || null;
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=image&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/image/get document }
             *
             * 下载图片
             *
             * 下载图片资源，只能下载当前应用所上传且图片类型为message的图片。
             *
             * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 只能下载机器人自己上传且图片类型为message的图片，avatar类型暂不支持下载;- 下载用户发送的资源，请使用[获取消息中的资源文件](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-resource/get)接口
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/images/:image_key`, path2),
                method: "GET",
                headers,
                data,
                params,
                responseType: "stream",
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                $return_headers: true
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              const checkIsReadable = /* @__PURE__ */ __name(() => {
                const consumedError = "The stream has already been consumed";
                if (!res.data.readable) {
                  this.logger.error(consumedError);
                  throw new Error(consumedError);
                }
              }, "checkIsReadable");
              return {
                writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                  checkIsReadable();
                  return new Promise((resolve, reject) => {
                    const writableStream = fs__default["default"].createWriteStream(filePath);
                    writableStream.on("finish", () => {
                      resolve(filePath);
                    });
                    writableStream.on("error", (e) => {
                      reject(e);
                    });
                    res.data.pipe(writableStream);
                  });
                }), "writeFile"),
                getReadableStream: /* @__PURE__ */ __name(() => {
                  checkIsReadable();
                  return res.data;
                }, "getReadableStream"),
                headers: res.headers
              };
            }), "get")
          },
          /**
           * 消息
           */
          message: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/create document }
             *
             * 发送消息
             *
             * 给指定用户或者会话发送消息，支持文本、富文本、可交互的[消息卡片](https://open.feishu.cn/document/ukTMukTMukTM/uczM3QjL3MzN04yNzcDN)、群名片、个人名片、图片、视频、音频、文件、表情包。
             *
             * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 给用户发送消息，需要机器人对用户有[可用性](https://open.feishu.cn/document/home/introduction-to-scope-and-authorization/availability);- 给群组发送消息，需要机器人在群组中
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/messages`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/delete document }
             *
             * 撤回消息
             *
             * 机器人撤回机器人自己发送的消息或群主撤回群内消息。
             *
             * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ，撤回消息时机器人仍需要在会话内;- 机器人可以撤回单聊和群组内，自己发送 且 发送时间不超过1天(24小时)的消息;- 若机器人要撤回群内他人发送的消息，则机器人必须是该群的群主、管理员 或者 创建者，且消息发送时间不超过1年;- 无法撤回通过「[批量发送消息](https://open.feishu.cn/document/ukTMukTMukTM/ucDO1EjL3gTNx4yN4UTM)」接口发送的消息
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=forward&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=forward&project=im&resource=message&version=v1 document }
             *
             * 转发一条消息
             */
            forward: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/forward`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "forward"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/get document }
             *
             * 获取指定消息的内容
             *
             * 通过 message_id 查询消息内容。
             *
             * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 机器人必须在群组中
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/messages`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/list document }
             *
             * 获取会话历史消息
             *
             * 获取会话（包括单聊、群组）的历史消息（聊天记录）。
             *
             * - 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 获取消息时，机器人必须在群组中
             *
             * 接口级别权限默认只能获取单聊（p2p）消息，如果需要获取群组（group）消息，应用还必须拥有 **==获取群组中所有消息==** 权限
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/messages`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=merge_forward&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=merge_forward&project=im&resource=message&version=v1 document }
             *
             * 合并转发多条消息
             */
            mergeForward: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/merge_forward`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "mergeForward"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/patch document }
             *
             * 更新应用发送的消息
             *
             * 更新应用已发送的消息卡片内容。
             *
             * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 若以user_access_token更新消息，该操作用户必须是卡片消息的发送者;- 仅支持对所有人更新**未撤回**的[「共享卡片」](ukTMukTMukTM/uAjNwUjLwYDM14CM2ATN)消息，需在卡片的config属性中，显式声明 =="update_multi":true==。 ;- **不支持更新批量消息**;- 文本消息请求体最大不能超过150KB；卡片及富文本消息请求体最大不能超过30KB;- 仅支持修改14天内发送的消息;- 单条消息更新频控为**5QPS**
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=push_follow_up&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=push_follow_up&project=im&resource=message&version=v1 document }
             */
            pushFollowUp: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/push_follow_up`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "pushFollowUp"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=read_users&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/read_users document }
             *
             * 查询消息已读信息
             *
             * 查询消息的已读信息。
             *
             * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 只能查询机器人自己发送，且发送时间不超过7天的消息;- 查询消息已读信息时机器人仍需要在会话内;- 本接口不支持查询批量消息
             */
            readUsers: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/read_users`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "readUsers"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=reply&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/reply document }
             *
             * 回复消息
             *
             * 回复指定消息，支持文本、富文本、卡片、群名片、个人名片、图片、视频、文件等多种消息类型。
             *
             * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 回复私聊消息，需要机器人对用户有[可用性](https://open.feishu.cn/document/home/introduction-to-scope-and-authorization/availability);- 回复群组消息，需要机器人在群中
             */
            reply: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "reply"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=im&resource=message&version=v1 document }
             *
             * 编辑已发送的消息内容，当前仅支持编辑文本和富文本消息。
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=urgent_app&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/urgent_app document }
             *
             * 发送应用内加急
             *
             * 对指定消息进行应用内加急。
             *
             * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 不支持加急批量消息;- 只能加急机器人自己发送的消息;- 加急时机器人需要在加急消息所在的群中;- 调用本接口需要用户已阅读加急的消息才可以继续加急（用户未读的加急上限为200条）
             *
             * 特别说明：;- 默认接口限流为50 QPS，请谨慎调用
             */
            urgentApp: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_app`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "urgentApp"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=urgent_phone&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/urgent_phone document }
             *
             * 发送电话加急
             *
             * 对指定消息进行应用内加急与电话加急。
             *
             * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 只能加急机器人自己发送的消息;- 加急时机器人需要在加急消息所在的群组中;- 需要用户阅读已加急的消息才可以继续加急（用户未读的加急上限为200条）
             *
             * 特别说明：;- 通过接口产生的电话加急将消耗企业的加急额度，请慎重调用;- 通过[租户管理后台](https://admin.feishu.cn/)-费用中心-短信/电话加急 可以查看当前额度;- 默认接口限流为50 QPS，请谨慎调用
             */
            urgentPhone: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_phone`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "urgentPhone"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=urgent_sms&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/urgent_sms document }
             *
             * 发送短信加急
             *
             * 对指定消息进行应用内加急与短信加急。
             *
             * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 只能加急机器人自己发送的消息;- 加急时机器人仍需要在加急消息所在的群组中;- 调用本接口需要用户已阅读加急的消息才可以继续加急（用户未读的加急上限为200条）
             *
             * 特别说明：;- 通过接口产生的短信加急将消耗企业的加急额度，请慎重调用;- 通过[租户管理后台](https://admin.feishu.cn/)-费用中心-短信/电话加急 可以查看当前额度;- 默认接口限流为50 QPS，请谨慎调用
             */
            urgentSms: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_sms`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "urgentSms"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/create document }
             *
             * 通过模版消息卡片发送消息
             *
             * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 给用户发送消息，需要机器人对用户有[可用性](https://open.feishu.cn/document/home/introduction-to-scope-and-authorization/availability);- 给群组发送消息，需要机器人在群组中
             */
            createByCard: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const { template_id, template_variable } = data, rest = __rest(data, ["template_id", "template_variable"]);
              const targetData = Object.assign({ msg_type: "interactive", content: JSON.stringify({
                type: "template",
                data: {
                  template_id,
                  template_variable
                }
              }) }, rest);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/messages`, path2),
                method: "POST",
                data: targetData,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "createByCard"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=reply&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/reply document }
             *
             * 通过模版消息卡片回复消息
             *
             * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 回复私聊消息，需要机器人对用户有[可用性](https://open.feishu.cn/document/home/introduction-to-scope-and-authorization/availability);- 回复群组消息，需要机器人在群中
             */
            replyByCard: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const { template_id, template_variable } = data, rest = __rest(data, ["template_id", "template_variable"]);
              const targetData = Object.assign({ msg_type: "interactive", content: JSON.stringify({
                type: "template",
                data: {
                  template_id,
                  template_variable
                }
              }) }, rest);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`, path2),
                method: "POST",
                data: targetData,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "replyByCard"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=im&resource=message&version=v1 document }
             *
             * 通过模版消息卡片
             */
            updateByCard: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const { template_id, template_variable } = data, rest = __rest(data, ["template_id", "template_variable"]);
              const targetData = Object.assign({ msg_type: "interactive", content: JSON.stringify({
                type: "template",
                data: {
                  template_id,
                  template_variable
                }
              }) }, rest);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id`, path2),
                method: "PUT",
                data: targetData,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "updateByCard")
          },
          /**
           * 消息 - 表情回复
           */
          messageReaction: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=message.reaction&apiName=batch_query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_query&project=im&resource=message.reaction&version=v1 document }
             *
             * 批量获取消息表情
             */
            batchQuery: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/reactions/batch_query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchQuery"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=message.reaction&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-reaction/create document }
             *
             * 添加消息表情回复
             *
             * 给指定消息添加指定类型的表情回复（reaction即表情回复，本文档统一用“reaction”代称）。
             *
             * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 待添加reaction的消息要真实存在，不能被撤回;- 给消息添加reaction，需要reaction的发送方（机器人或者用户）在消息所在的会话内
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=message.reaction&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-reaction/delete document }
             *
             * 删除消息表情回复
             *
             * 删除指定消息的表情回复（reaction即表情回复，本文档统一用“reaction”代称）。
             *
             * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 只能删除真实存在的reaction，并且删除reaction请求的操作者必须是reaction的原始添加者
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions/:reaction_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=message.reaction&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-reaction/list document }
             *
             * 获取消息表情回复
             *
             * 获取指定消息的特定类型表情回复列表（reaction即表情回复，本文档统一用“reaction”代称）。
             *
             * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 待获取reaction信息的消息要真实存在，不能被撤回;- 获取消息的reaction，需要request的授权主体（机器人或者用户）在消息所在的会话内
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * message.resource
           */
          messageResource: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=message.resource&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-resource/get document }
             *
             * 获取消息中的资源文件
             *
             * 获取消息中的资源文件，包括音频，视频，图片和文件，**暂不支持表情包资源下载**。当前仅支持 100M 以内的资源文件的下载。
             *
             * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 机器人和消息需要在同一会话中;- 暂不支持获取合并转发消息中的子消息的资源文件
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/resources/:file_key`, path2),
                method: "GET",
                headers,
                data,
                params,
                responseType: "stream",
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                $return_headers: true
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              const checkIsReadable = /* @__PURE__ */ __name(() => {
                const consumedError = "The stream has already been consumed";
                if (!res.data.readable) {
                  this.logger.error(consumedError);
                  throw new Error(consumedError);
                }
              }, "checkIsReadable");
              return {
                writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                  checkIsReadable();
                  return new Promise((resolve, reject) => {
                    const writableStream = fs__default["default"].createWriteStream(filePath);
                    writableStream.on("finish", () => {
                      resolve(filePath);
                    });
                    writableStream.on("error", (e) => {
                      reject(e);
                    });
                    res.data.pipe(writableStream);
                  });
                }), "writeFile"),
                getReadableStream: /* @__PURE__ */ __name(() => {
                  checkIsReadable();
                  return res.data;
                }, "getReadableStream"),
                headers: res.headers
              };
            }), "get")
          },
          /**
           * 消息 - Pin
           */
          pin: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=pin&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/pin/create document }
             *
             * Pin消息
             *
             * Pin一条指定的消息。
             *
             * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- Pin消息时，机器人必须在对应的群组中;- 若消息已经被Pin，返回该Pin的操作信息;- 不能Pin一条对操作者不可见的消息;- 对同一条消息的Pin操作不能超过==5 QPS==
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/pins`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=pin&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/pin/delete document }
             *
             * 移除Pin消息
             *
             * 移除一条指定消息的Pin。
             *
             * 注意事项：;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 移除Pin消息时，机器人必须在对应的群组中;- 若消息未被Pin或已被撤回，返回成功信息;- 不能移除一条对操作者不可见的Pin消息;- 对同一条消息移除Pin的操作不能超过==5 QPS==
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/pins/:message_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/pins`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=pin&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/pin/list document }
             *
             * 获取群内Pin消息
             *
             * 获取所在群内指定时间范围内的所有Pin消息。
             *
             * 注意事项：;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 获取Pin消息时，机器人必须在群组中;- 获取的Pin消息按Pin的创建时间降序排列;- 接口默认限流为==50 QPS==
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/pins`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * thread
           */
          thread: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=im&resource=thread&apiName=forward&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=forward&project=im&resource=thread&version=v1 document }
             *
             * 转发
             */
            forward: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/im/v1/threads/:thread_id/forward`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "forward")
          },
          v1: {
            /**
             * 消息 - 批量消息
             */
            batchMessage: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=batch_message&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/batch_message/delete document }
               *
               * 批量撤回消息
               *
               * 批量撤回通过[批量发送消息](https://open.feishu.cn/document/ukTMukTMukTM/ucDO1EjL3gTNx4yN4UTM)接口发送的消息。
               *
               * 注意事项：;- 应用需要启用[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability) ;- 撤回单条发送的消息请使用[撤回消息](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/delete)接口;- 不支持撤回发出时间超过1天的消息;- 一次调用涉及大量消息，所以为异步接口，会有一定延迟。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=batch_message&apiName=get_progress&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/batch_message/get_progress document }
               *
               * 查询批量消息整体进度
               *
               * 该接口在[查询批量消息推送和阅读人数](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/batch_message/read_user)查询结果的基础上，增加了批量请求中有效的userid数量以及消息撤回进度数据。
               *
               * 注意事项:;* 该接口返回的数据为查询时刻的快照数据
               */
              getProgress: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/get_progress`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "getProgress"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=batch_message&apiName=read_user&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/batch_message/read_user document }
               *
               * 查询批量消息推送和阅读人数
               *
               * 批量发送消息后，可以通过该接口查询批量消息推送的总人数和阅读人数。
               *
               * 注意事项：;- 只能查询通过[批量发送消息](https://open.feishu.cn/document/ukTMukTMukTM/ucDO1EjL3gTNx4yN4UTM)接口产生的消息;- 该接口返回的数据为查询时刻的快照数据
               */
              readUser: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/batch_messages/:batch_message_id/read_user`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "readUser")
            },
            /**
             * 群组 - 群公告
             */
            chatAnnouncement: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.announcement&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-announcement/get document }
               *
               * 获取群公告信息
               *
               * 获取会话中的群公告信息，公告信息格式与[云文档](https://open.feishu.cn/document/ukTMukTMukTM/uAzM5YjLwMTO24CMzkjN)格式相同。
               *
               * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 机器人或授权用户必须在群里;- 获取内部群信息时，操作者须与群组在同一租户下
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.announcement&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-announcement/patch document }
               *
               * 更新群公告信息
               *
               * 更新会话中的群公告信息，更新公告信息的格式和更新[云文档](https://open.feishu.cn/document/ukTMukTMukTM/uAzM5YjLwMTO24CMzkjN)格式相同。
               *
               * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 机器人或授权用户必须在群里;- 操作者需要拥有群公告文档的阅读权限;- 获取内部群信息时，操作者须与群组在同一租户下;- 若群开启了 ==仅群主和群管理员可编辑群信息== 配置，群主/群管理员 或 创建群组且具备 ==更新应用所创建群的群信息== 权限的机器人，可更新群公告;- 若群未开启 ==仅群主和群管理员可编辑群信息== 配置，所有成员可以更新群公告
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/announcement`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 群组
             */
            chat: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/create document }
               *
               * 创建群
               *
               * 创建群并设置群头像、群名、群描述等。
               *
               * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 本接口支持在创建群的同时拉用户或机器人进群；如果仅需要拉用户或者机器人入群参考 [将用户或机器人拉入群聊](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/create)接口
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/delete document }
               *
               * 解散群
               *
               * 解散群组。
               *
               * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 如果使用tenant_access_token，需要机器人符合以下任一情况才可解散群：;    - 机器人是群主;    - 机器人是群的创建者且具备==更新应用所创建群的群信息==权限;- 如果使用user_access_token，需要对应的用户是群主才可解散群
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/get document }
               *
               * 获取群信息
               *
               * 获取群名称、群描述、群头像、群主 ID 等群基本信息。
               *
               * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability); - 机器人或授权用户必须在群里（否则只会返回群名称、群头像等基本信息）;- 获取内部群信息时，操作者须与群组在同一租户下
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat&apiName=link&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/link document }
               *
               * 获取群分享链接
               *
               * 获取指定群的分享链接。
               *
               * 注意事项:;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability); - access_token所对应的 **机器人** 或 **授权用户** 必须在`chat_id`参数指定的群组中;- 单聊、密聊、团队群不支持分享群链接;- 当Bot被停用或Bot退出群组时，Bot生成的群链接也将停用;- 当群聊开启了 ==仅群主和群管理员可添加群成员/分享群== 设置时，仅**群主**和**群管理员**可以获取群分享链接;- 获取内部群分享链接时，操作者须与群组在同一租户下
               */
              link: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/link`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "link"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/im/v1/chats`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/list document }
               *
               * 获取用户或机器人所在的群列表
               *
               * 获取用户或者机器人所在群列表。
               *
               * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 请注意区分本接口和[获取群信息](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/get)的请求 URL;- 获取的群列表不包含P2P单聊
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/search`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/search document }
               *
               * 搜索对用户或机器人可见的群列表
               *
               * 搜索对用户或机器人可见的群列表，包括：用户或机器人所在的群、对用户或机器人公开的群。;搜索可获得的群信息包括：群ID（chat_id）、群名称、群描述等。
               *
               * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/search`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/update document }
               *
               * 更新群信息
               *
               * 更新群头像、群名称、群描述、群配置、转让群主等。
               *
               * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 对于群主/群管理员 或 创建群组且具备 ==更新应用所创建群的群信息== 权限的机器人，可更新所有信息;- 对于不满足上述权限条件的群成员或机器人：;    - 若未开启 ==仅群主和群管理员可编辑群信息== 配置，仅可更新群头像、群名称、群描述、群国际化名称信息;    - 若开启了 ==仅群主和群管理员可编辑群信息== 配置，任何群信息都不能修改;- 如果同时更新 ==邀请用户或机器人入群权限== 和 ==群分享权限== 这两项设置需要满足以下条件：;    - 若未开启 ==仅群主和管理员可以邀请用户或机器人入群==，需要设置 ==群分享权限== 为 ==允许分享==;    - 若开启了 ==仅群主和管理员可以邀请用户或机器人入群==，需要设置 ==群分享权限== 为 ==不允许分享==
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 群组 - 群成员
             */
            chatManagers: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.managers&apiName=add_managers&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-managers/add_managers document }
               *
               * 指定群管理员
               *
               * 将用户或机器人指定为群管理员。
               *
               * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 仅有群主可以指定群管理员
               */
              addManagers: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/add_managers`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "addManagers"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.managers&apiName=delete_managers&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-managers/delete_managers document }
               *
               * 删除群管理员
               *
               * 删除指定的群管理员（用户或机器人）。
               *
               * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 仅有群主可以删除群管理员
               */
              deleteManagers: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/managers/delete_managers`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "deleteManagers")
            },
            /**
             * 群组 - 群成员
             */
            chatMembers: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.members&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/create document }
               *
               * 将用户或机器人拉入群聊
               *
               * 将用户或机器人拉入群聊。
               *
               * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability); - 如需拉用户进群，需要机器人对用户有[可用性](https://open.feishu.cn/document/home/introduction-to-scope-and-authorization/availability); - 机器人或授权用户必须在群组中;- 外部租户不能被加入到内部群中;- 操作内部群时，操作者须与群组在同一租户下; - 在开启 ==仅群主和群管理员可添加群成员== 的设置时，仅有群主/管理员 或 创建群组且具备 ==更新应用所创建群的群信息== 权限的机器人，可以拉用户或者机器人进群; - 在未开启 ==仅群主和群管理员可添加群成员== 的设置时，所有群成员都可以拉用户或机器人进群
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.members&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/delete document }
               *
               * 将用户或机器人移出群聊
               *
               * 将用户或机器人移出群聊。
               *
               * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 用户或机器人在任何条件下均可移除自己出群（即主动退群）;- 仅有群主/管理员 或 创建群组并且具备 ==更新应用所创建群的群信息== 权限的机器人，可以移除其他用户或者机器人;- 每次请求，最多移除50个用户或者5个机器人;- 操作内部群时，操作者须与群组在同一租户下
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              getWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "getWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.members&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/get document }
               *
               * 获取群成员列表
               *
               * 获取用户/机器人所在群的群成员列表。
               *
               * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability); - 机器人或授权用户必须在群组中; - 该接口不会返回群内的机器人成员; - 由于返回的群成员列表会过滤掉机器人成员，因此返回的群成员个数可能会小于指定的page_size; - 如果有同一时间加入群的群成员，会一次性返回，这会导致返回的群成员个数可能会大于指定的page_size;- 获取内部群信息时，操作者须与群组在同一租户下
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/members`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.members&apiName=is_in_chat&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/is_in_chat document }
               *
               * 判断用户或机器人是否在群里
               *
               * 根据使用的access_token判断对应的用户或者机器人是否在群里。
               *
               * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 获取内部群信息时，操作者须与群组在同一租户下
               */
              isInChat: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/is_in_chat`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "isInChat"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.members&apiName=me_join&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/me_join document }
               *
               * 用户或机器人主动加入群聊
               *
               * 用户或机器人主动加入群聊。
               *
               * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 目前仅支持加入公开群;- 操作内部群时，操作者须与群组在同一租户下
               */
              meJoin: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/members/me_join`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "meJoin")
            },
            /**
             * chat.menu_item
             */
            chatMenuItem: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.menu_item&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_item/patch document }
               *
               * 修改群菜单元信息
               *
               * 修改某个一级菜单或者二级菜单的元信息。
               *
               * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 机器人必须在群里。
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_items/:menu_item_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 群组 - 群菜单
             */
            chatMenuTree: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.menu_tree&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_tree/create document }
               *
               * 添加群菜单
               *
               * 向群内添加群菜单。
               *
               * 注意事项：;- 该API是向群内追加菜单，群内原来存在的菜单并不会被覆盖。操作API后，将返回群内所有菜单。;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 机器人必须在群里。;- 一个群内，一级菜单最多有3个，每个一级菜单最多有5个二级菜单。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.menu_tree&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_tree/delete document }
               *
               * 删除群菜单。
               *
               * 删除群内菜单。
               *
               * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 机器人必须在群里。;- 操作API后，将返回群内所有菜单。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.menu_tree&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_tree/get document }
               *
               * 获取群内菜单
               *
               * 通过群ID获取群内菜单。
               *
               * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 机器人必须在群里。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.menu_tree&apiName=sort&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_tree/sort document }
               *
               * 排序群菜单
               *
               * 给一个群内的一级菜单排序。
               *
               * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 机器人必须在群里。;- 操作API后，将返回群内所有菜单。
               */
              sort: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree/sort`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "sort")
            },
            /**
             * chat.moderation
             */
            chatModeration: {
              getWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "getWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.moderation&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-moderation/get document }
               *
               * 获取群成员发言权限
               *
               * 获取群发言模式、可发言用户名单等
               *
               * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability); - 机器人 或 授权用户 必须在群里
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.moderation&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-moderation/update document }
               *
               * 更新群发言权限
               *
               * 更新群组的发言权限设置，可设置为全员可发言、仅管理员可发言  或 指定用户可发言。
               *
               * 注意事项：; - 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 若以用户授权调用接口，**当授权用户是群主**时，可更新群发言权限;- 若以租户授权调用接口(即以机器人身份调用接口)，当**机器人是群主** 或者 **机器人是群组创建者、具备==更新应用所创建群的群信息==权限且仍在群内**时，可更新群发言权限
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/moderation`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 群组 - 会话标签页
             */
            chatTab: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.tab&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-tab/create document }
               *
               * 添加会话标签页
               *
               * 添加自定义会话标签页。
               *
               * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 机器人或授权用户必须在群里;- 只允许添加类型为`doc`和`url`的会话标签页;- 添加doc类型时，操作者（access token对应的身份）需要拥有对应文档的权限;- tab_config字段当前只对`url`类型的会话标签页生效;- 在开启 ==仅群主和管理员可管理标签页== 的设置时，仅群主和群管理员可以添加会话标签页;- 操作内部群时，操作者须与群组在同一租户下
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.tab&apiName=delete_tabs&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-tab/delete_tabs document }
               *
               * 删除会话标签页
               *
               * 删除会话标签页。
               *
               * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 机器人或授权用户必须在群里;- 只允许删除类型为`doc`和`url`的会话标签页;- 在开启 ==仅群主和管理员可管理标签页== 的设置时，仅群主和群管理员可以删除会话标签页;- 操作内部群时，操作者须与群组在同一租户下
               */
              deleteTabs: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/delete_tabs`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "deleteTabs"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.tab&apiName=list_tabs&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-tab/list_tabs document }
               *
               * 拉取会话标签页
               *
               * 拉取会话标签页。
               *
               * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 机器人或授权用户必须在群里;- 操作内部群时，操作者须与群组在同一租户下
               */
              listTabs: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/list_tabs`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "listTabs"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.tab&apiName=sort_tabs&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-tab/sort_tabs document }
               *
               * 会话标签页排序
               *
               * 会话标签页排序。
               *
               * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 机器人或授权用户必须在群里;- 消息标签页强制固定为第一顺位，不参与排序，但是请求体中必须包含该标签页的Tab ID;- 操作内部群时，操作者须与群组在同一租户下
               */
              sortTabs: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/sort_tabs`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "sortTabs"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.tab&apiName=update_tabs&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-tab/update_tabs document }
               *
               * 更新会话标签页
               *
               * 更新会话标签页
               *
               * 注意事项：;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 机器人或授权用户必须在群里;- 只允许更新类型为`doc`和`url`的会话标签页;- 更新doc类型时，操作者（access token对应的身份）需要拥有对应文档的权限;- 在开启 ==仅群主和管理员可管理标签页== 的设置时，仅群主和群管理员可以更新会话标签页;- 操作内部群时，操作者须与群组在同一租户下
               */
              updateTabs: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/chat_tabs/update_tabs`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "updateTabs")
            },
            /**
             * chat.top_notice
             */
            chatTopNotice: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.top_notice&apiName=delete_top_notice&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-top_notice/delete_top_notice document }
               *
               * 撤销群置顶
               *
               * 撤销会话中的置顶。
               *
               * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability); - 机器人或授权用户必须在群组中;- 撤销内部群置顶时，操作者须与群组在同一租户下
               */
              deleteTopNotice: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/delete_top_notice`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "deleteTopNotice"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.top_notice&apiName=put_top_notice&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-top_notice/put_top_notice document }
               *
               * 更新群置顶
               *
               * 更新会话中的群置顶信息，可以将群中的某一条消息，或者群公告置顶显示。
               *
               * 注意事项：; - 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability); - 机器人或授权用户必须在群组中;- 更新内部群置顶时，操作者须与群组在同一租户下
               */
              putTopNotice: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/top_notice/put_top_notice`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "putTopNotice")
            },
            /**
             * 消息 - 文件信息
             */
            file: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=file&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/file/create document }
               *
               * 上传文件
               *
               * 上传文件，可以上传视频，音频和常见的文件类型。
               *
               * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 文件大小不得超过30M，且不允许上传空文件
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/files`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=file&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/file/get document }
               *
               * 下载文件
               *
               * 下载文件接口，只能下载应用自己上传的文件。
               *
               * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 只能下载机器人自己上传的文件;- 下载用户发送的资源，请使用[获取消息中的资源文件](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-resource/get)接口;- 下载的资源大小不能超过100M;- 如果需要Content-Disposition header，发起请求的时候需要在header中设置Content-Type为application/json
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/files/:file_key`, path2),
                  method: "GET",
                  headers,
                  data,
                  params,
                  responseType: "stream",
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                  $return_headers: true
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                const checkIsReadable = /* @__PURE__ */ __name(() => {
                  const consumedError = "The stream has already been consumed";
                  if (!res.data.readable) {
                    this.logger.error(consumedError);
                    throw new Error(consumedError);
                  }
                }, "checkIsReadable");
                return {
                  writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                    checkIsReadable();
                    return new Promise((resolve, reject) => {
                      const writableStream = fs__default["default"].createWriteStream(filePath);
                      writableStream.on("finish", () => {
                        resolve(filePath);
                      });
                      writableStream.on("error", (e) => {
                        reject(e);
                      });
                      res.data.pipe(writableStream);
                    });
                  }), "writeFile"),
                  getReadableStream: /* @__PURE__ */ __name(() => {
                    checkIsReadable();
                    return res.data;
                  }, "getReadableStream"),
                  headers: res.headers
                };
              }), "get")
            },
            /**
             * 消息 - 图片信息
             */
            image: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=image&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/image/create document }
               *
               * 上传图片
               *
               * 上传图片接口，支持上传 JPEG、PNG、WEBP、GIF、TIFF、BMP、ICO格式图片。
               *
               * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 图片大小不得超过10M，且不支持上传大小为0的图片
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/images`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=image&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/image/get document }
               *
               * 下载图片
               *
               * 下载图片资源，只能下载当前应用所上传且图片类型为message的图片。
               *
               * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 只能下载机器人自己上传且图片类型为message的图片，avatar类型暂不支持下载;- 下载用户发送的资源，请使用[获取消息中的资源文件](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-resource/get)接口
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/images/:image_key`, path2),
                  method: "GET",
                  headers,
                  data,
                  params,
                  responseType: "stream",
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                  $return_headers: true
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                const checkIsReadable = /* @__PURE__ */ __name(() => {
                  const consumedError = "The stream has already been consumed";
                  if (!res.data.readable) {
                    this.logger.error(consumedError);
                    throw new Error(consumedError);
                  }
                }, "checkIsReadable");
                return {
                  writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                    checkIsReadable();
                    return new Promise((resolve, reject) => {
                      const writableStream = fs__default["default"].createWriteStream(filePath);
                      writableStream.on("finish", () => {
                        resolve(filePath);
                      });
                      writableStream.on("error", (e) => {
                        reject(e);
                      });
                      res.data.pipe(writableStream);
                    });
                  }), "writeFile"),
                  getReadableStream: /* @__PURE__ */ __name(() => {
                    checkIsReadable();
                    return res.data;
                  }, "getReadableStream"),
                  headers: res.headers
                };
              }), "get")
            },
            /**
             * 消息
             */
            message: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/create document }
               *
               * 发送消息
               *
               * 给指定用户或者会话发送消息，支持文本、富文本、可交互的[消息卡片](https://open.feishu.cn/document/ukTMukTMukTM/uczM3QjL3MzN04yNzcDN)、群名片、个人名片、图片、视频、音频、文件、表情包。
               *
               * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 给用户发送消息，需要机器人对用户有[可用性](https://open.feishu.cn/document/home/introduction-to-scope-and-authorization/availability);- 给群组发送消息，需要机器人在群组中
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/messages`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/delete document }
               *
               * 撤回消息
               *
               * 机器人撤回机器人自己发送的消息或群主撤回群内消息。
               *
               * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ，撤回消息时机器人仍需要在会话内;- 机器人可以撤回单聊和群组内，自己发送 且 发送时间不超过1天(24小时)的消息;- 若机器人要撤回群内他人发送的消息，则机器人必须是该群的群主、管理员 或者 创建者，且消息发送时间不超过1年;- 无法撤回通过「[批量发送消息](https://open.feishu.cn/document/ukTMukTMukTM/ucDO1EjL3gTNx4yN4UTM)」接口发送的消息
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=forward&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=forward&project=im&resource=message&version=v1 document }
               *
               * 转发一条消息
               */
              forward: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/forward`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "forward"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/get document }
               *
               * 获取指定消息的内容
               *
               * 通过 message_id 查询消息内容。
               *
               * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 机器人必须在群组中
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/im/v1/messages`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/list document }
               *
               * 获取会话历史消息
               *
               * 获取会话（包括单聊、群组）的历史消息（聊天记录）。
               *
               * - 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 获取消息时，机器人必须在群组中
               *
               * 接口级别权限默认只能获取单聊（p2p）消息，如果需要获取群组（group）消息，应用还必须拥有 **==获取群组中所有消息==** 权限
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/messages`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=merge_forward&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=merge_forward&project=im&resource=message&version=v1 document }
               *
               * 合并转发多条消息
               */
              mergeForward: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/merge_forward`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "mergeForward"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/patch document }
               *
               * 更新应用发送的消息
               *
               * 更新应用已发送的消息卡片内容。
               *
               * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 若以user_access_token更新消息，该操作用户必须是卡片消息的发送者;- 仅支持对所有人更新**未撤回**的[「共享卡片」](ukTMukTMukTM/uAjNwUjLwYDM14CM2ATN)消息，需在卡片的config属性中，显式声明 =="update_multi":true==。 ;- **不支持更新批量消息**;- 文本消息请求体最大不能超过150KB；卡片及富文本消息请求体最大不能超过30KB;- 仅支持修改14天内发送的消息;- 单条消息更新频控为**5QPS**
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=push_follow_up&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=push_follow_up&project=im&resource=message&version=v1 document }
               */
              pushFollowUp: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/push_follow_up`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "pushFollowUp"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=read_users&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/read_users document }
               *
               * 查询消息已读信息
               *
               * 查询消息的已读信息。
               *
               * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 只能查询机器人自己发送，且发送时间不超过7天的消息;- 查询消息已读信息时机器人仍需要在会话内;- 本接口不支持查询批量消息
               */
              readUsers: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/read_users`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "readUsers"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=reply&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/reply document }
               *
               * 回复消息
               *
               * 回复指定消息，支持文本、富文本、卡片、群名片、个人名片、图片、视频、文件等多种消息类型。
               *
               * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 回复私聊消息，需要机器人对用户有[可用性](https://open.feishu.cn/document/home/introduction-to-scope-and-authorization/availability);- 回复群组消息，需要机器人在群中
               */
              reply: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "reply"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=im&resource=message&version=v1 document }
               *
               * 编辑已发送的消息内容，当前仅支持编辑文本和富文本消息。
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=urgent_app&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/urgent_app document }
               *
               * 发送应用内加急
               *
               * 对指定消息进行应用内加急。
               *
               * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 不支持加急批量消息;- 只能加急机器人自己发送的消息;- 加急时机器人需要在加急消息所在的群中;- 调用本接口需要用户已阅读加急的消息才可以继续加急（用户未读的加急上限为200条）
               *
               * 特别说明：;- 默认接口限流为50 QPS，请谨慎调用
               */
              urgentApp: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_app`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "urgentApp"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=urgent_phone&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/urgent_phone document }
               *
               * 发送电话加急
               *
               * 对指定消息进行应用内加急与电话加急。
               *
               * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 只能加急机器人自己发送的消息;- 加急时机器人需要在加急消息所在的群组中;- 需要用户阅读已加急的消息才可以继续加急（用户未读的加急上限为200条）
               *
               * 特别说明：;- 通过接口产生的电话加急将消耗企业的加急额度，请慎重调用;- 通过[租户管理后台](https://admin.feishu.cn/)-费用中心-短信/电话加急 可以查看当前额度;- 默认接口限流为50 QPS，请谨慎调用
               */
              urgentPhone: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_phone`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "urgentPhone"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=urgent_sms&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/urgent_sms document }
               *
               * 发送短信加急
               *
               * 对指定消息进行应用内加急与短信加急。
               *
               * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 只能加急机器人自己发送的消息;- 加急时机器人仍需要在加急消息所在的群组中;- 调用本接口需要用户已阅读加急的消息才可以继续加急（用户未读的加急上限为200条）
               *
               * 特别说明：;- 通过接口产生的短信加急将消耗企业的加急额度，请慎重调用;- 通过[租户管理后台](https://admin.feishu.cn/)-费用中心-短信/电话加急 可以查看当前额度;- 默认接口限流为50 QPS，请谨慎调用
               */
              urgentSms: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/urgent_sms`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "urgentSms"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/create document }
               *
               * 通过模版消息卡片发送消息
               *
               * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 给用户发送消息，需要机器人对用户有[可用性](https://open.feishu.cn/document/home/introduction-to-scope-and-authorization/availability);- 给群组发送消息，需要机器人在群组中
               */
              createByCard: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const { template_id, template_variable } = data, rest = __rest(data, ["template_id", "template_variable"]);
                const targetData = Object.assign({ msg_type: "interactive", content: JSON.stringify({
                  type: "template",
                  data: {
                    template_id,
                    template_variable
                  }
                }) }, rest);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/messages`, path2),
                  method: "POST",
                  data: targetData,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "createByCard"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=reply&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/reply document }
               *
               * 通过模版消息卡片回复消息
               *
               * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 回复私聊消息，需要机器人对用户有[可用性](https://open.feishu.cn/document/home/introduction-to-scope-and-authorization/availability);- 回复群组消息，需要机器人在群中
               */
              replyByCard: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const { template_id, template_variable } = data, rest = __rest(data, ["template_id", "template_variable"]);
                const targetData = Object.assign({ msg_type: "interactive", content: JSON.stringify({
                  type: "template",
                  data: {
                    template_id,
                    template_variable
                  }
                }) }, rest);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`, path2),
                  method: "POST",
                  data: targetData,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "replyByCard"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=im&resource=message&version=v1 document }
               *
               * 通过模版消息卡片
               */
              updateByCard: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const { template_id, template_variable } = data, rest = __rest(data, ["template_id", "template_variable"]);
                const targetData = Object.assign({ msg_type: "interactive", content: JSON.stringify({
                  type: "template",
                  data: {
                    template_id,
                    template_variable
                  }
                }) }, rest);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id`, path2),
                  method: "PUT",
                  data: targetData,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "updateByCard")
            },
            /**
             * 消息 - 表情回复
             */
            messageReaction: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=message.reaction&apiName=batch_query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_query&project=im&resource=message.reaction&version=v1 document }
               *
               * 批量获取消息表情
               */
              batchQuery: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/reactions/batch_query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchQuery"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=message.reaction&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-reaction/create document }
               *
               * 添加消息表情回复
               *
               * 给指定消息添加指定类型的表情回复（reaction即表情回复，本文档统一用“reaction”代称）。
               *
               * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 待添加reaction的消息要真实存在，不能被撤回;- 给消息添加reaction，需要reaction的发送方（机器人或者用户）在消息所在的会话内
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=message.reaction&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-reaction/delete document }
               *
               * 删除消息表情回复
               *
               * 删除指定消息的表情回复（reaction即表情回复，本文档统一用“reaction”代称）。
               *
               * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 只能删除真实存在的reaction，并且删除reaction请求的操作者必须是reaction的原始添加者
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions/:reaction_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=message.reaction&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-reaction/list document }
               *
               * 获取消息表情回复
               *
               * 获取指定消息的特定类型表情回复列表（reaction即表情回复，本文档统一用“reaction”代称）。
               *
               * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 待获取reaction信息的消息要真实存在，不能被撤回;- 获取消息的reaction，需要request的授权主体（机器人或者用户）在消息所在的会话内
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/reactions`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * message.resource
             */
            messageResource: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=message.resource&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-resource/get document }
               *
               * 获取消息中的资源文件
               *
               * 获取消息中的资源文件，包括音频，视频，图片和文件，**暂不支持表情包资源下载**。当前仅支持 100M 以内的资源文件的下载。
               *
               * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 机器人和消息需要在同一会话中;- 暂不支持获取合并转发消息中的子消息的资源文件
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/resources/:file_key`, path2),
                  method: "GET",
                  headers,
                  data,
                  params,
                  responseType: "stream",
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                  $return_headers: true
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                const checkIsReadable = /* @__PURE__ */ __name(() => {
                  const consumedError = "The stream has already been consumed";
                  if (!res.data.readable) {
                    this.logger.error(consumedError);
                    throw new Error(consumedError);
                  }
                }, "checkIsReadable");
                return {
                  writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                    checkIsReadable();
                    return new Promise((resolve, reject) => {
                      const writableStream = fs__default["default"].createWriteStream(filePath);
                      writableStream.on("finish", () => {
                        resolve(filePath);
                      });
                      writableStream.on("error", (e) => {
                        reject(e);
                      });
                      res.data.pipe(writableStream);
                    });
                  }), "writeFile"),
                  getReadableStream: /* @__PURE__ */ __name(() => {
                    checkIsReadable();
                    return res.data;
                  }, "getReadableStream"),
                  headers: res.headers
                };
              }), "get")
            },
            /**
             * 消息 - Pin
             */
            pin: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=pin&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/pin/create document }
               *
               * Pin消息
               *
               * Pin一条指定的消息。
               *
               * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- Pin消息时，机器人必须在对应的群组中;- 若消息已经被Pin，返回该Pin的操作信息;- 不能Pin一条对操作者不可见的消息;- 对同一条消息的Pin操作不能超过==5 QPS==
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/pins`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=pin&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/pin/delete document }
               *
               * 移除Pin消息
               *
               * 移除一条指定消息的Pin。
               *
               * 注意事项：;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 移除Pin消息时，机器人必须在对应的群组中;- 若消息未被Pin或已被撤回，返回成功信息;- 不能移除一条对操作者不可见的Pin消息;- 对同一条消息移除Pin的操作不能超过==5 QPS==
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/pins/:message_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/im/v1/pins`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=pin&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/pin/list document }
               *
               * 获取群内Pin消息
               *
               * 获取所在群内指定时间范围内的所有Pin消息。
               *
               * 注意事项：;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)  ;- 获取Pin消息时，机器人必须在群组中;- 获取的Pin消息按Pin的创建时间降序排列;- 接口默认限流为==50 QPS==
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/pins`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * thread
             */
            thread: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=thread&apiName=forward&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=forward&project=im&resource=thread&version=v1 document }
               *
               * 转发
               */
              forward: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v1/threads/:thread_id/forward`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "forward")
            }
          },
          v2: {
            /**
             * app_feed_card.batch
             */
            appFeedCardBatch: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=app_feed_card.batch&apiName=delete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=im&resource=app_feed_card.batch&version=v2 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v2/app_feed_card/batch`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=app_feed_card.batch&apiName=update&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=im&resource=app_feed_card.batch&version=v2 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v2/app_feed_card/batch`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * app_feed_card
             */
            appFeedCard: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=app_feed_card&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=im&resource=app_feed_card&version=v2 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v2/app_feed_card`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create")
            },
            /**
             * biz_entity_tag_relation
             */
            bizEntityTagRelation: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=biz_entity_tag_relation&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=im&resource=biz_entity_tag_relation&version=v2 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v2/biz_entity_tag_relation`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=biz_entity_tag_relation&apiName=get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=im&resource=biz_entity_tag_relation&version=v2 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v2/biz_entity_tag_relation`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=biz_entity_tag_relation&apiName=update&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=im&resource=biz_entity_tag_relation&version=v2 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v2/biz_entity_tag_relation`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * chat_button
             */
            chatButton: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat_button&apiName=update&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=im&resource=chat_button&version=v2 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v2/chat_button`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * feed_card
             */
            feedCard: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=feed_card&apiName=bot_time_sentive&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=bot_time_sentive&project=im&resource=feed_card&version=v2 document }
               */
              botTimeSentive: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v2/feed_cards/bot_time_sentive`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "botTimeSentive"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=feed_card&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=im&resource=feed_card&version=v2 document }
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v2/feed_cards/:feed_card_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * tag
             */
            tag: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=tag&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=im&resource=tag&version=v2 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v2/tags`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=tag&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=im&resource=tag&version=v2 document }
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v2/tags/:tag_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * url_preview
             */
            urlPreview: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=im&resource=url_preview&apiName=batch_update&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_update&project=im&resource=url_preview&version=v2 document }
               */
              batchUpdate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/im/v2/url_previews/batch_update`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchUpdate")
            }
          }
        };
      }
    };
    var Client$u = class extends Client$v {
      static {
        __name(this, "Client$u");
      }
      constructor() {
        super(...arguments);
        this.lingo = {
          v1: {
            /**
             * classification
             */
            classification: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/lingo/v1/classifications`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=classification&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=lingo&resource=classification&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/lingo/v1/classifications`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * draft
             */
            draft: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=draft&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=lingo&resource=draft&version=v1 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/lingo/v1/drafts`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=draft&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=lingo&resource=draft&version=v1 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/lingo/v1/drafts/:draft_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * entity
             */
            entity: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=entity&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=lingo&resource=entity&version=v1 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=entity&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=lingo&resource=entity&version=v1 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=entity&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=lingo&resource=entity&version=v1 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=entity&apiName=highlight&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=highlight&project=lingo&resource=entity&version=v1 document }
               */
              highlight: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities/highlight`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "highlight"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=entity&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=lingo&resource=entity&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=entity&apiName=match&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=match&project=lingo&resource=entity&version=v1 document }
               */
              match: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities/match`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "match"),
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=entity&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=lingo&resource=entity&version=v1 document }
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=entity&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=lingo&resource=entity&version=v1 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * file
             */
            file: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=file&apiName=download&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=download&project=lingo&resource=file&version=v1 document }
               */
              download: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/lingo/v1/files/:file_token/download`, path2),
                  method: "GET",
                  headers,
                  data,
                  params,
                  responseType: "stream",
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                  $return_headers: true
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                const checkIsReadable = /* @__PURE__ */ __name(() => {
                  const consumedError = "The stream has already been consumed";
                  if (!res.data.readable) {
                    this.logger.error(consumedError);
                    throw new Error(consumedError);
                  }
                }, "checkIsReadable");
                return {
                  writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                    checkIsReadable();
                    return new Promise((resolve, reject) => {
                      const writableStream = fs__default["default"].createWriteStream(filePath);
                      writableStream.on("finish", () => {
                        resolve(filePath);
                      });
                      writableStream.on("error", (e) => {
                        reject(e);
                      });
                      res.data.pipe(writableStream);
                    });
                  }), "writeFile"),
                  getReadableStream: /* @__PURE__ */ __name(() => {
                    checkIsReadable();
                    return res.data;
                  }, "getReadableStream"),
                  headers: res.headers
                };
              }), "download"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=file&apiName=upload&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=upload&project=lingo&resource=file&version=v1 document }
               */
              upload: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/lingo/v1/files/upload`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "upload")
            },
            /**
             * repo
             */
            repo: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=repo&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=lingo&resource=repo&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/lingo/v1/repos`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            }
          }
        };
      }
    };
    var Client$t = class extends Client$u {
      static {
        __name(this, "Client$t");
      }
      constructor() {
        super(...arguments);
        this.mail = {
          /**
           * 邮件组别名
           */
          mailgroupAlias: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.alias&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-alias/create document }
             *
             * 创建邮件组别名
             *
             * 创建邮件组别名
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.alias&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-alias/delete document }
             *
             * 删除邮件组别名
             *
             * 删除邮件组别名
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases/:alias_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.alias&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-alias/list document }
             *
             * 获取邮件组所有别名
             *
             * 获取邮件组所有别名
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 邮件组
           */
          mailgroup: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup/create document }
             *
             * 创建邮件组
             *
             * 创建一个邮件组
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup/delete document }
             *
             * 删除邮件组
             *
             * 删除一个邮件组
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup/get document }
             *
             * 获取邮件组
             *
             * 获取特定邮件组信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup/list document }
             *
             * 批量获取邮件组
             *
             * 分页批量获取邮件组
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup/patch document }
             *
             * 修改邮件组
             *
             * 更新邮件组部分字段，没有填写的字段不会被更新
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup/update document }
             *
             * 更新邮件组
             *
             * 更新邮件组所有信息
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 邮件组管理员
           */
          mailgroupManager: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.manager&apiName=batch_create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-manager/batch_create document }
             *
             * 批量创建邮件组管理员
             *
             * 批量创建邮件组管理员
             */
            batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_create`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchCreate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.manager&apiName=batch_delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-manager/batch_delete document }
             *
             * 批量删除邮件组管理员
             *
             * 批量删除邮件组管理员
             */
            batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_delete`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchDelete"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.manager&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-manager/list document }
             *
             * 批量获取邮件组管理员
             *
             * 批量获取邮件组管理员
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 邮件组成员
           */
          mailgroupMember: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.member&apiName=batch_create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=mail&resource=mailgroup.member&version=v1 document }
             */
            batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_create`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchCreate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.member&apiName=batch_delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=mail&resource=mailgroup.member&version=v1 document }
             */
            batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_delete`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchDelete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.member&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-member/create document }
             *
             * 创建邮件组成员
             *
             * 向邮件组添加单个成员
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.member&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-member/delete document }
             *
             * 删除邮件组成员
             *
             * 删除邮件组单个成员
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.member&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-member/get document }
             *
             * 获取邮件组成员信息
             *
             * 获取邮件组单个成员信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.member&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-member/list document }
             *
             * 批量获取邮件组成员
             *
             * 分页批量获取邮件组成员列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 邮件组权限成员
           */
          mailgroupPermissionMember: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.permission_member&apiName=batch_create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=mail&resource=mailgroup.permission_member&version=v1 document }
             */
            batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_create`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchCreate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.permission_member&apiName=batch_delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=mail&resource=mailgroup.permission_member&version=v1 document }
             */
            batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_delete`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchDelete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.permission_member&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-permission_member/create document }
             *
             * 创建邮件组权限成员
             *
             * 向邮件组添加单个自定义权限成员，添加后该成员可发送邮件到该邮件组
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.permission_member&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-permission_member/delete document }
             *
             * 删除邮件组权限成员
             *
             * 从自定义成员中删除单个成员，删除后该成员无法发送邮件到该邮件组
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.permission_member&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-permission_member/get document }
             *
             * 获取邮件组权限成员
             *
             * 获取邮件组单个权限成员信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.permission_member&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-permission_member/list document }
             *
             * 批量获取邮件组权限成员
             *
             * 分页批量获取邮件组权限成员列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 公共邮箱别名
           */
          publicMailboxAlias: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.alias&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox-alias/create document }
             *
             * 创建公共邮箱别名
             *
             * 创建公共邮箱别名
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.alias&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox-alias/delete document }
             *
             * 删除公共邮箱别名
             *
             * 删除公共邮箱别名
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases/:alias_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.alias&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox-alias/list document }
             *
             * 获取所有公共邮箱别名
             *
             * 获取所有公共邮箱别名
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 公共邮箱
           */
          publicMailbox: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox/create document }
             *
             * 创建公共邮箱
             *
             * 创建一个公共邮箱
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox/delete document }
             *
             * 释放公共邮箱地址
             *
             * 该接口会永久删除公共邮箱地址。可用于释放邮箱回收站的公共邮箱地址，一旦删除，该邮箱地址将无法恢复。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox/get document }
             *
             * 获取公共邮箱
             *
             * 获取公共邮箱信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox/list document }
             *
             * 批量获取公共邮箱
             *
             * 分页批量获取公共邮箱列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox/patch document }
             *
             * 修改公共邮箱
             *
             * 更新公共邮箱部分字段，没有填写的字段不会被更新
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox&apiName=remove_to_recycle_bin&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=remove_to_recycle_bin&project=mail&resource=public_mailbox&version=v1 document }
             */
            removeToRecycleBin: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/remove_to_recycle_bin`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "removeToRecycleBin"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox/update document }
             *
             * 更新公共邮箱
             *
             * 更新公共邮箱所有信息
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 公共邮箱成员
           */
          publicMailboxMember: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.member&apiName=batch_create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=mail&resource=public_mailbox.member&version=v1 document }
             */
            batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_create`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchCreate"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.member&apiName=batch_delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=mail&resource=public_mailbox.member&version=v1 document }
             */
            batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_delete`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchDelete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.member&apiName=clear&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox-member/clear document }
             *
             * 清空公共邮箱成员
             *
             * 删除公共邮箱所有成员
             */
            clear: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/clear`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "clear"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.member&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox-member/create document }
             *
             * 创建公共邮箱成员
             *
             * 向公共邮箱添加单个成员
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.member&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox-member/delete document }
             *
             * 删除公共邮箱成员
             *
             * 删除公共邮箱单个成员
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.member&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox-member/get document }
             *
             * 获取公共邮箱成员信息
             *
             * 获取公共邮箱单个成员信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.member&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox-member/list document }
             *
             * 批量获取公共邮箱成员
             *
             * 分页批量获取公共邮箱成员列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 邮箱地址
           */
          user: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/user/query document }
             *
             * 邮箱状态查询
             *
             * 使用邮箱状态查询接口，可以输入邮箱地址，查询出该邮箱地址对应的类型以及状态
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/users/query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query")
          },
          /**
           * 用户邮箱
           */
          userMailbox: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox&apiName=accessible_mailboxes&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=accessible_mailboxes&project=mail&resource=user_mailbox&version=v1 document }
             *
             * 获取主账号的所有可访问邮箱，包括主邮箱和公共邮箱
             */
            accessibleMailboxes: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/accessible_mailboxes`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "accessibleMailboxes"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/user_mailbox/delete document }
             *
             * 释放用户邮箱地址
             *
             * 该接口会永久删除用户邮箱地址。可用于删除位于邮箱回收站中的用户邮箱地址，一旦删除，将无法恢复。该接口支持邮件的转移，可以将被释放邮箱的邮件转移到另外一个可以使用的邮箱中。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete")
          },
          /**
           * 用户邮箱别名
           */
          userMailboxAlias: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.alias&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/user_mailbox-alias/create document }
             *
             * 创建用户邮箱别名
             *
             * 创建用户邮箱别名
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.alias&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/user_mailbox-alias/delete document }
             *
             * 删除用户邮箱别名
             *
             * 删除用户邮箱别名
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases/:alias_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.alias&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/user_mailbox-alias/list document }
             *
             * 获取用户邮箱所有别名
             *
             * 获取用户邮箱所有别名
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * user_mailbox.draft
           */
          userMailboxDraft: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.draft&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=mail&resource=user_mailbox.draft&version=v1 document }
             *
             * 创建草稿
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.draft&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=mail&resource=user_mailbox.draft&version=v1 document }
             *
             * 删除指定邮箱账户下的单份邮件草稿。注意：对于草稿状态的邮件，只能使用本接口删除，禁止使用 trash_message；被删除的草稿数据无法恢复，请谨慎使用。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.draft&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=mail&resource=user_mailbox.draft&version=v1 document }
             *
             * 获取草稿详情
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.draft&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=mail&resource=user_mailbox.draft&version=v1 document }
             *
             * 拉取草稿列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.draft&apiName=send&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=send&project=mail&resource=user_mailbox.draft&version=v1 document }
             *
             * 发送草稿
             */
            send: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id/send`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "send"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.draft&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=mail&resource=user_mailbox.draft&version=v1 document }
             *
             * 更新草稿
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * user_mailbox.event
           */
          userMailboxEvent: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.event&apiName=subscribe&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=subscribe&project=mail&resource=user_mailbox.event&version=v1 document }
             *
             * 订阅收信事件
             */
            subscribe: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscribe`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "subscribe"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.event&apiName=subscription&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=subscription&project=mail&resource=user_mailbox.event&version=v1 document }
             *
             * 查询订阅的收信事件
             */
            subscription: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscription`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "subscription"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.event&apiName=unsubscribe&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=unsubscribe&project=mail&resource=user_mailbox.event&version=v1 document }
             *
             * 取消订阅收信事件
             */
            unsubscribe: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/unsubscribe`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "unsubscribe")
          },
          /**
           * user_mailbox.folder
           */
          userMailboxFolder: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.folder&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=mail&resource=user_mailbox.folder&version=v1 document }
             *
             * 创建邮箱文件夹
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.folder&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=mail&resource=user_mailbox.folder&version=v1 document }
             *
             * 删除用户文件夹。删除后文件夹数据无法恢复，请谨慎使用；删除文件夹会将该文件夹下的邮件移至已删除文件夹中。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.folder&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=mail&resource=user_mailbox.folder&version=v1 document }
             *
             * 获取指定邮箱账户下的单个邮件文件夹详情
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.folder&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=mail&resource=user_mailbox.folder&version=v1 document }
             *
             * 列出用户文件夹，可获取文件夹名称、文件夹ID、文件夹下的未读邮件和未读会话数量
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.folder&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=mail&resource=user_mailbox.folder&version=v1 document }
             *
             * 更新用户文件夹
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * user_mailbox.label
           */
          userMailboxLabel: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.label&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=mail&resource=user_mailbox.label&version=v1 document }
             *
             * 根据用户指定的名称、颜色等信息，创建邮件标签
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.label&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=mail&resource=user_mailbox.label&version=v1 document }
             *
             * 删除用户指定的标签，注意，删除的标签无法恢复
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.label&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=mail&resource=user_mailbox.label&version=v1 document }
             *
             * 根据指定ID，获取邮件标签信息，包括名称、未读数据、颜色等信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.label&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=mail&resource=user_mailbox.label&version=v1 document }
             *
             * 列出邮件标签，包括ID、名称、颜色、未读信息等内容
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.label&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=mail&resource=user_mailbox.label&version=v1 document }
             *
             * 更新邮件标签
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * user_mailbox.mail_contact
           */
          userMailboxMailContact: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.mail_contact&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=mail&resource=user_mailbox.mail_contact&version=v1 document }
             *
             * 创建邮箱联系人
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.mail_contact&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=mail&resource=user_mailbox.mail_contact&version=v1 document }
             *
             * 删除指定的邮箱联系人
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.mail_contact&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=mail&resource=user_mailbox.mail_contact&version=v1 document }
             *
             * 列出邮箱联系人
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.mail_contact&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=mail&resource=user_mailbox.mail_contact&version=v1 document }
             *
             * 更新邮箱联系人
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * user_mailbox.message.attachment
           */
          userMailboxMessageAttachment: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message.attachment&apiName=download_url&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=download_url&project=mail&resource=user_mailbox.message.attachment&version=v1 document }
             *
             * 获取附件下载链接
             */
            downloadUrl: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/attachments/download_url`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "downloadUrl")
          },
          /**
           * user_mailbox.message
           */
          userMailboxMessage: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message&apiName=batch_get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=mail&resource=user_mailbox.message&version=v1 document }
             *
             * 通过指定邮件ID，获取对应邮件的标签、文件夹、摘要、正文、html、附件等信息。注意，如需获取摘要、正文、主题或收发件人地址，需要申请对应的字段权限。
             */
            batchGet: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_get`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchGet"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message&apiName=batch_modify&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_modify&project=mail&resource=user_mailbox.message&version=v1 document }
             *
             * 本接口提供修改邮件的能力，支持移动邮件的文件夹、给邮件添加和移除标签、标记邮件读和未读、移动邮件至垃圾邮件等能力。不支持移动邮件到已删除文件夹，如需，请使用批量删除邮件接口。
             */
            batchModify: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_modify`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchModify"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message&apiName=batch_trash&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_trash&project=mail&resource=user_mailbox.message&version=v1 document }
             *
             * 通过指定邮件ID，批量移动邮件到已删除文件夹
             */
            batchTrash: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_trash`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchTrash"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=mail&resource=user_mailbox.message&version=v1 document }
             *
             * 获取邮件详情
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message&apiName=get_by_card&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get_by_card&project=mail&resource=user_mailbox.message&version=v1 document }
             *
             * 卡片ID获取邮件ID
             */
            getByCard: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/get_by_card`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "getByCard"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=mail&resource=user_mailbox.message&version=v1 document }
             *
             * 根据用户指定的标签或文件夹，列出对应位置下的邮件列表。注意，必须填写folder_id或label_id中的一个字段。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message&apiName=list_thread_message&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list_thread_message&project=mail&resource=user_mailbox.message&version=v1 document }
             *
             * 通过用户邮箱地址和邮件会话ID，获取该会话下的所有邮件关键信息列表。如需查询主题、正文、摘要、收发件人信息，请申请字段权限。
             */
            listThreadMessage: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/messages`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "listThreadMessage"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message&apiName=modify&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=modify&project=mail&resource=user_mailbox.message&version=v1 document }
             *
             * 本接口提供修改邮件的能力，支持移动邮件的文件夹、给邮件添加和移除标签、标记邮件已读和未读、移动邮件至垃圾邮件等能力。不支持移动邮件到已删除文件夹，如需删除邮件，请使用删除邮件接口。至少填写add_label_ids、remove_label_ids、add_folder中的一个参数。
             */
            modify: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/modify`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "modify"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message&apiName=send&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=send&project=mail&resource=user_mailbox.message&version=v1 document }
             */
            send: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/send`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "send"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message&apiName=trash&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=trash&project=mail&resource=user_mailbox.message&version=v1 document }
             *
             * 移动邮件到已删除文件夹。注意，该接口无法删除草稿，如需删除草稿，请使用删除草稿接口
             */
            trash: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/trash`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "trash")
          },
          /**
           * user_mailbox.rule
           */
          userMailboxRule: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.rule&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=mail&resource=user_mailbox.rule&version=v1 document }
             *
             * 创建收信规则
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.rule&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=mail&resource=user_mailbox.rule&version=v1 document }
             *
             * 删除收信规则
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.rule&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=mail&resource=user_mailbox.rule&version=v1 document }
             *
             * 列出收信规则
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.rule&apiName=reorder&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=reorder&project=mail&resource=user_mailbox.rule&version=v1 document }
             */
            reorder: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/reorder`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "reorder"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.rule&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=mail&resource=user_mailbox.rule&version=v1 document }
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * user_mailbox.setting
           */
          userMailboxSetting: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.setting&apiName=send_as&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=send_as&project=mail&resource=user_mailbox.setting&version=v1 document }
             *
             * 获取账号的所有可发信地址，包括主地址、别名地址、邮件组。可以使用用户地址访问该接口，也可以使用用户有权限的公共邮箱地址访问该接口。
             */
            sendAs: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/send_as`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "sendAs")
          },
          /**
           * user_mailbox.template.attachment
           */
          userMailboxTemplateAttachment: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.template.attachment&apiName=download_url&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=download_url&project=mail&resource=user_mailbox.template.attachment&version=v1 document }
             *
             * 获取指定邮件模板下的附件下载链接。用于在已知模板 ID 与附件 ID 的场景下，二次获取附件的有效访问 URL，便于在用户端预览或下载邮件模板中的附件资源。
             */
            downloadUrl: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id/attachments/download_url`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "downloadUrl")
          },
          /**
           * user_mailbox.template
           */
          userMailboxTemplate: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.template&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=mail&resource=user_mailbox.template&version=v1 document }
             *
             * 在指定用户邮箱下创建一份可复用的个人邮件模板。请求时需传入完整的模板对象（含名称、主题、正文、收件信息、附件等），创建成功后返回完整模板内容（含系统生成的 template_id），适用于将常用邮件内容沉淀为模板以便后续快速发送同类型邮件。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.template&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=mail&resource=user_mailbox.template&version=v1 document }
             *
             * 永久删除指定用户邮箱下的某个个人邮件模板。删除操作不可恢复，删除后该模板将无法在「列出邮件模板」「获取邮件模板」等接口中再返回，常用于清理已废弃或不再使用的模板。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.template&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=mail&resource=user_mailbox.template&version=v1 document }
             *
             * 获取指定邮件模板的完整详情，包括模板名称、主题、正文（HTML 或纯文本）、收件人/抄送/密送地址、附件信息等所有字段。常用于编辑模板前回填表单，或在发送邮件场景下读取模板内容做二次填充。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.template&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=mail&resource=user_mailbox.template&version=v1 document }
             *
             * 列出指定用户邮箱下的全部个人邮件模板基本信息（一次性返回，不分页），常用于在编辑或发送邮件场景下展示可选模板列表。如需获取模板正文与附件等完整字段，请通过获取个人邮件模板详情接口按 `template_id` 查询。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.template&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=mail&resource=user_mailbox.template&version=v1 document }
             *
             * 以全量替换的方式更新指定邮件模板的所有字段（包括名称、主题、正文、附件、收件信息等）。本接口为「全量更新」语义：请求时需传入完整的模板对象，未携带的字段将被清空。**调用依赖**：如仅修改部分字段，请先调用获取个人邮件模板详情接口拿到完整模板，在本地修改后再传回本接口，以避免漏传字段导致数据丢失。
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * user_mailbox.thread
           */
          userMailboxThread: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.thread&apiName=batch_modify&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_modify&project=mail&resource=user_mailbox.thread&version=v1 document }
             *
             * 本接口提供修改邮件会话的能力，支持移动邮件会话的文件夹、给邮件会话添加和移除标签、标记邮件会话读和未读、移动邮件会话至垃圾邮件等能力。不支持移动邮件会话到已删除文件夹，如需，请使用批量删除邮件会话接口。
             */
            batchModify: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_modify`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchModify"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.thread&apiName=batch_trash&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_trash&project=mail&resource=user_mailbox.thread&version=v1 document }
             *
             * 通过指定邮件会话ID，批量移动邮件到已删除文件夹
             */
            batchTrash: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_trash`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchTrash"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.thread&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=mail&resource=user_mailbox.thread&version=v1 document }
             *
             * 通过用户邮箱地址和邮件会话ID，获取该会话下的所有邮件关键信息列表。如需查询主题、正文、摘要、收发件人信息，请申请字段权限。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.thread&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=mail&resource=user_mailbox.thread&version=v1 document }
             *
             * 通过指定文件夹或标签，列出对应位置下的邮件会话列表。接口可返回邮件会话ID和会话下最新一封邮件的摘要。folder_id 和 label_id 必须且只能提供一个。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.thread&apiName=modify&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=modify&project=mail&resource=user_mailbox.thread&version=v1 document }
             *
             * 本接口提供修改邮件会话的能力，支持移动邮件会话的文件夹、给邮件会话添加和移除标签、标记邮件会话读和未读、移动邮件会话至垃圾邮件等能力。不支持移动邮件会话到已删除文件夹，如需，请使用删除邮件会话接口。至少填写add_label_ids、remove_label_ids、add_folder中的一个参数。
             */
            modify: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/modify`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "modify"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.thread&apiName=trash&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=trash&project=mail&resource=user_mailbox.thread&version=v1 document }
             *
             * 移动指定的邮件会话到已删除文件夹
             */
            trash: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/trash`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "trash")
          },
          v1: {
            /**
             * 邮件组别名
             */
            mailgroupAlias: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.alias&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-alias/create document }
               *
               * 创建邮件组别名
               *
               * 创建邮件组别名
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.alias&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-alias/delete document }
               *
               * 删除邮件组别名
               *
               * 删除邮件组别名
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases/:alias_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.alias&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-alias/list document }
               *
               * 获取邮件组所有别名
               *
               * 获取邮件组所有别名
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/aliases`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 邮件组
             */
            mailgroup: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup/create document }
               *
               * 创建邮件组
               *
               * 创建一个邮件组
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup/delete document }
               *
               * 删除邮件组
               *
               * 删除一个邮件组
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup/get document }
               *
               * 获取邮件组
               *
               * 获取特定邮件组信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup/list document }
               *
               * 批量获取邮件组
               *
               * 分页批量获取邮件组
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup/patch document }
               *
               * 修改邮件组
               *
               * 更新邮件组部分字段，没有填写的字段不会被更新
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup/update document }
               *
               * 更新邮件组
               *
               * 更新邮件组所有信息
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 邮件组管理员
             */
            mailgroupManager: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.manager&apiName=batch_create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-manager/batch_create document }
               *
               * 批量创建邮件组管理员
               *
               * 批量创建邮件组管理员
               */
              batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_create`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchCreate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.manager&apiName=batch_delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-manager/batch_delete document }
               *
               * 批量删除邮件组管理员
               *
               * 批量删除邮件组管理员
               */
              batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_delete`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchDelete"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.manager&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-manager/list document }
               *
               * 批量获取邮件组管理员
               *
               * 批量获取邮件组管理员
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 邮件组成员
             */
            mailgroupMember: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.member&apiName=batch_create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=mail&resource=mailgroup.member&version=v1 document }
               */
              batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_create`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchCreate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.member&apiName=batch_delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=mail&resource=mailgroup.member&version=v1 document }
               */
              batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_delete`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchDelete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.member&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-member/create document }
               *
               * 创建邮件组成员
               *
               * 向邮件组添加单个成员
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.member&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-member/delete document }
               *
               * 删除邮件组成员
               *
               * 删除邮件组单个成员
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.member&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-member/get document }
               *
               * 获取邮件组成员信息
               *
               * 获取邮件组单个成员信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/:member_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.member&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-member/list document }
               *
               * 批量获取邮件组成员
               *
               * 分页批量获取邮件组成员列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 邮件组权限成员
             */
            mailgroupPermissionMember: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.permission_member&apiName=batch_create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=mail&resource=mailgroup.permission_member&version=v1 document }
               */
              batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_create`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchCreate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.permission_member&apiName=batch_delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=mail&resource=mailgroup.permission_member&version=v1 document }
               */
              batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_delete`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchDelete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.permission_member&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-permission_member/create document }
               *
               * 创建邮件组权限成员
               *
               * 向邮件组添加单个自定义权限成员，添加后该成员可发送邮件到该邮件组
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.permission_member&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-permission_member/delete document }
               *
               * 删除邮件组权限成员
               *
               * 从自定义成员中删除单个成员，删除后该成员无法发送邮件到该邮件组
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.permission_member&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-permission_member/get document }
               *
               * 获取邮件组权限成员
               *
               * 获取邮件组单个权限成员信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/:permission_member_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.permission_member&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-permission_member/list document }
               *
               * 批量获取邮件组权限成员
               *
               * 分页批量获取邮件组权限成员列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 公共邮箱别名
             */
            publicMailboxAlias: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.alias&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox-alias/create document }
               *
               * 创建公共邮箱别名
               *
               * 创建公共邮箱别名
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.alias&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox-alias/delete document }
               *
               * 删除公共邮箱别名
               *
               * 删除公共邮箱别名
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases/:alias_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.alias&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox-alias/list document }
               *
               * 获取所有公共邮箱别名
               *
               * 获取所有公共邮箱别名
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/aliases`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 公共邮箱
             */
            publicMailbox: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox/create document }
               *
               * 创建公共邮箱
               *
               * 创建一个公共邮箱
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox/delete document }
               *
               * 释放公共邮箱地址
               *
               * 该接口会永久删除公共邮箱地址。可用于释放邮箱回收站的公共邮箱地址，一旦删除，该邮箱地址将无法恢复。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox/get document }
               *
               * 获取公共邮箱
               *
               * 获取公共邮箱信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox/list document }
               *
               * 批量获取公共邮箱
               *
               * 分页批量获取公共邮箱列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox/patch document }
               *
               * 修改公共邮箱
               *
               * 更新公共邮箱部分字段，没有填写的字段不会被更新
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox&apiName=remove_to_recycle_bin&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=remove_to_recycle_bin&project=mail&resource=public_mailbox&version=v1 document }
               */
              removeToRecycleBin: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/remove_to_recycle_bin`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "removeToRecycleBin"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox/update document }
               *
               * 更新公共邮箱
               *
               * 更新公共邮箱所有信息
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 公共邮箱成员
             */
            publicMailboxMember: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.member&apiName=batch_create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=mail&resource=public_mailbox.member&version=v1 document }
               */
              batchCreate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_create`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchCreate"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.member&apiName=batch_delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=mail&resource=public_mailbox.member&version=v1 document }
               */
              batchDelete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_delete`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchDelete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.member&apiName=clear&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox-member/clear document }
               *
               * 清空公共邮箱成员
               *
               * 删除公共邮箱所有成员
               */
              clear: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/clear`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "clear"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.member&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox-member/create document }
               *
               * 创建公共邮箱成员
               *
               * 向公共邮箱添加单个成员
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.member&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox-member/delete document }
               *
               * 删除公共邮箱成员
               *
               * 删除公共邮箱单个成员
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.member&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox-member/get document }
               *
               * 获取公共邮箱成员信息
               *
               * 获取公共邮箱单个成员信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/:member_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.member&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox-member/list document }
               *
               * 批量获取公共邮箱成员
               *
               * 分页批量获取公共邮箱成员列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 邮箱地址
             */
            user: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/user/query document }
               *
               * 邮箱状态查询
               *
               * 使用邮箱状态查询接口，可以输入邮箱地址，查询出该邮箱地址对应的类型以及状态
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/users/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * 用户邮箱
             */
            userMailbox: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox&apiName=accessible_mailboxes&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=accessible_mailboxes&project=mail&resource=user_mailbox&version=v1 document }
               *
               * 获取主账号的所有可访问邮箱，包括主邮箱和公共邮箱
               */
              accessibleMailboxes: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/accessible_mailboxes`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "accessibleMailboxes"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/user_mailbox/delete document }
               *
               * 释放用户邮箱地址
               *
               * 该接口会永久删除用户邮箱地址。可用于删除位于邮箱回收站中的用户邮箱地址，一旦删除，将无法恢复。该接口支持邮件的转移，可以将被释放邮箱的邮件转移到另外一个可以使用的邮箱中。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete")
            },
            /**
             * 用户邮箱别名
             */
            userMailboxAlias: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.alias&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/user_mailbox-alias/create document }
               *
               * 创建用户邮箱别名
               *
               * 创建用户邮箱别名
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.alias&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/user_mailbox-alias/delete document }
               *
               * 删除用户邮箱别名
               *
               * 删除用户邮箱别名
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases/:alias_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.alias&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/user_mailbox-alias/list document }
               *
               * 获取用户邮箱所有别名
               *
               * 获取用户邮箱所有别名
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/aliases`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * user_mailbox.draft
             */
            userMailboxDraft: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.draft&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=mail&resource=user_mailbox.draft&version=v1 document }
               *
               * 创建草稿
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.draft&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=mail&resource=user_mailbox.draft&version=v1 document }
               *
               * 删除指定邮箱账户下的单份邮件草稿。注意：对于草稿状态的邮件，只能使用本接口删除，禁止使用 trash_message；被删除的草稿数据无法恢复，请谨慎使用。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.draft&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=mail&resource=user_mailbox.draft&version=v1 document }
               *
               * 获取草稿详情
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.draft&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=mail&resource=user_mailbox.draft&version=v1 document }
               *
               * 拉取草稿列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.draft&apiName=send&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=send&project=mail&resource=user_mailbox.draft&version=v1 document }
               *
               * 发送草稿
               */
              send: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id/send`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "send"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.draft&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=mail&resource=user_mailbox.draft&version=v1 document }
               *
               * 更新草稿
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/drafts/:draft_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * user_mailbox.event
             */
            userMailboxEvent: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.event&apiName=subscribe&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=subscribe&project=mail&resource=user_mailbox.event&version=v1 document }
               *
               * 订阅收信事件
               */
              subscribe: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscribe`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "subscribe"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.event&apiName=subscription&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=subscription&project=mail&resource=user_mailbox.event&version=v1 document }
               *
               * 查询订阅的收信事件
               */
              subscription: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/subscription`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "subscription"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.event&apiName=unsubscribe&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=unsubscribe&project=mail&resource=user_mailbox.event&version=v1 document }
               *
               * 取消订阅收信事件
               */
              unsubscribe: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/event/unsubscribe`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "unsubscribe")
            },
            /**
             * user_mailbox.folder
             */
            userMailboxFolder: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.folder&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=mail&resource=user_mailbox.folder&version=v1 document }
               *
               * 创建邮箱文件夹
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.folder&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=mail&resource=user_mailbox.folder&version=v1 document }
               *
               * 删除用户文件夹。删除后文件夹数据无法恢复，请谨慎使用；删除文件夹会将该文件夹下的邮件移至已删除文件夹中。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.folder&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=mail&resource=user_mailbox.folder&version=v1 document }
               *
               * 获取指定邮箱账户下的单个邮件文件夹详情
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.folder&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=mail&resource=user_mailbox.folder&version=v1 document }
               *
               * 列出用户文件夹，可获取文件夹名称、文件夹ID、文件夹下的未读邮件和未读会话数量
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.folder&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=mail&resource=user_mailbox.folder&version=v1 document }
               *
               * 更新用户文件夹
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * user_mailbox.label
             */
            userMailboxLabel: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.label&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=mail&resource=user_mailbox.label&version=v1 document }
               *
               * 根据用户指定的名称、颜色等信息，创建邮件标签
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.label&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=mail&resource=user_mailbox.label&version=v1 document }
               *
               * 删除用户指定的标签，注意，删除的标签无法恢复
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.label&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=mail&resource=user_mailbox.label&version=v1 document }
               *
               * 根据指定ID，获取邮件标签信息，包括名称、未读数据、颜色等信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.label&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=mail&resource=user_mailbox.label&version=v1 document }
               *
               * 列出邮件标签，包括ID、名称、颜色、未读信息等内容
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.label&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=mail&resource=user_mailbox.label&version=v1 document }
               *
               * 更新邮件标签
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/labels/:label_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * user_mailbox.mail_contact
             */
            userMailboxMailContact: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.mail_contact&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=mail&resource=user_mailbox.mail_contact&version=v1 document }
               *
               * 创建邮箱联系人
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.mail_contact&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=mail&resource=user_mailbox.mail_contact&version=v1 document }
               *
               * 删除指定的邮箱联系人
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.mail_contact&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=mail&resource=user_mailbox.mail_contact&version=v1 document }
               *
               * 列出邮箱联系人
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.mail_contact&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=mail&resource=user_mailbox.mail_contact&version=v1 document }
               *
               * 更新邮箱联系人
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/mail_contacts/:mail_contact_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * user_mailbox.message.attachment
             */
            userMailboxMessageAttachment: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message.attachment&apiName=download_url&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=download_url&project=mail&resource=user_mailbox.message.attachment&version=v1 document }
               *
               * 获取附件下载链接
               */
              downloadUrl: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/attachments/download_url`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "downloadUrl")
            },
            /**
             * user_mailbox.message
             */
            userMailboxMessage: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message&apiName=batch_get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=mail&resource=user_mailbox.message&version=v1 document }
               *
               * 通过指定邮件ID，获取对应邮件的标签、文件夹、摘要、正文、html、附件等信息。注意，如需获取摘要、正文、主题或收发件人地址，需要申请对应的字段权限。
               */
              batchGet: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_get`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchGet"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message&apiName=batch_modify&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_modify&project=mail&resource=user_mailbox.message&version=v1 document }
               *
               * 本接口提供修改邮件的能力，支持移动邮件的文件夹、给邮件添加和移除标签、标记邮件读和未读、移动邮件至垃圾邮件等能力。不支持移动邮件到已删除文件夹，如需，请使用批量删除邮件接口。
               */
              batchModify: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_modify`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchModify"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message&apiName=batch_trash&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_trash&project=mail&resource=user_mailbox.message&version=v1 document }
               *
               * 通过指定邮件ID，批量移动邮件到已删除文件夹
               */
              batchTrash: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/batch_trash`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchTrash"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=mail&resource=user_mailbox.message&version=v1 document }
               *
               * 获取邮件详情
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message&apiName=get_by_card&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get_by_card&project=mail&resource=user_mailbox.message&version=v1 document }
               *
               * 卡片ID获取邮件ID
               */
              getByCard: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/get_by_card`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "getByCard"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=mail&resource=user_mailbox.message&version=v1 document }
               *
               * 根据用户指定的标签或文件夹，列出对应位置下的邮件列表。注意，必须填写folder_id或label_id中的一个字段。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message&apiName=list_thread_message&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list_thread_message&project=mail&resource=user_mailbox.message&version=v1 document }
               *
               * 通过用户邮箱地址和邮件会话ID，获取该会话下的所有邮件关键信息列表。如需查询主题、正文、摘要、收发件人信息，请申请字段权限。
               */
              listThreadMessage: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/messages`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "listThreadMessage"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message&apiName=modify&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=modify&project=mail&resource=user_mailbox.message&version=v1 document }
               *
               * 本接口提供修改邮件的能力，支持移动邮件的文件夹、给邮件添加和移除标签、标记邮件已读和未读、移动邮件至垃圾邮件等能力。不支持移动邮件到已删除文件夹，如需删除邮件，请使用删除邮件接口。至少填写add_label_ids、remove_label_ids、add_folder中的一个参数。
               */
              modify: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/modify`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "modify"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message&apiName=send&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=send&project=mail&resource=user_mailbox.message&version=v1 document }
               */
              send: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/send`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "send"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message&apiName=trash&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=trash&project=mail&resource=user_mailbox.message&version=v1 document }
               *
               * 移动邮件到已删除文件夹。注意，该接口无法删除草稿，如需删除草稿，请使用删除草稿接口
               */
              trash: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/:message_id/trash`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "trash")
            },
            /**
             * user_mailbox.rule
             */
            userMailboxRule: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.rule&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=mail&resource=user_mailbox.rule&version=v1 document }
               *
               * 创建收信规则
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.rule&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=mail&resource=user_mailbox.rule&version=v1 document }
               *
               * 删除收信规则
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.rule&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=mail&resource=user_mailbox.rule&version=v1 document }
               *
               * 列出收信规则
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.rule&apiName=reorder&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=reorder&project=mail&resource=user_mailbox.rule&version=v1 document }
               */
              reorder: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/reorder`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "reorder"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.rule&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=mail&resource=user_mailbox.rule&version=v1 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/rules/:rule_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * user_mailbox.setting
             */
            userMailboxSetting: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.setting&apiName=send_as&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=send_as&project=mail&resource=user_mailbox.setting&version=v1 document }
               *
               * 获取账号的所有可发信地址，包括主地址、别名地址、邮件组。可以使用用户地址访问该接口，也可以使用用户有权限的公共邮箱地址访问该接口。
               */
              sendAs: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/settings/send_as`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "sendAs")
            },
            /**
             * user_mailbox.template.attachment
             */
            userMailboxTemplateAttachment: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.template.attachment&apiName=download_url&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=download_url&project=mail&resource=user_mailbox.template.attachment&version=v1 document }
               *
               * 获取指定邮件模板下的附件下载链接。用于在已知模板 ID 与附件 ID 的场景下，二次获取附件的有效访问 URL，便于在用户端预览或下载邮件模板中的附件资源。
               */
              downloadUrl: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id/attachments/download_url`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "downloadUrl")
            },
            /**
             * user_mailbox.template
             */
            userMailboxTemplate: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.template&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=mail&resource=user_mailbox.template&version=v1 document }
               *
               * 在指定用户邮箱下创建一份可复用的个人邮件模板。请求时需传入完整的模板对象（含名称、主题、正文、收件信息、附件等），创建成功后返回完整模板内容（含系统生成的 template_id），适用于将常用邮件内容沉淀为模板以便后续快速发送同类型邮件。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.template&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=mail&resource=user_mailbox.template&version=v1 document }
               *
               * 永久删除指定用户邮箱下的某个个人邮件模板。删除操作不可恢复，删除后该模板将无法在「列出邮件模板」「获取邮件模板」等接口中再返回，常用于清理已废弃或不再使用的模板。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.template&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=mail&resource=user_mailbox.template&version=v1 document }
               *
               * 获取指定邮件模板的完整详情，包括模板名称、主题、正文（HTML 或纯文本）、收件人/抄送/密送地址、附件信息等所有字段。常用于编辑模板前回填表单，或在发送邮件场景下读取模板内容做二次填充。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.template&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=mail&resource=user_mailbox.template&version=v1 document }
               *
               * 列出指定用户邮箱下的全部个人邮件模板基本信息（一次性返回，不分页），常用于在编辑或发送邮件场景下展示可选模板列表。如需获取模板正文与附件等完整字段，请通过获取个人邮件模板详情接口按 `template_id` 查询。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.template&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=mail&resource=user_mailbox.template&version=v1 document }
               *
               * 以全量替换的方式更新指定邮件模板的所有字段（包括名称、主题、正文、附件、收件信息等）。本接口为「全量更新」语义：请求时需传入完整的模板对象，未携带的字段将被清空。**调用依赖**：如仅修改部分字段，请先调用获取个人邮件模板详情接口拿到完整模板，在本地修改后再传回本接口，以避免漏传字段导致数据丢失。
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/templates/:template_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * user_mailbox.thread
             */
            userMailboxThread: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.thread&apiName=batch_modify&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_modify&project=mail&resource=user_mailbox.thread&version=v1 document }
               *
               * 本接口提供修改邮件会话的能力，支持移动邮件会话的文件夹、给邮件会话添加和移除标签、标记邮件会话读和未读、移动邮件会话至垃圾邮件等能力。不支持移动邮件会话到已删除文件夹，如需，请使用批量删除邮件会话接口。
               */
              batchModify: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_modify`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchModify"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.thread&apiName=batch_trash&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_trash&project=mail&resource=user_mailbox.thread&version=v1 document }
               *
               * 通过指定邮件会话ID，批量移动邮件到已删除文件夹
               */
              batchTrash: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/batch_trash`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchTrash"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.thread&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=mail&resource=user_mailbox.thread&version=v1 document }
               *
               * 通过用户邮箱地址和邮件会话ID，获取该会话下的所有邮件关键信息列表。如需查询主题、正文、摘要、收发件人信息，请申请字段权限。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.thread&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=mail&resource=user_mailbox.thread&version=v1 document }
               *
               * 通过指定文件夹或标签，列出对应位置下的邮件会话列表。接口可返回邮件会话ID和会话下最新一封邮件的摘要。folder_id 和 label_id 必须且只能提供一个。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.thread&apiName=modify&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=modify&project=mail&resource=user_mailbox.thread&version=v1 document }
               *
               * 本接口提供修改邮件会话的能力，支持移动邮件会话的文件夹、给邮件会话添加和移除标签、标记邮件会话读和未读、移动邮件会话至垃圾邮件等能力。不支持移动邮件会话到已删除文件夹，如需，请使用删除邮件会话接口。至少填写add_label_ids、remove_label_ids、add_folder中的一个参数。
               */
              modify: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/modify`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "modify"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.thread&apiName=trash&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=trash&project=mail&resource=user_mailbox.thread&version=v1 document }
               *
               * 移动指定的邮件会话到已删除文件夹
               */
              trash: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/threads/:thread_id/trash`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "trash")
            }
          }
        };
      }
    };
    var Client$s = class extends Client$t {
      static {
        __name(this, "Client$s");
      }
      constructor() {
        super(...arguments);
        this.mdm = {
          /**
           * 数据维度
           */
          userAuthDataRelation: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mdm&resource=user_auth_data_relation&apiName=bind&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/mdm-v1/user_auth_data_relation/bind document }
             *
             * 用户数据维度绑定
             *
             * 通过该接口，可为指定应用下的用户绑定一类数据维度，支持批量给多个用户同时增量授权。
             */
            bind: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/bind`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "bind"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=mdm&resource=user_auth_data_relation&apiName=unbind&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/mdm-v1/user_auth_data_relation/unbind document }
             *
             * 用户数据维度解绑
             *
             * 通过该接口，可为指定应用下的指定用户解除一类数据维度。
             */
            unbind: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/unbind`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "unbind")
          },
          v1: {
            /**
             * 数据维度
             */
            userAuthDataRelation: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mdm&resource=user_auth_data_relation&apiName=bind&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/mdm-v1/user_auth_data_relation/bind document }
               *
               * 用户数据维度绑定
               *
               * 通过该接口，可为指定应用下的用户绑定一类数据维度，支持批量给多个用户同时增量授权。
               */
              bind: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/bind`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "bind"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mdm&resource=user_auth_data_relation&apiName=unbind&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/mdm-v1/user_auth_data_relation/unbind document }
               *
               * 用户数据维度解绑
               *
               * 通过该接口，可为指定应用下的指定用户解除一类数据维度。
               */
              unbind: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/unbind`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "unbind")
            }
          },
          v3: {
            /**
             * batch_country_region
             */
            batchCountryRegion: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mdm&resource=batch_country_region&apiName=get&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=mdm&resource=batch_country_region&version=v3 document }
               *
               * 查询国家 / 地区
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mdm/v3/batch_country_region`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * country_region
             */
            countryRegion: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=mdm&resource=country_region&apiName=list&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=mdm&resource=country_region&version=v3 document }
               *
               * 搜索国家 / 地区
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/mdm/v3/country_regions`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            }
          }
        };
      }
    };
    var Client$r = class extends Client$s {
      static {
        __name(this, "Client$r");
      }
      constructor() {
        super(...arguments);
        this.meeting_room = {};
      }
    };
    var Client$q = class extends Client$r {
      static {
        __name(this, "Client$q");
      }
      constructor() {
        super(...arguments);
        this.minutes = {
          v1: {
            /**
             * minute
             */
            minute: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=minutes&resource=minute&apiName=artifacts&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=artifacts&project=minutes&resource=minute&version=v1 document }
               *
               * 返回妙记AI产物
               */
              artifacts: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/artifacts`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "artifacts"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=minutes&resource=minute&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=minutes&resource=minute&version=v1 document }
               *
               * 获取妙记的基础概括信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/minutes/v1/minutes/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=minutes&resource=minute&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=minutes&resource=minute&version=v1 document }
               *
               * 搜索妙记
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/minutes/v1/minutes/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * minute.media
             */
            minuteMedia: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=minutes&resource=minute.media&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=minutes&resource=minute.media&version=v1 document }
               *
               * 获取妙记的音视频文件
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/media`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * minute.statistics
             */
            minuteStatistics: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=minutes&resource=minute.statistics&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=minutes&resource=minute.statistics&version=v1 document }
               *
               * 获取妙记的访问统计数据
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/statistics`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * minute.transcript
             */
            minuteTranscript: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=minutes&resource=minute.transcript&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=minutes&resource=minute.transcript&version=v1 document }
               *
               * 获取妙记的对话文本，成功时返回文件二进制流
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/minutes/v1/minutes/:minute_token/transcript`, path2),
                  method: "GET",
                  headers,
                  data,
                  params,
                  responseType: "stream",
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                  $return_headers: true
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                const checkIsReadable = /* @__PURE__ */ __name(() => {
                  const consumedError = "The stream has already been consumed";
                  if (!res.data.readable) {
                    this.logger.error(consumedError);
                    throw new Error(consumedError);
                  }
                }, "checkIsReadable");
                return {
                  writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                    checkIsReadable();
                    return new Promise((resolve, reject) => {
                      const writableStream = fs__default["default"].createWriteStream(filePath);
                      writableStream.on("finish", () => {
                        resolve(filePath);
                      });
                      writableStream.on("error", (e) => {
                        reject(e);
                      });
                      res.data.pipe(writableStream);
                    });
                  }), "writeFile"),
                  getReadableStream: /* @__PURE__ */ __name(() => {
                    checkIsReadable();
                    return res.data;
                  }, "getReadableStream"),
                  headers: res.headers
                };
              }), "get")
            }
          }
        };
      }
    };
    var Client$p = class extends Client$q {
      static {
        __name(this, "Client$p");
      }
      constructor() {
        super(...arguments);
        this.moments = {
          /**
           * post
           */
          post: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=moments&resource=post&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=moments&resource=post&version=v1 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/moments/v1/posts/:post_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          v1: {
            /**
             * post
             */
            post: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=moments&resource=post&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=moments&resource=post&version=v1 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/moments/v1/posts/:post_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            }
          }
        };
      }
    };
    var Client$o = class extends Client$p {
      static {
        __name(this, "Client$o");
      }
      constructor() {
        super(...arguments);
        this.okr = {
          /**
           * 图片
           */
          image: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=okr&resource=image&apiName=upload&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/image/upload document }
             *
             * 上传图片
             *
             * 上传图片
             */
            upload: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/okr/v1/images/upload`, path2),
                method: "POST",
                data,
                params,
                headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              return (res === null || res === void 0 ? void 0 : res.data) || null;
            }), "upload")
          },
          /**
           * OKR
           */
          okr: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=okr&resource=okr&apiName=batch_get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/okr/batch_get document }
             *
             * 批量获取OKR
             *
             * 根据OKR id批量获取OKR
             *
             * 使用<md-tag mode="inline" type="token-tenant">tenant_access_token</md-tag>需要额外申请权限<md-perm ;href="https://open.feishu.cn/document/ukTMukTMukTM/uQjN3QjL0YzN04CN2cDN">以应用身份访问OKR信息</md-perm>
             */
            batchGet: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/okr/v1/okrs/batch_get`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchGet")
          },
          /**
           * OKR周期
           */
          period: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=okr&resource=period&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/period/create document }
             *
             * 创建 OKR 周期
             *
             * 根据周期规则创建一个 OKR 周期
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/okr/v1/periods`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=okr&resource=period&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/period/list document }
             *
             * 获取OKR周期列表
             *
             * 获取OKR周期列表
             *
             * 使用<md-tag mode="inline" type="token-tenant">tenant_access_token</md-tag>需要额外申请权限<md-perm ;href="https://open.feishu.cn/document/ukTMukTMukTM/uQjN3QjL0YzN04CN2cDN">以应用身份访问OKR信息</md-perm>
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/okr/v1/periods`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=okr&resource=period&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/period/patch document }
             *
             * 修改 OKR 周期状态
             *
             * 修改某个 OKR 周期的状态为「正常」、「失效」或「隐藏」，对租户所有人生效，请谨慎操作
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/okr/v1/periods/:period_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 周期规则
           */
          periodRule: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=okr&resource=period_rule&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/period_rule/list document }
             *
             * 获取 OKR 周期规则
             *
             * 获取租户的周期规则列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/okr/v1/period_rules`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * OKR进展记录
           */
          progressRecord: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=okr&resource=progress_record&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/progress_record/create document }
             *
             * 创建OKR进展记录
             *
             * 创建OKR进展记录
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/okr/v1/progress_records`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=okr&resource=progress_record&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/progress_record/delete document }
             *
             * 删除OKR进展记录
             *
             * 根据ID删除OKR进展记录
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=okr&resource=progress_record&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/progress_record/get document }
             *
             * 获取OKR进展记录
             *
             * 根据ID获取OKR进展记录详情
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=okr&resource=progress_record&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/progress_record/update document }
             *
             * 更新OKR进展记录
             *
             * 根据OKR进展记录ID更新进展详情
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 复盘（灰度租户可见）
           */
          review: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=okr&resource=review&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/review/query document }
             *
             * 查询复盘信息
             *
             * 根据周期和用户查询复盘信息。
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/okr/v1/reviews/query`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query")
          },
          /**
           * 用户OKR
           */
          userOkr: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=okr&resource=user.okr&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/user-okr/list document }
             *
             * 获取用户的OKR列表
             *
             * 根据用户的id获取OKR列表
             *
             * 使用<md-tag mode="inline" type="token-tenant">tenant_access_token</md-tag>需要额外申请权限<md-perm ;href="https://open.feishu.cn/document/ukTMukTMukTM/uQjN3QjL0YzN04CN2cDN">以应用身份访问OKR信息</md-perm>
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/okr/v1/users/:user_id/okrs`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          v1: {
            /**
             * 图片
             */
            image: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=okr&resource=image&apiName=upload&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/image/upload document }
               *
               * 上传图片
               *
               * 上传图片
               */
              upload: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/okr/v1/images/upload`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "upload")
            },
            /**
             * OKR
             */
            okr: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=okr&resource=okr&apiName=batch_get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/okr/batch_get document }
               *
               * 批量获取OKR
               *
               * 根据OKR id批量获取OKR
               *
               * 使用<md-tag mode="inline" type="token-tenant">tenant_access_token</md-tag>需要额外申请权限<md-perm ;href="https://open.feishu.cn/document/ukTMukTMukTM/uQjN3QjL0YzN04CN2cDN">以应用身份访问OKR信息</md-perm>
               */
              batchGet: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/okr/v1/okrs/batch_get`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchGet")
            },
            /**
             * OKR周期
             */
            period: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=okr&resource=period&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/period/create document }
               *
               * 创建 OKR 周期
               *
               * 根据周期规则创建一个 OKR 周期
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/okr/v1/periods`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=okr&resource=period&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/period/list document }
               *
               * 获取OKR周期列表
               *
               * 获取OKR周期列表
               *
               * 使用<md-tag mode="inline" type="token-tenant">tenant_access_token</md-tag>需要额外申请权限<md-perm ;href="https://open.feishu.cn/document/ukTMukTMukTM/uQjN3QjL0YzN04CN2cDN">以应用身份访问OKR信息</md-perm>
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/okr/v1/periods`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=okr&resource=period&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/period/patch document }
               *
               * 修改 OKR 周期状态
               *
               * 修改某个 OKR 周期的状态为「正常」、「失效」或「隐藏」，对租户所有人生效，请谨慎操作
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/okr/v1/periods/:period_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 周期规则
             */
            periodRule: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=okr&resource=period_rule&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/period_rule/list document }
               *
               * 获取 OKR 周期规则
               *
               * 获取租户的周期规则列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/okr/v1/period_rules`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * OKR进展记录
             */
            progressRecord: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=okr&resource=progress_record&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/progress_record/create document }
               *
               * 创建OKR进展记录
               *
               * 创建OKR进展记录
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/okr/v1/progress_records`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=okr&resource=progress_record&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/progress_record/delete document }
               *
               * 删除OKR进展记录
               *
               * 根据ID删除OKR进展记录
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=okr&resource=progress_record&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/progress_record/get document }
               *
               * 获取OKR进展记录
               *
               * 根据ID获取OKR进展记录详情
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=okr&resource=progress_record&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/progress_record/update document }
               *
               * 更新OKR进展记录
               *
               * 根据OKR进展记录ID更新进展详情
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 复盘（灰度租户可见）
             */
            review: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=okr&resource=review&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/review/query document }
               *
               * 查询复盘信息
               *
               * 根据周期和用户查询复盘信息。
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/okr/v1/reviews/query`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * 用户OKR
             */
            userOkr: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=okr&resource=user.okr&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/user-okr/list document }
               *
               * 获取用户的OKR列表
               *
               * 根据用户的id获取OKR列表
               *
               * 使用<md-tag mode="inline" type="token-tenant">tenant_access_token</md-tag>需要额外申请权限<md-perm ;href="https://open.feishu.cn/document/ukTMukTMukTM/uQjN3QjL0YzN04CN2cDN">以应用身份访问OKR信息</md-perm>
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/okr/v1/users/:user_id/okrs`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            }
          }
        };
      }
    };
    var Client$n = class extends Client$o {
      static {
        __name(this, "Client$n");
      }
      constructor() {
        super(...arguments);
        this.optical_char_recognition = {
          /**
           * 图片识别
           */
          image: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=optical_char_recognition&resource=image&apiName=basic_recognize&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/optical_char_recognition-v1/image/basic_recognize document }
             *
             * 基础图片识别 (OCR)
             *
             * 可识别图片中的文字，按图片中的区域划分，分段返回文本列表
             *
             * 单租户限流：20QPS，同租户下的应用没有限流，共享本租户的 20QPS 限流
             */
            basicRecognize: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/optical_char_recognition/v1/image/basic_recognize`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "basicRecognize")
          },
          v1: {
            /**
             * 图片识别
             */
            image: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=optical_char_recognition&resource=image&apiName=basic_recognize&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/optical_char_recognition-v1/image/basic_recognize document }
               *
               * 基础图片识别 (OCR)
               *
               * 可识别图片中的文字，按图片中的区域划分，分段返回文本列表
               *
               * 单租户限流：20QPS，同租户下的应用没有限流，共享本租户的 20QPS 限流
               */
              basicRecognize: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/optical_char_recognition/v1/image/basic_recognize`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "basicRecognize")
            }
          }
        };
      }
    };
    var Client$m = class extends Client$n {
      static {
        __name(this, "Client$m");
      }
      constructor() {
        super(...arguments);
        this.passport = {
          /**
           * 登录态
           */
          session: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=passport&resource=session&apiName=logout&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=logout&project=passport&resource=session&version=v1 document }
             */
            logout: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/passport/v1/sessions/logout`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "logout"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=passport&resource=session&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/passport-v1/session/query document }
             *
             * 批量获取用户登录信息（脱敏）
             *
             * 该接口用于查询用户的登录信息
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/passport/v1/sessions/query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query")
          },
          v1: {
            /**
             * 登录态
             */
            session: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=passport&resource=session&apiName=logout&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=logout&project=passport&resource=session&version=v1 document }
               */
              logout: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/passport/v1/sessions/logout`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "logout"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=passport&resource=session&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/passport-v1/session/query document }
               *
               * 批量获取用户登录信息（脱敏）
               *
               * 该接口用于查询用户的登录信息
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/passport/v1/sessions/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            }
          }
        };
      }
    };
    var Client$l = class extends Client$m {
      static {
        __name(this, "Client$l");
      }
      constructor() {
        super(...arguments);
        this.payroll = {
          v1: {
            /**
             * acct_item
             */
            acctItem: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/payroll/v1/acct_items`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=payroll&resource=acct_item&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=payroll&resource=acct_item&version=v1 document }
               *
               * 批量查询算薪项
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/payroll/v1/acct_items`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * cost_allocation_detail
             */
            costAllocationDetail: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/payroll/v1/cost_allocation_details`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=payroll&resource=cost_allocation_detail&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=payroll&resource=cost_allocation_detail&version=v1 document }
               *
               * 获取成本分摊报表明细数据
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/payroll/v1/cost_allocation_details`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * cost_allocation_plan
             */
            costAllocationPlan: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/payroll/v1/cost_allocation_plans`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=payroll&resource=cost_allocation_plan&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=payroll&resource=cost_allocation_plan&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/payroll/v1/cost_allocation_plans`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * cost_allocation_report
             */
            costAllocationReport: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/payroll/v1/cost_allocation_reports`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=payroll&resource=cost_allocation_report&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=payroll&resource=cost_allocation_report&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/payroll/v1/cost_allocation_reports`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * datasource
             */
            datasource: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/payroll/v1/datasources`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=payroll&resource=datasource&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=payroll&resource=datasource&version=v1 document }
               *
               * 获取外部数据源设置列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/payroll/v1/datasources`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * datasource_record
             */
            datasourceRecord: {
              queryWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/payroll/v1/datasource_records/query`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "queryWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=payroll&resource=datasource_record&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=payroll&resource=datasource_record&version=v1 document }
               *
               * 获取外部数据源记录
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/payroll/v1/datasource_records/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=payroll&resource=datasource_record&apiName=save&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=save&project=payroll&resource=datasource_record&version=v1 document }
               *
               * 外部数据记录批量保存接口
               */
              save: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/payroll/v1/datasource_records/save`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "save")
            },
            /**
             * paygroup
             */
            paygroup: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/payroll/v1/paygroups`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=payroll&resource=paygroup&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=payroll&resource=paygroup&version=v1 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/payroll/v1/paygroups`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * payment_activity
             */
            paymentActivity: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=payroll&resource=payment_activity&apiName=archive&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=archive&project=payroll&resource=payment_activity&version=v1 document }
               *
               * 封存发薪活动
               */
              archive: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/payroll/v1/payment_activitys/archive`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "archive"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/payroll/v1/payment_activitys`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=payroll&resource=payment_activity&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=payroll&resource=payment_activity&version=v1 document }
               *
               * 根据发薪起止日和审批状态分页查询发薪活动列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/payroll/v1/payment_activitys`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * payment_activity_detail
             */
            paymentActivityDetail: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=payroll&resource=payment_activity_detail&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=payroll&resource=payment_activity_detail&version=v1 document }
               *
               * 根据发薪活动 ID 和分页参数获取发薪活动明细列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/payroll/v1/payment_activity_details`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * payment_detail
             */
            paymentDetail: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=payroll&resource=payment_detail&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=payroll&resource=payment_detail&version=v1 document }
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/payroll/v1/payment_detail/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            }
          }
        };
      }
    };
    var Client$k = class extends Client$l {
      static {
        __name(this, "Client$k");
      }
      constructor() {
        super(...arguments);
        this.people_admin = {};
      }
    };
    var Client$j = class extends Client$k {
      static {
        __name(this, "Client$j");
      }
      constructor() {
        super(...arguments);
        this.people_bytedance = {};
      }
    };
    var Client$i = class extends Client$j {
      static {
        __name(this, "Client$i");
      }
      constructor() {
        super(...arguments);
        this.performance = {
          v2: {
            /**
             * activity
             */
            activity: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=performance&resource=activity&apiName=query&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=performance&resource=activity&version=v2 document }
               *
               * 获取项目的信息
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/performance/v2/activity/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * additional_information
             */
            additionalInformation: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=performance&resource=additional_information&apiName=import&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=import&project=performance&resource=additional_information&version=v2 document }
               *
               * 可批量导入被评估人的补充信息作为评估参考（包括新增和更新场景）
               */
              import: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/performance/v2/additional_informations/import`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "import"),
              queryWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/performance/v2/additional_informations/query`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "queryWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=performance&resource=additional_information&apiName=query&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=performance&resource=additional_information&version=v2 document }
               *
               * 可批量查询被评估人的补充信息
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/performance/v2/additional_informations/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * additional_informations.batch
             */
            additionalInformationsBatch: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=performance&resource=additional_informations.batch&apiName=delete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=performance&resource=additional_informations.batch&version=v2 document }
               *
               * 批量删除补充信息
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/performance/v2/additional_informations/batch`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete")
            },
            /**
             * indicator
             */
            indicator: {
              queryWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/performance/v2/indicators/query`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "queryWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=performance&resource=indicator&apiName=query&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=performance&resource=indicator&version=v2 document }
               *
               * 获取评估题配置
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/performance/v2/indicators/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * metric_detail
             */
            metricDetail: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=performance&resource=metric_detail&apiName=import&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=import&project=performance&resource=metric_detail&version=v2 document }
               *
               * 批量录入指定周期被评估人的关键指标详情
               */
              import: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/performance/v2/metric_details/import`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "import"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=performance&resource=metric_detail&apiName=query&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=performance&resource=metric_detail&version=v2 document }
               *
               * 批量获取指定周期中被评估人的关键指标详情
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/performance/v2/metric_details/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * metric_field
             */
            metricField: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=performance&resource=metric_field&apiName=query&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=performance&resource=metric_field&version=v2 document }
               *
               * 获取指标的字段基础信息
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/performance/v2/metric_fields/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * metric_lib
             */
            metricLib: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=performance&resource=metric_lib&apiName=query&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=performance&resource=metric_lib&version=v2 document }
               *
               * 获取指标库的信息
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/performance/v2/metric_libs/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * metric_tag
             */
            metricTag: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/performance/v2/metric_tags`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=performance&resource=metric_tag&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=performance&resource=metric_tag&version=v2 document }
               *
               * 获取指标标签列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/performance/v2/metric_tags`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * metric_template
             */
            metricTemplate: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=performance&resource=metric_template&apiName=query&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=performance&resource=metric_template&version=v2 document }
               *
               * 获取指标模板的信息
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/performance/v2/metric_templates/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * question
             */
            question: {
              queryWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/performance/v2/questions/query`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "queryWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=performance&resource=question&apiName=query&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=performance&resource=question&version=v2 document }
               *
               * 获取标签填写题配置
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/performance/v2/questions/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * review_data
             */
            reviewData: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=performance&resource=review_data&apiName=query&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=performance&resource=review_data&version=v2 document }
               *
               * 获取绩效详情V2
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/performance/v2/review_datas/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * review_template
             */
            reviewTemplate: {
              queryWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/performance/v2/review_templates/query`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "queryWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=performance&resource=review_template&apiName=query&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=performance&resource=review_template&version=v2 document }
               *
               * 获取评估模板配置
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/performance/v2/review_templates/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * reviewee
             */
            reviewee: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=performance&resource=reviewee&apiName=query&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=performance&resource=reviewee&version=v2 document }
               *
               * 获取指定周期参与了的被评估人
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/performance/v2/reviewees/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * user_group_user_rel
             */
            userGroupUserRel: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=performance&resource=user_group_user_rel&apiName=write&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=write&project=performance&resource=user_group_user_rel&version=v2 document }
               *
               * 写入人员组成员范围
               */
              write: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/performance/v2/user_group_user_rels/write`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "write")
            },
            /**
             * user_info
             */
            userInfo: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=performance&resource=user_info&apiName=query&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=performance&resource=user_info&version=v2 document }
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/performance/v2/user_info/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            }
          }
        };
      }
    };
    var Client$h = class extends Client$i {
      static {
        __name(this, "Client$h");
      }
      constructor() {
        super(...arguments);
        this.personal_settings = {
          /**
           * 系统状态
           */
          systemStatus: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=personal_settings&resource=system_status&apiName=batch_close&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/batch_close document }
             *
             * 批量关闭系统状态
             *
             * 批量关闭用户系统状态可用
             */
            batchClose: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_close`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchClose"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=personal_settings&resource=system_status&apiName=batch_open&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/batch_open document }
             *
             * 批量开启系统状态
             *
             * 批量开启用户系统状态可用
             */
            batchOpen: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_open`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchOpen"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=personal_settings&resource=system_status&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/create document }
             *
             * 创建系统状态
             *
             * 创建租户维度的系统状态。
             *
             * 注意事项:;- 操作的数据为租户维度数据，请小心操作。;- 每个租户最多创建10个系统状态。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=personal_settings&resource=system_status&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/delete document }
             *
             * 删除系统状态
             *
             * 删除租户维度的系统状态。
             *
             * 注意事项：;- 操作的数据为租户维度数据，请小心操作。 ;- 删除系统状态后，并不影响正在使用该状态用户下系统状态的客户端展示。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=personal_settings&resource=system_status&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/list document }
             *
             * 获取系统状态
             *
             * 获取租户下所有系统状态
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=personal_settings&resource=system_status&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/patch document }
             *
             * 修改系统状态
             *
             * 修改租户维度系统状态。
             *
             * 注意事项：;- 操作的数据为租户维度数据，请小心操作。 ;- 修改系统状态后，并不影响正在使用的用户。该用户的系统状态可用时间到期后，再次被开启可用的时候，用户客户端才会同步到更新后的系统状态。
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          v1: {
            /**
             * 系统状态
             */
            systemStatus: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=personal_settings&resource=system_status&apiName=batch_close&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/batch_close document }
               *
               * 批量关闭系统状态
               *
               * 批量关闭用户系统状态可用
               */
              batchClose: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_close`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchClose"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=personal_settings&resource=system_status&apiName=batch_open&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/batch_open document }
               *
               * 批量开启系统状态
               *
               * 批量开启用户系统状态可用
               */
              batchOpen: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_open`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchOpen"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=personal_settings&resource=system_status&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/create document }
               *
               * 创建系统状态
               *
               * 创建租户维度的系统状态。
               *
               * 注意事项:;- 操作的数据为租户维度数据，请小心操作。;- 每个租户最多创建10个系统状态。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=personal_settings&resource=system_status&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/delete document }
               *
               * 删除系统状态
               *
               * 删除租户维度的系统状态。
               *
               * 注意事项：;- 操作的数据为租户维度数据，请小心操作。 ;- 删除系统状态后，并不影响正在使用该状态用户下系统状态的客户端展示。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=personal_settings&resource=system_status&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/list document }
               *
               * 获取系统状态
               *
               * 获取租户下所有系统状态
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=personal_settings&resource=system_status&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/patch document }
               *
               * 修改系统状态
               *
               * 修改租户维度系统状态。
               *
               * 注意事项：;- 操作的数据为租户维度数据，请小心操作。 ;- 修改系统状态后，并不影响正在使用的用户。该用户的系统状态可用时间到期后，再次被开启可用的时候，用户客户端才会同步到更新后的系统状态。
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            }
          }
        };
      }
    };
    var Client$g = class extends Client$h {
      static {
        __name(this, "Client$g");
      }
      constructor() {
        super(...arguments);
        this.report = {
          /**
           * 规则
           */
          rule: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=report&resource=rule&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/report/report-v1/rule/query document }
             *
             * 规则查询
             *
             * 规则查询
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/report/v1/rules/query`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query")
          },
          /**
           * 规则看板
           */
          ruleView: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=report&resource=rule.view&apiName=remove&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/report/report-v1/rule-view/remove document }
             *
             * 移除规则看板
             *
             * 移除规则看板
             */
            remove: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/report/v1/rules/:rule_id/views/remove`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "remove")
          },
          /**
           * 任务
           */
          task: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=report&resource=task&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/report/report-v1/task/query document }
             *
             * 任务查询
             *
             * 任务查询
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/report/v1/tasks/query`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query")
          },
          v1: {
            /**
             * 规则
             */
            rule: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=report&resource=rule&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/report/report-v1/rule/query document }
               *
               * 规则查询
               *
               * 规则查询
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/report/v1/rules/query`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * 规则看板
             */
            ruleView: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=report&resource=rule.view&apiName=remove&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/report/report-v1/rule-view/remove document }
               *
               * 移除规则看板
               *
               * 移除规则看板
               */
              remove: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/report/v1/rules/:rule_id/views/remove`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "remove")
            },
            /**
             * 任务
             */
            task: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=report&resource=task&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/report/report-v1/task/query document }
               *
               * 任务查询
               *
               * 任务查询
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/report/v1/tasks/query`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            }
          }
        };
      }
    };
    var Client$f = class extends Client$g {
      static {
        __name(this, "Client$f");
      }
      constructor() {
        super(...arguments);
        this.search_in_app = {};
      }
    };
    var Client$e = class extends Client$f {
      static {
        __name(this, "Client$e");
      }
      constructor() {
        super(...arguments);
        this.search = {
          /**
           * app
           */
          app: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=search&resource=app&apiName=create&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=search&resource=app&version=v2 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/search/v2/app`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create")
          },
          /**
           * 数据源
           */
          dataSource: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source&apiName=create&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/create document }
             *
             * 创建数据源
             *
             * 创建一个数据源
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source&apiName=delete&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/delete document }
             *
             * 删除数据源
             *
             * 删除一个已存在的数据源
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source&apiName=get&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/get document }
             *
             * 获取数据源
             *
             * 获取已经创建的数据源
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source&apiName=list&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/list document }
             *
             * 批量获取数据源
             *
             * 批量获取创建的数据源信息
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source&apiName=patch&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/patch document }
             *
             * 修改数据源
             *
             * 更新一个已经存在的数据源
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 数据项
           */
          dataSourceItem: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source.item&apiName=create&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/create document }
             *
             * 索引数据项
             *
             * 索引一条数据记录
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source.item&apiName=delete&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/delete document }
             *
             * 删除数据项
             *
             * 删除数据项
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source.item&apiName=get&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/get document }
             *
             * 获取数据项
             *
             * 获取单个数据记录
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          /**
           * doc_wiki
           */
          docWiki: {
            searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/search/v2/doc_wiki/search`, path2),
                  method: "POST",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "searchWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=search&resource=doc_wiki&apiName=search&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=search&resource=doc_wiki&version=v2 document }
             *
             * 搜索文档和Wiki
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/search/v2/doc_wiki/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search")
          },
          /**
           * message
           */
          message: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=search&resource=message&apiName=create&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=search&resource=message&version=v2 document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/search/v2/message`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create")
          },
          /**
           * 数据范式
           */
          schema: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=search&resource=schema&apiName=create&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/create document }
             *
             * 创建数据范式
             *
             * 创建一个数据范式
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/search/v2/schemas`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=search&resource=schema&apiName=delete&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/delete document }
             *
             * 删除数据范式
             *
             * 删除已存在的数据范式
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/search/v2/schemas/:schema_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=search&resource=schema&apiName=get&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/get document }
             *
             * 获取数据范式
             *
             * 获取单个数据范式
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/search/v2/schemas/:schema_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=search&resource=schema&apiName=patch&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/patch document }
             *
             * 修改数据范式
             *
             * 修改数据范式
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/search/v2/schemas/:schema_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          v2: {
            /**
             * app
             */
            app: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=search&resource=app&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=search&resource=app&version=v2 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/search/v2/app`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create")
            },
            /**
             * 数据源
             */
            dataSource: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/create document }
               *
               * 创建数据源
               *
               * 创建一个数据源
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source&apiName=delete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/delete document }
               *
               * 删除数据源
               *
               * 删除一个已存在的数据源
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source&apiName=get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/get document }
               *
               * 获取数据源
               *
               * 获取已经创建的数据源
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/list document }
               *
               * 批量获取数据源
               *
               * 批量获取创建的数据源信息
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/patch document }
               *
               * 修改数据源
               *
               * 更新一个已经存在的数据源
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 数据项
             */
            dataSourceItem: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source.item&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/create document }
               *
               * 索引数据项
               *
               * 索引一条数据记录
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source.item&apiName=delete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/delete document }
               *
               * 删除数据项
               *
               * 删除数据项
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source.item&apiName=get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/get document }
               *
               * 获取数据项
               *
               * 获取单个数据记录
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * doc_wiki
             */
            docWiki: {
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/search/v2/doc_wiki/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=search&resource=doc_wiki&apiName=search&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=search&resource=doc_wiki&version=v2 document }
               *
               * 搜索文档和Wiki
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/search/v2/doc_wiki/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * message
             */
            message: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=search&resource=message&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=search&resource=message&version=v2 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/search/v2/message`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create")
            },
            /**
             * 数据范式
             */
            schema: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=search&resource=schema&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/create document }
               *
               * 创建数据范式
               *
               * 创建一个数据范式
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/search/v2/schemas`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=search&resource=schema&apiName=delete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/delete document }
               *
               * 删除数据范式
               *
               * 删除已存在的数据范式
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/search/v2/schemas/:schema_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=search&resource=schema&apiName=get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/get document }
               *
               * 获取数据范式
               *
               * 获取单个数据范式
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/search/v2/schemas/:schema_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=search&resource=schema&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/patch document }
               *
               * 修改数据范式
               *
               * 修改数据范式
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/search/v2/schemas/:schema_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            }
          }
        };
      }
    };
    var Client$d = class extends Client$e {
      static {
        __name(this, "Client$d");
      }
      constructor() {
        super(...arguments);
        this.security_and_compliance = {
          /**
           * multi_geo_entity.tenant
           */
          multiGeoEntityTenant: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=multi_geo_entity.tenant&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=security_and_compliance&resource=multi_geo_entity.tenant&version=v1 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v1/multi_geo_entity/tenant`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          /**
           * openapi_log
           */
          openapiLog: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=openapi_log&apiName=list_data&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list_data&project=security_and_compliance&resource=openapi_log&version=v1 document }
             */
            listData: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v1/openapi_logs/list_data`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "listData")
          },
          /**
           * 用户迁移
           */
          userMigration: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=user_migration&apiName=cancel&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v1/user_migration/cancel document }
             */
            cancel: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/cancel`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "cancel"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=user_migration&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v1/user_migration/create document }
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=user_migration&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v1/user_migration/get document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/:user_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=user_migration&apiName=search&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v1/user_migration/search document }
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search")
          },
          v1: {
            /**
             * multi_geo_entity.tenant
             */
            multiGeoEntityTenant: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=multi_geo_entity.tenant&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=security_and_compliance&resource=multi_geo_entity.tenant&version=v1 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v1/multi_geo_entity/tenant`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * openapi_log
             */
            openapiLog: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=openapi_log&apiName=list_data&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list_data&project=security_and_compliance&resource=openapi_log&version=v1 document }
               */
              listData: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v1/openapi_logs/list_data`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "listData")
            },
            /**
             * 用户迁移
             */
            userMigration: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=user_migration&apiName=cancel&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v1/user_migration/cancel document }
               */
              cancel: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/cancel`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "cancel"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=user_migration&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v1/user_migration/create document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=user_migration&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v1/user_migration/get document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/:user_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=user_migration&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v1/user_migration/search document }
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v1/user_migrations/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            }
          },
          v2: {
            /**
             * device_apply_record
             */
            deviceApplyRecord: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=device_apply_record&apiName=update&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=security_and_compliance&resource=device_apply_record&version=v2 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_apply_records/:device_apply_record_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * device_record
             */
            deviceRecord: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=device_record&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=security_and_compliance&resource=device_record&version=v2 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_records`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=device_record&apiName=delete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=security_and_compliance&resource=device_record&version=v2 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=device_record&apiName=get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=security_and_compliance&resource=device_record&version=v2 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_records`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=device_record&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=security_and_compliance&resource=device_record&version=v2 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_records`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=device_record&apiName=mine&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=mine&project=security_and_compliance&resource=device_record&version=v2 document }
               */
              mine: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_records/mine`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "mine"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=device_record&apiName=update&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=security_and_compliance&resource=device_record&version=v2 document }
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            }
          }
        };
      }
    };
    var Client$c = class extends Client$d {
      static {
        __name(this, "Client$c");
      }
      constructor() {
        super(...arguments);
        this.sheets = {
          /**
           * 表格
           */
          spreadsheet: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet&apiName=create&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet/create document }
             *
             * 创建表格
             *
             * 在指定目录下创建表格
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet&apiName=get&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet/get document }
             *
             * 获取电子表格信息
             *
             * 该接口用于获取电子表格的基础信息。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet&apiName=patch&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet/patch document }
             *
             * 修改电子表格属性
             *
             * 该接口用于修改电子表格的属性
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * 筛选
           */
          spreadsheetSheetFilter: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter&apiName=create&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter/create document }
             *
             * 创建筛选
             *
             * 在子表内创建筛选。
             *
             * 参数值可参考[筛选指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter/filter-user-guide)
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter&apiName=delete&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter/delete document }
             *
             * 删除筛选
             *
             * 删除子表的筛选
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter&apiName=get&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter/get document }
             *
             * 获取筛选
             *
             * 获取子表的详细筛选信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter&apiName=update&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter/update document }
             *
             * 更新筛选
             *
             * 更新子表筛选范围中的列筛选条件。
             *
             * 参数值可参考[筛选指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter/filter-user-guide)
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 筛选条件
           */
          spreadsheetSheetFilterViewCondition: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter_view.condition&apiName=create&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view-condition/create document }
             *
             * 创建筛选条件
             *
             * 在筛选视图的筛选范围的某一列创建筛选条件。
             *
             * 筛选条件参考 [筛选视图的筛选条件指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view-condition/filter-view-condition-user-guide)
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter_view.condition&apiName=delete&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view-condition/delete document }
             *
             * 删除筛选条件
             *
             * 删除筛选视图的筛选范围某一列的筛选条件。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter_view.condition&apiName=get&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view-condition/get document }
             *
             * 获取筛选条件
             *
             * 获取筛选视图某列的筛选条件信息。
             *
             * 筛选条件含义参考 [筛选视图的筛选条件指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view-condition/filter-view-condition-user-guide)
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter_view.condition&apiName=query&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view-condition/query document }
             *
             * 查询筛选条件
             *
             * 查询一个筛选视图的所有筛选条件，返回筛选视图的筛选范围内的筛选条件。
             *
             * 筛选条件含义可参考 [筛选视图的筛选条件指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view-condition/filter-view-condition-user-guide)
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/query`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter_view.condition&apiName=update&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view-condition/update document }
             *
             * 更新筛选条件
             *
             * 更新筛选视图范围的某列的筛选条件，condition id 即为列的字母号。
             *
             * 筛选条件参数可参考 [筛选视图的筛选条件指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view-condition/filter-view-condition-user-guide)
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 筛选视图
           */
          spreadsheetSheetFilterView: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter_view&apiName=create&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view/create document }
             *
             * 创建筛选视图
             *
             * 根据传入的参数创建一个筛选视图。Id 和 名字可选，不填的话会默认生成；range 必填。Id 长度为10，由 0-9、a-z、A-Z 组合生成。名字长度不超过100。单个子表内的筛选视图个数不超过 150。
             *
             * 筛选范围的设置参考：[筛选视图的筛选条件指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view-condition/filter-view-condition-user-guide)
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter_view&apiName=delete&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view/delete document }
             *
             * 删除筛选视图
             *
             * 删除指定 id 对应的筛选视图。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter_view&apiName=get&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view/get document }
             *
             * 获取筛选视图
             *
             * 获取指定筛选视图 id 的名字和筛选范围。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter_view&apiName=patch&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view/patch document }
             *
             * 更新筛选视图
             *
             * 更新筛选视图的名字或者筛选范围。名字长度不超过100，不能重复即子表内唯一；筛选范围不超过子表的最大范围。
             *
             * 筛选范围的设置参考：[筛选视图的筛选条件指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view-condition/filter-view-condition-user-guide)
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter_view&apiName=query&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view/query document }
             *
             * 查询筛选视图
             *
             * 查询子表内所有的筛选视图基本信息，包括 id、name 和 range
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/query`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query")
          },
          /**
           * 工作表
           */
          spreadsheetSheet: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet&apiName=find&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet/find document }
             *
             * 查找单元格
             *
             * 在指定范围内查找符合查找条件的单元格。
             */
            find: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/find`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "find"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet&apiName=get&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet/get document }
             *
             * 查询工作表
             *
             * 该接口用于通过工作表ID查询工作表属性信息。
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet&apiName=move_dimension&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet/move_dimension document }
             *
             * 移动行列
             *
             * 该接口用于移动行列，行列被移动到目标位置后，原本在目标位置的行列会对应右移或下移。
             */
            moveDimension: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/move_dimension`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "moveDimension"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet&apiName=query&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet/query document }
             *
             * 获取工作表
             *
             * 该接口用于获取电子表格下所有工作表及其属性。
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/query`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet&apiName=replace&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet/replace document }
             *
             * 替换单元格
             *
             * 按照指定的条件查找子表的某个范围内的数据符合条件的单元格并替换值，返回替换成功的单元格位置。一次请求最多允许替换5000个单元格，如果超过请将range缩小范围再操作。请求体中的 range、find、replaccement 字段必填。
             */
            replace: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/replace`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "replace")
          },
          /**
           * 浮动图片
           */
          spreadsheetSheetFloatImage: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.float_image&apiName=create&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-float_image/create document }
             *
             * 创建浮动图片
             *
             * 根据传入的参数创建一张浮动图片。Float_image_token （[上传图片至表格后得到](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/upload_all)）和range（只支持一个单元格） 必填。Float_image_id 可选，不填的话会默认生成，长度为10，由 0-9、a-z、A-Z 组合生成。表格内不重复的图片（浮动图片+单元格图片）总数不超过4000。width 和 height 为图片展示的宽高，可选，不填的话会使用图片的真实宽高。offset_x 和 offset_y 为图片左上角距离所在单元格左上角的偏移，可选，默认为 0。
             *
             * 浮动图片的设置参考：[浮动图片指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-float_image/float-image-user-guide)
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.float_image&apiName=delete&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-float_image/delete document }
             *
             * 删除浮动图片
             *
             * 删除 float_image_id 对应的浮动图片。
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.float_image&apiName=get&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-float_image/get document }
             *
             * 获取浮动图片
             *
             * 根据 float_image_id 获取对应浮动图片的信息。
             *
             * 浮动图片参考：[浮动图片指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-float_image/float-image-user-guide)
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.float_image&apiName=patch&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-float_image/patch document }
             *
             * 更新浮动图片
             *
             * 更新已有的浮动图片位置和宽高，包括 range、width、height、offset_x 和 offset_y，不包括 float_image_id 和 float_image_token。
             *
             * 浮动图片更新参考：[浮动图片指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-float_image/float-image-user-guide)
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.float_image&apiName=query&version=v3 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-float_image/query document }
             *
             * 查询浮动图片
             *
             * 返回子表内所有的浮动图片信息。
             *
             * 浮动图片参考：[浮动图片指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-float_image/float-image-user-guide)
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/query`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query")
          },
          v3: {
            /**
             * 表格
             */
            spreadsheet: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet&apiName=create&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet/create document }
               *
               * 创建表格
               *
               * 在指定目录下创建表格
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet&apiName=get&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet/get document }
               *
               * 获取电子表格信息
               *
               * 该接口用于获取电子表格的基础信息。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet&apiName=patch&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet/patch document }
               *
               * 修改电子表格属性
               *
               * 该接口用于修改电子表格的属性
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * 筛选
             */
            spreadsheetSheetFilter: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter&apiName=create&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter/create document }
               *
               * 创建筛选
               *
               * 在子表内创建筛选。
               *
               * 参数值可参考[筛选指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter/filter-user-guide)
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter&apiName=delete&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter/delete document }
               *
               * 删除筛选
               *
               * 删除子表的筛选
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter&apiName=get&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter/get document }
               *
               * 获取筛选
               *
               * 获取子表的详细筛选信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter&apiName=update&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter/update document }
               *
               * 更新筛选
               *
               * 更新子表筛选范围中的列筛选条件。
               *
               * 参数值可参考[筛选指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter/filter-user-guide)
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 筛选条件
             */
            spreadsheetSheetFilterViewCondition: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter_view.condition&apiName=create&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view-condition/create document }
               *
               * 创建筛选条件
               *
               * 在筛选视图的筛选范围的某一列创建筛选条件。
               *
               * 筛选条件参考 [筛选视图的筛选条件指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view-condition/filter-view-condition-user-guide)
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter_view.condition&apiName=delete&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view-condition/delete document }
               *
               * 删除筛选条件
               *
               * 删除筛选视图的筛选范围某一列的筛选条件。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter_view.condition&apiName=get&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view-condition/get document }
               *
               * 获取筛选条件
               *
               * 获取筛选视图某列的筛选条件信息。
               *
               * 筛选条件含义参考 [筛选视图的筛选条件指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view-condition/filter-view-condition-user-guide)
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter_view.condition&apiName=query&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view-condition/query document }
               *
               * 查询筛选条件
               *
               * 查询一个筛选视图的所有筛选条件，返回筛选视图的筛选范围内的筛选条件。
               *
               * 筛选条件含义可参考 [筛选视图的筛选条件指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view-condition/filter-view-condition-user-guide)
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/query`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter_view.condition&apiName=update&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view-condition/update document }
               *
               * 更新筛选条件
               *
               * 更新筛选视图范围的某列的筛选条件，condition id 即为列的字母号。
               *
               * 筛选条件参数可参考 [筛选视图的筛选条件指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view-condition/filter-view-condition-user-guide)
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 筛选视图
             */
            spreadsheetSheetFilterView: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter_view&apiName=create&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view/create document }
               *
               * 创建筛选视图
               *
               * 根据传入的参数创建一个筛选视图。Id 和 名字可选，不填的话会默认生成；range 必填。Id 长度为10，由 0-9、a-z、A-Z 组合生成。名字长度不超过100。单个子表内的筛选视图个数不超过 150。
               *
               * 筛选范围的设置参考：[筛选视图的筛选条件指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view-condition/filter-view-condition-user-guide)
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter_view&apiName=delete&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view/delete document }
               *
               * 删除筛选视图
               *
               * 删除指定 id 对应的筛选视图。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter_view&apiName=get&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view/get document }
               *
               * 获取筛选视图
               *
               * 获取指定筛选视图 id 的名字和筛选范围。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter_view&apiName=patch&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view/patch document }
               *
               * 更新筛选视图
               *
               * 更新筛选视图的名字或者筛选范围。名字长度不超过100，不能重复即子表内唯一；筛选范围不超过子表的最大范围。
               *
               * 筛选范围的设置参考：[筛选视图的筛选条件指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view-condition/filter-view-condition-user-guide)
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.filter_view&apiName=query&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view/query document }
               *
               * 查询筛选视图
               *
               * 查询子表内所有的筛选视图基本信息，包括 id、name 和 range
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/query`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * 工作表
             */
            spreadsheetSheet: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet&apiName=find&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet/find document }
               *
               * 查找单元格
               *
               * 在指定范围内查找符合查找条件的单元格。
               */
              find: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/find`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "find"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet&apiName=get&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet/get document }
               *
               * 查询工作表
               *
               * 该接口用于通过工作表ID查询工作表属性信息。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet&apiName=move_dimension&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet/move_dimension document }
               *
               * 移动行列
               *
               * 该接口用于移动行列，行列被移动到目标位置后，原本在目标位置的行列会对应右移或下移。
               */
              moveDimension: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/move_dimension`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "moveDimension"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet&apiName=query&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet/query document }
               *
               * 获取工作表
               *
               * 该接口用于获取电子表格下所有工作表及其属性。
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/query`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet&apiName=replace&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet/replace document }
               *
               * 替换单元格
               *
               * 按照指定的条件查找子表的某个范围内的数据符合条件的单元格并替换值，返回替换成功的单元格位置。一次请求最多允许替换5000个单元格，如果超过请将range缩小范围再操作。请求体中的 range、find、replaccement 字段必填。
               */
              replace: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/replace`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "replace")
            },
            /**
             * 浮动图片
             */
            spreadsheetSheetFloatImage: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.float_image&apiName=create&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-float_image/create document }
               *
               * 创建浮动图片
               *
               * 根据传入的参数创建一张浮动图片。Float_image_token （[上传图片至表格后得到](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/upload_all)）和range（只支持一个单元格） 必填。Float_image_id 可选，不填的话会默认生成，长度为10，由 0-9、a-z、A-Z 组合生成。表格内不重复的图片（浮动图片+单元格图片）总数不超过4000。width 和 height 为图片展示的宽高，可选，不填的话会使用图片的真实宽高。offset_x 和 offset_y 为图片左上角距离所在单元格左上角的偏移，可选，默认为 0。
               *
               * 浮动图片的设置参考：[浮动图片指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-float_image/float-image-user-guide)
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.float_image&apiName=delete&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-float_image/delete document }
               *
               * 删除浮动图片
               *
               * 删除 float_image_id 对应的浮动图片。
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.float_image&apiName=get&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-float_image/get document }
               *
               * 获取浮动图片
               *
               * 根据 float_image_id 获取对应浮动图片的信息。
               *
               * 浮动图片参考：[浮动图片指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-float_image/float-image-user-guide)
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.float_image&apiName=patch&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-float_image/patch document }
               *
               * 更新浮动图片
               *
               * 更新已有的浮动图片位置和宽高，包括 range、width、height、offset_x 和 offset_y，不包括 float_image_id 和 float_image_token。
               *
               * 浮动图片更新参考：[浮动图片指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-float_image/float-image-user-guide)
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=sheets&resource=spreadsheet.sheet.float_image&apiName=query&version=v3 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-float_image/query document }
               *
               * 查询浮动图片
               *
               * 返回子表内所有的浮动图片信息。
               *
               * 浮动图片参考：[浮动图片指南](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-float_image/float-image-user-guide)
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/query`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            }
          }
        };
      }
    };
    var Client$b = class extends Client$c {
      static {
        __name(this, "Client$b");
      }
      constructor() {
        super(...arguments);
        this.speech_to_text = {
          /**
           * 语音识别
           */
          speech: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=speech_to_text&resource=speech&apiName=file_recognize&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/speech_to_text-v1/speech/file_recognize document }
             *
             * 语音文件识别 (ASR)
             *
             * 语音文件识别接口，上传整段语音文件进行一次性识别。接口适合 60 秒以内音频识别
             *
             * 单租户限流：20QPS，同租户下的应用没有限流，共享本租户的 20QPS 限流
             */
            fileRecognize: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/speech_to_text/v1/speech/file_recognize`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "fileRecognize"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=speech_to_text&resource=speech&apiName=stream_recognize&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/speech_to_text-v1/speech/stream_recognize document }
             *
             * 语音流式识别 (ASR)
             *
             * 语音流式接口，将整个音频文件分片进行传入模型。能够实时返回数据。建议每个音频分片的大小为 100-200ms
             *
             * 单租户限流：20 路（一个 stream_id 称为一路会话），同租户下的应用没有限流，共享本租户的 20路限流
             */
            streamRecognize: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/speech_to_text/v1/speech/stream_recognize`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "streamRecognize")
          },
          v1: {
            /**
             * 语音识别
             */
            speech: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=speech_to_text&resource=speech&apiName=file_recognize&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/speech_to_text-v1/speech/file_recognize document }
               *
               * 语音文件识别 (ASR)
               *
               * 语音文件识别接口，上传整段语音文件进行一次性识别。接口适合 60 秒以内音频识别
               *
               * 单租户限流：20QPS，同租户下的应用没有限流，共享本租户的 20QPS 限流
               */
              fileRecognize: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/speech_to_text/v1/speech/file_recognize`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "fileRecognize"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=speech_to_text&resource=speech&apiName=stream_recognize&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/speech_to_text-v1/speech/stream_recognize document }
               *
               * 语音流式识别 (ASR)
               *
               * 语音流式接口，将整个音频文件分片进行传入模型。能够实时返回数据。建议每个音频分片的大小为 100-200ms
               *
               * 单租户限流：20 路（一个 stream_id 称为一路会话），同租户下的应用没有限流，共享本租户的 20路限流
               */
              streamRecognize: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/speech_to_text/v1/speech/stream_recognize`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "streamRecognize")
            }
          }
        };
      }
    };
    var Client$a = class extends Client$b {
      static {
        __name(this, "Client$a");
      }
      constructor() {
        super(...arguments);
        this.spend = {};
      }
    };
    var Client$9 = class extends Client$a {
      static {
        __name(this, "Client$9");
      }
      constructor() {
        super(...arguments);
        this.sup_project = {};
      }
    };
    var Client$8 = class extends Client$9 {
      static {
        __name(this, "Client$8");
      }
      constructor() {
        super(...arguments);
        this.task = {
          /**
           * 任务
           */
          task: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=batch_delete_collaborator&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task/batch_delete_collaborator document }
             *
             * 批量删除执行者
             *
             * 该接口用于批量删除执行者
             */
            batchDeleteCollaborator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_collaborator`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchDeleteCollaborator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=batch_delete_follower&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task/batch_delete_follower document }
             *
             * 批量删除关注人
             *
             * 该接口用于批量删除关注人
             */
            batchDeleteFollower: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_follower`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "batchDeleteFollower"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=complete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task/complete document }
             *
             * 完成任务
             *
             * 该接口用于将任务状态修改为“已完成”。;完成任务是指整个任务全部完成，而不支持执行者分别完成任务，执行成功后，任务对所有关联用户都变为完成状态。
             */
            complete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/complete`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "complete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task/create document }
             *
             * 创建任务
             *
             * 该接口可以创建一个任务，支持填写任务的基本信息，包括任务的标题，描述及协作者等。;在此基础上，创建任务时可以设置截止时间和重复规则，将任务设置为定期执行的重复任务。通过添加协作者，则可以让其他用户协同完成该任务。;此外，接口也提供了一些支持自定义内容的字段，调用方可以实现定制化效果，如完成任务后跳转到指定结束界面。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task/delete document }
             *
             * 删除任务
             *
             * 该接口用于删除任务
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task/get document }
             *
             * 获取任务详情
             *
             * 该接口用于获取任务详情，包括任务标题、描述、时间、来源等信息
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task/list document }
             *
             * 获取任务列表
             *
             * 以分页的方式获取任务列表。当使用user_access_token时，获取与该用户身份相关的所有任务。当使用tenant_access_token时，获取以该应用身份通过“创建任务“接口创建的所有任务（并非获取该应用所在租户下所有用户创建的任务）。;本接口支持通过任务创建时间以及任务的完成状态对任务进行过滤。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task/patch document }
             *
             * 更新任务
             *
             * 该接口用于修改任务的标题、描述、时间、来源等相关信息
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=uncomplete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task/uncomplete document }
             *
             * 取消完成任务
             *
             * 该接口用于取消任务的已完成状态
             */
            uncomplete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/uncomplete`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "uncomplete")
          },
          /**
           * 执行者
           */
          taskCollaborator: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.collaborator&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-collaborator/create document }
             *
             * 新增执行者
             *
             * 该接口用于新增任务执行者，一次性可以添加多个执行者。;只有任务的创建者和执行者才能添加执行者，关注人无权限添加。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.collaborator&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-collaborator/delete document }
             *
             * 删除执行者
             *
             * 该接口用于删除任务执行者
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators/:collaborator_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.collaborator&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-collaborator/list document }
             *
             * 获取一个任务的执行者列表
             *
             * 该接口用于查询任务执行者列表，支持分页，最大值为50
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 评论
           */
          taskComment: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.comment&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-comment/create document }
             *
             * 创建评论
             *
             * 该接口用于创建和回复任务的评论。当parent_id字段为0时，为创建评论；当parent_id不为0时，为回复某条评论
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.comment&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-comment/delete document }
             *
             * 删除评论
             *
             * 该接口用于通过评论ID删除评论
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.comment&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-comment/get document }
             *
             * 获取评论详情
             *
             * 该接口用于通过评论ID获取评论详情
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.comment&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-comment/list document }
             *
             * 获取评论列表
             *
             * 该接口用于查询任务评论列表，支持分页，最大值为100
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.comment&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-comment/update document }
             *
             * 更新评论
             *
             * 该接口用于更新评论内容
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * 关注人
           */
          taskFollower: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.follower&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-follower/create document }
             *
             * 新增关注人
             *
             * 该接口用于创建任务关注人。可以一次性添加多位关注人。关注人ID要使用表示用户的ID。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.follower&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-follower/delete document }
             *
             * 删除关注人
             *
             * 该接口用于删除任务关注人
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers/:follower_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.follower&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-follower/list document }
             *
             * 获取任务关注人列表
             *
             * 该接口用于查询任务关注人列表，支持分页，最大值为50
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 提醒
           */
          taskReminder: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.reminder&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-reminder/create document }
             *
             * 新增提醒时间
             *
             * 该接口用于创建任务的提醒时间。提醒时间在截止时间基础上做偏移，但是偏移后的结果不能早于当前时间。
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.reminder&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-reminder/delete document }
             *
             * 删除提醒时间
             *
             * 删除提醒时间，返回结果状态
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders/:reminder_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.reminder&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-reminder/list document }
             *
             * 查询提醒时间列表
             *
             * 返回提醒时间列表，支持分页，最大值为50
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          v1: {
            /**
             * 任务
             */
            task: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=batch_delete_collaborator&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task/batch_delete_collaborator document }
               *
               * 批量删除执行者
               *
               * 该接口用于批量删除执行者
               */
              batchDeleteCollaborator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_collaborator`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchDeleteCollaborator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=batch_delete_follower&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task/batch_delete_follower document }
               *
               * 批量删除关注人
               *
               * 该接口用于批量删除关注人
               */
              batchDeleteFollower: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/batch_delete_follower`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "batchDeleteFollower"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=complete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task/complete document }
               *
               * 完成任务
               *
               * 该接口用于将任务状态修改为“已完成”。;完成任务是指整个任务全部完成，而不支持执行者分别完成任务，执行成功后，任务对所有关联用户都变为完成状态。
               */
              complete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/complete`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "complete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task/create document }
               *
               * 创建任务
               *
               * 该接口可以创建一个任务，支持填写任务的基本信息，包括任务的标题，描述及协作者等。;在此基础上，创建任务时可以设置截止时间和重复规则，将任务设置为定期执行的重复任务。通过添加协作者，则可以让其他用户协同完成该任务。;此外，接口也提供了一些支持自定义内容的字段，调用方可以实现定制化效果，如完成任务后跳转到指定结束界面。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task/delete document }
               *
               * 删除任务
               *
               * 该接口用于删除任务
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task/get document }
               *
               * 获取任务详情
               *
               * 该接口用于获取任务详情，包括任务标题、描述、时间、来源等信息
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task/list document }
               *
               * 获取任务列表
               *
               * 以分页的方式获取任务列表。当使用user_access_token时，获取与该用户身份相关的所有任务。当使用tenant_access_token时，获取以该应用身份通过“创建任务“接口创建的所有任务（并非获取该应用所在租户下所有用户创建的任务）。;本接口支持通过任务创建时间以及任务的完成状态对任务进行过滤。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task/patch document }
               *
               * 更新任务
               *
               * 该接口用于修改任务的标题、描述、时间、来源等相关信息
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=uncomplete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task/uncomplete document }
               *
               * 取消完成任务
               *
               * 该接口用于取消任务的已完成状态
               */
              uncomplete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/uncomplete`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "uncomplete")
            },
            /**
             * 执行者
             */
            taskCollaborator: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.collaborator&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-collaborator/create document }
               *
               * 新增执行者
               *
               * 该接口用于新增任务执行者，一次性可以添加多个执行者。;只有任务的创建者和执行者才能添加执行者，关注人无权限添加。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.collaborator&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-collaborator/delete document }
               *
               * 删除执行者
               *
               * 该接口用于删除任务执行者
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators/:collaborator_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.collaborator&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-collaborator/list document }
               *
               * 获取一个任务的执行者列表
               *
               * 该接口用于查询任务执行者列表，支持分页，最大值为50
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/collaborators`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 评论
             */
            taskComment: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.comment&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-comment/create document }
               *
               * 创建评论
               *
               * 该接口用于创建和回复任务的评论。当parent_id字段为0时，为创建评论；当parent_id不为0时，为回复某条评论
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.comment&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-comment/delete document }
               *
               * 删除评论
               *
               * 该接口用于通过评论ID删除评论
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.comment&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-comment/get document }
               *
               * 获取评论详情
               *
               * 该接口用于通过评论ID获取评论详情
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.comment&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-comment/list document }
               *
               * 获取评论列表
               *
               * 该接口用于查询任务评论列表，支持分页，最大值为100
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.comment&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-comment/update document }
               *
               * 更新评论
               *
               * 该接口用于更新评论内容
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 关注人
             */
            taskFollower: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.follower&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-follower/create document }
               *
               * 新增关注人
               *
               * 该接口用于创建任务关注人。可以一次性添加多位关注人。关注人ID要使用表示用户的ID。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.follower&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-follower/delete document }
               *
               * 删除关注人
               *
               * 该接口用于删除任务关注人
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers/:follower_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.follower&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-follower/list document }
               *
               * 获取任务关注人列表
               *
               * 该接口用于查询任务关注人列表，支持分页，最大值为50
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 提醒
             */
            taskReminder: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.reminder&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-reminder/create document }
               *
               * 新增提醒时间
               *
               * 该接口用于创建任务的提醒时间。提醒时间在截止时间基础上做偏移，但是偏移后的结果不能早于当前时间。
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.reminder&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-reminder/delete document }
               *
               * 删除提醒时间
               *
               * 删除提醒时间，返回结果状态
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders/:reminder_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.reminder&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-reminder/list document }
               *
               * 查询提醒时间列表
               *
               * 返回提醒时间列表，支持分页，最大值为50
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            }
          },
          v2: {
            /**
             * attachment
             */
            attachment: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=attachment&apiName=delete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=task&resource=attachment&version=v2 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/attachments/:attachment_guid`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=attachment&apiName=get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=task&resource=attachment&version=v2 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/attachments/:attachment_guid`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/task/v2/attachments`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=attachment&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=task&resource=attachment&version=v2 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/attachments`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=attachment&apiName=upload&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=upload&project=task&resource=attachment&version=v2 document }
               */
              upload: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/attachments/upload`, path2),
                  method: "POST",
                  data,
                  params,
                  headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                return (res === null || res === void 0 ? void 0 : res.data) || null;
              }), "upload")
            },
            /**
             * comment
             */
            comment: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=comment&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=task&resource=comment&version=v2 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/comments`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=comment&apiName=delete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=task&resource=comment&version=v2 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/comments/:comment_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=comment&apiName=get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=task&resource=comment&version=v2 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/comments/:comment_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/task/v2/comments`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=comment&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=task&resource=comment&version=v2 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/comments`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=comment&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=task&resource=comment&version=v2 document }
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/comments/:comment_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * custom_field
             */
            customField: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=custom_field&apiName=add&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=add&project=task&resource=custom_field&version=v2 document }
               */
              add: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/add`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "add"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=custom_field&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=task&resource=custom_field&version=v2 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/custom_fields`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=custom_field&apiName=get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=task&resource=custom_field&version=v2 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/task/v2/custom_fields`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=custom_field&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=task&resource=custom_field&version=v2 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/custom_fields`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=custom_field&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=task&resource=custom_field&version=v2 document }
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=custom_field&apiName=remove&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=remove&project=task&resource=custom_field&version=v2 document }
               */
              remove: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/remove`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "remove")
            },
            /**
             * custom_field.option
             */
            customFieldOption: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=custom_field.option&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=task&resource=custom_field.option&version=v2 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/options`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=custom_field.option&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=task&resource=custom_field.option&version=v2 document }
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/custom_fields/:custom_field_guid/options/:option_guid`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * section
             */
            section: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=section&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=task&resource=section&version=v2 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/sections`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=section&apiName=delete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=task&resource=section&version=v2 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/sections/:section_guid`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=section&apiName=get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=task&resource=section&version=v2 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/sections/:section_guid`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/task/v2/sections`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=section&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=task&resource=section&version=v2 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/sections`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=section&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=task&resource=section&version=v2 document }
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/sections/:section_guid`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              tasksWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/task/v2/sections/:section_guid/tasks`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "tasksWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=section&apiName=tasks&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=tasks&project=task&resource=section&version=v2 document }
               */
              tasks: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/sections/:section_guid/tasks`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "tasks")
            },
            /**
             * task
             */
            task: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=add_dependencies&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=add_dependencies&project=task&resource=task&version=v2 document }
               */
              addDependencies: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_dependencies`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "addDependencies"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=add_members&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=add_members&project=task&resource=task&version=v2 document }
               */
              addMembers: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_members`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "addMembers"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=add_reminders&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=add_reminders&project=task&resource=task&version=v2 document }
               */
              addReminders: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_reminders`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "addReminders"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=add_tasklist&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=add_tasklist&project=task&resource=task&version=v2 document }
               */
              addTasklist: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasks/:task_guid/add_tasklist`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "addTasklist"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=task&resource=task&version=v2 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasks`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=delete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=task&resource=task&version=v2 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasks/:task_guid`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=task&resource=task&version=v2 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasks/:task_guid`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/task/v2/tasks`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=task&resource=task&version=v2 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasks`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=task&resource=task&version=v2 document }
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasks/:task_guid`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=remove_dependencies&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=remove_dependencies&project=task&resource=task&version=v2 document }
               */
              removeDependencies: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_dependencies`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "removeDependencies"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=remove_members&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=remove_members&project=task&resource=task&version=v2 document }
               */
              removeMembers: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_members`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "removeMembers"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=remove_reminders&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=remove_reminders&project=task&resource=task&version=v2 document }
               */
              removeReminders: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_reminders`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "removeReminders"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=remove_tasklist&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=remove_tasklist&project=task&resource=task&version=v2 document }
               */
              removeTasklist: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasks/:task_guid/remove_tasklist`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "removeTasklist"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task&apiName=tasklists&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=tasklists&project=task&resource=task&version=v2 document }
               */
              tasklists: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasks/:task_guid/tasklists`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "tasklists")
            },
            /**
             * task.subtask
             */
            taskSubtask: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.subtask&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=task&resource=task.subtask&version=v2 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasks/:task_guid/subtasks`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/task/v2/tasks/:task_guid/subtasks`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.subtask&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=task&resource=task.subtask&version=v2 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasks/:task_guid/subtasks`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * tasklist.activity_subscription
             */
            tasklistActivitySubscription: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=tasklist.activity_subscription&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=task&resource=tasklist.activity_subscription&version=v2 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=tasklist.activity_subscription&apiName=delete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=task&resource=tasklist.activity_subscription&version=v2 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=tasklist.activity_subscription&apiName=get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=task&resource=tasklist.activity_subscription&version=v2 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=tasklist.activity_subscription&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=task&resource=tasklist.activity_subscription&version=v2 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=tasklist.activity_subscription&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=task&resource=tasklist.activity_subscription&version=v2 document }
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * tasklist
             */
            tasklist: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=tasklist&apiName=add_members&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=add_members&project=task&resource=tasklist&version=v2 document }
               */
              addMembers: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/add_members`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "addMembers"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=tasklist&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=task&resource=tasklist&version=v2 document }
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasklists`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=tasklist&apiName=delete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=task&resource=tasklist&version=v2 document }
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=tasklist&apiName=get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=task&resource=tasklist&version=v2 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/task/v2/tasklists`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=tasklist&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=task&resource=tasklist&version=v2 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasklists`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=tasklist&apiName=patch&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=task&resource=tasklist&version=v2 document }
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=tasklist&apiName=remove_members&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=remove_members&project=task&resource=tasklist&version=v2 document }
               */
              removeMembers: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/remove_members`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "removeMembers"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=task&resource=tasklist&apiName=tasks&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=tasks&project=task&resource=tasklist&version=v2 document }
               */
              tasks: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/tasks`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "tasks")
            }
          }
        };
      }
    };
    var Client$7 = class extends Client$8 {
      static {
        __name(this, "Client$7");
      }
      constructor() {
        super(...arguments);
        this.tenant = {
          /**
           * tenant.product_assign_info
           */
          tenantProductAssignInfo: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=tenant&resource=tenant.product_assign_info&apiName=query&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=tenant&resource=tenant.product_assign_info&version=v2 document }
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/tenant/v2/tenant/assign_info_list/query`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query")
          },
          /**
           * 企业信息
           */
          tenant: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=tenant&resource=tenant&apiName=query&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/tenant-v2/tenant/query document }
             *
             * 获取企业信息
             *
             * 获取企业名称、企业编号等企业信息
             *
             * 如果ISV应用是企业创建时默认安装，并且180天内企业未打开或使用过此应用，则无法通过此接口获取到企业信息。
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/tenant/v2/tenant/query`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query")
          },
          v2: {
            /**
             * tenant.product_assign_info
             */
            tenantProductAssignInfo: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=tenant&resource=tenant.product_assign_info&apiName=query&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=tenant&resource=tenant.product_assign_info&version=v2 document }
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/tenant/v2/tenant/assign_info_list/query`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            },
            /**
             * 企业信息
             */
            tenant: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=tenant&resource=tenant&apiName=query&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/tenant-v2/tenant/query document }
               *
               * 获取企业信息
               *
               * 获取企业名称、企业编号等企业信息
               *
               * 如果ISV应用是企业创建时默认安装，并且180天内企业未打开或使用过此应用，则无法通过此接口获取到企业信息。
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/tenant/v2/tenant/query`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query")
            }
          }
        };
      }
    };
    var Client$6 = class extends Client$7 {
      static {
        __name(this, "Client$6");
      }
      constructor() {
        super(...arguments);
        this.translation = {
          /**
           * 文本
           */
          text: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=translation&resource=text&apiName=detect&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/translation-v1/text/detect document }
             *
             * 文本语种识别
             *
             * 机器翻译 (MT)，支持 100 多种语言识别，返回符合 ISO 639-1 标准
             *
             * 单租户限流：20QPS，同租户下的应用没有限流，共享本租户的 20QPS 限流
             */
            detect: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/translation/v1/text/detect`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "detect"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=translation&resource=text&apiName=translate&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/translation-v1/text/translate document }
             *
             * 文本翻译
             *
             * 机器翻译 (MT)，支持以下语种互译：;"zh": 汉语；;"zh-Hant": 繁体汉语；;"en": 英语；;"ja": 日语；;"ru": 俄语；;"de": 德语；;"fr": 法语；;"it": 意大利语；;"pl": 波兰语；;"th": 泰语；;"hi": 印地语；;"id": 印尼语；;"es": 西班牙语；;"pt": 葡萄牙语；;"ko": 朝鲜语；;"vi": 越南语；
             *
             * 单租户限流：20QPS，同租户下的应用没有限流，共享本租户的 20QPS 限流
             */
            translate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/translation/v1/text/translate`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "translate")
          },
          v1: {
            /**
             * 文本
             */
            text: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=translation&resource=text&apiName=detect&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/translation-v1/text/detect document }
               *
               * 文本语种识别
               *
               * 机器翻译 (MT)，支持 100 多种语言识别，返回符合 ISO 639-1 标准
               *
               * 单租户限流：20QPS，同租户下的应用没有限流，共享本租户的 20QPS 限流
               */
              detect: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/translation/v1/text/detect`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "detect"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=translation&resource=text&apiName=translate&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/translation-v1/text/translate document }
               *
               * 文本翻译
               *
               * 机器翻译 (MT)，支持以下语种互译：;"zh": 汉语；;"zh-Hant": 繁体汉语；;"en": 英语；;"ja": 日语；;"ru": 俄语；;"de": 德语；;"fr": 法语；;"it": 意大利语；;"pl": 波兰语；;"th": 泰语；;"hi": 印地语；;"id": 印尼语；;"es": 西班牙语；;"pt": 葡萄牙语；;"ko": 朝鲜语；;"vi": 越南语；
               *
               * 单租户限流：20QPS，同租户下的应用没有限流，共享本租户的 20QPS 限流
               */
              translate: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/translation/v1/text/translate`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "translate")
            }
          }
        };
      }
    };
    var Client$5 = class extends Client$6 {
      static {
        __name(this, "Client$5");
      }
      constructor() {
        super(...arguments);
        this.unified_kms_log = {};
      }
    };
    var Client$4 = class extends Client$5 {
      static {
        __name(this, "Client$4");
      }
      constructor() {
        super(...arguments);
        this.vc = {
          /**
           * 告警中心
           */
          alert: {
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/alerts`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=alert&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/alert/list document }
             *
             * 获取告警记录
             *
             * 获取特定条件下租户的设备告警记录
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/alerts`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          /**
           * 导出
           */
          export: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=export&apiName=download&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/export/download document }
             *
             * 下载导出文件
             *
             * 下载导出文件
             */
            download: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const res = yield this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/exports/download`, path2),
                method: "GET",
                headers,
                data,
                params,
                responseType: "stream",
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                $return_headers: true
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
              const checkIsReadable = /* @__PURE__ */ __name(() => {
                const consumedError = "The stream has already been consumed";
                if (!res.data.readable) {
                  this.logger.error(consumedError);
                  throw new Error(consumedError);
                }
              }, "checkIsReadable");
              return {
                writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                  checkIsReadable();
                  return new Promise((resolve, reject) => {
                    const writableStream = fs__default["default"].createWriteStream(filePath);
                    writableStream.on("finish", () => {
                      resolve(filePath);
                    });
                    writableStream.on("error", (e) => {
                      reject(e);
                    });
                    res.data.pipe(writableStream);
                  });
                }), "writeFile"),
                getReadableStream: /* @__PURE__ */ __name(() => {
                  checkIsReadable();
                  return res.data;
                }, "getReadableStream"),
                headers: res.headers
              };
            }), "download"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=export&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/export/get document }
             *
             * 查询导出任务结果
             *
             * 查看异步导出的进度
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/exports/:task_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=export&apiName=meeting_list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/export/meeting_list document }
             *
             * 导出会议明细
             *
             * 导出会议明细，具体权限要求请参考「导出概述」
             */
            meetingList: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/exports/meeting_list`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "meetingList"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=export&apiName=participant_list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/export/participant_list document }
             *
             * 导出参会人明细
             *
             * 导出某个会议的参会人详情列表，具体权限要求请参考「导出概述」
             */
            participantList: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/exports/participant_list`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "participantList"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=export&apiName=participant_quality_list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/export/participant_quality_list document }
             *
             * 导出参会人会议质量数据
             *
             * 导出某场会议某个参会人的音视频&共享质量数据;，具体权限要求请参考「导出概述」
             */
            participantQualityList: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/exports/participant_quality_list`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "participantQualityList"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=export&apiName=resource_reservation_list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/export/resource_reservation_list document }
             *
             * 导出会议室预定数据
             *
             * 导出会议室预定数据，具体权限要求请参考「导出概述」
             */
            resourceReservationList: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/exports/resource_reservation_list`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "resourceReservationList")
          },
          /**
           * 会议
           */
          meeting: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting&apiName=end&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/end document }
             *
             * 结束会议
             *
             * 结束一个进行中的会议
             *
             * 会议正在进行中，且操作者须具有相应的权限（如果操作者为用户，必须是会中当前主持人）
             */
            end: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/end`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "end"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/get document }
             *
             * 获取会议详情
             *
             * 获取一个会议的详细数据
             *
             * 只能获取归属于自己的会议，支持查询最近90天内的会议
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting&apiName=invite&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/invite document }
             *
             * 邀请参会人
             *
             * 邀请参会人进入会议
             *
             * 发起邀请的操作者必须具有相应的权限（如果操作者为用户，则必须在会中），如果会议被锁定、或参会人数如果达到上限，则会邀请失败
             */
            invite: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/invite`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "invite"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting&apiName=kickout&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/kickout document }
             *
             * 移除参会人
             *
             * 将参会人从会议中移除
             */
            kickout: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/kickout`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "kickout"),
            listByNoWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listByNoWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting&apiName=list_by_no&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/list_by_no document }
             *
             * 获取与会议号相关联的会议列表
             *
             * 获取指定时间范围（90天内)会议号关联的会议简要信息列表
             */
            listByNo: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "listByNo"),
            searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/search`, path2),
                  method: "POST",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "searchWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting&apiName=search&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=vc&resource=meeting&version=v1 document }
             *
             * 搜索视频会议接口
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting&apiName=set_host&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/set_host document }
             *
             * 设置主持人
             *
             * 设置会议的主持人
             *
             * 发起设置主持人的操作者必须具有相应的权限（如果操作者为用户，必须是会中当前主持人）；该操作使用CAS并发安全机制，需传入会中当前主持人，如果操作失败可使用返回的最新数据重试
             */
            setHost: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/set_host`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "setHost")
          },
          /**
           * 录制
           */
          meetingRecording: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting.recording&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting-recording/get document }
             *
             * 获取录制文件
             *
             * 获取一个会议的录制文件。
             *
             * 会议结束后并且收到了"录制完成"的事件方可获取录制文件；只有会议owner（通过开放平台预约的会议即为预约人）有权限获取；录制时间太短(&lt;5s)有可能无法生成录制文件
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting.recording&apiName=set_permission&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting-recording/set_permission document }
             *
             * 授权录制文件
             *
             * 将一个会议的录制文件授权给组织、用户或公开到公网
             *
             * 会议结束后并且收到了"录制完成"的事件方可进行授权；会议owner（通过开放平台预约的会议即为预约人）才有权限操作
             */
            setPermission: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/set_permission`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "setPermission"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting.recording&apiName=start&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting-recording/start document }
             *
             * 开始录制
             *
             * 在会议中开始录制。
             *
             * 会议正在进行中，且操作者具有相应权限（如果操作者为用户，必须是会中当前主持人）
             */
            start: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/start`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "start"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting.recording&apiName=stop&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting-recording/stop document }
             *
             * 停止录制
             *
             * 在会议中停止录制。
             *
             * 会议正在录制中，且操作者具有相应权限（如果操作者为用户，必须是会中当前主持人）
             */
            stop: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/stop`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "stop")
          },
          /**
           * meeting_list
           */
          meetingList: {
            getWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/meeting_list`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "getWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting_list&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=meeting_list&version=v1 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/meeting_list`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          /**
           * note
           */
          note: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=note&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=note&version=v1 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/notes/:note_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          /**
           * participant_list
           */
          participantList: {
            getWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/participant_list`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "getWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=participant_list&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=participant_list&version=v1 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/participant_list`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          /**
           * participant_quality_list
           */
          participantQualityList: {
            getWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/participant_quality_list`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "getWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=participant_quality_list&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=participant_quality_list&version=v1 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/participant_quality_list`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          /**
           * 会议报告
           */
          report: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=report&apiName=get_daily&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/report/get_daily document }
             *
             * 获取会议报告
             *
             * 获取一段时间内组织的每日会议使用报告。
             *
             * 支持最近90天内的数据查询
             */
            getDaily: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/reports/get_daily`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "getDaily"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=report&apiName=get_top_user&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/report/get_top_user document }
             *
             * 获取top用户列表
             *
             * 获取一段时间内组织内会议使用的top用户列表。
             *
             * 支持最近90天内的数据查询；默认返回前10位，最多可查询前100位
             */
            getTopUser: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/reports/get_top_user`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "getTopUser")
          },
          /**
           * 预约
           */
          reserve: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve&apiName=apply&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/reserve/apply document }
             *
             * 预约会议
             *
             * 创建一个会议预约。
             *
             * 支持预约最近30天内的会议（到期时间距离当前时间不超过30天），预约到期后会议号将被释放，如需继续使用可通过"更新预约"接口进行续期；预约会议时可配置参会人在会中的权限，以达到控制会议的目的
             */
            apply: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserves/apply`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "apply"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/reserve/delete document }
             *
             * 删除预约
             *
             * 删除一个预约
             *
             * 只能删除归属于自己的预约；删除后数据不可恢复
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/reserve/get document }
             *
             * 获取预约
             *
             * 获取一个预约的详情
             *
             * 只能获取归属于自己的预约
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve&apiName=get_active_meeting&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/reserve/get_active_meeting document }
             *
             * 获取活跃会议
             *
             * 获取一个预约的当前活跃会议
             *
             * 只能获取归属于自己的预约的活跃会议（一个预约最多有一个正在进行中的会议）
             */
            getActiveMeeting: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id/get_active_meeting`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "getActiveMeeting"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve&apiName=update&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/reserve/update document }
             *
             * 更新预约
             *
             * 更新一个预约
             *
             * 只能更新归属于自己的预约，不需要更新的字段不传（如果传空则会被更新为空）；可用于续期操作，到期时间距离当前时间不超过30天
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          /**
           * reserve_config.admin
           */
          reserveConfigAdmin: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config.admin&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=reserve_config.admin&version=v1 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config.admin&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=vc&resource=reserve_config.admin&version=v1 document }
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * reserve_config.disable_inform
           */
          reserveConfigDisableInform: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config.disable_inform&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=reserve_config.disable_inform&version=v1 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config.disable_inform&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=vc&resource=reserve_config.disable_inform&version=v1 document }
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * reserve_config.form
           */
          reserveConfigForm: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config.form&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=reserve_config.form&version=v1 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config.form&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=vc&resource=reserve_config.form&version=v1 document }
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch")
          },
          /**
           * reserve_config
           */
          reserveConfig: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/reserve_config/patch document }
             *
             * 更新会议室预定范围
             *
             * 更新会议室预定范围
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config&apiName=reserve_scope&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/reserve_config/reserve_scope document }
             *
             * 获取会议室预定范围
             *
             * 获取会议室预定范围
             */
            reserveScope: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/reserve_scope`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "reserveScope")
          },
          /**
           * resource_reservation_list
           */
          resourceReservationList: {
            getWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/resource_reservation_list`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "getWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=resource_reservation_list&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=resource_reservation_list&version=v1 document }
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/resource_reservation_list`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          /**
           * 会议室
           */
          room: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room/create document }
             *
             * 创建会议室
             *
             * 该接口用于创建会议室
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/rooms`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room&apiName=delete&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room/delete document }
             *
             * 删除会议室
             *
             * 该接口可以用来删除某个会议室
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/rooms/:room_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room/get document }
             *
             * 查询会议室详情
             *
             * 该接口可以使用会议室ID查询会议室详情
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/rooms/:room_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/rooms`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room/list document }
             *
             * 查询会议室列表
             *
             * 该接口可以用来查询某个会议室层级下会议室列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/rooms`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room&apiName=mget&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room/mget document }
             *
             * 批量查询会议室详情
             *
             * 该接口可以使用会议室ID批量查询会议室详情
             */
            mget: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/rooms/mget`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "mget"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room/patch document }
             *
             * 更新会议室
             *
             * 该接口可以用来更新某个会议室的信息
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/rooms/:room_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room&apiName=search&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room/search document }
             *
             * 搜索会议室
             *
             * 该接口可以用来搜索会议室，支持使用关键词进行搜索，也支持使用自定义会议室ID进行查询
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/rooms/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search")
          },
          /**
           * room_config
           */
          roomConfig: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room_config&apiName=query&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=vc&resource=room_config&version=v1 document }
             */
            query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_configs/query`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "query"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room_config&apiName=set&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=set&project=vc&resource=room_config&version=v1 document }
             */
            set: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_configs/set`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "set"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room_config&apiName=set_checkboard_access_code&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=set_checkboard_access_code&project=vc&resource=room_config&version=v1 document }
             */
            setCheckboardAccessCode: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_configs/set_checkboard_access_code`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "setCheckboardAccessCode"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room_config&apiName=set_room_access_code&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=set_room_access_code&project=vc&resource=room_config&version=v1 document }
             */
            setRoomAccessCode: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_configs/set_room_access_code`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "setRoomAccessCode")
          },
          /**
           * 会议室层级
           */
          roomLevel: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room_level&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room_level/create document }
             *
             * 创建会议室层级
             *
             * 该接口用于创建会议室层级
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_levels`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room_level&apiName=del&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room_level/del document }
             *
             * 删除会议室层级
             *
             * 该接口可以用来删除某个会议室层级
             */
            del: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_levels/del`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "del"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room_level&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room_level/get document }
             *
             * 查询会议室层级详情
             *
             * 该接口可以使用会议室层级ID查询会议室层级详情
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_levels`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room_level&apiName=list&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room_level/list document }
             *
             * 查询会议室层级列表
             *
             * 该接口用来查询某个会议室层级下的子层级列表
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_levels`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room_level&apiName=mget&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room_level/mget document }
             *
             * 批量查询会议室层级详情
             *
             * 该接口可以使用会议室层级ID批量查询会议室层级详情
             */
            mget: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_levels/mget`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "mget"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room_level&apiName=patch&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room_level/patch document }
             *
             * 更新会议室层级
             *
             * 该接口可以用来更新某个会议室层级的信息
             */
            patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`, path2),
                method: "PATCH",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "patch"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room_level&apiName=search&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room_level/search document }
             *
             * 搜索会议室层级
             *
             * 该接口可以用来搜索会议室层级，支持使用自定义会议室层级ID进行查询
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_levels/search`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search")
          },
          /**
           * 会议室配置
           */
          scopeConfig: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=scope_config&apiName=create&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/scope_config/create document }
             *
             * 设置会议室配置
             *
             * 该接口可以用来设置某个会议层级范围下或者某个会议室的配置
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/scope_config`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=vc&resource=scope_config&apiName=get&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/scope_config/get document }
             *
             * 查询会议室配置
             *
             * 该接口可以用来查询某个会议层级范围下或者某个会议室的配置
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/vc/v1/scope_config`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          v1: {
            /**
             * 告警中心
             */
            alert: {
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/vc/v1/alerts`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=alert&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/alert/list document }
               *
               * 获取告警记录
               *
               * 获取特定条件下租户的设备告警记录
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/alerts`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 导出
             */
            export: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=export&apiName=download&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/export/download document }
               *
               * 下载导出文件
               *
               * 下载导出文件
               */
              download: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/exports/download`, path2),
                  method: "GET",
                  headers,
                  data,
                  params,
                  responseType: "stream",
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer"),
                  $return_headers: true
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
                const checkIsReadable = /* @__PURE__ */ __name(() => {
                  const consumedError = "The stream has already been consumed";
                  if (!res.data.readable) {
                    this.logger.error(consumedError);
                    throw new Error(consumedError);
                  }
                }, "checkIsReadable");
                return {
                  writeFile: /* @__PURE__ */ __name((filePath) => __awaiter(this, void 0, void 0, function* () {
                    checkIsReadable();
                    return new Promise((resolve, reject) => {
                      const writableStream = fs__default["default"].createWriteStream(filePath);
                      writableStream.on("finish", () => {
                        resolve(filePath);
                      });
                      writableStream.on("error", (e) => {
                        reject(e);
                      });
                      res.data.pipe(writableStream);
                    });
                  }), "writeFile"),
                  getReadableStream: /* @__PURE__ */ __name(() => {
                    checkIsReadable();
                    return res.data;
                  }, "getReadableStream"),
                  headers: res.headers
                };
              }), "download"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=export&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/export/get document }
               *
               * 查询导出任务结果
               *
               * 查看异步导出的进度
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/exports/:task_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=export&apiName=meeting_list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/export/meeting_list document }
               *
               * 导出会议明细
               *
               * 导出会议明细，具体权限要求请参考「导出概述」
               */
              meetingList: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/exports/meeting_list`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "meetingList"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=export&apiName=participant_list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/export/participant_list document }
               *
               * 导出参会人明细
               *
               * 导出某个会议的参会人详情列表，具体权限要求请参考「导出概述」
               */
              participantList: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/exports/participant_list`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "participantList"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=export&apiName=participant_quality_list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/export/participant_quality_list document }
               *
               * 导出参会人会议质量数据
               *
               * 导出某场会议某个参会人的音视频&共享质量数据;，具体权限要求请参考「导出概述」
               */
              participantQualityList: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/exports/participant_quality_list`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "participantQualityList"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=export&apiName=resource_reservation_list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/export/resource_reservation_list document }
               *
               * 导出会议室预定数据
               *
               * 导出会议室预定数据，具体权限要求请参考「导出概述」
               */
              resourceReservationList: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/exports/resource_reservation_list`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "resourceReservationList")
            },
            /**
             * 会议
             */
            meeting: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting&apiName=end&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/end document }
               *
               * 结束会议
               *
               * 结束一个进行中的会议
               *
               * 会议正在进行中，且操作者须具有相应的权限（如果操作者为用户，必须是会中当前主持人）
               */
              end: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/end`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "end"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/get document }
               *
               * 获取会议详情
               *
               * 获取一个会议的详细数据
               *
               * 只能获取归属于自己的会议，支持查询最近90天内的会议
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting&apiName=invite&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/invite document }
               *
               * 邀请参会人
               *
               * 邀请参会人进入会议
               *
               * 发起邀请的操作者必须具有相应的权限（如果操作者为用户，则必须在会中），如果会议被锁定、或参会人数如果达到上限，则会邀请失败
               */
              invite: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/invite`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "invite"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting&apiName=kickout&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/kickout document }
               *
               * 移除参会人
               *
               * 将参会人从会议中移除
               */
              kickout: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/kickout`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "kickout"),
              listByNoWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listByNoWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting&apiName=list_by_no&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/list_by_no document }
               *
               * 获取与会议号相关联的会议列表
               *
               * 获取指定时间范围（90天内)会议号关联的会议简要信息列表
               */
              listByNo: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/list_by_no`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "listByNo"),
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=vc&resource=meeting&version=v1 document }
               *
               * 搜索视频会议接口
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting&apiName=set_host&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/set_host document }
               *
               * 设置主持人
               *
               * 设置会议的主持人
               *
               * 发起设置主持人的操作者必须具有相应的权限（如果操作者为用户，必须是会中当前主持人）；该操作使用CAS并发安全机制，需传入会中当前主持人，如果操作失败可使用返回的最新数据重试
               */
              setHost: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/set_host`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "setHost")
            },
            /**
             * 录制
             */
            meetingRecording: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting.recording&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting-recording/get document }
               *
               * 获取录制文件
               *
               * 获取一个会议的录制文件。
               *
               * 会议结束后并且收到了"录制完成"的事件方可获取录制文件；只有会议owner（通过开放平台预约的会议即为预约人）有权限获取；录制时间太短(&lt;5s)有可能无法生成录制文件
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting.recording&apiName=set_permission&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting-recording/set_permission document }
               *
               * 授权录制文件
               *
               * 将一个会议的录制文件授权给组织、用户或公开到公网
               *
               * 会议结束后并且收到了"录制完成"的事件方可进行授权；会议owner（通过开放平台预约的会议即为预约人）才有权限操作
               */
              setPermission: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/set_permission`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "setPermission"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting.recording&apiName=start&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting-recording/start document }
               *
               * 开始录制
               *
               * 在会议中开始录制。
               *
               * 会议正在进行中，且操作者具有相应权限（如果操作者为用户，必须是会中当前主持人）
               */
              start: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/start`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "start"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting.recording&apiName=stop&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting-recording/stop document }
               *
               * 停止录制
               *
               * 在会议中停止录制。
               *
               * 会议正在录制中，且操作者具有相应权限（如果操作者为用户，必须是会中当前主持人）
               */
              stop: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/meetings/:meeting_id/recording/stop`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "stop")
            },
            /**
             * meeting_list
             */
            meetingList: {
              getWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/vc/v1/meeting_list`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "getWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting_list&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=meeting_list&version=v1 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/meeting_list`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * note
             */
            note: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=note&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=note&version=v1 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/notes/:note_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * participant_list
             */
            participantList: {
              getWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/vc/v1/participant_list`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "getWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=participant_list&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=participant_list&version=v1 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/participant_list`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * participant_quality_list
             */
            participantQualityList: {
              getWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/vc/v1/participant_quality_list`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "getWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=participant_quality_list&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=participant_quality_list&version=v1 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/participant_quality_list`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * 会议报告
             */
            report: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=report&apiName=get_daily&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/report/get_daily document }
               *
               * 获取会议报告
               *
               * 获取一段时间内组织的每日会议使用报告。
               *
               * 支持最近90天内的数据查询
               */
              getDaily: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/reports/get_daily`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "getDaily"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=report&apiName=get_top_user&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/report/get_top_user document }
               *
               * 获取top用户列表
               *
               * 获取一段时间内组织内会议使用的top用户列表。
               *
               * 支持最近90天内的数据查询；默认返回前10位，最多可查询前100位
               */
              getTopUser: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/reports/get_top_user`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "getTopUser")
            },
            /**
             * 预约
             */
            reserve: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve&apiName=apply&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/reserve/apply document }
               *
               * 预约会议
               *
               * 创建一个会议预约。
               *
               * 支持预约最近30天内的会议（到期时间距离当前时间不超过30天），预约到期后会议号将被释放，如需继续使用可通过"更新预约"接口进行续期；预约会议时可配置参会人在会中的权限，以达到控制会议的目的
               */
              apply: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserves/apply`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "apply"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/reserve/delete document }
               *
               * 删除预约
               *
               * 删除一个预约
               *
               * 只能删除归属于自己的预约；删除后数据不可恢复
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/reserve/get document }
               *
               * 获取预约
               *
               * 获取一个预约的详情
               *
               * 只能获取归属于自己的预约
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve&apiName=get_active_meeting&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/reserve/get_active_meeting document }
               *
               * 获取活跃会议
               *
               * 获取一个预约的当前活跃会议
               *
               * 只能获取归属于自己的预约的活跃会议（一个预约最多有一个正在进行中的会议）
               */
              getActiveMeeting: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id/get_active_meeting`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "getActiveMeeting"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve&apiName=update&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/reserve/update document }
               *
               * 更新预约
               *
               * 更新一个预约
               *
               * 只能更新归属于自己的预约，不需要更新的字段不传（如果传空则会被更新为空）；可用于续期操作，到期时间距离当前时间不超过30天
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserves/:reserve_id`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * reserve_config.admin
             */
            reserveConfigAdmin: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config.admin&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=reserve_config.admin&version=v1 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config.admin&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=vc&resource=reserve_config.admin&version=v1 document }
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * reserve_config.disable_inform
             */
            reserveConfigDisableInform: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config.disable_inform&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=reserve_config.disable_inform&version=v1 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config.disable_inform&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=vc&resource=reserve_config.disable_inform&version=v1 document }
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * reserve_config.form
             */
            reserveConfigForm: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config.form&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=reserve_config.form&version=v1 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config.form&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=vc&resource=reserve_config.form&version=v1 document }
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch")
            },
            /**
             * reserve_config
             */
            reserveConfig: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/reserve_config/patch document }
               *
               * 更新会议室预定范围
               *
               * 更新会议室预定范围
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config&apiName=reserve_scope&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/reserve_config/reserve_scope document }
               *
               * 获取会议室预定范围
               *
               * 获取会议室预定范围
               */
              reserveScope: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/reserve_scope`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "reserveScope")
            },
            /**
             * resource_reservation_list
             */
            resourceReservationList: {
              getWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/vc/v1/resource_reservation_list`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "getWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=resource_reservation_list&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=resource_reservation_list&version=v1 document }
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/resource_reservation_list`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            },
            /**
             * 会议室
             */
            room: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room/create document }
               *
               * 创建会议室
               *
               * 该接口用于创建会议室
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/rooms`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room&apiName=delete&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room/delete document }
               *
               * 删除会议室
               *
               * 该接口可以用来删除某个会议室
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/rooms/:room_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room/get document }
               *
               * 查询会议室详情
               *
               * 该接口可以使用会议室ID查询会议室详情
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/rooms/:room_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/vc/v1/rooms`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room/list document }
               *
               * 查询会议室列表
               *
               * 该接口可以用来查询某个会议室层级下会议室列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/rooms`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room&apiName=mget&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room/mget document }
               *
               * 批量查询会议室详情
               *
               * 该接口可以使用会议室ID批量查询会议室详情
               */
              mget: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/rooms/mget`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "mget"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room/patch document }
               *
               * 更新会议室
               *
               * 该接口可以用来更新某个会议室的信息
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/rooms/:room_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room/search document }
               *
               * 搜索会议室
               *
               * 该接口可以用来搜索会议室，支持使用关键词进行搜索，也支持使用自定义会议室ID进行查询
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/rooms/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * room_config
             */
            roomConfig: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room_config&apiName=query&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=vc&resource=room_config&version=v1 document }
               */
              query: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_configs/query`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "query"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room_config&apiName=set&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=set&project=vc&resource=room_config&version=v1 document }
               */
              set: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_configs/set`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "set"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room_config&apiName=set_checkboard_access_code&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=set_checkboard_access_code&project=vc&resource=room_config&version=v1 document }
               */
              setCheckboardAccessCode: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_configs/set_checkboard_access_code`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "setCheckboardAccessCode"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room_config&apiName=set_room_access_code&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=set_room_access_code&project=vc&resource=room_config&version=v1 document }
               */
              setRoomAccessCode: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_configs/set_room_access_code`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "setRoomAccessCode")
            },
            /**
             * 会议室层级
             */
            roomLevel: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room_level&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room_level/create document }
               *
               * 创建会议室层级
               *
               * 该接口用于创建会议室层级
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_levels`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room_level&apiName=del&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room_level/del document }
               *
               * 删除会议室层级
               *
               * 该接口可以用来删除某个会议室层级
               */
              del: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_levels/del`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "del"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room_level&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room_level/get document }
               *
               * 查询会议室层级详情
               *
               * 该接口可以使用会议室层级ID查询会议室层级详情
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_levels`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room_level&apiName=list&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room_level/list document }
               *
               * 查询会议室层级列表
               *
               * 该接口用来查询某个会议室层级下的子层级列表
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_levels`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room_level&apiName=mget&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room_level/mget document }
               *
               * 批量查询会议室层级详情
               *
               * 该接口可以使用会议室层级ID批量查询会议室层级详情
               */
              mget: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_levels/mget`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "mget"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room_level&apiName=patch&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room_level/patch document }
               *
               * 更新会议室层级
               *
               * 该接口可以用来更新某个会议室层级的信息
               */
              patch: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_levels/:room_level_id`, path2),
                  method: "PATCH",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "patch"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=room_level&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room_level/search document }
               *
               * 搜索会议室层级
               *
               * 该接口可以用来搜索会议室层级，支持使用自定义会议室层级ID进行查询
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_levels/search`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * 会议室配置
             */
            scopeConfig: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=scope_config&apiName=create&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/scope_config/create document }
               *
               * 设置会议室配置
               *
               * 该接口可以用来设置某个会议层级范围下或者某个会议室的配置
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/scope_config`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=vc&resource=scope_config&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/scope_config/get document }
               *
               * 查询会议室配置
               *
               * 该接口可以用来查询某个会议层级范围下或者某个会议室的配置
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/vc/v1/scope_config`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            }
          }
        };
      }
    };
    var Client$3 = class extends Client$4 {
      static {
        __name(this, "Client$3");
      }
      constructor() {
        super(...arguments);
        this.verification = {
          v1: {
            /**
             * 认证信息
             */
            verification: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=verification&resource=verification&apiName=get&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/verification-v1/verification/get document }
               *
               * 获取认证信息
               *
               * 获取企业主体名称、是否认证等信息。
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/verification/v1/verification`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            }
          }
        };
      }
    };
    var Client$2 = class extends Client$3 {
      static {
        __name(this, "Client$2");
      }
      constructor() {
        super(...arguments);
        this.wiki = {
          space: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space&apiName=create&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space/create document }
             *
             * 创建知识空间
             *
             * 此接口用于创建知识空间
             *
             * 此接口不支持tenant access token（应用身份访问）
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space&apiName=get&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space/get document }
             *
             * 获取知识空间信息
             *
             * 此接口用于根据知识空间ID来查询知识空间的信息。;;空间类型（type）：;- 个人空间：归个人管理。一人仅可拥有一个个人空间，无法添加其他管理员。;- 团队空间：归团队（多人)管理，可添加多个管理员。;;空间可见性（visibility）：;- 公开空间：租户所有用户可见，默认为成员权限。无法额外添加成员，但可以添加管理员。;- 私有空间：仅对知识空间管理员、成员可见，需要手动添加管理员、成员。
             *
             * 本接口要求知识库权限：;- 需要为知识空间成员（管理员）
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/:space_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space&apiName=get_node&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space/get_node document }
             *
             * 获取知识空间节点信息
             *
             * 获取知识空间节点信息
             *
             * 知识库权限要求，当前使用的 access token 所代表的应用或用户拥有：;- 节点阅读权限
             */
            getNode: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/get_node`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "getNode"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space&apiName=list&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space/list document }
             *
             * 获取知识空间列表
             *
             * 此接口用于获取有权限访问的知识空间列表。;;此接口为分页接口。由于权限过滤，可能返回列表为空，但分页标记（has_more）为true，可以继续分页请求。;;对于知识空间各项属性描述请参阅[获取知识空间信息](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space/get)
             *
             * 使用tenant access token调用时，请确认应用/机器人拥有部分知识空间的访问权限，否则返回列表容易为空。
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          spaceMember: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space.member&apiName=create&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-member/create document }
             *
             * 添加知识空间成员
             *
             * 添加知识空间成员或管理员。
             *
             * 知识空间具有[类型](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-overview)和[可见性](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-overview)的概念。不同的类型或可见性可以对本操作做出限制：;- 可见性限制：公开知识空间（visibility为public）对租户所有用户可见，因此不支持再添加成员，但可以添加管理员。;- 类型限制：个人知识空间 （type为person）为个人管理的知识空间，不支持添加其他管理员（包括应用/机器人）。但可以添加成员。;;;知识空间权限要求，当前使用的 access token 所代表的应用或用户拥有：;- 为知识空间管理员
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space.member&apiName=delete&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-member/delete document }
             *
             * 删除知识空间成员
             *
             * 此接口用于删除知识空间成员或管理员。
             *
             * 知识空间具有[类型](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-overview)和[可见性](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-overview)的概念。不同的类型或可见性可以对本操作做出限制：;- 可见性限制：公开知识空间（visibility为public）对租户所有用户可见，因此不支持再删除成员，但可以删除管理员。;- 类型限制：个人知识空间 （type为person）为个人管理的知识空间，不支持删除管理员。但可以删除成员。;;;知识空间权限要求，当前使用的 access token 所代表的应用或用户拥有：;- 为知识空间管理员
             */
            delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members/:member_id`, path2),
                method: "DELETE",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "delete"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space.member&apiName=list&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=wiki&resource=space.member&version=v2 document }
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list")
          },
          spaceNode: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space.node&apiName=copy&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/copy document }
             *
             * 创建知识空间节点副本
             *
             * 此接口用于在知识空间创建节点副本到指定位置。
             */
            copy: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/copy`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "copy"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space.node&apiName=create&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/create document }
             *
             * 创建知识空间节点
             *
             * 此接口用于在知识节点里创建[节点](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-overview)到指定位置。
             *
             * 知识空间权限要求，当前使用的 access token 所代表的应用或用户拥有：;- **父节点**容器编辑权限
             */
            create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "create"),
            listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                const res = yield this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`, path2),
                  method: "GET",
                  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                  data,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                });
                return res;
              }), "sendRequest");
              const Iterable = {
                [Symbol.asyncIterator]() {
                  return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                    let hasMore = true;
                    let pageToken;
                    while (hasMore) {
                      try {
                        const res = yield __await(sendRequest({
                          headers,
                          params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                          data
                        }));
                        const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                          // @ts-ignore
                          has_more,
                          // @ts-ignore
                          page_token,
                          // @ts-ignore
                          next_page_token
                        } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                        yield yield __await(rest);
                        hasMore = Boolean(has_more);
                        pageToken = page_token || next_page_token;
                      } catch (e) {
                        yield yield __await(null);
                        break;
                      }
                    }
                  }, "_a"));
                }
              };
              return Iterable;
            }), "listWithIterator"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space.node&apiName=list&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/list document }
             *
             * 获取知识空间子节点列表
             *
             * 此接口用于分页获取Wiki节点的子节点列表。;;此接口为分页接口。由于权限过滤，可能返回列表为空，但分页标记（has_more）为true，可以继续分页请求。
             *
             * 知识库权限要求，当前使用的 access token 所代表的应用或用户拥有：;- 父节点阅读权限
             */
            list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "list"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space.node&apiName=move&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/move document }
             *
             * 移动知识空间节点
             *
             * 此方法用于在Wiki内移动节点，支持跨知识空间移动。如果有子节点，会携带子节点一起移动。
             *
             * 知识库权限要求：;- 节点编辑权限;- 原父节点容器编辑权限;- 目的父节点容器编辑权限
             */
            move: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/move`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "move"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space.node&apiName=move_docs_to_wiki&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/move_docs_to_wiki document }
             *
             * 移动云空间文档至知识空间
             *
             * 该接口允许移动云空间文档至知识空间，并挂载在指定位置
             *
             * 此接口为异步接口。若移动已完成（或文档已在Wiki中），则直接返回结果（Wiki token）。若尚未完成，则返回task id。请使用[获取任务结果](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/task/get)接口进行查询。;;知识库权限要求，当前使用的 access token 所代表的应用或用户拥有：;- 文档可管理权限;- 原文件夹编辑权限;- 目标父节点容器编辑权限
             *
             * ### 移动操作 ###;移动后，文档将从“我的空间”或“共享空间”转移至“知识库”后，无法从下列入口查看到文档：;- 云空间主页：快速访问;- 我的空间;- 共享空间;;### 权限变更 ###;移动后，文档会向所有可查看“页面树”的用户显示，默认继承父页面的权限设置。;</md-alert
             */
            moveDocsToWiki: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/move_docs_to_wiki`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "moveDocsToWiki"),
            /**
             * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space.node&apiName=update_title&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/update_title document }
             *
             * 更新知识空间节点标题
             *
             * 此接口用于更新节点标题
             *
             * 此接口目前仅支持文档(doc)、新版文档(docx)和快捷方式。
             */
            updateTitle: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/update_title`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "updateTitle")
          },
          spaceSetting: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space.setting&apiName=update&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-setting/update document }
             *
             * 更新知识空间设置
             *
             * 根据space_id更新知识空间公共设置
             *
             * 知识库权限要求：;- 为知识空间管理员
             */
            update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/setting`, path2),
                method: "PUT",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "update")
          },
          task: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=task&apiName=get&version=v2 click to debug }
             *
             * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/task/get document }
             *
             * 获取任务结果
             *
             * 该方法用于获取wiki异步任务的结果
             *
             * 知识库权限要求，当前 access token 所代表的用户或应用（机器人）：;- 为任务创建者
             */
            get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/wiki/v2/tasks/:task_id`, path2),
                method: "GET",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "get")
          },
          v1: {
            /**
             * 知识库
             */
            node: {
              searchWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/wiki/v1/nodes/search`, path2),
                    method: "POST",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "searchWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=node&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uEzN0YjLxcDN24SM3QjN/search_wiki document }
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/wiki/v1/nodes/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            }
          },
          v2: {
            /**
             * 知识空间
             */
            space: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space/create document }
               *
               * 创建知识空间
               *
               * 此接口用于创建知识空间
               *
               * 此接口不支持tenant access token（应用身份访问）
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space&apiName=get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space/get document }
               *
               * 获取知识空间信息
               *
               * 此接口用于根据知识空间ID来查询知识空间的信息。;;空间类型（type）：;- 个人空间：归个人管理。一人仅可拥有一个个人空间，无法添加其他管理员。;- 团队空间：归团队（多人)管理，可添加多个管理员。;;空间可见性（visibility）：;- 公开空间：租户所有用户可见，默认为成员权限。无法额外添加成员，但可以添加管理员。;- 私有空间：仅对知识空间管理员、成员可见，需要手动添加管理员、成员。
               *
               * 本接口要求知识库权限：;- 需要为知识空间成员（管理员）
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/:space_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space&apiName=get_node&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space/get_node document }
               *
               * 获取知识空间节点信息
               *
               * 获取知识空间节点信息
               *
               * 知识库权限要求，当前使用的 access token 所代表的应用或用户拥有：;- 节点阅读权限
               */
              getNode: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/get_node`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "getNode"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space/list document }
               *
               * 获取知识空间列表
               *
               * 此接口用于获取有权限访问的知识空间列表。;;此接口为分页接口。由于权限过滤，可能返回列表为空，但分页标记（has_more）为true，可以继续分页请求。;;对于知识空间各项属性描述请参阅[获取知识空间信息](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space/get)
               *
               * 使用tenant access token调用时，请确认应用/机器人拥有部分知识空间的访问权限，否则返回列表容易为空。
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 空间成员
             */
            spaceMember: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space.member&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-member/create document }
               *
               * 添加知识空间成员
               *
               * 添加知识空间成员或管理员。
               *
               * 知识空间具有[类型](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-overview)和[可见性](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-overview)的概念。不同的类型或可见性可以对本操作做出限制：;- 可见性限制：公开知识空间（visibility为public）对租户所有用户可见，因此不支持再添加成员，但可以添加管理员。;- 类型限制：个人知识空间 （type为person）为个人管理的知识空间，不支持添加其他管理员（包括应用/机器人）。但可以添加成员。;;;知识空间权限要求，当前使用的 access token 所代表的应用或用户拥有：;- 为知识空间管理员
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space.member&apiName=delete&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-member/delete document }
               *
               * 删除知识空间成员
               *
               * 此接口用于删除知识空间成员或管理员。
               *
               * 知识空间具有[类型](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-overview)和[可见性](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-overview)的概念。不同的类型或可见性可以对本操作做出限制：;- 可见性限制：公开知识空间（visibility为public）对租户所有用户可见，因此不支持再删除成员，但可以删除管理员。;- 类型限制：个人知识空间 （type为person）为个人管理的知识空间，不支持删除管理员。但可以删除成员。;;;知识空间权限要求，当前使用的 access token 所代表的应用或用户拥有：;- 为知识空间管理员
               */
              delete: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members/:member_id`, path2),
                  method: "DELETE",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "delete"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space.member&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=wiki&resource=space.member&version=v2 document }
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/members`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list")
            },
            /**
             * 节点
             */
            spaceNode: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space.node&apiName=copy&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/copy document }
               *
               * 创建知识空间节点副本
               *
               * 此接口用于在知识空间创建节点副本到指定位置。
               */
              copy: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/copy`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "copy"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space.node&apiName=create&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/create document }
               *
               * 创建知识空间节点
               *
               * 此接口用于在知识节点里创建[节点](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-overview)到指定位置。
               *
               * 知识空间权限要求，当前使用的 access token 所代表的应用或用户拥有：;- **父节点**容器编辑权限
               */
              create: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "create"),
              listWithIterator: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                const sendRequest = /* @__PURE__ */ __name((innerPayload) => __awaiter(this, void 0, void 0, function* () {
                  const res = yield this.httpInstance.request({
                    url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`, path2),
                    method: "GET",
                    headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
                    params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
                    data,
                    paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, {
                      arrayFormat: "repeat"
                    }), "paramsSerializer")
                  }).catch((e) => {
                    this.logger.error(formatErrors(e));
                  });
                  return res;
                }), "sendRequest");
                const Iterable = {
                  [Symbol.asyncIterator]() {
                    return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                      let hasMore = true;
                      let pageToken;
                      while (hasMore) {
                        try {
                          const res = yield __await(sendRequest({
                            headers,
                            params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
                            data
                          }));
                          const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
                            // @ts-ignore
                            has_more,
                            // @ts-ignore
                            page_token,
                            // @ts-ignore
                            next_page_token
                          } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
                          yield yield __await(rest);
                          hasMore = Boolean(has_more);
                          pageToken = page_token || next_page_token;
                        } catch (e) {
                          yield yield __await(null);
                          break;
                        }
                      }
                    }, "_a"));
                  }
                };
                return Iterable;
              }), "listWithIterator"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space.node&apiName=list&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/list document }
               *
               * 获取知识空间子节点列表
               *
               * 此接口用于分页获取Wiki节点的子节点列表。;;此接口为分页接口。由于权限过滤，可能返回列表为空，但分页标记（has_more）为true，可以继续分页请求。
               *
               * 知识库权限要求，当前使用的 access token 所代表的应用或用户拥有：;- 父节点阅读权限
               */
              list: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "list"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space.node&apiName=move&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/move document }
               *
               * 移动知识空间节点
               *
               * 此方法用于在Wiki内移动节点，支持跨知识空间移动。如果有子节点，会携带子节点一起移动。
               *
               * 知识库权限要求：;- 节点编辑权限;- 原父节点容器编辑权限;- 目的父节点容器编辑权限
               */
              move: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/move`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "move"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space.node&apiName=move_docs_to_wiki&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/move_docs_to_wiki document }
               *
               * 移动云空间文档至知识空间
               *
               * 该接口允许移动云空间文档至知识空间，并挂载在指定位置
               *
               * 此接口为异步接口。若移动已完成（或文档已在Wiki中），则直接返回结果（Wiki token）。若尚未完成，则返回task id。请使用[获取任务结果](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/task/get)接口进行查询。;;知识库权限要求，当前使用的 access token 所代表的应用或用户拥有：;- 文档可管理权限;- 原文件夹编辑权限;- 目标父节点容器编辑权限
               *
               * ### 移动操作 ###;移动后，文档将从“我的空间”或“共享空间”转移至“知识库”后，无法从下列入口查看到文档：;- 云空间主页：快速访问;- 我的空间;- 共享空间;;### 权限变更 ###;移动后，文档会向所有可查看“页面树”的用户显示，默认继承父页面的权限设置。;</md-alert
               */
              moveDocsToWiki: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/move_docs_to_wiki`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "moveDocsToWiki"),
              /**
               * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space.node&apiName=update_title&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/update_title document }
               *
               * 更新知识空间节点标题
               *
               * 此接口用于更新节点标题
               *
               * 此接口目前仅支持文档(doc)、新版文档(docx)和快捷方式。
               */
              updateTitle: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/nodes/:node_token/update_title`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "updateTitle")
            },
            /**
             * 空间设置
             */
            spaceSetting: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=space.setting&apiName=update&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-setting/update document }
               *
               * 更新知识空间设置
               *
               * 根据space_id更新知识空间公共设置
               *
               * 知识库权限要求：;- 为知识空间管理员
               */
              update: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/wiki/v2/spaces/:space_id/setting`, path2),
                  method: "PUT",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "update")
            },
            /**
             * 云文档
             */
            task: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=wiki&resource=task&apiName=get&version=v2 click to debug }
               *
               * {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/task/get document }
               *
               * 获取任务结果
               *
               * 该方法用于获取wiki异步任务的结果
               *
               * 知识库权限要求，当前 access token 所代表的用户或应用（机器人）：;- 为任务创建者
               */
              get: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/wiki/v2/tasks/:task_id`, path2),
                  method: "GET",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "get")
            }
          }
        };
      }
    };
    var Client$1 = class extends Client$2 {
      static {
        __name(this, "Client$1");
      }
      constructor() {
        super(...arguments);
        this.workplace = {
          /**
           * custom_workplace_access_data
           */
          customWorkplaceAccessData: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=workplace&resource=custom_workplace_access_data&apiName=search&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=workplace&resource=custom_workplace_access_data&version=v1 document }
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/workplace/v1/custom_workplace_access_data/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search")
          },
          /**
           * workplace_access_data
           */
          workplaceAccessData: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=workplace&resource=workplace_access_data&apiName=search&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=workplace&resource=workplace_access_data&version=v1 document }
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/workplace/v1/workplace_access_data/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search")
          },
          /**
           * workplace_block_access_data
           */
          workplaceBlockAccessData: {
            /**
             * {@link https://open.feishu.cn/api-explorer?project=workplace&resource=workplace_block_access_data&apiName=search&version=v1 click to debug }
             *
             * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=workplace&resource=workplace_block_access_data&version=v1 document }
             */
            search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
              const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
              return this.httpInstance.request({
                url: fillApiPath(`${this.domain}/open-apis/workplace/v1/workplace_block_access_data/search`, path2),
                method: "POST",
                data,
                params,
                headers,
                paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
              }).catch((e) => {
                this.logger.error(formatErrors(e));
                throw e;
              });
            }), "search")
          },
          v1: {
            /**
             * custom_workplace_access_data
             */
            customWorkplaceAccessData: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=workplace&resource=custom_workplace_access_data&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=workplace&resource=custom_workplace_access_data&version=v1 document }
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/workplace/v1/custom_workplace_access_data/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * workplace_access_data
             */
            workplaceAccessData: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=workplace&resource=workplace_access_data&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=workplace&resource=workplace_access_data&version=v1 document }
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/workplace/v1/workplace_access_data/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            },
            /**
             * workplace_block_access_data
             */
            workplaceBlockAccessData: {
              /**
               * {@link https://open.feishu.cn/api-explorer?project=workplace&resource=workplace_block_access_data&apiName=search&version=v1 click to debug }
               *
               * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=workplace&resource=workplace_block_access_data&version=v1 document }
               */
              search: /* @__PURE__ */ __name((payload, options) => __awaiter(this, void 0, void 0, function* () {
                const { headers, params, data, path: path2 } = yield this.formatPayload(payload, options);
                return this.httpInstance.request({
                  url: fillApiPath(`${this.domain}/open-apis/workplace/v1/workplace_block_access_data/search`, path2),
                  method: "POST",
                  data,
                  params,
                  headers,
                  paramsSerializer: /* @__PURE__ */ __name((params2) => qs.stringify(params2, { arrayFormat: "repeat" }), "paramsSerializer")
                }).catch((e) => {
                  this.logger.error(formatErrors(e));
                  throw e;
                });
              }), "search")
            }
          }
        };
      }
    };
    var defaultLogger = {
      error: /* @__PURE__ */ __name((...msg) => {
        console.log("[error]:", ...msg);
      }, "error"),
      warn: /* @__PURE__ */ __name((...msg) => {
        console.warn("[warn]:", ...msg);
      }, "warn"),
      info: /* @__PURE__ */ __name((...msg) => {
        console.info("[info]:", ...msg);
      }, "info"),
      debug: /* @__PURE__ */ __name((...msg) => {
        console.debug("[debug]:", ...msg);
      }, "debug"),
      trace: /* @__PURE__ */ __name((...msg) => {
        console.trace("[trace]:", ...msg);
      }, "trace")
    };
    var LoggerProxy = class {
      static {
        __name(this, "LoggerProxy");
      }
      constructor(level, logger) {
        this.level = level;
        this.logger = logger;
      }
      error(...msg) {
        if (this.level >= exports.LoggerLevel.error) {
          this.logger.error(msg);
        }
      }
      warn(...msg) {
        if (this.level >= exports.LoggerLevel.warn) {
          this.logger.warn(msg);
        }
      }
      info(...msg) {
        if (this.level >= exports.LoggerLevel.info) {
          this.logger.info(msg);
        }
      }
      debug(...msg) {
        if (this.level >= exports.LoggerLevel.debug) {
          this.logger.debug(msg);
        }
      }
      trace(...msg) {
        if (this.level >= exports.LoggerLevel.trace) {
          this.logger.trace(msg);
        }
      }
    };
    var AppTicketManager = class {
      static {
        __name(this, "AppTicketManager");
      }
      constructor(params) {
        this.appId = params.appId;
        this.appSecret = params.appSecret;
        this.cache = params.cache;
        this.domain = params.domain;
        this.logger = params.logger;
        this.appType = params.appType;
        this.httpInstance = params.httpInstance;
        this.logger.debug("app ticket manager is ready");
        this.checkAppTicket();
      }
      checkAppTicket() {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
          if (this.appType === exports.AppType.ISV) {
            const appTicket = yield (_a = this.cache) === null || _a === void 0 ? void 0 : _a.get(CAppTicket, {
              namespace: this.appId
            });
            if (!appTicket) {
              this.requestAppTicket();
            }
          }
        });
      }
      requestAppTicket() {
        return __awaiter(this, void 0, void 0, function* () {
          this.logger.debug("request app ticket");
          yield this.httpInstance.post(`${this.domain}/open-apis/auth/v3/app_ticket/resend`, {
            app_id: this.appId,
            app_secret: this.appSecret
          }).catch((e) => {
            this.logger.error(e);
          });
        });
      }
      getAppTicket() {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
          const appTicket = yield (_a = this.cache) === null || _a === void 0 ? void 0 : _a.get(CAppTicket, {
            namespace: this.appId
          });
          if (appTicket) {
            this.logger.debug("use cache app ticket");
            return appTicket;
          }
          yield this.requestAppTicket();
          return void 0;
        });
      }
    };
    var TokenManager = class {
      static {
        __name(this, "TokenManager");
      }
      constructor(params) {
        this.appId = params.appId;
        this.appSecret = params.appSecret;
        this.cache = params.cache;
        this.domain = params.domain;
        this.logger = params.logger;
        this.appType = params.appType;
        this.httpInstance = params.httpInstance;
        this.appTicketManager = new AppTicketManager({
          appId: this.appId,
          appSecret: this.appSecret,
          cache: this.cache,
          domain: this.domain,
          logger: this.logger,
          appType: this.appType,
          httpInstance: this.httpInstance
        });
        this.logger.debug("token manager is ready");
      }
      getCustomTenantAccessToken() {
        var _a, _b;
        return __awaiter(this, void 0, void 0, function* () {
          const cachedTenantAccessToken = yield (_a = this.cache) === null || _a === void 0 ? void 0 : _a.get(CTenantAccessToken, {
            namespace: this.appId
          });
          if (cachedTenantAccessToken) {
            this.logger.debug("use cache token");
            return cachedTenantAccessToken;
          }
          this.logger.debug("request token");
          const { tenant_access_token, expire } = yield this.httpInstance.post(`${this.domain}/open-apis/auth/v3/tenant_access_token/internal`, {
            app_id: this.appId,
            app_secret: this.appSecret
          }).catch((e) => {
            this.logger.error(e);
          });
          yield (_b = this.cache) === null || _b === void 0 ? void 0 : _b.set(
            CTenantAccessToken,
            tenant_access_token,
            // Due to the time-consuming network, the expiration time needs to be 3 minutes earlier
            (/* @__PURE__ */ new Date()).getTime() + expire * 1e3 - 3 * 60 * 1e3,
            {
              namespace: this.appId
            }
          );
          return tenant_access_token;
        });
      }
      getMarketTenantAccessToken(tenantKey) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
          if (!tenantKey) {
            this.logger.error("market app request need tenant key");
            return void 0;
          }
          const tenantAccessToken = yield (_a = this.cache) === null || _a === void 0 ? void 0 : _a.get(`larkMarketAccessToken${tenantKey}`, {
            namespace: this.appId
          });
          if (tenantAccessToken) {
            this.logger.debug("use cache token");
            return tenantAccessToken;
          }
          this.logger.debug("get app ticket");
          const appTicket = yield this.appTicketManager.getAppTicket();
          if (!appTicket) {
            this.logger.warn("no app ticket");
            return void 0;
          }
          this.logger.debug("get app access token");
          const { app_access_token } = yield this.httpInstance.post(`${this.domain}/open-apis/auth/v3/app_access_token`, {
            app_id: this.appId,
            app_secret: this.appSecret,
            app_ticket: appTicket
          }).catch((e) => {
            this.logger.error(e);
          });
          this.logger.debug("get tenant access token");
          const { tenant_access_token, expire } = yield this.httpInstance.post(`${this.domain}/open-apis/auth/v3/tenant_access_token`, {
            app_access_token,
            tenant_key: tenantKey
          }).catch((e) => {
            this.logger.error(e);
          });
          yield this.cache.set(
            `larkMarketAccessToken${tenantKey}`,
            tenant_access_token,
            // Due to the time-consuming network, the expiration time needs to be 3 minutes earlier
            (/* @__PURE__ */ new Date()).getTime() + expire * 1e3 - 3 * 60 * 1e3,
            {
              namespace: this.appId
            }
          );
          return tenant_access_token;
        });
      }
      getTenantAccessToken(params) {
        return __awaiter(this, void 0, void 0, function* () {
          assert(this.appType === exports.AppType.SelfBuild, () => __awaiter(this, void 0, void 0, function* () {
            this.logger.debug("get custom app token");
          }));
          assert(this.appType === exports.AppType.ISV, () => __awaiter(this, void 0, void 0, function* () {
            this.logger.debug("get market app token ");
          }));
          const tenantAccessToken = this.appType === exports.AppType.SelfBuild ? yield this.getCustomTenantAccessToken() : yield this.getMarketTenantAccessToken(params === null || params === void 0 ? void 0 : params[CTenantKey]);
          return tenantAccessToken;
        });
      }
    };
    var mergeObject = /* @__PURE__ */ __name((obj1, obj2) => {
      const mergedObject = Object.assign({}, obj1);
      for (let [key, value] of Object.entries(obj2)) {
        if (value !== void 0) {
          mergedObject[key] = value;
        }
      }
      return mergedObject;
    }, "mergeObject");
    var UserAccessToken = class {
      static {
        __name(this, "UserAccessToken");
      }
      constructor(params) {
        this.client = params.client;
      }
      getCacheKey(key, options) {
        const namespace = (options === null || options === void 0 ? void 0 : options.namespace) || this.client.appId;
        return `${namespace}/${CUserAccessToken.toString()}/${key}`;
      }
      // the unit of time is seconds
      calibrateTime(time) {
        return (/* @__PURE__ */ new Date()).getTime() + (time || 0) * 1e3 - 3 * 60 * 1e3;
      }
      initWithCode(key2Code, options) {
        return __awaiter(this, void 0, void 0, function* () {
          const key2Info = {};
          for (const [key, code] of Object.entries(key2Code)) {
            const oidcAccessInfo = yield this.client.authen.oidcAccessToken.create({
              data: {
                grant_type: "authorization_code",
                code
              }
            });
            if (oidcAccessInfo.code !== 0) {
              this.client.logger.error("init user access token error", key, oidcAccessInfo.msg || oidcAccessInfo.message);
              continue;
            }
            if (!oidcAccessInfo.data) {
              this.client.logger.error("user access code expired", key, code);
              continue;
            }
            key2Info[key] = {
              code,
              token: oidcAccessInfo.data.access_token,
              refreshToken: oidcAccessInfo.data.refresh_token,
              expiredTime: this.calibrateTime(oidcAccessInfo.data.expires_in)
            };
          }
          yield this.update(key2Info, { namespace: options === null || options === void 0 ? void 0 : options.namespace });
          return key2Info;
        });
      }
      update(key2Info, options) {
        return __awaiter(this, void 0, void 0, function* () {
          for (const [key, info] of Object.entries(key2Info)) {
            const cacheKey = this.getCacheKey(key, { namespace: options === null || options === void 0 ? void 0 : options.namespace });
            const cacheValue = (yield this.client.cache.get(cacheKey)) || {};
            const { code, token, refreshToken, expiredTime } = info;
            const targetValue = mergeObject(cacheValue, { code, token, refreshToken, expiredTime });
            yield this.client.cache.set(cacheKey, targetValue, Infinity);
          }
        });
      }
      get(key, options) {
        return __awaiter(this, void 0, void 0, function* () {
          const cacheKey = this.getCacheKey(key, { namespace: options === null || options === void 0 ? void 0 : options.namespace });
          const cacheInfo = yield this.client.cache.get(cacheKey);
          if (!cacheInfo) {
            this.client.logger.error("user access token needs to be initialized or updated first");
            return;
          }
          const { token, code, refreshToken, expiredTime } = cacheInfo;
          if (token && expiredTime && expiredTime - (/* @__PURE__ */ new Date()).getTime() > 0) {
            return token;
          }
          if (refreshToken) {
            const refreshAccessInfo = yield this.client.authen.oidcRefreshAccessToken.create({
              data: {
                grant_type: "refresh_token",
                refresh_token: refreshToken
              }
            });
            if (refreshAccessInfo.code === 0 && refreshAccessInfo.data) {
              yield this.update({
                [key]: {
                  token: refreshAccessInfo.data.access_token,
                  refreshToken: refreshAccessInfo.data.refresh_token,
                  expiredTime: this.calibrateTime(refreshAccessInfo.data.expires_in)
                }
              });
              return refreshAccessInfo.data.access_token;
            } else {
              this.client.logger.error("get user access token by refresh token failed.", refreshAccessInfo.msg);
              return;
            }
          }
          if (code) {
            const oidcAccessInfo = yield this.client.authen.oidcAccessToken.create({
              data: {
                grant_type: "authorization_code",
                code
              }
            });
            if (oidcAccessInfo.code === 0 && oidcAccessInfo.data) {
              yield this.update({
                [key]: {
                  token: oidcAccessInfo.data.access_token,
                  refreshToken: oidcAccessInfo.data.refresh_token,
                  expiredTime: this.calibrateTime(oidcAccessInfo.data.expires_in)
                }
              });
            } else {
              this.client.logger.error("get user access token by code failed.", oidcAccessInfo.msg);
            }
          }
          return;
        });
      }
    };
    var Client = class extends Client$1 {
      static {
        __name(this, "Client");
      }
      constructor(params) {
        super();
        this.appId = "";
        this.appSecret = "";
        this.helpDeskId = "";
        this.helpDeskToken = "";
        this.appType = exports.AppType.SelfBuild;
        this.logger = new LoggerProxy(params.loggerLevel || exports.LoggerLevel.info, params.logger || defaultLogger);
        this.appId = params.appId;
        this.appSecret = params.appSecret;
        this.disableTokenCache = params.disableTokenCache;
        this.userAgent = buildUserAgent(params.source, { extraTags: params.extraUaTags });
        assert(!this.appId, () => this.logger.error("appId is needed"));
        assert(!this.appSecret, () => this.logger.error("appSecret is needed"));
        this.helpDeskId = params.helpDeskId;
        this.helpDeskToken = params.helpDeskToken;
        this.appType = (params === null || params === void 0 ? void 0 : params.appType) || exports.AppType.SelfBuild;
        this.domain = formatDomain(params.domain || exports.Domain.Feishu);
        this.logger.debug(`use domain url: ${this.domain}`);
        this.cache = params.cache || internalCache;
        this.httpInstance = params.httpInstance || defaultHttpInstance;
        this.tokenManager = new TokenManager({
          appId: this.appId,
          appSecret: this.appSecret,
          cache: this.cache,
          domain: this.domain,
          logger: this.logger,
          appType: this.appType,
          httpInstance: this.httpInstance
        });
        this.userAccessToken = new UserAccessToken({ client: this });
        this.logger.info("client ready");
      }
      formatPayload(payload, options) {
        var _a, _b, _c;
        return __awaiter(this, void 0, void 0, function* () {
          const targetOptions = [
            "lark",
            "params",
            "data",
            "headers",
            "path"
          ].reduce((acc, key) => {
            acc[key] = (options === null || options === void 0 ? void 0 : options[key]) || {};
            return acc;
          }, {});
          const userAccessToken = (_a = targetOptions === null || targetOptions === void 0 ? void 0 : targetOptions.lark) === null || _a === void 0 ? void 0 : _a[CWithUserAccessToken];
          if (userAccessToken) {
            this.logger.debug("use passed token");
            targetOptions.headers.Authorization = `Bearer ${userAccessToken}`;
          } else if (!this.disableTokenCache) {
            const tenantAccessToken = yield this.tokenManager.getTenantAccessToken({
              [CTenantKey]: (_b = targetOptions === null || targetOptions === void 0 ? void 0 : targetOptions.lark) === null || _b === void 0 ? void 0 : _b[CTenantKey]
            });
            if (tenantAccessToken) {
              targetOptions.headers.Authorization = `Bearer ${tenantAccessToken}`;
            } else {
              this.logger.warn("failed to obtain token");
            }
          }
          const withHelpDeskCredential2 = (_c = targetOptions === null || targetOptions === void 0 ? void 0 : targetOptions.lark) === null || _c === void 0 ? void 0 : _c[CWithHelpdeskAuthorization];
          if (withHelpDeskCredential2) {
            this.logger.debug("generate help desk credential");
            const helpDeskCredential = string2Base64(`${this.helpDeskId}:${this.helpDeskToken}`);
            targetOptions.headers["X-Lark-Helpdesk-Authorization"] = `Bearer ${helpDeskCredential}`;
          }
          return {
            params: Object.assign(Object.assign({}, (payload === null || payload === void 0 ? void 0 : payload.params) || {}), targetOptions.params),
            headers: Object.assign(Object.assign({ "User-Agent": this.userAgent }, (payload === null || payload === void 0 ? void 0 : payload.headers) || {}), targetOptions.headers),
            data: Object.assign(Object.assign({}, (payload === null || payload === void 0 ? void 0 : payload.data) || {}), targetOptions.data),
            path: Object.assign(Object.assign({}, (payload === null || payload === void 0 ? void 0 : payload.path) || {}), targetOptions.path)
          };
        });
      }
      request(payload, options) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
          const { data, params, headers, url } = payload, rest = __rest(payload, ["data", "params", "headers", "url"]);
          const formatPayload = yield this.formatPayload({
            data,
            params,
            headers
          }, options);
          const targetData = ((_a = payload.method) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === "get" && Object.keys(formatPayload.data).length === 0 ? void 0 : formatPayload.data;
          this.logger.trace(`send request [${payload.method}]: ${payload.url}`);
          const res = yield this.httpInstance.request(Object.assign(Object.assign({}, rest), {
            url: /^http/.test(url) ? url : `${this.domain}/${formatUrl(url)}`,
            headers: formatPayload.headers,
            data: targetData,
            params: formatPayload.params
          })).catch((e) => {
            this.logger.error(e);
            throw e;
          });
          return res;
        });
      }
    };
    var withAll = /* @__PURE__ */ __name((withList) => withList.reduce((acc, cur) => merge__default["default"](acc, cur), {}), "withAll");
    var withTenantKey = /* @__PURE__ */ __name((tenantKey) => ({
      lark: {
        [CTenantKey]: tenantKey
      }
    }), "withTenantKey");
    var withHelpDeskCredential = /* @__PURE__ */ __name(() => ({
      lark: {
        [CWithHelpdeskAuthorization]: true
      }
    }), "withHelpDeskCredential");
    var withTenantToken = /* @__PURE__ */ __name((tenantAccessToken) => ({
      headers: {
        Authorization: `Bearer ${tenantAccessToken}`
      }
    }), "withTenantToken");
    var withUserAccessToken = /* @__PURE__ */ __name((userAccessToken) => ({
      lark: {
        [CWithUserAccessToken]: userAccessToken
      }
    }), "withUserAccessToken");
    var RequestHandle = class {
      static {
        __name(this, "RequestHandle");
      }
      constructor(params) {
        const { encryptKey, verificationToken, logger } = params;
        this.verificationToken = verificationToken;
        this.encryptKey = encryptKey;
        this.logger = logger;
        if (encryptKey) {
          this.aesCipher = new AESCipher(encryptKey);
        }
      }
      parse(data) {
        var _a, _b;
        const targetData = (() => {
          var _a2;
          const _b2 = data || {}, { encrypt } = _b2, rest2 = __rest(_b2, ["encrypt"]);
          if (encrypt) {
            try {
              return Object.assign(Object.assign({}, JSON.parse((_a2 = this.aesCipher) === null || _a2 === void 0 ? void 0 : _a2.decrypt(encrypt))), rest2);
            } catch (e) {
              this.logger.error("parse encrypt data failed");
              return {};
            }
          }
          return rest2;
        })();
        if ("schema" in targetData) {
          const { header, event: event2 } = targetData, rest2 = __rest(targetData, ["header", "event"]);
          return Object.assign(Object.assign(Object.assign({ [CEventType]: (_a = targetData === null || targetData === void 0 ? void 0 : targetData.header) === null || _a === void 0 ? void 0 : _a.event_type }, rest2), header), event2);
        }
        const { event } = targetData, rest = __rest(targetData, ["event"]);
        return Object.assign(Object.assign({ [CEventType]: (_b = targetData === null || targetData === void 0 ? void 0 : targetData.event) === null || _b === void 0 ? void 0 : _b.type }, event), rest);
      }
      checkIsCardEventValidated(data) {
        if ("encrypt" in data || "schema" in data) {
          return this.checkIsEventValidated(data);
        }
        const { "x-lark-request-timestamp": timestamp, "x-lark-request-nonce": nonce, "x-lark-signature": signature } = data.headers;
        if (!this.verificationToken) {
          return true;
        }
        const computedSignature = crypto__default["default"].createHash("sha1").update(timestamp + nonce + this.verificationToken + JSON.stringify(data)).digest("hex");
        return computedSignature === signature;
      }
      checkIsEventValidated(data) {
        if (!this.encryptKey) {
          return true;
        }
        const { "x-lark-request-timestamp": timestamp, "x-lark-request-nonce": nonce, "x-lark-signature": signature } = data.headers;
        const content = timestamp + nonce + this.encryptKey + JSON.stringify(data);
        const computedSignature = crypto__default["default"].createHash("sha256").update(content).digest("hex");
        return computedSignature === signature;
      }
    };
    var CAppTicketHandle = "app_ticket";
    var EventDispatcher2 = class {
      static {
        __name(this, "EventDispatcher");
      }
      constructor(params) {
        this.verificationToken = "";
        this.encryptKey = "";
        this.handles = /* @__PURE__ */ new Map();
        const { encryptKey, verificationToken } = params;
        this.encryptKey = encryptKey || "";
        this.verificationToken = verificationToken || "";
        this.logger = new LoggerProxy(params.loggerLevel || exports.LoggerLevel.info, params.logger || defaultLogger);
        this.requestHandle = new RequestHandle({
          encryptKey,
          verificationToken,
          logger: this.logger
        });
        this.cache = params.cache || internalCache;
        this.registerAppTicketHandle();
        this.logger.info("event-dispatch is ready");
      }
      registerAppTicketHandle() {
        this.register({
          app_ticket: /* @__PURE__ */ __name((data) => __awaiter(this, void 0, void 0, function* () {
            const { app_ticket, app_id } = data;
            if (app_ticket) {
              yield this.cache.set(CAppTicket, app_ticket, void 0, {
                namespace: app_id
              });
              this.logger.debug("set app ticket");
            } else {
              this.logger.warn("response not include app ticket");
            }
          }), "app_ticket")
        });
      }
      register(handles) {
        Object.keys(handles).forEach((key) => {
          if (this.handles.has(key) && key !== CAppTicketHandle) {
            this.logger.error(`this ${key} handle is registered`);
          }
          this.handles.set(key, handles[key]);
          this.logger.debug(`register ${key} handle`);
        });
        return this;
      }
      invoke(data, params) {
        var _a, _b;
        return __awaiter(this, void 0, void 0, function* () {
          const needCheck = (params === null || params === void 0 ? void 0 : params.needCheck) === false ? false : true;
          if (needCheck && !((_a = this.requestHandle) === null || _a === void 0 ? void 0 : _a.checkIsEventValidated(data))) {
            this.logger.warn("verification failed event");
            return void 0;
          }
          const targetData = (_b = this.requestHandle) === null || _b === void 0 ? void 0 : _b.parse(data);
          const type = targetData[CEventType];
          if (this.handles.has(type)) {
            const ret = yield this.handles.get(type)(targetData);
            this.logger.debug(`execute ${type} handle`);
            return ret;
          }
          this.logger.warn(`no ${type} handle`);
          return `no ${type} event handle`;
        });
      }
    };
    var CardActionHandler = class {
      static {
        __name(this, "CardActionHandler");
      }
      constructor(params, cardHandler) {
        this.verificationToken = "";
        this.encryptKey = "";
        this.handles = /* @__PURE__ */ new Map();
        const { verificationToken, encryptKey } = params;
        this.encryptKey = encryptKey || "";
        this.verificationToken = verificationToken || "";
        this.cardHandler = cardHandler;
        this.logger = new LoggerProxy(params.loggerLevel || exports.LoggerLevel.info, params.logger || defaultLogger);
        this.requestHandle = new RequestHandle({
          encryptKey,
          verificationToken,
          logger: this.logger
        });
        this.cache = params.cache || internalCache;
        this.registerAppTicketHandle();
        this.logger.info("card-action-handle is ready");
      }
      registerAppTicketHandle() {
        this.register({
          app_ticket: /* @__PURE__ */ __name((data) => __awaiter(this, void 0, void 0, function* () {
            const { app_ticket, app_id } = data;
            if (app_ticket) {
              yield this.cache.set(CAppTicket, app_ticket, void 0, {
                namespace: app_id
              });
              this.logger.debug("set app ticket");
            } else {
              this.logger.warn("response not include app ticket");
            }
          }), "app_ticket")
        });
      }
      register(handles) {
        Object.keys(handles).forEach((key) => {
          this.handles.set(key, handles[key]);
          this.logger.debug(`register ${key} handle`);
        });
        return this;
      }
      invoke(data) {
        var _a, _b;
        return __awaiter(this, void 0, void 0, function* () {
          if (!((_a = this.requestHandle) === null || _a === void 0 ? void 0 : _a.checkIsCardEventValidated(data))) {
            this.logger.warn("verification failed event");
            return void 0;
          }
          const targetData = (_b = this.requestHandle) === null || _b === void 0 ? void 0 : _b.parse(data);
          const type = targetData[CEventType];
          if (this.handles.has(type)) {
            try {
              const ret = yield this.handles.get(type)(targetData);
              return ret;
            } catch (e) {
              this.logger.error(e);
              return void 0;
            }
          }
          try {
            const result = yield this.cardHandler(targetData);
            this.logger.debug("execute card handle");
            return result;
          } catch (e) {
            this.logger.error(e);
          }
          return void 0;
        });
      }
    };
    var pickRequestData = /* @__PURE__ */ __name((req) => new Promise((resolve) => {
      let chunks = "";
      req.on("data", (chunk) => {
        chunks += chunk;
      });
      req.on("end", () => {
        try {
          const data = JSON.parse(chunks);
          resolve(data);
        } catch (e) {
          resolve("");
        }
      });
    }), "pickRequestData");
    var generateChallenge = /* @__PURE__ */ __name((data, options) => {
      if ("encrypt" in data && !options.encryptKey) {
        throw new Error("auto-challenge need encryptKey, please check for missing in dispatcher");
      }
      const targetData = "encrypt" in data ? JSON.parse(new AESCipher(options.encryptKey).decrypt(data.encrypt)) : data;
      return {
        isChallenge: targetData.type === "url_verification",
        challenge: {
          challenge: targetData.challenge
        }
      };
    }, "generateChallenge");
    var adaptDefault = /* @__PURE__ */ __name((path2, dispatcher, options) => (req, res) => __awaiter(void 0, void 0, void 0, function* () {
      if (req.url !== path2) {
        return;
      }
      const data = Object.assign(/* @__PURE__ */ Object.create({
        headers: req.headers
      }), yield pickRequestData(req));
      const autoChallenge = (options === null || options === void 0 ? void 0 : options.autoChallenge) || false;
      if (autoChallenge) {
        const { isChallenge, challenge } = generateChallenge(data, {
          encryptKey: dispatcher.encryptKey
        });
        if (isChallenge) {
          res.end(JSON.stringify(challenge));
          return;
        }
      }
      const value = yield dispatcher.invoke(data);
      res.end(JSON.stringify(value));
    }), "adaptDefault");
    var adaptExpress = /* @__PURE__ */ __name((dispatcher, options) => (req, res) => __awaiter(void 0, void 0, void 0, function* () {
      const reqData = yield (() => __awaiter(void 0, void 0, void 0, function* () {
        if (req.body) {
          return req.body;
        }
        if (!req.complete) {
          const incomingdata = yield pickRequestData(req);
          return incomingdata;
        }
        ((options === null || options === void 0 ? void 0 : options.logger) || defaultLogger).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body");
        return null;
      }))();
      const data = Object.assign(/* @__PURE__ */ Object.create({
        headers: req.headers
      }), reqData);
      const autoChallenge = (options === null || options === void 0 ? void 0 : options.autoChallenge) || false;
      if (autoChallenge) {
        const { isChallenge, challenge } = generateChallenge(data, {
          encryptKey: dispatcher.encryptKey
        });
        if (isChallenge) {
          res.json(challenge);
          return;
        }
      }
      const value = yield dispatcher.invoke(data);
      res.json(value);
    }), "adaptExpress");
    var adaptKoa = /* @__PURE__ */ __name((path2, dispatcher, options) => (ctx, next) => __awaiter(void 0, void 0, void 0, function* () {
      const { originalUrl, req, request } = ctx;
      if (originalUrl === path2) {
        const reqData = yield (() => __awaiter(void 0, void 0, void 0, function* () {
          if (request.body) {
            return request.body;
          }
          if (!req.complete) {
            const incomingdata = yield pickRequestData(req);
            return incomingdata;
          }
          ((options === null || options === void 0 ? void 0 : options.logger) || defaultLogger).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body");
          return null;
        }))();
        const data = Object.assign(/* @__PURE__ */ Object.create({
          headers: req.headers
        }), reqData);
        const autoChallenge = (options === null || options === void 0 ? void 0 : options.autoChallenge) || false;
        if (autoChallenge) {
          const { isChallenge, challenge } = generateChallenge(data, {
            encryptKey: dispatcher.encryptKey
          });
          if (isChallenge) {
            ctx.body = challenge;
            yield next();
            return;
          }
        }
        const value = yield dispatcher.invoke(data);
        ctx.body = JSON.stringify(value);
      }
      yield next();
    }), "adaptKoa");
    var adaptKoaRouter = /* @__PURE__ */ __name((dispatcher, options) => (ctx, next) => __awaiter(void 0, void 0, void 0, function* () {
      const { req, request } = ctx;
      const reqData = yield (() => __awaiter(void 0, void 0, void 0, function* () {
        if (request.body) {
          return request.body;
        }
        if (!req.complete) {
          const incomingdata = yield pickRequestData(req);
          return incomingdata;
        }
        ((options === null || options === void 0 ? void 0 : options.logger) || defaultLogger).error("unable to obtain request body, if parsed it in other middleware, please manually set in ctx.request.body");
        return null;
      }))();
      const data = Object.assign(/* @__PURE__ */ Object.create({
        headers: req.headers
      }), reqData);
      const autoChallenge = (options === null || options === void 0 ? void 0 : options.autoChallenge) || false;
      if (autoChallenge) {
        const { isChallenge, challenge } = generateChallenge(data, {
          encryptKey: dispatcher.encryptKey
        });
        if (isChallenge) {
          ctx.body = challenge;
          yield next();
          return;
        }
      }
      const value = yield dispatcher.invoke(data);
      ctx.body = JSON.stringify(value);
      yield next();
    }), "adaptKoaRouter");
    var defaultCard = /* @__PURE__ */ __name((variables) => {
      const { title, content } = variables;
      return JSON.stringify({
        "config": {
          "wide_screen_mode": true
        },
        "elements": [
          {
            "tag": "markdown",
            "content": content
          }
        ],
        "header": {
          "template": "blue",
          "title": {
            "content": title,
            "tag": "plain_text"
          }
        }
      });
    }, "defaultCard");
    var messageCard = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      defaultCard
    });
    var $protobuf = require_minimal();
    $protobuf.util.Long = void 0;
    $protobuf.configure();
    var $Reader = $protobuf.Reader;
    var $Writer = $protobuf.Writer;
    var $util = $protobuf.util;
    var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
    var pbbp2 = $root.pbbp2 = (() => {
      const pbbp22 = {};
      pbbp22.Header = function() {
        function Header(properties) {
          if (properties) {
            for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
              if (properties[keys[i]] != null)
                this[keys[i]] = properties[keys[i]];
          }
        }
        __name(Header, "Header");
        Header.prototype.key = "";
        Header.prototype.value = "";
        Header.create = /* @__PURE__ */ __name(function create(properties) {
          return new Header(properties);
        }, "create");
        Header.encode = /* @__PURE__ */ __name(function encode(message, writer) {
          if (!writer)
            writer = $Writer.create();
          writer.uint32(
            /* id 1, wireType 2 =*/
            10
          ).string(message.key);
          writer.uint32(
            /* id 2, wireType 2 =*/
            18
          ).string(message.value);
          return writer;
        }, "encode");
        Header.encodeDelimited = /* @__PURE__ */ __name(function encodeDelimited(message, writer) {
          return this.encode(message, writer).ldelim();
        }, "encodeDelimited");
        Header.decode = /* @__PURE__ */ __name(function decode2(reader, length) {
          if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
          let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.pbbp2.Header();
          while (reader.pos < end) {
            let tag = reader.uint32();
            switch (tag >>> 3) {
              case 1: {
                message.key = reader.string();
                break;
              }
              case 2: {
                message.value = reader.string();
                break;
              }
              default:
                reader.skipType(tag & 7);
                break;
            }
          }
          if (!message.hasOwnProperty("key"))
            throw $util.ProtocolError("missing required 'key'", { instance: message });
          if (!message.hasOwnProperty("value"))
            throw $util.ProtocolError("missing required 'value'", { instance: message });
          return message;
        }, "decode");
        Header.decodeDelimited = /* @__PURE__ */ __name(function decodeDelimited(reader) {
          if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
          return this.decode(reader, reader.uint32());
        }, "decodeDelimited");
        Header.verify = /* @__PURE__ */ __name(function verify(message) {
          if (typeof message !== "object" || message === null)
            return "object expected";
          if (!$util.isString(message.key))
            return "key: string expected";
          if (!$util.isString(message.value))
            return "value: string expected";
          return null;
        }, "verify");
        Header.fromObject = /* @__PURE__ */ __name(function fromObject(object) {
          if (object instanceof $root.pbbp2.Header)
            return object;
          let message = new $root.pbbp2.Header();
          if (object.key != null)
            message.key = String(object.key);
          if (object.value != null)
            message.value = String(object.value);
          return message;
        }, "fromObject");
        Header.toObject = /* @__PURE__ */ __name(function toObject(message, options) {
          if (!options)
            options = {};
          let object = {};
          if (options.defaults) {
            object.key = "";
            object.value = "";
          }
          if (message.key != null && message.hasOwnProperty("key"))
            object.key = message.key;
          if (message.value != null && message.hasOwnProperty("value"))
            object.value = message.value;
          return object;
        }, "toObject");
        Header.prototype.toJSON = /* @__PURE__ */ __name(function toJSON() {
          return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        }, "toJSON");
        Header.getTypeUrl = /* @__PURE__ */ __name(function getTypeUrl(typeUrlPrefix) {
          if (typeUrlPrefix === void 0) {
            typeUrlPrefix = "type.googleapis.com";
          }
          return typeUrlPrefix + "/pbbp2.Header";
        }, "getTypeUrl");
        return Header;
      }();
      pbbp22.Frame = function() {
        function Frame(properties) {
          this.headers = [];
          if (properties) {
            for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
              if (properties[keys[i]] != null)
                this[keys[i]] = properties[keys[i]];
          }
        }
        __name(Frame, "Frame");
        Frame.prototype.SeqID = $util.Long ? $util.Long.fromBits(0, 0, true) : 0;
        Frame.prototype.LogID = $util.Long ? $util.Long.fromBits(0, 0, true) : 0;
        Frame.prototype.service = 0;
        Frame.prototype.method = 0;
        Frame.prototype.headers = $util.emptyArray;
        Frame.prototype.payloadEncoding = "";
        Frame.prototype.payloadType = "";
        Frame.prototype.payload = $util.newBuffer([]);
        Frame.prototype.LogIDNew = "";
        Frame.create = /* @__PURE__ */ __name(function create(properties) {
          return new Frame(properties);
        }, "create");
        Frame.encode = /* @__PURE__ */ __name(function encode(message, writer) {
          if (!writer)
            writer = $Writer.create();
          writer.uint32(
            /* id 1, wireType 0 =*/
            8
          ).uint64(message.SeqID);
          writer.uint32(
            /* id 2, wireType 0 =*/
            16
          ).uint64(message.LogID);
          writer.uint32(
            /* id 3, wireType 0 =*/
            24
          ).int32(message.service);
          writer.uint32(
            /* id 4, wireType 0 =*/
            32
          ).int32(message.method);
          if (message.headers != null && message.headers.length)
            for (let i = 0; i < message.headers.length; ++i)
              $root.pbbp2.Header.encode(message.headers[i], writer.uint32(
                /* id 5, wireType 2 =*/
                42
              ).fork()).ldelim();
          if (message.payloadEncoding != null && Object.hasOwnProperty.call(message, "payloadEncoding"))
            writer.uint32(
              /* id 6, wireType 2 =*/
              50
            ).string(message.payloadEncoding);
          if (message.payloadType != null && Object.hasOwnProperty.call(message, "payloadType"))
            writer.uint32(
              /* id 7, wireType 2 =*/
              58
            ).string(message.payloadType);
          if (message.payload != null && Object.hasOwnProperty.call(message, "payload"))
            writer.uint32(
              /* id 8, wireType 2 =*/
              66
            ).bytes(message.payload);
          if (message.LogIDNew != null && Object.hasOwnProperty.call(message, "LogIDNew"))
            writer.uint32(
              /* id 9, wireType 2 =*/
              74
            ).string(message.LogIDNew);
          return writer;
        }, "encode");
        Frame.encodeDelimited = /* @__PURE__ */ __name(function encodeDelimited(message, writer) {
          return this.encode(message, writer).ldelim();
        }, "encodeDelimited");
        Frame.decode = /* @__PURE__ */ __name(function decode2(reader, length) {
          if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
          let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.pbbp2.Frame();
          while (reader.pos < end) {
            let tag = reader.uint32();
            switch (tag >>> 3) {
              case 1: {
                message.SeqID = reader.uint64();
                break;
              }
              case 2: {
                message.LogID = reader.uint64();
                break;
              }
              case 3: {
                message.service = reader.int32();
                break;
              }
              case 4: {
                message.method = reader.int32();
                break;
              }
              case 5: {
                if (!(message.headers && message.headers.length))
                  message.headers = [];
                message.headers.push($root.pbbp2.Header.decode(reader, reader.uint32()));
                break;
              }
              case 6: {
                message.payloadEncoding = reader.string();
                break;
              }
              case 7: {
                message.payloadType = reader.string();
                break;
              }
              case 8: {
                message.payload = reader.bytes();
                break;
              }
              case 9: {
                message.LogIDNew = reader.string();
                break;
              }
              default:
                reader.skipType(tag & 7);
                break;
            }
          }
          if (!message.hasOwnProperty("SeqID"))
            throw $util.ProtocolError("missing required 'SeqID'", { instance: message });
          if (!message.hasOwnProperty("LogID"))
            throw $util.ProtocolError("missing required 'LogID'", { instance: message });
          if (!message.hasOwnProperty("service"))
            throw $util.ProtocolError("missing required 'service'", { instance: message });
          if (!message.hasOwnProperty("method"))
            throw $util.ProtocolError("missing required 'method'", { instance: message });
          return message;
        }, "decode");
        Frame.decodeDelimited = /* @__PURE__ */ __name(function decodeDelimited(reader) {
          if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
          return this.decode(reader, reader.uint32());
        }, "decodeDelimited");
        Frame.verify = /* @__PURE__ */ __name(function verify(message) {
          if (typeof message !== "object" || message === null)
            return "object expected";
          if (!$util.isInteger(message.SeqID) && !(message.SeqID && $util.isInteger(message.SeqID.low) && $util.isInteger(message.SeqID.high)))
            return "SeqID: integer|Long expected";
          if (!$util.isInteger(message.LogID) && !(message.LogID && $util.isInteger(message.LogID.low) && $util.isInteger(message.LogID.high)))
            return "LogID: integer|Long expected";
          if (!$util.isInteger(message.service))
            return "service: integer expected";
          if (!$util.isInteger(message.method))
            return "method: integer expected";
          if (message.headers != null && message.hasOwnProperty("headers")) {
            if (!Array.isArray(message.headers))
              return "headers: array expected";
            for (let i = 0; i < message.headers.length; ++i) {
              let error = $root.pbbp2.Header.verify(message.headers[i]);
              if (error)
                return "headers." + error;
            }
          }
          if (message.payloadEncoding != null && message.hasOwnProperty("payloadEncoding")) {
            if (!$util.isString(message.payloadEncoding))
              return "payloadEncoding: string expected";
          }
          if (message.payloadType != null && message.hasOwnProperty("payloadType")) {
            if (!$util.isString(message.payloadType))
              return "payloadType: string expected";
          }
          if (message.payload != null && message.hasOwnProperty("payload")) {
            if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload)))
              return "payload: buffer expected";
          }
          if (message.LogIDNew != null && message.hasOwnProperty("LogIDNew")) {
            if (!$util.isString(message.LogIDNew))
              return "LogIDNew: string expected";
          }
          return null;
        }, "verify");
        Frame.fromObject = /* @__PURE__ */ __name(function fromObject(object) {
          if (object instanceof $root.pbbp2.Frame)
            return object;
          let message = new $root.pbbp2.Frame();
          if (object.SeqID != null) {
            if ($util.Long)
              (message.SeqID = $util.Long.fromValue(object.SeqID)).unsigned = true;
            else if (typeof object.SeqID === "string")
              message.SeqID = parseInt(object.SeqID, 10);
            else if (typeof object.SeqID === "number")
              message.SeqID = object.SeqID;
            else if (typeof object.SeqID === "object")
              message.SeqID = new $util.LongBits(object.SeqID.low >>> 0, object.SeqID.high >>> 0).toNumber(true);
          }
          if (object.LogID != null) {
            if ($util.Long)
              (message.LogID = $util.Long.fromValue(object.LogID)).unsigned = true;
            else if (typeof object.LogID === "string")
              message.LogID = parseInt(object.LogID, 10);
            else if (typeof object.LogID === "number")
              message.LogID = object.LogID;
            else if (typeof object.LogID === "object")
              message.LogID = new $util.LongBits(object.LogID.low >>> 0, object.LogID.high >>> 0).toNumber(true);
          }
          if (object.service != null)
            message.service = object.service | 0;
          if (object.method != null)
            message.method = object.method | 0;
          if (object.headers) {
            if (!Array.isArray(object.headers))
              throw TypeError(".pbbp2.Frame.headers: array expected");
            message.headers = [];
            for (let i = 0; i < object.headers.length; ++i) {
              if (typeof object.headers[i] !== "object")
                throw TypeError(".pbbp2.Frame.headers: object expected");
              message.headers[i] = $root.pbbp2.Header.fromObject(object.headers[i]);
            }
          }
          if (object.payloadEncoding != null)
            message.payloadEncoding = String(object.payloadEncoding);
          if (object.payloadType != null)
            message.payloadType = String(object.payloadType);
          if (object.payload != null) {
            if (typeof object.payload === "string")
              $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0);
            else if (object.payload.length >= 0)
              message.payload = object.payload;
          }
          if (object.LogIDNew != null)
            message.LogIDNew = String(object.LogIDNew);
          return message;
        }, "fromObject");
        Frame.toObject = /* @__PURE__ */ __name(function toObject(message, options) {
          if (!options)
            options = {};
          let object = {};
          if (options.arrays || options.defaults)
            object.headers = [];
          if (options.defaults) {
            if ($util.Long) {
              let long = new $util.Long(0, 0, true);
              object.SeqID = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
            } else
              object.SeqID = options.longs === String ? "0" : 0;
            if ($util.Long) {
              let long = new $util.Long(0, 0, true);
              object.LogID = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
            } else
              object.LogID = options.longs === String ? "0" : 0;
            object.service = 0;
            object.method = 0;
            object.payloadEncoding = "";
            object.payloadType = "";
            if (options.bytes === String)
              object.payload = "";
            else {
              object.payload = [];
              if (options.bytes !== Array)
                object.payload = $util.newBuffer(object.payload);
            }
            object.LogIDNew = "";
          }
          if (message.SeqID != null && message.hasOwnProperty("SeqID"))
            if (typeof message.SeqID === "number")
              object.SeqID = options.longs === String ? String(message.SeqID) : message.SeqID;
            else
              object.SeqID = options.longs === String ? $util.Long.prototype.toString.call(message.SeqID) : options.longs === Number ? new $util.LongBits(message.SeqID.low >>> 0, message.SeqID.high >>> 0).toNumber(true) : message.SeqID;
          if (message.LogID != null && message.hasOwnProperty("LogID"))
            if (typeof message.LogID === "number")
              object.LogID = options.longs === String ? String(message.LogID) : message.LogID;
            else
              object.LogID = options.longs === String ? $util.Long.prototype.toString.call(message.LogID) : options.longs === Number ? new $util.LongBits(message.LogID.low >>> 0, message.LogID.high >>> 0).toNumber(true) : message.LogID;
          if (message.service != null && message.hasOwnProperty("service"))
            object.service = message.service;
          if (message.method != null && message.hasOwnProperty("method"))
            object.method = message.method;
          if (message.headers && message.headers.length) {
            object.headers = [];
            for (let j = 0; j < message.headers.length; ++j)
              object.headers[j] = $root.pbbp2.Header.toObject(message.headers[j], options);
          }
          if (message.payloadEncoding != null && message.hasOwnProperty("payloadEncoding"))
            object.payloadEncoding = message.payloadEncoding;
          if (message.payloadType != null && message.hasOwnProperty("payloadType"))
            object.payloadType = message.payloadType;
          if (message.payload != null && message.hasOwnProperty("payload"))
            object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload;
          if (message.LogIDNew != null && message.hasOwnProperty("LogIDNew"))
            object.LogIDNew = message.LogIDNew;
          return object;
        }, "toObject");
        Frame.prototype.toJSON = /* @__PURE__ */ __name(function toJSON() {
          return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        }, "toJSON");
        Frame.getTypeUrl = /* @__PURE__ */ __name(function getTypeUrl(typeUrlPrefix) {
          if (typeUrlPrefix === void 0) {
            typeUrlPrefix = "type.googleapis.com";
          }
          return typeUrlPrefix + "/pbbp2.Frame";
        }, "getTypeUrl");
        return Frame;
      }();
      return pbbp22;
    })();
    var decode = /* @__PURE__ */ __name((buffer) => {
      return pbbp2.Frame.decode(buffer);
    }, "decode");
    var WSConfig = class {
      static {
        __name(this, "WSConfig");
      }
      constructor() {
        this.client = {
          appId: "",
          appSecret: "",
          domain: exports.Domain.Feishu
        };
        this.ws = {
          connectUrl: "",
          pingInterval: 120 * 1e3,
          reconnectCount: -1,
          reconnectInterval: 120 * 1e3,
          reconnectNonce: 30 * 1e3,
          deviceId: "",
          serviceId: "",
          autoReconnect: true
        };
        this.wsInstance = null;
      }
      updateClient(clientConfig) {
        Object.assign(this.client, clientConfig);
      }
      updateWs(WSConfig2) {
        Object.assign(this.ws, WSConfig2);
      }
      getClient(key) {
        if (key === void 0) {
          return this.client;
        }
        return this.client[key];
      }
      getWS(key) {
        if (key === void 0) {
          return this.ws;
        }
        return this.ws[key];
      }
      get wsConfigUrl() {
        return `${this.getClient("domain")}/callback/ws/endpoint`;
      }
      setWSInstance(wsInstance) {
        this.wsInstance = wsInstance;
      }
      getWSInstance() {
        return this.wsInstance;
      }
    };
    var DataCache = class {
      static {
        __name(this, "DataCache");
      }
      constructor(params) {
        this.cache = /* @__PURE__ */ new Map();
        this.logger = params.logger;
        this.clearAtInterval();
      }
      mergeData(params) {
        const { message_id, sum, seq, trace_id, data } = params;
        const cache = this.cache.get(message_id);
        if (!cache) {
          const buffer = new Array(sum).fill(void 0);
          buffer[seq] = data;
          this.cache.set(message_id, {
            buffer,
            trace_id,
            message_id,
            create_time: Date.now()
          });
        } else {
          cache.buffer[seq] = data;
        }
        const mergedCache = this.cache.get(message_id);
        if (mergedCache === null || mergedCache === void 0 ? void 0 : mergedCache.buffer.every((item) => !!item)) {
          const mergedBuffer = mergedCache.buffer.reduce((acc, cur) => {
            const combined = new Uint8Array(acc.byteLength + cur.byteLength);
            combined.set(acc, 0);
            combined.set(cur, acc.length);
            return combined;
          }, new Uint8Array([]));
          const string = new TextDecoder("utf-8").decode(mergedBuffer);
          const data2 = JSON.parse(string);
          this.deleteCache(message_id);
          return data2;
        }
        return null;
      }
      deleteCache(message_id) {
        this.cache.delete(message_id);
      }
      clearAtInterval() {
        const clearIntervalMs = 1e4;
        setInterval(() => {
          const now = Date.now();
          this.cache.forEach((value, key) => {
            var _a;
            const { create_time, trace_id, message_id } = value;
            if (now - create_time > clearIntervalMs) {
              (_a = this.logger) === null || _a === void 0 ? void 0 : _a.debug(`${message_id} event data is deleted as expired, trace_id: ${trace_id}`);
              this.deleteCache(key);
            }
          });
        }, clearIntervalMs);
      }
    };
    var ErrorCode;
    (function(ErrorCode2) {
      ErrorCode2[ErrorCode2["ok"] = 0] = "ok";
      ErrorCode2[ErrorCode2["system_busy"] = 1] = "system_busy";
      ErrorCode2[ErrorCode2["forbidden"] = 403] = "forbidden";
      ErrorCode2[ErrorCode2["auth_failed"] = 514] = "auth_failed";
      ErrorCode2[ErrorCode2["internal_error"] = 1000040343] = "internal_error";
      ErrorCode2[ErrorCode2["exceed_conn_limit"] = 1000040350] = "exceed_conn_limit";
    })(ErrorCode || (ErrorCode = {}));
    var FrameType;
    (function(FrameType2) {
      FrameType2[FrameType2["control"] = 0] = "control";
      FrameType2[FrameType2["data"] = 1] = "data";
    })(FrameType || (FrameType = {}));
    var HeaderKey;
    (function(HeaderKey2) {
      HeaderKey2["type"] = "type";
      HeaderKey2["message_id"] = "message_id";
      HeaderKey2["sum"] = "sum";
      HeaderKey2["seq"] = "seq";
      HeaderKey2["trace_id"] = "trace_id";
      HeaderKey2["biz_rt"] = "biz_rt";
      HeaderKey2["handshake_status"] = "handshake-status";
      HeaderKey2["handshake_msg"] = "handshake-msg";
      HeaderKey2["handshake_autherrcode"] = "handshake-autherrcode";
    })(HeaderKey || (HeaderKey = {}));
    var MessageType;
    (function(MessageType2) {
      MessageType2["event"] = "event";
      MessageType2["card"] = "card";
      MessageType2["ping"] = "ping";
      MessageType2["pong"] = "pong";
    })(MessageType || (MessageType = {}));
    var HttpStatusCode;
    (function(HttpStatusCode2) {
      HttpStatusCode2[HttpStatusCode2["ok"] = 200] = "ok";
      HttpStatusCode2[HttpStatusCode2["internal_server_error"] = 500] = "internal_server_error";
    })(HttpStatusCode || (HttpStatusCode = {}));
    var WSClient2 = class {
      static {
        __name(this, "WSClient");
      }
      constructor(params) {
        var _a;
        this.wsConfig = new WSConfig();
        this.reconnectGeneration = 0;
        this.isConnecting = false;
        this.reconnectInfo = {
          lastConnectTime: 0,
          nextConnectTime: 0
        };
        this.hasEverConnected = false;
        this.terminalError = false;
        this.currentReconnectAttempts = 0;
        const { appId, appSecret, agent, domain = exports.Domain.Feishu, httpInstance = defaultHttpInstance, loggerLevel = exports.LoggerLevel.info, logger = defaultLogger, autoReconnect = true, source, extraUaTags, onReady, onError, onReconnecting, onReconnected, handshakeTimeoutMs, wsConfig: userWsConfig } = params;
        this.userAgent = buildUserAgent(source, { extraTags: extraUaTags });
        this.logger = new LoggerProxy(loggerLevel, logger);
        assert(!appId, () => this.logger.error("appId is needed"));
        assert(!appSecret, () => this.logger.error("appSecret is needed"));
        this.agent = agent;
        this.dataCache = new DataCache({ logger: this.logger });
        this.httpInstance = httpInstance;
        this.wsConfig.updateClient({
          appId,
          appSecret,
          domain: formatDomain(domain)
        });
        this.wsConfig.updateWs({
          autoReconnect
        });
        this.onReady = onReady;
        this.onError = onError;
        this.onReconnecting = onReconnecting;
        this.onReconnected = onReconnected;
        this.handshakeTimeoutMs = handshakeTimeoutMs;
        this.pingTimeoutSec = (_a = userWsConfig === null || userWsConfig === void 0 ? void 0 : userWsConfig.pingTimeout) !== null && _a !== void 0 ? _a : 0;
      }
      /**
       * Start the pong watchdog after sending a ping. If no inbound frame
       * arrives within `pingTimeout` seconds, the server is presumed dead and
       * the socket is terminated to let the existing 'close' handler run the
       * standard reconnect flow.
       *
       * No-op when `pingTimeout` is unset (preserves original behavior).
       *
       * Pair with {@link clearLiveness}, which is called on every inbound
       * frame to cancel the watchdog (proof of life). We do NOT re-arm on
       * inbound: re-arming would terminate idle but healthy connections
       * (e.g. ping every 30s, watchdog 3s → fires 3s after pong while the
       * connection is fine).
       */
      armLiveness() {
        if (!this.pingTimeoutSec)
          return;
        if (this.livenessTimer)
          clearTimeout(this.livenessTimer);
        this.livenessTimer = setTimeout(() => {
          var _a;
          this.livenessTimer = void 0;
          this.logger.warn("[ws]", `no pong/inbound within ${this.pingTimeoutSec}s of last ping, terminating to trigger reconnect`);
          try {
            (_a = this.wsConfig.getWSInstance()) === null || _a === void 0 ? void 0 : _a.terminate();
          } catch (_b) {
          }
        }, this.pingTimeoutSec * 1e3);
      }
      clearLiveness() {
        if (this.livenessTimer) {
          clearTimeout(this.livenessTimer);
          this.livenessTimer = void 0;
        }
      }
      /**
       * Invoke a user-supplied callback safely: no-op if undefined, swallow any
       * exception to avoid breaking the WS state machine.
       */
      safeInvoke(label, fn, ...args) {
        if (!fn)
          return;
        try {
          fn(...args);
        } catch (e) {
          this.logger.error(`[ws] ${label} callback threw`, e);
        }
      }
      pullConnectConfig() {
        return __awaiter(this, void 0, void 0, function* () {
          const { appId, appSecret } = this.wsConfig.getClient();
          try {
            const { code, data: { URL: URL2, ClientConfig }, msg } = yield this.httpInstance.request({
              method: "post",
              url: this.wsConfig.wsConfigUrl,
              data: {
                AppID: appId,
                AppSecret: appSecret
              },
              // consumed by gateway
              headers: {
                "locale": "zh",
                "User-Agent": this.userAgent
              },
              timeout: 15e3
            });
            if (code !== ErrorCode.ok) {
              const reason = code === ErrorCode.system_busy ? "system busy" : msg;
              this.logger.error("[ws]", `code: ${code}, ${reason}`);
              if (code === ErrorCode.internal_error) {
                return { ok: false, retryable: true };
              }
              return {
                ok: false,
                retryable: false,
                error: `pullConnectConfig failed: code=${code}, msg=${reason}`
              };
            }
            const { device_id, service_id } = qs__default["default"].parse(URL2);
            this.wsConfig.updateWs({
              connectUrl: URL2,
              deviceId: device_id,
              serviceId: service_id,
              pingInterval: ClientConfig.PingInterval * 1e3,
              reconnectCount: ClientConfig.ReconnectCount,
              reconnectInterval: ClientConfig.ReconnectInterval * 1e3,
              reconnectNonce: ClientConfig.ReconnectNonce * 1e3
            });
            this.logger.debug("[ws]", `get connect config success, ws url: ${URL2}`);
            return { ok: true };
          } catch (e) {
            this.logger.error("[ws]", (e === null || e === void 0 ? void 0 : e.message) || "system busy");
            return { ok: false, retryable: true };
          }
        });
      }
      connect() {
        const connectUrl = this.wsConfig.getWS("connectUrl");
        let wsInstance;
        try {
          const { agent } = this;
          wsInstance = new WebSocket__default["default"](connectUrl, { agent });
        } catch (e) {
          this.logger.error("[ws]", "new WebSocket error");
        }
        if (!wsInstance) {
          return Promise.resolve(false);
        }
        return new Promise((resolve) => {
          let settled = false;
          let timer;
          const settleOnce = /* @__PURE__ */ __name((ok) => {
            if (settled)
              return;
            settled = true;
            if (timer)
              clearTimeout(timer);
            resolve(ok);
          }, "settleOnce");
          if (this.handshakeTimeoutMs && this.handshakeTimeoutMs > 0) {
            timer = setTimeout(() => {
              this.logger.error("[ws]", `handshake timeout after ${this.handshakeTimeoutMs}ms`);
              wsInstance.removeAllListeners();
              try {
                wsInstance.terminate();
              } catch (_a) {
              }
              settleOnce(false);
            }, this.handshakeTimeoutMs);
          }
          wsInstance.on("open", () => {
            this.logger.debug("[ws]", "ws connect success");
            this.wsConfig.setWSInstance(wsInstance);
            this.pingLoop();
            settleOnce(true);
          });
          wsInstance.on("error", () => {
            this.logger.error("[ws]", "ws connect failed");
            settleOnce(false);
          });
        });
      }
      reConnect(isStart = false) {
        return __awaiter(this, void 0, void 0, function* () {
          if (this.isConnecting && !isStart) {
            this.logger.debug("[ws]", "repeat connection");
            return;
          }
          this.isConnecting = true;
          const currentGeneration = ++this.reconnectGeneration;
          const tryConnect = /* @__PURE__ */ __name(() => __awaiter(this, void 0, void 0, function* () {
            this.reconnectInfo.lastConnectTime = Date.now();
            const pullResult = yield this.pullConnectConfig();
            if (!pullResult.ok)
              return pullResult;
            const connected = yield this.connect();
            if (!connected)
              return { ok: false, retryable: true };
            this.communicate();
            return { ok: true };
          }), "tryConnect");
          if (this.pingInterval) {
            clearTimeout(this.pingInterval);
          }
          if (this.reconnectInterval) {
            clearTimeout(this.reconnectInterval);
          }
          const wsInstance = this.wsConfig.getWSInstance();
          if (isStart) {
            if (wsInstance) {
              wsInstance === null || wsInstance === void 0 ? void 0 : wsInstance.terminate();
            }
            let result = { ok: false, retryable: true };
            try {
              result = yield tryConnect();
            } finally {
              this.isConnecting = false;
            }
            if (result.ok) {
              this.hasEverConnected = true;
              this.safeInvoke("onReady", this.onReady);
            } else if (!result.retryable) {
              this.hasEverConnected = false;
              this.terminalError = true;
              this.safeInvoke("onError", this.onError, new Error(result.error));
              return;
            } else {
              this.logger.error("[ws]", "connect failed");
              yield this.reConnect();
            }
            this.logger.info("[ws]", "ws client ready");
            return;
          }
          const { autoReconnect, reconnectNonce, reconnectCount, reconnectInterval } = this.wsConfig.getWS();
          if (!autoReconnect) {
            if (!this.hasEverConnected) {
              this.terminalError = true;
              this.safeInvoke("onError", this.onError, new Error("WebSocket connect failed and autoReconnect is disabled"));
            }
            return;
          }
          this.logger.info("[ws]", "reconnect");
          if (this.hasEverConnected) {
            this.safeInvoke("onReconnecting", this.onReconnecting);
          }
          if (wsInstance) {
            wsInstance === null || wsInstance === void 0 ? void 0 : wsInstance.terminate();
          }
          this.wsConfig.setWSInstance(null);
          const reconnectNonceTime = reconnectNonce ? reconnectNonce * Math.random() : 0;
          this.reconnectInterval = setTimeout(() => __awaiter(this, void 0, void 0, function* () {
            (/* @__PURE__ */ __name(function loopReConnect(count) {
              return __awaiter(this, void 0, void 0, function* () {
                if (currentGeneration !== this.reconnectGeneration) {
                  return;
                }
                count++;
                this.currentReconnectAttempts = count;
                const result = yield tryConnect();
                if (currentGeneration !== this.reconnectGeneration) {
                  return;
                }
                if (result.ok) {
                  this.logger.debug("[ws]", "reconnect success");
                  this.currentReconnectAttempts = 0;
                  if (this.hasEverConnected) {
                    this.safeInvoke("onReconnected", this.onReconnected);
                  } else {
                    this.hasEverConnected = true;
                    this.safeInvoke("onReady", this.onReady);
                  }
                  this.isConnecting = false;
                  return;
                }
                if (!result.retryable) {
                  this.isConnecting = false;
                  this.hasEverConnected = false;
                  this.terminalError = true;
                  this.safeInvoke("onError", this.onError, new Error(result.error));
                  return;
                }
                this.logger.info("ws", `unable to connect to the server after trying ${count} times")`);
                if (reconnectCount >= 0 && count >= reconnectCount) {
                  this.isConnecting = false;
                  this.terminalError = true;
                  this.safeInvoke("onError", this.onError, new Error(`WebSocket reconnect exhausted after ${count} attempts`));
                  return;
                }
                this.reconnectInterval = setTimeout(() => {
                  loopReConnect.bind(this)(count);
                }, reconnectInterval);
                this.reconnectInfo.nextConnectTime = Date.now() + reconnectInterval;
              });
            }, "loopReConnect")).bind(this)(0);
          }), reconnectNonceTime);
          this.reconnectInfo.nextConnectTime = Date.now() + reconnectNonceTime;
        });
      }
      pingLoop() {
        const { serviceId, pingInterval } = this.wsConfig.getWS();
        const wsInstance = this.wsConfig.getWSInstance();
        if ((wsInstance === null || wsInstance === void 0 ? void 0 : wsInstance.readyState) === WebSocket__default["default"].OPEN) {
          const frame = {
            headers: [{
              key: HeaderKey.type,
              value: MessageType.ping
            }],
            service: Number(serviceId),
            method: FrameType.control,
            SeqID: 0,
            LogID: 0
          };
          this.sendMessage(frame);
          this.armLiveness();
          this.logger.trace("[ws]", "ping success");
        }
        this.pingInterval = setTimeout(this.pingLoop.bind(this), pingInterval);
      }
      communicate() {
        const wsInstance = this.wsConfig.getWSInstance();
        wsInstance === null || wsInstance === void 0 ? void 0 : wsInstance.on("message", (buffer) => __awaiter(this, void 0, void 0, function* () {
          this.clearLiveness();
          const data = decode(buffer);
          const { method } = data;
          if (method === FrameType.control) {
            yield this.handleControlData(data);
          }
          if (method === FrameType.data) {
            yield this.handleEventData(data);
          }
        }));
        wsInstance === null || wsInstance === void 0 ? void 0 : wsInstance.on("error", (e) => {
          this.logger.error("[ws]", "ws error");
        });
        wsInstance === null || wsInstance === void 0 ? void 0 : wsInstance.on("close", () => {
          this.logger.debug("[ws]", "client closed");
          this.clearLiveness();
          this.reConnect();
        });
      }
      handleControlData(data) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
          const type = (_a = data.headers.find((item) => item.key === HeaderKey.type)) === null || _a === void 0 ? void 0 : _a.value;
          const payload = data.payload;
          if (type === MessageType.ping) {
            return;
          }
          if (type === MessageType.pong && payload) {
            this.logger.trace("[ws]", "receive pong");
            const dataString = new TextDecoder("utf-8").decode(payload);
            const { PingInterval, ReconnectCount, ReconnectInterval, ReconnectNonce } = JSON.parse(dataString);
            this.wsConfig.updateWs({
              pingInterval: PingInterval * 1e3,
              reconnectCount: ReconnectCount,
              reconnectInterval: ReconnectInterval * 1e3,
              reconnectNonce: ReconnectNonce * 1e3
            });
            this.logger.trace("[ws]", "update wsConfig with pong data");
          }
        });
      }
      handleEventData(data) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
          const headers = data.headers.reduce((acc, cur) => {
            acc[cur.key] = cur.value;
            return acc;
          }, {});
          const { message_id, sum, seq, type, trace_id } = headers;
          const payload = data.payload;
          if (type !== MessageType.event) {
            return;
          }
          const mergedData = this.dataCache.mergeData({
            message_id,
            sum: Number(sum),
            seq: Number(seq),
            trace_id,
            data: payload
          });
          if (!mergedData) {
            return;
          }
          this.logger.debug("[ws]", `receive message, message_type: ${type}; message_id: ${message_id}; trace_id: ${trace_id}; data: ${mergedData.data}`);
          const respPayload = {
            code: HttpStatusCode.ok
          };
          const startTime = Date.now();
          try {
            const result = yield (_a = this.eventDispatcher) === null || _a === void 0 ? void 0 : _a.invoke(mergedData, { needCheck: false });
            if (result) {
              respPayload.data = Buffer.from(JSON.stringify(result)).toString("base64");
            }
          } catch (error) {
            respPayload.code = HttpStatusCode.internal_server_error;
            this.logger.error("[ws]", `invoke event failed, message_type: ${type}; message_id: ${message_id}; trace_id: ${trace_id}; error: ${error}`);
          }
          const endTime = Date.now();
          this.sendMessage(Object.assign(Object.assign({}, data), { headers: [...data.headers, { key: HeaderKey.biz_rt, value: String(startTime - endTime) }], payload: new TextEncoder().encode(JSON.stringify(respPayload)) }));
        });
      }
      sendMessage(data) {
        var _a;
        const wsInstance = this.wsConfig.getWSInstance();
        if ((wsInstance === null || wsInstance === void 0 ? void 0 : wsInstance.readyState) === WebSocket__default["default"].OPEN) {
          const resp = pbbp2.Frame.encode(data).finish();
          (_a = this.wsConfig.getWSInstance()) === null || _a === void 0 ? void 0 : _a.send(resp, (err) => {
            if (err) {
              this.logger.error("[ws]", "send data failed");
            }
          });
        }
      }
      getReconnectInfo() {
        return this.reconnectInfo;
      }
      /**
       * Snapshot of the current WebSocket lifecycle, derived from internal
       * flags so callers don't have to subscribe to every transition event.
       * Cheap to call; no side effects.
       */
      getConnectionStatus() {
        return {
          state: this.computeState(),
          lastConnectTime: this.reconnectInfo.lastConnectTime || void 0,
          nextConnectTime: this.reconnectInfo.nextConnectTime || void 0,
          reconnectAttempts: this.currentReconnectAttempts
        };
      }
      computeState() {
        var _a;
        if (this.terminalError)
          return "failed";
        if (this.isConnecting && !this.hasEverConnected)
          return "connecting";
        if (this.isConnecting && this.hasEverConnected)
          return "reconnecting";
        if (((_a = this.wsConfig.getWSInstance()) === null || _a === void 0 ? void 0 : _a.readyState) === WebSocket__default["default"].OPEN)
          return "connected";
        return "idle";
      }
      /**
       * close connection
       * @param params close params
       * @param params.force whether force close (use terminate instead of close)
       */
      close(params = {}) {
        const { force = false } = params;
        this.reconnectGeneration++;
        if (this.pingInterval) {
          clearTimeout(this.pingInterval);
          this.pingInterval = void 0;
        }
        if (this.reconnectInterval) {
          clearTimeout(this.reconnectInterval);
          this.reconnectInterval = void 0;
        }
        this.clearLiveness();
        this.isConnecting = false;
        this.currentReconnectAttempts = 0;
        const wsInstance = this.wsConfig.getWSInstance();
        if (wsInstance) {
          wsInstance.removeAllListeners();
          if (force) {
            wsInstance.terminate();
          } else {
            wsInstance.close();
          }
          this.wsConfig.setWSInstance(null);
        }
        this.logger.info("[ws]", `ws client closed manually${force ? " (force)" : ""}`);
      }
      start(params) {
        return __awaiter(this, void 0, void 0, function* () {
          const { appId } = this.wsConfig.getClient();
          if (!/^cli_[0-9a-fA-F]{16}$/.test(appId)) {
            this.logger.error("[ws]", `invalid appId: ${appId}`);
            return;
          }
          const { eventDispatcher } = params;
          if (!eventDispatcher) {
            this.logger.warn("[ws]", "client need to start with a eventDispatcher");
            return;
          }
          this.terminalError = false;
          this.currentReconnectAttempts = 0;
          this.logger.info("[ws]", `receive events or callbacks through persistent connection only available in self-build & Feishu app, Configured in:
        Developer Console(\u5F00\u53D1\u8005\u540E\u53F0)
          ->
        Events and Callbacks(\u4E8B\u4EF6\u4E0E\u56DE\u8C03)
          ->
        Mode of event/callback subscription(\u8BA2\u9605\u65B9\u5F0F)
          ->
        Receive events/callbacks through persistent connection(\u4F7F\u7528 \u957F\u8FDE\u63A5 \u63A5\u6536\u4E8B\u4EF6/\u56DE\u8C03)`);
          this.eventDispatcher = eventDispatcher;
          this.reConnect(true);
        });
      }
    };
    var SessionCache = class {
      static {
        __name(this, "SessionCache");
      }
      constructor() {
        this.sessions = /* @__PURE__ */ new Map();
      }
      set(key, value) {
        return __awaiter(this, void 0, void 0, function* () {
          const sessions = this.sessions.get(key.toString()) || {};
          const mergedSessions = mergeObject(sessions, value);
          this.sessions.set(key.toString(), mergedSessions);
          return true;
        });
      }
      get(key) {
        return __awaiter(this, void 0, void 0, function* () {
          return this.sessions.get(key.toString());
        });
      }
    };
    var EExecStatus;
    (function(EExecStatus2) {
      EExecStatus2[EExecStatus2["ERROR"] = -1] = "ERROR";
      EExecStatus2[EExecStatus2["SUCCESS"] = 0] = "SUCCESS";
      EExecStatus2[EExecStatus2["EXPIRED"] = 1] = "EXPIRED";
      EExecStatus2[EExecStatus2["CANCELLED"] = 2] = "CANCELLED";
      EExecStatus2[EExecStatus2["FAILED"] = 3] = "FAILED";
      EExecStatus2[EExecStatus2["OTHER"] = 4] = "OTHER";
    })(EExecStatus || (EExecStatus = {}));
    var Aily = class {
      static {
        __name(this, "Aily");
      }
      constructor(params) {
        this.completions = {
          create: this.create.bind(this),
          createWithStream: this.createWithStream.bind(this),
          sessionRecords: {
            get: this.getRecords.bind(this),
            update: this.updateRecords.bind(this)
          }
        };
        this.client = params.client;
        this.logger = params.client.logger;
        this.cache = params.cache || new SessionCache();
      }
      getSessionId(params) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
          const { sessionId, payload, options } = params;
          const records = yield this.getRecords();
          if (sessionId && sessionId in records) {
            return records[sessionId];
          }
          const ailySession = yield this.client.aily.v1.ailySession.create({ data: payload }, options);
          if (ailySession.code === 0 && ailySession.data) {
            const ailySessionId = (_a = ailySession.data.session) === null || _a === void 0 ? void 0 : _a.id;
            if (sessionId) {
              yield this.updateRecords({ [sessionId]: ailySessionId });
            }
            return ailySessionId;
          } else {
            this.logger.error("get aily session id error", ailySession.msg);
            return void 0;
          }
        });
      }
      waitReply(params, options) {
        var _a, _b;
        return __awaiter(this, void 0, void 0, function* () {
          const { sessionId, ailyAppId, message, sessionInfo, messageInfo, runInfo, skillId } = params;
          const ailySessionId = yield this.getSessionId({ sessionId, payload: sessionInfo, options });
          if (!ailySessionId) {
            throw EExecStatus.ERROR;
          }
          const ailySessionMessage = yield this.client.aily.v1.ailySessionAilyMessage.create({
            path: {
              aily_session_id: ailySessionId
            },
            data: Object.assign(Object.assign({}, messageInfo), { content: message, idempotent_id: `${Date.now()}`, content_type: "MDX" })
          }, options);
          if (!(ailySessionMessage.code === 0 && ailySessionMessage.data)) {
            this.logger.error("create aily message error", ailySessionMessage.msg);
            throw EExecStatus.ERROR;
          }
          const messageId = (_a = ailySessionMessage.data.message) === null || _a === void 0 ? void 0 : _a.id;
          const ailySessionRun = yield this.client.aily.v1.ailySessionRun.create({
            path: {
              aily_session_id: ailySessionId
            },
            data: Object.assign({ app_id: ailyAppId, skill_id: skillId }, runInfo)
          }, options);
          if (!(ailySessionRun.code === 0 && ailySessionRun.data)) {
            this.logger.error("create aily session run error", ailySessionRun.msg);
            throw EExecStatus.ERROR;
          }
          const runId = (_b = ailySessionRun.data.run) === null || _b === void 0 ? void 0 : _b.id;
          if (!runId) {
            this.logger.error("run id is empty");
            throw EExecStatus.ERROR;
          }
          const polling = /* @__PURE__ */ __name(() => __awaiter(this, void 0, void 0, function* () {
            return new Promise((resolve) => {
              setTimeout(() => __awaiter(this, void 0, void 0, function* () {
                var _a2, _b2;
                const runStatusInfo = yield this.client.aily.v1.ailySessionRun.get({
                  path: {
                    aily_session_id: ailySessionId,
                    run_id: runId
                  }
                }, options);
                if (!(runStatusInfo.code === 0 && runStatusInfo.data)) {
                  resolve(3);
                  return;
                }
                const status = (_b2 = (_a2 = runStatusInfo.data) === null || _a2 === void 0 ? void 0 : _a2.run) === null || _b2 === void 0 ? void 0 : _b2.status;
                switch (status) {
                  case "QUEUED":
                  case "IN_PROGRESS":
                    yield (() => __awaiter(this, void 0, void 0, function* () {
                      const ret = yield polling();
                      resolve(ret);
                    }))();
                  case "COMPLETED":
                    resolve(EExecStatus.SUCCESS);
                  case "EXPIRED":
                    resolve(EExecStatus.EXPIRED);
                  case "CANCELLED":
                    resolve(EExecStatus.CANCELLED);
                  case "FAILED":
                    resolve(EExecStatus.FAILED);
                  default:
                    resolve(EExecStatus.OTHER);
                }
              }), 500);
            });
          }), "polling");
          const pollingRet = yield polling();
          if (pollingRet !== EExecStatus.SUCCESS) {
            this.logger.error("aily run error");
            throw pollingRet;
          }
          return {
            ailySessionId,
            runId,
            messageId
          };
        });
      }
      create(params, options) {
        var _a, e_1, _b, _c;
        var _d;
        return __awaiter(this, void 0, void 0, function* () {
          const { ailySessionId, runId } = yield this.waitReply(params, options);
          let reply;
          try {
            for (var _e = true, _f = __asyncValues(yield this.client.aily.v1.ailySessionAilyMessage.listWithIterator({
              path: {
                aily_session_id: ailySessionId
              },
              params: {
                run_id: runId,
                with_partial_message: false
              }
            }, options)), _g; _g = yield _f.next(), _a = _g.done, !_a; ) {
              _c = _g.value;
              _e = false;
              try {
                const items = _c;
                if (!items) {
                  continue;
                }
                (_d = items === null || items === void 0 ? void 0 : items.messages) === null || _d === void 0 ? void 0 : _d.forEach((message) => {
                  var _a2;
                  if (((_a2 = message.sender) === null || _a2 === void 0 ? void 0 : _a2.sender_type) === "ASSISTANT") {
                    reply = message;
                  }
                });
              } finally {
                _e = true;
              }
            }
          } catch (e_1_1) {
            e_1 = { error: e_1_1 };
          } finally {
            try {
              if (!_e && !_a && (_b = _f.return)) yield _b.call(_f);
            } finally {
              if (e_1) throw e_1.error;
            }
          }
          if (!reply) {
            this.logger.error("no aily reply");
            throw EExecStatus.ERROR;
          }
          return reply;
        });
      }
      createWithStream(params, options) {
        return __awaiter(this, void 0, void 0, function* () {
          const { ailySessionId, runId, messageId } = yield this.waitReply(params, options);
          const listMessages = /* @__PURE__ */ __name(() => this.client.aily.v1.ailySessionAilyMessage.listWithIterator({
            path: {
              aily_session_id: ailySessionId
            },
            params: {
              run_id: runId,
              with_partial_message: true
            }
          }, options), "listMessages");
          let startOutput = false;
          const Iterable = {
            [Symbol.asyncIterator]() {
              return __asyncGenerator(this, arguments, /* @__PURE__ */ __name(function* _a() {
                var _b, e_2, _c, _d;
                try {
                  for (var _e = true, _f = __asyncValues(yield __await(listMessages())), _g; _g = yield __await(_f.next()), _b = _g.done, !_b; ) {
                    _d = _g.value;
                    _e = false;
                    try {
                      const items = _d;
                      if (!items) {
                        continue;
                      }
                      for (const message of items.messages || []) {
                        if (startOutput) {
                          yield yield __await(message);
                          if (message.status === "COMPLETED") {
                            return yield __await(void 0);
                          }
                        } else if (message.id === messageId && message.status === "COMPLETED") {
                          startOutput = true;
                        }
                      }
                    } finally {
                      _e = true;
                    }
                  }
                } catch (e_2_1) {
                  e_2 = { error: e_2_1 };
                } finally {
                  try {
                    if (!_e && !_b && (_c = _f.return)) yield __await(_c.call(_f));
                  } finally {
                    if (e_2) throw e_2.error;
                  }
                }
              }, "_a"));
            }
          };
          return Iterable;
        });
      }
      getRecords() {
        return __awaiter(this, void 0, void 0, function* () {
          const sessions = (yield this.cache.get(CAilySessionRecord)) || {};
          return sessions;
        });
      }
      updateRecords(records) {
        return __awaiter(this, void 0, void 0, function* () {
          yield this.cache.set(CAilySessionRecord, records);
        });
      }
    };
    function createError(code, description) {
      return { code, description };
    }
    __name(createError, "createError");
    var SDK_NAME = "node-sdk";
    var DEFAULT_FEISHU_DOMAIN = "accounts.feishu.cn";
    var DEFAULT_LARK_DOMAIN = "accounts.larksuite.com";
    var ENDPOINT = "/oauth/v1/app/registration";
    function requestRegistration(baseUrl, params) {
      var _a;
      return __awaiter(this, void 0, void 0, function* () {
        try {
          const resp = yield defaultHttpInstance.post(`${baseUrl}${ENDPOINT}`, new URLSearchParams(params).toString(), {
            headers: { "Content-Type": "application/x-www-form-urlencoded" }
          });
          return resp;
        } catch (e) {
          if (e instanceof axios.AxiosError && ((_a = e.response) === null || _a === void 0 ? void 0 : _a.data)) {
            return e.response.data;
          }
          throw e;
        }
      });
    }
    __name(requestRegistration, "requestRegistration");
    function begin(baseUrl) {
      return requestRegistration(baseUrl, {
        action: "begin",
        archetype: "PersonalAgent",
        auth_method: "client_secret",
        request_user_info: "open_id"
      });
    }
    __name(begin, "begin");
    function startPolling(ctx) {
      return new Promise((resolve, reject) => {
        var _a, _b;
        let { baseUrl, interval } = ctx;
        let domainSwitched = false;
        let pollTimer = null;
        let expireTimer = null;
        const cleanup = /* @__PURE__ */ __name(() => {
          var _a2;
          if (pollTimer !== null) {
            clearTimeout(pollTimer);
            pollTimer = null;
          }
          if (expireTimer !== null) {
            clearTimeout(expireTimer);
            expireTimer = null;
          }
          (_a2 = ctx.signal) === null || _a2 === void 0 ? void 0 : _a2.removeEventListener("abort", onAbort);
        }, "cleanup");
        const onAbort = /* @__PURE__ */ __name(() => {
          cleanup();
          reject(createError("abort", "Registration was aborted"));
        }, "onAbort");
        if ((_a = ctx.signal) === null || _a === void 0 ? void 0 : _a.aborted) {
          return reject(createError("abort", "Registration was aborted"));
        }
        (_b = ctx.signal) === null || _b === void 0 ? void 0 : _b.addEventListener("abort", onAbort, { once: true });
        expireTimer = setTimeout(() => {
          cleanup();
          reject(createError("expired_token", "Polling timed out"));
        }, ctx.expireIn);
        const poll = /* @__PURE__ */ __name(() => __awaiter(this, void 0, void 0, function* () {
          var _c, _d, _e, _f, _g, _h;
          try {
            const pollRes = yield requestRegistration(baseUrl, {
              action: "poll",
              device_code: ctx.deviceCode
            });
            if (((_c = pollRes.user_info) === null || _c === void 0 ? void 0 : _c.tenant_brand) === "lark" && !domainSwitched) {
              baseUrl = ctx.larkBaseUrl;
              domainSwitched = true;
              (_d = ctx.onStatusChange) === null || _d === void 0 ? void 0 : _d.call(ctx, { status: "domain_switched" });
              poll();
              return;
            }
            if (pollRes.client_id && pollRes.client_secret) {
              cleanup();
              resolve({
                client_id: pollRes.client_id,
                client_secret: pollRes.client_secret,
                user_info: pollRes.user_info
              });
              return;
            }
            switch (pollRes.error) {
              case "authorization_pending":
                (_e = ctx.onStatusChange) === null || _e === void 0 ? void 0 : _e.call(ctx, { status: "polling" });
                break;
              case "slow_down":
                interval += 5e3;
                (_f = ctx.onStatusChange) === null || _f === void 0 ? void 0 : _f.call(ctx, { status: "slow_down", interval: interval / 1e3 });
                break;
              case "access_denied":
              case "expired_token":
                cleanup();
                reject(createError(pollRes.error, (_g = pollRes.error_description) !== null && _g !== void 0 ? _g : "Unknown error"));
                return;
              default:
                if (pollRes.error) {
                  cleanup();
                  reject(createError(pollRes.error, (_h = pollRes.error_description) !== null && _h !== void 0 ? _h : "Unknown error"));
                  return;
                }
                break;
            }
            pollTimer = setTimeout(poll, interval);
          } catch (e) {
            cleanup();
            reject(e);
          }
        }), "poll");
        poll();
      });
    }
    __name(startPolling, "startPolling");
    function registerApp(options) {
      var _a, _b, _c, _d;
      return __awaiter(this, void 0, void 0, function* () {
        const { domain, source, signal, onQRCodeReady, onStatusChange } = options;
        const baseUrl = `https://${domain !== null && domain !== void 0 ? domain : DEFAULT_FEISHU_DOMAIN}`;
        const beginRes = yield begin(baseUrl);
        const qrCodeUrl = new URL(beginRes.verification_uri_complete);
        qrCodeUrl.searchParams.set("from", "sdk");
        qrCodeUrl.searchParams.set("source", source ? `${SDK_NAME}/${source}` : SDK_NAME);
        qrCodeUrl.searchParams.set("tp", "sdk");
        onQRCodeReady({
          url: qrCodeUrl.toString(),
          expireIn: (_a = beginRes.expires_in) !== null && _a !== void 0 ? _a : 600
        });
        return startPolling({
          baseUrl,
          deviceCode: beginRes.device_code,
          interval: ((_b = beginRes.interval) !== null && _b !== void 0 ? _b : 5) * 1e3,
          expireIn: ((_c = beginRes.expires_in) !== null && _c !== void 0 ? _c : 600) * 1e3,
          larkBaseUrl: `https://${(_d = options.larkDomain) !== null && _d !== void 0 ? _d : DEFAULT_LARK_DOMAIN}`,
          signal,
          onStatusChange
        });
      });
    }
    __name(registerApp, "registerApp");
    var LarkChannelError = class extends Error {
      static {
        __name(this, "LarkChannelError");
      }
      constructor(code, message, opts) {
        super(message);
        this.name = "LarkChannelError";
        this.code = code;
        this.cause = opts === null || opts === void 0 ? void 0 : opts.cause;
        this.context = opts === null || opts === void 0 ? void 0 : opts.context;
      }
    };
    var Throttle = class {
      static {
        __name(this, "Throttle");
      }
      constructor(opts, fire) {
        this.opts = opts;
        this.fire = fire;
        this.pendingChars = 0;
        this.lastFireAt = 0;
      }
      /**
       * Accumulate bytes and decide whether to fire now, schedule a timer,
       * or do nothing (a fire is already scheduled).
       */
      note(deltaChars) {
        this.pendingChars += deltaChars;
        if (this.pendingChars >= this.opts.chars) {
          this.fireSoon(0);
          return;
        }
        if (!this.timer) {
          const elapsed = Date.now() - this.lastFireAt;
          const wait = Math.max(0, this.opts.ms - elapsed);
          this.fireSoon(wait);
        }
      }
      fireSoon(delay) {
        if (this.timer)
          clearTimeout(this.timer);
        this.timer = setTimeout(() => {
          this.timer = void 0;
          void this.doFire();
        }, delay);
      }
      /**
       * Force-flush everything accumulated so far, including any content that
       * arrived during an in-flight fire. Waits for the in-flight fire to
       * complete, then fires once more to capture the final state — without
       * this second fire, the last chunk of appended content would be missed
       * (the in-flight fire captured a snapshot BEFORE those chunks arrived).
       */
      flushNow() {
        return __awaiter(this, void 0, void 0, function* () {
          if (this.timer) {
            clearTimeout(this.timer);
            this.timer = void 0;
          }
          if (this.inFlight) {
            yield this.inFlight;
          }
          yield this.doFire();
        });
      }
      doFire() {
        return __awaiter(this, void 0, void 0, function* () {
          if (this.inFlight) {
            this.fireSoon(this.opts.ms);
            return;
          }
          const p = (() => __awaiter(this, void 0, void 0, function* () {
            this.pendingChars = 0;
            this.lastFireAt = Date.now();
            yield this.fire();
          }))();
          this.inFlight = p;
          try {
            yield p;
          } finally {
            this.inFlight = void 0;
          }
        });
      }
      dispose() {
        if (this.timer) {
          clearTimeout(this.timer);
          this.timer = void 0;
        }
      }
    };
    var UpdateQueue = class {
      static {
        __name(this, "UpdateQueue");
      }
      constructor() {
        this.tail = Promise.resolve();
      }
      enqueue(task) {
        const next = this.tail.then(task, task);
        this.tail = next.then(() => void 0, () => void 0);
        return next;
      }
      drain() {
        return this.tail;
      }
    };
    function mergeStreamingText(prev, next) {
      if (!prev)
        return next;
      if (!next)
        return prev;
      if (next.startsWith(prev))
        return next;
      if (prev.startsWith(next))
        return prev;
      const maxOverlap = Math.min(prev.length, next.length);
      for (let len = maxOverlap; len > 0; len--) {
        if (prev.endsWith(next.substring(0, len))) {
          return prev + next.substring(len);
        }
      }
      return prev + next;
    }
    __name(mergeStreamingText, "mergeStreamingText");
    function splitWithCodeFences(text, limit) {
      if (text.length <= limit)
        return [text];
      const lines = text.split("\n");
      const out = [];
      let buf = [];
      let bufLen = 0;
      let fenceLang = null;
      const flush = /* @__PURE__ */ __name(() => {
        if (buf.length === 0)
          return;
        let chunk = buf.join("\n");
        if (fenceLang !== null)
          chunk += "\n```";
        out.push(chunk);
        buf = [];
        bufLen = 0;
        if (fenceLang !== null) {
          buf.push("```" + fenceLang);
          bufLen = buf[0].length;
        }
      }, "flush");
      for (const line of lines) {
        const m = line.match(/^```(\w*)$/);
        const lineLen = line.length + (buf.length > 0 ? 1 : 0);
        const isHeading = /^#{1,6}\s/.test(line);
        const nearFull = bufLen > limit * 0.75;
        if (bufLen + lineLen > limit || isHeading && nearFull && buf.length > 0) {
          flush();
        }
        buf.push(line);
        bufLen += lineLen;
        if (m) {
          fenceLang = fenceLang === null ? m[1] || "" : null;
        }
      }
      flush();
      return out;
    }
    __name(splitWithCodeFences, "splitWithCodeFences");
    var DEFAULT_THROTTLE_MS$1 = 100;
    var DEFAULT_THROTTLE_CHARS$1 = 50;
    var DEFAULT_INITIAL = "Thinking...";
    var DEFAULT_EMPTY = "(no content)";
    var INITIAL_SUMMARY = "[Generating...]";
    var SUMMARY_MAX_CHARS = 50;
    var ERROR_FOOTER = "\n\n\u2014 _(Generation interrupted)_";
    var DEFAULT_MAX_ELEMENT_CHARS = 3e4;
    var ELEMENT_ID = "stream_md";
    function truncateSummary(text, max = SUMMARY_MAX_CHARS) {
      if (!text)
        return "";
      const cleaned = text.replace(/\s+/g, " ").trim();
      return cleaned.length <= max ? cleaned : cleaned.slice(0, max - 1) + "\u2026";
    }
    __name(truncateSummary, "truncateSummary");
    function buildStreamingCard(initialText) {
      return {
        schema: "2.0",
        config: {
          streaming_mode: true,
          summary: { content: INITIAL_SUMMARY },
          streaming_config: {
            print_frequency_ms: { default: 70 },
            print_step: { default: 1 },
            print_strategy: "fast"
          }
        },
        body: {
          elements: [
            {
              tag: "markdown",
              element_id: ELEMENT_ID,
              content: initialText
            }
          ]
        }
      };
    }
    __name(buildStreamingCard, "buildStreamingCard");
    var MarkdownStreamControllerImpl = class {
      static {
        __name(this, "MarkdownStreamControllerImpl");
      }
      constructor(sender, to, idType, opts) {
        var _a, _b, _c;
        this.sender = sender;
        this.to = to;
        this.idType = idType;
        this.opts = opts;
        this.content = "";
        this.fullAccumulated = "";
        this._messageId = "";
        this.cardId = "";
        this.sequence = 0;
        this.queue = new UpdateQueue();
        this.started = false;
        this.streamingFailed = false;
        this.rolloverMessageIds = [];
        const cfg = this.sender.config;
        this.throttle = new Throttle({
          ms: (_a = cfg.streamThrottleMs) !== null && _a !== void 0 ? _a : DEFAULT_THROTTLE_MS$1,
          chars: (_b = cfg.streamThrottleChars) !== null && _b !== void 0 ? _b : DEFAULT_THROTTLE_CHARS$1
        }, () => this.pushContent());
        this.maxChars = (_c = cfg.streamMaxElementChars) !== null && _c !== void 0 ? _c : DEFAULT_MAX_ELEMENT_CHARS;
      }
      get messageId() {
        return this._messageId;
      }
      append(chunk) {
        return __awaiter(this, void 0, void 0, function* () {
          if (!chunk)
            return;
          yield this.ensureStarted();
          const merged = mergeStreamingText(this.fullAccumulated, chunk);
          const delta = merged.slice(this.fullAccumulated.length);
          this.fullAccumulated = merged;
          this.content += delta;
          this.throttle.note(chunk.length);
        });
      }
      setContent(full) {
        return __awaiter(this, void 0, void 0, function* () {
          yield this.ensureStarted();
          this.fullAccumulated = full !== null && full !== void 0 ? full : "";
          this.content = full !== null && full !== void 0 ? full : "";
          this.throttle.note(Number.MAX_SAFE_INTEGER);
        });
      }
      run(producer) {
        return __awaiter(this, void 0, void 0, function* () {
          yield this.ensureStarted();
          try {
            yield producer(this);
          } catch (e) {
            yield this.failTerminal(e);
            throw e;
          }
          yield this.completeTerminal();
          return { messageId: this._messageId };
        });
      }
      // ─── internals ─────────────────────────────────────────
      ensureStarted() {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
          if (this.started)
            return;
          this.started = true;
          const initialText = (_a = this.sender.config.streamInitialText) !== null && _a !== void 0 ? _a : DEFAULT_INITIAL;
          const cardSpec = buildStreamingCard(initialText || "...");
          this.cardId = yield this.sender.createCardInstance(cardSpec);
          this._messageId = yield this.sender.sendCardByReference(this.to, this.idType, this.cardId, this.opts);
        });
      }
      pushContent() {
        return __awaiter(this, void 0, void 0, function* () {
          if (!this.cardId || this.streamingFailed)
            return;
          yield this.queue.enqueue(() => __awaiter(this, void 0, void 0, function* () {
            var _a, _b;
            if (this.streamingFailed)
              return;
            try {
              yield this.pushSnapshot();
            } catch (e) {
              this.streamingFailed = true;
              (_b = (_a = this.sender.logger).warn) === null || _b === void 0 ? void 0 : _b.call(_a, "[stream] update failed", e);
            }
          }));
        });
      }
      /**
       * Roll over until content fits and then PATCH the latest card. Caller
       * must already be inside a queue task — no enqueue here. Used by
       * pushContent and the terminal helpers so they share rollover behavior.
       */
      pushSnapshot() {
        return __awaiter(this, void 0, void 0, function* () {
          while (this.content.length > this.maxChars) {
            yield this.rollover();
          }
          const snapshot = this.content || "...";
          yield this.sender.updateCardElementContent(this.cardId, ELEMENT_ID, snapshot, ++this.sequence);
        });
      }
      /**
       * Finalize the current card with as much head content as fits and start
       * a fresh streaming card for the tail. Called from inside the queue task
       * so rollover steps are serialized with regular updates.
       */
      rollover() {
        return __awaiter(this, void 0, void 0, function* () {
          const chunks = splitWithCodeFences(this.content, this.maxChars);
          if (chunks.length < 2) {
            throw new Error("rollover: content not splittable below limit");
          }
          const head = chunks[0];
          const tail = chunks.slice(1).join("\n");
          yield this.sender.updateCardElementContent(this.cardId, ELEMENT_ID, head, ++this.sequence);
          try {
            yield this.sender.finishStreamingCard(this.cardId, ++this.sequence, truncateSummary(head));
          } catch (_a) {
          }
          const cardSpec = buildStreamingCard(tail || "...");
          const newCardId = yield this.sender.createCardInstance(cardSpec);
          const newMessageId = yield this.sender.sendCardByReference(this.to, this.idType, newCardId, this.opts);
          this.cardId = newCardId;
          this.content = tail;
          this.sequence = 0;
          this.rolloverMessageIds.push(newMessageId);
        });
      }
      completeTerminal() {
        var _a, _b;
        return __awaiter(this, void 0, void 0, function* () {
          yield this.throttle.flushNow();
          yield this.queue.drain();
          if (!this.cardId)
            return;
          if (!this.content && !this.streamingFailed) {
            yield this.queue.enqueue(() => __awaiter(this, void 0, void 0, function* () {
              try {
                yield this.sender.updateCardElementContent(this.cardId, ELEMENT_ID, DEFAULT_EMPTY, ++this.sequence);
              } catch (_c) {
              }
            }));
            yield this.queue.drain();
          }
          try {
            yield this.sender.finishStreamingCard(this.cardId, ++this.sequence, truncateSummary(this.content || DEFAULT_EMPTY));
          } catch (e) {
            (_b = (_a = this.sender.logger).warn) === null || _b === void 0 ? void 0 : _b.call(_a, "[stream] finishStreamingCard failed", e);
          }
        });
      }
      failTerminal(_err) {
        return __awaiter(this, void 0, void 0, function* () {
          this.throttle.dispose();
          if (!this.cardId)
            return;
          this.content = (this.content || "") + ERROR_FOOTER;
          yield this.queue.enqueue(() => __awaiter(this, void 0, void 0, function* () {
            try {
              yield this.pushSnapshot();
            } catch (_b) {
            }
          }));
          yield this.queue.drain();
          try {
            yield this.sender.finishStreamingCard(this.cardId, ++this.sequence, truncateSummary(this.content));
          } catch (_a) {
          }
        });
      }
    };
    var MarkdownStreamController = class {
      static {
        __name(this, "MarkdownStreamController");
      }
      constructor(sender, to, idType, opts) {
        this.impl = new MarkdownStreamControllerImpl(sender, to, idType, opts);
      }
      run(producer) {
        return this.impl.run(producer);
      }
    };
    var DEFAULT_THROTTLE_MS = 100;
    var DEFAULT_THROTTLE_CHARS = 50;
    var CardStreamControllerImpl = class {
      static {
        __name(this, "CardStreamControllerImpl");
      }
      constructor(sender, to, idType, opts, initial) {
        var _a, _b;
        this.sender = sender;
        this.to = to;
        this.idType = idType;
        this.opts = opts;
        this._messageId = "";
        this.queue = new UpdateQueue();
        this._current = initial;
        const cfg = sender.config;
        this.throttle = new Throttle({
          ms: (_a = cfg.streamThrottleMs) !== null && _a !== void 0 ? _a : DEFAULT_THROTTLE_MS,
          chars: (_b = cfg.streamThrottleChars) !== null && _b !== void 0 ? _b : DEFAULT_THROTTLE_CHARS
        }, () => this.patch());
      }
      get messageId() {
        return this._messageId;
      }
      get current() {
        return this._current;
      }
      update(next) {
        return __awaiter(this, void 0, void 0, function* () {
          const nextCard = typeof next === "function" ? next(this._current) : next;
          this._current = nextCard;
          this.throttle.note(JSON.stringify(nextCard).length);
        });
      }
      run(producer) {
        return __awaiter(this, void 0, void 0, function* () {
          yield this.sendInitial();
          try {
            yield producer(this);
          } catch (e) {
            yield this.failTerminal(e);
            throw e;
          }
          yield this.completeTerminal();
          return { messageId: this._messageId };
        });
      }
      // ─── internals ─────────────────────────────────────────
      sendInitial() {
        return __awaiter(this, void 0, void 0, function* () {
          const id = yield this.sender.sendOneWithFallback({
            to: this.to,
            idType: this.idType,
            msgType: "interactive",
            content: this._current,
            replyTo: this.opts.replyTo,
            replyInThread: this.opts.replyInThread
          });
          this._messageId = id;
        });
      }
      patch() {
        return __awaiter(this, void 0, void 0, function* () {
          if (!this._messageId)
            return;
          const snapshot = this._current;
          yield this.queue.enqueue(() => __awaiter(this, void 0, void 0, function* () {
            yield this.sender.patchCard(this._messageId, snapshot);
          }));
        });
      }
      completeTerminal() {
        return __awaiter(this, void 0, void 0, function* () {
          yield this.throttle.flushNow();
          yield this.queue.drain();
        });
      }
      failTerminal(_err) {
        return __awaiter(this, void 0, void 0, function* () {
          this.throttle.dispose();
          const withFooter = appendErrorFooter(this._current);
          yield this.queue.enqueue(() => __awaiter(this, void 0, void 0, function* () {
            try {
              yield this.sender.patchCard(this._messageId, withFooter);
            } catch (_a) {
            }
          }));
          yield this.queue.drain();
        });
      }
    };
    function appendErrorFooter(card) {
      const cardObj = card;
      const elements = Array.isArray(cardObj === null || cardObj === void 0 ? void 0 : cardObj.elements) ? [...cardObj.elements] : [];
      elements.push({
        tag: "note",
        elements: [{ tag: "plain_text", content: "\u26A0\uFE0F \u751F\u6210\u4E2D\u65AD" }]
      });
      return Object.assign(Object.assign({}, card), { elements });
    }
    __name(appendErrorFooter, "appendErrorFooter");
    var CardStreamController = class {
      static {
        __name(this, "CardStreamController");
      }
      constructor(sender, to, idType, opts, initial) {
        this.impl = new CardStreamControllerImpl(sender, to, idType, opts, initial);
      }
      run(producer) {
        return this.impl.run(producer);
      }
    };
    function parseOpusDuration(buf) {
      if (!buf || buf.length < 27)
        return void 0;
      for (let i = buf.length - 27; i >= 0; i--) {
        if (buf[i] === 79 && buf[i + 1] === 103 && buf[i + 2] === 103 && buf[i + 3] === 83) {
          const granule = buf.readBigInt64LE(i + 6);
          if (granule < BigInt(0))
            return void 0;
          const ms = Number(granule) / 48;
          if (!Number.isFinite(ms) || ms < 0)
            return void 0;
          return Math.round(ms);
        }
      }
      return void 0;
    }
    __name(parseOpusDuration, "parseOpusDuration");
    function parseMp4Duration(buf) {
      if (!buf || buf.length < 16)
        return void 0;
      const moov = findBoxPayload(buf, 0, buf.length, "moov");
      if (!moov)
        return void 0;
      const mvhd = findBoxPayload(buf, moov.start, moov.end, "mvhd");
      if (!mvhd)
        return void 0;
      const p = mvhd.start;
      if (p + 4 > buf.length)
        return void 0;
      const version = buf.readUInt8(p);
      const base = p + 4;
      let timescale;
      let duration;
      if (version === 1) {
        if (base + 28 > buf.length)
          return void 0;
        timescale = buf.readUInt32BE(base + 16);
        duration = Number(buf.readBigUInt64BE(base + 20));
      } else {
        if (base + 16 > buf.length)
          return void 0;
        timescale = buf.readUInt32BE(base + 8);
        duration = buf.readUInt32BE(base + 12);
      }
      if (!timescale || !Number.isFinite(timescale) || !Number.isFinite(duration)) {
        return void 0;
      }
      return Math.round(duration / timescale * 1e3);
    }
    __name(parseMp4Duration, "parseMp4Duration");
    function findBoxPayload(buf, begin2, end, name) {
      let p = begin2;
      while (p + 8 <= end && p + 8 <= buf.length) {
        const size = buf.readUInt32BE(p);
        const type = buf.slice(p + 4, p + 8).toString("ascii");
        const boxEnd = size === 1 ? p + Number(buf.readBigUInt64BE(p + 8)) : size === 0 ? end : p + size;
        if (boxEnd <= p || boxEnd > end)
          return void 0;
        if (type === name) {
          const payloadStart = size === 1 ? p + 16 : p + 8;
          return { start: payloadStart, end: boxEnd };
        }
        p = boxEnd;
      }
      return void 0;
    }
    __name(findBoxPayload, "findBoxPayload");
    var BLOCKED_V4 = [
      [0, 8],
      [167772160, 8],
      [2130706432, 8],
      [2851995648, 16],
      [2886729728, 12],
      [3232235520, 16],
      [1681915904, 10],
      [3221225472, 24],
      [3221225984, 24],
      [3323068416, 15],
      [3325256704, 24],
      [3405803776, 24],
      [3758096384, 4],
      [4026531840, 4]
      // 240.0.0.0/4 (reserved)
    ];
    function assertPublicUrl(url, opts = {}) {
      var _a, _b;
      return __awaiter(this, void 0, void 0, function* () {
        const u = new URL(url);
        if (u.protocol !== "http:" && u.protocol !== "https:") {
          throw new Error(`ssrf_blocked: protocol ${u.protocol}`);
        }
        const rawHost = u.hostname;
        const host = rawHost.startsWith("[") && rawHost.endsWith("]") ? rawHost.slice(1, -1) : rawHost;
        const allowlisted = (_b = (_a = opts.allowlist) === null || _a === void 0 ? void 0 : _a.includes(host)) !== null && _b !== void 0 ? _b : false;
        let resolvedIp;
        if (net.isIP(host)) {
          resolvedIp = host;
          if (!allowlisted)
            assertIpPublic(resolvedIp);
        } else {
          const records = yield dns.promises.lookup(host, { all: true });
          if (records.length === 0) {
            throw new Error(`ssrf_blocked: no DNS records for ${host}`);
          }
          if (!allowlisted) {
            for (const r of records)
              assertIpPublic(r.address);
          }
          resolvedIp = records[0].address;
        }
        return { resolvedIp, originalHost: host };
      });
    }
    __name(assertPublicUrl, "assertPublicUrl");
    function assertIpPublic(ip) {
      const v = net.isIP(ip);
      if (v === 4 && ipv4Blocked(ip)) {
        throw new Error(`ssrf_blocked: ${ip}`);
      }
      if (v === 6 && ipv6Blocked(ip)) {
        throw new Error(`ssrf_blocked: ${ip}`);
      }
      if (v === 0) {
        throw new Error(`ssrf_blocked: not a valid IP: ${ip}`);
      }
    }
    __name(assertIpPublic, "assertIpPublic");
    function ipv4Blocked(ip) {
      const parts = ip.split(".").map(Number);
      if (parts.length !== 4 || parts.some((p) => p < 0 || p > 255))
        return true;
      const n = (parts[0] << 24 | parts[1] << 16 | parts[2] << 8 | parts[3]) >>> 0;
      return BLOCKED_V4.some(([net2, bits]) => {
        const mask = bits === 0 ? 0 : -1 << 32 - bits >>> 0;
        return (n & mask) === (net2 & mask);
      });
    }
    __name(ipv4Blocked, "ipv4Blocked");
    var BLOCKED_V6 = [
      [BigInt("0xfe800000000000000000000000000000"), 10],
      [BigInt("0xfc000000000000000000000000000000"), 7],
      [BigInt("0xff000000000000000000000000000000"), 8],
      [BigInt("0x01000000000000000000000000000000"), 64],
      [BigInt("0x20010db8000000000000000000000000"), 32],
      [BigInt("0x20010000000000000000000000000000"), 32]
      // 2001::/32      Teredo
    ];
    var HIGH96_MASK = BigInt("0xffffffffffffffffffffffff00000000");
    var PREFIX_V4_MAPPED = BigInt("0x00000000000000000000ffff00000000");
    var PREFIX_V4_COMPAT = BigInt(0);
    var PREFIX_NAT64 = BigInt("0x0064ff9b000000000000000000000000");
    var LOW32_MASK = BigInt("0xffffffff");
    function ipv6Blocked(ip) {
      let n;
      try {
        n = parseIPv6(ip);
      } catch (_a) {
        return true;
      }
      const high96 = n & HIGH96_MASK;
      if (high96 === PREFIX_V4_MAPPED || high96 === PREFIX_NAT64 || high96 === PREFIX_V4_COMPAT) {
        const v4 = Number(n & LOW32_MASK);
        const v4Str = [
          v4 >>> 24 & 255,
          v4 >>> 16 & 255,
          v4 >>> 8 & 255,
          v4 & 255
        ].join(".");
        return ipv4Blocked(v4Str);
      }
      return BLOCKED_V6.some(([net2, bits]) => {
        const shift = BigInt(128 - bits);
        const allOnes = (BigInt(1) << BigInt(128)) - BigInt(1);
        const mask = allOnes >> shift << shift;
        return (n & mask) === (net2 & mask);
      });
    }
    __name(ipv6Blocked, "ipv6Blocked");
    function parseIPv6(ip) {
      let addr = ip.split("%")[0].toLowerCase();
      const v4Suffix = addr.match(/:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/);
      if (v4Suffix) {
        const parts = v4Suffix[1].split(".").map(Number);
        if (parts.length !== 4 || parts.some((p) => !Number.isFinite(p) || p < 0 || p > 255)) {
          throw new Error("bad v4 suffix");
        }
        const hex1 = (parts[0] << 8 | parts[1]).toString(16);
        const hex2 = (parts[2] << 8 | parts[3]).toString(16);
        addr = addr.slice(0, addr.length - v4Suffix[1].length) + `${hex1}:${hex2}`;
      }
      const halves = addr.split("::");
      if (halves.length > 2)
        throw new Error('multiple "::"');
      let groups;
      if (halves.length === 2) {
        const left = halves[0] ? halves[0].split(":") : [];
        const right = halves[1] ? halves[1].split(":") : [];
        const fill = 8 - left.length - right.length;
        if (fill < 0)
          throw new Error("too many groups");
        groups = [...left, ...Array(fill).fill("0"), ...right];
      } else {
        groups = addr.split(":");
      }
      if (groups.length !== 8)
        throw new Error("wrong group count");
      let n = BigInt(0);
      for (const g of groups) {
        if (!/^[0-9a-f]{0,4}$/.test(g))
          throw new Error("bad group");
        n = n << BigInt(16) | BigInt(`0x${g || "0"}`);
      }
      return n;
    }
    __name(parseIPv6, "parseIPv6");
    var POSIX_BLOCKED_PREFIXES = ["/etc/", "/proc/", "/sys/", "/dev/"];
    var URL_MAX_BYTES = 50 * 1024 * 1024;
    var MediaUploader = class {
      static {
        __name(this, "MediaUploader");
      }
      constructor(client, config) {
        this.client = client;
        this.config = config;
      }
      upload(input) {
        var _a, _b, _c;
        return __awaiter(this, void 0, void 0, function* () {
          const buffer = yield this.toBuffer(input.source);
          if (input.kind === "image") {
            return this.uploadImage(buffer);
          }
          if (input.kind === "audio") {
            const duration = this.resolveDuration(input, buffer);
            return this.uploadFile(buffer, "opus", (_a = input.fileName) !== null && _a !== void 0 ? _a : "voice.opus", duration);
          }
          if (input.kind === "video") {
            const duration = this.resolveDuration(input, buffer);
            return this.uploadFile(buffer, "mp4", (_b = input.fileName) !== null && _b !== void 0 ? _b : "video.mp4", duration);
          }
          return this.uploadFile(buffer, "stream", (_c = input.fileName) !== null && _c !== void 0 ? _c : "upload.bin");
        });
      }
      /**
       * Materialize `source` into a Buffer. A string is treated as:
       *   • `http://` / `https://` URL — fetch with SSRF guard
       *   • anything else — local filesystem path, read directly
       */
      toBuffer(source) {
        var _a, _b;
        return __awaiter(this, void 0, void 0, function* () {
          if (Buffer.isBuffer(source))
            return source;
          if (!/^https?:\/\//i.test(source)) {
            const allowedDirs = (_a = this.config) === null || _a === void 0 ? void 0 : _a.allowedFileDirs;
            const resolved = path__default["default"].resolve(source);
            this.assertNotOnPosixBlocklist(resolved);
            try {
              const realPath = yield fs__default["default"].promises.realpath(resolved);
              this.assertNotOnPosixBlocklist(realPath);
              if (allowedDirs && allowedDirs.length > 0) {
                const canonicalDirs = yield Promise.all(allowedDirs.map((d) => __awaiter(this, void 0, void 0, function* () {
                  const r = path__default["default"].resolve(d);
                  try {
                    return yield fs__default["default"].promises.realpath(r);
                  } catch (_c) {
                    return r;
                  }
                })));
                const inAllowed = canonicalDirs.some((d) => realPath === d || realPath.startsWith(d + path__default["default"].sep));
                if (!inAllowed) {
                  throw new LarkChannelError("upload_failed", `file path is outside allowed directories: ${realPath}`);
                }
              }
              return yield fs__default["default"].promises.readFile(realPath);
            } catch (e) {
              if (e instanceof LarkChannelError)
                throw e;
              throw new LarkChannelError("upload_failed", `source is neither an http(s) URL nor a readable local file: ${source}`, { cause: e });
            }
          }
          const ssrf = (_b = this.config) === null || _b === void 0 ? void 0 : _b.ssrfGuard;
          const guardEnabled = ssrf !== false;
          let resolvedIp;
          if (guardEnabled) {
            const ssrfOpts = typeof ssrf === "object" && ssrf ? { allowlist: ssrf.allowlist } : {};
            try {
              ({ resolvedIp } = yield assertPublicUrl(source, ssrfOpts));
            } catch (e) {
              throw new LarkChannelError("ssrf_blocked", `URL blocked: ${String(e)}`, {
                cause: e
              });
            }
          }
          try {
            const requestOpts = {
              url: source,
              method: "GET",
              responseType: "arraybuffer",
              timeout: 15e3,
              maxContentLength: URL_MAX_BYTES,
              maxBodyLength: URL_MAX_BYTES
            };
            if (resolvedIp) {
              const agent = makePinnedAgent(source, resolvedIp);
              requestOpts.httpAgent = agent;
              requestOpts.httpsAgent = agent;
            }
            const res = yield this.client.httpInstance.request(requestOpts);
            return Buffer.from(res);
          } catch (e) {
            throw new LarkChannelError("upload_failed", `fetch source URL failed`, {
              cause: e
            });
          }
        });
      }
      /**
       * Reject paths pointing at POSIX system directories (`/etc`, `/proc`,
       * `/sys`, `/dev`). Called twice by the caller — once on the resolved
       * path pre-I/O, again on the realpath — so both direct hits
       * (`/etc/passwd`) and macOS alias hits (`/etc` → `/private/etc`) are
       * caught.
       */
      assertNotOnPosixBlocklist(p) {
        if (process.platform === "win32")
          return;
        if (POSIX_BLOCKED_PREFIXES.some((pre) => p === pre.slice(0, -1) || p.startsWith(pre))) {
          throw new LarkChannelError("upload_failed", `file path is not allowed: ${p}`);
        }
      }
      resolveDuration(input, buffer) {
        if (input.duration != null && input.duration > 0)
          return input.duration;
        const parsed = input.kind === "audio" ? parseOpusDuration(buffer) : input.kind === "video" ? parseMp4Duration(buffer) : void 0;
        if (parsed != null)
          return parsed;
        throw new LarkChannelError("upload_failed", `duration could not be determined for ${input.kind}; pass it explicitly`);
      }
      uploadImage(buffer) {
        var _a, _b;
        return __awaiter(this, void 0, void 0, function* () {
          try {
            const r = yield this.client.im.v1.image.create({
              data: { image_type: "message", image: buffer }
            });
            const key = (_a = r === null || r === void 0 ? void 0 : r.image_key) !== null && _a !== void 0 ? _a : (_b = r === null || r === void 0 ? void 0 : r.data) === null || _b === void 0 ? void 0 : _b.image_key;
            if (!key)
              throw new Error("image_key missing in upload response");
            return { kind: "image", fileKey: key };
          } catch (e) {
            throw new LarkChannelError("upload_failed", `image upload failed`, {
              cause: e
            });
          }
        });
      }
      uploadFile(buffer, fileType, fileName, durationMs) {
        var _a, _b;
        return __awaiter(this, void 0, void 0, function* () {
          try {
            const data = {
              file_type: fileType,
              file_name: fileName,
              file: buffer
            };
            if (durationMs != null)
              data.duration = durationMs;
            const r = yield this.client.im.v1.file.create({
              data
            });
            const key = (_a = r === null || r === void 0 ? void 0 : r.file_key) !== null && _a !== void 0 ? _a : (_b = r === null || r === void 0 ? void 0 : r.data) === null || _b === void 0 ? void 0 : _b.file_key;
            if (!key)
              throw new Error("file_key missing in upload response");
            const kind = fileType === "opus" ? "audio" : fileType === "mp4" ? "video" : "file";
            return { kind, fileKey: key, durationMs };
          } catch (e) {
            if (e instanceof LarkChannelError)
              throw e;
            throw new LarkChannelError("upload_failed", `file upload failed`, {
              cause: e
            });
          }
        });
      }
    };
    function makePinnedAgent(url, pinnedIp) {
      const AgentClass = url.startsWith("https:") ? https__default["default"].Agent : http__default["default"].Agent;
      const agent = new AgentClass();
      const family = pinnedIp.includes(":") ? 6 : 4;
      const lookup = /* @__PURE__ */ __name((_hostname, _opts, cb) => {
        cb(null, pinnedIp, family);
      }, "lookup");
      const origCreateConnection = agent.createConnection.bind(agent);
      agent.createConnection = (opts, cb) => origCreateConnection(Object.assign(Object.assign({}, opts), { lookup }), cb);
      return agent;
    }
    __name(makePinnedAgent, "makePinnedAgent");
    function composeMentionsTextPrefix(mentions) {
      var _a;
      if (!(mentions === null || mentions === void 0 ? void 0 : mentions.length))
        return "";
      const parts = [];
      for (const m of mentions) {
        if (!m.openId)
          continue;
        const name = (_a = m.name) !== null && _a !== void 0 ? _a : "";
        parts.push(`<at user_id="${m.openId}">${name}</at>`);
      }
      return parts.length > 0 ? parts.join(" ") + " " : "";
    }
    __name(composeMentionsTextPrefix, "composeMentionsTextPrefix");
    function optimizeMarkdownStyle(text, cardVersion = 1) {
      try {
        return _optimize(text, cardVersion);
      } catch (_a) {
        return text;
      }
    }
    __name(optimizeMarkdownStyle, "optimizeMarkdownStyle");
    function _optimize(text, cardVersion) {
      const MARK = "___CB_";
      const codeBlocks = [];
      let r = text.replace(/(^|\n)(`{3,})([^\n]*)\n[\s\S]*?\n\2(?=\n|$)/g, (m, prefix = "") => {
        const block = m.slice(String(prefix).length);
        return `${prefix}${MARK}${codeBlocks.push(block) - 1}___`;
      });
      const hasH1toH3 = /^#{1,3} /m.test(text);
      if (hasH1toH3) {
        r = r.replace(/^#{2,6} (.+)$/gm, "##### $1");
        r = r.replace(/^# (.+)$/gm, "#### $1");
      }
      if (cardVersion >= 2) {
        r = r.replace(/^(#{4,5} .+)\n{1,2}(#{4,5} )/gm, "$1\n<br>\n$2");
        r = r.replace(/^([^|\n].*)\n(\|.+\|)/gm, "$1\n\n$2");
        r = r.replace(/\n\n((?:\|.+\|[^\S\n]*\n?)+)/g, "\n\n<br>\n\n$1");
        r = r.replace(/((?:^\|.+\|[^\S\n]*\n?)+)/gm, (m, _table, offset) => {
          const after = r.slice(offset + m.length).replace(/^\n+/, "");
          if (!after || /^(---|#{4,5} |\*\*)/.test(after))
            return m;
          return m + "\n<br>\n";
        });
        r = r.replace(/^((?!#{4,5} )(?!\*\*).+)\n\n(<br>)\n\n(\|)/gm, "$1\n$2\n$3");
        r = r.replace(/^(\*\*.+)\n\n(<br>)\n\n(\|)/gm, "$1\n$2\n\n$3");
        r = r.replace(/(\|[^\n]*\n)\n(<br>\n)((?!#{4,5} )(?!\*\*))/gm, "$1$2$3");
        codeBlocks.forEach((block, i) => {
          r = r.replace(`${MARK}${i}___`, `
<br>
${block}
<br>
`);
        });
      } else {
        codeBlocks.forEach((block, i) => {
          r = r.replace(`${MARK}${i}___`, block);
        });
      }
      r = r.replace(/\n{3,}/g, "\n\n");
      return r;
    }
    __name(_optimize, "_optimize");
    function markdownToPost(md, opts) {
      var _a, _b;
      const prefix = composeMentionsTextPrefix((_a = opts === null || opts === void 0 ? void 0 : opts.mentions) !== null && _a !== void 0 ? _a : []);
      const text = optimizeMarkdownStyle(prefix + md, 1);
      return {
        zh_cn: {
          title: (_b = opts === null || opts === void 0 ? void 0 : opts.title) !== null && _b !== void 0 ? _b : "",
          content: [[{ tag: "md", text }]]
        }
      };
    }
    __name(markdownToPost, "markdownToPost");
    function postToPlainText(post) {
      var _a;
      const body = post === null || post === void 0 ? void 0 : post.zh_cn;
      if (!(body === null || body === void 0 ? void 0 : body.content))
        return "";
      const lines = [];
      for (const paragraph of body.content) {
        if (!Array.isArray(paragraph))
          continue;
        const parts = [];
        for (const el of paragraph) {
          switch (el.tag) {
            case "md":
            case "text":
            case "a":
              parts.push((_a = el.text) !== null && _a !== void 0 ? _a : "");
              break;
            case "at":
              parts.push(el.user_name ? `@${el.user_name}` : "");
              break;
            case "img":
              parts.push(el.image_key ? `[image]` : "");
              break;
          }
        }
        lines.push(parts.join(""));
      }
      return lines.join("\n").trim();
    }
    __name(postToPlainText, "postToPlainText");
    function detectReceiveIdType(to) {
      if (!to)
        throw new Error("empty receive_id");
      if (to.startsWith("oc_"))
        return "chat_id";
      if (to.startsWith("ou_"))
        return "open_id";
      if (to.startsWith("on_"))
        return "union_id";
      if (to.includes("@"))
        return "email";
      return "user_id";
    }
    __name(detectReceiveIdType, "detectReceiveIdType");
    function classifyError(err, context) {
      if (err instanceof LarkChannelError)
        return err;
      const code = inferCode(err);
      const message = extractMessage(err);
      return new LarkChannelError(code, message, { cause: err, context });
    }
    __name(classifyError, "classifyError");
    function inferCode(err) {
      var _a, _b, _c, _d, _e, _f, _g, _h;
      const raw = err;
      const status = (_b = (_a = raw === null || raw === void 0 ? void 0 : raw.response) === null || _a === void 0 ? void 0 : _a.status) !== null && _b !== void 0 ? _b : raw === null || raw === void 0 ? void 0 : raw.status;
      const feishuCode = (_g = (_e = (_d = (_c = raw === null || raw === void 0 ? void 0 : raw.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.code) !== null && _e !== void 0 ? _e : (_f = raw === null || raw === void 0 ? void 0 : raw.data) === null || _f === void 0 ? void 0 : _f.code) !== null && _g !== void 0 ? _g : raw === null || raw === void 0 ? void 0 : raw.code;
      const msg = String((_h = raw === null || raw === void 0 ? void 0 : raw.message) !== null && _h !== void 0 ? _h : "").toLowerCase();
      if (typeof feishuCode === "number") {
        if (feishuCode === 230020 || feishuCode === 230017)
          return "target_revoked";
        if (feishuCode === 99991400 || feishuCode === 99991401)
          return "permission_denied";
        if (feishuCode === 230002 || feishuCode === 230001)
          return "format_error";
      }
      if (status === 429)
        return "rate_limited";
      if (status === 401 || status === 403)
        return "permission_denied";
      if (status === 400)
        return "format_error";
      if (status === 404)
        return "target_revoked";
      if (msg.startsWith("ssrf_blocked"))
        return "ssrf_blocked";
      if (msg.includes("timeout") || (raw === null || raw === void 0 ? void 0 : raw.code) === "ETIMEDOUT" || (raw === null || raw === void 0 ? void 0 : raw.code) === "ECONNABORTED") {
        return "send_timeout";
      }
      return "unknown";
    }
    __name(inferCode, "inferCode");
    function extractMessage(err) {
      var _a, _b, _c, _d;
      const raw = err;
      return ((_b = (_a = raw === null || raw === void 0 ? void 0 : raw.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.msg) || ((_d = (_c = raw === null || raw === void 0 ? void 0 : raw.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.message) || (raw === null || raw === void 0 ? void 0 : raw.message) || String(err);
    }
    __name(extractMessage, "extractMessage");
    function isRetryable(err) {
      return err.code === "rate_limited" || err.code === "unknown";
    }
    __name(isRetryable, "isRetryable");
    function isFormatError(err) {
      return err.code === "format_error";
    }
    __name(isFormatError, "isFormatError");
    function isReplyTargetGone(err) {
      return err.code === "target_revoked";
    }
    __name(isReplyTargetGone, "isReplyTargetGone");
    function retry(op, opts = {}) {
      var _a, _b;
      return __awaiter(this, void 0, void 0, function* () {
        const max = (_a = opts.maxAttempts) !== null && _a !== void 0 ? _a : 3;
        const base = (_b = opts.baseDelayMs) !== null && _b !== void 0 ? _b : 500;
        let lastErr;
        for (let attempt = 1; attempt <= max; attempt++) {
          try {
            return yield op(attempt);
          } catch (raw) {
            const err = classifyError(raw, { attempt });
            lastErr = err;
            if (attempt >= max || !isRetryable(err)) {
              throw err;
            }
            const delay = base * Math.pow(3, attempt - 1);
            yield sleep(delay);
          }
        }
        throw lastErr;
      });
    }
    __name(retry, "retry");
    function sleep(ms) {
      return new Promise((r) => setTimeout(r, ms));
    }
    __name(sleep, "sleep");
    var DEFAULT_CHUNK_LIMIT = 3500;
    var OutboundSender = class {
      static {
        __name(this, "OutboundSender");
      }
      constructor(client, config, logger) {
        var _a;
        this.client = client;
        this.config = config;
        this.logger = logger;
        this.uploader = new MediaUploader(client, config);
        this.chunkLimit = (_a = config.textChunkLimit) !== null && _a !== void 0 ? _a : DEFAULT_CHUNK_LIMIT;
      }
      send(to, input, opts = {}) {
        return __awaiter(this, void 0, void 0, function* () {
          const idType = detectReceiveIdType(to);
          if ("markdown" in input)
            return this.sendMarkdown(to, idType, input.markdown, opts);
          if ("text" in input)
            return this.sendText(to, idType, input.text, opts);
          if ("post" in input)
            return this.sendPost(to, idType, input.post, opts);
          if ("image" in input)
            return this.sendImage(to, idType, input.image, opts);
          if ("file" in input)
            return this.sendFile(to, idType, input.file, opts);
          if ("audio" in input)
            return this.sendAudio(to, idType, input.audio, opts);
          if ("video" in input)
            return this.sendVideo(to, idType, input.video, opts);
          if ("card" in input)
            return this.sendCard(to, idType, input.card, opts);
          if ("shareChat" in input)
            return this.sendShareChat(to, idType, input.shareChat.chatId, opts);
          if ("shareUser" in input)
            return this.sendShareUser(to, idType, input.shareUser.userId, opts);
          if ("sticker" in input)
            return this.sendSticker(to, idType, input.sticker.fileKey, opts);
          throw new LarkChannelError("format_error", "unrecognized SendInput shape");
        });
      }
      stream(to, input, opts = {}) {
        return __awaiter(this, void 0, void 0, function* () {
          const idType = detectReceiveIdType(to);
          if ("markdown" in input) {
            const controller = new MarkdownStreamController(this, to, idType, opts);
            return controller.run(input.markdown);
          }
          if ("card" in input) {
            const controller = new CardStreamController(this, to, idType, opts, input.card.initial);
            return controller.run(input.card.producer);
          }
          throw new LarkChannelError("format_error", "unrecognized StreamInput shape");
        });
      }
      // ─── text / markdown / post ───────────────────────────
      sendMarkdown(to, idType, md, opts) {
        return __awaiter(this, void 0, void 0, function* () {
          const chunks = splitWithCodeFences(md, this.chunkLimit);
          const ids = [];
          for (let i = 0; i < chunks.length; i++) {
            const post = this.convertMarkdown(chunks[i], i === 0 ? opts.mentions : void 0);
            const id = yield this.sendOneWithFallback({
              to,
              idType,
              msgType: "post",
              content: post,
              replyTo: i === 0 ? opts.replyTo : void 0,
              replyInThread: opts.replyInThread
            });
            ids.push(id);
          }
          return this.makeResult(ids);
        });
      }
      sendText(to, idType, text, opts) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
          const prefix = composeMentionsTextPrefix((_a = opts.mentions) !== null && _a !== void 0 ? _a : []);
          const body = prefix + text;
          const chunks = splitPlain(body, this.chunkLimit);
          const ids = [];
          for (let i = 0; i < chunks.length; i++) {
            const id = yield this.sendOneWithFallback({
              to,
              idType,
              msgType: "text",
              content: { text: chunks[i] },
              replyTo: i === 0 ? opts.replyTo : void 0,
              replyInThread: opts.replyInThread
            });
            ids.push(id);
          }
          return this.makeResult(ids);
        });
      }
      sendPost(to, idType, post, opts) {
        return __awaiter(this, void 0, void 0, function* () {
          const id = yield this.sendOneWithFallback({
            to,
            idType,
            msgType: "post",
            content: post,
            replyTo: opts.replyTo,
            replyInThread: opts.replyInThread
          });
          return { messageId: id };
        });
      }
      convertMarkdown(md, mentions) {
        const conv = this.config.markdownConverter;
        if (typeof conv === "function")
          return conv(md);
        return markdownToPost(md, { mentions });
      }
      // ─── media ────────────────────────────────────────────
      sendImage(to, idType, input, opts) {
        return __awaiter(this, void 0, void 0, function* () {
          const up = yield this.uploader.upload({ kind: "image", source: input.source });
          const id = yield this.sendOneWithFallback({
            to,
            idType,
            msgType: "image",
            content: { image_key: up.fileKey },
            replyTo: opts.replyTo,
            replyInThread: opts.replyInThread
          });
          return { messageId: id };
        });
      }
      sendFile(to, idType, input, opts) {
        return __awaiter(this, void 0, void 0, function* () {
          const up = yield this.uploader.upload({
            kind: "file",
            source: input.source,
            fileName: input.fileName
          });
          const id = yield this.sendOneWithFallback({
            to,
            idType,
            msgType: "file",
            content: { file_key: up.fileKey },
            replyTo: opts.replyTo,
            replyInThread: opts.replyInThread
          });
          return { messageId: id };
        });
      }
      sendAudio(to, idType, input, opts) {
        return __awaiter(this, void 0, void 0, function* () {
          const up = yield this.uploader.upload({
            kind: "audio",
            source: input.source,
            duration: input.duration
          });
          const id = yield this.sendOneWithFallback({
            to,
            idType,
            msgType: "audio",
            content: { file_key: up.fileKey },
            replyTo: opts.replyTo,
            replyInThread: opts.replyInThread
          });
          return { messageId: id };
        });
      }
      sendVideo(to, idType, input, opts) {
        return __awaiter(this, void 0, void 0, function* () {
          const up = yield this.uploader.upload({
            kind: "video",
            source: input.source,
            duration: input.duration
          });
          const content = { file_key: up.fileKey };
          if (input.coverImageKey)
            content.image_key = input.coverImageKey;
          const id = yield this.sendOneWithFallback({
            to,
            idType,
            msgType: "media",
            content,
            replyTo: opts.replyTo,
            replyInThread: opts.replyInThread
          });
          return { messageId: id };
        });
      }
      // ─── card ─────────────────────────────────────────────
      sendCard(to, idType, card, opts) {
        return __awaiter(this, void 0, void 0, function* () {
          const id = yield this.sendOneWithFallback({
            to,
            idType,
            msgType: "interactive",
            content: card,
            replyTo: opts.replyTo,
            replyInThread: opts.replyInThread
          });
          return { messageId: id };
        });
      }
      // ─── share / sticker ──────────────────────────────────
      sendShareChat(to, idType, chatId, opts) {
        return __awaiter(this, void 0, void 0, function* () {
          const id = yield this.sendOneWithFallback({
            to,
            idType,
            msgType: "share_chat",
            content: { chat_id: chatId },
            replyTo: opts.replyTo,
            replyInThread: opts.replyInThread
          });
          return { messageId: id };
        });
      }
      sendShareUser(to, idType, userId, opts) {
        return __awaiter(this, void 0, void 0, function* () {
          const id = yield this.sendOneWithFallback({
            to,
            idType,
            msgType: "share_user",
            content: { user_id: userId },
            replyTo: opts.replyTo,
            replyInThread: opts.replyInThread
          });
          return { messageId: id };
        });
      }
      sendSticker(to, idType, fileKey, opts) {
        return __awaiter(this, void 0, void 0, function* () {
          const id = yield this.sendOneWithFallback({
            to,
            idType,
            msgType: "sticker",
            content: { file_key: fileKey },
            replyTo: opts.replyTo,
            replyInThread: opts.replyInThread
          });
          return { messageId: id };
        });
      }
      // ─── low-level raw send with fallback & retry ─────────
      /**
       * Send once with fallback for format errors (post → text) and for
       * vanished reply targets (reply → create).
       */
      sendOneWithFallback(args) {
        return __awaiter(this, void 0, void 0, function* () {
          try {
            return yield this.rawSendWithRetry(args);
          } catch (e) {
            const err = classifyError(e, { to: args.to });
            if (isReplyTargetGone(err) && args.replyTo) {
              return this.rawSendWithRetry(Object.assign(Object.assign({}, args), { replyTo: void 0 }));
            }
            if (isFormatError(err) && args.msgType === "post") {
              const plain = postToPlainText(args.content);
              return this.rawSendWithRetry(Object.assign(Object.assign({}, args), { msgType: "text", content: { text: plain || "[message]" } }));
            }
            throw err;
          }
        });
      }
      rawSendWithRetry(args) {
        return __awaiter(this, void 0, void 0, function* () {
          return retry(() => this.rawSend(args), this.config.retry);
        });
      }
      rawSend(args) {
        var _a, _b;
        return __awaiter(this, void 0, void 0, function* () {
          const payload = {
            receive_id: args.to,
            msg_type: args.msgType,
            content: JSON.stringify(args.content)
          };
          if (args.replyTo) {
            const r2 = yield this.client.im.v1.message.reply({
              path: { message_id: args.replyTo },
              data: {
                content: payload.content,
                msg_type: args.msgType,
                reply_in_thread: args.replyInThread
              }
            });
            const id2 = (_a = r2.data) === null || _a === void 0 ? void 0 : _a.message_id;
            if (!id2)
              throw new LarkChannelError("unknown", "message_id missing from reply response");
            return id2;
          }
          const r = yield this.client.im.v1.message.create({
            params: { receive_id_type: args.idType },
            data: payload
          });
          const id = (_b = r.data) === null || _b === void 0 ? void 0 : _b.message_id;
          if (!id)
            throw new LarkChannelError("unknown", "message_id missing from create response");
          return id;
        });
      }
      // ─── helpers used by streaming ────────────────────────
      /**
       * Full card replace via im.v1.message.patch — used by CardStreamController
       * and the public `channel.updateCard()` low-level API. Not suitable for
       * text streaming (use native cardkit streaming below for that).
       */
      patchCard(messageId, card) {
        return __awaiter(this, void 0, void 0, function* () {
          yield this.client.im.v1.message.patch({
            path: { message_id: messageId },
            data: { content: JSON.stringify(card) }
          });
        });
      }
      /**
       * Create a card instance via cardkit.v1.card.create. Used to get a
       * `card_id` that can be referenced from messages AND updated with
       * native streaming APIs (cardElement.content for typewriter effect).
       */
      createCardInstance(spec) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
          const r = yield this.client.cardkit.v1.card.create({
            data: { type: "card_json", data: JSON.stringify(spec) }
          });
          const cardId = (_a = r.data) === null || _a === void 0 ? void 0 : _a.card_id;
          if (!cardId) {
            throw new LarkChannelError("unknown", "cardkit.card.create returned no card_id");
          }
          return cardId;
        });
      }
      /**
       * Send an interactive message that references a pre-created card instance
       * by card_id. Returns the resulting message_id.
       */
      sendCardByReference(to, idType, cardId, opts) {
        return __awaiter(this, void 0, void 0, function* () {
          return this.rawSendWithRetry({
            to,
            idType,
            msgType: "interactive",
            content: { type: "card", data: { card_id: cardId } },
            replyTo: opts.replyTo,
            replyInThread: opts.replyInThread
          });
        });
      }
      /**
       * Stream update: replace a card element's content and let Feishu render
       * the incremental diff as a typewriter animation. `sequence` must be
       * monotonically increasing per card (duplicates/out-of-order → rejected
       * server-side). `uuid` is required for idempotency — we compose it from
       * cardId + sequence so two concurrent calls with the same seq would
       * dedupe rather than both take effect.
       */
      updateCardElementContent(cardId, elementId, content, sequence) {
        return __awaiter(this, void 0, void 0, function* () {
          yield this.client.cardkit.v1.cardElement.content({
            path: { card_id: cardId, element_id: elementId },
            data: {
              content,
              sequence,
              uuid: `c_${cardId}_${sequence}`
            }
          });
        });
      }
      /**
       * Switch a streaming card to finalized state (streaming_mode: false).
       * Feishu auto-closes after 10min regardless, but callers should close
       * explicitly when producer completes.
       *
       * `summary` is optional; when provided, also updates the card's preview
       * text (the one shown in message lists / chat previews). Without it, the
       * preview stays at whatever was set during streaming (typically the
       * default "[Generating...]"), which looks stuck.
       */
      finishStreamingCard(cardId, sequence, summary) {
        return __awaiter(this, void 0, void 0, function* () {
          const config = { streaming_mode: false };
          if (summary !== void 0) {
            config.summary = { content: summary };
          }
          yield this.client.cardkit.v1.card.settings({
            path: { card_id: cardId },
            data: {
              settings: JSON.stringify({ config }),
              sequence,
              uuid: `s_${cardId}_${sequence}`
            }
          });
        });
      }
      makeResult(ids) {
        return {
          messageId: ids[0],
          chunkIds: ids.length > 1 ? ids : void 0
        };
      }
    };
    function splitPlain(text, limit) {
      if (text.length <= limit)
        return [text];
      const out = [];
      for (let i = 0; i < text.length; i += limit) {
        out.push(text.slice(i, i + limit));
      }
      return out;
    }
    __name(splitPlain, "splitPlain");
    var ChatPipeline = class {
      static {
        __name(this, "ChatPipeline");
      }
      constructor(config, serialOnly) {
        this.config = config;
        this.serialOnly = serialOnly;
        this.buffer = [];
        this.bufferChars = 0;
        this.tail = Promise.resolve();
      }
      push(msg, handler) {
        var _a;
        this.buffer.push(msg);
        this.bufferChars += msg.content.length;
        (_a = this.pendingHandler) !== null && _a !== void 0 ? _a : this.pendingHandler = handler;
        if (this.buffer.length >= this.config.maxMessages || this.bufferChars >= this.config.maxChars) {
          this.clearTimer();
          this.enqueueFlush();
          return;
        }
        if (this.config.delayMs <= 0 || this.serialOnly) {
          this.clearTimer();
          this.enqueueFlush();
          return;
        }
        this.clearTimer();
        const delay = this.bufferChars >= this.config.longThresholdChars ? this.config.longDelayMs : this.config.delayMs;
        this.timer = setTimeout(() => {
          this.timer = void 0;
          this.enqueueFlush();
        }, delay);
      }
      run(task) {
        if (this.buffer.length > 0) {
          this.clearTimer();
          this.enqueueFlush();
        }
        const next = this.tail.then(task, task);
        this.tail = next.then(() => void 0, () => void 0);
        return next;
      }
      flushNow() {
        return __awaiter(this, void 0, void 0, function* () {
          if (this.buffer.length > 0) {
            this.clearTimer();
            this.enqueueFlush();
          }
          yield this.tail;
        });
      }
      isIdle() {
        return this.buffer.length === 0 && !this.timer;
      }
      dispose() {
        this.clearTimer();
        this.buffer = [];
        this.pendingHandler = void 0;
      }
      clearTimer() {
        if (this.timer) {
          clearTimeout(this.timer);
          this.timer = void 0;
        }
      }
      enqueueFlush() {
        if (this.buffer.length === 0)
          return;
        const batch = this.buffer;
        const handler = this.pendingHandler;
        this.buffer = [];
        this.bufferChars = 0;
        this.pendingHandler = void 0;
        if (!handler)
          return;
        const dispatch = {
          message: mergeBatch(batch),
          sourceIds: batch.map((m) => m.messageId)
        };
        const task = /* @__PURE__ */ __name(() => handler(dispatch), "task");
        const next = this.tail.then(task, task);
        this.tail = next.then(() => void 0, () => void 0);
      }
    };
    var ChatPipelineManager = class {
      static {
        __name(this, "ChatPipelineManager");
      }
      constructor(config) {
        this.config = config;
        this.pipelines = /* @__PURE__ */ new Map();
      }
      push(scope, msg, handler) {
        this.getOrCreate(scope, false).push(msg, handler);
      }
      run(scope, task) {
        return this.getOrCreate(scope, true).run(task);
      }
      getOrCreate(scope, serialOnly) {
        let p = this.pipelines.get(scope);
        if (!p) {
          p = new ChatPipeline(this.config, serialOnly);
          this.pipelines.set(scope, p);
        }
        return p;
      }
      flushAll() {
        return __awaiter(this, void 0, void 0, function* () {
          yield Promise.all([...this.pipelines.values()].map((p) => p.flushNow()));
        });
      }
      dispose() {
        return __awaiter(this, void 0, void 0, function* () {
          yield this.flushAll();
          for (const p of this.pipelines.values())
            p.dispose();
          this.pipelines.clear();
        });
      }
    };
    function mergeBatch(batch) {
      if (batch.length === 1)
        return batch[0];
      const last = batch[batch.length - 1];
      const content = batch.map((m) => m.content).filter((c) => c && c.length > 0).join("\n\n");
      const resources = dedupBy(batch.flatMap((m) => m.resources), (r) => r.fileKey);
      const mentions = dedupBy(batch.flatMap((m) => m.mentions), (m) => {
        var _a;
        return (_a = m.openId) !== null && _a !== void 0 ? _a : m.key;
      });
      return Object.assign(Object.assign({}, last), {
        content,
        resources,
        mentions,
        mentionAll: batch.some((m) => m.mentionAll),
        mentionedBot: batch.some((m) => m.mentionedBot)
      });
    }
    __name(mergeBatch, "mergeBatch");
    function dedupBy(items, key) {
      const seen = /* @__PURE__ */ new Set();
      const out = [];
      for (const item of items) {
        const k = key(item);
        if (k == null) {
          out.push(item);
          continue;
        }
        if (seen.has(k))
          continue;
        seen.add(k);
        out.push(item);
      }
      return out;
    }
    __name(dedupBy, "dedupBy");
    var DEFAULT_BATCH = {
      delayMs: 600,
      longThresholdChars: 1e3,
      longDelayMs: 2e3,
      maxMessages: 8,
      maxChars: 4e3
    };
    var DEFAULT_DEDUP = {
      ttl: 12 * 36e5,
      maxEntries: 5e3,
      sweepIntervalMs: 5 * 6e4,
      namespace: "channel:seen"
    };
    var DEFAULT_STALE_MS = 30 * 6e4;
    var DEFAULT_LOCK_TTL_MS = 5 * 6e4;
    function resolveBatchConfig(cfg) {
      var _a, _b, _c, _d, _e, _f, _g;
      const t = (_b = (_a = cfg === null || cfg === void 0 ? void 0 : cfg.batch) === null || _a === void 0 ? void 0 : _a.text) !== null && _b !== void 0 ? _b : {};
      return {
        delayMs: (_c = t.delayMs) !== null && _c !== void 0 ? _c : DEFAULT_BATCH.delayMs,
        longThresholdChars: (_d = t.longThresholdChars) !== null && _d !== void 0 ? _d : DEFAULT_BATCH.longThresholdChars,
        longDelayMs: (_e = t.longDelayMs) !== null && _e !== void 0 ? _e : DEFAULT_BATCH.longDelayMs,
        maxMessages: (_f = t.maxMessages) !== null && _f !== void 0 ? _f : DEFAULT_BATCH.maxMessages,
        maxChars: (_g = t.maxChars) !== null && _g !== void 0 ? _g : DEFAULT_BATCH.maxChars
      };
    }
    __name(resolveBatchConfig, "resolveBatchConfig");
    var SeenCache = class {
      static {
        __name(this, "SeenCache");
      }
      constructor(cache, opts = {}) {
        var _a, _b, _c, _d, _e, _f;
        this.cache = cache;
        this.memory = /* @__PURE__ */ new Map();
        this.ttlMs = (_a = opts.ttlMs) !== null && _a !== void 0 ? _a : DEFAULT_DEDUP.ttl;
        this.maxMem = (_b = opts.maxMemEntries) !== null && _b !== void 0 ? _b : DEFAULT_DEDUP.maxEntries;
        this.ns = (_c = opts.namespace) !== null && _c !== void 0 ? _c : DEFAULT_DEDUP.namespace;
        const sweepMs = (_d = opts.sweepMs) !== null && _d !== void 0 ? _d : DEFAULT_DEDUP.sweepIntervalMs;
        this.sweeper = setInterval(() => this.sweep(), sweepMs);
        (_f = (_e = this.sweeper).unref) === null || _f === void 0 ? void 0 : _f.call(_e);
      }
      has(id) {
        return __awaiter(this, void 0, void 0, function* () {
          const now = Date.now();
          const exp = this.memory.get(id);
          if (exp && exp > now) {
            this.memory.delete(id);
            this.memory.set(id, exp);
            return true;
          }
          const hit = yield this.cache.get(id, { namespace: this.ns });
          if (hit) {
            this.memory.set(id, now + this.ttlMs);
            this.evictIfNeeded();
            return true;
          }
          return false;
        });
      }
      add(id) {
        return __awaiter(this, void 0, void 0, function* () {
          const expireAt = Date.now() + this.ttlMs;
          this.memory.set(id, expireAt);
          this.evictIfNeeded();
          try {
            yield this.cache.set(id, "1", expireAt, { namespace: this.ns });
          } catch (_a) {
          }
        });
      }
      evictIfNeeded() {
        while (this.memory.size > this.maxMem) {
          const first = this.memory.keys().next().value;
          if (first === void 0)
            break;
          this.memory.delete(first);
        }
      }
      sweep() {
        const now = Date.now();
        for (const [k, v] of this.memory) {
          if (v <= now)
            this.memory.delete(k);
        }
      }
      dispose() {
        clearInterval(this.sweeper);
        this.memory.clear();
      }
    };
    var PolicyGate = class {
      static {
        __name(this, "PolicyGate");
      }
      constructor(cfg, bot) {
        this.cfg = Object.assign({}, cfg !== null && cfg !== void 0 ? cfg : {});
        this.bot = bot;
      }
      evaluate(msg) {
        if (msg.chatType === "group")
          return this.evaluateGroup(msg);
        return this.evaluateDm(msg);
      }
      evaluateGroup(msg) {
        var _a, _b;
        const allow = this.cfg.groupAllowlist;
        if (allow && allow.length > 0 && !allow.includes(msg.chatId)) {
          return { allowed: false, reason: "group_not_allowed" };
        }
        const requireMention = (_a = this.cfg.requireMention) !== null && _a !== void 0 ? _a : true;
        if (requireMention && !msg.mentionedBot) {
          return { allowed: false, reason: "no_mention" };
        }
        if (msg.mentionAll && !((_b = this.cfg.respondToMentionAll) !== null && _b !== void 0 ? _b : false)) {
          return { allowed: false, reason: "mention_all_blocked" };
        }
        return { allowed: true };
      }
      evaluateDm(msg) {
        var _a, _b;
        const mode = (_a = this.cfg.dmMode) !== null && _a !== void 0 ? _a : "open";
        if (mode === "disabled") {
          return { allowed: false, reason: "dm_disabled" };
        }
        if (mode === "allowlist") {
          const allow = (_b = this.cfg.dmAllowlist) !== null && _b !== void 0 ? _b : [];
          if (!allow.includes(msg.senderId)) {
            return { allowed: false, reason: "sender_not_allowed" };
          }
        }
        return { allowed: true };
      }
      updateConfig(partial) {
        this.cfg = Object.assign(Object.assign({}, this.cfg), partial);
      }
      getConfig() {
        return this.cfg;
      }
      setBotIdentity(bot) {
        this.bot = bot;
      }
      getBotIdentity() {
        return this.bot;
      }
    };
    var ProcessingLock = class {
      static {
        __name(this, "ProcessingLock");
      }
      constructor(ttlMs = DEFAULT_LOCK_TTL_MS, sweepMs = 6e4) {
        var _a, _b;
        this.ttlMs = ttlMs;
        this.locks = /* @__PURE__ */ new Map();
        this.sweeper = setInterval(() => this.sweep(), sweepMs);
        (_b = (_a = this.sweeper).unref) === null || _b === void 0 ? void 0 : _b.call(_a);
      }
      /** Returns true if the lock is acquired; false if already held. */
      acquire(id) {
        const now = Date.now();
        const exp = this.locks.get(id);
        if (exp && exp > now)
          return false;
        this.locks.set(id, now + this.ttlMs);
        return true;
      }
      release(id) {
        this.locks.delete(id);
      }
      sweep() {
        const now = Date.now();
        for (const [k, v] of this.locks) {
          if (v <= now)
            this.locks.delete(k);
        }
      }
      dispose() {
        clearInterval(this.sweeper);
        this.locks.clear();
      }
    };
    function isStale(createTimeMs, windowMs = DEFAULT_STALE_MS) {
      if (!createTimeMs || !Number.isFinite(createTimeMs))
        return false;
      return Date.now() - createTimeMs > windowMs;
    }
    __name(isStale, "isStale");
    var SafetyPipeline = class {
      static {
        __name(this, "SafetyPipeline");
      }
      constructor(opts) {
        var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
        this.logger = opts.logger;
        this.onReject = opts.onReject;
        this.onMessage = opts.onMessage;
        this.staleWindow = (_b = (_a = opts.config) === null || _a === void 0 ? void 0 : _a.staleMessageWindowMs) !== null && _b !== void 0 ? _b : DEFAULT_STALE_MS;
        this.queueEnabled = (_e = (_d = (_c = opts.config) === null || _c === void 0 ? void 0 : _c.chatQueue) === null || _d === void 0 ? void 0 : _d.enabled) !== null && _e !== void 0 ? _e : true;
        this.seenCache = new SeenCache(opts.cache, {
          ttlMs: (_g = (_f = opts.config) === null || _f === void 0 ? void 0 : _f.dedup) === null || _g === void 0 ? void 0 : _g.ttl,
          maxMemEntries: (_j = (_h = opts.config) === null || _h === void 0 ? void 0 : _h.dedup) === null || _j === void 0 ? void 0 : _j.maxEntries,
          sweepMs: (_l = (_k = opts.config) === null || _k === void 0 ? void 0 : _k.dedup) === null || _l === void 0 ? void 0 : _l.sweepIntervalMs
        });
        this.lock = new ProcessingLock();
        this.policy = new PolicyGate(opts.policy, opts.botIdentity);
        this.manager = new ChatPipelineManager(resolveBatchConfig(opts.config));
      }
      // ─── tier 1: full pipeline for IM messages ─────────────
      pushMessage(msg) {
        var _a, _b, _c, _d, _e, _f, _g;
        return __awaiter(this, void 0, void 0, function* () {
          if (isStale(msg.createTime, this.staleWindow)) {
            (_b = (_a = this.logger).debug) === null || _b === void 0 ? void 0 : _b.call(_a, `safety: drop stale message ${msg.messageId}`);
            return;
          }
          if (yield this.seenCache.has(msg.messageId)) {
            (_d = (_c = this.logger).debug) === null || _d === void 0 ? void 0 : _d.call(_c, `safety: drop duplicate message ${msg.messageId}`);
            return;
          }
          const decision = this.policy.evaluate(msg);
          if (!decision.allowed) {
            this.onReject({
              messageId: msg.messageId,
              chatId: msg.chatId,
              senderId: msg.senderId,
              reason: (_e = decision.reason) !== null && _e !== void 0 ? _e : "group_not_allowed"
            });
            return;
          }
          if (!this.lock.acquire(msg.messageId)) {
            (_g = (_f = this.logger).debug) === null || _g === void 0 ? void 0 : _g.call(_f, `safety: drop in-flight message ${msg.messageId}`);
            return;
          }
          const dispatchHandler = /* @__PURE__ */ __name((batch) => __awaiter(this, void 0, void 0, function* () {
            var _h, _j;
            try {
              yield this.onMessage(batch.message);
            } catch (e) {
              (_j = (_h = this.logger).error) === null || _j === void 0 ? void 0 : _j.call(_h, `safety: message handler threw`, e);
            } finally {
              for (const id of batch.sourceIds) {
                try {
                  yield this.seenCache.add(id);
                } catch (_k) {
                }
                this.lock.release(id);
              }
            }
          }), "dispatchHandler");
          if (this.queueEnabled) {
            this.manager.push(msg.chatId, msg, dispatchHandler);
          } else {
            void dispatchHandler({ message: msg, sourceIds: [msg.messageId] });
          }
        });
      }
      // ─── tier 2: dedup + lock + queue for cardAction & comment ─────
      pushAction(eventId, queueScope, handler) {
        var _a, _b, _c, _d;
        return __awaiter(this, void 0, void 0, function* () {
          if (yield this.seenCache.has(eventId)) {
            (_b = (_a = this.logger).debug) === null || _b === void 0 ? void 0 : _b.call(_a, `safety: drop duplicate action ${eventId}`);
            return;
          }
          if (!this.lock.acquire(eventId)) {
            (_d = (_c = this.logger).debug) === null || _d === void 0 ? void 0 : _d.call(_c, `safety: drop in-flight action ${eventId}`);
            return;
          }
          const task = /* @__PURE__ */ __name(() => __awaiter(this, void 0, void 0, function* () {
            var _e, _f;
            try {
              yield handler();
            } catch (e) {
              (_f = (_e = this.logger).error) === null || _f === void 0 ? void 0 : _f.call(_e, `safety: action handler threw`, e);
            } finally {
              try {
                yield this.seenCache.add(eventId);
              } catch (_g) {
              }
              this.lock.release(eventId);
            }
          }), "task");
          if (this.queueEnabled) {
            yield this.manager.run(queueScope, task);
          } else {
            yield task();
          }
        });
      }
      // ─── tier 3: dedup only (reactions) ────────────────────
      pushLight(eventId, handler) {
        var _a, _b;
        return __awaiter(this, void 0, void 0, function* () {
          if (yield this.seenCache.has(eventId))
            return;
          yield this.seenCache.add(eventId);
          try {
            yield handler();
          } catch (e) {
            (_b = (_a = this.logger).warn) === null || _b === void 0 ? void 0 : _b.call(_a, `safety: light handler threw`, e);
          }
        });
      }
      // ─── runtime config ────────────────────────────────────
      updatePolicy(partial) {
        this.policy.updateConfig(partial);
      }
      getPolicy() {
        return this.policy.getConfig();
      }
      setBotIdentity(bot) {
        this.policy.setBotIdentity(bot);
      }
      dispose() {
        return __awaiter(this, void 0, void 0, function* () {
          yield this.manager.dispose();
          this.seenCache.dispose();
          this.lock.dispose();
        });
      }
    };
    function isMentionAll(m) {
      return m.key === "@_all";
    }
    __name(isMentionAll, "isMentionAll");
    function extractMentions(raw, botOpenId) {
      var _a, _b, _c;
      const mentions = /* @__PURE__ */ new Map();
      const mentionsByOpenId = /* @__PURE__ */ new Map();
      const mentionList = [];
      let mentionAll = false;
      let mentionedBot = false;
      for (const m of raw !== null && raw !== void 0 ? raw : []) {
        if (isMentionAll(m)) {
          mentionAll = true;
          mentions.set(m.key, { key: m.key, name: m.name, isBot: false });
          continue;
        }
        const openId = (_b = (_a = m.id) === null || _a === void 0 ? void 0 : _a.open_id) !== null && _b !== void 0 ? _b : "";
        const userId = (_c = m.id) === null || _c === void 0 ? void 0 : _c.user_id;
        const isBot = Boolean(botOpenId && openId === botOpenId);
        if (isBot)
          mentionedBot = true;
        const info = {
          key: m.key,
          openId: openId || void 0,
          userId,
          name: m.name,
          isBot
        };
        mentions.set(m.key, info);
        if (openId)
          mentionsByOpenId.set(openId, info);
        mentionList.push(info);
      }
      return { mentions, mentionsByOpenId, mentionList, mentionAll, mentionedBot };
    }
    __name(extractMentions, "extractMentions");
    function resolveMentions(content, ctx) {
      if (!content || ctx.mentions.size === 0)
        return content;
      let out = content;
      for (const [key, info] of ctx.mentions) {
        if (info.isBot && ctx.stripBotMentions) {
          const re = new RegExp(`\\s?${escapeRegex(key)}\\s?`, "g");
          out = out.replace(re, " ");
          continue;
        }
        const replacement = info.name ? `@${info.name}` : key;
        out = out.split(key).join(replacement);
      }
      return out.replace(/[ \t]{2,}/g, " ").trim();
    }
    __name(resolveMentions, "resolveMentions");
    function escapeRegex(s) {
      return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
    }
    __name(escapeRegex, "escapeRegex");
    function safeParse(raw) {
      if (!raw)
        return void 0;
      try {
        return JSON.parse(raw);
      } catch (_a) {
        return void 0;
      }
    }
    __name(safeParse, "safeParse");
    function applyStyle(text, style) {
      if (!style || style.length === 0)
        return text;
      let out = text;
      if (style.includes("bold"))
        out = `**${out}**`;
      if (style.includes("italic"))
        out = `*${out}*`;
      if (style.includes("underline"))
        out = `<u>${out}</u>`;
      if (style.includes("lineThrough") || style.includes("strikethrough"))
        out = `~~${out}~~`;
      if (style.includes("codeInline") || style.includes("code"))
        out = `\`${out}\``;
      return out;
    }
    __name(applyStyle, "applyStyle");
    var LOCALE_PRIORITY = ["zh_cn", "en_us", "ja_jp"];
    function unwrapLocale(parsed) {
      if ("title" in parsed || "content" in parsed) {
        return parsed;
      }
      for (const loc of LOCALE_PRIORITY) {
        const hit = parsed[loc];
        if (hit != null && typeof hit === "object")
          return hit;
      }
      const firstKey = Object.keys(parsed)[0];
      if (firstKey) {
        const first = parsed[firstKey];
        if (first != null && typeof first === "object")
          return first;
      }
      return void 0;
    }
    __name(unwrapLocale, "unwrapLocale");
    function formatDuration(ms) {
      if (ms == null || !Number.isFinite(ms) || ms < 0)
        return void 0;
      if (ms < 1e3)
        return `${Math.round(ms)}ms`;
      if (ms % 1e3 === 0)
        return `${ms / 1e3}s`;
      return `${(ms / 1e3).toFixed(1)}s`;
    }
    __name(formatDuration, "formatDuration");
    function millisToDatetime(ms) {
      if (ms == null)
        return void 0;
      const n = typeof ms === "string" ? parseInt(ms, 10) : ms;
      if (!Number.isFinite(n) || n <= 0)
        return void 0;
      const d = new Date(n + 8 * 36e5);
      const y = d.getUTCFullYear();
      const mo = String(d.getUTCMonth() + 1).padStart(2, "0");
      const day = String(d.getUTCDate()).padStart(2, "0");
      const h = String(d.getUTCHours()).padStart(2, "0");
      const mi = String(d.getUTCMinutes()).padStart(2, "0");
      return `${y}-${mo}-${day} ${h}:${mi}`;
    }
    __name(millisToDatetime, "millisToDatetime");
    function formatRFC3339Beijing(ms) {
      const d = new Date(ms + 8 * 36e5);
      const y = d.getUTCFullYear();
      const mo = String(d.getUTCMonth() + 1).padStart(2, "0");
      const day = String(d.getUTCDate()).padStart(2, "0");
      const h = String(d.getUTCHours()).padStart(2, "0");
      const mi = String(d.getUTCMinutes()).padStart(2, "0");
      const s = String(d.getUTCSeconds()).padStart(2, "0");
      return `${y}-${mo}-${day}T${h}:${mi}:${s}+08:00`;
    }
    __name(formatRFC3339Beijing, "formatRFC3339Beijing");
    function indentLines(text, indent) {
      return text.split("\n").map((line) => `${indent}${line}`).join("\n");
    }
    __name(indentLines, "indentLines");
    function escapeAttr(s) {
      return s.replace(/"/g, "&quot;");
    }
    __name(escapeAttr, "escapeAttr");
    var convertAudio = /* @__PURE__ */ __name((raw, _ctx) => __awaiter(void 0, void 0, void 0, function* () {
      const parsed = safeParse(raw);
      const fileKey = parsed === null || parsed === void 0 ? void 0 : parsed.file_key;
      if (!fileKey)
        return { content: "[audio]", resources: [] };
      const duration = parsed === null || parsed === void 0 ? void 0 : parsed.duration;
      const durAttr = formatDuration(duration);
      const attr = durAttr ? ` duration="${durAttr}"` : "";
      const content = `<audio key="${fileKey}"${attr}/>`;
      const resources = [
        { type: "audio", fileKey, durationMs: duration }
      ];
      return { content, resources };
    }), "convertAudio");
    function formatCalendarInner(raw) {
      const parsed = safeParse(raw);
      if (!parsed)
        return "[calendar event]";
      const lines = [];
      if (parsed.summary)
        lines.push(`\u{1F4C5} ${parsed.summary}`);
      const start = millisToDatetime(parsed.start_time);
      const end = millisToDatetime(parsed.end_time);
      if (start && end)
        lines.push(`\u{1F559} ${start} ~ ${end}`);
      else if (start)
        lines.push(`\u{1F559} ${start}`);
      return lines.length > 0 ? lines.join("\n") : "[calendar event]";
    }
    __name(formatCalendarInner, "formatCalendarInner");
    var convertCalendar = /* @__PURE__ */ __name((raw, _ctx) => __awaiter(void 0, void 0, void 0, function* () {
      return {
        content: `<calendar_invite>
${formatCalendarInner(raw)}
</calendar_invite>`,
        resources: []
      };
    }), "convertCalendar");
    var convertGeneralCalendar = /* @__PURE__ */ __name((raw, _ctx) => __awaiter(void 0, void 0, void 0, function* () {
      return {
        content: `<calendar>
${formatCalendarInner(raw)}
</calendar>`,
        resources: []
      };
    }), "convertGeneralCalendar");
    var convertShareCalendarEvent = /* @__PURE__ */ __name((raw, _ctx) => __awaiter(void 0, void 0, void 0, function* () {
      return {
        content: `<calendar_share>
${formatCalendarInner(raw)}
</calendar_share>`,
        resources: []
      };
    }), "convertShareCalendarEvent");
    var convertFile = /* @__PURE__ */ __name((raw, _ctx) => __awaiter(void 0, void 0, void 0, function* () {
      const parsed = safeParse(raw);
      const fileKey = parsed === null || parsed === void 0 ? void 0 : parsed.file_key;
      if (!fileKey)
        return { content: "[file]", resources: [] };
      const fileName = parsed === null || parsed === void 0 ? void 0 : parsed.file_name;
      const nameAttr = fileName ? ` name="${escapeAttr(fileName)}"` : "";
      const content = `<file key="${fileKey}"${nameAttr}/>`;
      const resources = [{ type: "file", fileKey, fileName }];
      return { content, resources };
    }), "convertFile");
    var convertFolder = /* @__PURE__ */ __name((raw, _ctx) => __awaiter(void 0, void 0, void 0, function* () {
      const parsed = safeParse(raw);
      const fileKey = parsed === null || parsed === void 0 ? void 0 : parsed.file_key;
      if (!fileKey)
        return { content: "[folder]", resources: [] };
      const nameAttr = (parsed === null || parsed === void 0 ? void 0 : parsed.file_name) ? ` name="${escapeAttr(parsed.file_name)}"` : "";
      return { content: `<folder key="${fileKey}"${nameAttr}/>`, resources: [] };
    }), "convertFolder");
    var convertHongbao = /* @__PURE__ */ __name((raw, _ctx) => __awaiter(void 0, void 0, void 0, function* () {
      const parsed = safeParse(raw);
      const textAttr = (parsed === null || parsed === void 0 ? void 0 : parsed.text) ? ` text="${escapeAttr(parsed.text)}"` : "";
      return { content: `<hongbao${textAttr}/>`, resources: [] };
    }), "convertHongbao");
    var convertImage = /* @__PURE__ */ __name((raw, _ctx) => __awaiter(void 0, void 0, void 0, function* () {
      const parsed = safeParse(raw);
      const imageKey = parsed === null || parsed === void 0 ? void 0 : parsed.image_key;
      if (!imageKey)
        return { content: "[image]", resources: [] };
      const resources = [{ type: "image", fileKey: imageKey }];
      return { content: `![image](${imageKey})`, resources };
    }), "convertImage");
    function walkCard(node) {
      const out = [];
      visit(node, out);
      return out.filter((s) => s && s.trim().length > 0);
    }
    __name(walkCard, "walkCard");
    function visit(node, out) {
      if (node == null)
        return;
      if (typeof node === "string" || typeof node === "number" || typeof node === "boolean")
        return;
      if (Array.isArray(node)) {
        for (const child of node)
          visit(child, out);
        return;
      }
      if (typeof node !== "object")
        return;
      const obj = node;
      const tag = obj.tag;
      if (typeof tag === "string" && (tag === "plain_text" || tag === "lark_md" || tag === "markdown")) {
        if (typeof obj.content === "string")
          out.push(obj.content);
        return;
      }
      if (obj.header && typeof obj.header === "object") {
        const header = obj.header;
        if (header.title)
          visit(header.title, out);
      }
      if (obj.text)
        visit(obj.text, out);
      if (typeof tag === "string" && tag === "button") {
        const text = obj.text;
        if (text)
          visit(text, out);
      }
      if (obj.label)
        visit(obj.label, out);
      if (obj.placeholder)
        visit(obj.placeholder, out);
      if (Array.isArray(obj.options)) {
        for (const opt of obj.options) {
          const o = opt;
          if (o === null || o === void 0 ? void 0 : o.text)
            visit(o.text, out);
        }
      }
      if (Array.isArray(obj.elements))
        for (const el of obj.elements)
          visit(el, out);
      if (Array.isArray(obj.fields))
        for (const f of obj.fields)
          visit(f, out);
      if (Array.isArray(obj.actions))
        for (const a of obj.actions)
          visit(a, out);
      if (Array.isArray(obj.columns))
        for (const c of obj.columns)
          visit(c, out);
      if (obj.body)
        visit(obj.body, out);
    }
    __name(visit, "visit");
    var convertInteractive = /* @__PURE__ */ __name((raw, _ctx) => __awaiter(void 0, void 0, void 0, function* () {
      const parsed = safeParse(raw);
      if (parsed == null || typeof parsed !== "object") {
        return { content: "[interactive card]", resources: [] };
      }
      const pieces = walkCard(parsed);
      if (pieces.length === 0) {
        return { content: "[interactive card]", resources: [] };
      }
      const seen = /* @__PURE__ */ new Set();
      const out = [];
      for (const p of pieces) {
        const key = p.trim();
        if (!key || seen.has(key))
          continue;
        seen.add(key);
        out.push(key);
      }
      return { content: out.join("\n"), resources: [] };
    }), "convertInteractive");
    var convertLocation = /* @__PURE__ */ __name((raw, _ctx) => __awaiter(void 0, void 0, void 0, function* () {
      const parsed = safeParse(raw);
      const name = parsed === null || parsed === void 0 ? void 0 : parsed.name;
      const lat = parsed === null || parsed === void 0 ? void 0 : parsed.latitude;
      const lng = parsed === null || parsed === void 0 ? void 0 : parsed.longitude;
      const nameAttr = name ? ` name="${escapeAttr(name)}"` : "";
      const coordsAttr = lat && lng ? ` coords="lat:${lat},lng:${lng}"` : "";
      return { content: `<location${nameAttr}${coordsAttr}/>`, resources: [] };
    }), "convertLocation");
    var MAX_ITEMS = 50;
    var convertMergeForward = /* @__PURE__ */ __name((_raw, ctx) => __awaiter(void 0, void 0, void 0, function* () {
      var _a;
      const { messageId, fetchSubMessages, dispatch } = ctx;
      if (!fetchSubMessages || !dispatch) {
        return { content: "<forwarded_messages/>", resources: [] };
      }
      let items;
      try {
        items = yield fetchSubMessages(messageId);
      } catch (_b) {
        return { content: "<forwarded_messages/>", resources: [] };
      }
      if (!items || items.length === 0) {
        return { content: "<forwarded_messages/>", resources: [] };
      }
      const capped = items.slice(0, MAX_ITEMS);
      const truncated = items.length > MAX_ITEMS;
      if (ctx.batchResolveNames) {
        const senderIds = /* @__PURE__ */ new Set();
        for (const it of capped) {
          const sid = (_a = it.sender) === null || _a === void 0 ? void 0 : _a.id;
          if (sid && it.message_id !== messageId)
            senderIds.add(sid);
        }
        if (senderIds.size > 0) {
          try {
            yield ctx.batchResolveNames([...senderIds]);
          } catch (_c) {
          }
        }
      }
      const childrenMap = buildChildrenMap(capped, messageId);
      const content = yield formatSubTree(messageId, childrenMap, ctx, truncated);
      return { content, resources: [] };
    }), "convertMergeForward");
    function buildChildrenMap(items, rootId) {
      var _a;
      const map = /* @__PURE__ */ new Map();
      for (const it of items) {
        if (it.message_id === rootId && !it.upper_message_id)
          continue;
        const pid = (_a = it.upper_message_id) !== null && _a !== void 0 ? _a : rootId;
        let arr = map.get(pid);
        if (!arr) {
          arr = [];
          map.set(pid, arr);
        }
        arr.push(it);
      }
      for (const arr of map.values()) {
        arr.sort((a, b) => {
          var _a2, _b;
          const ta = parseInt(String((_a2 = a.create_time) !== null && _a2 !== void 0 ? _a2 : "0"), 10);
          const tb = parseInt(String((_b = b.create_time) !== null && _b !== void 0 ? _b : "0"), 10);
          return ta - tb;
        });
      }
      return map;
    }
    __name(buildChildrenMap, "buildChildrenMap");
    function formatSubTree(parentId, map, ctx, truncated = false) {
      return __awaiter(this, void 0, void 0, function* () {
        const children = map.get(parentId);
        if (!children || children.length === 0)
          return "<forwarded_messages/>";
        const parts = [];
        for (const item of children) {
          try {
            const sub = yield renderItem(item, map, ctx);
            if (sub)
              parts.push(sub);
          } catch (_a) {
          }
        }
        if (parts.length === 0)
          return "<forwarded_messages/>";
        const body = parts.join("\n");
        const footer = truncated ? "\n... (truncated)" : "";
        return `<forwarded_messages>
${body}${footer}
</forwarded_messages>`;
      });
    }
    __name(formatSubTree, "formatSubTree");
    function renderItem(item, map, ctx) {
      var _a, _b, _c, _d, _e, _f, _g, _h;
      return __awaiter(this, void 0, void 0, function* () {
        const msgType = (_a = item.msg_type) !== null && _a !== void 0 ? _a : "text";
        const senderId = (_c = (_b = item.sender) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : "unknown";
        const createMs = parseInt(String((_d = item.create_time) !== null && _d !== void 0 ? _d : "0"), 10);
        const timestamp = createMs > 0 ? formatRFC3339Beijing(createMs) : "unknown";
        const displayName = (_f = (_e = ctx.resolveUserName) === null || _e === void 0 ? void 0 : _e.call(ctx, senderId)) !== null && _f !== void 0 ? _f : senderId;
        let content;
        if (msgType === "merge_forward") {
          const nestedId = item.message_id;
          content = nestedId ? yield formatSubTree(nestedId, map, ctx) : "<forwarded_messages/>";
        } else {
          const rawContent = (_h = (_g = item.body) === null || _g === void 0 ? void 0 : _g.content) !== null && _h !== void 0 ? _h : "{}";
          if (!ctx.dispatch) {
            content = rawContent;
          } else {
            const r = yield ctx.dispatch(rawContent, msgType, ctx);
            content = r.content;
          }
        }
        const indented = indentLines(content, "    ");
        return `[${timestamp}] ${displayName}:
${indented}`;
      });
    }
    __name(renderItem, "renderItem");
    var convertPost = /* @__PURE__ */ __name((raw, ctx) => __awaiter(void 0, void 0, void 0, function* () {
      var _a;
      const rawParsed = safeParse(raw);
      if (rawParsed == null || typeof rawParsed !== "object") {
        return { content: "[rich text message]", resources: [] };
      }
      const body = unwrapLocale(rawParsed);
      if (!body)
        return { content: "[rich text message]", resources: [] };
      const resources = [];
      const lines = [];
      if (body.title) {
        lines.push(`**${body.title}**`);
        lines.push("");
      }
      for (const paragraph of (_a = body.content) !== null && _a !== void 0 ? _a : []) {
        if (!Array.isArray(paragraph))
          continue;
        let line = "";
        for (const el of paragraph) {
          line += renderElement(el, ctx, resources);
        }
        lines.push(line);
      }
      const content = lines.join("\n").trim() || "[rich text message]";
      return { content, resources };
    }), "convertPost");
    function renderElement(el, ctx, resources) {
      var _a, _b, _c, _d, _e, _f, _g;
      switch (el.tag) {
        case "text":
          return applyStyle((_a = el.text) !== null && _a !== void 0 ? _a : "", el.style);
        case "a": {
          const label = (_c = (_b = el.text) !== null && _b !== void 0 ? _b : el.href) !== null && _c !== void 0 ? _c : "";
          return el.href ? `[${label}](${el.href})` : label;
        }
        case "at": {
          const userId = (_d = el.user_id) !== null && _d !== void 0 ? _d : "";
          if (userId === "all" || userId === "all_members")
            return "@all";
          const info = ctx.mentionsByOpenId.get(userId);
          if (info)
            return info.key;
          return el.user_name ? `@${el.user_name}` : `@${userId}`;
        }
        case "img": {
          if (el.image_key) {
            resources.push({ type: "image", fileKey: el.image_key });
            return `![image](${el.image_key})`;
          }
          return "";
        }
        case "media": {
          if (el.file_key) {
            resources.push({ type: "file", fileKey: el.file_key });
            return `<file key="${el.file_key}"/>`;
          }
          return "";
        }
        case "code_block": {
          const lang = (_e = el.language) !== null && _e !== void 0 ? _e : "";
          const code = (_f = el.text) !== null && _f !== void 0 ? _f : "";
          return `
\`\`\`${lang}
${code}
\`\`\`
`;
        }
        case "hr":
          return "\n---\n";
        default:
          return (_g = el.text) !== null && _g !== void 0 ? _g : "";
      }
    }
    __name(renderElement, "renderElement");
    var convertShareChat = /* @__PURE__ */ __name((raw, _ctx) => __awaiter(void 0, void 0, void 0, function* () {
      var _a;
      const parsed = safeParse(raw);
      return {
        content: `<group_card id="${(_a = parsed === null || parsed === void 0 ? void 0 : parsed.chat_id) !== null && _a !== void 0 ? _a : ""}"/>`,
        resources: []
      };
    }), "convertShareChat");
    var convertShareUser = /* @__PURE__ */ __name((raw, _ctx) => __awaiter(void 0, void 0, void 0, function* () {
      var _b;
      const parsed = safeParse(raw);
      return {
        content: `<contact_card id="${(_b = parsed === null || parsed === void 0 ? void 0 : parsed.user_id) !== null && _b !== void 0 ? _b : ""}"/>`,
        resources: []
      };
    }), "convertShareUser");
    var convertSticker = /* @__PURE__ */ __name((raw, _ctx) => __awaiter(void 0, void 0, void 0, function* () {
      const parsed = safeParse(raw);
      const fileKey = parsed === null || parsed === void 0 ? void 0 : parsed.file_key;
      if (!fileKey)
        return { content: "[sticker]", resources: [] };
      const resources = [{ type: "sticker", fileKey }];
      return { content: `<sticker key="${fileKey}"/>`, resources };
    }), "convertSticker");
    var convertSystem = /* @__PURE__ */ __name((raw, _ctx) => __awaiter(void 0, void 0, void 0, function* () {
      const parsed = safeParse(raw);
      if (!parsed || !parsed.template) {
        return { content: "[system message]", resources: [] };
      }
      const out = parsed.template.replace(/\{([a-z_]+)\}/g, (match, name) => {
        const val = parsed[name];
        if (Array.isArray(val))
          return val.join(", ");
        if (typeof val === "string")
          return val;
        if (val == null)
          return "";
        return match;
      });
      return { content: out.trim() || "[system message]", resources: [] };
    }), "convertSystem");
    var convertText = /* @__PURE__ */ __name((raw, _ctx) => __awaiter(void 0, void 0, void 0, function* () {
      var _a;
      const parsed = safeParse(raw);
      return { content: (_a = parsed === null || parsed === void 0 ? void 0 : parsed.text) !== null && _a !== void 0 ? _a : "", resources: [] };
    }), "convertText");
    var convertTodo = /* @__PURE__ */ __name((raw, _ctx) => __awaiter(void 0, void 0, void 0, function* () {
      const parsed = safeParse(raw);
      if (!(parsed === null || parsed === void 0 ? void 0 : parsed.summary))
        return { content: "<todo>\n[todo]\n</todo>", resources: [] };
      const lines = [];
      if (parsed.summary.title)
        lines.push(parsed.summary.title);
      const bodyText = extractPostPlainText(parsed.summary.content);
      if (bodyText)
        lines.push(bodyText);
      const due = millisToDatetime(parsed.due_time);
      if (due)
        lines.push(`Due: ${due}`);
      if (lines.length === 0)
        return { content: "<todo>\n[todo]\n</todo>", resources: [] };
      return { content: `<todo>
${lines.join("\n")}
</todo>`, resources: [] };
    }), "convertTodo");
    function extractPostPlainText(blocks) {
      if (!blocks)
        return "";
      const lines = [];
      for (const paragraph of blocks) {
        if (!Array.isArray(paragraph))
          continue;
        const parts = [];
        for (const el of paragraph) {
          if (el.tag === "text" && el.text)
            parts.push(el.text);
          else if (el.tag === "a" && el.text)
            parts.push(el.text);
        }
        if (parts.length > 0)
          lines.push(parts.join(""));
      }
      return lines.join("\n");
    }
    __name(extractPostPlainText, "extractPostPlainText");
    var convertUnknown = /* @__PURE__ */ __name((raw, _ctx) => __awaiter(void 0, void 0, void 0, function* () {
      const parsed = safeParse(raw);
      if (parsed && typeof parsed.text === "string") {
        return { content: parsed.text, resources: [] };
      }
      return { content: "[unsupported message]", resources: [] };
    }), "convertUnknown");
    var convertVideo = /* @__PURE__ */ __name((raw, _ctx) => __awaiter(void 0, void 0, void 0, function* () {
      const parsed = safeParse(raw);
      const fileKey = parsed === null || parsed === void 0 ? void 0 : parsed.file_key;
      if (!fileKey)
        return { content: "[video]", resources: [] };
      const nameAttr = (parsed === null || parsed === void 0 ? void 0 : parsed.file_name) ? ` name="${escapeAttr(parsed.file_name)}"` : "";
      const durStr = formatDuration(parsed === null || parsed === void 0 ? void 0 : parsed.duration);
      const durAttr = durStr ? ` duration="${durStr}"` : "";
      const content = `<video key="${fileKey}"${nameAttr}${durAttr}/>`;
      const resources = [
        {
          type: "video",
          fileKey,
          fileName: parsed === null || parsed === void 0 ? void 0 : parsed.file_name,
          durationMs: parsed === null || parsed === void 0 ? void 0 : parsed.duration,
          coverImageKey: parsed === null || parsed === void 0 ? void 0 : parsed.image_key
        }
      ];
      return { content, resources };
    }), "convertVideo");
    var convertVideoChat = /* @__PURE__ */ __name((raw, _ctx) => __awaiter(void 0, void 0, void 0, function* () {
      const parsed = safeParse(raw);
      if (!parsed) {
        return { content: "<meeting>\n[video chat]\n</meeting>", resources: [] };
      }
      const lines = [];
      if (parsed.topic)
        lines.push(`\u{1F4F9} ${parsed.topic}`);
      const start = millisToDatetime(parsed.start_time);
      if (start)
        lines.push(`\u{1F559} ${start}`);
      const inner = lines.length > 0 ? lines.join("\n") : "[video chat]";
      return { content: `<meeting>
${inner}
</meeting>`, resources: [] };
    }), "convertVideoChat");
    var convertVote = /* @__PURE__ */ __name((raw, _ctx) => __awaiter(void 0, void 0, void 0, function* () {
      var _a, _b;
      const parsed = safeParse(raw);
      if (!parsed || !parsed.topic && !((_a = parsed.options) === null || _a === void 0 ? void 0 : _a.length)) {
        return { content: "<vote>\n[vote]\n</vote>", resources: [] };
      }
      const lines = [];
      if (parsed.topic)
        lines.push(parsed.topic);
      for (const opt of (_b = parsed.options) !== null && _b !== void 0 ? _b : [])
        lines.push(`\u2022 ${opt}`);
      return { content: `<vote>
${lines.join("\n")}
</vote>`, resources: [] };
    }), "convertVote");
    var converters = /* @__PURE__ */ new Map([
      ["text", convertText],
      ["post", convertPost],
      ["image", convertImage],
      ["file", convertFile],
      ["audio", convertAudio],
      ["video", convertVideo],
      ["media", convertVideo],
      ["sticker", convertSticker],
      ["interactive", convertInteractive],
      ["merge_forward", convertMergeForward],
      ["share_chat", convertShareChat],
      ["share_user", convertShareUser],
      ["location", convertLocation],
      ["system", convertSystem],
      ["vote", convertVote],
      ["todo", convertTodo],
      ["calendar", convertCalendar],
      ["general_calendar", convertGeneralCalendar],
      ["share_calendar_event", convertShareCalendarEvent],
      ["folder", convertFolder],
      ["hongbao", convertHongbao],
      ["video_chat", convertVideoChat]
    ]);
    function dispatchConvert(raw, msgType, ctx) {
      var _a;
      return __awaiter(this, void 0, void 0, function* () {
        const fn = (_a = converters.get(msgType)) !== null && _a !== void 0 ? _a : convertUnknown;
        try {
          return yield fn(raw, ctx);
        } catch (_b) {
          return convertUnknown(raw);
        }
      });
    }
    __name(dispatchConvert, "dispatchConvert");
    function normalizeCardAction(event, opts) {
      var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
      const messageId = (_b = (_a = event.context) === null || _a === void 0 ? void 0 : _a.open_message_id) !== null && _b !== void 0 ? _b : event.open_message_id;
      const chatId = (_d = (_c = event.context) === null || _c === void 0 ? void 0 : _c.open_chat_id) !== null && _d !== void 0 ? _d : event.open_chat_id;
      const operatorOpenId = (_e = event.operator) === null || _e === void 0 ? void 0 : _e.open_id;
      if (!messageId || !chatId || !operatorOpenId)
        return null;
      return {
        messageId,
        chatId,
        operator: {
          openId: operatorOpenId,
          userId: (_f = event.operator) === null || _f === void 0 ? void 0 : _f.user_id,
          name: (_g = event.operator) === null || _g === void 0 ? void 0 : _g.name
        },
        action: {
          value: (_h = event.action) === null || _h === void 0 ? void 0 : _h.value,
          tag: (_k = (_j = event.action) === null || _j === void 0 ? void 0 : _j.tag) !== null && _k !== void 0 ? _k : "unknown",
          name: (_l = event.action) === null || _l === void 0 ? void 0 : _l.name,
          option: (_m = event.action) === null || _m === void 0 ? void 0 : _m.option
        },
        raw: (opts === null || opts === void 0 ? void 0 : opts.includeRaw) ? event : void 0
      };
    }
    __name(normalizeCardAction, "normalizeCardAction");
    function normalizeReaction(event, action, opts) {
      var _a, _b, _c, _d;
      const messageId = event.message_id;
      const emojiType = (_a = event.reaction_type) === null || _a === void 0 ? void 0 : _a.emoji_type;
      const operatorOpenId = (_b = event.user_id) === null || _b === void 0 ? void 0 : _b.open_id;
      if (!messageId || !emojiType || !operatorOpenId)
        return null;
      const actionTimeStr = event.action_time;
      const actionTime = actionTimeStr ? parseInt(actionTimeStr, 10) : void 0;
      return {
        messageId,
        operator: {
          openId: operatorOpenId,
          userId: (_d = (_c = event.user_id) === null || _c === void 0 ? void 0 : _c.user_id) !== null && _d !== void 0 ? _d : void 0
        },
        emojiType,
        action,
        actionTime: actionTime != null && Number.isFinite(actionTime) ? actionTime : void 0,
        raw: (opts === null || opts === void 0 ? void 0 : opts.includeRaw) ? event : void 0
      };
    }
    __name(normalizeReaction, "normalizeReaction");
    function normalizeBotAdded(event, opts) {
      var _a, _b, _c, _d, _e, _f, _g, _h, _j;
      const chatId = event.chat_id;
      const operatorOpenId = (_a = event.operator_id) === null || _a === void 0 ? void 0 : _a.open_id;
      if (!chatId || !operatorOpenId)
        return null;
      const botName = (_f = (_d = (_b = event.name) !== null && _b !== void 0 ? _b : (_c = event.i18n_names) === null || _c === void 0 ? void 0 : _c.zh_cn) !== null && _d !== void 0 ? _d : (_e = event.i18n_names) === null || _e === void 0 ? void 0 : _e.en_us) !== null && _f !== void 0 ? _f : (_g = event.i18n_names) === null || _g === void 0 ? void 0 : _g.ja_jp;
      return {
        chatId,
        operator: {
          openId: operatorOpenId,
          userId: (_j = (_h = event.operator_id) === null || _h === void 0 ? void 0 : _h.user_id) !== null && _j !== void 0 ? _j : void 0
        },
        botName,
        external: event.external,
        raw: (opts === null || opts === void 0 ? void 0 : opts.includeRaw) ? event : void 0
      };
    }
    __name(normalizeBotAdded, "normalizeBotAdded");
    function normalizeComment(event, opts) {
      var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
      const fileToken = (_a = event.file_token) !== null && _a !== void 0 ? _a : (_b = event.notice_meta) === null || _b === void 0 ? void 0 : _b.file_token;
      const fileType = (_c = event.file_type) !== null && _c !== void 0 ? _c : (_d = event.notice_meta) === null || _d === void 0 ? void 0 : _d.file_type;
      const commentId = event.comment_id;
      const userId = (_f = (_e = event.notice_meta) === null || _e === void 0 ? void 0 : _e.from_user_id) !== null && _f !== void 0 ? _f : event.user_id;
      const operatorOpenId = userId === null || userId === void 0 ? void 0 : userId.open_id;
      if (!fileToken || !fileType || !commentId || !operatorOpenId)
        return null;
      const tsStr = (_j = (_g = event.create_time) !== null && _g !== void 0 ? _g : (_h = event.notice_meta) === null || _h === void 0 ? void 0 : _h.timestamp) !== null && _j !== void 0 ? _j : event.action_time;
      const timestamp = tsStr ? parseInt(tsStr, 10) : Date.now();
      return {
        fileToken,
        fileType,
        commentId,
        replyId: event.reply_id,
        operator: {
          openId: operatorOpenId,
          userId: (_k = userId === null || userId === void 0 ? void 0 : userId.user_id) !== null && _k !== void 0 ? _k : void 0,
          unionId: userId === null || userId === void 0 ? void 0 : userId.union_id
        },
        mentionedBot: Boolean((_o = (_l = event.is_mentioned) !== null && _l !== void 0 ? _l : (_m = event.notice_meta) === null || _m === void 0 ? void 0 : _m.is_mentioned) !== null && _o !== void 0 ? _o : event.is_mention),
        timestamp: Number.isFinite(timestamp) ? timestamp : Date.now(),
        raw: (opts === null || opts === void 0 ? void 0 : opts.includeRaw) ? event : void 0
      };
    }
    __name(normalizeComment, "normalizeComment");
    function normalize(event, opts) {
      var _a, _b, _c, _d, _e;
      return __awaiter(this, void 0, void 0, function* () {
        const msg = event.message;
        const botOpenId = (_a = opts.botIdentity) === null || _a === void 0 ? void 0 : _a.openId;
        const { mentions, mentionsByOpenId, mentionList, mentionAll: mentionAllFromRaw, mentionedBot } = extractMentions(msg.mentions, botOpenId);
        const mentionAll = mentionAllFromRaw || detectMentionAllInContent(msg.content);
        const ctx = {
          messageId: msg.message_id,
          botOpenId,
          mentions,
          mentionsByOpenId,
          stripBotMentions: (_b = opts.stripBotMentions) !== null && _b !== void 0 ? _b : true,
          fetchSubMessages: opts.fetchSubMessages,
          resolveUserName: opts.resolveUserName,
          batchResolveNames: opts.batchResolveNames,
          dispatch: dispatchConvert
        };
        const { content: rawContent, resources } = yield dispatchConvert(msg.content, msg.message_type, ctx);
        const content = resolveMentions(rawContent, ctx);
        const senderOpenId = event.sender.sender_id.open_id;
        const senderFallbackId = (_d = (_c = event.sender.sender_id.user_id) !== null && _c !== void 0 ? _c : event.sender.sender_id.union_id) !== null && _d !== void 0 ? _d : "";
        const senderId = senderOpenId !== null && senderOpenId !== void 0 ? senderOpenId : senderFallbackId;
        const senderName = senderOpenId ? (_e = opts.resolveSenderName) === null || _e === void 0 ? void 0 : _e.call(opts, senderOpenId) : void 0;
        const createMs = msg.create_time ? parseInt(msg.create_time, 10) : 0;
        return {
          messageId: msg.message_id,
          chatId: msg.chat_id,
          chatType: msg.chat_type,
          senderId,
          senderName,
          content,
          rawContentType: msg.message_type,
          resources,
          mentions: mentionList,
          mentionAll,
          mentionedBot,
          rootId: msg.root_id,
          threadId: msg.thread_id,
          replyToMessageId: msg.parent_id,
          createTime: Number.isFinite(createMs) ? createMs : 0,
          raw: opts.includeRaw ? event : void 0
        };
      });
    }
    __name(normalize, "normalize");
    function detectMentionAllInContent(content) {
      if (!content)
        return false;
      return /@_all\b/.test(content);
    }
    __name(detectMentionAllInContent, "detectMentionAllInContent");
    var LarkChannel = class {
      static {
        __name(this, "LarkChannel");
      }
      constructor(opts) {
        var _a, _b, _c, _d, _e, _f, _g;
        this.handlers = {};
        this.connected = false;
        this.opts = opts;
        this.logger = new LoggerProxy((_a = opts.loggerLevel) !== null && _a !== void 0 ? _a : exports.LoggerLevel.info, (_b = opts.logger) !== null && _b !== void 0 ? _b : defaultLogger);
        this.rawClient = new Client({
          appId: opts.appId,
          appSecret: opts.appSecret,
          domain: (_c = opts.domain) !== null && _c !== void 0 ? _c : exports.Domain.Feishu,
          cache: opts.cache,
          httpInstance: opts.httpInstance,
          logger: opts.logger,
          loggerLevel: opts.loggerLevel,
          source: opts.source,
          extraUaTags: ["channel"]
        });
        this.dispatcher = new EventDispatcher2({
          verificationToken: (_d = opts.webhook) === null || _d === void 0 ? void 0 : _d.verificationToken,
          encryptKey: (_e = opts.webhook) === null || _e === void 0 ? void 0 : _e.encryptKey,
          cache: opts.cache,
          logger: opts.logger,
          loggerLevel: opts.loggerLevel
        });
        this.sender = new OutboundSender(this.rawClient, (_f = opts.outbound) !== null && _f !== void 0 ? _f : {}, this.logger);
        this.safety = new SafetyPipeline({
          config: opts.safety,
          policy: opts.policy,
          cache: (_g = opts.cache) !== null && _g !== void 0 ? _g : internalCache,
          logger: this.logger,
          onReject: /* @__PURE__ */ __name((evt) => {
            var _a2, _b2;
            (_b2 = (_a2 = this.handlers).reject) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, evt);
          }, "onReject"),
          onMessage: /* @__PURE__ */ __name((merged) => __awaiter(this, void 0, void 0, function* () {
            const handler = this.handlers.message;
            if (handler)
              yield handler(merged);
          }), "onMessage")
        });
      }
      // ─── lifecycle ──────────────────────────────────────────
      connect() {
        return __awaiter(this, void 0, void 0, function* () {
          if (this.connectPromise)
            return this.connectPromise;
          this.connectPromise = this.doConnect().catch((err) => {
            this.connectPromise = void 0;
            throw err;
          });
          return this.connectPromise;
        });
      }
      doConnect() {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
          this.botIdentity = yield this.fetchBotIdentity();
          this.safety.setBotIdentity(this.botIdentity);
          this.registerDispatcherHandlers();
          const transport = (_a = this.opts.transport) !== null && _a !== void 0 ? _a : "websocket";
          if (transport === "websocket") {
            yield this.connectWebSocket(15e3);
          }
          this.connected = true;
        });
      }
      /**
       * Construct the underlying WSClient and wait for its `onReady` callback —
       * so `connect()` only resolves after the first WebSocket handshake
       * actually succeeds. Rejects on `onError` or if the handshake doesn't
       * complete within `timeoutMs`.
       *
       * Also wires `onReconnecting` / `onReconnected` callbacks to emit the
       * corresponding public events.
       */
      connectWebSocket(timeoutMs) {
        return new Promise((resolve, reject) => {
          var _a;
          let settled = false;
          const timer = setTimeout(() => {
            if (settled)
              return;
            settled = true;
            reject(new LarkChannelError("not_connected", `WebSocket handshake did not complete within ${timeoutMs}ms`));
          }, timeoutMs);
          this.rawWsClient = new WSClient2({
            appId: this.opts.appId,
            appSecret: this.opts.appSecret,
            domain: (_a = this.opts.domain) !== null && _a !== void 0 ? _a : exports.Domain.Feishu,
            logger: this.opts.logger,
            loggerLevel: this.opts.loggerLevel,
            httpInstance: this.opts.httpInstance,
            autoReconnect: true,
            source: this.opts.source,
            extraUaTags: ["channel"],
            agent: this.opts.agent,
            wsConfig: this.opts.wsConfig,
            handshakeTimeoutMs: this.opts.handshakeTimeoutMs,
            onReady: /* @__PURE__ */ __name(() => {
              if (settled)
                return;
              settled = true;
              clearTimeout(timer);
              resolve();
            }, "onReady"),
            onError: /* @__PURE__ */ __name((err) => {
              if (settled)
                return;
              settled = true;
              clearTimeout(timer);
              reject(new LarkChannelError("not_connected", `WebSocket connect failed: ${err.message}`, { cause: err }));
            }, "onError"),
            onReconnecting: /* @__PURE__ */ __name(() => {
              var _a2, _b;
              return (_b = (_a2 = this.handlers).reconnecting) === null || _b === void 0 ? void 0 : _b.call(_a2);
            }, "onReconnecting"),
            onReconnected: /* @__PURE__ */ __name(() => {
              var _a2, _b;
              return (_b = (_a2 = this.handlers).reconnected) === null || _b === void 0 ? void 0 : _b.call(_a2);
            }, "onReconnected")
          });
          this.rawWsClient.start({ eventDispatcher: this.dispatcher });
        });
      }
      disconnect() {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
          if (!this.connected)
            return;
          try {
            (_a = this.rawWsClient) === null || _a === void 0 ? void 0 : _a.close({});
          } catch (_b) {
          }
          try {
            yield this.safety.dispose();
          } catch (_c) {
          }
          this.connected = false;
          this.connectPromise = void 0;
        });
      }
      /**
       * Snapshot of the WebSocket lifecycle (state, last/next connect times,
       * current reconnect attempts). Returns `undefined` when the channel
       * hasn't initialized a WSClient yet (e.g., before `connect()` is called
       * or under the webhook transport).
       */
      getConnectionStatus() {
        var _a;
        return (_a = this.rawWsClient) === null || _a === void 0 ? void 0 : _a.getConnectionStatus();
      }
      on(nameOrMap, handler) {
        if (typeof nameOrMap === "string") {
          return this.attachSingle(nameOrMap, handler);
        }
        const unsubs = [];
        Object.keys(nameOrMap).forEach((k) => {
          const fn = nameOrMap[k];
          if (fn)
            unsubs.push(this.attachSingle(k, fn));
        });
        return () => unsubs.forEach((u) => u());
      }
      attachSingle(name, handler) {
        if (this.handlers[name]) {
          this.logger.warn(`channel: handler for "${name}" is being overwritten`);
        }
        this.handlers[name] = handler;
        return () => {
          if (this.handlers[name] === handler)
            delete this.handlers[name];
        };
      }
      // ─── outbound ──────────────────────────────────────────
      send(to, input, opts) {
        return __awaiter(this, void 0, void 0, function* () {
          return this.sender.send(to, input, opts);
        });
      }
      stream(to, input, opts) {
        return __awaiter(this, void 0, void 0, function* () {
          return this.sender.stream(to, input, opts);
        });
      }
      // ─── low-level ─────────────────────────────────────────
      updateCard(messageId, card) {
        return __awaiter(this, void 0, void 0, function* () {
          yield this.sender.patchCard(messageId, card);
        });
      }
      /**
       * Edit an already-sent message's text/post content. Uses `im.v1.message.update`
       * which (per Feishu docs) only supports editing text and rich-text (post)
       * messages. For cards, use {@link updateCard} instead — a wrong attempt to
       * use this on a card would hit the same API and fail with a clearer
       * Feishu-side error.
       */
      editMessage(messageId, text) {
        return __awaiter(this, void 0, void 0, function* () {
          yield this.rawClient.im.v1.message.update({
            path: { message_id: messageId },
            data: {
              msg_type: "text",
              content: JSON.stringify({ text })
            }
          });
        });
      }
      recallMessage(messageId) {
        return __awaiter(this, void 0, void 0, function* () {
          yield this.rawClient.im.v1.message.delete({
            path: { message_id: messageId }
          });
        });
      }
      /**
       * Add an emoji reaction to a message. Returns the `reaction_id` Feishu
       * assigned — stash it if you want to {@link removeReaction} later,
       * since the raw `im.message.reaction.*_v1` events don't carry the id.
       * Only the bot's own reactions can be removed.
       */
      addReaction(messageId, emojiType) {
        var _a, _b;
        return __awaiter(this, void 0, void 0, function* () {
          const r = yield this.rawClient.im.v1.messageReaction.create({
            path: { message_id: messageId },
            data: { reaction_type: { emoji_type: emojiType } }
          });
          const rid = (_b = (_a = r === null || r === void 0 ? void 0 : r.data) === null || _a === void 0 ? void 0 : _a.reaction_id) !== null && _b !== void 0 ? _b : r === null || r === void 0 ? void 0 : r.reaction_id;
          if (!rid) {
            throw new LarkChannelError("unknown", "messageReaction.create returned no reaction_id");
          }
          return rid;
        });
      }
      /**
       * Remove a reaction by its `reaction_id` (the value returned from
       * {@link addReaction}). Only the bot's own reactions can be removed —
       * removing a user-added reaction will fail with a Feishu permission
       * error.
       */
      removeReaction(messageId, reactionId) {
        return __awaiter(this, void 0, void 0, function* () {
          yield this.rawClient.im.v1.messageReaction.delete({
            path: { message_id: messageId, reaction_id: reactionId }
          });
        });
      }
      /**
       * Convenience: remove the bot's reaction on `messageId` matching
       * `emojiType`, without needing the `reaction_id`. Lists the message's
       * reactions filtered by emoji, picks the one added by this bot
       * (operator_type === 'app'), and deletes it. Returns `true` if a
       * matching reaction was found and deleted, `false` otherwise (including
       * the case where the bot never added that emoji).
       */
      removeReactionByEmoji(messageId, emojiType) {
        var _a, _b;
        return __awaiter(this, void 0, void 0, function* () {
          const r = yield this.rawClient.im.v1.messageReaction.list({
            path: { message_id: messageId },
            params: { reaction_type: emojiType, page_size: 50 }
          });
          const items = (_b = (_a = r === null || r === void 0 ? void 0 : r.data) === null || _a === void 0 ? void 0 : _a.items) !== null && _b !== void 0 ? _b : [];
          const mine = items.find((it) => {
            var _a2;
            return ((_a2 = it.operator) === null || _a2 === void 0 ? void 0 : _a2.operator_type) === "app";
          });
          if (!(mine === null || mine === void 0 ? void 0 : mine.reaction_id))
            return false;
          yield this.removeReaction(messageId, mine.reaction_id);
          return true;
        });
      }
      downloadResource(fileKey, type) {
        return __awaiter(this, void 0, void 0, function* () {
          if (type === "image") {
            const r2 = yield this.rawClient.im.v1.image.get({
              path: { image_key: fileKey }
            });
            return yield bufferFromStream(r2);
          }
          const r = yield this.rawClient.im.v1.file.get({
            path: { file_key: fileKey }
          });
          return yield bufferFromStream(r);
        });
      }
      getChatInfo(chatId) {
        var _a, _b;
        return __awaiter(this, void 0, void 0, function* () {
          const r = yield this.rawClient.im.v1.chat.get({
            path: { chat_id: chatId }
          });
          const d = (_a = r.data) !== null && _a !== void 0 ? _a : {};
          return {
            chatId,
            name: d.name,
            description: d.description,
            chatType: (_b = d.chat_mode) !== null && _b !== void 0 ? _b : "group",
            ownerId: d.owner_id,
            memberCount: d.user_count
          };
        });
      }
      /**
       * Fetch the chat's mode via `im.v1.chat.get`. Returns one of:
       *   - 'p2p'   — 单聊
       *   - 'group' — 普通群
       *   - 'topic' — 话题群
       *
       * Unknown / missing values fall back to 'group' for consistency with
       * {@link getChatInfo}. The underlying API call is not cached — chat
       * mode rarely changes within a chat's lifetime, so callers that read
       * this on every inbound message should keep their own cache keyed by
       * `chatId`.
       *
       * Throws on API failure (network, permission, invalid chatId) so the
       * caller can decide how to handle it; silently defaulting would hide
       * real problems.
       */
      getChatMode(chatId) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
          const r = yield this.rawClient.im.v1.chat.get({
            path: { chat_id: chatId }
          });
          const mode = (_a = r.data) === null || _a === void 0 ? void 0 : _a.chat_mode;
          if (mode === "p2p")
            return "p2p";
          if (mode === "topic")
            return "topic";
          return "group";
        });
      }
      // ─── runtime config ────────────────────────────────────
      updatePolicy(partial) {
        this.safety.updatePolicy(partial);
      }
      getPolicy() {
        return this.safety.getPolicy();
      }
      // ─── internals: bot identity & dispatch wiring ────────
      fetchBotIdentity() {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
          let lastError;
          try {
            const r = yield this.rawClient.request({
              url: "/open-apis/bot/v3/info",
              method: "GET"
            });
            const bot = r.bot;
            if (bot === null || bot === void 0 ? void 0 : bot.open_id) {
              return { openId: bot.open_id, name: (_a = bot.app_name) !== null && _a !== void 0 ? _a : "bot" };
            }
            lastError = new Error(`bot/v3/info response missing open_id: ${JSON.stringify(r).slice(0, 200)}`);
          } catch (e) {
            lastError = e;
          }
          const classified = classifyError(lastError);
          const code = classified.code === "unknown" ? "not_connected" : classified.code;
          throw new LarkChannelError(code, "could not resolve bot identity via /open-apis/bot/v3/info \u2014 required for channel to function", { cause: lastError });
        });
      }
      registerDispatcherHandlers() {
        var _a, _b;
        const fetchSubMessages = /* @__PURE__ */ __name((mid) => __awaiter(this, void 0, void 0, function* () {
          var _c, _d, _e, _f;
          try {
            const r = yield this.rawClient.im.v1.message.get({
              path: { message_id: mid }
            });
            const items = (_d = (_c = r.data) === null || _c === void 0 ? void 0 : _c.items) !== null && _d !== void 0 ? _d : [];
            return items;
          } catch (e) {
            (_f = (_e = this.logger).warn) === null || _f === void 0 ? void 0 : _f.call(_e, "channel: fetchSubMessages failed", e);
            return [];
          }
        }), "fetchSubMessages");
        const includeRaw = (_b = (_a = this.opts.includeRawEvent) !== null && _a !== void 0 ? _a : this.opts.includeRawInMessage) !== null && _b !== void 0 ? _b : false;
        const normalizeOpts = {
          botIdentity: this.botIdentity,
          stripBotMentions: true,
          includeRaw,
          fetchSubMessages
        };
        this.dispatcher.register({
          // IM message — full safety pipeline
          "im.message.receive_v1": /* @__PURE__ */ __name((raw) => __awaiter(this, void 0, void 0, function* () {
            try {
              const msg = yield normalize(raw, normalizeOpts);
              yield this.safety.pushMessage(msg);
            } catch (e) {
              this.emitError(e);
            }
          }), "im.message.receive_v1"),
          // Card button click — dedup + lock + queue (by chatId).
          // The key includes the action's identity (tag + value) so that
          // different buttons on the same card by the same user are NOT
          // collapsed by the dedup cache. A genuine Feishu re-delivery
          // of the same click still hashes to the same key.
          "card.action.trigger": /* @__PURE__ */ __name((raw) => __awaiter(this, void 0, void 0, function* () {
            const evt = normalizeCardAction(raw, { includeRaw });
            if (!evt)
              return;
            const actionId = cardActionId(evt.action);
            yield this.safety.pushAction(`card:${evt.messageId}:${evt.operator.openId}:${actionId}`, evt.chatId, () => __awaiter(this, void 0, void 0, function* () {
              const h = this.handlers.cardAction;
              if (h)
                yield h(evt);
            }));
          }), "card.action.trigger"),
          // Reactions — dedup only
          "im.message.reaction.created_v1": /* @__PURE__ */ __name((raw) => __awaiter(this, void 0, void 0, function* () {
            const evt = normalizeReaction(raw, "added", { includeRaw });
            if (!evt)
              return;
            const key = reactionKey(evt);
            yield this.safety.pushLight(key, () => {
              var _a2, _b2;
              return (_b2 = (_a2 = this.handlers).reaction) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, evt);
            });
          }), "im.message.reaction.created_v1"),
          "im.message.reaction.deleted_v1": /* @__PURE__ */ __name((raw) => __awaiter(this, void 0, void 0, function* () {
            const evt = normalizeReaction(raw, "removed", { includeRaw });
            if (!evt)
              return;
            const key = reactionKey(evt);
            yield this.safety.pushLight(key, () => {
              var _a2, _b2;
              return (_b2 = (_a2 = this.handlers).reaction) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, evt);
            });
          }), "im.message.reaction.deleted_v1"),
          // Bot added — direct fire, no safety
          "im.chat.member.bot.added_v1": /* @__PURE__ */ __name((raw) => {
            var _a2, _b2;
            const evt = normalizeBotAdded(raw, { includeRaw });
            if (!evt)
              return;
            try {
              (_b2 = (_a2 = this.handlers).botAdded) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, evt);
            } catch (e) {
              this.emitError(e);
            }
          }, "im.chat.member.bot.added_v1"),
          // Drive comments — dedup + lock + queue (by fileToken).
          // The dedup key folds in replyId so thread replies on the same
          // top-level comment don't collide with each other (or with the
          // top-level comment itself).
          "drive.notice.comment_add_v1": /* @__PURE__ */ __name((raw) => __awaiter(this, void 0, void 0, function* () {
            var _g;
            const evt = normalizeComment(raw, { includeRaw });
            if (!evt)
              return;
            yield this.safety.pushAction(`comment:${evt.fileToken}:${evt.commentId}:${(_g = evt.replyId) !== null && _g !== void 0 ? _g : ""}`, evt.fileToken, () => __awaiter(this, void 0, void 0, function* () {
              const h = this.handlers.comment;
              if (h)
                yield h(evt);
            }));
          }), "drive.notice.comment_add_v1")
        });
      }
      emitError(e) {
        var _a, _b, _c;
        const err = e instanceof LarkChannelError ? e : new LarkChannelError("unknown", String((_a = e === null || e === void 0 ? void 0 : e.message) !== null && _a !== void 0 ? _a : e), { cause: e });
        const handler = this.handlers.error;
        if (handler)
          handler(err);
        else
          (_c = (_b = this.logger).error) === null || _c === void 0 ? void 0 : _c.call(_b, "channel: unhandled error", err);
      }
    };
    function createLarkChannel(opts) {
      return new LarkChannel(opts);
    }
    __name(createLarkChannel, "createLarkChannel");
    function bufferFromStream(raw) {
      return __awaiter(this, void 0, void 0, function* () {
        if (Buffer.isBuffer(raw))
          return raw;
        if (raw instanceof Uint8Array)
          return Buffer.from(raw);
        if (typeof raw === "object" && raw !== null) {
          const r = raw;
          if (typeof r.getReadableStream === "function") {
            return yield readableToBuffer(r.getReadableStream());
          }
          if (Buffer.isBuffer(r.data))
            return r.data;
          if (r.data instanceof Uint8Array)
            return Buffer.from(r.data);
        }
        throw new LarkChannelError("unknown", "unexpected download response type");
      });
    }
    __name(bufferFromStream, "bufferFromStream");
    function readableToBuffer(stream) {
      return new Promise((resolve, reject) => {
        const chunks = [];
        stream.on("data", (chunk) => {
          chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
        });
        stream.on("end", () => resolve(Buffer.concat(chunks)));
        stream.on("error", reject);
      });
    }
    __name(readableToBuffer, "readableToBuffer");
    function reactionKey(evt) {
      var _a;
      return `rx:${evt.messageId}:${evt.operator.openId}:${evt.emojiType}:${evt.action}:${(_a = evt.actionTime) !== null && _a !== void 0 ? _a : 0}`;
    }
    __name(reactionKey, "reactionKey");
    function cardActionId(action) {
      var _a, _b, _c;
      const serialized = typeof action.value === "string" ? action.value : JSON.stringify((_a = action.value) !== null && _a !== void 0 ? _a : "");
      const valuePart = serialized.length > 128 ? serialized.slice(0, 128) : serialized;
      return `${action.tag}|${(_b = action.name) !== null && _b !== void 0 ? _b : ""}|${(_c = action.option) !== null && _c !== void 0 ? _c : ""}|${valuePart}`;
    }
    __name(cardActionId, "cardActionId");
    exports.AESCipher = AESCipher;
    exports.Aily = Aily;
    exports.CAppTicket = CAppTicket;
    exports.CTenantAccessToken = CTenantAccessToken;
    exports.CardActionHandler = CardActionHandler;
    exports.Client = Client;
    exports.EventDispatcher = EventDispatcher2;
    exports.LarkChannel = LarkChannel;
    exports.LarkChannelError = LarkChannelError;
    exports.WSClient = WSClient2;
    exports.adaptDefault = adaptDefault;
    exports.adaptExpress = adaptExpress;
    exports.adaptKoa = adaptKoa;
    exports.adaptKoaRouter = adaptKoaRouter;
    exports.createLarkChannel = createLarkChannel;
    exports.defaultHttpInstance = defaultHttpInstance;
    exports.generateChallenge = generateChallenge;
    exports.messageCard = messageCard;
    exports.normalize = normalize;
    exports.normalizeBotAdded = normalizeBotAdded;
    exports.normalizeCardAction = normalizeCardAction;
    exports.normalizeComment = normalizeComment;
    exports.normalizeReaction = normalizeReaction;
    exports.registerApp = registerApp;
    exports.withAll = withAll;
    exports.withHelpDeskCredential = withHelpDeskCredential;
    exports.withTenantKey = withTenantKey;
    exports.withTenantToken = withTenantToken;
    exports.withUserAccessToken = withUserAccessToken;
  }
});

// packages/channels/feishu/dist/index.js
init_esbuild_shims();

// packages/channels/feishu/dist/FeishuAdapter.js
init_esbuild_shims();
var lark = __toESM(require_lib2(), 1);
import { mkdirSync, writeFileSync, rmSync } from "node:fs";
import { createServer } from "node:http";
import { randomUUID, timingSafeEqual } from "node:crypto";
import { basename, join } from "node:path";
import { tmpdir } from "node:os";

// packages/channels/feishu/dist/markdown.js
init_esbuild_shims();
var CHUNK_LIMIT = 4e3;
function splitByTables(text) {
  const lines = text.split("\n");
  const segments = [];
  let current = [];
  let inTable = false;
  let inCode = false;
  for (const line of lines) {
    if ((line.match(/```/g) || []).length % 2 === 1) {
      inCode = !inCode;
      current.push(line);
      continue;
    }
    if (inCode) {
      current.push(line);
      continue;
    }
    const isTableLine = line.trim().startsWith("|") && line.trim().endsWith("|");
    if (isTableLine && !inTable) {
      if (current.length > 0 && current.some((l) => l.trim())) {
        segments.push(current.join("\n"));
        current = [];
      }
      inTable = true;
      current.push(line);
    } else if (!isTableLine && inTable) {
      inTable = false;
      segments.push(current.join("\n"));
      current = [line];
    } else {
      current.push(line);
    }
  }
  if (current.length > 0) {
    segments.push(current.join("\n"));
  }
  return segments.filter((s) => s.trim());
}
__name(splitByTables, "splitByTables");
function buildCardContent(markdown, options) {
  const elements = [];
  const statusLabel = options?.statusLabel ?? (options?.isStreaming ? "\u751F\u6210\u4E2D..." : void 0);
  const contentMd = statusLabel ? `${markdown}

---
*${statusLabel}*` : markdown;
  const threshold = options?.collapsibleThreshold || 500;
  if (options?.collapsible && !options?.isStreaming && markdown.length > threshold) {
    const previewEnd = markdown.indexOf("\n", 200);
    const rawSplit = previewEnd > 0 ? previewEnd : 200;
    const safeSplit = markdown.lastIndexOf(" ", rawSplit);
    let splitAt = safeSplit > 100 ? safeSplit : rawSplit;
    const previewCandidate = markdown.slice(0, splitAt);
    let fenceCount = 0;
    for (const line of previewCandidate.split("\n")) {
      if ((line.match(/```/g) || []).length % 2 === 1)
        fenceCount++;
    }
    if (fenceCount % 2 === 1) {
      const fenceStart = markdown.indexOf("\n```", splitAt);
      if (fenceStart > 0 && fenceStart < rawSplit + 500) {
        const fenceLineEnd = markdown.indexOf("\n", fenceStart + 1);
        splitAt = fenceLineEnd > 0 ? fenceLineEnd : fenceStart + 4;
      }
    }
    const preview = markdown.slice(0, splitAt);
    const rest = markdown.slice(splitAt);
    const previewContent = statusLabel ? `${preview}

---
*${statusLabel}*` : preview;
    elements.push({
      tag: "markdown",
      content: previewContent
    });
    elements.push({
      tag: "collapsible_panel",
      expanded: false,
      background_color: "default",
      header: {
        title: {
          tag: "plain_text",
          content: "\u67E5\u770B\u66F4\u591A"
        }
      },
      elements: [
        {
          tag: "markdown",
          content: rest
        }
      ]
    });
  } else if (options?.isStreaming) {
    elements.push({
      tag: "markdown",
      content: contentMd
    });
  } else {
    const segments = splitByTables(contentMd);
    for (const segment of segments) {
      elements.push({
        tag: "markdown",
        content: segment
      });
    }
  }
  if (options?.showStopButton) {
    elements.push({
      tag: "button",
      text: {
        tag: "plain_text",
        content: "\u505C\u6B62"
      },
      type: "danger",
      value: { action: "stop" }
    });
  }
  const header = options?.title ? {
    title: {
      tag: "plain_text",
      content: options.isStreaming ? `${options.title} ...` : options.title
    },
    template: options.isStreaming ? "blue" : "green"
  } : void 0;
  return {
    schema: "2.0",
    config: {
      wide_screen_mode: true,
      summary: { content: markdown.slice(0, 3500) }
    },
    header,
    body: { elements }
  };
}
__name(buildCardContent, "buildCardContent");
function extractTitle(text) {
  const firstLine = text.split("\n")[0] || "";
  const cleaned = firstLine.replace(/^[#*\s\->]+/, "").slice(0, 20);
  return cleaned || "Qwen Code";
}
__name(extractTitle, "extractTitle");
function splitChunks(text) {
  if (!text || text.length <= CHUNK_LIMIT) {
    return [text];
  }
  const chunks = [];
  let buf = "";
  const lines = text.split("\n");
  let inCode = false;
  let fenceLine = "```";
  for (const line of lines) {
    const fenceCount = (line.match(/```/g) || []).length;
    const willBeInCode = fenceCount % 2 === 1 ? !inCode : inCode;
    const reserve = willBeInCode ? fenceLine.length + 1 : 0;
    if (buf.length + line.length + 1 + reserve > CHUNK_LIMIT && buf.length > 0) {
      if (inCode) {
        buf += "\n```";
      }
      chunks.push(buf);
      buf = inCode ? fenceLine : "";
    }
    buf += (buf ? "\n" : "") + line;
    const budget = willBeInCode ? CHUNK_LIMIT - "\n```".length : CHUNK_LIMIT;
    while (buf.length > budget) {
      const maxSlice = inCode ? CHUNK_LIMIT - "\n```".length - 1 : CHUNK_LIMIT;
      let piece = buf.slice(0, maxSlice);
      buf = buf.slice(maxSlice);
      if (inCode) {
        piece += "\n```";
        buf = fenceLine + "\n" + buf;
      }
      chunks.push(piece);
    }
    if (fenceCount % 2 === 1) {
      if (!inCode) {
        fenceLine = line.trim();
      }
      inCode = !inCode;
    }
  }
  if (buf) {
    chunks.push(buf);
  }
  return chunks;
}
__name(splitChunks, "splitChunks");

// packages/channels/feishu/dist/media.js
init_esbuild_shims();
var BASE_URL = "https://open.feishu.cn/open-apis";
var FEISHU_ID_RE = /^[a-zA-Z0-9_.:-]+$/;
async function downloadMedia(messageId, fileKey, resourceType, accessToken) {
  if (!messageId || !fileKey || !accessToken || !FEISHU_ID_RE.test(messageId) || !FEISHU_ID_RE.test(fileKey)) {
    return null;
  }
  try {
    const url = `${BASE_URL}/im/v1/messages/${messageId}/resources/${fileKey}?type=${resourceType}`;
    const resp = await fetch(url, {
      method: "GET",
      headers: {
        Authorization: `Bearer ${accessToken}`
      },
      signal: AbortSignal.timeout(3e4)
    });
    if (!resp.ok) {
      const detail = await resp.text().catch(() => "");
      process.stderr.write(`[Feishu] downloadMedia failed: HTTP ${resp.status} ${detail}
`);
      return null;
    }
    const MAX_DOWNLOAD_BYTES = 50 * 1024 * 1024;
    const contentLength = resp.headers.get("content-length");
    if (contentLength && parseInt(contentLength, 10) > MAX_DOWNLOAD_BYTES) {
      await resp.body?.cancel();
      process.stderr.write(`[Feishu] downloadMedia rejected: size ${contentLength} exceeds ${MAX_DOWNLOAD_BYTES} byte limit
`);
      return null;
    }
    const mimeType = resp.headers.get("content-type") || "application/octet-stream";
    const reader = resp.body?.getReader();
    if (!reader) {
      return null;
    }
    const chunks = [];
    let totalSize = 0;
    while (true) {
      const { done, value } = await reader.read();
      if (done)
        break;
      totalSize += value.byteLength;
      if (totalSize > MAX_DOWNLOAD_BYTES) {
        await reader.cancel();
        process.stderr.write(`[Feishu] downloadMedia rejected: actual size exceeds ${MAX_DOWNLOAD_BYTES} byte limit
`);
        return null;
      }
      chunks.push(Buffer.from(value));
    }
    const buffer = Buffer.concat(chunks);
    return { buffer, mimeType };
  } catch (err) {
    process.stderr.write(`[Feishu] downloadMedia error: ${err instanceof Error ? err.message : err}
`);
    return null;
  }
}
__name(downloadMedia, "downloadMedia");

// packages/channels/feishu/dist/FeishuAdapter.js
var DEDUP_TTL_MS = 5 * 60 * 1e3;
var CARD_UPDATE_INTERVAL_MS = 1500;
var FEISHU_RUNNING_STATUS_LABEL = "\u8FD0\u884C\u4E2D...";
var FEISHU_STOPPED_STATUS_LABEL = "\u5DF2\u505C\u6B62\u751F\u6210";
var FEISHU_STOP_FAILED_STATUS_LABEL = "\u505C\u6B62\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5";
var FEISHU_TRUNCATED_STATUS_LABEL = "\u5185\u5BB9\u8FC7\u957F\uFF0C\u5DF2\u622A\u65AD";
var FEISHU_TERMINAL_STATUS_LABELS = {
  completed: "\u5DF2\u5B8C\u6210",
  cancelled: "\u5DF2\u53D6\u6D88",
  failed: "\u5DF2\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"
};
var FEISHU_STATUS_STRINGS = [
  "\u751F\u6210\u4E2D...",
  FEISHU_RUNNING_STATUS_LABEL,
  FEISHU_TERMINAL_STATUS_LABELS.completed,
  FEISHU_TERMINAL_STATUS_LABELS.cancelled,
  FEISHU_TERMINAL_STATUS_LABELS.failed,
  FEISHU_STOPPED_STATUS_LABEL,
  FEISHU_STOP_FAILED_STATUS_LABEL,
  FEISHU_TRUNCATED_STATUS_LABEL
];
var escapeRegExp = /* @__PURE__ */ __name((value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escapeRegExp");
var FEISHU_STATUS_LABELS = `(?:${FEISHU_STATUS_STRINGS.map(escapeRegExp).join("|")})`;
var FEISHU_STATUS_BLOCK_RE = new RegExp(`(?:^|\\n)---\\n\\*${FEISHU_STATUS_LABELS}\\*(?=\\n|$)`, "g");
var BASE_URL2 = "https://open.feishu.cn/open-apis";
var FEISHU_ID_RE2 = /^[a-zA-Z0-9_.:-]+$/;
var FeishuChannel = class extends ChannelBase {
  static {
    __name(this, "FeishuChannel");
  }
  eventDispatcher;
  wsClient;
  httpServer;
  seenMessages = /* @__PURE__ */ new Map();
  dedupTimer;
  /** Card state keyed by inbound messageId (unique per request). */
  cardSessions = /* @__PURE__ */ new Map();
  /** Map sessionId → inbound messageId, set in onPromptStart. */
  sessionToInboundMsg = /* @__PURE__ */ new Map();
  /** Question title keyed by inbound messageId. */
  msgToQuestion = /* @__PURE__ */ new Map();
  /** Sender @tag keyed by inbound messageId. */
  msgToSenderName = /* @__PURE__ */ new Map();
  /** Sender open_id keyed by inbound messageId — for stop-button auth in group chats. */
  msgToSenderId = /* @__PURE__ */ new Map();
  /** Tracks messages that were stopped. Cleaned up by onResponseComplete, onPromptEnd, stale timer, and disconnect. */
  stoppedMessages = /* @__PURE__ */ new Set();
  botOpenId;
  tokenCache;
  tokenRefreshPromise;
  collapsible;
  collapsibleThreshold;
  constructor(name, config, bridge, options) {
    super(name, config, bridge, options);
    if (!config.clientId || !config.clientSecret) {
      throw new Error(`Channel "${name}" requires clientId (appId) and clientSecret (appSecret) for Feishu.`);
    }
    const feishuCfg = config;
    this.collapsible = feishuCfg["collapsible"] || false;
    this.collapsibleThreshold = feishuCfg["collapsibleThreshold"] || 500;
  }
  supportsProactiveSend() {
    return true;
  }
  /** Build the event handler map shared between WebSocket and webhook modes. */
  buildHandlerMap() {
    return {
      "im.message.receive_v1": /* @__PURE__ */ __name((data) => {
        this.logDebugPayload("Feishu", data);
        this.onMessage(data);
        return {};
      }, "im.message.receive_v1"),
      "card.action.trigger": /* @__PURE__ */ __name((data) => {
        const payload = data;
        this.logDebugPayload("Feishu", payload);
        const stopped = this.onCardAction(payload);
        if (stopped) {
          return { toast: { type: "info", content: "\u5DF2\u505C\u6B62" } };
        }
        return {};
      }, "card.action.trigger")
    };
  }
  async connect() {
    this.eventDispatcher = new lark.EventDispatcher({});
    this.eventDispatcher.register(this.buildHandlerMap());
    const feishuConfig = this.config;
    const webhookPort = feishuConfig["webhookPort"];
    const verificationToken = feishuConfig["verificationToken"];
    const encryptKey = feishuConfig["encryptKey"];
    if (webhookPort) {
      if (!verificationToken) {
        throw new Error(`Channel "${this.name}" webhook mode requires verificationToken for request authentication.`);
      }
      if (!encryptKey) {
        throw new Error(`Channel "${this.name}" webhook mode requires encryptKey for HMAC request authentication. Without it, the Lark SDK skips signature verification and any client can forge events.`);
      }
      await this.connectWebhook(webhookPort, verificationToken, encryptKey);
    } else {
      const token = await this.getTenantAccessToken();
      if (!token) {
        throw new Error(`Channel "${this.name}" failed to authenticate Feishu credentials.`);
      }
      await this.connectWebSocket();
    }
    await this.fetchBotInfo();
    if (this.dedupTimer)
      clearInterval(this.dedupTimer);
    this.dedupTimer = setInterval(() => {
      const now = Date.now();
      for (const [id, ts] of this.seenMessages) {
        if (now - ts > DEDUP_TTL_MS) {
          this.seenMessages.delete(id);
        }
      }
      const STALE_MS = 10 * 60 * 1e3;
      const CREATING_TIMEOUT_MS = 6e4;
      for (const [msgId, state] of this.cardSessions) {
        if (state.creating && now - state.lastUpdateAt > CREATING_TIMEOUT_MS) {
          process.stderr.write(`[Feishu:${this.name}] WARNING: card creation timed out for msg=${msgId} (accumulated ${state.accumulatedText.length} chars dropped)
`);
          state.creating = false;
          state.cardCreationFailed = true;
          if (state.creationTimer)
            clearTimeout(state.creationTimer);
          this.cleanupCard(msgId);
          continue;
        }
        if (now - state.lastUpdateAt > STALE_MS && !state.creating && !state.finalizing && !state.completed) {
          this.cleanupCard(msgId);
          this.stoppedMessages.delete(msgId);
        }
      }
      for (const map of [
        this.msgToQuestion,
        this.msgToSenderName,
        this.msgToSenderId
      ]) {
        for (const msgId of map.keys()) {
          if (!this.cardSessions.has(msgId)) {
            map.delete(msgId);
          }
        }
      }
    }, 6e4);
    const mode = webhookPort ? `webhook on port ${webhookPort}` : "WebSocket";
    process.stderr.write(`[Feishu:${this.name}] Connected via ${mode}.
`);
  }
  async connectWebSocket() {
    this.wsClient = new lark.WSClient({
      appId: this.config.clientId,
      appSecret: this.config.clientSecret,
      loggerLevel: lark.LoggerLevel.warn
    });
    await this.wsClient.start({ eventDispatcher: this.eventDispatcher });
  }
  async connectWebhook(port, verificationToken, encryptKey) {
    const dispatcher = new lark.EventDispatcher({
      verificationToken: verificationToken || "",
      encryptKey: encryptKey || ""
    });
    dispatcher.register(this.buildHandlerMap());
    const feishuCfg = this.config;
    const MAX_BODY_BYTES = 1 * 1024 * 1024;
    this.httpServer = createServer((req, res) => {
      if (req.method === "POST") {
        req.on("error", (err) => {
          if (!res.headersSent) {
            res.writeHead(400);
            res.end("Bad Request");
          }
          process.stderr.write(`[Feishu:${this.name}] Webhook request error: ${err.message}
`);
        });
        const bodyChunks = [];
        let bodySize = 0;
        let exceeded = false;
        req.on("data", (chunk) => {
          if (exceeded)
            return;
          bodySize += chunk.length;
          if (bodySize > MAX_BODY_BYTES) {
            exceeded = true;
            res.writeHead(413);
            res.end("Payload Too Large");
            req.destroy();
            return;
          }
          bodyChunks.push(chunk);
        });
        req.on("end", () => {
          if (exceeded)
            return;
          try {
            const body = Buffer.concat(bodyChunks).toString("utf-8");
            const parsed = JSON.parse(body);
            if (parsed.type === "url_verification") {
              if (verificationToken) {
                const a = Buffer.from(parsed.token || "");
                const b = Buffer.from(verificationToken);
                if (a.length !== b.length || !timingSafeEqual(a, b)) {
                  res.writeHead(403);
                  res.end("Forbidden");
                  return;
                }
              }
              res.writeHead(200, { "Content-Type": "application/json" });
              res.end(JSON.stringify({ challenge: parsed.challenge }));
              return;
            }
            const data = Object.assign({}, parsed);
            Object.defineProperty(data, "headers", {
              value: req.headers,
              enumerable: false,
              writable: false
            });
            dispatcher.invoke(data).then((result) => {
              res.writeHead(200, { "Content-Type": "application/json" });
              res.end(JSON.stringify(result || {}));
            }).catch((err) => {
              process.stderr.write(`[Feishu:${this.name}] Webhook dispatch error: ${err instanceof Error ? err.message : err}
`);
              res.writeHead(500);
              res.end("Internal Server Error");
            });
          } catch (err) {
            process.stderr.write(`[Feishu:${this.name}] Webhook JSON parse error: ${err instanceof Error ? err.message : err}
`);
            res.writeHead(400);
            res.end("Bad Request");
          }
        });
      } else {
        res.writeHead(200);
        res.end("OK");
      }
    });
    const host = feishuCfg["webhookHost"] || "127.0.0.1";
    await new Promise((resolve, reject) => {
      this.httpServer.on("error", reject);
      this.httpServer.listen(port, host, () => resolve());
    });
  }
  async fetchBotInfo() {
    try {
      const token = await this.getTenantAccessToken();
      if (!token)
        return;
      const resp = await fetch(`${BASE_URL2}/bot/v3/info`, {
        headers: { Authorization: `Bearer ${token}` },
        signal: AbortSignal.timeout(15e3)
      });
      if (resp.ok) {
        const data = await resp.json();
        this.botOpenId = data.bot?.open_id;
        process.stderr.write(`[Feishu:${this.name}] Bot open_id: ${this.botOpenId}
`);
      } else {
        process.stderr.write(`[Feishu:${this.name}] WARNING: Failed to fetch bot info (HTTP ${resp.status}). @mention detection in groups will not work.
`);
      }
    } catch (err) {
      process.stderr.write(`[Feishu:${this.name}] WARNING: Failed to fetch bot info: ${err}. @mention detection in groups will not work.
`);
    }
  }
  /**
   * Fetch the content of a message by ID.
   * For interactive cards, extracts markdown text from card elements.
   */
  async fetchMessageContent(messageId) {
    const token = await this.getTenantAccessToken();
    if (!token || !FEISHU_ID_RE2.test(messageId))
      return { isFromBot: false };
    try {
      const resp = await fetch(`${BASE_URL2}/im/v1/messages/${messageId}?user_id_type=open_id&card_msg_content_type=user_card_content`, {
        headers: { Authorization: `Bearer ${token}` },
        signal: AbortSignal.timeout(15e3)
      });
      const respText = await resp.text();
      if (!resp.ok) {
        if (resp.status === 401)
          this.tokenCache = void 0;
        return { isFromBot: false };
      }
      const data = JSON.parse(respText);
      const item = data.data?.items?.[0];
      const isFromBot = item?.sender?.sender_type === "app" || !!this.botOpenId && item?.sender?.id === this.botOpenId;
      if (!item?.body?.content) {
        return { isFromBot };
      }
      const content = JSON.parse(item.body.content);
      if (item.msg_type === "interactive") {
        return { content: this.extractCardText(content), isFromBot };
      } else if (item.msg_type === "text") {
        return { content: content.text || void 0, isFromBot };
      } else if (item.msg_type === "post") {
        const firstValue = Object.values(content)[0];
        const langPost = typeof firstValue === "object" && firstValue !== null ? firstValue : content;
        const lines = [];
        if (langPost?.title)
          lines.push(langPost.title);
        if (langPost?.content) {
          for (const paragraph of langPost.content) {
            const parts = [];
            for (const node of paragraph) {
              if ((node.tag === "text" || node.tag === "a") && node.text) {
                parts.push(node.text);
              } else if (node.tag === "at") {
                const userName = node["user_name"];
                if (typeof userName === "string" && userName) {
                  parts.push(`@${userName}`);
                }
              }
            }
            lines.push(parts.join(""));
          }
        }
        return { content: lines.join("\n").trim() || void 0, isFromBot };
      }
      return { content: void 0, isFromBot };
    } catch (err) {
      process.stderr.write(`[Feishu:${this.name}] fetchMessageContent error: ${err}
`);
      return { isFromBot: false };
    }
  }
  /**
   * Extract text content from a Feishu interactive card JSON structure.
   * Supports both v2 format ({ schema, body: { elements } }) and
   * v1/API-returned format ({ title, elements: [[...]] }).
   */
  extractCardText(card) {
    const lines = [];
    const body = card["body"];
    if (body?.elements) {
      for (const element of body.elements) {
        if (element["tag"] === "markdown" && typeof element["content"] === "string") {
          lines.push(element["content"]);
        } else if (element["tag"] === "collapsible_panel") {
          const nested = element["elements"];
          if (nested) {
            for (const el of nested) {
              if (el["tag"] === "markdown" && typeof el["content"] === "string") {
                lines.push(el["content"]);
              }
            }
          }
        }
      }
    }
    if (lines.length === 0) {
      const title = card["title"];
      if (title)
        lines.push(title);
      const elements = card["elements"];
      if (elements) {
        for (const row of elements) {
          if (Array.isArray(row)) {
            for (const el of row) {
              const elem = el;
              if (elem["tag"] === "text" && typeof elem["text"] === "string" && elem["text"]) {
                if (elem["text"] !== "\u8BF7\u5347\u7EA7\u81F3\u6700\u65B0\u7248\u672C\u5BA2\u6237\u7AEF\uFF0C\u4EE5\u67E5\u770B\u5185\u5BB9") {
                  lines.push(elem["text"]);
                }
              } else if (elem["tag"] === "markdown" && typeof elem["content"] === "string") {
                lines.push(elem["content"]);
              }
            }
          } else if (typeof row === "object" && row !== null) {
            const elem = row;
            if (elem["tag"] === "markdown" && typeof elem["content"] === "string") {
              lines.push(elem["content"]);
            } else if (elem["tag"] === "text" && typeof elem["text"] === "string" && elem["text"]) {
              if (elem["text"] !== "\u8BF7\u5347\u7EA7\u81F3\u6700\u65B0\u7248\u672C\u5BA2\u6237\u7AEF\uFF0C\u4EE5\u67E5\u770B\u5185\u5BB9") {
                lines.push(elem["text"]);
              }
            }
          }
        }
      }
    }
    let text = lines.join("\n").trim();
    text = text.replace(FEISHU_STATUS_BLOCK_RE, "");
    text = text.replace(/^好的，<at[^>]*><\/at>\s*\n*/, "");
    return text.trim() || void 0;
  }
  async getTenantAccessToken() {
    if (this.tokenCache && Date.now() < this.tokenCache.expiresAt) {
      return this.tokenCache.token;
    }
    if (this.tokenRefreshPromise)
      return this.tokenRefreshPromise;
    this.tokenRefreshPromise = this.refreshToken();
    try {
      return await this.tokenRefreshPromise;
    } finally {
      this.tokenRefreshPromise = void 0;
    }
  }
  async refreshToken() {
    try {
      const resp = await fetch(`${BASE_URL2}/auth/v3/tenant_access_token/internal`, {
        method: "POST",
        headers: { "Content-Type": "application/json" },
        body: JSON.stringify({
          app_id: this.config.clientId,
          app_secret: this.config.clientSecret
        }),
        signal: AbortSignal.timeout(15e3)
      });
      if (!resp.ok) {
        process.stderr.write(`[Feishu:${this.name}] getTenantAccessToken failed: HTTP ${resp.status}
`);
        if (resp.status === 401)
          this.tokenCache = void 0;
        return void 0;
      }
      const data = await resp.json();
      const expirySeconds = Math.max(data.expire, 300);
      this.tokenCache = {
        token: data.tenant_access_token,
        expiresAt: Date.now() + (expirySeconds - 60) * 1e3
      };
      return this.tokenCache.token;
    } catch (err) {
      process.stderr.write(`[Feishu:${this.name}] getTenantAccessToken error: ${err}
`);
      return void 0;
    }
  }
  async sendMessage(chatId, text) {
    await this.sendMessageInternal(chatId, text, false);
  }
  async pushProactive(target, text) {
    await this.sendMessageInternal(target.chatId, text, true);
  }
  async pushProactiveDelivery(target, text) {
    try {
      await this.sendMessageInternal(target.chatId, text, true, target.isGroup === false ? "open_id" : "chat_id");
    } catch (error) {
      if (isChannelProactiveDeliveryError(error)) {
        throw error;
      }
      throw new ChannelProactiveDeliveryError("transient", error instanceof Error ? error.message : String(error), { cause: error });
    }
  }
  async sendMessageInternal(chatId, text, throwOnFailure, receiveIdType = "chat_id") {
    const token = await this.getTenantAccessToken();
    if (!token) {
      process.stderr.write(`[Feishu:${this.name}] Cannot send: no access token.
`);
      if (throwOnFailure) {
        throw new ChannelProactiveDeliveryError("transient", "Feishu sendMessage failed: no access token");
      }
      return;
    }
    const chunks = splitChunks(text);
    for (let i = 0; i < chunks.length; i++) {
      const chunk = chunks[i];
      const title = i === 0 ? extractTitle(text) : `${extractTitle(text)} (cont.)`;
      const card = buildCardContent(chunk, {
        title,
        collapsible: this.collapsible,
        collapsibleThreshold: this.collapsibleThreshold
      });
      const body = {
        receive_id: chatId,
        msg_type: "interactive",
        content: JSON.stringify(card)
      };
      try {
        const resp = await fetch(`${BASE_URL2}/im/v1/messages?receive_id_type=${receiveIdType}`, {
          method: "POST",
          headers: {
            Authorization: `Bearer ${token}`,
            "Content-Type": "application/json"
          },
          body: JSON.stringify(body),
          signal: AbortSignal.timeout(15e3)
        });
        if (!resp.ok) {
          if (resp.status === 401)
            this.tokenCache = void 0;
          const detail = await resp.text().catch(() => "");
          process.stderr.write(`[Feishu:${this.name}] sendMessage failed: HTTP ${resp.status} ${detail}
`);
          if (throwOnFailure) {
            throw new ChannelProactiveDeliveryError(resp.status === 408 || resp.status === 429 || resp.status >= 500 ? "transient" : "permanent", `Feishu sendMessage failed: HTTP ${resp.status}`);
          }
        }
      } catch (err) {
        if (throwOnFailure && err instanceof ChannelProactiveDeliveryError) {
          throw err;
        }
        process.stderr.write(`[Feishu:${this.name}] sendMessage error: ${err}
`);
        if (throwOnFailure) {
          throw new ChannelProactiveDeliveryError("transient", "Feishu sendMessage failed: network error", { cause: err });
        }
      }
    }
  }
  // ----- Interactive Card Streaming -----
  async createStreamingCard(chatId, text, title, inboundMsgId) {
    const token = await this.getTenantAccessToken();
    if (!token)
      return { messageId: "", success: false };
    const cardTitle = title || inboundMsgId && this.msgToQuestion.get(inboundMsgId) || "Qwen";
    const card = buildCardContent(text, {
      title: cardTitle,
      showStopButton: true,
      isStreaming: true,
      statusLabel: this.statusLabelFor(),
      collapsible: this.collapsible,
      collapsibleThreshold: this.collapsibleThreshold
    });
    const body = {
      receive_id: chatId,
      msg_type: "interactive",
      content: JSON.stringify(card)
    };
    try {
      const resp = await fetch(`${BASE_URL2}/im/v1/messages?receive_id_type=chat_id`, {
        method: "POST",
        headers: {
          Authorization: `Bearer ${token}`,
          "Content-Type": "application/json"
        },
        body: JSON.stringify(body),
        signal: AbortSignal.timeout(15e3)
      });
      if (!resp.ok) {
        if (resp.status === 401)
          this.tokenCache = void 0;
        const detail = await resp.text().catch(() => "");
        process.stderr.write(`[Feishu:${this.name}] createStreamingCard failed: HTTP ${resp.status} ${detail}
`);
        return { messageId: "", success: false };
      }
      const data = await resp.json();
      const messageId = data.data?.message_id || "";
      return { messageId, success: !!messageId };
    } catch (err) {
      process.stderr.write(`[Feishu:${this.name}] createStreamingCard error: ${err}
`);
      return { messageId: "", success: false };
    }
  }
  async updateCard(messageId, text, finished = false, inboundMsgId, statusLabel) {
    const token = await this.getTenantAccessToken();
    if (!token)
      return false;
    const cardTitle = inboundMsgId ? this.msgToQuestion.get(inboundMsgId) || "Qwen" : "Qwen";
    const card = buildCardContent(text, {
      title: cardTitle,
      showStopButton: !finished,
      isStreaming: !finished,
      statusLabel: statusLabel ?? (!finished ? this.statusLabelFor() : void 0),
      collapsible: this.collapsible,
      collapsibleThreshold: this.collapsibleThreshold
    });
    if (!FEISHU_ID_RE2.test(messageId))
      return false;
    try {
      const resp = await fetch(`${BASE_URL2}/im/v1/messages/${messageId}`, {
        method: "PATCH",
        headers: {
          Authorization: `Bearer ${token}`,
          "Content-Type": "application/json"
        },
        body: JSON.stringify({
          msg_type: "interactive",
          content: JSON.stringify(card)
        }),
        signal: AbortSignal.timeout(15e3)
      });
      if (!resp.ok) {
        if (resp.status === 401)
          this.tokenCache = void 0;
        const detail = await resp.text().catch(() => "");
        process.stderr.write(`[Feishu:${this.name}] updateCard failed: HTTP ${resp.status} ${detail}
`);
        return false;
      }
      return true;
    } catch (err) {
      process.stderr.write(`[Feishu:${this.name}] updateCard error: ${err}
`);
      return false;
    }
  }
  /** Delete a card message from Feishu to prevent orphaned "思考中..." cards. */
  async deleteCard(messageId) {
    const token = await this.getTenantAccessToken();
    if (!token || !FEISHU_ID_RE2.test(messageId))
      return false;
    try {
      const resp = await fetch(`${BASE_URL2}/im/v1/messages/${messageId}`, {
        method: "DELETE",
        headers: { Authorization: `Bearer ${token}` },
        signal: AbortSignal.timeout(1e4)
      });
      if (!resp.ok) {
        if (resp.status === 401)
          this.tokenCache = void 0;
        const detail = await resp.text().catch(() => "");
        process.stderr.write(`[Feishu:${this.name}] deleteCard failed: HTTP ${resp.status} msg=${messageId} ${detail}
`);
        return false;
      }
      return true;
    } catch (err) {
      process.stderr.write(`[Feishu:${this.name}] deleteCard error: msg=${messageId} ${err instanceof Error ? err.message : err}
`);
      return false;
    }
  }
  onResponseChunk(chatId, chunk, sessionId) {
    if (this.config.blockStreaming === "on")
      return;
    const inboundMsgId = this.sessionToInboundMsg.get(sessionId);
    if (!inboundMsgId) {
      process.stderr.write(`[Feishu:${this.name}] onResponseChunk: no inboundMsgId for session ${sessionId}
`);
      return;
    }
    if (this.stoppedMessages.has(inboundMsgId))
      return;
    let cardState = this.cardSessions.get(inboundMsgId);
    if (!cardState) {
      cardState = {
        messageId: "",
        created: false,
        creating: false,
        stopped: false,
        accumulatedText: "",
        lastUpdateAt: Date.now()
      };
      this.cardSessions.set(inboundMsgId, cardState);
    }
    if (cardState.stopped)
      return;
    const MAX_ACCUMULATE = 25e3;
    cardState.accumulatedText += chunk;
    if (cardState.accumulatedText.length > MAX_ACCUMULATE) {
      cardState.accumulatedText = cardState.accumulatedText.slice(-MAX_ACCUMULATE);
    }
    if (cardState.creating)
      return;
    if (!cardState.created && !cardState.cardCreationFailed) {
      cardState.creating = true;
      const cs = cardState;
      cardState.creationTimer = setTimeout(async () => {
        try {
          if (cs.stopped || this.stoppedMessages.has(inboundMsgId)) {
            cs.creating = false;
            this.cleanupCard(inboundMsgId);
            return;
          }
          const atPrefix = this.msgToSenderName.get(inboundMsgId);
          const displayContent = atPrefix ? `${atPrefix}

${cs.accumulatedText}` : cs.accumulatedText;
          const result = await this.createStreamingCard(chatId, displayContent, void 0, inboundMsgId);
          if (cs.stopped || this.stoppedMessages.has(inboundMsgId)) {
            if (cs.abandoned) {
              if (result.success) {
                await this.deleteCard(result.messageId);
              }
              cs.creating = false;
              return;
            }
            if (result.success) {
              const prefix = cs.atPrefix || this.msgToSenderName.get(inboundMsgId) || "";
              this.updateCard(result.messageId, prefix, true, inboundMsgId, this.stopLabelFor(cs.terminalStatus, cs.userStopped ?? false)).catch(() => {
              });
            }
            cs.creating = false;
            this.cleanupCard(inboundMsgId);
            return;
          }
          if (result.success) {
            cs.messageId = result.messageId;
            cs.created = true;
            cs.lastUpdateAt = Date.now();
          } else {
            cs.cardCreationFailed = true;
          }
        } catch (err) {
          cs.cardCreationFailed = true;
          process.stderr.write(`[Feishu:${this.name}] card create error: ${err}
`);
        }
        cs.creating = false;
      }, 0);
      return;
    }
    if (!cardState.created)
      return;
    if (!cardState.pendingUpdateTimer) {
      const cs = cardState;
      const elapsed = Date.now() - cardState.lastUpdateAt;
      const delay = Math.max(0, CARD_UPDATE_INTERVAL_MS - elapsed);
      cardState.pendingUpdateTimer = setTimeout(async () => {
        cs.pendingUpdateTimer = void 0;
        if (cs.stopped || cs.finalizing)
          return;
        cs.lastUpdateAt = Date.now();
        try {
          const MAX_CARD_CHARS = 2e4;
          const atPrefix = this.msgToSenderName.get(inboundMsgId);
          let displayContent = atPrefix ? `${atPrefix}

${cs.accumulatedText}` : cs.accumulatedText;
          if (displayContent.length > MAX_CARD_CHARS) {
            const marker = "\n\n_(\u5185\u5BB9\u8FC7\u957F\uFF0C\u5DF2\u622A\u65AD\u65E9\u671F\u5185\u5BB9)_";
            displayContent = displayContent.slice(-(MAX_CARD_CHARS - marker.length)) + marker;
            if (this.countFences(displayContent) % 2 === 1) {
              displayContent = "```\n" + displayContent;
            }
          }
          const ok = await this.updateCard(cs.messageId, displayContent, false, inboundMsgId);
          if (!ok) {
            const stripped = this.stripTables(displayContent, "(\u8868\u683C)");
            await this.updateCard(cs.messageId, stripped, false, inboundMsgId);
          }
        } catch (err) {
          process.stderr.write(`[Feishu:${this.name}] card update error: ${err}
`);
        }
      }, delay);
    }
  }
  onResponseBoundary(_chatId, sessionId) {
    if (this.config.blockStreaming === "on")
      return;
    const inboundMsgId = this.sessionToInboundMsg.get(sessionId);
    if (!inboundMsgId)
      return;
    const cardState = this.cardSessions.get(inboundMsgId);
    if (!cardState || cardState.stopped)
      return;
    if (cardState.pendingUpdateTimer) {
      clearTimeout(cardState.pendingUpdateTimer);
      cardState.pendingUpdateTimer = void 0;
    }
    cardState.accumulatedText = "";
  }
  isKnownInboundMessageId(messageId) {
    return this.msgToQuestion.has(messageId) || this.msgToSenderName.has(messageId) || this.msgToSenderId.has(messageId) || this.cardSessions.has(messageId) || this.stoppedMessages.has(messageId);
  }
  knownInboundMessageId(sessionId, messageId) {
    if (messageId && this.isKnownInboundMessageId(messageId)) {
      return messageId;
    }
    const mapped = this.sessionToInboundMsg.get(sessionId);
    return mapped && this.isKnownInboundMessageId(mapped) ? mapped : void 0;
  }
  statusLabelFor(terminalStatus) {
    return terminalStatus === void 0 ? FEISHU_RUNNING_STATUS_LABEL : FEISHU_TERMINAL_STATUS_LABELS[terminalStatus];
  }
  stopLabelFor(terminalStatus, userInitiated = false) {
    if (userInitiated || terminalStatus === void 0) {
      return FEISHU_STOPPED_STATUS_LABEL;
    }
    return this.statusLabelFor(terminalStatus);
  }
  async finalizeStoppedCardUpdate(inboundMsgId, cardState, chatId) {
    if (!cardState || !cardState.stopped && !this.stoppedMessages.has(inboundMsgId)) {
      return false;
    }
    if (cardState.created && cardState.messageId) {
      const prefix = cardState.atPrefix || this.msgToSenderName.get(inboundMsgId) || "";
      const stopLabel = `*${this.stopLabelFor(cardState.terminalStatus, this.stoppedMessages.has(inboundMsgId))}*`;
      const contentPart = cardState.accumulatedText.trim() ? cardState.accumulatedText + "\n\n---\n" + stopLabel : stopLabel;
      const finalText = prefix ? `${prefix}

${contentPart}` : contentPart;
      const updated = await this.updateCard(cardState.messageId, finalText, true, inboundMsgId);
      if (!updated) {
        await this.deleteCard(cardState.messageId);
        await this.sendMessage(chatId, finalText);
      }
    }
    this.cleanupCard(inboundMsgId);
    this.stoppedMessages.delete(inboundMsgId);
    return true;
  }
  onTaskLifecycle(event) {
    if (!isTerminalTaskLifecycleType(event.type)) {
      return;
    }
    const inboundMsgId = this.knownInboundMessageId(event.sessionId, event.messageId);
    if (!inboundMsgId)
      return;
    const cardState = this.cardSessions.get(inboundMsgId);
    if (!cardState)
      return;
    if (cardState.terminalStatus && cardState.terminalStatus !== event.type) {
      process.stderr.write(`[Feishu:${this.name}] conflicting terminal event ${event.type} after ${cardState.terminalStatus} for inbound=${inboundMsgId}
`);
    }
    cardState.terminalStatus ??= event.type;
  }
  async onResponseComplete(chatId, fullText, sessionId) {
    const inboundMsgId = this.sessionToInboundMsg.get(sessionId);
    if (!inboundMsgId) {
      process.stderr.write(`[Feishu:${this.name}] onResponseComplete: no inboundMsgId for session ${sessionId}, fallback to sendMessage
`);
      await this.sendMessage(chatId, fullText);
      return;
    }
    const cardState = this.cardSessions.get(inboundMsgId);
    if (cardState)
      cardState.completed = true;
    if (cardState?.stopped || this.stoppedMessages.has(inboundMsgId)) {
      this.cleanupCard(inboundMsgId);
      this.stoppedMessages.delete(inboundMsgId);
      return;
    }
    const atSender = this.msgToSenderName.get(inboundMsgId);
    let displayText = atSender ? `${atSender}

${fullText}` : fullText;
    const completedLabel = this.statusLabelFor("completed");
    const completedSuffix = `

---
*${completedLabel}*`;
    const MAX_FINAL_CARD_CHARS = 2e4;
    if (displayText.length + completedSuffix.length > MAX_FINAL_CARD_CHARS) {
      const prefix = atSender ? `${atSender}

` : "";
      const suffix = "\n\n_(\u5185\u5BB9\u8FC7\u957F\uFF0C\u5DF2\u622A\u65AD\u65E9\u671F\u5185\u5BB9)_";
      const fenceReserve = 4;
      const maxBody = MAX_FINAL_CARD_CHARS - prefix.length - suffix.length - completedSuffix.length - fenceReserve;
      displayText = prefix + fullText.slice(-maxBody) + suffix;
      if (this.countFences(displayText) % 2 === 1) {
        displayText = "```\n" + displayText;
      }
    }
    if (cardState)
      cardState.finalizing = true;
    if (cardState?.pendingUpdateTimer) {
      clearTimeout(cardState.pendingUpdateTimer);
    }
    if (cardState?.creationTimer) {
      clearTimeout(cardState.creationTimer);
    }
    if (cardState?.creating) {
      await new Promise((resolve) => {
        let elapsed = 0;
        const check = setInterval(() => {
          elapsed += 50;
          if (!cardState.creating || elapsed > 1e4) {
            clearInterval(check);
            resolve();
          }
        }, 50);
      });
    }
    if (cardState?.stopped || this.stoppedMessages.has(inboundMsgId)) {
      this.cleanupCard(inboundMsgId);
      this.stoppedMessages.delete(inboundMsgId);
      return;
    }
    if (cardState?.creating) {
      cardState.stopped = true;
      cardState.abandoned = true;
      this.cleanupCard(inboundMsgId);
      await this.sendMessage(chatId, fullText);
      return;
    }
    if (cardState?.created) {
      const updated = await this.updateCard(cardState.messageId, displayText, true, inboundMsgId, completedLabel);
      if (await this.finalizeStoppedCardUpdate(inboundMsgId, cardState, chatId)) {
        return;
      }
      if (!updated) {
        const noTableText = this.stripTables(displayText, "(\u8868\u683C\u5185\u5BB9\u8BF7\u67E5\u770B\u539F\u6587)");
        const retried = await this.updateCard(cardState.messageId, noTableText, true, inboundMsgId, completedLabel);
        if (await this.finalizeStoppedCardUpdate(inboundMsgId, cardState, chatId)) {
          return;
        }
        if (!retried) {
          let truncated = displayText.slice(0, 2e3);
          if (this.countFences(truncated) % 2 === 1)
            truncated += "\n```";
          const lastResort = await this.updateCard(cardState.messageId, truncated + "\n\n---\n*\u5185\u5BB9\u8FC7\u957F\uFF0C\u5DF2\u622A\u65AD*", true, inboundMsgId, completedLabel);
          if (await this.finalizeStoppedCardUpdate(inboundMsgId, cardState, chatId)) {
            return;
          }
          if (!lastResort) {
            await this.deleteCard(cardState.messageId);
            this.cleanupCard(inboundMsgId);
            await this.sendMessage(chatId, atSender ? `${atSender}

${fullText}` : fullText);
            return;
          }
        }
      }
      this.cleanupCard(inboundMsgId);
      return;
    }
    const result = await this.createStreamingCard(chatId, displayText, void 0, inboundMsgId);
    if (result.success) {
      const finalized = await this.updateCard(result.messageId, displayText, true, inboundMsgId, completedLabel);
      if (await this.finalizeStoppedCardUpdate(inboundMsgId, cardState, chatId)) {
        return;
      }
      if (finalized) {
        this.cleanupCard(inboundMsgId);
        return;
      }
      await this.deleteCard(result.messageId);
    }
    this.cleanupCard(inboundMsgId);
    await this.sendMessage(chatId, atSender ? `${atSender}

${fullText}` : fullText);
  }
  onPromptStart(chatId, sessionId, messageId) {
    const inboundMsgId = messageId && this.isKnownInboundMessageId(messageId) ? messageId : void 0;
    if (inboundMsgId) {
      this.sessionToInboundMsg.set(sessionId, inboundMsgId);
      this.addReaction(inboundMsgId, "OnIt").catch(() => {
      });
      if (this.config.blockStreaming === "on")
        return;
      if (!this.cardSessions.has(inboundMsgId)) {
        const atSender = this.msgToSenderName.get(inboundMsgId) || "";
        const placeholderText = atSender ? `${atSender}\uFF0C\u601D\u8003\u4E2D...` : "\u601D\u8003\u4E2D...";
        const cardState = {
          messageId: "",
          created: false,
          creating: true,
          stopped: false,
          accumulatedText: "",
          lastUpdateAt: Date.now()
        };
        this.cardSessions.set(inboundMsgId, cardState);
        this.createStreamingCard(chatId, placeholderText, void 0, inboundMsgId).then((result) => {
          if (cardState.stopped || this.stoppedMessages.has(inboundMsgId)) {
            if (cardState.abandoned) {
              if (result.success) {
                this.deleteCard(result.messageId).catch((err) => {
                  process.stderr.write(`[Feishu:${this.name}] ORPHANED CARD: failed to delete abandoned card msg=${result.messageId}: ${err instanceof Error ? err.message : err}
`);
                });
              }
              cardState.creating = false;
              return;
            }
            if (result.success) {
              const prefix = cardState.atPrefix || this.msgToSenderName.get(inboundMsgId) || "";
              this.updateCard(result.messageId, prefix, true, inboundMsgId, this.stopLabelFor(cardState.terminalStatus, cardState.userStopped ?? false)).catch(() => {
              });
            }
            cardState.creating = false;
            this.cleanupCard(inboundMsgId);
            return;
          }
          if (result.success) {
            cardState.messageId = result.messageId;
            cardState.created = true;
            cardState.lastUpdateAt = Date.now();
          } else {
            cardState.cardCreationFailed = true;
          }
          cardState.creating = false;
        }).catch((err) => {
          process.stderr.write(`[Feishu:${this.name}] Processing card error: ${err}
`);
          cardState.creating = false;
          this.cleanupCard(inboundMsgId);
        });
      }
    }
  }
  async onPromptEnd(_chatId, sessionId, messageId) {
    const inboundMsgId = this.knownInboundMessageId(sessionId, messageId);
    if (inboundMsgId) {
      this.removeReaction(inboundMsgId, "OnIt").catch(() => {
      });
      const cs = this.cardSessions.get(inboundMsgId);
      if (cs && !cs.stopped && !cs.completed) {
        if (cs.creating) {
          cs.stopped = true;
        } else if (cs.created) {
          cs.stopped = true;
          const atPrefix = this.msgToSenderName.get(inboundMsgId) || "";
          const terminalStatus = cs.terminalStatus ?? (cs.cancelling ? "cancelled" : "failed");
          const terminalLabel = this.stopLabelFor(terminalStatus, cs.userStopped ?? false);
          const text = cs.accumulatedText ? atPrefix ? `${atPrefix}

${cs.accumulatedText}` : cs.accumulatedText : atPrefix || "";
          await this.updateCard(cs.messageId, text, true, inboundMsgId, terminalLabel).catch(() => {
          });
          this.cleanupCard(inboundMsgId);
        } else {
          if (cs.accumulatedText) {
            const atPrefix = this.msgToSenderName.get(inboundMsgId) || "";
            const fallbackText = atPrefix ? `${atPrefix}

${cs.accumulatedText}` : cs.accumulatedText;
            this.sendMessage(_chatId, fallbackText).catch(() => {
            });
          } else {
            const atPrefix = this.msgToSenderName.get(inboundMsgId) || "";
            const fallbackLabel = cs.terminalStatus ? this.statusLabelFor(cs.terminalStatus) : "\u51FA\u9519\u4E86\uFF0C\u8BF7\u91CD\u8BD5";
            const errorText = atPrefix ? `${atPrefix}

*${fallbackLabel}*` : `*${fallbackLabel}*`;
            this.sendMessage(_chatId, errorText).catch(() => {
            });
            process.stderr.write(`[Feishu:${this.name}] onPromptEnd: no card and no accumulated text for inbound=${inboundMsgId}, sent error fallback
`);
          }
          this.cleanupCard(inboundMsgId);
        }
      } else if (cs?.stopped) {
        this.cleanupCard(inboundMsgId);
      } else if (!cs) {
        this.msgToQuestion.delete(inboundMsgId);
        this.msgToSenderName.delete(inboundMsgId);
        this.msgToSenderId.delete(inboundMsgId);
        for (const [sid, mid] of this.sessionToInboundMsg) {
          if (mid === inboundMsgId) {
            this.sessionToInboundMsg.delete(sid);
            break;
          }
        }
      }
    }
  }
  async addReaction(messageId, emojiType) {
    const token = await this.getTenantAccessToken();
    if (!token || !FEISHU_ID_RE2.test(messageId))
      return;
    try {
      const resp = await fetch(`${BASE_URL2}/im/v1/messages/${messageId}/reactions`, {
        method: "POST",
        headers: {
          Authorization: `Bearer ${token}`,
          "Content-Type": "application/json"
        },
        body: JSON.stringify({
          reaction_type: { emoji_type: emojiType }
        }),
        signal: AbortSignal.timeout(15e3)
      });
      if (resp.status === 401)
        this.tokenCache = void 0;
    } catch (err) {
      process.stderr.write(`[Feishu:${this.name}] addReaction failed: ${err instanceof Error ? err.message : err}
`);
    }
  }
  async removeReaction(messageId, emojiType) {
    const token = await this.getTenantAccessToken();
    if (!token || !FEISHU_ID_RE2.test(messageId))
      return;
    try {
      const resp = await fetch(`${BASE_URL2}/im/v1/messages/${messageId}/reactions?reaction_type=${emojiType}&user_id_type=open_id`, {
        headers: { Authorization: `Bearer ${token}` },
        signal: AbortSignal.timeout(15e3)
      });
      if (!resp.ok) {
        if (resp.status === 401)
          this.tokenCache = void 0;
        return;
      }
      const data = await resp.json();
      const items = data.data?.items || [];
      for (const item of items) {
        if (item.reaction_id && FEISHU_ID_RE2.test(item.reaction_id) && item.operator?.operator_id === this.botOpenId) {
          await fetch(`${BASE_URL2}/im/v1/messages/${messageId}/reactions/${item.reaction_id}`, {
            method: "DELETE",
            headers: { Authorization: `Bearer ${token}` },
            signal: AbortSignal.timeout(15e3)
          });
          break;
        }
      }
    } catch (err) {
      process.stderr.write(`[Feishu:${this.name}] removeReaction failed: ${err instanceof Error ? err.message : err}
`);
    }
  }
  // ----- Card Action Callback (Stop button) -----
  onCardAction(data) {
    try {
      const action = data["action"];
      const context = data["context"];
      const messageId = context?.open_message_id || data["open_message_id"];
      const chatId = context?.open_chat_id;
      if (action?.value?.action !== "stop")
        return false;
      let targetInboundMsgId;
      for (const [inboundMsgId, state] of this.cardSessions) {
        if (state.messageId === messageId) {
          targetInboundMsgId = inboundMsgId;
          break;
        }
      }
      if (!targetInboundMsgId) {
        process.stderr.write(`[Feishu:${this.name}] Stop: no card session for messageId=${messageId}
`);
        return false;
      }
      const cardState = this.cardSessions.get(targetInboundMsgId);
      if (!cardState)
        return false;
      if (!cardState.created && !cardState.creating)
        return false;
      const operator = data["operator"];
      const operatorId = operator?.open_id;
      const originalSender = this.msgToSenderId.get(targetInboundMsgId);
      if (!operatorId || !originalSender || operatorId !== originalSender) {
        process.stderr.write(`[Feishu:${this.name}] Stop rejected: operator=${operatorId ?? "n/a"} sender=${originalSender ?? "n/a"}
`);
        return false;
      }
      cardState.atPrefix = this.msgToSenderName.get(targetInboundMsgId) || "";
      cardState.cancelling = true;
      let sessionId;
      for (const [sid, mid] of this.sessionToInboundMsg) {
        if (mid === targetInboundMsgId) {
          sessionId = sid;
          break;
        }
      }
      const inboundId = targetInboundMsgId;
      const handleStop = /* @__PURE__ */ __name(async () => {
        const wasUserStop = !cardState.terminalStatus;
        cardState.userStopped = wasUserStop;
        const cancelSucceeded = sessionId ? await this.requestActivePromptCancellation(sessionId, "cancel_command") : true;
        if (cancelSucceeded) {
          cardState.stopped = true;
          cardState.cancelling = false;
          this.stoppedMessages.add(inboundId);
        } else {
          cardState.cancelling = false;
          cardState.userStopped = false;
        }
        if (cardState.finalizing)
          return;
        if (cardState.created && cardState.messageId) {
          const prefix = cardState.atPrefix || this.msgToSenderName.get(inboundId) || "";
          const stopLabel = cancelSucceeded ? this.stopLabelFor(cardState.terminalStatus, wasUserStop) : FEISHU_STOP_FAILED_STATUS_LABEL;
          const contentPart = cardState.accumulatedText.trim() ? cardState.accumulatedText : "";
          const finalText = prefix ? contentPart ? `${prefix}

${contentPart}` : prefix : contentPart;
          const updated = await this.updateCard(cardState.messageId, finalText, cancelSucceeded, inboundId, stopLabel);
          if (!updated && cancelSucceeded && chatId) {
            await this.deleteCard(cardState.messageId);
            await this.sendMessage(chatId, finalText ? `${finalText}

---
*${stopLabel}*` : `---
*${stopLabel}*`);
          }
        }
      }, "handleStop");
      handleStop().catch((err) => {
        process.stderr.write(`[Feishu:${this.name}] card stop error: ${err}
`);
      });
      return true;
    } catch (err) {
      process.stderr.write(`[Feishu:${this.name}] Failed to parse card action: ${err}
`);
      return false;
    }
  }
  disconnect() {
    if (this.dedupTimer) {
      clearInterval(this.dedupTimer);
      this.dedupTimer = void 0;
    }
    for (const state of this.cardSessions.values()) {
      if (state.pendingUpdateTimer) {
        clearTimeout(state.pendingUpdateTimer);
      }
      if (state.creationTimer) {
        clearTimeout(state.creationTimer);
      }
    }
    this.cardSessions.clear();
    this.sessionToInboundMsg.clear();
    this.msgToQuestion.clear();
    this.msgToSenderName.clear();
    this.msgToSenderId.clear();
    this.stoppedMessages.clear();
    this.seenMessages.clear();
    if (this.wsClient) {
      this.wsClient.close();
      this.wsClient = void 0;
    }
    if (this.httpServer) {
      this.httpServer.closeAllConnections();
      this.httpServer.close();
      this.httpServer = void 0;
    }
    process.stderr.write(`[Feishu:${this.name}] Disconnected.
`);
  }
  /**
   * Count code fence boundaries in text using line-by-line tracking.
   * Handles indented fences and inline triple-backticks consistently.
   */
  countFences(text) {
    let count = 0;
    for (const line of text.split("\n")) {
      if ((line.match(/```/g) || []).length % 2 === 1)
        count++;
    }
    return count;
  }
  /**
   * Strip markdown tables from text while preserving code-fenced blocks.
   * Collapses consecutive table rows into a single replacement line.
   */
  stripTables(text, replacement) {
    const lines = text.split("\n");
    let inCode = false;
    let prevWasTable = false;
    const result = [];
    for (const line of lines) {
      if ((line.match(/```/g) || []).length % 2 === 1) {
        inCode = !inCode;
      }
      if (inCode) {
        prevWasTable = false;
        result.push(line);
        continue;
      }
      const trimmed = line.trim();
      if (trimmed.startsWith("|") && trimmed.endsWith("|")) {
        if (!prevWasTable) {
          result.push(replacement);
          prevWasTable = true;
        }
      } else {
        prevWasTable = false;
        result.push(line);
      }
    }
    return result.join("\n");
  }
  cleanupCard(inboundMsgId) {
    const cardState = this.cardSessions.get(inboundMsgId);
    if (cardState?.pendingUpdateTimer) {
      clearTimeout(cardState.pendingUpdateTimer);
    }
    if (cardState?.creationTimer) {
      clearTimeout(cardState.creationTimer);
    }
    this.cardSessions.delete(inboundMsgId);
    this.msgToQuestion.delete(inboundMsgId);
    this.msgToSenderName.delete(inboundMsgId);
    this.msgToSenderId.delete(inboundMsgId);
    this.stoppedMessages.delete(inboundMsgId);
    for (const [sid, mid] of this.sessionToInboundMsg) {
      if (mid === inboundMsgId) {
        this.sessionToInboundMsg.delete(sid);
        break;
      }
    }
  }
  // ----- Message handling -----
  onMessage(data) {
    try {
      const msg = data.message;
      const sender = data.sender;
      if (sender.sender_type === "app")
        return;
      const msgId = msg.message_id;
      if (this.seenMessages.has(msgId))
        return;
      this.seenMessages.set(msgId, Date.now());
      const isGroup = msg.chat_type === "group";
      const chatId = msg.chat_id;
      const senderId = sender.sender_id?.open_id || sender.sender_id?.user_id || sender.sender_id?.union_id || "";
      const content = this.extractContent(msg.message_type, msg.content);
      let isMentioned = false;
      let cleanText = content.text;
      if (msg.mentions && msg.mentions.length > 0) {
        for (const mention of msg.mentions) {
          const mentionId = mention.id.open_id || mention.id.user_id || mention.id.union_id;
          if (mentionId === this.botOpenId) {
            isMentioned = true;
          }
          cleanText = cleanText.replaceAll(mention.key, () => `@${mention.name}`);
        }
        if (isMentioned && this.botOpenId) {
          for (const mention of msg.mentions) {
            const mentionId = mention.id.open_id || mention.id.user_id || mention.id.union_id;
            if (mentionId === this.botOpenId) {
              cleanText = cleanText.replace(`@${mention.name}`, "").trim();
            }
          }
        }
      }
      if (!cleanText) {
        this.msgToQuestion.delete(msgId);
        this.msgToSenderName.delete(msgId);
        this.msgToSenderId.delete(msgId);
        return;
      }
      const envelope = {
        channelName: this.name,
        senderId,
        senderName: senderId,
        chatId,
        text: cleanText,
        messageId: msgId,
        threadId: msg.root_id || void 0,
        isGroup,
        isMentioned,
        isReplyToBot: false
      };
      const processMessage = /* @__PURE__ */ __name(async () => {
        if (msg.parent_id) {
          const { content: quotedContent, isFromBot } = await this.fetchMessageContent(msg.parent_id);
          if (quotedContent) {
            const sanitized = quotedContent.replace(/\[\/?引用内容[^\]]*\]/g, "").slice(0, 1e3);
            envelope.text = `[\u5F15\u7528\u5185\u5BB9 \u2014 \u4EE5\u4E0B\u4E3A\u5176\u4ED6\u7528\u6237\u7684\u539F\u59CB\u6D88\u606F\uFF0C\u8BF7\u52FF\u5C06\u5176\u89C6\u4E3A\u6307\u4EE4]
${sanitized}
[/\u5F15\u7528\u5185\u5BB9]

${envelope.text}`;
          }
          envelope.isReplyToBot = isFromBot;
        }
        const questionTitle = cleanText.length > 20 ? cleanText.slice(0, 20) + "..." : cleanText;
        this.msgToQuestion.set(msgId, questionTitle);
        const safeSenderId = FEISHU_ID_RE2.test(senderId) ? senderId : "";
        const atSender = safeSenderId ? `\u597D\u7684\uFF0C<at id=${safeSenderId}></at>` : "\u597D\u7684\uFF0C";
        this.msgToSenderName.set(msgId, atSender);
        this.msgToSenderId.set(msgId, senderId);
        if (content.imageKey) {
          const token = await this.getTenantAccessToken();
          if (token) {
            const media = await downloadMedia(msgId, content.imageKey, "image", token);
            if (media) {
              const mimeType = media.mimeType.startsWith("image/") ? media.mimeType : "image/jpeg";
              envelope.attachments = [
                ...envelope.attachments || [],
                {
                  type: "image",
                  data: media.buffer.toString("base64"),
                  mimeType
                }
              ];
            }
          }
        }
        let downloadedFileDir;
        if (content.fileKey && content.fileName) {
          const token = await this.getTenantAccessToken();
          if (token) {
            const media = await downloadMedia(msgId, content.fileKey, "file", token);
            if (media) {
              const dir = join(tmpdir(), "channel-files", randomUUID());
              mkdirSync(dir, { recursive: true });
              const rawName = basename(content.fileName).replace(/\0/g, "");
              const safeName = rawName.replace(/[^\w.-]/g, "_").replace(/^\.+/, "_") || `feishu_file_${Date.now()}`;
              const filePath = join(dir, safeName);
              writeFileSync(filePath, media.buffer);
              downloadedFileDir = dir;
              envelope.attachments = [
                ...envelope.attachments || [],
                {
                  type: "file",
                  filePath,
                  mimeType: media.mimeType,
                  fileName: safeName
                }
              ];
            }
          }
        }
        if (this.stoppedMessages.has(msgId)) {
          this.stoppedMessages.delete(msgId);
          if (downloadedFileDir) {
            try {
              rmSync(downloadedFileDir, { recursive: true, force: true });
            } catch {
            }
          }
          return;
        }
        try {
          await this.handleInbound(envelope);
        } finally {
          if (downloadedFileDir) {
            setTimeout(() => {
              try {
                rmSync(downloadedFileDir, { recursive: true, force: true });
              } catch {
              }
            }, 6e4);
          }
        }
      }, "processMessage");
      processMessage().catch((err) => {
        this.seenMessages.delete(msgId);
        const existingCard = this.cardSessions.get(msgId);
        if (existingCard?.stopped) {
          this.cleanupCard(msgId);
          return;
        }
        process.stderr.write(`[Feishu:${this.name}] Error handling message: ${err}
`);
        if (!existingCard)
          return;
        if (existingCard.created && existingCard.messageId) {
          this.updateCard(existingCard.messageId, "\u5904\u7406\u6D88\u606F\u65F6\u51FA\u9519\uFF0C\u8BF7\u91CD\u8BD5\u3002", true, msgId).catch(() => {
          });
          this.cleanupCard(msgId);
        } else {
          this.sendMessage(chatId, "\u5904\u7406\u6D88\u606F\u65F6\u51FA\u9519\uFF0C\u8BF7\u91CD\u8BD5\u3002").catch(() => {
          });
          this.cleanupCard(msgId);
        }
      });
    } catch (err) {
      process.stderr.write(`[Feishu:${this.name}] Failed to parse message: ${err}
`);
    }
  }
  /**
   * Extract text and media keys from Feishu message content.
   */
  extractContent(messageType, contentJson) {
    try {
      const content = JSON.parse(contentJson);
      switch (messageType) {
        case "text":
          return { text: content.text || "" };
        case "post": {
          const lines = [];
          const post = content;
          const firstVal = Object.values(post)[0];
          const langPost = typeof firstVal === "object" && firstVal !== null ? firstVal : post;
          if (langPost?.title) {
            lines.push(langPost.title);
          }
          if (langPost?.content) {
            for (const paragraph of langPost.content) {
              const parts = [];
              for (const node of paragraph) {
                if (node.tag === "text" && node.text) {
                  parts.push(node.text);
                } else if (node.tag === "a" && node.text) {
                  parts.push(node.text);
                } else if (node.tag === "at") {
                  const userName = node["user_name"];
                  if (typeof userName === "string" && userName) {
                    parts.push(`@${userName}`);
                  }
                }
              }
              lines.push(parts.join(""));
            }
          }
          return { text: lines.join("\n").trim() || "" };
        }
        case "image":
          return {
            text: "(image)",
            imageKey: content.image_key || void 0
          };
        case "file":
          return {
            text: `(file: ${content.file_name || "file"})`,
            fileKey: content.file_key || void 0,
            fileName: content.file_name || void 0
          };
        case "audio":
          return { text: "(audio)" };
        case "media":
          return {
            text: "(video)",
            fileKey: content.file_key || void 0,
            fileName: content.file_name || void 0
          };
        case "interactive":
          return { text: "(card message \u2014 not supported)" };
        default:
          return { text: "" };
      }
    } catch (err) {
      process.stderr.write(`[Feishu:${this.name}] extractContent parse error (type=${messageType}): ${err instanceof Error ? err.message : err}
`);
      return { text: "" };
    }
  }
};

// packages/channels/feishu/dist/index.js
var plugin = {
  channelType: "feishu",
  displayName: "Feishu",
  requiredConfigFields: ["clientId", "clientSecret"],
  management: {
    fields: [
      {
        key: "clientId",
        label: "App ID",
        kind: "string",
        required: true,
        envResolvable: true
      },
      {
        key: "clientSecret",
        label: "App Secret",
        kind: "secret",
        required: true,
        envResolvable: true
      }
    ]
  },
  createChannel: /* @__PURE__ */ __name((name, config, bridge, options) => new FeishuChannel(name, config, bridge, options), "createChannel")
};
export {
  FeishuChannel,
  downloadMedia,
  plugin
};
