UNPKG

39.4 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 CognitoSync extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: CognitoSync.Types.ClientConfiguration)
13 config: Config & CognitoSync.Types.ClientConfiguration;
14 /**
15 * Initiates a bulk publish of all existing datasets for an Identity Pool to the configured stream. Customers are limited to one successful bulk publish per 24 hours. Bulk publish is an asynchronous request, customers can see the status of the request via the GetBulkPublishDetails operation. This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.
16 */
17 bulkPublish(params: CognitoSync.Types.BulkPublishRequest, callback?: (err: AWSError, data: CognitoSync.Types.BulkPublishResponse) => void): Request<CognitoSync.Types.BulkPublishResponse, AWSError>;
18 /**
19 * Initiates a bulk publish of all existing datasets for an Identity Pool to the configured stream. Customers are limited to one successful bulk publish per 24 hours. Bulk publish is an asynchronous request, customers can see the status of the request via the GetBulkPublishDetails operation. This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.
20 */
21 bulkPublish(callback?: (err: AWSError, data: CognitoSync.Types.BulkPublishResponse) => void): Request<CognitoSync.Types.BulkPublishResponse, AWSError>;
22 /**
23 * Deletes the specific dataset. The dataset will be deleted permanently, and the action can't be undone. Datasets that this dataset was merged with will no longer report the merge. Any subsequent operation on this dataset will result in a ResourceNotFoundException. This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.
24 */
25 deleteDataset(params: CognitoSync.Types.DeleteDatasetRequest, callback?: (err: AWSError, data: CognitoSync.Types.DeleteDatasetResponse) => void): Request<CognitoSync.Types.DeleteDatasetResponse, AWSError>;
26 /**
27 * Deletes the specific dataset. The dataset will be deleted permanently, and the action can't be undone. Datasets that this dataset was merged with will no longer report the merge. Any subsequent operation on this dataset will result in a ResourceNotFoundException. This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.
28 */
29 deleteDataset(callback?: (err: AWSError, data: CognitoSync.Types.DeleteDatasetResponse) => void): Request<CognitoSync.Types.DeleteDatasetResponse, AWSError>;
30 /**
31 * Gets meta data about a dataset by identity and dataset name. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data. This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use Cognito Identity credentials to make this API call.
32 */
33 describeDataset(params: CognitoSync.Types.DescribeDatasetRequest, callback?: (err: AWSError, data: CognitoSync.Types.DescribeDatasetResponse) => void): Request<CognitoSync.Types.DescribeDatasetResponse, AWSError>;
34 /**
35 * Gets meta data about a dataset by identity and dataset name. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data. This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use Cognito Identity credentials to make this API call.
36 */
37 describeDataset(callback?: (err: AWSError, data: CognitoSync.Types.DescribeDatasetResponse) => void): Request<CognitoSync.Types.DescribeDatasetResponse, AWSError>;
38 /**
39 * Gets usage details (for example, data storage) about a particular identity pool. This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.
40 */
41 describeIdentityPoolUsage(params: CognitoSync.Types.DescribeIdentityPoolUsageRequest, callback?: (err: AWSError, data: CognitoSync.Types.DescribeIdentityPoolUsageResponse) => void): Request<CognitoSync.Types.DescribeIdentityPoolUsageResponse, AWSError>;
42 /**
43 * Gets usage details (for example, data storage) about a particular identity pool. This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.
44 */
45 describeIdentityPoolUsage(callback?: (err: AWSError, data: CognitoSync.Types.DescribeIdentityPoolUsageResponse) => void): Request<CognitoSync.Types.DescribeIdentityPoolUsageResponse, AWSError>;
46 /**
47 * Gets usage information for an identity, including number of datasets and data usage. This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.
48 */
49 describeIdentityUsage(params: CognitoSync.Types.DescribeIdentityUsageRequest, callback?: (err: AWSError, data: CognitoSync.Types.DescribeIdentityUsageResponse) => void): Request<CognitoSync.Types.DescribeIdentityUsageResponse, AWSError>;
50 /**
51 * Gets usage information for an identity, including number of datasets and data usage. This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.
52 */
53 describeIdentityUsage(callback?: (err: AWSError, data: CognitoSync.Types.DescribeIdentityUsageResponse) => void): Request<CognitoSync.Types.DescribeIdentityUsageResponse, AWSError>;
54 /**
55 * Get the status of the last BulkPublish operation for an identity pool. This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.
56 */
57 getBulkPublishDetails(params: CognitoSync.Types.GetBulkPublishDetailsRequest, callback?: (err: AWSError, data: CognitoSync.Types.GetBulkPublishDetailsResponse) => void): Request<CognitoSync.Types.GetBulkPublishDetailsResponse, AWSError>;
58 /**
59 * Get the status of the last BulkPublish operation for an identity pool. This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.
60 */
61 getBulkPublishDetails(callback?: (err: AWSError, data: CognitoSync.Types.GetBulkPublishDetailsResponse) => void): Request<CognitoSync.Types.GetBulkPublishDetailsResponse, AWSError>;
62 /**
63 * Gets the events and the corresponding Lambda functions associated with an identity pool. This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.
64 */
65 getCognitoEvents(params: CognitoSync.Types.GetCognitoEventsRequest, callback?: (err: AWSError, data: CognitoSync.Types.GetCognitoEventsResponse) => void): Request<CognitoSync.Types.GetCognitoEventsResponse, AWSError>;
66 /**
67 * Gets the events and the corresponding Lambda functions associated with an identity pool. This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.
68 */
69 getCognitoEvents(callback?: (err: AWSError, data: CognitoSync.Types.GetCognitoEventsResponse) => void): Request<CognitoSync.Types.GetCognitoEventsResponse, AWSError>;
70 /**
71 * Gets the configuration settings of an identity pool. This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.
72 */
73 getIdentityPoolConfiguration(params: CognitoSync.Types.GetIdentityPoolConfigurationRequest, callback?: (err: AWSError, data: CognitoSync.Types.GetIdentityPoolConfigurationResponse) => void): Request<CognitoSync.Types.GetIdentityPoolConfigurationResponse, AWSError>;
74 /**
75 * Gets the configuration settings of an identity pool. This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.
76 */
77 getIdentityPoolConfiguration(callback?: (err: AWSError, data: CognitoSync.Types.GetIdentityPoolConfigurationResponse) => void): Request<CognitoSync.Types.GetIdentityPoolConfigurationResponse, AWSError>;
78 /**
79 * Lists datasets for an identity. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data. ListDatasets can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use the Cognito Identity credentials to make this API call.
80 */
81 listDatasets(params: CognitoSync.Types.ListDatasetsRequest, callback?: (err: AWSError, data: CognitoSync.Types.ListDatasetsResponse) => void): Request<CognitoSync.Types.ListDatasetsResponse, AWSError>;
82 /**
83 * Lists datasets for an identity. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data. ListDatasets can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use the Cognito Identity credentials to make this API call.
84 */
85 listDatasets(callback?: (err: AWSError, data: CognitoSync.Types.ListDatasetsResponse) => void): Request<CognitoSync.Types.ListDatasetsResponse, AWSError>;
86 /**
87 * Gets a list of identity pools registered with Cognito. ListIdentityPoolUsage can only be called with developer credentials. You cannot make this API call with the temporary user credentials provided by Cognito Identity.
88 */
89 listIdentityPoolUsage(params: CognitoSync.Types.ListIdentityPoolUsageRequest, callback?: (err: AWSError, data: CognitoSync.Types.ListIdentityPoolUsageResponse) => void): Request<CognitoSync.Types.ListIdentityPoolUsageResponse, AWSError>;
90 /**
91 * Gets a list of identity pools registered with Cognito. ListIdentityPoolUsage can only be called with developer credentials. You cannot make this API call with the temporary user credentials provided by Cognito Identity.
92 */
93 listIdentityPoolUsage(callback?: (err: AWSError, data: CognitoSync.Types.ListIdentityPoolUsageResponse) => void): Request<CognitoSync.Types.ListIdentityPoolUsageResponse, AWSError>;
94 /**
95 * Gets paginated records, optionally changed after a particular sync count for a dataset and identity. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data. ListRecords can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use Cognito Identity credentials to make this API call.
96 */
97 listRecords(params: CognitoSync.Types.ListRecordsRequest, callback?: (err: AWSError, data: CognitoSync.Types.ListRecordsResponse) => void): Request<CognitoSync.Types.ListRecordsResponse, AWSError>;
98 /**
99 * Gets paginated records, optionally changed after a particular sync count for a dataset and identity. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data. ListRecords can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use Cognito Identity credentials to make this API call.
100 */
101 listRecords(callback?: (err: AWSError, data: CognitoSync.Types.ListRecordsResponse) => void): Request<CognitoSync.Types.ListRecordsResponse, AWSError>;
102 /**
103 * Registers a device to receive push sync notifications. This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.
104 */
105 registerDevice(params: CognitoSync.Types.RegisterDeviceRequest, callback?: (err: AWSError, data: CognitoSync.Types.RegisterDeviceResponse) => void): Request<CognitoSync.Types.RegisterDeviceResponse, AWSError>;
106 /**
107 * Registers a device to receive push sync notifications. This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.
108 */
109 registerDevice(callback?: (err: AWSError, data: CognitoSync.Types.RegisterDeviceResponse) => void): Request<CognitoSync.Types.RegisterDeviceResponse, AWSError>;
110 /**
111 * Sets the AWS Lambda function for a given event type for an identity pool. This request only updates the key/value pair specified. Other key/values pairs are not updated. To remove a key value pair, pass a empty value for the particular key. This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.
112 */
113 setCognitoEvents(params: CognitoSync.Types.SetCognitoEventsRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
114 /**
115 * Sets the AWS Lambda function for a given event type for an identity pool. This request only updates the key/value pair specified. Other key/values pairs are not updated. To remove a key value pair, pass a empty value for the particular key. This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.
116 */
117 setCognitoEvents(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
118 /**
119 * Sets the necessary configuration for push sync. This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.
120 */
121 setIdentityPoolConfiguration(params: CognitoSync.Types.SetIdentityPoolConfigurationRequest, callback?: (err: AWSError, data: CognitoSync.Types.SetIdentityPoolConfigurationResponse) => void): Request<CognitoSync.Types.SetIdentityPoolConfigurationResponse, AWSError>;
122 /**
123 * Sets the necessary configuration for push sync. This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.
124 */
125 setIdentityPoolConfiguration(callback?: (err: AWSError, data: CognitoSync.Types.SetIdentityPoolConfigurationResponse) => void): Request<CognitoSync.Types.SetIdentityPoolConfigurationResponse, AWSError>;
126 /**
127 * Subscribes to receive notifications when a dataset is modified by another device. This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.
128 */
129 subscribeToDataset(params: CognitoSync.Types.SubscribeToDatasetRequest, callback?: (err: AWSError, data: CognitoSync.Types.SubscribeToDatasetResponse) => void): Request<CognitoSync.Types.SubscribeToDatasetResponse, AWSError>;
130 /**
131 * Subscribes to receive notifications when a dataset is modified by another device. This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.
132 */
133 subscribeToDataset(callback?: (err: AWSError, data: CognitoSync.Types.SubscribeToDatasetResponse) => void): Request<CognitoSync.Types.SubscribeToDatasetResponse, AWSError>;
134 /**
135 * Unsubscribes from receiving notifications when a dataset is modified by another device. This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.
136 */
137 unsubscribeFromDataset(params: CognitoSync.Types.UnsubscribeFromDatasetRequest, callback?: (err: AWSError, data: CognitoSync.Types.UnsubscribeFromDatasetResponse) => void): Request<CognitoSync.Types.UnsubscribeFromDatasetResponse, AWSError>;
138 /**
139 * Unsubscribes from receiving notifications when a dataset is modified by another device. This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.
140 */
141 unsubscribeFromDataset(callback?: (err: AWSError, data: CognitoSync.Types.UnsubscribeFromDatasetResponse) => void): Request<CognitoSync.Types.UnsubscribeFromDatasetResponse, AWSError>;
142 /**
143 * Posts updates to records and adds and deletes records for a dataset and user. The sync count in the record patch is your last known sync count for that record. The server will reject an UpdateRecords request with a ResourceConflictException if you try to patch a record with a new value but a stale sync count. For example, if the sync count on the server is 5 for a key called highScore and you try and submit a new highScore with sync count of 4, the request will be rejected. To obtain the current sync count for a record, call ListRecords. On a successful update of the record, the response returns the new sync count for that record. You should present that sync count the next time you try to update that same record. When the record does not exist, specify the sync count as 0. This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.
144 */
145 updateRecords(params: CognitoSync.Types.UpdateRecordsRequest, callback?: (err: AWSError, data: CognitoSync.Types.UpdateRecordsResponse) => void): Request<CognitoSync.Types.UpdateRecordsResponse, AWSError>;
146 /**
147 * Posts updates to records and adds and deletes records for a dataset and user. The sync count in the record patch is your last known sync count for that record. The server will reject an UpdateRecords request with a ResourceConflictException if you try to patch a record with a new value but a stale sync count. For example, if the sync count on the server is 5 for a key called highScore and you try and submit a new highScore with sync count of 4, the request will be rejected. To obtain the current sync count for a record, call ListRecords. On a successful update of the record, the response returns the new sync count for that record. You should present that sync count the next time you try to update that same record. When the record does not exist, specify the sync count as 0. This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.
148 */
149 updateRecords(callback?: (err: AWSError, data: CognitoSync.Types.UpdateRecordsResponse) => void): Request<CognitoSync.Types.UpdateRecordsResponse, AWSError>;
150}
151declare namespace CognitoSync {
152 export type ApplicationArn = string;
153 export type ApplicationArnList = ApplicationArn[];
154 export type AssumeRoleArn = string;
155 export type Boolean = boolean;
156 export interface BulkPublishRequest {
157 /**
158 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
159 */
160 IdentityPoolId: IdentityPoolId;
161 }
162 export interface BulkPublishResponse {
163 /**
164 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
165 */
166 IdentityPoolId?: IdentityPoolId;
167 }
168 export type BulkPublishStatus = "NOT_STARTED"|"IN_PROGRESS"|"FAILED"|"SUCCEEDED"|string;
169 export type ClientContext = string;
170 export type CognitoEventType = string;
171 export interface CognitoStreams {
172 /**
173 * The name of the Cognito stream to receive updates. This stream must be in the developers account and in the same region as the identity pool.
174 */
175 StreamName?: StreamName;
176 /**
177 * The ARN of the role Amazon Cognito can assume in order to publish to the stream. This role must grant access to Amazon Cognito (cognito-sync) to invoke PutRecord on your Cognito stream.
178 */
179 RoleArn?: AssumeRoleArn;
180 /**
181 * Status of the Cognito streams. Valid values are: ENABLED - Streaming of updates to identity pool is enabled. DISABLED - Streaming of updates to identity pool is disabled. Bulk publish will also fail if StreamingStatus is DISABLED.
182 */
183 StreamingStatus?: StreamingStatus;
184 }
185 export interface Dataset {
186 /**
187 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
188 */
189 IdentityId?: IdentityId;
190 /**
191 * A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.' (dot).
192 */
193 DatasetName?: DatasetName;
194 /**
195 * Date on which the dataset was created.
196 */
197 CreationDate?: _Date;
198 /**
199 * Date when the dataset was last modified.
200 */
201 LastModifiedDate?: _Date;
202 /**
203 * The device that made the last change to this dataset.
204 */
205 LastModifiedBy?: String;
206 /**
207 * Total size in bytes of the records in this dataset.
208 */
209 DataStorage?: Long;
210 /**
211 * Number of records in this dataset.
212 */
213 NumRecords?: Long;
214 }
215 export type DatasetList = Dataset[];
216 export type DatasetName = string;
217 export type _Date = Date;
218 export interface DeleteDatasetRequest {
219 /**
220 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
221 */
222 IdentityPoolId: IdentityPoolId;
223 /**
224 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
225 */
226 IdentityId: IdentityId;
227 /**
228 * A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.' (dot).
229 */
230 DatasetName: DatasetName;
231 }
232 export interface DeleteDatasetResponse {
233 /**
234 * A collection of data for an identity pool. An identity pool can have multiple datasets. A dataset is per identity and can be general or associated with a particular entity in an application (like a saved game). Datasets are automatically created if they don't exist. Data is synced by dataset, and a dataset can hold up to 1MB of key-value pairs.
235 */
236 Dataset?: Dataset;
237 }
238 export interface DescribeDatasetRequest {
239 /**
240 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
241 */
242 IdentityPoolId: IdentityPoolId;
243 /**
244 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
245 */
246 IdentityId: IdentityId;
247 /**
248 * A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.' (dot).
249 */
250 DatasetName: DatasetName;
251 }
252 export interface DescribeDatasetResponse {
253 /**
254 * Meta data for a collection of data for an identity. An identity can have multiple datasets. A dataset can be general or associated with a particular entity in an application (like a saved game). Datasets are automatically created if they don't exist. Data is synced by dataset, and a dataset can hold up to 1MB of key-value pairs.
255 */
256 Dataset?: Dataset;
257 }
258 export interface DescribeIdentityPoolUsageRequest {
259 /**
260 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
261 */
262 IdentityPoolId: IdentityPoolId;
263 }
264 export interface DescribeIdentityPoolUsageResponse {
265 /**
266 * Information about the usage of the identity pool.
267 */
268 IdentityPoolUsage?: IdentityPoolUsage;
269 }
270 export interface DescribeIdentityUsageRequest {
271 /**
272 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
273 */
274 IdentityPoolId: IdentityPoolId;
275 /**
276 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
277 */
278 IdentityId: IdentityId;
279 }
280 export interface DescribeIdentityUsageResponse {
281 /**
282 * Usage information for the identity.
283 */
284 IdentityUsage?: IdentityUsage;
285 }
286 export type DeviceId = string;
287 export type Events = {[key: string]: LambdaFunctionArn};
288 export interface GetBulkPublishDetailsRequest {
289 /**
290 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
291 */
292 IdentityPoolId: IdentityPoolId;
293 }
294 export interface GetBulkPublishDetailsResponse {
295 /**
296 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
297 */
298 IdentityPoolId?: IdentityPoolId;
299 /**
300 * The date/time at which the last bulk publish was initiated.
301 */
302 BulkPublishStartTime?: _Date;
303 /**
304 * If BulkPublishStatus is SUCCEEDED, the time the last bulk publish operation completed.
305 */
306 BulkPublishCompleteTime?: _Date;
307 /**
308 * Status of the last bulk publish operation, valid values are: NOT_STARTED - No bulk publish has been requested for this identity pool IN_PROGRESS - Data is being published to the configured stream SUCCEEDED - All data for the identity pool has been published to the configured stream FAILED - Some portion of the data has failed to publish, check FailureMessage for the cause.
309 */
310 BulkPublishStatus?: BulkPublishStatus;
311 /**
312 * If BulkPublishStatus is FAILED this field will contain the error message that caused the bulk publish to fail.
313 */
314 FailureMessage?: String;
315 }
316 export interface GetCognitoEventsRequest {
317 /**
318 * The Cognito Identity Pool ID for the request
319 */
320 IdentityPoolId: IdentityPoolId;
321 }
322 export interface GetCognitoEventsResponse {
323 /**
324 * The Cognito Events returned from the GetCognitoEvents request
325 */
326 Events?: Events;
327 }
328 export interface GetIdentityPoolConfigurationRequest {
329 /**
330 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. This is the ID of the pool for which to return a configuration.
331 */
332 IdentityPoolId: IdentityPoolId;
333 }
334 export interface GetIdentityPoolConfigurationResponse {
335 /**
336 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito.
337 */
338 IdentityPoolId?: IdentityPoolId;
339 /**
340 * Options to apply to this identity pool for push synchronization.
341 */
342 PushSync?: PushSync;
343 /**
344 * Options to apply to this identity pool for Amazon Cognito streams.
345 */
346 CognitoStreams?: CognitoStreams;
347 }
348 export type IdentityId = string;
349 export type IdentityPoolId = string;
350 export interface IdentityPoolUsage {
351 /**
352 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
353 */
354 IdentityPoolId?: IdentityPoolId;
355 /**
356 * Number of sync sessions for the identity pool.
357 */
358 SyncSessionsCount?: Long;
359 /**
360 * Data storage information for the identity pool.
361 */
362 DataStorage?: Long;
363 /**
364 * Date on which the identity pool was last modified.
365 */
366 LastModifiedDate?: _Date;
367 }
368 export type IdentityPoolUsageList = IdentityPoolUsage[];
369 export interface IdentityUsage {
370 /**
371 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
372 */
373 IdentityId?: IdentityId;
374 /**
375 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
376 */
377 IdentityPoolId?: IdentityPoolId;
378 /**
379 * Date on which the identity was last modified.
380 */
381 LastModifiedDate?: _Date;
382 /**
383 * Number of datasets for the identity.
384 */
385 DatasetCount?: Integer;
386 /**
387 * Total data storage for this identity.
388 */
389 DataStorage?: Long;
390 }
391 export type Integer = number;
392 export type IntegerString = number;
393 export type LambdaFunctionArn = string;
394 export interface ListDatasetsRequest {
395 /**
396 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
397 */
398 IdentityPoolId: IdentityPoolId;
399 /**
400 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
401 */
402 IdentityId: IdentityId;
403 /**
404 * A pagination token for obtaining the next page of results.
405 */
406 NextToken?: String;
407 /**
408 * The maximum number of results to be returned.
409 */
410 MaxResults?: IntegerString;
411 }
412 export interface ListDatasetsResponse {
413 /**
414 * A set of datasets.
415 */
416 Datasets?: DatasetList;
417 /**
418 * Number of datasets returned.
419 */
420 Count?: Integer;
421 /**
422 * A pagination token for obtaining the next page of results.
423 */
424 NextToken?: String;
425 }
426 export interface ListIdentityPoolUsageRequest {
427 /**
428 * A pagination token for obtaining the next page of results.
429 */
430 NextToken?: String;
431 /**
432 * The maximum number of results to be returned.
433 */
434 MaxResults?: IntegerString;
435 }
436 export interface ListIdentityPoolUsageResponse {
437 /**
438 * Usage information for the identity pools.
439 */
440 IdentityPoolUsages?: IdentityPoolUsageList;
441 /**
442 * The maximum number of results to be returned.
443 */
444 MaxResults?: Integer;
445 /**
446 * Total number of identities for the identity pool.
447 */
448 Count?: Integer;
449 /**
450 * A pagination token for obtaining the next page of results.
451 */
452 NextToken?: String;
453 }
454 export interface ListRecordsRequest {
455 /**
456 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
457 */
458 IdentityPoolId: IdentityPoolId;
459 /**
460 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
461 */
462 IdentityId: IdentityId;
463 /**
464 * A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.' (dot).
465 */
466 DatasetName: DatasetName;
467 /**
468 * The last server sync count for this record.
469 */
470 LastSyncCount?: Long;
471 /**
472 * A pagination token for obtaining the next page of results.
473 */
474 NextToken?: String;
475 /**
476 * The maximum number of results to be returned.
477 */
478 MaxResults?: IntegerString;
479 /**
480 * A token containing a session ID, identity ID, and expiration.
481 */
482 SyncSessionToken?: SyncSessionToken;
483 }
484 export interface ListRecordsResponse {
485 /**
486 * A list of all records.
487 */
488 Records?: RecordList;
489 /**
490 * A pagination token for obtaining the next page of results.
491 */
492 NextToken?: String;
493 /**
494 * Total number of records.
495 */
496 Count?: Integer;
497 /**
498 * Server sync count for this dataset.
499 */
500 DatasetSyncCount?: Long;
501 /**
502 * The user/device that made the last change to this record.
503 */
504 LastModifiedBy?: String;
505 /**
506 * Names of merged datasets.
507 */
508 MergedDatasetNames?: MergedDatasetNameList;
509 /**
510 * Indicates whether the dataset exists.
511 */
512 DatasetExists?: Boolean;
513 /**
514 * A boolean value specifying whether to delete the dataset locally.
515 */
516 DatasetDeletedAfterRequestedSyncCount?: Boolean;
517 /**
518 * A token containing a session ID, identity ID, and expiration.
519 */
520 SyncSessionToken?: String;
521 }
522 export type Long = number;
523 export type MergedDatasetNameList = String[];
524 export type Operation = "replace"|"remove"|string;
525 export type Platform = "APNS"|"APNS_SANDBOX"|"GCM"|"ADM"|string;
526 export interface PushSync {
527 /**
528 * List of SNS platform application ARNs that could be used by clients.
529 */
530 ApplicationArns?: ApplicationArnList;
531 /**
532 * A role configured to allow Cognito to call SNS on behalf of the developer.
533 */
534 RoleArn?: AssumeRoleArn;
535 }
536 export type PushToken = string;
537 export interface Record {
538 /**
539 * The key for the record.
540 */
541 Key?: RecordKey;
542 /**
543 * The value for the record.
544 */
545 Value?: RecordValue;
546 /**
547 * The server sync count for this record.
548 */
549 SyncCount?: Long;
550 /**
551 * The date on which the record was last modified.
552 */
553 LastModifiedDate?: _Date;
554 /**
555 * The user/device that made the last change to this record.
556 */
557 LastModifiedBy?: String;
558 /**
559 * The last modified date of the client device.
560 */
561 DeviceLastModifiedDate?: _Date;
562 }
563 export type RecordKey = string;
564 export type RecordList = Record[];
565 export interface RecordPatch {
566 /**
567 * An operation, either replace or remove.
568 */
569 Op: Operation;
570 /**
571 * The key associated with the record patch.
572 */
573 Key: RecordKey;
574 /**
575 * The value associated with the record patch.
576 */
577 Value?: RecordValue;
578 /**
579 * Last known server sync count for this record. Set to 0 if unknown.
580 */
581 SyncCount: Long;
582 /**
583 * The last modified date of the client device.
584 */
585 DeviceLastModifiedDate?: _Date;
586 }
587 export type RecordPatchList = RecordPatch[];
588 export type RecordValue = string;
589 export interface RegisterDeviceRequest {
590 /**
591 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. Here, the ID of the pool that the identity belongs to.
592 */
593 IdentityPoolId: IdentityPoolId;
594 /**
595 * The unique ID for this identity.
596 */
597 IdentityId: IdentityId;
598 /**
599 * The SNS platform type (e.g. GCM, SDM, APNS, APNS_SANDBOX).
600 */
601 Platform: Platform;
602 /**
603 * The push token.
604 */
605 Token: PushToken;
606 }
607 export interface RegisterDeviceResponse {
608 /**
609 * The unique ID generated for this device by Cognito.
610 */
611 DeviceId?: DeviceId;
612 }
613 export interface SetCognitoEventsRequest {
614 /**
615 * The Cognito Identity Pool to use when configuring Cognito Events
616 */
617 IdentityPoolId: IdentityPoolId;
618 /**
619 * The events to configure
620 */
621 Events: Events;
622 }
623 export interface SetIdentityPoolConfigurationRequest {
624 /**
625 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. This is the ID of the pool to modify.
626 */
627 IdentityPoolId: IdentityPoolId;
628 /**
629 * Options to apply to this identity pool for push synchronization.
630 */
631 PushSync?: PushSync;
632 /**
633 * Options to apply to this identity pool for Amazon Cognito streams.
634 */
635 CognitoStreams?: CognitoStreams;
636 }
637 export interface SetIdentityPoolConfigurationResponse {
638 /**
639 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito.
640 */
641 IdentityPoolId?: IdentityPoolId;
642 /**
643 * Options to apply to this identity pool for push synchronization.
644 */
645 PushSync?: PushSync;
646 /**
647 * Options to apply to this identity pool for Amazon Cognito streams.
648 */
649 CognitoStreams?: CognitoStreams;
650 }
651 export type StreamName = string;
652 export type StreamingStatus = "ENABLED"|"DISABLED"|string;
653 export type String = string;
654 export interface SubscribeToDatasetRequest {
655 /**
656 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. The ID of the pool to which the identity belongs.
657 */
658 IdentityPoolId: IdentityPoolId;
659 /**
660 * Unique ID for this identity.
661 */
662 IdentityId: IdentityId;
663 /**
664 * The name of the dataset to subcribe to.
665 */
666 DatasetName: DatasetName;
667 /**
668 * The unique ID generated for this device by Cognito.
669 */
670 DeviceId: DeviceId;
671 }
672 export interface SubscribeToDatasetResponse {
673 }
674 export type SyncSessionToken = string;
675 export interface UnsubscribeFromDatasetRequest {
676 /**
677 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. The ID of the pool to which this identity belongs.
678 */
679 IdentityPoolId: IdentityPoolId;
680 /**
681 * Unique ID for this identity.
682 */
683 IdentityId: IdentityId;
684 /**
685 * The name of the dataset from which to unsubcribe.
686 */
687 DatasetName: DatasetName;
688 /**
689 * The unique ID generated for this device by Cognito.
690 */
691 DeviceId: DeviceId;
692 }
693 export interface UnsubscribeFromDatasetResponse {
694 }
695 export interface UpdateRecordsRequest {
696 /**
697 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
698 */
699 IdentityPoolId: IdentityPoolId;
700 /**
701 * A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
702 */
703 IdentityId: IdentityId;
704 /**
705 * A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.' (dot).
706 */
707 DatasetName: DatasetName;
708 /**
709 * The unique ID generated for this device by Cognito.
710 */
711 DeviceId?: DeviceId;
712 /**
713 * A list of patch operations.
714 */
715 RecordPatches?: RecordPatchList;
716 /**
717 * The SyncSessionToken returned by a previous call to ListRecords for this dataset and identity.
718 */
719 SyncSessionToken: SyncSessionToken;
720 /**
721 * Intended to supply a device ID that will populate the lastModifiedBy field referenced in other methods. The ClientContext field is not yet implemented.
722 */
723 ClientContext?: ClientContext;
724 }
725 export interface UpdateRecordsResponse {
726 /**
727 * A list of records that have been updated.
728 */
729 Records?: RecordList;
730 }
731 /**
732 * 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.
733 */
734 export type apiVersion = "2014-06-30"|"latest"|string;
735 export interface ClientApiVersions {
736 /**
737 * 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.
738 */
739 apiVersion?: apiVersion;
740 }
741 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
742 /**
743 * Contains interfaces for use with the CognitoSync client.
744 */
745 export import Types = CognitoSync;
746}
747export = CognitoSync;