botframework-connector
Version:
Bot Connector is autorest generated connector client.
100 lines • 3.18 kB
JavaScript
;
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Attachments = void 0;
const core_http_1 = require("@azure/core-http");
const Mappers = __importStar(require("../models/attachmentsMappers"));
const Parameters = __importStar(require("../models/parameters"));
/** Class representing a Attachments. */
class Attachments {
/**
* Create a Attachments.
* @param {ConnectorClientContext} client Reference to the service client.
*/
constructor(client) {
this.client = client;
}
getAttachmentInfo(attachmentId, options, callback) {
return this.client.sendOperationRequest({
attachmentId,
options
}, getAttachmentInfoOperationSpec, callback);
}
getAttachment(attachmentId, viewId, options, callback) {
return this.client.sendOperationRequest({
attachmentId,
viewId,
options
}, getAttachmentOperationSpec, callback);
}
}
exports.Attachments = Attachments;
// Operation Specifications
const serializer = new core_http_1.Serializer(Mappers);
const getAttachmentInfoOperationSpec = {
httpMethod: "GET",
path: "v3/attachments/{attachmentId}",
urlParameters: [
Parameters.attachmentId
],
responses: {
200: {
bodyMapper: Mappers.AttachmentInfo
},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
serializer
};
const getAttachmentOperationSpec = {
httpMethod: "GET",
path: "v3/attachments/{attachmentId}/views/{viewId}",
urlParameters: [
Parameters.attachmentId,
Parameters.viewId
],
responses: {
200: {
bodyMapper: {
serializedName: "parsedResponse",
type: {
name: "Stream"
}
}
},
301: {},
302: {},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
serializer
};
//# sourceMappingURL=attachments.js.map