💾 Archived View for gmi.noulin.net › gitRepositories › git-off › file › src › node_modules › aws-sdk… captured on 2023-01-29 at 11:58:22. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
service.d.ts (2803B)
1 import {Request} from './request'; 2 import {AWSError} from './error'; 3 import {ConfigurationOptions, ConfigBase} from './config'; 4 export class Service { 5 /** 6 * Creates a new service object with a configuration object. 7 */ 8 constructor(config?: ServiceConfigurationOptions); 9 10 /** 11 * Defines a new Service class using a service identifier and list of versions including an optional set of features (functions) to apply to the class prototype. 12 * 13 * @param {string} serviceIdentifier - the identifier for the service. 14 * @param {string[]} versions - a list of versions that work with this service. 15 * @param {Object} features - an object to attach to the prototype. 16 */ 17 defineService(serviceIdentifier: string, versions: string[], features?: any): typeof Service; 18 /** 19 * Calls an operation on a service with the given input parameters. 20 * 21 * @param {string} operation - the name of the operation to call on the service. 22 * @param {map} params - a map of input options for the operation. 23 */ 24 makeRequest(operation: string, params?: {[key: string]: any}, callback?: (err: AWSError, data: any) => void): Request<any, AWSError>; 25 /** 26 * Calls an operation on a service with the given input parameters, without any authentication data. 27 * 28 * @param {string} operation - the name of the operation to call on the service. 29 * @param {map} params - a map of input options for the operation. 30 */ 31 makeUnauthenticatedRequest(operation: string, params?: {[key: string]: any}, callback?: (err: AWSError, data: any) => void): Request<any, AWSError>; 32 /** 33 * Override this method to setup any custom request listeners for each new request to the service. 34 */ 35 setupRequestListeners(): void; 36 /** 37 * Waits for a given state. 38 */ 39 waitFor(state: string, params?: {[key: string]: any}, callback?: (err: AWSError, data: any) => void): Request<any, AWSError>; 40 waitFor(state: string, callback?: (err: AWSError, data: any) => void): Request<any, AWSError>; 41 42 /** 43 * The list of API versions supported by this service. 44 */ 45 apiVersions: string[]; 46 47 config: ConfigBase & ServiceConfigurationOptions; 48 } 49 50 export interface ServiceConfigurationOptions extends ConfigurationOptions { 51 /** 52 * The endpoint URI to send requests to. The default endpoint is built from the configured region. 53 * The endpoint should be a string like 'https://{service}.{region}.amazonaws.com'. 54 */ 55 endpoint?: string; 56 /** 57 * An optional map of parameters to bind to every request sent by this service object. 58 * For more information on bound parameters, see "Working with Services" in the Getting Started Guide. 59 */ 60 params?: { 61 [key: string]: any; 62 } 63 } 64