@stacksjs/ts-cloud 0.1.11 → 0.1.14

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