1 | import {Request} from './request';
|
2 | import {AWSError} from './error';
|
3 | import {ConfigurationOptions, ConfigBase} from './config';
|
4 | import {Endpoint} from './endpoint';
|
5 |
|
6 | export interface WaiterConfiguration {
|
7 | |
8 |
|
9 |
|
10 | delay?: number;
|
11 |
|
12 | |
13 |
|
14 |
|
15 | maxAttempts?: number;
|
16 | }
|
17 |
|
18 | export class Service {
|
19 | |
20 |
|
21 |
|
22 | constructor(config?: ServiceConfigurationOptions);
|
23 |
|
24 | /**
|
25 | * 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.
|
26 | *
|
27 | * @param {string} serviceIdentifier - the identifier for the service.
|
28 | * @param {string[]} versions - a list of versions that work with this service.
|
29 | * @param {Object} features - an object to attach to the prototype.
|
30 | */
|
31 | defineService(serviceIdentifier: string, versions: string[], features?: any): typeof Service;
|
32 | |
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 | makeRequest(operation: string, params?: {[key: string]: any}, callback?: (err: AWSError, data: any) => void): Request<any, AWSError>;
|
39 | |
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 | makeUnauthenticatedRequest(operation: string, params?: {[key: string]: any}, callback?: (err: AWSError, data: any) => void): Request<any, AWSError>;
|
46 | |
47 |
|
48 |
|
49 | setupRequestListeners(request: Request<any, AWSError>): void;
|
50 | |
51 |
|
52 |
|
53 | waitFor(state: string, params?: {[key: string]: any, $waiter?: WaiterConfiguration}, callback?: (err: AWSError, data: any) => void): Request<any, AWSError>;
|
54 | waitFor(state: string, callback?: (err: AWSError, data: any) => void): Request<any, AWSError>;
|
55 |
|
56 | |
57 |
|
58 |
|
59 | apiVersions: string[];
|
60 |
|
61 | config: ConfigBase & ServiceConfigurationOptions;
|
62 |
|
63 | |
64 |
|
65 |
|
66 | endpoint: Endpoint;
|
67 | }
|
68 |
|
69 | export interface ServiceConfigurationOptions extends ConfigurationOptions {
|
70 | |
71 |
|
72 |
|
73 |
|
74 | endpoint?: string;
|
75 | |
76 |
|
77 |
|
78 |
|
79 | params?: {
|
80 | [key: string]: any;
|
81 | }
|
82 | }
|
83 |
|