@stacksjs/ts-cloud 0.2.2 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/aws/acm.d.ts +215 -0
  2. package/dist/aws/application-autoscaling.d.ts +345 -0
  3. package/dist/aws/bedrock.d.ts +2672 -0
  4. package/dist/aws/client.d.ts +181 -0
  5. package/dist/aws/cloudformation.d.ts +187 -0
  6. package/dist/aws/cloudfront.d.ts +416 -0
  7. package/dist/aws/cloudwatch-logs.d.ts +70 -0
  8. package/dist/aws/comprehend.d.ts +616 -0
  9. package/dist/aws/connect.d.ts +533 -0
  10. package/dist/aws/deploy-imap.d.ts +26 -0
  11. package/dist/aws/dynamodb.d.ts +270 -0
  12. package/dist/aws/ec2.d.ts +545 -0
  13. package/dist/aws/ecr.d.ts +240 -0
  14. package/dist/aws/ecs.d.ts +267 -0
  15. package/dist/aws/efs.d.ts +36 -0
  16. package/dist/aws/elasticache.d.ts +112 -0
  17. package/dist/aws/elbv2.d.ts +389 -0
  18. package/dist/aws/email.d.ts +260 -0
  19. package/dist/aws/eventbridge.d.ts +197 -0
  20. package/dist/aws/iam.d.ts +1013 -0
  21. package/dist/aws/imap-server.d.ts +298 -0
  22. package/dist/aws/index.d.ts +53 -0
  23. package/dist/aws/kendra.d.ts +831 -0
  24. package/dist/aws/lambda.d.ts +319 -0
  25. package/dist/aws/opensearch.d.ts +121 -0
  26. package/dist/aws/personalize.d.ts +586 -0
  27. package/dist/aws/polly.d.ts +243 -0
  28. package/dist/aws/rds.d.ts +346 -0
  29. package/dist/aws/rekognition.d.ts +691 -0
  30. package/dist/aws/route53-domains.d.ts +161 -0
  31. package/dist/aws/route53.d.ts +330 -0
  32. package/dist/aws/s3.d.ts +535 -0
  33. package/dist/aws/scheduler.d.ts +224 -0
  34. package/dist/aws/secrets-manager.d.ts +267 -0
  35. package/dist/aws/ses.d.ts +441 -0
  36. package/dist/aws/setup-phone.d.ts +1 -0
  37. package/dist/aws/setup-sms.d.ts +116 -0
  38. package/dist/aws/sms.d.ts +477 -0
  39. package/dist/aws/smtp-server.d.ts +108 -0
  40. package/dist/aws/sns.d.ts +224 -0
  41. package/dist/aws/sqs.d.ts +107 -0
  42. package/dist/aws/ssm.d.ts +311 -0
  43. package/dist/aws/sts.d.ts +21 -0
  44. package/dist/aws/support.d.ts +139 -0
  45. package/dist/aws/test-imap.d.ts +15 -0
  46. package/dist/aws/textract.d.ts +477 -0
  47. package/dist/aws/transcribe.d.ts +79 -0
  48. package/dist/aws/translate.d.ts +424 -0
  49. package/dist/aws/voice.d.ts +361 -0
  50. package/dist/bin/cli.js +4500 -809
  51. package/dist/config.d.ts +5 -0
  52. package/dist/deploy/index.d.ts +6 -0
  53. package/dist/deploy/static-site-external-dns.d.ts +70 -0
  54. package/dist/deploy/static-site.d.ts +110 -0
  55. package/dist/dns/cloudflare.d.ts +74 -0
  56. package/dist/dns/godaddy.d.ts +63 -0
  57. package/dist/dns/index.d.ts +67 -0
  58. package/dist/dns/porkbun.d.ts +43 -0
  59. package/dist/dns/route53-adapter.d.ts +67 -0
  60. package/dist/dns/types.d.ts +100 -0
  61. package/dist/dns/validator.d.ts +105 -0
  62. package/dist/generators/index.d.ts +4 -0
  63. package/dist/generators/infrastructure.d.ts +115 -0
  64. package/dist/index.d.ts +9 -165
  65. package/dist/index.js +24067 -6430
  66. package/dist/push/apns.d.ts +140 -0
  67. package/dist/push/fcm.d.ts +205 -0
  68. package/dist/push/index.d.ts +44 -0
  69. package/dist/security/pre-deploy-scanner.d.ts +97 -0
  70. package/dist/ssl/acme-client.d.ts +133 -0
  71. package/dist/ssl/index.d.ts +6 -0
  72. package/dist/ssl/letsencrypt.d.ts +96 -0
  73. package/dist/utils/cli.d.ts +121 -0
  74. package/dist/validation/index.d.ts +4 -0
  75. package/dist/validation/template.d.ts +27 -0
  76. package/package.json +6 -6
