UNPKG

13.3 kBTypeScriptView Raw
1import {Request} from '../lib/request';
2import {Response} from '../lib/response';
3import {AWSError} from '../lib/error';
4import {Service} from '../lib/service';
5import {ServiceConfigurationOptions} from '../lib/service';
6import {ConfigBase as Config} from '../lib/config';
7interface Blob {}
8declare class Mobile extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: Mobile.Types.ClientConfiguration)
13 config: Config & Mobile.Types.ClientConfiguration;
14 /**
15 * Creates an AWS Mobile Hub project.
16 */
17 createProject(params: Mobile.Types.CreateProjectRequest, callback?: (err: AWSError, data: Mobile.Types.CreateProjectResult) => void): Request<Mobile.Types.CreateProjectResult, AWSError>;
18 /**
19 * Creates an AWS Mobile Hub project.
20 */
21 createProject(callback?: (err: AWSError, data: Mobile.Types.CreateProjectResult) => void): Request<Mobile.Types.CreateProjectResult, AWSError>;
22 /**
23 * Delets a project in AWS Mobile Hub.
24 */
25 deleteProject(params: Mobile.Types.DeleteProjectRequest, callback?: (err: AWSError, data: Mobile.Types.DeleteProjectResult) => void): Request<Mobile.Types.DeleteProjectResult, AWSError>;
26 /**
27 * Delets a project in AWS Mobile Hub.
28 */
29 deleteProject(callback?: (err: AWSError, data: Mobile.Types.DeleteProjectResult) => void): Request<Mobile.Types.DeleteProjectResult, AWSError>;
30 /**
31 * Get the bundle details for the requested bundle id.
32 */
33 describeBundle(params: Mobile.Types.DescribeBundleRequest, callback?: (err: AWSError, data: Mobile.Types.DescribeBundleResult) => void): Request<Mobile.Types.DescribeBundleResult, AWSError>;
34 /**
35 * Get the bundle details for the requested bundle id.
36 */
37 describeBundle(callback?: (err: AWSError, data: Mobile.Types.DescribeBundleResult) => void): Request<Mobile.Types.DescribeBundleResult, AWSError>;
38 /**
39 * Gets details about a project in AWS Mobile Hub.
40 */
41 describeProject(params: Mobile.Types.DescribeProjectRequest, callback?: (err: AWSError, data: Mobile.Types.DescribeProjectResult) => void): Request<Mobile.Types.DescribeProjectResult, AWSError>;
42 /**
43 * Gets details about a project in AWS Mobile Hub.
44 */
45 describeProject(callback?: (err: AWSError, data: Mobile.Types.DescribeProjectResult) => void): Request<Mobile.Types.DescribeProjectResult, AWSError>;
46 /**
47 * Generates customized software development kit (SDK) and or tool packages used to integrate mobile web or mobile app clients with backend AWS resources.
48 */
49 exportBundle(params: Mobile.Types.ExportBundleRequest, callback?: (err: AWSError, data: Mobile.Types.ExportBundleResult) => void): Request<Mobile.Types.ExportBundleResult, AWSError>;
50 /**
51 * Generates customized software development kit (SDK) and or tool packages used to integrate mobile web or mobile app clients with backend AWS resources.
52 */
53 exportBundle(callback?: (err: AWSError, data: Mobile.Types.ExportBundleResult) => void): Request<Mobile.Types.ExportBundleResult, AWSError>;
54 /**
55 * Exports project configuration to a snapshot which can be downloaded and shared. Note that mobile app push credentials are encrypted in exported projects, so they can only be shared successfully within the same AWS account.
56 */
57 exportProject(params: Mobile.Types.ExportProjectRequest, callback?: (err: AWSError, data: Mobile.Types.ExportProjectResult) => void): Request<Mobile.Types.ExportProjectResult, AWSError>;
58 /**
59 * Exports project configuration to a snapshot which can be downloaded and shared. Note that mobile app push credentials are encrypted in exported projects, so they can only be shared successfully within the same AWS account.
60 */
61 exportProject(callback?: (err: AWSError, data: Mobile.Types.ExportProjectResult) => void): Request<Mobile.Types.ExportProjectResult, AWSError>;
62 /**
63 * List all available bundles.
64 */
65 listBundles(params: Mobile.Types.ListBundlesRequest, callback?: (err: AWSError, data: Mobile.Types.ListBundlesResult) => void): Request<Mobile.Types.ListBundlesResult, AWSError>;
66 /**
67 * List all available bundles.
68 */
69 listBundles(callback?: (err: AWSError, data: Mobile.Types.ListBundlesResult) => void): Request<Mobile.Types.ListBundlesResult, AWSError>;
70 /**
71 * Lists projects in AWS Mobile Hub.
72 */
73 listProjects(params: Mobile.Types.ListProjectsRequest, callback?: (err: AWSError, data: Mobile.Types.ListProjectsResult) => void): Request<Mobile.Types.ListProjectsResult, AWSError>;
74 /**
75 * Lists projects in AWS Mobile Hub.
76 */
77 listProjects(callback?: (err: AWSError, data: Mobile.Types.ListProjectsResult) => void): Request<Mobile.Types.ListProjectsResult, AWSError>;
78 /**
79 * Update an existing project.
80 */
81 updateProject(params: Mobile.Types.UpdateProjectRequest, callback?: (err: AWSError, data: Mobile.Types.UpdateProjectResult) => void): Request<Mobile.Types.UpdateProjectResult, AWSError>;
82 /**
83 * Update an existing project.
84 */
85 updateProject(callback?: (err: AWSError, data: Mobile.Types.UpdateProjectResult) => void): Request<Mobile.Types.UpdateProjectResult, AWSError>;
86}
87declare namespace Mobile {
88 export type AttributeKey = string;
89 export type AttributeValue = string;
90 export type Attributes = {[key: string]: AttributeValue};
91 export type Boolean = boolean;
92 export type BundleDescription = string;
93 export interface BundleDetails {
94 bundleId?: BundleId;
95 title?: BundleTitle;
96 version?: BundleVersion;
97 description?: BundleDescription;
98 iconUrl?: IconUrl;
99 availablePlatforms?: Platforms;
100 }
101 export type BundleId = string;
102 export type BundleList = BundleDetails[];
103 export type BundleTitle = string;
104 export type BundleVersion = string;
105 export type ConsoleUrl = string;
106 export type Contents = Buffer|Uint8Array|Blob|string;
107 export interface CreateProjectRequest {
108 /**
109 * Name of the project.
110 */
111 name?: ProjectName;
112 /**
113 * Default region where project resources should be created.
114 */
115 region?: ProjectRegion;
116 /**
117 * ZIP or YAML file which contains configuration settings to be used when creating the project. This may be the contents of the file downloaded from the URL provided in an export project operation.
118 */
119 contents?: Contents;
120 /**
121 * Unique identifier for an exported snapshot of project configuration. This snapshot identifier is included in the share URL when a project is exported.
122 */
123 snapshotId?: SnapshotId;
124 }
125 export interface CreateProjectResult {
126 /**
127 * Detailed information about the created AWS Mobile Hub project.
128 */
129 details?: ProjectDetails;
130 }
131 export type _Date = Date;
132 export interface DeleteProjectRequest {
133 /**
134 * Unique project identifier.
135 */
136 projectId: ProjectId;
137 }
138 export interface DeleteProjectResult {
139 /**
140 * Resources which were deleted.
141 */
142 deletedResources?: Resources;
143 /**
144 * Resources which were not deleted, due to a risk of losing potentially important data or files.
145 */
146 orphanedResources?: Resources;
147 }
148 export interface DescribeBundleRequest {
149 /**
150 * Unique bundle identifier.
151 */
152 bundleId: BundleId;
153 }
154 export interface DescribeBundleResult {
155 /**
156 * The details of the bundle.
157 */
158 details?: BundleDetails;
159 }
160 export interface DescribeProjectRequest {
161 /**
162 * Unique project identifier.
163 */
164 projectId: ProjectId;
165 /**
166 * If set to true, causes AWS Mobile Hub to synchronize information from other services, e.g., update state of AWS CloudFormation stacks in the AWS Mobile Hub project.
167 */
168 syncFromResources?: Boolean;
169 }
170 export interface DescribeProjectResult {
171 details?: ProjectDetails;
172 }
173 export type DownloadUrl = string;
174 export interface ExportBundleRequest {
175 /**
176 * Unique bundle identifier.
177 */
178 bundleId: BundleId;
179 /**
180 * Unique project identifier.
181 */
182 projectId?: ProjectId;
183 /**
184 * Developer desktop or target application platform.
185 */
186 platform?: Platform;
187 }
188 export interface ExportBundleResult {
189 /**
190 * URL which contains the custom-generated SDK and tool packages used to integrate the client mobile app or web app with the AWS resources created by the AWS Mobile Hub project.
191 */
192 downloadUrl?: DownloadUrl;
193 }
194 export interface ExportProjectRequest {
195 /**
196 * Unique project identifier.
197 */
198 projectId: ProjectId;
199 }
200 export interface ExportProjectResult {
201 /**
202 * URL which can be used to download the exported project configuation file(s).
203 */
204 downloadUrl?: DownloadUrl;
205 /**
206 * URL which can be shared to allow other AWS users to create their own project in AWS Mobile Hub with the same configuration as the specified project. This URL pertains to a snapshot in time of the project configuration that is created when this API is called. If you want to share additional changes to your project configuration, then you will need to create and share a new snapshot by calling this method again.
207 */
208 shareUrl?: ShareUrl;
209 /**
210 * Unique identifier for the exported snapshot of the project configuration. This snapshot identifier is included in the share URL.
211 */
212 snapshotId?: SnapshotId;
213 }
214 export type Feature = string;
215 export type IconUrl = string;
216 export interface ListBundlesRequest {
217 /**
218 * Maximum number of records to list in a single response.
219 */
220 maxResults?: MaxResults;
221 /**
222 * Pagination token. Set to null to start listing bundles from start. If non-null pagination token is returned in a result, then pass its value in here in another request to list more bundles.
223 */
224 nextToken?: NextToken;
225 }
226 export interface ListBundlesResult {
227 /**
228 * A list of bundles.
229 */
230 bundleList?: BundleList;
231 /**
232 * Pagination token. If non-null pagination token is returned in a result, then pass its value in another request to fetch more entries.
233 */
234 nextToken?: NextToken;
235 }
236 export interface ListProjectsRequest {
237 /**
238 * Maximum number of records to list in a single response.
239 */
240 maxResults?: MaxResults;
241 /**
242 * Pagination token. Set to null to start listing projects from start. If non-null pagination token is returned in a result, then pass its value in here in another request to list more projects.
243 */
244 nextToken?: NextToken;
245 }
246 export interface ListProjectsResult {
247 projects?: ProjectSummaries;
248 nextToken?: NextToken;
249 }
250 export type MaxResults = number;
251 export type NextToken = string;
252 export type Platform = "OSX"|"WINDOWS"|"LINUX"|"OBJC"|"SWIFT"|"ANDROID"|"JAVASCRIPT"|string;
253 export type Platforms = Platform[];
254 export interface ProjectDetails {
255 name?: ProjectName;
256 projectId?: ProjectId;
257 region?: ProjectRegion;
258 state?: ProjectState;
259 /**
260 * Date the project was created.
261 */
262 createdDate?: _Date;
263 /**
264 * Date of the last modification of the project.
265 */
266 lastUpdatedDate?: _Date;
267 /**
268 * Website URL for this project in the AWS Mobile Hub console.
269 */
270 consoleUrl?: ConsoleUrl;
271 resources?: Resources;
272 }
273 export type ProjectId = string;
274 export type ProjectName = string;
275 export type ProjectRegion = string;
276 export type ProjectState = "NORMAL"|"SYNCING"|"IMPORTING"|string;
277 export type ProjectSummaries = ProjectSummary[];
278 export interface ProjectSummary {
279 /**
280 * Name of the project.
281 */
282 name?: ProjectName;
283 /**
284 * Unique project identifier.
285 */
286 projectId?: ProjectId;
287 }
288 export interface Resource {
289 type?: ResourceType;
290 name?: ResourceName;
291 arn?: ResourceArn;
292 feature?: Feature;
293 attributes?: Attributes;
294 }
295 export type ResourceArn = string;
296 export type ResourceName = string;
297 export type ResourceType = string;
298 export type Resources = Resource[];
299 export type ShareUrl = string;
300 export type SnapshotId = string;
301 export interface UpdateProjectRequest {
302 /**
303 * ZIP or YAML file which contains project configuration to be updated. This should be the contents of the file downloaded from the URL provided in an export project operation.
304 */
305 contents?: Contents;
306 /**
307 * Unique project identifier.
308 */
309 projectId: ProjectId;
310 }
311 export interface UpdateProjectResult {
312 /**
313 * Detailed information about the updated AWS Mobile Hub project.
314 */
315 details?: ProjectDetails;
316 }
317 /**
318 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
319 */
320 export type apiVersion = "2017-07-01"|"latest"|string;
321 export interface ClientApiVersions {
322 /**
323 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
324 */
325 apiVersion?: apiVersion;
326 }
327 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
328 /**
329 * Contains interfaces for use with the Mobile client.
330 */
331 export import Types = Mobile;
332}
333export = Mobile;