"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.Stream = exports.ReadAcceptEnum = void 0;
const streamAppend_js_1 = require("../funcs/streamAppend.js");
const streamCheckTail_js_1 = require("../funcs/streamCheckTail.js");
const streamRead_js_1 = require("../funcs/streamRead.js");
const sdks_js_1 = require("../lib/sdks.js");
const fp_js_1 = require("../types/fp.js");
var streamRead_js_2 = require("../funcs/streamRead.js");
Object.defineProperty(exports, "ReadAcceptEnum", { enumerable: true, get: function () { return streamRead_js_2.ReadAcceptEnum; } });
class Stream extends sdks_js_1.ClientSDK {
    /**
     * Retrieve records.
     *
     * @remarks
     * Retrieve a batch of records, or set `Accept: text/event-stream` to stream using server-sent events.
     */
    async read(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, streamRead_js_1.streamRead)(this, request, options));
    }
    /**
     * Append records.
     *
     * @remarks
     * Append a batch of records to a stream.
     */
    async append(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, streamAppend_js_1.streamAppend)(this, request, options));
    }
    /**
     * Check the tail.
     *
     * @remarks
     * Check the sequence number that will be assigned to the next record on a stream.
     */
    async checkTail(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, streamCheckTail_js_1.streamCheckTail)(this, request, options));
    }
}
exports.Stream = Stream;
//# sourceMappingURL=stream.js.map