feat: Complete zCode CLI X with Telegram bot integration

- Add full Telegram bot functionality with Z.AI API integration
- Implement 4 tools: Bash, FileEdit, WebSearch, Git
- Add 3 agents: Code Reviewer, Architect, DevOps Engineer
- Add 6 skills for common coding tasks
- Add systemd service file for 24/7 operation
- Add nginx configuration for HTTPS webhook
- Add comprehensive documentation
- Implement WebSocket server for real-time updates
- Add logging system with Winston
- Add environment validation

🤖 zCode CLI X - Agentic coder with Z.AI + Telegram integration
This commit is contained in:
admin
2026-05-05 09:01:26 +00:00
Unverified
parent 4a7035dd92
commit 875c7f9b91
24688 changed files with 3224957 additions and 221 deletions

View File

@@ -0,0 +1,57 @@
import { createAggregatedClient } from "@smithy/smithy-client";
import { CognitoIdentityClient } from "./CognitoIdentityClient";
import { CreateIdentityPoolCommand, } from "./commands/CreateIdentityPoolCommand";
import { DeleteIdentitiesCommand, } from "./commands/DeleteIdentitiesCommand";
import { DeleteIdentityPoolCommand, } from "./commands/DeleteIdentityPoolCommand";
import { DescribeIdentityCommand, } from "./commands/DescribeIdentityCommand";
import { DescribeIdentityPoolCommand, } from "./commands/DescribeIdentityPoolCommand";
import { GetCredentialsForIdentityCommand, } from "./commands/GetCredentialsForIdentityCommand";
import { GetIdCommand } from "./commands/GetIdCommand";
import { GetIdentityPoolRolesCommand, } from "./commands/GetIdentityPoolRolesCommand";
import { GetOpenIdTokenCommand, } from "./commands/GetOpenIdTokenCommand";
import { GetOpenIdTokenForDeveloperIdentityCommand, } from "./commands/GetOpenIdTokenForDeveloperIdentityCommand";
import { GetPrincipalTagAttributeMapCommand, } from "./commands/GetPrincipalTagAttributeMapCommand";
import { ListIdentitiesCommand, } from "./commands/ListIdentitiesCommand";
import { ListIdentityPoolsCommand, } from "./commands/ListIdentityPoolsCommand";
import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
import { LookupDeveloperIdentityCommand, } from "./commands/LookupDeveloperIdentityCommand";
import { MergeDeveloperIdentitiesCommand, } from "./commands/MergeDeveloperIdentitiesCommand";
import { SetIdentityPoolRolesCommand, } from "./commands/SetIdentityPoolRolesCommand";
import { SetPrincipalTagAttributeMapCommand, } from "./commands/SetPrincipalTagAttributeMapCommand";
import { TagResourceCommand, } from "./commands/TagResourceCommand";
import { UnlinkDeveloperIdentityCommand, } from "./commands/UnlinkDeveloperIdentityCommand";
import { UnlinkIdentityCommand, } from "./commands/UnlinkIdentityCommand";
import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
import { UpdateIdentityPoolCommand, } from "./commands/UpdateIdentityPoolCommand";
import { paginateListIdentityPools } from "./pagination/ListIdentityPoolsPaginator";
const commands = {
CreateIdentityPoolCommand,
DeleteIdentitiesCommand,
DeleteIdentityPoolCommand,
DescribeIdentityCommand,
DescribeIdentityPoolCommand,
GetCredentialsForIdentityCommand,
GetIdCommand,
GetIdentityPoolRolesCommand,
GetOpenIdTokenCommand,
GetOpenIdTokenForDeveloperIdentityCommand,
GetPrincipalTagAttributeMapCommand,
ListIdentitiesCommand,
ListIdentityPoolsCommand,
ListTagsForResourceCommand,
LookupDeveloperIdentityCommand,
MergeDeveloperIdentitiesCommand,
SetIdentityPoolRolesCommand,
SetPrincipalTagAttributeMapCommand,
TagResourceCommand,
UnlinkDeveloperIdentityCommand,
UnlinkIdentityCommand,
UntagResourceCommand,
UpdateIdentityPoolCommand,
};
const paginators = {
paginateListIdentityPools,
};
export class CognitoIdentity extends CognitoIdentityClient {
}
createAggregatedClient(commands, CognitoIdentity, { paginators });

View File

@@ -0,0 +1,50 @@
import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
import { resolveRegionConfig } from "@smithy/config-resolver";
import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
import { getSchemaSerdePlugin } from "@smithy/core/schema";
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
import { resolveEndpointConfig, } from "@smithy/middleware-endpoint";
import { getRetryPlugin, resolveRetryConfig, } from "@smithy/middleware-retry";
import { Client as __Client, } from "@smithy/smithy-client";
import { defaultCognitoIdentityHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider";
import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
import { resolveRuntimeExtensions } from "./runtimeExtensions";
export { __Client };
export class CognitoIdentityClient extends __Client {
config;
constructor(...[configuration]) {
const _config_0 = __getRuntimeConfig(configuration || {});
super(_config_0);
this.initConfig = _config_0;
const _config_1 = resolveClientEndpointParameters(_config_0);
const _config_2 = resolveUserAgentConfig(_config_1);
const _config_3 = resolveRetryConfig(_config_2);
const _config_4 = resolveRegionConfig(_config_3);
const _config_5 = resolveHostHeaderConfig(_config_4);
const _config_6 = resolveEndpointConfig(_config_5);
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
this.config = _config_8;
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
this.middlewareStack.use(getUserAgentPlugin(this.config));
this.middlewareStack.use(getRetryPlugin(this.config));
this.middlewareStack.use(getContentLengthPlugin(this.config));
this.middlewareStack.use(getHostHeaderPlugin(this.config));
this.middlewareStack.use(getLoggerPlugin(this.config));
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
httpAuthSchemeParametersProvider: defaultCognitoIdentityHttpAuthSchemeParametersProvider,
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
"aws.auth#sigv4": config.credentials,
}),
}));
this.middlewareStack.use(getHttpSigningPlugin(this.config));
}
destroy() {
super.destroy();
}
}

View File

@@ -0,0 +1,38 @@
export 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;
},
};
};
export const resolveHttpAuthRuntimeConfig = (config) => {
return {
httpAuthSchemes: config.httpAuthSchemes(),
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
credentials: config.credentials(),
};
};

View File