@@ -0,0 +1,831 @@
1
+ /**
2
+ * AWS Kendra Client
3
+ * Enterprise search service
4
+ * No external SDK dependencies - implements AWS Signature V4 directly
5
+ */
6
+ export interface CreateIndexCommandInput {
7
+ Name: string;
8
+ Edition?: 'DEVELOPER_EDITION' | 'ENTERPRISE_EDITION';
9
+ RoleArn: string;
10
+ ServerSideEncryptionConfiguration?: {
11
+ KmsKeyId?: string;
12
+ };
13
+ Description?: string;
14
+ ClientToken?: string;
15
+ Tags?: Array<{
16
+ Key: string;
17
+ Value: string;
18
+ }>;
19
+ UserTokenConfigurations?: Array<{
20
+ JwtTokenTypeConfiguration?: {
21
+ KeyLocation: 'URL' | 'SECRET_MANAGER';
22
+ URL?: string;
23
+ SecretManagerArn?: string;
24
+ UserNameAttributeField?: string;
25
+ GroupAttributeField?: string;
26
+ Issuer?: string;
27
+ ClaimRegex?: string;
28
+ };
29
+ JsonTokenTypeConfiguration?: {
30
+ UserNameAttributeField: string;
31
+ GroupAttributeField: string;
32
+ };
33
+ }>;
34
+ UserContextPolicy?: 'ATTRIBUTE_FILTER' | 'USER_TOKEN';
35
+ UserGroupResolutionConfiguration?: {
36
+ UserGroupResolutionMode: 'AWS_SSO' | 'NONE';
37
+ };
38
+ }
39
+ export interface CreateIndexCommandOutput {
40
+ Id?: string;
41
+ }
42
+ export interface DescribeIndexCommandInput {
43
+ Id: string;
44
+ }
45
+ export interface Index {
46
+ Name?: string;
47
+ Id?: string;
48
+ Edition?: 'DEVELOPER_EDITION' | 'ENTERPRISE_EDITION';
49
+ RoleArn?: string;
50
+ ServerSideEncryptionConfiguration?: {
51
+ KmsKeyId?: string;
52
+ };
53
+ Status?: 'CREATING' | 'ACTIVE' | 'DELETING' | 'FAILED' | 'UPDATING' | 'SYSTEM_UPDATING';
54
+ Description?: string;
55
+ CreatedAt?: string;
56
+ UpdatedAt?: string;
57
+ DocumentMetadataConfigurations?: Array<{
58
+ Name?: string;
59
+ Type?: 'STRING_VALUE' | 'STRING_LIST_VALUE' | 'LONG_VALUE' | 'DATE_VALUE';
60
+ Relevance?: {
61
+ Freshness?: boolean;
62
+ Importance?: number;
63
+ Duration?: string;
64
+ RankOrder?: 'ASCENDING' | 'DESCENDING';
65
+ ValueImportanceMap?: Record<string, number>;
66
+ };
67
+ Search?: {
68
+ Facetable?: boolean;
69
+ Searchable?: boolean;
70
+ Displayable?: boolean;
71
+ Sortable?: boolean;
72
+ };
73
+ }>;
74
+ IndexStatistics?: {
75
+ FaqStatistics?: {
76
+ IndexedQuestionAnswersCount?: number;
77
+ };
78
+ TextDocumentStatistics?: {
79
+ IndexedTextDocumentsCount?: number;
80
+ IndexedTextBytes?: number;
81
+ };
82
+ };
83
+ ErrorMessage?: string;
84
+ CapacityUnits?: {
85
+ StorageCapacityUnits: number;
86
+ QueryCapacityUnits: number;
87
+ };
88
+ UserTokenConfigurations?: Array<{
89
+ JwtTokenTypeConfiguration?: {
90
+ KeyLocation?: string;
91
+ URL?: string;
92
+ SecretManagerArn?: string;
93
+ UserNameAttributeField?: string;
94
+ GroupAttributeField?: string;
95
+ Issuer?: string;
96
+ ClaimRegex?: string;
97
+ };
98
+ JsonTokenTypeConfiguration?: {
99
+ UserNameAttributeField?: string;
100
+ GroupAttributeField?: string;
101
+ };
102
+ }>;
103
+ UserContextPolicy?: 'ATTRIBUTE_FILTER' | 'USER_TOKEN';
104
+ UserGroupResolutionConfiguration?: {
105
+ UserGroupResolutionMode?: 'AWS_SSO' | 'NONE';
106
+ };
107
+ }
108
+ export interface DescribeIndexCommandOutput {
109
+ Name?: string;
110
+ Id?: string;
111
+ Edition?: 'DEVELOPER_EDITION' | 'ENTERPRISE_EDITION';
112
+ RoleArn?: string;
113
+ ServerSideEncryptionConfiguration?: {
114
+ KmsKeyId?: string;
115
+ };
116
+ Status?: 'CREATING' | 'ACTIVE' | 'DELETING' | 'FAILED' | 'UPDATING' | 'SYSTEM_UPDATING';
117
+ Description?: string;
118
+ CreatedAt?: string;
119
+ UpdatedAt?: string;
120
+ DocumentMetadataConfigurations?: Index['DocumentMetadataConfigurations'];
121
+ IndexStatistics?: Index['IndexStatistics'];
122
+ ErrorMessage?: string;
123
+ CapacityUnits?: Index['CapacityUnits'];
124
+ }
125
+ export interface ListIndicesCommandInput {
126
+ NextToken?: string;
127
+ MaxResults?: number;
128
+ }
129
+ export interface IndexSummary {
130
+ Name?: string;
131
+ Id?: string;
132
+ Edition?: 'DEVELOPER_EDITION' | 'ENTERPRISE_EDITION';
133
+ CreatedAt?: string;
134
+ UpdatedAt?: string;
135
+ Status?: 'CREATING' | 'ACTIVE' | 'DELETING' | 'FAILED' | 'UPDATING' | 'SYSTEM_UPDATING';
136
+ }
137
+ export interface ListIndicesCommandOutput {
138
+ IndexConfigurationSummaryItems?: IndexSummary[];
139
+ NextToken?: string;
140
+ }
141
+ export interface DeleteIndexCommandInput {
142
+ Id: string;
143
+ }
144
+ export interface DeleteIndexCommandOutput {
145
+ }
146
+ export interface CreateDataSourceCommandInput {
147
+ Name: string;
148
+ IndexId: string;
149
+ Type: 'S3' | 'SHAREPOINT' | 'DATABASE' | 'SALESFORCE' | 'ONEDRIVE' | 'SERVICENOW' | 'CUSTOM' | 'CONFLUENCE' | 'GOOGLEDRIVE' | 'WEBCRAWLER' | 'WORKDOCS' | 'FSX' | 'SLACK' | 'BOX' | 'QUIP' | 'JIRA' | 'GITHUB' | 'ALFRESCO' | 'TEMPLATE';
150
+ Configuration?: {
151
+ S3Configuration?: {
152
+ BucketName: string;
153
+ InclusionPrefixes?: string[];
154
+ InclusionPatterns?: string[];
155
+ ExclusionPatterns?: string[];
156
+ DocumentsMetadataConfiguration?: {
157
+ S3Prefix?: string;
158
+ };
159
+ AccessControlListConfiguration?: {
160
+ KeyPath?: string;
161
+ };
162
+ };
163
+ WebCrawlerConfiguration?: {
164
+ Urls: {
165
+ SeedUrlConfiguration?: {
166
+ SeedUrls: string[];
167
+ WebCrawlerMode?: 'HOST_ONLY' | 'SUBDOMAINS' | 'EVERYTHING';
168
+ };
169
+ SiteMapsConfiguration?: {
170
+ SiteMaps: string[];
171
+ };
172
+ };
173
+ CrawlDepth?: number;
174
+ MaxLinksPerPage?: number;
175
+ MaxContentSizePerPageInMegaBytes?: number;
176
+ MaxUrlsPerMinuteCrawlRate?: number;
177
+ UrlInclusionPatterns?: string[];
178
+ UrlExclusionPatterns?: string[];
179
+ ProxyConfiguration?: {
180
+ Host: string;
181
+ Port: number;
182
+ Credentials?: string;
183
+ };
184
+ AuthenticationConfiguration?: {
185
+ BasicAuthentication?: Array<{
186
+ Host: string;
187
+ Port: number;
188
+ Credentials: string;
189
+ }>;
190
+ };
191
+ };
192
+ ConfluenceConfiguration?: {
193
+ ServerUrl: string;
194
+ SecretArn: string;
195
+ Version: 'CLOUD' | 'SERVER';
196
+ SpaceConfiguration?: {
197
+ CrawlPersonalSpaces?: boolean;
198
+ CrawlArchivedSpaces?: boolean;
199
+ IncludeSpaces?: string[];
200
+ ExcludeSpaces?: string[];
201
+ SpaceFieldMappings?: Array<{
202
+ DataSourceFieldName?: string;
203
+ DateFieldFormat?: string;
204
+ IndexFieldName?: string;
205
+ }>;
206
+ };
207
+ PageConfiguration?: {
208
+ PageFieldMappings?: Array<{
209
+ DataSourceFieldName?: string;
210
+ DateFieldFormat?: string;
211
+ IndexFieldName?: string;
212
+ }>;
213
+ };
214
+ BlogConfiguration?: {
215
+ BlogFieldMappings?: Array<{
216
+ DataSourceFieldName?: string;
217
+ DateFieldFormat?: string;
218
+ IndexFieldName?: string;
219
+ }>;
220
+ };
221
+ AttachmentConfiguration?: {
222
+ CrawlAttachments?: boolean;
223
+ AttachmentFieldMappings?: Array<{
224
+ DataSourceFieldName?: string;
225
+ DateFieldFormat?: string;
226
+ IndexFieldName?: string;
227
+ }>;
228
+ };
229
+ VpcConfiguration?: {
230
+ SubnetIds: string[];
231
+ SecurityGroupIds: string[];
232
+ };
233
+ InclusionPatterns?: string[];
234
+ ExclusionPatterns?: string[];
235
+ ProxyConfiguration?: {
236
+ Host: string;
237
+ Port: number;
238
+ Credentials?: string;
239
+ };
240
+ AuthenticationType?: 'HTTP_BASIC' | 'PAT';
241
+ };
242
+ };
243
+ VpcConfiguration?: {
244
+ SubnetIds: string[];
245
+ SecurityGroupIds: string[];
246
+ };
247
+ Description?: string;
248
+ Schedule?: string;
249
+ RoleArn?: string;
250
+ Tags?: Array<{
251
+ Key: string;
252
+ Value: string;
253
+ }>;
254
+ ClientToken?: string;
255
+ LanguageCode?: string;
256
+ CustomDocumentEnrichmentConfiguration?: {
257
+ InlineConfigurations?: Array<{
258
+ Condition?: {
259
+ ConditionDocumentAttributeKey: string;
260
+ Operator: 'GreaterThan' | 'GreaterThanOrEquals' | 'LessThan' | 'LessThanOrEquals' | 'Equals' | 'NotEquals' | 'Contains' | 'NotContains' | 'Exists' | 'NotExists' | 'BeginsWith';
261
+ ConditionOnValue?: {
262
+ StringValue?: string;
263
+ StringListValue?: string[];
264
+ LongValue?: number;
265
+ DateValue?: string;
266
+ };
267
+ };
268
+ Target?: {
269
+ TargetDocumentAttributeKey?: string;
270
+ TargetDocumentAttributeValueDeletion?: boolean;
271
+ TargetDocumentAttributeValue?: {
272
+ StringValue?: string;
273
+ StringListValue?: string[];
274
+ LongValue?: number;
275
+ DateValue?: string;
276
+ };
277
+ };
278
+ DocumentContentDeletion?: boolean;
279
+ }>;
280
+ PreExtractionHookConfiguration?: {
281
+ InvocationCondition?: {
282
+ ConditionDocumentAttributeKey: string;
283
+ Operator: string;
284
+ ConditionOnValue?: {
285
+ StringValue?: string;
286
+ StringListValue?: string[];
287
+ LongValue?: number;
288
+ DateValue?: string;
289
+ };
290
+ };
291
+ LambdaArn: string;
292
+ S3Bucket: string;
293
+ };
294
+ PostExtractionHookConfiguration?: {
295
+ InvocationCondition?: {
296
+ ConditionDocumentAttributeKey: string;
297
+ Operator: string;
298
+ ConditionOnValue?: {
299
+ StringValue?: string;
300
+ StringListValue?: string[];
301
+ LongValue?: number;
302
+ DateValue?: string;
303
+ };
304
+ };
305
+ LambdaArn: string;
306
+ S3Bucket: string;
307
+ };
308
+ RoleArn?: string;
309
+ };
310
+ }
311
+ export interface CreateDataSourceCommandOutput {
312
+ Id?: string;
313
+ }
314
+ export interface DescribeDataSourceCommandInput {
315
+ Id: string;
316
+ IndexId: string;
317
+ }
318
+ export interface DataSource {
319
+ Id?: string;
320
+ IndexId?: string;
321
+ Name?: string;
322
+ Type?: string;
323
+ Configuration?: Record<string, unknown>;
324
+ VpcConfiguration?: {
325
+ SubnetIds?: string[];
326
+ SecurityGroupIds?: string[];
327
+ };
328
+ CreatedAt?: string;
329
+ UpdatedAt?: string;
330
+ Description?: string;
331
+ Status?: 'CREATING' | 'DELETING' | 'FAILED' | 'UPDATING' | 'ACTIVE';
332
+ Schedule?: string;
333
+ RoleArn?: string;
334
+ ErrorMessage?: string;
335
+ LanguageCode?: string;
336
+ CustomDocumentEnrichmentConfiguration?: Record<string, unknown>;
337
+ }
338
+ export interface DescribeDataSourceCommandOutput extends DataSource {
339
+ }
340
+ export interface ListDataSourcesCommandInput {
341
+ IndexId: string;
342
+ NextToken?: string;
343
+ MaxResults?: number;
344
+ }
345
+ export interface DataSourceSummary {
346
+ Name?: string;
347
+ Id?: string;
348
+ Type?: string;
349
+ CreatedAt?: string;
350
+ UpdatedAt?: string;
351
+ Status?: 'CREATING' | 'DELETING' | 'FAILED' | 'UPDATING' | 'ACTIVE';
352
+ LanguageCode?: string;
353
+ }
354
+ export interface ListDataSourcesCommandOutput {
355
+ SummaryItems?: DataSourceSummary[];
356
+ NextToken?: string;
357
+ }
358
+ export interface StartDataSourceSyncJobCommandInput {
359
+ Id: string;
360
+ IndexId: string;
361
+ }
362
+ export interface StartDataSourceSyncJobCommandOutput {
363
+ ExecutionId?: string;
364
+ }
365
+ export interface StopDataSourceSyncJobCommandInput {
366
+ Id: string;
367
+ IndexId: string;
368
+ }
369
+ export interface StopDataSourceSyncJobCommandOutput {
370
+ }
371
+ export interface QueryCommandInput {
372
+ IndexId: string;
373
+ QueryText?: string;
374
+ AttributeFilter?: {
375
+ AndAllFilters?: QueryCommandInput['AttributeFilter'][];
376
+ OrAllFilters?: QueryCommandInput['AttributeFilter'][];
377
+ NotFilter?: QueryCommandInput['AttributeFilter'];
378
+ EqualsTo?: {
379
+ Key: string;
380
+ Value: {
381
+ StringValue?: string;
382
+ StringListValue?: string[];
383
+ LongValue?: number;
384
+ DateValue?: string;
385
+ };
386
+ };
387
+ ContainsAll?: {
388
+ Key: string;
389
+ Value: {
390
+ StringValue?: string;
391
+ StringListValue?: string[];
392
+ LongValue?: number;
393
+ DateValue?: string;
394
+ };
395
+ };
396
+ ContainsAny?: {
397
+ Key: string;
398
+ Value: {
399
+ StringValue?: string;
400
+ StringListValue?: string[];
401
+ LongValue?: number;
402
+ DateValue?: string;
403
+ };
404
+ };
405
+ GreaterThan?: {
406
+ Key: string;
407
+ Value: {
408
+ StringValue?: string;
409
+ StringListValue?: string[];
410
+ LongValue?: number;
411
+ DateValue?: string;
412
+ };
413
+ };
414
+ GreaterThanOrEquals?: {
415
+ Key: string;
416
+ Value: {
417
+ StringValue?: string;
418
+ StringListValue?: string[];
419
+ LongValue?: number;
420
+ DateValue?: string;
421
+ };
422
+ };
423
+ LessThan?: {
424
+ Key: string;
425
+ Value: {
426
+ StringValue?: string;
427
+ StringListValue?: string[];
428
+ LongValue?: number;
429
+ DateValue?: string;
430
+ };
431
+ };
432
+ LessThanOrEquals?: {
433
+ Key: string;
434
+ Value: {
435
+ StringValue?: string;
436
+ StringListValue?: string[];
437
+ LongValue?: number;
438
+ DateValue?: string;
439
+ };
440
+ };
441
+ };
442
+ Facets?: Array<{
443
+ DocumentAttributeKey?: string;
444
+ Facets?: QueryCommandInput['Facets'];
445
+ MaxResults?: number;
446
+ }>;
447
+ RequestedDocumentAttributes?: string[];
448
+ QueryResultTypeFilter?: 'DOCUMENT' | 'QUESTION_ANSWER' | 'ANSWER';
449
+ DocumentRelevanceOverrideConfigurations?: Array<{
450
+ Name: string;
451
+ Relevance: {
452
+ Freshness?: boolean;
453
+ Importance?: number;
454
+ Duration?: string;
455
+ RankOrder?: 'ASCENDING' | 'DESCENDING';
456
+ ValueImportanceMap?: Record<string, number>;
457
+ };
458
+ }>;
459
+ PageNumber?: number;
460
+ PageSize?: number;
461
+ SortingConfiguration?: {
462
+ DocumentAttributeKey: string;
463
+ SortOrder: 'DESC' | 'ASC';
464
+ };
465
+ SortingConfigurations?: Array<{
466
+ DocumentAttributeKey: string;
467
+ SortOrder: 'DESC' | 'ASC';
468
+ }>;
469
+ UserContext?: {
470
+ Token?: string;
471
+ UserId?: string;
472
+ Groups?: string[];
473
+ DataSourceGroups?: Array<{
474
+ GroupId: string;
475
+ DataSourceId: string;
476
+ }>;
477
+ };
478
+ VisitorId?: string;
479
+ SpellCorrectionConfiguration?: {
480
+ IncludeQuerySpellCheckSuggestions: boolean;
481
+ };
482
+ CollapseConfiguration?: {
483
+ DocumentAttributeKey: string;
484
+ SortingConfigurations?: Array<{
485
+ DocumentAttributeKey: string;
486
+ SortOrder: 'DESC' | 'ASC';
487
+ }>;
488
+ MissingAttributeKeyStrategy?: 'IGNORE' | 'COLLAPSE' | 'EXPAND';
489
+ Expand?: boolean;
490
+ ExpandConfiguration?: {
491
+ MaxResultItemsToExpand?: number;
492
+ MaxExpandedResultsPerItem?: number;
493
+ };
494
+ };
495
+ }
496
+ export interface QueryResultItem {
497
+ Id?: string;
498
+ Type?: 'DOCUMENT' | 'QUESTION_ANSWER' | 'ANSWER';
499
+ Format?: 'TABLE' | 'TEXT';
500
+ AdditionalAttributes?: Array<{
501
+ Key?: string;
502
+ ValueType?: 'TEXT_WITH_HIGHLIGHTS_VALUE' | 'ANSWER_VALUE';
503
+ Value?: {
504
+ TextWithHighlightsValue?: {
505
+ Text?: string;
506
+ Highlights?: Array<{
507
+ BeginOffset?: number;
508
+ EndOffset?: number;
509
+ TopAnswer?: boolean;
510
+ Type?: 'STANDARD' | 'THESAURUS_SYNONYM';
511
+ }>;
512
+ };
513
+ };
514
+ }>;
515
+ DocumentId?: string;
516
+ DocumentTitle?: {
517
+ Text?: string;
518
+ Highlights?: Array<{
519
+ BeginOffset?: number;
520
+ EndOffset?: number;
521
+ TopAnswer?: boolean;
522
+ Type?: 'STANDARD' | 'THESAURUS_SYNONYM';
523
+ }>;
524
+ };
525
+ DocumentExcerpt?: {
526
+ Text?: string;
527
+ Highlights?: Array<{
528
+ BeginOffset?: number;
529
+ EndOffset?: number;
530
+ TopAnswer?: boolean;
531
+ Type?: 'STANDARD' | 'THESAURUS_SYNONYM';
532
+ }>;
533
+ };
534
+ DocumentURI?: string;
535
+ DocumentAttributes?: Array<{
536
+ Key?: string;
537
+ Value?: {
538
+ StringValue?: string;
539
+ StringListValue?: string[];
540
+ LongValue?: number;
541
+ DateValue?: string;
542
+ };
543
+ }>;
544
+ ScoreAttributes?: {
545
+ ScoreConfidence?: 'VERY_HIGH' | 'HIGH' | 'MEDIUM' | 'LOW' | 'NOT_AVAILABLE';
546
+ };
547
+ FeedbackToken?: string;
548
+ TableExcerpt?: {
549
+ Rows?: Array<{
550
+ Cells?: Array<{
551
+ Value?: string;
552
+ TopAnswer?: boolean;
553
+ Highlighted?: boolean;
554
+ Header?: boolean;
555
+ }>;
556
+ }>;
557
+ TotalNumberOfRows?: number;
558
+ };
559
+ CollapsedResultDetail?: {
560
+ DocumentAttribute?: {
561
+ Key?: string;
562
+ Value?: {
563
+ StringValue?: string;
564
+ StringListValue?: string[];
565
+ LongValue?: number;
566
+ DateValue?: string;
567
+ };
568
+ };
569
+ ExpandedResults?: QueryResultItem[];
570
+ };
571
+ }
572
+ export interface FacetResult {
573
+ DocumentAttributeKey?: string;
574
+ DocumentAttributeValueType?: 'STRING_VALUE' | 'STRING_LIST_VALUE' | 'LONG_VALUE' | 'DATE_VALUE';
575
+ DocumentAttributeValueCountPairs?: Array<{
576
+ DocumentAttributeValue?: {
577
+ StringValue?: string;
578
+ StringListValue?: string[];
579
+ LongValue?: number;
580
+ DateValue?: string;
581
+ };
582
+ Count?: number;
583
+ FacetResults?: FacetResult[];
584
+ }>;
585
+ }
586
+ export interface QueryCommandOutput {
587
+ QueryId?: string;
588
+ ResultItems?: QueryResultItem[];
589
+ FacetResults?: FacetResult[];
590
+ TotalNumberOfResults?: number;
591
+ Warnings?: Array<{
592
+ Message?: string;
593
+ Code?: 'QUERY_LANGUAGE_INVALID_SYNTAX';
594
+ }>;
595
+ SpellCorrectedQueries?: Array<{
596
+ SuggestedQueryText?: string;
597
+ Corrections?: Array<{
598
+ BeginOffset?: number;
599
+ EndOffset?: number;
600
+ Term?: string;
601
+ CorrectedTerm?: string;
602
+ }>;
603
+ }>;
604
+ FeaturedResultsItems?: Array<{
605
+ Id?: string;
606
+ Type?: 'DOCUMENT' | 'QUESTION_ANSWER' | 'ANSWER';
607
+ AdditionalAttributes?: Array<{
608
+ Key?: string;
609
+ ValueType?: string;
610
+ Value?: Record<string, unknown>;
611
+ }>;
612
+ DocumentId?: string;
613
+ DocumentTitle?: {
614
+ Text?: string;
615
+ Highlights?: Array<{
616
+ BeginOffset?: number;
617
+ EndOffset?: number;
618
+ TopAnswer?: boolean;
619
+ Type?: string;
620
+ }>;
621
+ };
622
+ DocumentExcerpt?: {
623
+ Text?: string;
624
+ Highlights?: Array<{
625
+ BeginOffset?: number;
626
+ EndOffset?: number;
627
+ TopAnswer?: boolean;
628
+ Type?: string;
629
+ }>;
630
+ };
631
+ DocumentURI?: string;
632
+ DocumentAttributes?: Array<{
633
+ Key?: string;
634
+ Value?: Record<string, unknown>;
635
+ }>;
636
+ FeedbackToken?: string;
637
+ }>;
638
+ }
639
+ export interface RetrieveCommandInput {
640
+ IndexId: string;
641
+ QueryText: string;
642
+ AttributeFilter?: QueryCommandInput['AttributeFilter'];
643
+ RequestedDocumentAttributes?: string[];
644
+ DocumentRelevanceOverrideConfigurations?: QueryCommandInput['DocumentRelevanceOverrideConfigurations'];
645
+ PageNumber?: number;
646
+ PageSize?: number;
647
+ UserContext?: QueryCommandInput['UserContext'];
648
+ }
649
+ export interface RetrieveResultItem {
650
+ Id?: string;
651
+ DocumentId?: string;
652
+ DocumentTitle?: string;
653
+ Content?: string;
654
+ DocumentURI?: string;
655
+ DocumentAttributes?: Array<{
656
+ Key?: string;
657
+ Value?: {
658
+ StringValue?: string;
659
+ StringListValue?: string[];
660
+ LongValue?: number;
661
+ DateValue?: string;
662
+ };
663
+ }>;
664
+ ScoreAttributes?: {
665
+ ScoreConfidence?: 'VERY_HIGH' | 'HIGH' | 'MEDIUM' | 'LOW' | 'NOT_AVAILABLE';
666
+ };
667
+ }
668
+ export interface RetrieveCommandOutput {
669
+ QueryId?: string;
670
+ ResultItems?: RetrieveResultItem[];
671
+ }
672
+ export interface BatchPutDocumentCommandInput {
673
+ IndexId: string;
674
+ RoleArn?: string;
675
+ Documents: Array<{
676
+ Id: string;
677
+ Title?: string;
678
+ Blob?: Uint8Array;
679
+ S3Path?: {
680
+ Bucket: string;
681
+ Key: string;
682
+ };
683
+ Attributes?: Array<{
684
+ Key: string;
685
+ Value: {
686
+ StringValue?: string;
687
+ StringListValue?: string[];
688
+ LongValue?: number;
689
+ DateValue?: string;
690
+ };
691
+ }>;
692
+ AccessControlList?: Array<{
693
+ Name: string;
694
+ Type: 'USER' | 'GROUP';
695
+ Access: 'ALLOW' | 'DENY';
696
+ DataSourceId?: string;
697
+ }>;
698
+ HierarchicalAccessControlList?: Array<{
699
+ PrincipalList: Array<{
700
+ Name: string;
701
+ Type: 'USER' | 'GROUP';
702
+ Access: 'ALLOW' | 'DENY';
703
+ DataSourceId?: string;
704
+ }>;
705
+ }>;
706
+ ContentType?: 'PDF' | 'HTML' | 'MS_WORD' | 'PLAIN_TEXT' | 'PPT' | 'RTF' | 'XML' | 'XSLT' | 'MS_EXCEL' | 'CSV' | 'JSON' | 'MD';
707
+ AccessControlConfigurationId?: string;
708
+ }>;
709
+ CustomDocumentEnrichmentConfiguration?: CreateDataSourceCommandInput['CustomDocumentEnrichmentConfiguration'];
710
+ }
711
+ export interface BatchPutDocumentCommandOutput {
712
+ FailedDocuments?: Array<{
713
+ Id?: string;
714
+ ErrorCode?: 'InternalError' | 'InvalidRequest';
715
+ ErrorMessage?: string;
716
+ }>;
717
+ }
718
+ export interface BatchDeleteDocumentCommandInput {
719
+ IndexId: string;
720
+ DocumentIdList: string[];
721
+ DataSourceSyncJobMetricTarget?: {
722
+ DataSourceId: string;
723
+ DataSourceSyncJobId?: string;
724
+ };
725
+ }
726
+ export interface BatchDeleteDocumentCommandOutput {
727
+ FailedDocuments?: Array<{
728
+ Id?: string;
729
+ ErrorCode?: 'InternalError' | 'InvalidRequest';
730
+ ErrorMessage?: string;
731
+ }>;
732
+ }
733
+ export declare class KendraClient {
734
+ private client;
735
+ private region;
736
+ constructor(region?: string);
737
+ private request;
738
+ createIndex(params: CreateIndexCommandInput): Promise<CreateIndexCommandOutput>;
739
+ describeIndex(params: DescribeIndexCommandInput): Promise<DescribeIndexCommandOutput>;
740
+ listIndices(params?: ListIndicesCommandInput): Promise<ListIndicesCommandOutput>;
741
+ deleteIndex(params: DeleteIndexCommandInput): Promise<DeleteIndexCommandOutput>;
742
+ createDataSource(params: CreateDataSourceCommandInput): Promise<CreateDataSourceCommandOutput>;
743
+ describeDataSource(params: DescribeDataSourceCommandInput): Promise<DescribeDataSourceCommandOutput>;
744
+ listDataSources(params: ListDataSourcesCommandInput): Promise<ListDataSourcesCommandOutput>;
745
+ startDataSourceSyncJob(params: StartDataSourceSyncJobCommandInput): Promise<StartDataSourceSyncJobCommandOutput>;
746
+ stopDataSourceSyncJob(params: StopDataSourceSyncJobCommandInput): Promise<StopDataSourceSyncJobCommandOutput>;
747
+ query(params: QueryCommandInput): Promise<QueryCommandOutput>;
748
+ retrieve(params: RetrieveCommandInput): Promise<RetrieveCommandOutput>;
749
+ batchPutDocument(params: BatchPutDocumentCommandInput): Promise<BatchPutDocumentCommandOutput>;
750
+ batchDeleteDocument(params: BatchDeleteDocumentCommandInput): Promise<BatchDeleteDocumentCommandOutput>;
751
+ /**
752
+ * Simple search query
753
+ */
754
+ search(indexId: string, queryText: string, options?: {
755
+ pageSize?: number;
756
+ pageNumber?: number;
757
+ attributeFilter?: QueryCommandInput['AttributeFilter'];
758
+ }): Promise<QueryResultItem[]>;
759
+ /**
760
+ * Retrieve documents (for RAG)
761
+ */
762
+ retrieveDocuments(indexId: string, queryText: string, options?: {
763
+ pageSize?: number;
764
+ pageNumber?: number;
765
+ }): Promise<RetrieveResultItem[]>;
766
+ /**
767
+ * Add a text document to the index
768
+ */
769
+ addDocument(indexId: string, document: {
770
+ id: string;
771
+ title?: string;
772
+ content: string;
773
+ attributes?: Record<string, string | string[] | number>;
774
+ }): Promise<void>;
775
+ /**
776
+ * Add multiple documents
777
+ */
778
+ addDocuments(indexId: string, documents: Array<{
779
+ id: string;
780
+ title?: string;
781
+ content: string;
782
+ attributes?: Record<string, string | string[] | number>;
783
+ }>): Promise<{
784
+ succeeded: number;
785
+ failed: Array<{
786
+ id: string;
787
+ error: string;
788
+ }>;
789
+ }>;
790
+ /**
791
+ * Delete documents
792
+ */
793
+ deleteDocuments(indexId: string, documentIds: string[]): Promise<void>;
794
+ /**
795
+ * Wait for index to be active
796
+ */
797
+ waitForIndex(indexId: string, options?: {
798
+ maxWaitMs?: number;
799
+ pollIntervalMs?: number;
800
+ }): Promise<Index>;
801
+ /**
802
+ * Wait for data source to be active
803
+ */
804
+ waitForDataSource(indexId: string, dataSourceId: string, options?: {
805
+ maxWaitMs?: number;
806
+ pollIntervalMs?: number;
807
+ }): Promise<DataSource>;
808
+ }
809
+ /**
810
+ * Quick search
811
+ */
812
+ export declare function search(indexId: string, query: string, options?: {
813
+ region?: string;
814
+ pageSize?: number;
815
+ }): Promise<Array<{
816
+ title: string;
817
+ excerpt: string;
818
+ uri: string;
819
+ score: string;
820
+ }>>;
821
+ /**
822
+ * Retrieve for RAG
823
+ */
824
+ export declare function retrieveForRag(indexId: string, query: string, options?: {
825
+ region?: string;
826
+ pageSize?: number;
827
+ }): Promise<Array<{
828
+ content: string;
829
+ uri: string;
830
+ score: string;
831
+ }>>;