File Explorer

/proc/self/root/var/runtime/node_modules/@aws-sdk/client-s3vectors/dist-cjs

This explorer reads the filesystem of the server it runs on, so /workspace/user isn't present here. Browsing and the terminal still work against this server's own disk from /.

index.js15.6 KB · 435 lines
'use strict'; var client$1 = require('@aws-sdk/core/client');var core = require('@smithy/core');var client = require('@smithy/core/client');var config = require('@smithy/core/config');var endpoints = require('@smithy/core/endpoints');var protocols = require('@smithy/core/protocols');var retry = require('@smithy/core/retry');var schema = require('@smithy/core/schema');var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');var runtimeConfig = require('./runtimeConfig');var schemas_0 = require('./schemas/schemas_0');var errors = require('./models/errors');var S3VectorsServiceException = require('./models/S3VectorsServiceException'); const resolveClientEndpointParameters = (options) => {    return Object.assign(options, {        useFipsEndpoint: options.useFipsEndpoint ?? false,        defaultSigningName: "s3vectors",    });};const commonParams = {    UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },    Endpoint: { type: "builtInParams", name: "endpoint" },    Region: { type: "builtInParams", name: "region" },}; const getHttpAuthExtensionConfiguration = (runtimeConfig) => {    const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;    let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;    let _credentials = runtimeConfig.credentials;    return {        setHttpAuthScheme(httpAuthScheme) {            const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);            if (index === -1) {                _httpAuthSchemes.push(httpAuthScheme);            }            else {                _httpAuthSchemes.splice(index, 1, httpAuthScheme);            }        },        httpAuthSchemes() {            return _httpAuthSchemes;        },        setHttpAuthSchemeProvider(httpAuthSchemeProvider) {            _httpAuthSchemeProvider = httpAuthSchemeProvider;        },        httpAuthSchemeProvider() {            return _httpAuthSchemeProvider;        },        setCredentials(credentials) {            _credentials = credentials;        },        credentials() {            return _credentials;        },    };};const resolveHttpAuthRuntimeConfig = (config) => {    return {        httpAuthSchemes: config.httpAuthSchemes(),        httpAuthSchemeProvider: config.httpAuthSchemeProvider(),        credentials: config.credentials(),    };}; const resolveRuntimeExtensions = (runtimeConfig, extensions) => {    const extensionConfiguration = Object.assign(client$1.getAwsRegionExtensionConfiguration(runtimeConfig), client.getDefaultExtensionConfiguration(runtimeConfig), protocols.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));    extensions.forEach((extension) => extension.configure(extensionConfiguration));    return Object.assign(runtimeConfig, client$1.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));}; class S3VectorsClient extends client.Client {    config;    constructor(...[configuration]) {        const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});        super(_config_0);        this.initConfig = _config_0;        const _config_1 = resolveClientEndpointParameters(_config_0);        const _config_2 = client$1.resolveUserAgentConfig(_config_1);        const _config_3 = retry.resolveRetryConfig(_config_2);        const _config_4 = config.resolveRegionConfig(_config_3);        const _config_5 = client$1.resolveHostHeaderConfig(_config_4);        const _config_6 = endpoints.resolveEndpointConfig(_config_5);        const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);        const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);        this.config = _config_8;        this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));        this.middlewareStack.use(client$1.getUserAgentPlugin(this.config));        this.middlewareStack.use(retry.getRetryPlugin(this.config));        this.middlewareStack.use(protocols.getContentLengthPlugin(this.config));        this.middlewareStack.use(client$1.getHostHeaderPlugin(this.config));        this.middlewareStack.use(client$1.getLoggerPlugin(this.config));        this.middlewareStack.use(client$1.getRecursionDetectionPlugin(this.config));        this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {            httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultS3VectorsHttpAuthSchemeParametersProvider,            identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({                "aws.auth#sigv4": config.credentials,            }),        }));        this.middlewareStack.use(core.getHttpSigningPlugin(this.config));    }    destroy() {        super.destroy();    }} class CreateIndexCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("S3Vectors", "CreateIndex", {})    .n("S3VectorsClient", "CreateIndexCommand")    .sc(schemas_0.CreateIndex$)    .build() {} class CreateVectorBucketCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("S3Vectors", "CreateVectorBucket", {})    .n("S3VectorsClient", "CreateVectorBucketCommand")    .sc(schemas_0.CreateVectorBucket$)    .build() {} class DeleteIndexCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("S3Vectors", "DeleteIndex", {})    .n("S3VectorsClient", "DeleteIndexCommand")    .sc(schemas_0.DeleteIndex$)    .build() {} class DeleteVectorBucketCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("S3Vectors", "DeleteVectorBucket", {})    .n("S3VectorsClient", "DeleteVectorBucketCommand")    .sc(schemas_0.DeleteVectorBucket$)    .build() {} class DeleteVectorBucketPolicyCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("S3Vectors", "DeleteVectorBucketPolicy", {})    .n("S3VectorsClient", "DeleteVectorBucketPolicyCommand")    .sc(schemas_0.DeleteVectorBucketPolicy$)    .build() {} class DeleteVectorsCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("S3Vectors", "DeleteVectors", {})    .n("S3VectorsClient", "DeleteVectorsCommand")    .sc(schemas_0.DeleteVectors$)    .build() {} class GetIndexCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("S3Vectors", "GetIndex", {})    .n("S3VectorsClient", "GetIndexCommand")    .sc(schemas_0.GetIndex$)    .build() {} class GetVectorBucketCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("S3Vectors", "GetVectorBucket", {})    .n("S3VectorsClient", "GetVectorBucketCommand")    .sc(schemas_0.GetVectorBucket$)    .build() {} class GetVectorBucketPolicyCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("S3Vectors", "GetVectorBucketPolicy", {})    .n("S3VectorsClient", "GetVectorBucketPolicyCommand")    .sc(schemas_0.GetVectorBucketPolicy$)    .build() {} class GetVectorsCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("S3Vectors", "GetVectors", {})    .n("S3VectorsClient", "GetVectorsCommand")    .sc(schemas_0.GetVectors$)    .build() {} class ListIndexesCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("S3Vectors", "ListIndexes", {})    .n("S3VectorsClient", "ListIndexesCommand")    .sc(schemas_0.ListIndexes$)    .build() {} class ListTagsForResourceCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("S3Vectors", "ListTagsForResource", {})    .n("S3VectorsClient", "ListTagsForResourceCommand")    .sc(schemas_0.ListTagsForResource$)    .build() {} class ListVectorBucketsCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("S3Vectors", "ListVectorBuckets", {})    .n("S3VectorsClient", "ListVectorBucketsCommand")    .sc(schemas_0.ListVectorBuckets$)    .build() {} class ListVectorsCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("S3Vectors", "ListVectors", {})    .n("S3VectorsClient", "ListVectorsCommand")    .sc(schemas_0.ListVectors$)    .build() {} class PutVectorBucketPolicyCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("S3Vectors", "PutVectorBucketPolicy", {})    .n("S3VectorsClient", "PutVectorBucketPolicyCommand")    .sc(schemas_0.PutVectorBucketPolicy$)    .build() {} class PutVectorsCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("S3Vectors", "PutVectors", {})    .n("S3VectorsClient", "PutVectorsCommand")    .sc(schemas_0.PutVectors$)    .build() {} class QueryVectorsCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("S3Vectors", "QueryVectors", {})    .n("S3VectorsClient", "QueryVectorsCommand")    .sc(schemas_0.QueryVectors$)    .build() {} class TagResourceCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("S3Vectors", "TagResource", {})    .n("S3VectorsClient", "TagResourceCommand")    .sc(schemas_0.TagResource$)    .build() {} class UntagResourceCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("S3Vectors", "UntagResource", {})    .n("S3VectorsClient", "UntagResourceCommand")    .sc(schemas_0.UntagResource$)    .build() {} const paginateListIndexes = core.createPaginator(S3VectorsClient, ListIndexesCommand, "nextToken", "nextToken", "maxResults"); const paginateListVectorBuckets = core.createPaginator(S3VectorsClient, ListVectorBucketsCommand, "nextToken", "nextToken", "maxResults"); const paginateListVectors = core.createPaginator(S3VectorsClient, ListVectorsCommand, "nextToken", "nextToken", "maxResults"); const commands = {    CreateIndexCommand,    CreateVectorBucketCommand,    DeleteIndexCommand,    DeleteVectorBucketCommand,    DeleteVectorBucketPolicyCommand,    DeleteVectorsCommand,    GetIndexCommand,    GetVectorBucketCommand,    GetVectorBucketPolicyCommand,    GetVectorsCommand,    ListIndexesCommand,    ListTagsForResourceCommand,    ListVectorBucketsCommand,    ListVectorsCommand,    PutVectorBucketPolicyCommand,    PutVectorsCommand,    QueryVectorsCommand,    TagResourceCommand,    UntagResourceCommand,};const paginators = {    paginateListIndexes,    paginateListVectorBuckets,    paginateListVectors,};class S3Vectors extends S3VectorsClient {}client.createAggregatedClient(commands, S3Vectors, { paginators }); const DataType = {    FLOAT32: "float32",};const DistanceMetric = {    COSINE: "cosine",    EUCLIDEAN: "euclidean",};const SseType = {    AES256: "AES256",    AWS_KMS: "aws:kms",}; exports.$Command = client.Command;exports.__Client = client.Client;exports.S3VectorsServiceException = S3VectorsServiceException.S3VectorsServiceException;exports.CreateIndexCommand = CreateIndexCommand;exports.CreateVectorBucketCommand = CreateVectorBucketCommand;exports.DataType = DataType;exports.DeleteIndexCommand = DeleteIndexCommand;exports.DeleteVectorBucketCommand = DeleteVectorBucketCommand;exports.DeleteVectorBucketPolicyCommand = DeleteVectorBucketPolicyCommand;exports.DeleteVectorsCommand = DeleteVectorsCommand;exports.DistanceMetric = DistanceMetric;exports.GetIndexCommand = GetIndexCommand;exports.GetVectorBucketCommand = GetVectorBucketCommand;exports.GetVectorBucketPolicyCommand = GetVectorBucketPolicyCommand;exports.GetVectorsCommand = GetVectorsCommand;exports.ListIndexesCommand = ListIndexesCommand;exports.ListTagsForResourceCommand = ListTagsForResourceCommand;exports.ListVectorBucketsCommand = ListVectorBucketsCommand;exports.ListVectorsCommand = ListVectorsCommand;exports.PutVectorBucketPolicyCommand = PutVectorBucketPolicyCommand;exports.PutVectorsCommand = PutVectorsCommand;exports.QueryVectorsCommand = QueryVectorsCommand;exports.S3Vectors = S3Vectors;exports.S3VectorsClient = S3VectorsClient;exports.SseType = SseType;exports.TagResourceCommand = TagResourceCommand;exports.UntagResourceCommand = UntagResourceCommand;exports.paginateListIndexes = paginateListIndexes;exports.paginateListVectorBuckets = paginateListVectorBuckets;exports.paginateListVectors = paginateListVectors;Object.prototype.hasOwnProperty.call(schemas_0, '__proto__') &&    !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&    Object.defineProperty(exports, '__proto__', {        enumerable: true,        value: schemas_0['__proto__']    }); Object.keys(schemas_0).forEach(function (k) {    if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = schemas_0[k];});Object.prototype.hasOwnProperty.call(errors, '__proto__') &&    !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&    Object.defineProperty(exports, '__proto__', {        enumerable: true,        value: errors['__proto__']    }); Object.keys(errors).forEach(function (k) {    if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = errors[k];});