@@ -0,0 +1,69 @@
import { resolveAwsSdkSigV4Config, } from "@aws-sdk/core/httpAuthSchemes";
import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
export const defaultCognitoIdentityHttpAuthSchemeParametersProvider = async (config, context, input) => {
return {
operation: getSmithyContext(context).operation,
region: await normalizeProvider(config.region)() || (() => {
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
})(),
};
};
function createAwsAuthSigv4HttpAuthOption(authParameters) {
return {
schemeId: "aws.auth#sigv4",
signingProperties: {
name: "cognito-identity",
region: authParameters.region,
},
propertiesExtractor: (config, context) => ({
signingProperties: {
config,
context,
},
}),
};
}
function createSmithyApiNoAuthHttpAuthOption(authParameters) {
return {
schemeId: "smithy.api#noAuth",
};
}
export const defaultCognitoIdentityHttpAuthSchemeProvider = (authParameters) => {
const options = [];
switch (authParameters.operation) {
case "GetCredentialsForIdentity":
{
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
;
case "GetId":
{
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
;
case "GetOpenIdToken":
{
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
;
case "UnlinkIdentity":
{
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
;
default: {
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
}
}
return options;
};
export const resolveHttpAuthSchemeConfig = (config) => {
const config_0 = resolveAwsSdkSigV4Config(config);
return Object.assign(config_0, {
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
});
};

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { CreateIdentityPool$ } from "../schemas/schemas_0";
export { $Command };
export class CreateIdentityPoolCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSCognitoIdentityService", "CreateIdentityPool", {})
.n("CognitoIdentityClient", "CreateIdentityPoolCommand")
.sc(CreateIdentityPool$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { DeleteIdentities$ } from "../schemas/schemas_0";
export { $Command };
export class DeleteIdentitiesCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSCognitoIdentityService", "DeleteIdentities", {})
.n("CognitoIdentityClient", "DeleteIdentitiesCommand")
.sc(DeleteIdentities$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { DeleteIdentityPool$ } from "../schemas/schemas_0";
export { $Command };
export class DeleteIdentityPoolCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSCognitoIdentityService", "DeleteIdentityPool", {})
.n("CognitoIdentityClient", "DeleteIdentityPoolCommand")
.sc(DeleteIdentityPool$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { DescribeIdentity$ } from "../schemas/schemas_0";
export { $Command };
export class DescribeIdentityCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSCognitoIdentityService", "DescribeIdentity", {})
.n("CognitoIdentityClient", "DescribeIdentityCommand")
.sc(DescribeIdentity$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { DescribeIdentityPool$ } from "../schemas/schemas_0";
export { $Command };
export class DescribeIdentityPoolCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSCognitoIdentityService", "DescribeIdentityPool", {})
.n("CognitoIdentityClient", "DescribeIdentityPoolCommand")
.sc(DescribeIdentityPool$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { GetCredentialsForIdentity$ } from "../schemas/schemas_0";
export { $Command };
export class GetCredentialsForIdentityCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSCognitoIdentityService", "GetCredentialsForIdentity", {})
.n("CognitoIdentityClient", "GetCredentialsForIdentityCommand")
.sc(GetCredentialsForIdentity$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { GetId$ } from "../schemas/schemas_0";
export { $Command };
export class GetIdCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSCognitoIdentityService", "GetId", {})
.n("CognitoIdentityClient", "GetIdCommand")
.sc(GetId$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { GetIdentityPoolRoles$ } from "../schemas/schemas_0";
export { $Command };
export class GetIdentityPoolRolesCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSCognitoIdentityService", "GetIdentityPoolRoles", {})
.n("CognitoIdentityClient", "GetIdentityPoolRolesCommand")
.sc(GetIdentityPoolRoles$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { GetOpenIdToken$ } from "../schemas/schemas_0";
export { $Command };
export class GetOpenIdTokenCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSCognitoIdentityService", "GetOpenIdToken", {})
.n("CognitoIdentityClient", "GetOpenIdTokenCommand")
.sc(GetOpenIdToken$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { GetOpenIdTokenForDeveloperIdentity$ } from "../schemas/schemas_0";
export { $Command };
export class GetOpenIdTokenForDeveloperIdentityCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSCognitoIdentityService", "GetOpenIdTokenForDeveloperIdentity", {})
.n("CognitoIdentityClient", "GetOpenIdTokenForDeveloperIdentityCommand")
.sc(GetOpenIdTokenForDeveloperIdentity$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { GetPrincipalTagAttributeMap$ } from "../schemas/schemas_0";
export { $Command };
export class GetPrincipalTagAttributeMapCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSCognitoIdentityService", "GetPrincipalTagAttributeMap", {})
.n("CognitoIdentityClient", "GetPrincipalTagAttributeMapCommand")
.sc(GetPrincipalTagAttributeMap$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { ListIdentities$ } from "../schemas/schemas_0";
export { $Command };
export class ListIdentitiesCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSCognitoIdentityService", "ListIdentities", {})
.n("CognitoIdentityClient", "ListIdentitiesCommand")
.sc(ListIdentities$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { ListIdentityPools$ } from "../schemas/schemas_0";
export { $Command };
export class ListIdentityPoolsCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSCognitoIdentityService", "ListIdentityPools", {})
.n("CognitoIdentityClient", "ListIdentityPoolsCommand")
.sc(ListIdentityPools$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { ListTagsForResource$ } from "../schemas/schemas_0";
export { $Command };
export class ListTagsForResourceCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSCognitoIdentityService", "ListTagsForResource", {})
.n("CognitoIdentityClient", "ListTagsForResourceCommand")
.sc(ListTagsForResource$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { LookupDeveloperIdentity$ } from "../schemas/schemas_0";
export { $Command };
export class LookupDeveloperIdentityCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSCognitoIdentityService", "LookupDeveloperIdentity", {})
.n("CognitoIdentityClient", "LookupDeveloperIdentityCommand")
.sc(LookupDeveloperIdentity$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { MergeDeveloperIdentities$ } from "../schemas/schemas_0";
export { $Command };
export class MergeDeveloperIdentitiesCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSCognitoIdentityService", "MergeDeveloperIdentities", {})
.n("CognitoIdentityClient", "MergeDeveloperIdentitiesCommand")
.sc(MergeDeveloperIdentities$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { SetIdentityPoolRoles$ } from "../schemas/schemas_0";
export { $Command };
export class SetIdentityPoolRolesCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSCognitoIdentityService", "SetIdentityPoolRoles", {})
.n("CognitoIdentityClient", "SetIdentityPoolRolesCommand")
.sc(SetIdentityPoolRoles$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { SetPrincipalTagAttributeMap$ } from "../schemas/schemas_0";
export { $Command };
export class SetPrincipalTagAttributeMapCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSCognitoIdentityService", "SetPrincipalTagAttributeMap", {})
.n("CognitoIdentityClient", "SetPrincipalTagAttributeMapCommand")
.sc(SetPrincipalTagAttributeMap$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { TagResource$ } from "../schemas/schemas_0";
export { $Command };
export class TagResourceCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSCognitoIdentityService", "TagResource", {})
.n("CognitoIdentityClient", "TagResourceCommand")
.sc(TagResource$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { UnlinkDeveloperIdentity$ } from "../schemas/schemas_0";
export { $Command };
export class UnlinkDeveloperIdentityCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSCognitoIdentityService", "UnlinkDeveloperIdentity", {})
.n("CognitoIdentityClient", "UnlinkDeveloperIdentityCommand")
.sc(UnlinkDeveloperIdentity$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { UnlinkIdentity$ } from "../schemas/schemas_0";
export { $Command };
export class UnlinkIdentityCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSCognitoIdentityService", "UnlinkIdentity", {})
.n("CognitoIdentityClient", "UnlinkIdentityCommand")
.sc(UnlinkIdentity$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { UntagResource$ } from "../schemas/schemas_0";
export { $Command };
export class UntagResourceCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSCognitoIdentityService", "UntagResource", {})
.n("CognitoIdentityClient", "UntagResourceCommand")
.sc(UntagResource$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { UpdateIdentityPool$ } from "../schemas/schemas_0";
export { $Command };
export class UpdateIdentityPoolCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("AWSCognitoIdentityService", "UpdateIdentityPool", {})
.n("CognitoIdentityClient", "UpdateIdentityPoolCommand")
.sc(UpdateIdentityPool$)
.build() {
}

View File

@@ -0,0 +1,23 @@
export * from "./CreateIdentityPoolCommand";
export * from "./DeleteIdentitiesCommand";
export * from "./DeleteIdentityPoolCommand";
export * from "./DescribeIdentityCommand";
export * from "./DescribeIdentityPoolCommand";
export * from "./GetCredentialsForIdentityCommand";
export * from "./GetIdCommand";
export * from "./GetIdentityPoolRolesCommand";
export * from "./GetOpenIdTokenCommand";
export * from "./GetOpenIdTokenForDeveloperIdentityCommand";
export * from "./GetPrincipalTagAttributeMapCommand";
export * from "./ListIdentitiesCommand";
export * from "./ListIdentityPoolsCommand";
export * from "./ListTagsForResourceCommand";
export * from "./LookupDeveloperIdentityCommand";
export * from "./MergeDeveloperIdentitiesCommand";
export * from "./SetIdentityPoolRolesCommand";
export * from "./SetPrincipalTagAttributeMapCommand";
export * from "./TagResourceCommand";
export * from "./UnlinkDeveloperIdentityCommand";
export * from "./UnlinkIdentityCommand";
export * from "./UntagResourceCommand";
export * from "./UpdateIdentityPoolCommand";

View File

@@ -0,0 +1,13 @@
export const resolveClientEndpointParameters = (options) => {
return Object.assign(options, {
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
useFipsEndpoint: options.useFipsEndpoint ?? false,
defaultSigningName: "cognito-identity",
});
};
export const commonParams = {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};

View File

@@ -0,0 +1,14 @@
import { awsEndpointFunctions } from "@aws-sdk/util-endpoints";
import { customEndpointFunctions, EndpointCache, resolveEndpoint } from "@smithy/util-endpoints";
import { ruleSet } from "./ruleset";
const cache = new EndpointCache({
size: 50,
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
});
export const defaultEndpointResolver = (endpointParams, context = {}) => {
return cache.get(endpointParams, () => resolveEndpoint(ruleSet, {
endpointParams: endpointParams,
logger: context.logger,
}));
};
customEndpointFunctions.aws = awsEndpointFunctions;

View File

@@ -0,0 +1,4 @@
const w = "required", x = "fn", y = "argv", z = "ref";
const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = "stringEquals", j = { [w]: false, "type": "string" }, k = { [w]: true, "default": false, "type": "boolean" }, l = { [z]: "Endpoint" }, m = { [x]: c, [y]: [{ [z]: "UseFIPS" }, true] }, n = { [x]: c, [y]: [{ [z]: "UseDualStack" }, true] }, o = {}, p = { [z]: "Region" }, q = { [x]: h, [y]: [{ [z]: g }, "supportsFIPS"] }, r = { [z]: g }, s = { [x]: c, [y]: [true, { [x]: h, [y]: [r, "supportsDualStack"] }] }, t = [m], u = [n], v = [p];
const _data = { version: "1.0", parameters: { Region: j, UseDualStack: k, UseFIPS: k, Endpoint: j }, rules: [{ conditions: [{ [x]: b, [y]: [l] }], rules: [{ conditions: t, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: u, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: l, properties: o, headers: o }, type: e }], type: f }, { conditions: [{ [x]: b, [y]: v }], rules: [{ conditions: [{ [x]: "aws.partition", [y]: v, assign: g }], rules: [{ conditions: [m, n], rules: [{ conditions: [{ [x]: c, [y]: [a, q] }, s], rules: [{ conditions: [{ [x]: i, [y]: [p, "us-east-1"] }], endpoint: { url: "https://cognito-identity-fips.us-east-1.amazonaws.com", properties: o, headers: o }, type: e }, { conditions: [{ [x]: i, [y]: [p, "us-east-2"] }], endpoint: { url: "https://cognito-identity-fips.us-east-2.amazonaws.com", properties: o, headers: o }, type: e }, { conditions: [{ [x]: i, [y]: [p, "us-west-1"] }], endpoint: { url: "https://cognito-identity-fips.us-west-1.amazonaws.com", properties: o, headers: o }, type: e }, { conditions: [{ [x]: i, [y]: [p, "us-west-2"] }], endpoint: { url: "https://cognito-identity-fips.us-west-2.amazonaws.com", properties: o, headers: o }, type: e }, { endpoint: { url: "https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: o, headers: o }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: t, rules: [{ conditions: [{ [x]: c, [y]: [q, a] }], rules: [{ endpoint: { url: "https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}", properties: o, headers: o }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: u, rules: [{ conditions: [s], rules: [{ conditions: [{ [x]: i, [y]: ["aws", { [x]: h, [y]: [r, "name"] }] }], endpoint: { url: "https://cognito-identity.{Region}.amazonaws.com", properties: o, headers: o }, type: e }, { endpoint: { url: "https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: o, headers: o }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}", properties: o, headers: o }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] };
export const ruleSet = _data;

View File

@@ -0,0 +1,9 @@
export * from "./CognitoIdentityClient";
export * from "./CognitoIdentity";
export * from "./commands";
export * from "./schemas/schemas_0";
export * from "./pagination";
export * from "./models/enums";
export * from "./models/errors";
export * from "./models/models_0";
export { CognitoIdentityServiceException } from "./models/CognitoIdentityServiceException";

View File

@@ -0,0 +1,8 @@
import { ServiceException as __ServiceException, } from "@smithy/smithy-client";
export { __ServiceException };
export class CognitoIdentityServiceException extends __ServiceException {
constructor(options) {
super(options);
Object.setPrototypeOf(this, CognitoIdentityServiceException.prototype);
}
}

View File

@@ -0,0 +1,18 @@
export const AmbiguousRoleResolutionType = {
AUTHENTICATED_ROLE: "AuthenticatedRole",
DENY: "Deny",
};
export const ErrorCode = {
ACCESS_DENIED: "AccessDenied",
INTERNAL_SERVER_ERROR: "InternalServerError",
};
export const MappingRuleMatchType = {
CONTAINS: "Contains",
EQUALS: "Equals",
NOT_EQUAL: "NotEqual",
STARTS_WITH: "StartsWith",
};
export const RoleMappingType = {
RULES: "Rules",
TOKEN: "Token",
};

View File

@@ -0,0 +1,133 @@
import { CognitoIdentityServiceException as __BaseException } from "./CognitoIdentityServiceException";
export class InternalErrorException extends __BaseException {
name = "InternalErrorException";
$fault = "server";
constructor(opts) {
super({
name: "InternalErrorException",
$fault: "server",
...opts,
});
Object.setPrototypeOf(this, InternalErrorException.prototype);
}
}
export class InvalidParameterException extends __BaseException {
name = "InvalidParameterException";
$fault = "client";
constructor(opts) {
super({
name: "InvalidParameterException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, InvalidParameterException.prototype);
}
}
export class LimitExceededException extends __BaseException {
name = "LimitExceededException";
$fault = "client";
constructor(opts) {
super({
name: "LimitExceededException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, LimitExceededException.prototype);
}
}
export class NotAuthorizedException extends __BaseException {
name = "NotAuthorizedException";
$fault = "client";
constructor(opts) {
super({
name: "NotAuthorizedException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, NotAuthorizedException.prototype);
}
}
export class ResourceConflictException extends __BaseException {
name = "ResourceConflictException";
$fault = "client";
constructor(opts) {
super({
name: "ResourceConflictException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ResourceConflictException.prototype);
}
}
export class TooManyRequestsException extends __BaseException {
name = "TooManyRequestsException";
$fault = "client";
constructor(opts) {
super({
name: "TooManyRequestsException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, TooManyRequestsException.prototype);
}
}
export class ResourceNotFoundException extends __BaseException {
name = "ResourceNotFoundException";
$fault = "client";
constructor(opts) {
super({
name: "ResourceNotFoundException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
}
}
export class ExternalServiceException extends __BaseException {
name = "ExternalServiceException";
$fault = "client";
constructor(opts) {
super({
name: "ExternalServiceException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ExternalServiceException.prototype);
}
}
export class InvalidIdentityPoolConfigurationException extends __BaseException {
name = "InvalidIdentityPoolConfigurationException";
$fault = "client";
constructor(opts) {
super({
name: "InvalidIdentityPoolConfigurationException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, InvalidIdentityPoolConfigurationException.prototype);
}
}
export class DeveloperUserAlreadyRegisteredException extends __BaseException {
name = "DeveloperUserAlreadyRegisteredException";
$fault = "client";
constructor(opts) {
super({
name: "DeveloperUserAlreadyRegisteredException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, DeveloperUserAlreadyRegisteredException.prototype);
}
}
export class ConcurrentModificationException extends __BaseException {
name = "ConcurrentModificationException";
$fault = "client";
constructor(opts) {
super({
name: "ConcurrentModificationException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ConcurrentModificationException.prototype);
}
}

View File

@@ -0,0 +1,4 @@
import { createPaginator } from "@smithy/core";
import { CognitoIdentityClient } from "../CognitoIdentityClient";
import { ListIdentityPoolsCommand, } from "../commands/ListIdentityPoolsCommand";
export const paginateListIdentityPools = createPaginator(CognitoIdentityClient, ListIdentityPoolsCommand, "NextToken", "NextToken", "MaxResults");

View File

@@ -0,0 +1,2 @@
export * from "./Interfaces";
export * from "./ListIdentityPoolsPaginator";

View File

@@ -0,0 +1,33 @@
import packageInfo from "../package.json";
import { Sha256 } from "@aws-crypto/sha256-browser";
import { createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-browser";
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver";
import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
import { invalidProvider } from "@smithy/invalid-dependency";
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
import { calculateBodyLength } from "@smithy/util-body-length-browser";
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry";
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
export const getRuntimeConfig = (config) => {
const defaultsMode = resolveDefaultsModeConfig(config);
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
const clientSharedValues = getSharedRuntimeConfig(config);
return {
...clientSharedValues,
...config,
runtime: "browser",
defaultsMode,
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
region: config?.region ?? invalidProvider("Region is missing"),
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
sha256: config?.sha256 ?? Sha256,
streamCollector: config?.streamCollector ?? streamCollector,
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
};
};

View File

@@ -0,0 +1,49 @@
import packageInfo from "../package.json";
import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core/client";
import { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } from "@aws-sdk/core/httpAuthSchemes";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS } from "@aws-sdk/util-user-agent-node";
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver";
import { Hash } from "@smithy/hash-node";
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry";
import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
import { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from "@smithy/smithy-client";
import { calculateBodyLength } from "@smithy/util-body-length-node";
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
export const getRuntimeConfig = (config) => {
emitWarningIfUnsupportedVersion(process.version);
const defaultsMode = resolveDefaultsModeConfig(config);
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
const clientSharedValues = getSharedRuntimeConfig(config);
awsCheckVersion(process.version);
const loaderConfig = {
profile: config?.profile,
logger: clientSharedValues.logger,
};
return {
...clientSharedValues,
...config,
runtime: "node",
defaultsMode,
authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
retryMode: config?.retryMode ??
loadNodeConfig({
...NODE_RETRY_MODE_CONFIG_OPTIONS,
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
}, config),
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
streamCollector: config?.streamCollector ?? streamCollector,
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
};
};

View File

@@ -0,0 +1,11 @@
import { Sha256 } from "@aws-crypto/sha256-js";
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
export const getRuntimeConfig = (config) => {
const browserDefaults = getBrowserRuntimeConfig(config);
return {
...browserDefaults,
...config,
runtime: "react-native",
sha256: config?.sha256 ?? Sha256,
};
};

View File

@@ -0,0 +1,46 @@
import { AwsSdkSigV4Signer } from "@aws-sdk/core/httpAuthSchemes";
import { AwsJson1_1Protocol } from "@aws-sdk/core/protocols";
import { NoAuthSigner } from "@smithy/core";
import { NoOpLogger } from "@smithy/smithy-client";
import { parseUrl } from "@smithy/url-parser";
import { fromBase64, toBase64 } from "@smithy/util-base64";
import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
import { defaultCognitoIdentityHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
import { errorTypeRegistries } from "./schemas/schemas_0";
export const getRuntimeConfig = (config) => {
return {
apiVersion: "2014-06-30",
base64Decoder: config?.base64Decoder ?? fromBase64,
base64Encoder: config?.base64Encoder ?? toBase64,
disableHostPrefix: config?.disableHostPrefix ?? false,
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
extensions: config?.extensions ?? [],
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultCognitoIdentityHttpAuthSchemeProvider,
httpAuthSchemes: config?.httpAuthSchemes ?? [
{
schemeId: "aws.auth#sigv4",
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
signer: new AwsSdkSigV4Signer(),
},
{
schemeId: "smithy.api#noAuth",
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
signer: new NoAuthSigner(),
},
],
logger: config?.logger ?? new NoOpLogger(),
protocol: config?.protocol ?? AwsJson1_1Protocol,
protocolSettings: config?.protocolSettings ?? {
defaultNamespace: "com.amazonaws.cognitoidentity",
errorTypeRegistries,
xmlNamespace: "http://cognito-identity.amazonaws.com/doc/2014-06-30/",
version: "2014-06-30",
serviceTarget: "AWSCognitoIdentityService",
},
serviceId: config?.serviceId ?? "Cognito Identity",
urlParser: config?.urlParser ?? parseUrl,
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
utf8Encoder: config?.utf8Encoder ?? toUtf8,
};
};

View File

@@ -0,0 +1,9 @@
import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver";
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http";
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client";
import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
extensions.forEach((extension) => extension.configure(extensionConfiguration));
return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
};

View File

@@ -0,0 +1,565 @@
const _ACF = "AllowClassicFlow";
const _AI = "AccountId";
const _AKI = "AccessKeyId";
const _ARR = "AmbiguousRoleResolution";
const _AUI = "AllowUnauthenticatedIdentities";
const _C = "Credentials";
const _CD = "CreationDate";
const _CI = "ClientId";
const _CIP = "CognitoIdentityProvider";
const _CIPI = "CreateIdentityPoolInput";
const _CIPL = "CognitoIdentityProviderList";
const _CIPo = "CognitoIdentityProviders";
const _CIPr = "CreateIdentityPool";
const _CME = "ConcurrentModificationException";
const _CRA = "CustomRoleArn";
const _Cl = "Claim";
const _DI = "DeleteIdentities";
const _DII = "DeleteIdentitiesInput";
const _DIIe = "DescribeIdentityInput";
const _DIP = "DeleteIdentityPool";
const _DIPI = "DeleteIdentityPoolInput";
const _DIPIe = "DescribeIdentityPoolInput";
const _DIPe = "DescribeIdentityPool";
const _DIR = "DeleteIdentitiesResponse";
const _DIe = "DescribeIdentity";
const _DPN = "DeveloperProviderName";
const _DUARE = "DeveloperUserAlreadyRegisteredException";
const _DUI = "DeveloperUserIdentifier";
const _DUIL = "DeveloperUserIdentifierList";
const _DUIe = "DestinationUserIdentifier";
const _E = "Expiration";
const _EC = "ErrorCode";
const _ESE = "ExternalServiceException";
const _GCFI = "GetCredentialsForIdentity";
const _GCFII = "GetCredentialsForIdentityInput";
const _GCFIR = "GetCredentialsForIdentityResponse";
const _GI = "GetId";
const _GII = "GetIdInput";
const _GIPR = "GetIdentityPoolRoles";
const _GIPRI = "GetIdentityPoolRolesInput";
const _GIPRR = "GetIdentityPoolRolesResponse";
const _GIR = "GetIdResponse";
const _GOIT = "GetOpenIdToken";
const _GOITFDI = "GetOpenIdTokenForDeveloperIdentity";
const _GOITFDII = "GetOpenIdTokenForDeveloperIdentityInput";
const _GOITFDIR = "GetOpenIdTokenForDeveloperIdentityResponse";
const _GOITI = "GetOpenIdTokenInput";
const _GOITR = "GetOpenIdTokenResponse";
const _GPTAM = "GetPrincipalTagAttributeMap";
const _GPTAMI = "GetPrincipalTagAttributeMapInput";
const _GPTAMR = "GetPrincipalTagAttributeMapResponse";
const _HD = "HideDisabled";
const _I = "Identities";
const _ID = "IdentityDescription";
const _IEE = "InternalErrorException";
const _II = "IdentityId";
const _IIPCE = "InvalidIdentityPoolConfigurationException";
const _IITD = "IdentityIdsToDelete";
const _IL = "IdentitiesList";
const _IP = "IdentityPool";
const _IPE = "InvalidParameterException";
const _IPI = "IdentityPoolId";
const _IPL = "IdentityPoolsList";
const _IPN = "IdentityPoolName";
const _IPNd = "IdentityProviderName";
const _IPSD = "IdentityPoolShortDescription";
const _IPT = "IdentityProviderToken";
const _IPTd = "IdentityPoolTags";
const _IPd = "IdentityPools";
const _L = "Logins";
const _LDI = "LookupDeveloperIdentity";
const _LDII = "LookupDeveloperIdentityInput";
const _LDIR = "LookupDeveloperIdentityResponse";
const _LEE = "LimitExceededException";
const _LI = "ListIdentities";
const _LII = "ListIdentitiesInput";
const _LIP = "ListIdentityPools";
const _LIPI = "ListIdentityPoolsInput";
const _LIPR = "ListIdentityPoolsResponse";
const _LIR = "ListIdentitiesResponse";
const _LM = "LoginsMap";
const _LMD = "LastModifiedDate";
const _LTFR = "ListTagsForResource";
const _LTFRI = "ListTagsForResourceInput";
const _LTFRR = "ListTagsForResourceResponse";
const _LTR = "LoginsToRemove";
const _MDI = "MergeDeveloperIdentities";
const _MDII = "MergeDeveloperIdentitiesInput";
const _MDIR = "MergeDeveloperIdentitiesResponse";
const _MR = "MaxResults";
const _MRL = "MappingRulesList";
const _MRa = "MappingRule";
const _MT = "MatchType";
const _NAE = "NotAuthorizedException";
const _NT = "NextToken";
const _OICPARN = "OpenIdConnectProviderARNs";
const _OIDCT = "OIDCToken";
const _PN = "ProviderName";
const _PT = "PrincipalTags";
const _R = "Roles";
const _RA = "ResourceArn";
const _RARN = "RoleARN";
const _RC = "RulesConfiguration";
const _RCE = "ResourceConflictException";
const _RCT = "RulesConfigurationType";
const _RM = "RoleMappings";
const _RMM = "RoleMappingMap";
const _RMo = "RoleMapping";
const _RNFE = "ResourceNotFoundException";
const _Ru = "Rules";
const _SIPR = "SetIdentityPoolRoles";
const _SIPRI = "SetIdentityPoolRolesInput";
const _SK = "SecretKey";
const _SKS = "SecretKeyString";
const _SLP = "SupportedLoginProviders";
const _SPARN = "SamlProviderARNs";
const _SPTAM = "SetPrincipalTagAttributeMap";
const _SPTAMI = "SetPrincipalTagAttributeMapInput";
const _SPTAMR = "SetPrincipalTagAttributeMapResponse";
const _SSTC = "ServerSideTokenCheck";
const _ST = "SessionToken";
const _SUI = "SourceUserIdentifier";
const _T = "Token";
const _TD = "TokenDuration";
const _TK = "TagKeys";
const _TMRE = "TooManyRequestsException";
const _TR = "TagResource";
const _TRI = "TagResourceInput";
const _TRR = "TagResourceResponse";
const _Ta = "Tags";
const _Ty = "Type";
const _UD = "UseDefaults";
const _UDI = "UnlinkDeveloperIdentity";
const _UDII = "UnlinkDeveloperIdentityInput";
const _UI = "UnlinkIdentity";
const _UII = "UnprocessedIdentityIds";
const _UIIL = "UnprocessedIdentityIdList";
const _UIIn = "UnlinkIdentityInput";
const _UIInp = "UnprocessedIdentityId";
const _UIP = "UpdateIdentityPool";
const _UR = "UntagResource";
const _URI = "UntagResourceInput";
const _URR = "UntagResourceResponse";
const _V = "Value";
const _c = "client";
const _e = "error";
const _hE = "httpError";
const _m = "message";
const _s = "smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity";
const _se = "server";
const n0 = "com.amazonaws.cognitoidentity";
import { TypeRegistry } from "@smithy/core/schema";
import { CognitoIdentityServiceException } from "../models/CognitoIdentityServiceException";
import { ConcurrentModificationException, DeveloperUserAlreadyRegisteredException, ExternalServiceException, InternalErrorException, InvalidIdentityPoolConfigurationException, InvalidParameterException, LimitExceededException, NotAuthorizedException, ResourceConflictException, ResourceNotFoundException, TooManyRequestsException, } from "../models/errors";
const _s_registry = TypeRegistry.for(_s);
export var CognitoIdentityServiceException$ = [-3, _s, "CognitoIdentityServiceException", 0, [], []];
_s_registry.registerError(CognitoIdentityServiceException$, CognitoIdentityServiceException);
const n0_registry = TypeRegistry.for(n0);
export var ConcurrentModificationException$ = [-3, n0, _CME,
{ [_e]: _c, [_hE]: 400 },
[_m],
[0]
];
n0_registry.registerError(ConcurrentModificationException$, ConcurrentModificationException);
export var DeveloperUserAlreadyRegisteredException$ = [-3, n0, _DUARE,
{ [_e]: _c, [_hE]: 400 },
[_m],
[0]
];
n0_registry.registerError(DeveloperUserAlreadyRegisteredException$, DeveloperUserAlreadyRegisteredException);
export var ExternalServiceException$ = [-3, n0, _ESE,
{ [_e]: _c, [_hE]: 400 },
[_m],
[0]
];
n0_registry.registerError(ExternalServiceException$, ExternalServiceException);
export var InternalErrorException$ = [-3, n0, _IEE,
{ [_e]: _se },
[_m],
[0]
];
n0_registry.registerError(InternalErrorException$, InternalErrorException);
export var InvalidIdentityPoolConfigurationException$ = [-3, n0, _IIPCE,
{ [_e]: _c, [_hE]: 400 },
[_m],
[0]
];
n0_registry.registerError(InvalidIdentityPoolConfigurationException$, InvalidIdentityPoolConfigurationException);
export var InvalidParameterException$ = [-3, n0, _IPE,
{ [_e]: _c, [_hE]: 400 },
[_m],
[0]
];
n0_registry.registerError(InvalidParameterException$, InvalidParameterException);
export var LimitExceededException$ = [-3, n0, _LEE,
{ [_e]: _c, [_hE]: 400 },
[_m],
[0]
];
n0_registry.registerError(LimitExceededException$, LimitExceededException);
export var NotAuthorizedException$ = [-3, n0, _NAE,
{ [_e]: _c, [_hE]: 403 },
[_m],
[0]
];
n0_registry.registerError(NotAuthorizedException$, NotAuthorizedException);
export var ResourceConflictException$ = [-3, n0, _RCE,
{ [_e]: _c, [_hE]: 409 },
[_m],
[0]
];
n0_registry.registerError(ResourceConflictException$, ResourceConflictException);
export var ResourceNotFoundException$ = [-3, n0, _RNFE,
{ [_e]: _c, [_hE]: 404 },
[_m],
[0]
];
n0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);
export var TooManyRequestsException$ = [-3, n0, _TMRE,
{ [_e]: _c, [_hE]: 429 },
[_m],
[0]
];
n0_registry.registerError(TooManyRequestsException$, TooManyRequestsException);
export const errorTypeRegistries = [
_s_registry,
n0_registry,
];
var IdentityProviderToken = [0, n0, _IPT, 8, 0];
var OIDCToken = [0, n0, _OIDCT, 8, 0];
var SecretKeyString = [0, n0, _SKS, 8, 0];
export var CognitoIdentityProvider$ = [3, n0, _CIP,
0,
[_PN, _CI, _SSTC],
[0, 0, 2]
];
export var CreateIdentityPoolInput$ = [3, n0, _CIPI,
0,
[_IPN, _AUI, _ACF, _SLP, _DPN, _OICPARN, _CIPo, _SPARN, _IPTd],
[0, 2, 2, 128 | 0, 0, 64 | 0, () => CognitoIdentityProviderList, 64 | 0, 128 | 0], 2
];
export var Credentials$ = [3, n0, _C,
0,
[_AKI, _SK, _ST, _E],
[0, [() => SecretKeyString, 0], 0, 4]
];
export var DeleteIdentitiesInput$ = [3, n0, _DII,
0,
[_IITD],
[64 | 0], 1
];
export var DeleteIdentitiesResponse$ = [3, n0, _DIR,
0,
[_UII],
[() => UnprocessedIdentityIdList]
];
export var DeleteIdentityPoolInput$ = [3, n0, _DIPI,
0,
[_IPI],
[0], 1
];
export var DescribeIdentityInput$ = [3, n0, _DIIe,
0,
[_II],
[0], 1
];
export var DescribeIdentityPoolInput$ = [3, n0, _DIPIe,
0,
[_IPI],
[0], 1
];
export var GetCredentialsForIdentityInput$ = [3, n0, _GCFII,
0,
[_II, _L, _CRA],
[0, [() => LoginsMap, 0], 0], 1
];
export var GetCredentialsForIdentityResponse$ = [3, n0, _GCFIR,
0,
[_II, _C],
[0, [() => Credentials$, 0]]
];
export var GetIdentityPoolRolesInput$ = [3, n0, _GIPRI,
0,
[_IPI],
[0], 1
];
export var GetIdentityPoolRolesResponse$ = [3, n0, _GIPRR,
0,
[_IPI, _R, _RM],
[0, 128 | 0, () => RoleMappingMap]
];
export var GetIdInput$ = [3, n0, _GII,
0,
[_IPI, _AI, _L],
[0, 0, [() => LoginsMap, 0]], 1
];
export var GetIdResponse$ = [3, n0, _GIR,
0,
[_II],
[0]
];
export var GetOpenIdTokenForDeveloperIdentityInput$ = [3, n0, _GOITFDII,
0,
[_IPI, _L, _II, _PT, _TD],
[0, [() => LoginsMap, 0], 0, 128 | 0, 1], 2
];
export var GetOpenIdTokenForDeveloperIdentityResponse$ = [3, n0, _GOITFDIR,
0,
[_II, _T],
[0, [() => OIDCToken, 0]]
];
export var GetOpenIdTokenInput$ = [3, n0, _GOITI,
0,
[_II, _L],
[0, [() => LoginsMap, 0]], 1
];
export var GetOpenIdTokenResponse$ = [3, n0, _GOITR,
0,
[_II, _T],
[0, [() => OIDCToken, 0]]
];
export var GetPrincipalTagAttributeMapInput$ = [3, n0, _GPTAMI,
0,
[_IPI, _IPNd],
[0, 0], 2
];
export var GetPrincipalTagAttributeMapResponse$ = [3, n0, _GPTAMR,
0,
[_IPI, _IPNd, _UD, _PT],
[0, 0, 2, 128 | 0]
];
export var IdentityDescription$ = [3, n0, _ID,
0,
[_II, _L, _CD, _LMD],
[0, 64 | 0, 4, 4]
];
export var IdentityPool$ = [3, n0, _IP,
0,
[_IPI, _IPN, _AUI, _ACF, _SLP, _DPN, _OICPARN, _CIPo, _SPARN, _IPTd],
[0, 0, 2, 2, 128 | 0, 0, 64 | 0, () => CognitoIdentityProviderList, 64 | 0, 128 | 0], 3
];
export var IdentityPoolShortDescription$ = [3, n0, _IPSD,
0,
[_IPI, _IPN],
[0, 0]
];
export var ListIdentitiesInput$ = [3, n0, _LII,
0,
[_IPI, _MR, _NT, _HD],
[0, 1, 0, 2], 2
];
export var ListIdentitiesResponse$ = [3, n0, _LIR,
0,
[_IPI, _I, _NT],
[0, () => IdentitiesList, 0]
];
export var ListIdentityPoolsInput$ = [3, n0, _LIPI,
0,
[_MR, _NT],
[1, 0], 1
];
export var ListIdentityPoolsResponse$ = [3, n0, _LIPR,
0,
[_IPd, _NT],
[() => IdentityPoolsList, 0]
];
export var ListTagsForResourceInput$ = [3, n0, _LTFRI,
0,
[_RA],
[0], 1
];
export var ListTagsForResourceResponse$ = [3, n0, _LTFRR,
0,
[_Ta],
[128 | 0]
];
export var LookupDeveloperIdentityInput$ = [3, n0, _LDII,
0,
[_IPI, _II, _DUI, _MR, _NT],
[0, 0, 0, 1, 0], 1
];
export var LookupDeveloperIdentityResponse$ = [3, n0, _LDIR,
0,
[_II, _DUIL, _NT],
[0, 64 | 0, 0]
];
export var MappingRule$ = [3, n0, _MRa,
0,
[_Cl, _MT, _V, _RARN],
[0, 0, 0, 0], 4
];
export var MergeDeveloperIdentitiesInput$ = [3, n0, _MDII,
0,
[_SUI, _DUIe, _DPN, _IPI],
[0, 0, 0, 0], 4
];
export var MergeDeveloperIdentitiesResponse$ = [3, n0, _MDIR,
0,
[_II],
[0]
];
export var RoleMapping$ = [3, n0, _RMo,
0,
[_Ty, _ARR, _RC],
[0, 0, () => RulesConfigurationType$], 1
];
export var RulesConfigurationType$ = [3, n0, _RCT,
0,
[_Ru],
[() => MappingRulesList], 1
];
export var SetIdentityPoolRolesInput$ = [3, n0, _SIPRI,
0,
[_IPI, _R, _RM],
[0, 128 | 0, () => RoleMappingMap], 2
];
export var SetPrincipalTagAttributeMapInput$ = [3, n0, _SPTAMI,
0,
[_IPI, _IPNd, _UD, _PT],
[0, 0, 2, 128 | 0], 2
];
export var SetPrincipalTagAttributeMapResponse$ = [3, n0, _SPTAMR,
0,
[_IPI, _IPNd, _UD, _PT],
[0, 0, 2, 128 | 0]
];
export var TagResourceInput$ = [3, n0, _TRI,
0,
[_RA, _Ta],
[0, 128 | 0], 2
];
export var TagResourceResponse$ = [3, n0, _TRR,
0,
[],
[]
];
export var UnlinkDeveloperIdentityInput$ = [3, n0, _UDII,
0,
[_II, _IPI, _DPN, _DUI],
[0, 0, 0, 0], 4
];
export var UnlinkIdentityInput$ = [3, n0, _UIIn,
0,
[_II, _L, _LTR],
[0, [() => LoginsMap, 0], 64 | 0], 3
];
export var UnprocessedIdentityId$ = [3, n0, _UIInp,
0,
[_II, _EC],
[0, 0]
];
export var UntagResourceInput$ = [3, n0, _URI,
0,
[_RA, _TK],
[0, 64 | 0], 2
];
export var UntagResourceResponse$ = [3, n0, _URR,
0,
[],
[]
];
var __Unit = "unit";
var CognitoIdentityProviderList = [1, n0, _CIPL,
0, () => CognitoIdentityProvider$
];
var DeveloperUserIdentifierList = 64 | 0;
var IdentitiesList = [1, n0, _IL,
0, () => IdentityDescription$
];
var IdentityIdList = 64 | 0;
var IdentityPoolsList = [1, n0, _IPL,
0, () => IdentityPoolShortDescription$
];
var IdentityPoolTagsListType = 64 | 0;
var LoginsList = 64 | 0;
var MappingRulesList = [1, n0, _MRL,
0, () => MappingRule$
];
var OIDCProviderList = 64 | 0;
var SAMLProviderList = 64 | 0;
var UnprocessedIdentityIdList = [1, n0, _UIIL,
0, () => UnprocessedIdentityId$
];
var IdentityPoolTagsType = 128 | 0;
var IdentityProviders = 128 | 0;
var LoginsMap = [2, n0, _LM,
0, [0,
0],
[() => IdentityProviderToken,
0]
];
var PrincipalTags = 128 | 0;
var RoleMappingMap = [2, n0, _RMM,
0, 0, () => RoleMapping$
];
var RolesMap = 128 | 0;
export var CreateIdentityPool$ = [9, n0, _CIPr,
0, () => CreateIdentityPoolInput$, () => IdentityPool$
];
export var DeleteIdentities$ = [9, n0, _DI,
0, () => DeleteIdentitiesInput$, () => DeleteIdentitiesResponse$
];
export var DeleteIdentityPool$ = [9, n0, _DIP,
0, () => DeleteIdentityPoolInput$, () => __Unit
];
export var DescribeIdentity$ = [9, n0, _DIe,
0, () => DescribeIdentityInput$, () => IdentityDescription$
];
export var DescribeIdentityPool$ = [9, n0, _DIPe,
0, () => DescribeIdentityPoolInput$, () => IdentityPool$
];
export var GetCredentialsForIdentity$ = [9, n0, _GCFI,
0, () => GetCredentialsForIdentityInput$, () => GetCredentialsForIdentityResponse$
];
export var GetId$ = [9, n0, _GI,
0, () => GetIdInput$, () => GetIdResponse$
];
export var GetIdentityPoolRoles$ = [9, n0, _GIPR,
0, () => GetIdentityPoolRolesInput$, () => GetIdentityPoolRolesResponse$
];
export var GetOpenIdToken$ = [9, n0, _GOIT,
0, () => GetOpenIdTokenInput$, () => GetOpenIdTokenResponse$
];
export var GetOpenIdTokenForDeveloperIdentity$ = [9, n0, _GOITFDI,
0, () => GetOpenIdTokenForDeveloperIdentityInput$, () => GetOpenIdTokenForDeveloperIdentityResponse$
];
export var GetPrincipalTagAttributeMap$ = [9, n0, _GPTAM,
0, () => GetPrincipalTagAttributeMapInput$, () => GetPrincipalTagAttributeMapResponse$
];
export var ListIdentities$ = [9, n0, _LI,
0, () => ListIdentitiesInput$, () => ListIdentitiesResponse$
];
export var ListIdentityPools$ = [9, n0, _LIP,
0, () => ListIdentityPoolsInput$, () => ListIdentityPoolsResponse$
];
export var ListTagsForResource$ = [9, n0, _LTFR,
0, () => ListTagsForResourceInput$, () => ListTagsForResourceResponse$
];
export var LookupDeveloperIdentity$ = [9, n0, _LDI,
0, () => LookupDeveloperIdentityInput$, () => LookupDeveloperIdentityResponse$
];
export var MergeDeveloperIdentities$ = [9, n0, _MDI,
0, () => MergeDeveloperIdentitiesInput$, () => MergeDeveloperIdentitiesResponse$
];
export var SetIdentityPoolRoles$ = [9, n0, _SIPR,
0, () => SetIdentityPoolRolesInput$, () => __Unit
];
export var SetPrincipalTagAttributeMap$ = [9, n0, _SPTAM,
0, () => SetPrincipalTagAttributeMapInput$, () => SetPrincipalTagAttributeMapResponse$
];
export var TagResource$ = [9, n0, _TR,
0, () => TagResourceInput$, () => TagResourceResponse$
];
export var UnlinkDeveloperIdentity$ = [9, n0, _UDI,
0, () => UnlinkDeveloperIdentityInput$, () => __Unit
];
export var UnlinkIdentity$ = [9, n0, _UI,
0, () => UnlinkIdentityInput$, () => __Unit
];
export var UntagResource$ = [9, n0, _UR,
0, () => UntagResourceInput$, () => UntagResourceResponse$
];
export var UpdateIdentityPool$ = [9, n0, _UIP,
0, () => IdentityPool$, () => IdentityPool$
];