MCPcopy Index your code
hub / github.com/simstudioai/sim / getConfiguration

Function getConfiguration

apps/sim/app/api/tools/appconfig/utils.ts:457–482  ·  view source on GitHub ↗
(
  client: AppConfigDataClient,
  applicationId: string,
  environmentId: string,
  configurationProfileId: string
)

Source from the content-addressed store, hash-verified

455}
456
457export async function getConfiguration(
458 client: AppConfigDataClient,
459 applicationId: string,
460 environmentId: string,
461 configurationProfileId: string
462) {
463 const session = await client.send(
464 new StartConfigurationSessionCommand({
465 ApplicationIdentifier: applicationId,
466 EnvironmentIdentifier: environmentId,
467 ConfigurationProfileIdentifier: configurationProfileId,
468 })
469 )
470
471 const response = await client.send(
472 new GetLatestConfigurationCommand({
473 ConfigurationToken: session.InitialConfigurationToken,
474 })
475 )
476
477 return {
478 configuration: decodeContent(response.Configuration),
479 contentType: response.ContentType ?? null,
480 versionLabel: response.VersionLabel ?? null,
481 }
482}
483
484export async function getApplication(client: AppConfigClient, applicationId: string) {
485 const response = await client.send(new GetApplicationCommand({ ApplicationId: applicationId }))

Callers 1

route.tsFile · 0.90

Calls 2

decodeContentFunction · 0.85
sendMethod · 0.80

Tested by

no test coverage detected