twilio
Version:
A Twilio helper library
63 lines (62 loc) • 2.3 kB
JavaScript
;
/*
* This code was generated by
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
* Twilio Knowledge API
* APIs for managing knowledge bases and knowledge content for AI-powered applications.
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const Version_1 = __importDefault(require("../../base/Version"));
const chunk_1 = require("./v2/chunk");
const knowledge_1 = require("./v2/knowledge");
const knowledgeBasis_1 = require("./v2/knowledgeBasis");
const operation_1 = require("./v2/operation");
const search_1 = require("./v2/search");
class V2 extends Version_1.default {
/**
* Initialize the V2 version of Knowledge
*
* @param domain - The Twilio (Twilio.Knowledge) domain
*/
constructor(domain) {
super(domain, "v2");
}
/** Accessor for chunks resource */
chunks(kbId, knowledgeId) {
return (0, chunk_1.ChunkListInstance)(this, kbId, knowledgeId);
}
/** Implementation */
knowledge(kbId, knowledgeId) {
const listInstance = (0, knowledge_1.KnowledgeListInstance)(this, kbId);
if (knowledgeId !== undefined) {
return listInstance.get(knowledgeId);
}
return listInstance;
}
/** Getter for knowledgeBases resource */
get knowledgeBases() {
this._knowledgeBases =
this._knowledgeBases || (0, knowledgeBasis_1.KnowledgeBasisListInstance)(this);
return this._knowledgeBases;
}
/** Getter for operations resource */
get operations() {
this._operations = this._operations || (0, operation_1.OperationListInstance)(this);
return this._operations;
}
/** Accessor for search resource */
search(kbId) {
return (0, search_1.SearchListInstance)(this)(kbId);
}
}
exports.default = V2;