File Explorer

/proc/self/root/var/runtime/node_modules/@aws-sdk/client-repostspace/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.js24.1 KB · 688 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 RepostspaceServiceException = require('./models/RepostspaceServiceException'); const resolveClientEndpointParameters = (options) => {    return Object.assign(options, {        useDualstackEndpoint: options.useDualstackEndpoint ?? false,        useFipsEndpoint: options.useFipsEndpoint ?? false,        defaultSigningName: "repostspace",    });};const commonParams = {    UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },    Endpoint: { type: "builtInParams", name: "endpoint" },    Region: { type: "builtInParams", name: "region" },    UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },}; 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 RepostspaceClient 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.defaultRepostspaceHttpAuthSchemeParametersProvider,            identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({                "aws.auth#sigv4": config.credentials,            }),        }));        this.middlewareStack.use(core.getHttpSigningPlugin(this.config));    }    destroy() {        super.destroy();    }} class BatchAddChannelRoleToAccessorsCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("RepostSpace", "BatchAddChannelRoleToAccessors", {})    .n("RepostspaceClient", "BatchAddChannelRoleToAccessorsCommand")    .sc(schemas_0.BatchAddChannelRoleToAccessors$)    .build() {} class BatchAddRoleCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("RepostSpace", "BatchAddRole", {})    .n("RepostspaceClient", "BatchAddRoleCommand")    .sc(schemas_0.BatchAddRole$)    .build() {} class BatchRemoveChannelRoleFromAccessorsCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("RepostSpace", "BatchRemoveChannelRoleFromAccessors", {})    .n("RepostspaceClient", "BatchRemoveChannelRoleFromAccessorsCommand")    .sc(schemas_0.BatchRemoveChannelRoleFromAccessors$)    .build() {} class BatchRemoveRoleCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("RepostSpace", "BatchRemoveRole", {})    .n("RepostspaceClient", "BatchRemoveRoleCommand")    .sc(schemas_0.BatchRemoveRole$)    .build() {} class CreateChannelCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("RepostSpace", "CreateChannel", {})    .n("RepostspaceClient", "CreateChannelCommand")    .sc(schemas_0.CreateChannel$)    .build() {} class CreateSpaceCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("RepostSpace", "CreateSpace", {})    .n("RepostspaceClient", "CreateSpaceCommand")    .sc(schemas_0.CreateSpace$)    .build() {} class DeleteSpaceCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("RepostSpace", "DeleteSpace", {})    .n("RepostspaceClient", "DeleteSpaceCommand")    .sc(schemas_0.DeleteSpace$)    .build() {} class DeregisterAdminCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("RepostSpace", "DeregisterAdmin", {})    .n("RepostspaceClient", "DeregisterAdminCommand")    .sc(schemas_0.DeregisterAdmin$)    .build() {} class GetChannelCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("RepostSpace", "GetChannel", {})    .n("RepostspaceClient", "GetChannelCommand")    .sc(schemas_0.GetChannel$)    .build() {} class GetSpaceCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("RepostSpace", "GetSpace", {})    .n("RepostspaceClient", "GetSpaceCommand")    .sc(schemas_0.GetSpace$)    .build() {} class ListChannelsCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("RepostSpace", "ListChannels", {})    .n("RepostspaceClient", "ListChannelsCommand")    .sc(schemas_0.ListChannels$)    .build() {} class ListSpacesCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("RepostSpace", "ListSpaces", {})    .n("RepostspaceClient", "ListSpacesCommand")    .sc(schemas_0.ListSpaces$)    .build() {} class ListTagsForResourceCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("RepostSpace", "ListTagsForResource", {})    .n("RepostspaceClient", "ListTagsForResourceCommand")    .sc(schemas_0.ListTagsForResource$)    .build() {} class RegisterAdminCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("RepostSpace", "RegisterAdmin", {})    .n("RepostspaceClient", "RegisterAdminCommand")    .sc(schemas_0.RegisterAdmin$)    .build() {} class SendInvitesCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("RepostSpace", "SendInvites", {})    .n("RepostspaceClient", "SendInvitesCommand")    .sc(schemas_0.SendInvites$)    .build() {} class TagResourceCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("RepostSpace", "TagResource", {})    .n("RepostspaceClient", "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("RepostSpace", "UntagResource", {})    .n("RepostspaceClient", "UntagResourceCommand")    .sc(schemas_0.UntagResource$)    .build() {} class UpdateChannelCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("RepostSpace", "UpdateChannel", {})    .n("RepostspaceClient", "UpdateChannelCommand")    .sc(schemas_0.UpdateChannel$)    .build() {} class UpdateSpaceCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("RepostSpace", "UpdateSpace", {})    .n("RepostspaceClient", "UpdateSpaceCommand")    .sc(schemas_0.UpdateSpace$)    .build() {} const paginateListChannels = core.createPaginator(RepostspaceClient, ListChannelsCommand, "nextToken", "nextToken", "maxResults"); const paginateListSpaces = core.createPaginator(RepostspaceClient, ListSpacesCommand, "nextToken", "nextToken", "maxResults"); const checkState$3 = async (client$1, input) => {    let reason;    try {        let result = await client$1.send(new GetChannelCommand(input));        reason = result;        try {            const returnComparator = () => {                return result.channelStatus;            };            if (returnComparator() === "CREATED") {                return { state: client.WaiterState.SUCCESS, reason };            }        }        catch (e) { }        try {            const returnComparator = () => {                return result.channelStatus;            };            if (returnComparator() === "CREATE_FAILED") {                return { state: client.WaiterState.FAILURE, reason };            }        }        catch (e) { }        try {            const returnComparator = () => {                return result.channelStatus;            };            if (returnComparator() === "CREATING") {                return { state: client.WaiterState.RETRY, reason };            }        }        catch (e) { }    }    catch (exception) {        reason = exception;    }    return { state: client.WaiterState.RETRY, reason };};const waitForChannelCreated = async (params, input) => {    const serviceDefaults = { minDelay: 2, maxDelay: 120 };    return client.createWaiter({ ...serviceDefaults, ...params }, input, checkState$3);};const waitUntilChannelCreated = async (params, input) => {    const serviceDefaults = { minDelay: 2, maxDelay: 120 };    const result = await client.createWaiter({ ...serviceDefaults, ...params }, input, checkState$3);    return client.checkExceptions(result);}; const checkState$2 = async (client$1, input) => {    let reason;    try {        let result = await client$1.send(new GetChannelCommand(input));        reason = result;        try {            const returnComparator = () => {                return result.channelStatus;            };            if (returnComparator() === "DELETED") {                return { state: client.WaiterState.SUCCESS, reason };            }        }        catch (e) { }        try {            const returnComparator = () => {                return result.channelStatus;            };            if (returnComparator() === "DELETE_FAILED") {                return { state: client.WaiterState.FAILURE, reason };            }        }        catch (e) { }        try {            const returnComparator = () => {                return result.channelStatus;            };            if (returnComparator() === "DELETING") {                return { state: client.WaiterState.RETRY, reason };            }        }        catch (e) { }    }    catch (exception) {        reason = exception;        if (exception.name === "ResourceNotFoundException") {            return { state: client.WaiterState.SUCCESS, reason };        }    }    return { state: client.WaiterState.RETRY, reason };};const waitForChannelDeleted = async (params, input) => {    const serviceDefaults = { minDelay: 2, maxDelay: 120 };    return client.createWaiter({ ...serviceDefaults, ...params }, input, checkState$2);};const waitUntilChannelDeleted = async (params, input) => {    const serviceDefaults = { minDelay: 2, maxDelay: 120 };    const result = await client.createWaiter({ ...serviceDefaults, ...params }, input, checkState$2);    return client.checkExceptions(result);}; const checkState$1 = async (client$1, input) => {    let reason;    try {        let result = await client$1.send(new GetSpaceCommand(input));        reason = result;        try {            const returnComparator = () => {                return result.status;            };            if (returnComparator() === "CREATED") {                return { state: client.WaiterState.SUCCESS, reason };            }        }        catch (e) { }        try {            const returnComparator = () => {                return result.status;            };            if (returnComparator() === "CREATE_FAILED") {                return { state: client.WaiterState.FAILURE, reason };            }        }        catch (e) { }        try {            const returnComparator = () => {                return result.status;            };            if (returnComparator() === "CREATING") {                return { state: client.WaiterState.RETRY, reason };            }        }        catch (e) { }    }    catch (exception) {        reason = exception;    }    return { state: client.WaiterState.RETRY, reason };};const waitForSpaceCreated = async (params, input) => {    const serviceDefaults = { minDelay: 300, maxDelay: 7200 };    return client.createWaiter({ ...serviceDefaults, ...params }, input, checkState$1);};const waitUntilSpaceCreated = async (params, input) => {    const serviceDefaults = { minDelay: 300, maxDelay: 7200 };    const result = await client.createWaiter({ ...serviceDefaults, ...params }, input, checkState$1);    return client.checkExceptions(result);}; const checkState = async (client$1, input) => {    let reason;    try {        let result = await client$1.send(new GetSpaceCommand(input));        reason = result;        try {            const returnComparator = () => {                return result.status;            };            if (returnComparator() === "DELETED") {                return { state: client.WaiterState.SUCCESS, reason };            }        }        catch (e) { }        try {            const returnComparator = () => {                return result.status;            };            if (returnComparator() === "DELETE_FAILED") {                return { state: client.WaiterState.FAILURE, reason };            }        }        catch (e) { }        try {            const returnComparator = () => {                return result.status;            };            if (returnComparator() === "DELETING") {                return { state: client.WaiterState.RETRY, reason };            }        }        catch (e) { }    }    catch (exception) {        reason = exception;        if (exception.name === "ResourceNotFoundException") {            return { state: client.WaiterState.SUCCESS, reason };        }    }    return { state: client.WaiterState.RETRY, reason };};const waitForSpaceDeleted = async (params, input) => {    const serviceDefaults = { minDelay: 300, maxDelay: 7200 };    return client.createWaiter({ ...serviceDefaults, ...params }, input, checkState);};const waitUntilSpaceDeleted = async (params, input) => {    const serviceDefaults = { minDelay: 300, maxDelay: 7200 };    const result = await client.createWaiter({ ...serviceDefaults, ...params }, input, checkState);    return client.checkExceptions(result);}; const commands = {    BatchAddChannelRoleToAccessorsCommand,    BatchAddRoleCommand,    BatchRemoveChannelRoleFromAccessorsCommand,    BatchRemoveRoleCommand,    CreateChannelCommand,    CreateSpaceCommand,    DeleteSpaceCommand,    DeregisterAdminCommand,    GetChannelCommand,    GetSpaceCommand,    ListChannelsCommand,    ListSpacesCommand,    ListTagsForResourceCommand,    RegisterAdminCommand,    SendInvitesCommand,    TagResourceCommand,    UntagResourceCommand,    UpdateChannelCommand,    UpdateSpaceCommand,};const paginators = {    paginateListChannels,    paginateListSpaces,};const waiters = {    waitUntilChannelCreated,    waitUntilChannelDeleted,    waitUntilSpaceCreated,    waitUntilSpaceDeleted,};class Repostspace extends RepostspaceClient {}client.createAggregatedClient(commands, Repostspace, { paginators, waiters }); const ChannelRole = {    ASKER: "ASKER",    EXPERT: "EXPERT",    MODERATOR: "MODERATOR",    SUPPORTREQUESTOR: "SUPPORTREQUESTOR",};const ValidationExceptionReason = {    CANNOT_PARSE: "cannotParse",    FIELD_VALIDATION_FAILED: "fieldValidationFailed",    OTHER: "other",    UNKNOWN_OPERATION: "unknownOperation",};const Role = {    ADMINISTRATOR: "ADMINISTRATOR",    EXPERT: "EXPERT",    MODERATOR: "MODERATOR",    SUPPORTREQUESTOR: "SUPPORTREQUESTOR",};const ChannelStatus = {    CREATED: "CREATED",    CREATE_FAILED: "CREATE_FAILED",    CREATING: "CREATING",    DELETED: "DELETED",    DELETE_FAILED: "DELETE_FAILED",    DELETING: "DELETING",};const ConfigurationStatus = {    CONFIGURED: "CONFIGURED",    UNCONFIGURED: "UNCONFIGURED",};const FeatureEnableParameter = {    DISABLED: "DISABLED",    ENABLED: "ENABLED",};const TierLevel = {    BASIC: "BASIC",    STANDARD: "STANDARD",};const FeatureEnableStatus = {    DISABLED: "DISABLED",    ENABLED: "ENABLED",    NOT_ALLOWED: "NOT_ALLOWED",};const VanityDomainStatus = {    APPROVED: "APPROVED",    PENDING: "PENDING",    UNAPPROVED: "UNAPPROVED",}; exports.$Command = client.Command;exports.__Client = client.Client;exports.RepostspaceServiceException = RepostspaceServiceException.RepostspaceServiceException;exports.BatchAddChannelRoleToAccessorsCommand = BatchAddChannelRoleToAccessorsCommand;exports.BatchAddRoleCommand = BatchAddRoleCommand;exports.BatchRemoveChannelRoleFromAccessorsCommand = BatchRemoveChannelRoleFromAccessorsCommand;exports.BatchRemoveRoleCommand = BatchRemoveRoleCommand;exports.ChannelRole = ChannelRole;exports.ChannelStatus = ChannelStatus;exports.ConfigurationStatus = ConfigurationStatus;exports.CreateChannelCommand = CreateChannelCommand;exports.CreateSpaceCommand = CreateSpaceCommand;exports.DeleteSpaceCommand = DeleteSpaceCommand;exports.DeregisterAdminCommand = DeregisterAdminCommand;exports.FeatureEnableParameter = FeatureEnableParameter;exports.FeatureEnableStatus = FeatureEnableStatus;exports.GetChannelCommand = GetChannelCommand;exports.GetSpaceCommand = GetSpaceCommand;exports.ListChannelsCommand = ListChannelsCommand;exports.ListSpacesCommand = ListSpacesCommand;exports.ListTagsForResourceCommand = ListTagsForResourceCommand;exports.RegisterAdminCommand = RegisterAdminCommand;exports.Repostspace = Repostspace;exports.RepostspaceClient = RepostspaceClient;exports.Role = Role;exports.SendInvitesCommand = SendInvitesCommand;exports.TagResourceCommand = TagResourceCommand;exports.TierLevel = TierLevel;exports.UntagResourceCommand = UntagResourceCommand;exports.UpdateChannelCommand = UpdateChannelCommand;exports.UpdateSpaceCommand = UpdateSpaceCommand;exports.ValidationExceptionReason = ValidationExceptionReason;exports.VanityDomainStatus = VanityDomainStatus;exports.paginateListChannels = paginateListChannels;exports.paginateListSpaces = paginateListSpaces;exports.waitForChannelCreated = waitForChannelCreated;exports.waitForChannelDeleted = waitForChannelDeleted;exports.waitForSpaceCreated = waitForSpaceCreated;exports.waitForSpaceDeleted = waitForSpaceDeleted;exports.waitUntilChannelCreated = waitUntilChannelCreated;exports.waitUntilChannelDeleted = waitUntilChannelDeleted;exports.waitUntilSpaceCreated = waitUntilSpaceCreated;exports.waitUntilSpaceDeleted = waitUntilSpaceDeleted;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];});