tianji-client-sdk
Version:
35 lines (34 loc) • 846 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.OpenAPI = exports.Interceptors = void 0;
class Interceptors {
_fns;
constructor() {
this._fns = [];
}
eject(fn) {
const index = this._fns.indexOf(fn);
if (index !== -1) {
this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)];
}
}
use(fn) {
this._fns = [...this._fns, fn];
}
}
exports.Interceptors = Interceptors;
exports.OpenAPI = {
BASE: '/open',
CREDENTIALS: 'include',
ENCODE_PATH: undefined,
HEADERS: undefined,
PASSWORD: undefined,
TOKEN: undefined,
USERNAME: undefined,
VERSION: '1.22.0',
WITH_CREDENTIALS: false,
interceptors: {
request: new Interceptors(),
response: new Interceptors(),
},
};