diff --git a/clients/client-workdocs/README.md b/clients/client-workdocs/README.md
index 691d0afa0d52..ac1df5d8c1c7 100644
--- a/clients/client-workdocs/README.md
+++ b/clients/client-workdocs/README.md
@@ -575,6 +575,14 @@ RestoreDocumentVersions
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-workdocs/classes/restoredocumentversionscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-workdocs/interfaces/restoredocumentversionscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-workdocs/interfaces/restoredocumentversionscommandoutput.html)
+
+ Searches metadata and the content of folders, documents, document versions, and comments. Updates the specified attributes of a document. The user must have access to both
* the document and its parent folder, if applicable.
+SearchResources
+
+
+[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-workdocs/classes/searchresourcescommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-workdocs/interfaces/searchresourcescommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-workdocs/interfaces/searchresourcescommandoutput.html)
+
diff --git a/clients/client-workdocs/package.json b/clients/client-workdocs/package.json
index 8b28244b8cb7..271d1af36eb2 100644
--- a/clients/client-workdocs/package.json
+++ b/clients/client-workdocs/package.json
@@ -64,27 +64,15 @@
"typedoc": "0.23.23",
"typescript": "~4.9.5"
},
- "engines": {
- "node": ">=14.0.0"
- },
- "typesVersions": {
- "<4.0": {
- "dist-types/*": [
- "dist-types/ts3.4/*"
- ]
- }
- },
- "files": [
- "dist-*"
- ],
+ "engines": { "node": ">=14.0.0" },
+ "typesVersions": { "<4.0": { "dist-types/*": ["dist-types/ts3.4/*"] } },
+ "files": ["dist-*"],
"author": {
"name": "AWS SDK for JavaScript Team",
"url": "https://aws.amazon.com/javascript/"
},
"license": "Apache-2.0",
- "browser": {
- "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
- },
+ "browser": { "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" },
"react-native": {
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
},
diff --git a/clients/client-workdocs/src/WorkDocs.ts b/clients/client-workdocs/src/WorkDocs.ts
index c091c275452f..6b573981a052 100644
--- a/clients/client-workdocs/src/WorkDocs.ts
+++ b/clients/client-workdocs/src/WorkDocs.ts
@@ -180,6 +180,11 @@ import {
RestoreDocumentVersionsCommandInput,
RestoreDocumentVersionsCommandOutput,
} from "./commands/RestoreDocumentVersionsCommand";
+import {
+ SearchResourcesCommand,
+ SearchResourcesCommandInput,
+ SearchResourcesCommandOutput,
+} from "./commands/SearchResourcesCommand";
import {
UpdateDocumentCommand,
UpdateDocumentCommandInput,
@@ -1524,6 +1529,38 @@ export class WorkDocs extends WorkDocsClient {
}
}
+ /**
+ *
The pagination marker or limit fields are not valid.
+ * * @throws {@link InvalidPasswordException} (client fault) *The password is invalid.
* diff --git a/clients/client-workdocs/src/commands/SearchResourcesCommand.ts b/clients/client-workdocs/src/commands/SearchResourcesCommand.ts new file mode 100644 index 000000000000..706d0a94e9c0 --- /dev/null +++ b/clients/client-workdocs/src/commands/SearchResourcesCommand.ts @@ -0,0 +1,133 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { + SearchResourcesRequest, + SearchResourcesRequestFilterSensitiveLog, + SearchResourcesResponse, + SearchResourcesResponseFilterSensitiveLog, +} from "../models/models_0"; +import { + deserializeAws_restJson1SearchResourcesCommand, + serializeAws_restJson1SearchResourcesCommand, +} from "../protocols/Aws_restJson1"; +import { ServiceInputTypes, ServiceOutputTypes, WorkDocsClientResolvedConfig } from "../WorkDocsClient"; + +/** + * The input for {@link SearchResourcesCommand}. + */ +export interface SearchResourcesCommandInput extends SearchResourcesRequest {} +/** + * The output of {@link SearchResourcesCommand}. + */ +export interface SearchResourcesCommandOutput extends SearchResourcesResponse, __MetadataBearer {} + +/** + *Searches metadata and the content of folders, documents, document versions, and comments.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { WorkDocsClient, SearchResourcesCommand } from "@aws-sdk/client-workdocs"; // ES Modules import + * // const { WorkDocsClient, SearchResourcesCommand } = require("@aws-sdk/client-workdocs"); // CommonJS import + * const client = new WorkDocsClient(config); + * const command = new SearchResourcesCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link SearchResourcesCommandInput} for command's `input` shape. + * @see {@link SearchResourcesCommandOutput} for command's `response` shape. + * @see {@link WorkDocsClientResolvedConfig | config} for WorkDocsClient's `config` shape. + * + * @throws {@link InvalidArgumentException} (client fault) + *The pagination marker or limit fields are not valid.
+ * + * @throws {@link ServiceUnavailableException} (server fault) + *One or more of the dependencies is unavailable.
+ * + * @throws {@link UnauthorizedOperationException} (client fault) + *The operation is not permitted.
+ * + * @throws {@link UnauthorizedResourceAccessException} (client fault) + *The caller does not have access to perform the action on the resource.
+ * + * + */ +export class SearchResourcesCommand extends $Command< + SearchResourcesCommandInput, + SearchResourcesCommandOutput, + WorkDocsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + constructor(readonly input: SearchResourcesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackThe ID of the user being replied to.
*/ RecipientId?: string; + + /** + *The ID of the user who made the comment.
+ */ + ContributorId?: string; } /** @@ -573,6 +578,10 @@ export interface Activity { CommentMetadata?: CommentMetadata; } +export enum AdditionalResponseFieldType { + WEBURL = "WEBURL", +} + /** *Set of options which defines notification preferences of given action.
*/ @@ -2595,6 +2604,306 @@ export interface RestoreDocumentVersionsRequest { DocumentId: string | undefined; } +export enum ContentCategoryType { + AUDIO = "AUDIO", + DOCUMENT = "DOCUMENT", + IMAGE = "IMAGE", + OTHER = "OTHER", + PDF = "PDF", + PRESENTATION = "PRESENTATION", + SOURCE_CODE = "SOURCE_CODE", + SPREADSHEET = "SPREADSHEET", + VIDEO = "VIDEO", +} + +/** + *Filters results based on timestamp range (in epochs).
+ */ +export interface DateRangeType { + /** + *Timestamp range start value (in epochs)
+ */ + StartValue?: Date; + + /** + *Timestamp range end value (in epochs).
+ */ + EndValue?: Date; +} + +export enum PrincipalRoleType { + CONTRIBUTOR = "CONTRIBUTOR", + COOWNER = "COOWNER", + OWNER = "OWNER", + VIEWER = "VIEWER", +} + +/** + *Filter based on UserIds or GroupIds.
+ */ +export interface SearchPrincipalType { + /** + *UserIds or GroupIds.
+ */ + Id: string | undefined; + + /** + *The Role of a User or Group.
+ */ + Roles?: (PrincipalRoleType | string)[]; +} + +export enum SearchResourceType { + COMMENT = "COMMENT", + DOCUMENT = "DOCUMENT", + DOCUMENT_VERSION = "DOCUMENT_VERSION", + FOLDER = "FOLDER", +} + +export enum SearchCollectionType { + OWNED = "OWNED", + SHARED_WITH_ME = "SHARED_WITH_ME", +} + +/** + *Filter based on size (in bytes).
+ */ +export interface LongRangeType { + /** + *The size start range (in bytes).
+ */ + StartValue?: number; + + /** + *The size end range (in bytes).
+ */ + EndValue?: number; +} + +export enum LanguageCodeType { + AR = "AR", + BG = "BG", + BN = "BN", + CS = "CS", + DA = "DA", + DE = "DE", + DEFAULT = "DEFAULT", + EL = "EL", + EN = "EN", + ES = "ES", + FA = "FA", + FI = "FI", + FR = "FR", + HI = "HI", + HU = "HU", + ID = "ID", + IT = "IT", + JA = "JA", + KO = "KO", + LT = "LT", + LV = "LV", + NL = "NL", + NO = "NO", + PT = "PT", + RO = "RO", + RU = "RU", + SV = "SV", + SW = "SW", + TH = "TH", + TR = "TR", + ZH = "ZH", +} + +/** + *Filters results based on entity metadata.
+ */ +export interface Filters { + /** + *Filters by the locale of the content or comment.
+ */ + TextLocales?: (LanguageCodeType | string)[]; + + /** + *Filters by content category.
+ */ + ContentCategories?: (ContentCategoryType | string)[]; + + /** + *Filters based on entity type.
+ */ + ResourceTypes?: (SearchResourceType | string)[]; + + /** + *Filter by labels using exact match.
+ */ + Labels?: string[]; + + /** + *Filter based on UserIds or GroupIds.
+ */ + Principals?: SearchPrincipalType[]; + + /** + *Filter based on resource’s path.
+ */ + AncestorIds?: string[]; + + /** + *Filter based on file groupings.
+ */ + SearchCollectionTypes?: (SearchCollectionType | string)[]; + + /** + *Filter based on size (in bytes).
+ */ + SizeRange?: LongRangeType; + + /** + *Filter based on resource’s creation timestamp.
+ */ + CreatedRange?: DateRangeType; + + /** + *Filter based on resource’s modified timestamp.
+ */ + ModifiedRange?: DateRangeType; +} + +export enum OrderByFieldType { + CREATED_TIMESTAMP = "CREATED_TIMESTAMP", + MODIFIED_TIMESTAMP = "MODIFIED_TIMESTAMP", + NAME = "NAME", + RELEVANCE = "RELEVANCE", + SIZE = "SIZE", +} + +export enum SortOrder { + ASC = "ASC", + DESC = "DESC", +} + +/** + *The result of the sort operation.
+ */ +export interface SearchSortResult { + /** + *Sort search results based on this field name.
+ */ + Field?: OrderByFieldType | string; + + /** + *Sort direction.
+ */ + Order?: SortOrder | string; +} + +export enum SearchQueryScopeType { + CONTENT = "CONTENT", + NAME = "NAME", +} + +export interface SearchResourcesRequest { + /** + *Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.
+ */ + AuthenticationToken?: string; + + /** + *The String to search for. Searches across different text fields based on request parameters. Use double quotes around the query string for exact phrase matches.
+ */ + QueryText?: string; + + /** + *Filter based on the text field type. A Folder has only a name and no content. A Comment has only content and no name. A Document or Document Version has a name and content
+ */ + QueryScopes?: (SearchQueryScopeType | string)[]; + + /** + *Filters based on the resource owner OrgId. This is a mandatory parameter when using Admin SigV4 credentials.
+ */ + OrganizationId?: string; + + /** + *A list of attributes to include in the response. Used to request fields that are not normally + * returned in a standard response.
+ */ + AdditionalResponseFields?: (AdditionalResponseFieldType | string)[]; + + /** + *Filters results based on entity metadata.
+ */ + Filters?: Filters; + + /** + *Order by results in one or more categories.
+ */ + OrderBy?: SearchSortResult[]; + + /** + *Max results count per page.
+ */ + Limit?: number; + + /** + *The marker for the next set of results.
+ */ + Marker?: string; +} + +export enum ResponseItemType { + COMMENT = "COMMENT", + DOCUMENT = "DOCUMENT", + DOCUMENT_VERSION = "DOCUMENT_VERSION", + FOLDER = "FOLDER", +} + +/** + *List of Documents, Folders, Comments, and Document Versions matching the query.
+ */ +export interface ResponseItem { + /** + *The type of item being returned.
+ */ + ResourceType?: ResponseItemType | string; + + /** + *The webUrl of the item being returned.
+ */ + WebUrl?: string; + + /** + *The document that matches the query.
+ */ + DocumentMetadata?: DocumentMetadata; + + /** + *The folder that matches the query.
+ */ + FolderMetadata?: FolderMetadata; + + /** + *The comment that matches the query.
+ */ + CommentMetadata?: CommentMetadata; + + /** + *The document version that matches the metadata.
+ */ + DocumentVersionMetadata?: DocumentVersionMetadata; +} + +export interface SearchResourcesResponse { + /** + *List of Documents, Folders, Comments, and Document Versions matching the query.
+ */ + Items?: ResponseItem[]; + + /** + *The marker to use when requesting the next set of results. If there are no additional results, the string is empty.
+ */ + Marker?: string; +} + export interface UpdateDocumentRequest { /** *Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.
@@ -2815,7 +3124,10 @@ export const UserStorageMetadataFilterSensitiveLog = (obj: UserStorageMetadata): */ export const UserFilterSensitiveLog = (obj: User): any => ({ ...obj, + ...(obj.Username && { Username: SENSITIVE_STRING }), ...(obj.EmailAddress && { EmailAddress: SENSITIVE_STRING }), + ...(obj.GivenName && { GivenName: SENSITIVE_STRING }), + ...(obj.Surname && { Surname: SENSITIVE_STRING }), }); /** @@ -2839,6 +3151,9 @@ export const CommentMetadataFilterSensitiveLog = (obj: CommentMetadata): any => */ export const UserMetadataFilterSensitiveLog = (obj: UserMetadata): any => ({ ...obj, + ...(obj.Username && { Username: SENSITIVE_STRING }), + ...(obj.GivenName && { GivenName: SENSITIVE_STRING }), + ...(obj.Surname && { Surname: SENSITIVE_STRING }), ...(obj.EmailAddress && { EmailAddress: SENSITIVE_STRING }), }); @@ -2847,6 +3162,8 @@ export const UserMetadataFilterSensitiveLog = (obj: UserMetadata): any => ({ */ export const ResourceMetadataFilterSensitiveLog = (obj: ResourceMetadata): any => ({ ...obj, + ...(obj.Name && { Name: SENSITIVE_STRING }), + ...(obj.OriginalName && { OriginalName: SENSITIVE_STRING }), ...(obj.Owner && { Owner: UserMetadataFilterSensitiveLog(obj.Owner) }), }); @@ -2966,6 +3283,7 @@ export const CreateCustomMetadataResponseFilterSensitiveLog = (obj: CreateCustom export const CreateFolderRequestFilterSensitiveLog = (obj: CreateFolderRequest): any => ({ ...obj, ...(obj.AuthenticationToken && { AuthenticationToken: SENSITIVE_STRING }), + ...(obj.Name && { Name: SENSITIVE_STRING }), }); /** @@ -2973,6 +3291,7 @@ export const CreateFolderRequestFilterSensitiveLog = (obj: CreateFolderRequest): */ export const FolderMetadataFilterSensitiveLog = (obj: FolderMetadata): any => ({ ...obj, + ...(obj.Name && { Name: SENSITIVE_STRING }), }); /** @@ -2980,6 +3299,7 @@ export const FolderMetadataFilterSensitiveLog = (obj: FolderMetadata): any => ({ */ export const CreateFolderResponseFilterSensitiveLog = (obj: CreateFolderResponse): any => ({ ...obj, + ...(obj.Metadata && { Metadata: FolderMetadataFilterSensitiveLog(obj.Metadata) }), }); /** @@ -3027,7 +3347,10 @@ export const CreateNotificationSubscriptionResponseFilterSensitiveLog = ( */ export const CreateUserRequestFilterSensitiveLog = (obj: CreateUserRequest): any => ({ ...obj, + ...(obj.Username && { Username: SENSITIVE_STRING }), ...(obj.EmailAddress && { EmailAddress: SENSITIVE_STRING }), + ...(obj.GivenName && { GivenName: SENSITIVE_STRING }), + ...(obj.Surname && { Surname: SENSITIVE_STRING }), ...(obj.Password && { Password: SENSITIVE_STRING }), ...(obj.AuthenticationToken && { AuthenticationToken: SENSITIVE_STRING }), }); @@ -3180,6 +3503,7 @@ export const DescribeDocumentVersionsRequestFilterSensitiveLog = (obj: DescribeD */ export const DocumentVersionMetadataFilterSensitiveLog = (obj: DocumentVersionMetadata): any => ({ ...obj, + ...(obj.Name && { Name: SENSITIVE_STRING }), ...(obj.Thumbnail && { Thumbnail: SENSITIVE_STRING }), ...(obj.Source && { Source: SENSITIVE_STRING }), }); @@ -3217,6 +3541,7 @@ export const DocumentMetadataFilterSensitiveLog = (obj: DocumentMetadata): any = */ export const DescribeFolderContentsResponseFilterSensitiveLog = (obj: DescribeFolderContentsResponse): any => ({ ...obj, + ...(obj.Folders && { Folders: obj.Folders.map((item) => FolderMetadataFilterSensitiveLog(item)) }), ...(obj.Documents && { Documents: obj.Documents.map((item) => DocumentMetadataFilterSensitiveLog(item)) }), }); @@ -3298,6 +3623,7 @@ export const DescribeRootFoldersRequestFilterSensitiveLog = (obj: DescribeRootFo */ export const DescribeRootFoldersResponseFilterSensitiveLog = (obj: DescribeRootFoldersResponse): any => ({ ...obj, + ...(obj.Folders && { Folders: obj.Folders.map((item) => FolderMetadataFilterSensitiveLog(item)) }), }); /** @@ -3362,6 +3688,7 @@ export const GetDocumentPathRequestFilterSensitiveLog = (obj: GetDocumentPathReq */ export const ResourcePathComponentFilterSensitiveLog = (obj: ResourcePathComponent): any => ({ ...obj, + ...(obj.Name && { Name: SENSITIVE_STRING }), }); /** @@ -3369,6 +3696,7 @@ export const ResourcePathComponentFilterSensitiveLog = (obj: ResourcePathCompone */ export const ResourcePathFilterSensitiveLog = (obj: ResourcePath): any => ({ ...obj, + ...(obj.Components && { Components: obj.Components.map((item) => ResourcePathComponentFilterSensitiveLog(item)) }), }); /** @@ -3376,6 +3704,7 @@ export const ResourcePathFilterSensitiveLog = (obj: ResourcePath): any => ({ */ export const GetDocumentPathResponseFilterSensitiveLog = (obj: GetDocumentPathResponse): any => ({ ...obj, + ...(obj.Path && { Path: ResourcePathFilterSensitiveLog(obj.Path) }), }); /** @@ -3407,6 +3736,7 @@ export const GetFolderRequestFilterSensitiveLog = (obj: GetFolderRequest): any = */ export const GetFolderResponseFilterSensitiveLog = (obj: GetFolderResponse): any => ({ ...obj, + ...(obj.Metadata && { Metadata: FolderMetadataFilterSensitiveLog(obj.Metadata) }), }); /** @@ -3422,6 +3752,7 @@ export const GetFolderPathRequestFilterSensitiveLog = (obj: GetFolderPathRequest */ export const GetFolderPathResponseFilterSensitiveLog = (obj: GetFolderPathResponse): any => ({ ...obj, + ...(obj.Path && { Path: ResourcePathFilterSensitiveLog(obj.Path) }), }); /** @@ -3437,6 +3768,7 @@ export const GetResourcesRequestFilterSensitiveLog = (obj: GetResourcesRequest): */ export const GetResourcesResponseFilterSensitiveLog = (obj: GetResourcesResponse): any => ({ ...obj, + ...(obj.Folders && { Folders: obj.Folders.map((item) => FolderMetadataFilterSensitiveLog(item)) }), ...(obj.Documents && { Documents: obj.Documents.map((item) => DocumentMetadataFilterSensitiveLog(item)) }), }); @@ -3448,6 +3780,7 @@ export const InitiateDocumentVersionUploadRequestFilterSensitiveLog = ( ): any => ({ ...obj, ...(obj.AuthenticationToken && { AuthenticationToken: SENSITIVE_STRING }), + ...(obj.Name && { Name: SENSITIVE_STRING }), }); /** @@ -3495,12 +3828,79 @@ export const RestoreDocumentVersionsRequestFilterSensitiveLog = (obj: RestoreDoc ...(obj.AuthenticationToken && { AuthenticationToken: SENSITIVE_STRING }), }); +/** + * @internal + */ +export const DateRangeTypeFilterSensitiveLog = (obj: DateRangeType): any => ({ + ...obj, +}); + +/** + * @internal + */ +export const SearchPrincipalTypeFilterSensitiveLog = (obj: SearchPrincipalType): any => ({ + ...obj, +}); + +/** + * @internal + */ +export const LongRangeTypeFilterSensitiveLog = (obj: LongRangeType): any => ({ + ...obj, +}); + +/** + * @internal + */ +export const FiltersFilterSensitiveLog = (obj: Filters): any => ({ + ...obj, +}); + +/** + * @internal + */ +export const SearchSortResultFilterSensitiveLog = (obj: SearchSortResult): any => ({ + ...obj, +}); + +/** + * @internal + */ +export const SearchResourcesRequestFilterSensitiveLog = (obj: SearchResourcesRequest): any => ({ + ...obj, + ...(obj.AuthenticationToken && { AuthenticationToken: SENSITIVE_STRING }), + ...(obj.QueryText && { QueryText: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const ResponseItemFilterSensitiveLog = (obj: ResponseItem): any => ({ + ...obj, + ...(obj.WebUrl && { WebUrl: SENSITIVE_STRING }), + ...(obj.DocumentMetadata && { DocumentMetadata: DocumentMetadataFilterSensitiveLog(obj.DocumentMetadata) }), + ...(obj.FolderMetadata && { FolderMetadata: FolderMetadataFilterSensitiveLog(obj.FolderMetadata) }), + ...(obj.CommentMetadata && { CommentMetadata: CommentMetadataFilterSensitiveLog(obj.CommentMetadata) }), + ...(obj.DocumentVersionMetadata && { + DocumentVersionMetadata: DocumentVersionMetadataFilterSensitiveLog(obj.DocumentVersionMetadata), + }), +}); + +/** + * @internal + */ +export const SearchResourcesResponseFilterSensitiveLog = (obj: SearchResourcesResponse): any => ({ + ...obj, + ...(obj.Items && { Items: obj.Items.map((item) => ResponseItemFilterSensitiveLog(item)) }), +}); + /** * @internal */ export const UpdateDocumentRequestFilterSensitiveLog = (obj: UpdateDocumentRequest): any => ({ ...obj, ...(obj.AuthenticationToken && { AuthenticationToken: SENSITIVE_STRING }), + ...(obj.Name && { Name: SENSITIVE_STRING }), }); /** @@ -3517,6 +3917,7 @@ export const UpdateDocumentVersionRequestFilterSensitiveLog = (obj: UpdateDocume export const UpdateFolderRequestFilterSensitiveLog = (obj: UpdateFolderRequest): any => ({ ...obj, ...(obj.AuthenticationToken && { AuthenticationToken: SENSITIVE_STRING }), + ...(obj.Name && { Name: SENSITIVE_STRING }), }); /** @@ -3525,6 +3926,8 @@ export const UpdateFolderRequestFilterSensitiveLog = (obj: UpdateFolderRequest): export const UpdateUserRequestFilterSensitiveLog = (obj: UpdateUserRequest): any => ({ ...obj, ...(obj.AuthenticationToken && { AuthenticationToken: SENSITIVE_STRING }), + ...(obj.GivenName && { GivenName: SENSITIVE_STRING }), + ...(obj.Surname && { Surname: SENSITIVE_STRING }), }); /** diff --git a/clients/client-workdocs/src/pagination/DescribeActivitiesPaginator.ts b/clients/client-workdocs/src/pagination/DescribeActivitiesPaginator.ts new file mode 100644 index 000000000000..52bb7567950e --- /dev/null +++ b/clients/client-workdocs/src/pagination/DescribeActivitiesPaginator.ts @@ -0,0 +1,47 @@ +// smithy-typescript generated code +import { Paginator } from "@aws-sdk/types"; + +import { + DescribeActivitiesCommand, + DescribeActivitiesCommandInput, + DescribeActivitiesCommandOutput, +} from "../commands/DescribeActivitiesCommand"; +import { WorkDocsClient } from "../WorkDocsClient"; +import { WorkDocsPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: WorkDocsClient, + input: DescribeActivitiesCommandInput, + ...args: any +): PromiseThe ID of the user being replied to.
" } + }, + "ContributorId": { + "target": "com.amazonaws.workdocs#IdType", + "traits": { + "smithy.api#documentation": "The ID of the user who made the comment.
" + } } }, "traits": { @@ -1563,19 +1628,78 @@ "smithy.api#httpError": 409 } }, - "com.amazonaws.workdocs#CreateComment": { - "type": "operation", - "input": { - "target": "com.amazonaws.workdocs#CreateCommentRequest" - }, - "output": { - "target": "com.amazonaws.workdocs#CreateCommentResponse" - }, - "errors": [ - { - "target": "com.amazonaws.workdocs#DocumentLockedForCommentsException" + "com.amazonaws.workdocs#ContentCategoryType": { + "type": "enum", + "members": { + "IMAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IMAGE" + } }, - { + "DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DOCUMENT" + } + }, + "PDF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PDF" + } + }, + "SPREADSHEET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SPREADSHEET" + } + }, + "PRESENTATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PRESENTATION" + } + }, + "AUDIO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AUDIO" + } + }, + "VIDEO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VIDEO" + } + }, + "SOURCE_CODE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SOURCE_CODE" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OTHER" + } + } + } + }, + "com.amazonaws.workdocs#CreateComment": { + "type": "operation", + "input": { + "target": "com.amazonaws.workdocs#CreateCommentRequest" + }, + "output": { + "target": "com.amazonaws.workdocs#CreateCommentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.workdocs#DocumentLockedForCommentsException" + }, + { "target": "com.amazonaws.workdocs#EntityNotExistsException" }, { @@ -2189,6 +2313,26 @@ "smithy.api#pattern": "^[a-zA-Z0-9._+-/=][a-zA-Z0-9 ._+-/=]*$" } }, + "com.amazonaws.workdocs#DateRangeType": { + "type": "structure", + "members": { + "StartValue": { + "target": "com.amazonaws.workdocs#TimestampType", + "traits": { + "smithy.api#documentation": "Timestamp range start value (in epochs)
" + } + }, + "EndValue": { + "target": "com.amazonaws.workdocs#TimestampType", + "traits": { + "smithy.api#documentation": "Timestamp range end value (in epochs).
" + } + } + }, + "traits": { + "smithy.api#documentation": "Filters results based on timestamp range (in epochs).
" + } + }, "com.amazonaws.workdocs#DeactivateUser": { "type": "operation", "input": { @@ -2939,6 +3083,12 @@ "method": "GET", "uri": "/api/v1/activities", "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "Marker", + "outputToken": "Marker", + "items": "UserActivities", + "pageSize": "Limit" } } }, @@ -3075,6 +3225,12 @@ "method": "GET", "uri": "/api/v1/documents/{DocumentId}/versions/{VersionId}/comments", "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "Marker", + "outputToken": "Marker", + "items": "Comments", + "pageSize": "Limit" } } }, @@ -3424,6 +3580,12 @@ "method": "GET", "uri": "/api/v1/groups", "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "Marker", + "outputToken": "Marker", + "items": "Groups", + "pageSize": "Limit" } } }, @@ -3516,6 +3678,12 @@ "method": "GET", "uri": "/api/v1/organizations/{OrganizationId}/subscriptions", "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "Marker", + "outputToken": "Marker", + "items": "Subscriptions", + "pageSize": "Limit" } } }, @@ -3600,6 +3768,12 @@ "method": "GET", "uri": "/api/v1/resources/{ResourceId}/permissions", "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "Marker", + "outputToken": "Marker", + "items": "Principals", + "pageSize": "Limit" } } }, @@ -3698,6 +3872,12 @@ "method": "GET", "uri": "/api/v1/me/root", "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "Marker", + "outputToken": "Marker", + "items": "Folders", + "pageSize": "Limit" } } }, @@ -4265,6 +4445,74 @@ "smithy.api#pattern": "^[\\w,]+$" } }, + "com.amazonaws.workdocs#Filters": { + "type": "structure", + "members": { + "TextLocales": { + "target": "com.amazonaws.workdocs#TextLocaleTypeList", + "traits": { + "smithy.api#documentation": "Filters by the locale of the content or comment.
" + } + }, + "ContentCategories": { + "target": "com.amazonaws.workdocs#SearchContentCategoryTypeList", + "traits": { + "smithy.api#documentation": "Filters by content category.
" + } + }, + "ResourceTypes": { + "target": "com.amazonaws.workdocs#SearchResourceTypeList", + "traits": { + "smithy.api#documentation": "Filters based on entity type.
" + } + }, + "Labels": { + "target": "com.amazonaws.workdocs#SearchLabelList", + "traits": { + "smithy.api#documentation": "Filter by labels using exact match.
" + } + }, + "Principals": { + "target": "com.amazonaws.workdocs#SearchPrincipalTypeList", + "traits": { + "smithy.api#documentation": "Filter based on UserIds or GroupIds.
" + } + }, + "AncestorIds": { + "target": "com.amazonaws.workdocs#SearchAncestorIdList", + "traits": { + "smithy.api#documentation": "Filter based on resource’s path.
" + } + }, + "SearchCollectionTypes": { + "target": "com.amazonaws.workdocs#SearchCollectionTypeList", + "traits": { + "smithy.api#documentation": "Filter based on file groupings.
" + } + }, + "SizeRange": { + "target": "com.amazonaws.workdocs#LongRangeType", + "traits": { + "smithy.api#documentation": "Filter based on size (in bytes).
" + } + }, + "CreatedRange": { + "target": "com.amazonaws.workdocs#DateRangeType", + "traits": { + "smithy.api#documentation": "Filter based on resource’s creation timestamp.
" + } + }, + "ModifiedRange": { + "target": "com.amazonaws.workdocs#DateRangeType", + "traits": { + "smithy.api#documentation": "Filter based on resource’s modified timestamp.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Filters results based on entity metadata.
" + } + }, "com.amazonaws.workdocs#FolderContentType": { "type": "enum", "members": { @@ -5109,6 +5357,9 @@ { "target": "com.amazonaws.workdocs#FailedDependencyException" }, + { + "target": "com.amazonaws.workdocs#InvalidArgumentException" + }, { "target": "com.amazonaws.workdocs#InvalidPasswordException" }, @@ -5275,163 +5526,422 @@ "smithy.api#httpError": 401 } }, - "com.amazonaws.workdocs#LimitExceededException": { - "type": "structure", - "members": { - "Message": { - "target": "com.amazonaws.workdocs#ErrorMessageType" - } - }, - "traits": { - "smithy.api#documentation": "The maximum of 100,000 files and folders under the parent folder has been exceeded.
", - "smithy.api#error": "client", - "smithy.api#httpError": 409 - } - }, - "com.amazonaws.workdocs#LimitType": { - "type": "integer", - "traits": { - "smithy.api#range": { - "min": 1, - "max": 999 - } - } - }, - "com.amazonaws.workdocs#LocaleType": { + "com.amazonaws.workdocs#LanguageCodeType": { "type": "enum", "members": { - "EN": { + "AR": { "target": "smithy.api#Unit", "traits": { - "smithy.api#enumValue": "en" + "smithy.api#enumValue": "AR" } }, - "FR": { + "BG": { "target": "smithy.api#Unit", "traits": { - "smithy.api#enumValue": "fr" + "smithy.api#enumValue": "BG" } }, - "KO": { + "BN": { "target": "smithy.api#Unit", "traits": { - "smithy.api#enumValue": "ko" + "smithy.api#enumValue": "BN" + } + }, + "DA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DA" } }, "DE": { "target": "smithy.api#Unit", "traits": { - "smithy.api#enumValue": "de" + "smithy.api#enumValue": "DE" + } + }, + "CS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CS" + } + }, + "EL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EL" + } + }, + "EN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EN" } }, "ES": { "target": "smithy.api#Unit", "traits": { - "smithy.api#enumValue": "es" + "smithy.api#enumValue": "ES" } }, - "JA": { + "FA": { "target": "smithy.api#Unit", "traits": { - "smithy.api#enumValue": "ja" + "smithy.api#enumValue": "FA" } }, - "RU": { + "FI": { "target": "smithy.api#Unit", "traits": { - "smithy.api#enumValue": "ru" + "smithy.api#enumValue": "FI" } }, - "ZH_CN": { + "FR": { "target": "smithy.api#Unit", "traits": { - "smithy.api#enumValue": "zh_CN" + "smithy.api#enumValue": "FR" } }, - "ZH_TW": { + "HI": { "target": "smithy.api#Unit", "traits": { - "smithy.api#enumValue": "zh_TW" + "smithy.api#enumValue": "HI" } }, - "PT_BR": { + "HU": { "target": "smithy.api#Unit", "traits": { - "smithy.api#enumValue": "pt_BR" + "smithy.api#enumValue": "HU" } }, - "DEFAULT": { + "ID": { "target": "smithy.api#Unit", "traits": { - "smithy.api#enumValue": "default" + "smithy.api#enumValue": "ID" } - } - } - }, - "com.amazonaws.workdocs#MarkerType": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 2048 }, - "smithy.api#pattern": "^[\\u0000-\\u00FF]+$" - } - }, - "com.amazonaws.workdocs#MessageType": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 2048 + "IT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IT" + } }, - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.workdocs#NotificationOptions": { - "type": "structure", - "members": { - "SendEmail": { - "target": "com.amazonaws.workdocs#BooleanType", + "JA": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#default": false, - "smithy.api#documentation": "Boolean value to indicate an email notification should be sent to the\n recipients.
" + "smithy.api#enumValue": "JA" } }, - "EmailMessage": { - "target": "com.amazonaws.workdocs#MessageType", + "KO": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "Text value to be included in the email body.
" + "smithy.api#enumValue": "KO" } - } - }, - "traits": { - "smithy.api#documentation": "Set of options which defines notification preferences of given action.
" - } - }, - "com.amazonaws.workdocs#OrderType": { - "type": "enum", - "members": { - "ASCENDING": { + }, + "LT": { "target": "smithy.api#Unit", "traits": { - "smithy.api#enumValue": "ASCENDING" + "smithy.api#enumValue": "LT" } }, - "DESCENDING": { + "LV": { "target": "smithy.api#Unit", "traits": { - "smithy.api#enumValue": "DESCENDING" + "smithy.api#enumValue": "LV" } - } - } - }, - "com.amazonaws.workdocs#OrganizationUserList": { - "type": "list", - "member": { - "target": "com.amazonaws.workdocs#User" - } - }, + }, + "NL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NL" + } + }, + "NO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NO" + } + }, + "PT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PT" + } + }, + "RO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RO" + } + }, + "RU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RU" + } + }, + "SV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SV" + } + }, + "SW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SW" + } + }, + "TH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TH" + } + }, + "TR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TR" + } + }, + "ZH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ZH" + } + }, + "DEFAULT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEFAULT" + } + } + } + }, + "com.amazonaws.workdocs#LimitExceededException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.workdocs#ErrorMessageType" + } + }, + "traits": { + "smithy.api#documentation": "The maximum of 100,000 files and folders under the parent folder has been exceeded.
", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.workdocs#LimitType": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 999 + } + } + }, + "com.amazonaws.workdocs#LocaleType": { + "type": "enum", + "members": { + "EN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "en" + } + }, + "FR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fr" + } + }, + "KO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ko" + } + }, + "DE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "de" + } + }, + "ES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "es" + } + }, + "JA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ja" + } + }, + "RU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ru" + } + }, + "ZH_CN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "zh_CN" + } + }, + "ZH_TW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "zh_TW" + } + }, + "PT_BR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pt_BR" + } + }, + "DEFAULT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "default" + } + } + } + }, + "com.amazonaws.workdocs#LongRangeType": { + "type": "structure", + "members": { + "StartValue": { + "target": "com.amazonaws.workdocs#LongType", + "traits": { + "smithy.api#documentation": "The size start range (in bytes).
" + } + }, + "EndValue": { + "target": "com.amazonaws.workdocs#LongType", + "traits": { + "smithy.api#documentation": "The size end range (in bytes).
" + } + } + }, + "traits": { + "smithy.api#documentation": "Filter based on size (in bytes).
" + } + }, + "com.amazonaws.workdocs#LongType": { + "type": "long" + }, + "com.amazonaws.workdocs#MarkerType": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^[\\u0000-\\u00FF]+$" + } + }, + "com.amazonaws.workdocs#MessageType": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2048 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.workdocs#NextMarkerType": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^[\\d]+$" + } + }, + "com.amazonaws.workdocs#NotificationOptions": { + "type": "structure", + "members": { + "SendEmail": { + "target": "com.amazonaws.workdocs#BooleanType", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "Boolean value to indicate an email notification should be sent to the\n recipients.
" + } + }, + "EmailMessage": { + "target": "com.amazonaws.workdocs#MessageType", + "traits": { + "smithy.api#documentation": "Text value to be included in the email body.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Set of options which defines notification preferences of given action.
" + } + }, + "com.amazonaws.workdocs#OrderByFieldType": { + "type": "enum", + "members": { + "RELEVANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RELEVANCE" + } + }, + "NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NAME" + } + }, + "SIZE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SIZE" + } + }, + "CREATED_TIMESTAMP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATED_TIMESTAMP" + } + }, + "MODIFIED_TIMESTAMP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MODIFIED_TIMESTAMP" + } + } + } + }, + "com.amazonaws.workdocs#OrderType": { + "type": "enum", + "members": { + "ASCENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASCENDING" + } + }, + "DESCENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DESCENDING" + } + } + } + }, + "com.amazonaws.workdocs#OrganizationUserList": { + "type": "list", + "member": { + "target": "com.amazonaws.workdocs#User" + } + }, "com.amazonaws.workdocs#PageMarkerType": { "type": "string", "traits": { @@ -5546,10 +6056,39 @@ "target": "com.amazonaws.workdocs#Principal" } }, - "com.amazonaws.workdocs#PrincipalType": { + "com.amazonaws.workdocs#PrincipalRoleType": { "type": "enum", "members": { - "USER": { + "VIEWER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VIEWER" + } + }, + "CONTRIBUTOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTRIBUTOR" + } + }, + "OWNER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OWNER" + } + }, + "COOWNER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COOWNER" + } + } + } + }, + "com.amazonaws.workdocs#PrincipalType": { + "type": "enum", + "members": { + "USER": { "target": "smithy.api#Unit", "traits": { "smithy.api#enumValue": "USER" @@ -5811,148 +6350,564 @@ } }, "traits": { - "smithy.api#documentation": "Describes the metadata of a resource.
" + "smithy.api#documentation": "Describes the metadata of a resource.
" + } + }, + "com.amazonaws.workdocs#ResourceNameType": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[\\u0020-\\u202D\\u202F-\\uFFFF]+$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.workdocs#ResourcePath": { + "type": "structure", + "members": { + "Components": { + "target": "com.amazonaws.workdocs#ResourcePathComponentList", + "traits": { + "smithy.api#documentation": "The components of the resource path.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Describes the path information of a resource.
" + } + }, + "com.amazonaws.workdocs#ResourcePathComponent": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.workdocs#IdType", + "traits": { + "smithy.api#documentation": "The ID of the resource path.
" + } + }, + "Name": { + "target": "com.amazonaws.workdocs#ResourceNameType", + "traits": { + "smithy.api#documentation": "The name of the resource path.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Describes the resource path.
" + } + }, + "com.amazonaws.workdocs#ResourcePathComponentList": { + "type": "list", + "member": { + "target": "com.amazonaws.workdocs#ResourcePathComponent" + } + }, + "com.amazonaws.workdocs#ResourceSortType": { + "type": "enum", + "members": { + "DATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DATE" + } + }, + "NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NAME" + } + } + } + }, + "com.amazonaws.workdocs#ResourceStateType": { + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "RESTORING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESTORING" + } + }, + "RECYCLING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RECYCLING" + } + }, + "RECYCLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RECYCLED" + } + } + } + }, + "com.amazonaws.workdocs#ResourceType": { + "type": "enum", + "members": { + "FOLDER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FOLDER" + } + }, + "DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DOCUMENT" + } + } + } + }, + "com.amazonaws.workdocs#ResponseItem": { + "type": "structure", + "members": { + "ResourceType": { + "target": "com.amazonaws.workdocs#ResponseItemType", + "traits": { + "smithy.api#documentation": "The type of item being returned.
" + } + }, + "WebUrl": { + "target": "com.amazonaws.workdocs#ResponseItemWebUrl", + "traits": { + "smithy.api#documentation": "The webUrl of the item being returned.
" + } + }, + "DocumentMetadata": { + "target": "com.amazonaws.workdocs#DocumentMetadata", + "traits": { + "smithy.api#documentation": "The document that matches the query.
" + } + }, + "FolderMetadata": { + "target": "com.amazonaws.workdocs#FolderMetadata", + "traits": { + "smithy.api#documentation": "The folder that matches the query.
" + } + }, + "CommentMetadata": { + "target": "com.amazonaws.workdocs#CommentMetadata", + "traits": { + "smithy.api#documentation": "The comment that matches the query.
" + } + }, + "DocumentVersionMetadata": { + "target": "com.amazonaws.workdocs#DocumentVersionMetadata", + "traits": { + "smithy.api#documentation": "The document version that matches the metadata.
" + } + } + }, + "traits": { + "smithy.api#documentation": "List of Documents, Folders, Comments, and Document Versions matching the query.
" + } + }, + "com.amazonaws.workdocs#ResponseItemType": { + "type": "enum", + "members": { + "DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DOCUMENT" + } + }, + "FOLDER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FOLDER" + } + }, + "COMMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMMENT" + } + }, + "DOCUMENT_VERSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DOCUMENT_VERSION" + } + } + } + }, + "com.amazonaws.workdocs#ResponseItemWebUrl": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 512 + }, + "smithy.api#pattern": "^[\\u0020-\\uFFFF]+$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.workdocs#ResponseItemsList": { + "type": "list", + "member": { + "target": "com.amazonaws.workdocs#ResponseItem" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.workdocs#RestoreDocumentVersions": { + "type": "operation", + "input": { + "target": "com.amazonaws.workdocs#RestoreDocumentVersionsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.workdocs#ConcurrentModificationException" + }, + { + "target": "com.amazonaws.workdocs#ConflictingOperationException" + }, + { + "target": "com.amazonaws.workdocs#EntityNotExistsException" + }, + { + "target": "com.amazonaws.workdocs#FailedDependencyException" + }, + { + "target": "com.amazonaws.workdocs#InvalidOperationException" + }, + { + "target": "com.amazonaws.workdocs#ProhibitedStateException" + }, + { + "target": "com.amazonaws.workdocs#UnauthorizedOperationException" + }, + { + "target": "com.amazonaws.workdocs#UnauthorizedResourceAccessException" + } + ], + "traits": { + "smithy.api#documentation": "Recovers a deleted version of an Amazon WorkDocs document.
", + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/documentVersions/restore/{DocumentId}", + "code": 204 + } + } + }, + "com.amazonaws.workdocs#RestoreDocumentVersionsRequest": { + "type": "structure", + "members": { + "AuthenticationToken": { + "target": "com.amazonaws.workdocs#AuthenticationHeaderType", + "traits": { + "smithy.api#documentation": "Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.
", + "smithy.api#httpHeader": "Authentication" + } + }, + "DocumentId": { + "target": "com.amazonaws.workdocs#ResourceIdType", + "traits": { + "smithy.api#documentation": "The ID of the document.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.workdocs#RolePermissionType": { + "type": "enum", + "members": { + "DIRECT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DIRECT" + } + }, + "INHERITED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INHERITED" + } + } + } + }, + "com.amazonaws.workdocs#RoleType": { + "type": "enum", + "members": { + "VIEWER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VIEWER" + } + }, + "CONTRIBUTOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTRIBUTOR" + } + }, + "OWNER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OWNER" + } + }, + "COOWNER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COOWNER" + } + } + } + }, + "com.amazonaws.workdocs#SearchAncestorId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + } + } + }, + "com.amazonaws.workdocs#SearchAncestorIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.workdocs#SearchAncestorId" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 10 + } + } + }, + "com.amazonaws.workdocs#SearchCollectionType": { + "type": "enum", + "members": { + "OWNED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OWNED" + } + }, + "SHARED_WITH_ME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SHARED_WITH_ME" + } + } + } + }, + "com.amazonaws.workdocs#SearchCollectionTypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.workdocs#SearchCollectionType" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2 + } + } + }, + "com.amazonaws.workdocs#SearchContentCategoryTypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.workdocs#ContentCategoryType" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 9 + } + } + }, + "com.amazonaws.workdocs#SearchLabel": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + } + } + }, + "com.amazonaws.workdocs#SearchLabelList": { + "type": "list", + "member": { + "target": "com.amazonaws.workdocs#SearchLabel" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 10 + } } }, - "com.amazonaws.workdocs#ResourceNameType": { + "com.amazonaws.workdocs#SearchMarkerType": { "type": "string", "traits": { "smithy.api#length": { "min": 1, - "max": 255 + "max": 12288 }, - "smithy.api#pattern": "^[\\u0020-\\u202D\\u202F-\\uFFFF]+$" + "smithy.api#pattern": "^[\\u0000-\\u00FF]+$" } }, - "com.amazonaws.workdocs#ResourcePath": { - "type": "structure", - "members": { - "Components": { - "target": "com.amazonaws.workdocs#ResourcePathComponentList", - "traits": { - "smithy.api#documentation": "The components of the resource path.
" - } - } + "com.amazonaws.workdocs#SearchPrincipalRoleList": { + "type": "list", + "member": { + "target": "com.amazonaws.workdocs#PrincipalRoleType" }, "traits": { - "smithy.api#documentation": "Describes the path information of a resource.
" + "smithy.api#length": { + "min": 0, + "max": 4 + } } }, - "com.amazonaws.workdocs#ResourcePathComponent": { + "com.amazonaws.workdocs#SearchPrincipalType": { "type": "structure", "members": { "Id": { "target": "com.amazonaws.workdocs#IdType", "traits": { - "smithy.api#documentation": "The ID of the resource path.
" + "smithy.api#documentation": "UserIds or GroupIds.
", + "smithy.api#required": {} } }, - "Name": { - "target": "com.amazonaws.workdocs#ResourceNameType", + "Roles": { + "target": "com.amazonaws.workdocs#SearchPrincipalRoleList", "traits": { - "smithy.api#documentation": "The name of the resource path.
" + "smithy.api#documentation": "The Role of a User or Group.
" } } }, "traits": { - "smithy.api#documentation": "Describes the resource path.
" + "smithy.api#documentation": "Filter based on UserIds or GroupIds.
" } }, - "com.amazonaws.workdocs#ResourcePathComponentList": { + "com.amazonaws.workdocs#SearchPrincipalTypeList": { "type": "list", "member": { - "target": "com.amazonaws.workdocs#ResourcePathComponent" + "target": "com.amazonaws.workdocs#SearchPrincipalType" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 10 + } } }, - "com.amazonaws.workdocs#ResourceSortType": { + "com.amazonaws.workdocs#SearchQueryScopeType": { "type": "enum", "members": { - "DATE": { + "NAME": { "target": "smithy.api#Unit", "traits": { - "smithy.api#enumValue": "DATE" + "smithy.api#enumValue": "NAME" } }, - "NAME": { + "CONTENT": { "target": "smithy.api#Unit", "traits": { - "smithy.api#enumValue": "NAME" + "smithy.api#enumValue": "CONTENT" } } } }, - "com.amazonaws.workdocs#ResourceStateType": { + "com.amazonaws.workdocs#SearchQueryScopeTypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.workdocs#SearchQueryScopeType" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2 + } + } + }, + "com.amazonaws.workdocs#SearchQueryType": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 512 + }, + "smithy.api#pattern": "^[\\u0020-\\uFFFF]+$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.workdocs#SearchResourceType": { "type": "enum", "members": { - "ACTIVE": { + "FOLDER": { "target": "smithy.api#Unit", "traits": { - "smithy.api#enumValue": "ACTIVE" + "smithy.api#enumValue": "FOLDER" } }, - "RESTORING": { + "DOCUMENT": { "target": "smithy.api#Unit", "traits": { - "smithy.api#enumValue": "RESTORING" + "smithy.api#enumValue": "DOCUMENT" } }, - "RECYCLING": { + "COMMENT": { "target": "smithy.api#Unit", "traits": { - "smithy.api#enumValue": "RECYCLING" + "smithy.api#enumValue": "COMMENT" } }, - "RECYCLED": { + "DOCUMENT_VERSION": { "target": "smithy.api#Unit", "traits": { - "smithy.api#enumValue": "RECYCLED" + "smithy.api#enumValue": "DOCUMENT_VERSION" } } } }, - "com.amazonaws.workdocs#ResourceType": { - "type": "enum", - "members": { - "FOLDER": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "FOLDER" - } - }, - "DOCUMENT": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DOCUMENT" - } + "com.amazonaws.workdocs#SearchResourceTypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.workdocs#SearchResourceType" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 4 } } }, - "com.amazonaws.workdocs#RestoreDocumentVersions": { + "com.amazonaws.workdocs#SearchResources": { "type": "operation", "input": { - "target": "com.amazonaws.workdocs#RestoreDocumentVersionsRequest" + "target": "com.amazonaws.workdocs#SearchResourcesRequest" }, "output": { - "target": "smithy.api#Unit" + "target": "com.amazonaws.workdocs#SearchResourcesResponse" }, "errors": [ { - "target": "com.amazonaws.workdocs#ConcurrentModificationException" - }, - { - "target": "com.amazonaws.workdocs#ConflictingOperationException" - }, - { - "target": "com.amazonaws.workdocs#EntityNotExistsException" - }, - { - "target": "com.amazonaws.workdocs#FailedDependencyException" - }, - { - "target": "com.amazonaws.workdocs#InvalidOperationException" + "target": "com.amazonaws.workdocs#InvalidArgumentException" }, { - "target": "com.amazonaws.workdocs#ProhibitedStateException" + "target": "com.amazonaws.workdocs#ServiceUnavailableException" }, { "target": "com.amazonaws.workdocs#UnauthorizedOperationException" @@ -5962,15 +6917,21 @@ } ], "traits": { - "smithy.api#documentation": "Recovers a deleted version of an Amazon WorkDocs document.
", + "smithy.api#documentation": "Searches metadata and the content of folders, documents, document versions, and comments.
", "smithy.api#http": { "method": "POST", - "uri": "/api/v1/documentVersions/restore/{DocumentId}", - "code": 204 + "uri": "/api/v1/search", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "Marker", + "outputToken": "Marker", + "items": "Items", + "pageSize": "Limit" } } }, - "com.amazonaws.workdocs#RestoreDocumentVersionsRequest": { + "com.amazonaws.workdocs#SearchResourcesRequest": { "type": "structure", "members": { "AuthenticationToken": { @@ -5980,84 +6941,118 @@ "smithy.api#httpHeader": "Authentication" } }, - "DocumentId": { - "target": "com.amazonaws.workdocs#ResourceIdType", + "QueryText": { + "target": "com.amazonaws.workdocs#SearchQueryType", "traits": { - "smithy.api#documentation": "The ID of the document.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} + "smithy.api#documentation": "The String to search for. Searches across different text fields based on request parameters. Use double quotes around the query string for exact phrase matches.
" } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.workdocs#RolePermissionType": { - "type": "enum", - "members": { - "DIRECT": { - "target": "smithy.api#Unit", + }, + "QueryScopes": { + "target": "com.amazonaws.workdocs#SearchQueryScopeTypeList", "traits": { - "smithy.api#enumValue": "DIRECT" + "smithy.api#documentation": "Filter based on the text field type. A Folder has only a name and no content. A Comment has only content and no name. A Document or Document Version has a name and content
" } }, - "INHERITED": { - "target": "smithy.api#Unit", + "OrganizationId": { + "target": "com.amazonaws.workdocs#IdType", "traits": { - "smithy.api#enumValue": "INHERITED" + "smithy.api#documentation": "Filters based on the resource owner OrgId. This is a mandatory parameter when using Admin SigV4 credentials.
" } - } - } - }, - "com.amazonaws.workdocs#RoleType": { - "type": "enum", - "members": { - "VIEWER": { - "target": "smithy.api#Unit", + }, + "AdditionalResponseFields": { + "target": "com.amazonaws.workdocs#AdditionalResponseFieldsList", "traits": { - "smithy.api#enumValue": "VIEWER" + "smithy.api#documentation": "A list of attributes to include in the response. Used to request fields that are not normally\n returned in a standard response.
" } }, - "CONTRIBUTOR": { - "target": "smithy.api#Unit", + "Filters": { + "target": "com.amazonaws.workdocs#Filters", "traits": { - "smithy.api#enumValue": "CONTRIBUTOR" + "smithy.api#documentation": "Filters results based on entity metadata.
" } }, - "OWNER": { - "target": "smithy.api#Unit", + "OrderBy": { + "target": "com.amazonaws.workdocs#SearchResultSortList", "traits": { - "smithy.api#enumValue": "OWNER" + "smithy.api#documentation": "Order by results in one or more categories.
" } }, - "COOWNER": { - "target": "smithy.api#Unit", + "Limit": { + "target": "com.amazonaws.workdocs#SearchResultsLimitType", "traits": { - "smithy.api#enumValue": "COOWNER" + "smithy.api#documentation": "Max results count per page.
" + } + }, + "Marker": { + "target": "com.amazonaws.workdocs#NextMarkerType", + "traits": { + "smithy.api#documentation": "The marker for the next set of results.
" } } + }, + "traits": { + "smithy.api#input": {} } }, - "com.amazonaws.workdocs#SearchMarkerType": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 12288 + "com.amazonaws.workdocs#SearchResourcesResponse": { + "type": "structure", + "members": { + "Items": { + "target": "com.amazonaws.workdocs#ResponseItemsList", + "traits": { + "smithy.api#documentation": "List of Documents, Folders, Comments, and Document Versions matching the query.
" + } }, - "smithy.api#pattern": "^[\\u0000-\\u00FF]+$" + "Marker": { + "target": "com.amazonaws.workdocs#NextMarkerType", + "traits": { + "smithy.api#documentation": "The marker to use when requesting the next set of results. If there are no additional results, the string is empty.
" + } + } + }, + "traits": { + "smithy.api#output": {} } }, - "com.amazonaws.workdocs#SearchQueryType": { - "type": "string", + "com.amazonaws.workdocs#SearchResultSortList": { + "type": "list", + "member": { + "target": "com.amazonaws.workdocs#SearchSortResult" + }, "traits": { "smithy.api#length": { + "min": 0, + "max": 1 + } + } + }, + "com.amazonaws.workdocs#SearchResultsLimitType": { + "type": "integer", + "traits": { + "smithy.api#range": { "min": 1, - "max": 512 + "max": 100 + } + } + }, + "com.amazonaws.workdocs#SearchSortResult": { + "type": "structure", + "members": { + "Field": { + "target": "com.amazonaws.workdocs#OrderByFieldType", + "traits": { + "smithy.api#documentation": "Sort search results based on this field name.
" + } }, - "smithy.api#pattern": "^[\\u0020-\\uFFFF]+$", - "smithy.api#sensitive": {} + "Order": { + "target": "com.amazonaws.workdocs#SortOrder", + "traits": { + "smithy.api#documentation": "Sort direction.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The result of the sort operation.
" } }, "com.amazonaws.workdocs#ServiceUnavailableException": { @@ -6209,6 +7204,23 @@ "com.amazonaws.workdocs#SizeType": { "type": "long" }, + "com.amazonaws.workdocs#SortOrder": { + "type": "enum", + "members": { + "ASC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASC" + } + }, + "DESC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DESC" + } + } + } + }, "com.amazonaws.workdocs#StorageLimitExceededException": { "type": "structure", "members": { @@ -6347,6 +7359,18 @@ } } }, + "com.amazonaws.workdocs#TextLocaleTypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.workdocs#LanguageCodeType" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1 + } + } + }, "com.amazonaws.workdocs#TimeZoneIdType": { "type": "string", "traits": { @@ -6939,7 +7963,8 @@ "smithy.api#length": { "min": 1, "max": 64 - } + }, + "smithy.api#sensitive": {} } }, "com.amazonaws.workdocs#UserFilterType": { @@ -7133,7 +8158,8 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": "^[\\w\\-+.]+(@[a-zA-Z0-9.\\-]+\\.[a-zA-Z]+)?$" + "smithy.api#pattern": "^[\\w\\-+.]+(@[a-zA-Z0-9.\\-]+\\.[a-zA-Z]+)?$", + "smithy.api#sensitive": {} } } }