import { AppSyncError, ConfigurationManager } from '@sudoplatform/sudo-common'; import { GraphQLError } from 'graphql'; import * as t from 'io-ts'; import { AddEntitlementsSequenceInput, AddEntitlementsSetInput, ApplyEntitlementsSequenceToUserInput, ApplyEntitlementsSequenceToUsersInput, ApplyEntitlementsSetToUserInput, ApplyEntitlementsSetToUsersInput, ApplyEntitlementsToUserInput, ApplyEntitlementsToUsersInput, ApplyExpendableEntitlementsToUserInput, EntitledUser, EntitlementDefinition, EntitlementDefinitionConnection, EntitlementsSequence, EntitlementsSequencesConnection, EntitlementsSet, EntitlementsSetsConnection, ExternalEntitlementsConsumption, ExternalUserEntitlements, ExternalUserEntitlementsResult, GetEntitlementDefinitionInput, GetEntitlementsForUserInput, GetEntitlementsSequenceInput, GetEntitlementsSetInput, RemoveEntitledUserInput, RemoveEntitlementsSequenceInput, RemoveEntitlementsSetInput, SetEntitlementsSequenceInput, SetEntitlementsSetInput } from '../gen/graphqlTypes'; import { GraphQLClient } from '@sudoplatform/sudo-user'; export interface AWSCredential { accessKeyId: string; secretAccessKey: string; sessionToken?: string; } export type Credential = { type: 'API_KEY'; key: string; } | { type: 'IAM'; credential?: AWSCredential; }; export declare const AdminConsoleProject: t.TypeC<{ region: t.StringC; apiUrl: t.StringC; userPoolId: t.StringC; clientId: t.StringC; }>; export type AdminConsoleProject = t.TypeOf; /** * AppSync wrapper to use to invoke Entitlements Service APIs. */ export declare class AdminApiClient { private readonly configurationManager; private readonly client; constructor(apiKeyOrCred: string | Credential, configurationManager?: ConfigurationManager, client?: GraphQLClient); graphQLErrorToClientError(error: AppSyncError | GraphQLError): Error; private mapAndThrowError; getEntitlementsSet(input: GetEntitlementsSetInput): Promise; listEntitlementsSets(nextToken?: string): Promise; getEntitlementDefinition(input: GetEntitlementDefinitionInput): Promise; listEntitlementDefinitions(limit?: number, nextToken?: string): Promise; getEntitlementsForUser(input: GetEntitlementsForUserInput): Promise; addEntitlementsSet(input: AddEntitlementsSetInput): Promise; setEntitlementsSet(input: SetEntitlementsSetInput): Promise; removeEntitlementsSet(input: RemoveEntitlementsSetInput): Promise; getEntitlementsSequence(input: GetEntitlementsSequenceInput): Promise; listEntitlementsSequences(nextToken?: string): Promise; addEntitlementsSequence(input: AddEntitlementsSequenceInput): Promise; setEntitlementsSequence(input: SetEntitlementsSequenceInput): Promise; removeEntitlementsSequence(input: RemoveEntitlementsSequenceInput): Promise; applyEntitlementsSequenceToUser(input: ApplyEntitlementsSequenceToUserInput): Promise; applyEntitlementsSequenceToUsers(input: ApplyEntitlementsSequenceToUsersInput): Promise; applyEntitlementsSetToUser(input: ApplyEntitlementsSetToUserInput): Promise; applyEntitlementsSetToUsers(input: ApplyEntitlementsSetToUsersInput): Promise; applyEntitlementsToUser(input: ApplyEntitlementsToUserInput): Promise; applyEntitlementsToUsers(input: ApplyEntitlementsToUsersInput): Promise; applyExpendableEntitlementsToUser(input: ApplyExpendableEntitlementsToUserInput): Promise; removeEntitledUser(input: RemoveEntitledUserInput): Promise; }