File Explorer

/proc/self/root/var/runtime/node_modules/@aws-sdk/client-socialmessaging/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.js19.1 KB · 456 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 SocialMessagingServiceException = require('./models/SocialMessagingServiceException'); const resolveClientEndpointParameters = (options) => {    return Object.assign(options, {        useDualstackEndpoint: options.useDualstackEndpoint ?? false,        useFipsEndpoint: options.useFipsEndpoint ?? false,        defaultSigningName: "social-messaging",    });};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 SocialMessagingClient 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.defaultSocialMessagingHttpAuthSchemeParametersProvider,            identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({                "aws.auth#sigv4": config.credentials,            }),        }));        this.middlewareStack.use(core.getHttpSigningPlugin(this.config));    }    destroy() {        super.destroy();    }} class AssociateWhatsAppBusinessAccountCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("SocialMessaging", "AssociateWhatsAppBusinessAccount", {})    .n("SocialMessagingClient", "AssociateWhatsAppBusinessAccountCommand")    .sc(schemas_0.AssociateWhatsAppBusinessAccount$)    .build() {} class CreateWhatsAppMessageTemplateCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("SocialMessaging", "CreateWhatsAppMessageTemplate", {})    .n("SocialMessagingClient", "CreateWhatsAppMessageTemplateCommand")    .sc(schemas_0.CreateWhatsAppMessageTemplate$)    .build() {} class CreateWhatsAppMessageTemplateFromLibraryCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("SocialMessaging", "CreateWhatsAppMessageTemplateFromLibrary", {})    .n("SocialMessagingClient", "CreateWhatsAppMessageTemplateFromLibraryCommand")    .sc(schemas_0.CreateWhatsAppMessageTemplateFromLibrary$)    .build() {} class CreateWhatsAppMessageTemplateMediaCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("SocialMessaging", "CreateWhatsAppMessageTemplateMedia", {})    .n("SocialMessagingClient", "CreateWhatsAppMessageTemplateMediaCommand")    .sc(schemas_0.CreateWhatsAppMessageTemplateMedia$)    .build() {} class DeleteWhatsAppMessageMediaCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("SocialMessaging", "DeleteWhatsAppMessageMedia", {})    .n("SocialMessagingClient", "DeleteWhatsAppMessageMediaCommand")    .sc(schemas_0.DeleteWhatsAppMessageMedia$)    .build() {} class DeleteWhatsAppMessageTemplateCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("SocialMessaging", "DeleteWhatsAppMessageTemplate", {})    .n("SocialMessagingClient", "DeleteWhatsAppMessageTemplateCommand")    .sc(schemas_0.DeleteWhatsAppMessageTemplate$)    .build() {} class DisassociateWhatsAppBusinessAccountCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("SocialMessaging", "DisassociateWhatsAppBusinessAccount", {})    .n("SocialMessagingClient", "DisassociateWhatsAppBusinessAccountCommand")    .sc(schemas_0.DisassociateWhatsAppBusinessAccount$)    .build() {} class GetLinkedWhatsAppBusinessAccountCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("SocialMessaging", "GetLinkedWhatsAppBusinessAccount", {})    .n("SocialMessagingClient", "GetLinkedWhatsAppBusinessAccountCommand")    .sc(schemas_0.GetLinkedWhatsAppBusinessAccount$)    .build() {} class GetLinkedWhatsAppBusinessAccountPhoneNumberCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("SocialMessaging", "GetLinkedWhatsAppBusinessAccountPhoneNumber", {})    .n("SocialMessagingClient", "GetLinkedWhatsAppBusinessAccountPhoneNumberCommand")    .sc(schemas_0.GetLinkedWhatsAppBusinessAccountPhoneNumber$)    .build() {} class GetWhatsAppMessageMediaCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("SocialMessaging", "GetWhatsAppMessageMedia", {})    .n("SocialMessagingClient", "GetWhatsAppMessageMediaCommand")    .sc(schemas_0.GetWhatsAppMessageMedia$)    .build() {} class GetWhatsAppMessageTemplateCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("SocialMessaging", "GetWhatsAppMessageTemplate", {})    .n("SocialMessagingClient", "GetWhatsAppMessageTemplateCommand")    .sc(schemas_0.GetWhatsAppMessageTemplate$)    .build() {} class ListLinkedWhatsAppBusinessAccountsCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("SocialMessaging", "ListLinkedWhatsAppBusinessAccounts", {})    .n("SocialMessagingClient", "ListLinkedWhatsAppBusinessAccountsCommand")    .sc(schemas_0.ListLinkedWhatsAppBusinessAccounts$)    .build() {} class ListTagsForResourceCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("SocialMessaging", "ListTagsForResource", {})    .n("SocialMessagingClient", "ListTagsForResourceCommand")    .sc(schemas_0.ListTagsForResource$)    .build() {} class ListWhatsAppMessageTemplatesCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("SocialMessaging", "ListWhatsAppMessageTemplates", {})    .n("SocialMessagingClient", "ListWhatsAppMessageTemplatesCommand")    .sc(schemas_0.ListWhatsAppMessageTemplates$)    .build() {} class ListWhatsAppTemplateLibraryCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("SocialMessaging", "ListWhatsAppTemplateLibrary", {})    .n("SocialMessagingClient", "ListWhatsAppTemplateLibraryCommand")    .sc(schemas_0.ListWhatsAppTemplateLibrary$)    .build() {} class PostWhatsAppMessageMediaCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("SocialMessaging", "PostWhatsAppMessageMedia", {})    .n("SocialMessagingClient", "PostWhatsAppMessageMediaCommand")    .sc(schemas_0.PostWhatsAppMessageMedia$)    .build() {} class PutWhatsAppBusinessAccountEventDestinationsCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("SocialMessaging", "PutWhatsAppBusinessAccountEventDestinations", {})    .n("SocialMessagingClient", "PutWhatsAppBusinessAccountEventDestinationsCommand")    .sc(schemas_0.PutWhatsAppBusinessAccountEventDestinations$)    .build() {} class SendWhatsAppMessageCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("SocialMessaging", "SendWhatsAppMessage", {})    .n("SocialMessagingClient", "SendWhatsAppMessageCommand")    .sc(schemas_0.SendWhatsAppMessage$)    .build() {} class TagResourceCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("SocialMessaging", "TagResource", {})    .n("SocialMessagingClient", "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("SocialMessaging", "UntagResource", {})    .n("SocialMessagingClient", "UntagResourceCommand")    .sc(schemas_0.UntagResource$)    .build() {} class UpdateWhatsAppMessageTemplateCommand extends client.Command    .classBuilder()    .ep(commonParams)    .m(function (Command, cs, config, o) {    return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];})    .s("SocialMessaging", "UpdateWhatsAppMessageTemplate", {})    .n("SocialMessagingClient", "UpdateWhatsAppMessageTemplateCommand")    .sc(schemas_0.UpdateWhatsAppMessageTemplate$)    .build() {} const paginateListLinkedWhatsAppBusinessAccounts = core.createPaginator(SocialMessagingClient, ListLinkedWhatsAppBusinessAccountsCommand, "nextToken", "nextToken", "maxResults"); const paginateListWhatsAppMessageTemplates = core.createPaginator(SocialMessagingClient, ListWhatsAppMessageTemplatesCommand, "nextToken", "nextToken", "maxResults"); const paginateListWhatsAppTemplateLibrary = core.createPaginator(SocialMessagingClient, ListWhatsAppTemplateLibraryCommand, "nextToken", "nextToken", "maxResults"); const commands = {    AssociateWhatsAppBusinessAccountCommand,    CreateWhatsAppMessageTemplateCommand,    CreateWhatsAppMessageTemplateFromLibraryCommand,    CreateWhatsAppMessageTemplateMediaCommand,    DeleteWhatsAppMessageMediaCommand,    DeleteWhatsAppMessageTemplateCommand,    DisassociateWhatsAppBusinessAccountCommand,    GetLinkedWhatsAppBusinessAccountCommand,    GetLinkedWhatsAppBusinessAccountPhoneNumberCommand,    GetWhatsAppMessageMediaCommand,    GetWhatsAppMessageTemplateCommand,    ListLinkedWhatsAppBusinessAccountsCommand,    ListTagsForResourceCommand,    ListWhatsAppMessageTemplatesCommand,    ListWhatsAppTemplateLibraryCommand,    PostWhatsAppMessageMediaCommand,    PutWhatsAppBusinessAccountEventDestinationsCommand,    SendWhatsAppMessageCommand,    TagResourceCommand,    UntagResourceCommand,    UpdateWhatsAppMessageTemplateCommand,};const paginators = {    paginateListLinkedWhatsAppBusinessAccounts,    paginateListWhatsAppMessageTemplates,    paginateListWhatsAppTemplateLibrary,};class SocialMessaging extends SocialMessagingClient {}client.createAggregatedClient(commands, SocialMessaging, { paginators }); const RegistrationStatus = {    COMPLETE: "COMPLETE",    INCOMPLETE: "INCOMPLETE",}; exports.$Command = client.Command;exports.__Client = client.Client;exports.SocialMessagingServiceException = SocialMessagingServiceException.SocialMessagingServiceException;exports.AssociateWhatsAppBusinessAccountCommand = AssociateWhatsAppBusinessAccountCommand;exports.CreateWhatsAppMessageTemplateCommand = CreateWhatsAppMessageTemplateCommand;exports.CreateWhatsAppMessageTemplateFromLibraryCommand = CreateWhatsAppMessageTemplateFromLibraryCommand;exports.CreateWhatsAppMessageTemplateMediaCommand = CreateWhatsAppMessageTemplateMediaCommand;exports.DeleteWhatsAppMessageMediaCommand = DeleteWhatsAppMessageMediaCommand;exports.DeleteWhatsAppMessageTemplateCommand = DeleteWhatsAppMessageTemplateCommand;exports.DisassociateWhatsAppBusinessAccountCommand = DisassociateWhatsAppBusinessAccountCommand;exports.GetLinkedWhatsAppBusinessAccountCommand = GetLinkedWhatsAppBusinessAccountCommand;exports.GetLinkedWhatsAppBusinessAccountPhoneNumberCommand = GetLinkedWhatsAppBusinessAccountPhoneNumberCommand;exports.GetWhatsAppMessageMediaCommand = GetWhatsAppMessageMediaCommand;exports.GetWhatsAppMessageTemplateCommand = GetWhatsAppMessageTemplateCommand;exports.ListLinkedWhatsAppBusinessAccountsCommand = ListLinkedWhatsAppBusinessAccountsCommand;exports.ListTagsForResourceCommand = ListTagsForResourceCommand;exports.ListWhatsAppMessageTemplatesCommand = ListWhatsAppMessageTemplatesCommand;exports.ListWhatsAppTemplateLibraryCommand = ListWhatsAppTemplateLibraryCommand;exports.PostWhatsAppMessageMediaCommand = PostWhatsAppMessageMediaCommand;exports.PutWhatsAppBusinessAccountEventDestinationsCommand = PutWhatsAppBusinessAccountEventDestinationsCommand;exports.RegistrationStatus = RegistrationStatus;exports.SendWhatsAppMessageCommand = SendWhatsAppMessageCommand;exports.SocialMessaging = SocialMessaging;exports.SocialMessagingClient = SocialMessagingClient;exports.TagResourceCommand = TagResourceCommand;exports.UntagResourceCommand = UntagResourceCommand;exports.UpdateWhatsAppMessageTemplateCommand = UpdateWhatsAppMessageTemplateCommand;exports.paginateListLinkedWhatsAppBusinessAccounts = paginateListLinkedWhatsAppBusinessAccounts;exports.paginateListWhatsAppMessageTemplates = paginateListWhatsAppMessageTemplates;exports.paginateListWhatsAppTemplateLibrary = paginateListWhatsAppTemplateLibrary;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];});