@aws-sdk/client-workdocs 3.294.0 → 3.295.0

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 (147) hide show
  1. package/README.md +8 -0
  2. package/dist-cjs/WorkDocs.js +15 -0
  3. package/dist-cjs/commands/AbortDocumentVersionUploadCommand.js +4 -4
  4. package/dist-cjs/commands/ActivateUserCommand.js +4 -4
  5. package/dist-cjs/commands/AddResourcePermissionsCommand.js +4 -4
  6. package/dist-cjs/commands/CreateCommentCommand.js +4 -4
  7. package/dist-cjs/commands/CreateCustomMetadataCommand.js +4 -4
  8. package/dist-cjs/commands/CreateFolderCommand.js +4 -4
  9. package/dist-cjs/commands/CreateLabelsCommand.js +4 -4
  10. package/dist-cjs/commands/CreateNotificationSubscriptionCommand.js +4 -4
  11. package/dist-cjs/commands/CreateUserCommand.js +4 -4
  12. package/dist-cjs/commands/DeactivateUserCommand.js +4 -4
  13. package/dist-cjs/commands/DeleteCommentCommand.js +4 -4
  14. package/dist-cjs/commands/DeleteCustomMetadataCommand.js +4 -4
  15. package/dist-cjs/commands/DeleteDocumentCommand.js +4 -4
  16. package/dist-cjs/commands/DeleteDocumentVersionCommand.js +4 -4
  17. package/dist-cjs/commands/DeleteFolderCommand.js +4 -4
  18. package/dist-cjs/commands/DeleteFolderContentsCommand.js +4 -4
  19. package/dist-cjs/commands/DeleteLabelsCommand.js +4 -4
  20. package/dist-cjs/commands/DeleteNotificationSubscriptionCommand.js +4 -4
  21. package/dist-cjs/commands/DeleteUserCommand.js +4 -4
  22. package/dist-cjs/commands/DescribeActivitiesCommand.js +4 -4
  23. package/dist-cjs/commands/DescribeCommentsCommand.js +4 -4
  24. package/dist-cjs/commands/DescribeDocumentVersionsCommand.js +4 -4
  25. package/dist-cjs/commands/DescribeFolderContentsCommand.js +4 -4
  26. package/dist-cjs/commands/DescribeGroupsCommand.js +4 -4
  27. package/dist-cjs/commands/DescribeNotificationSubscriptionsCommand.js +4 -4
  28. package/dist-cjs/commands/DescribeResourcePermissionsCommand.js +4 -4
  29. package/dist-cjs/commands/DescribeRootFoldersCommand.js +4 -4
  30. package/dist-cjs/commands/DescribeUsersCommand.js +4 -4
  31. package/dist-cjs/commands/GetCurrentUserCommand.js +4 -4
  32. package/dist-cjs/commands/GetDocumentCommand.js +4 -4
  33. package/dist-cjs/commands/GetDocumentPathCommand.js +4 -4
  34. package/dist-cjs/commands/GetDocumentVersionCommand.js +4 -4
  35. package/dist-cjs/commands/GetFolderCommand.js +4 -4
  36. package/dist-cjs/commands/GetFolderPathCommand.js +4 -4
  37. package/dist-cjs/commands/GetResourcesCommand.js +4 -4
  38. package/dist-cjs/commands/InitiateDocumentVersionUploadCommand.js +4 -4
  39. package/dist-cjs/commands/RemoveAllResourcePermissionsCommand.js +4 -4
  40. package/dist-cjs/commands/RemoveResourcePermissionCommand.js +4 -4
  41. package/dist-cjs/commands/RestoreDocumentVersionsCommand.js +4 -4
  42. package/dist-cjs/commands/SearchResourcesCommand.js +46 -0
  43. package/dist-cjs/commands/UpdateDocumentCommand.js +4 -4
  44. package/dist-cjs/commands/UpdateDocumentVersionCommand.js +4 -4
  45. package/dist-cjs/commands/UpdateFolderCommand.js +4 -4
  46. package/dist-cjs/commands/UpdateUserCommand.js +4 -4
  47. package/dist-cjs/commands/index.js +1 -0
  48. package/dist-cjs/endpoint/ruleset.js +3 -3
  49. package/dist-cjs/models/models_0.js +168 -3
  50. package/dist-cjs/pagination/DescribeActivitiesPaginator.js +29 -0
  51. package/dist-cjs/pagination/DescribeCommentsPaginator.js +29 -0
  52. package/dist-cjs/pagination/DescribeGroupsPaginator.js +29 -0
  53. package/dist-cjs/pagination/DescribeNotificationSubscriptionsPaginator.js +29 -0
  54. package/dist-cjs/pagination/DescribeResourcePermissionsPaginator.js +29 -0
  55. package/dist-cjs/pagination/DescribeRootFoldersPaginator.js +29 -0
  56. package/dist-cjs/pagination/SearchResourcesPaginator.js +29 -0
  57. package/dist-cjs/pagination/index.js +7 -0
  58. package/dist-cjs/protocols/Aws_restJson1.js +245 -2
  59. package/dist-es/WorkDocs.js +15 -0
  60. package/dist-es/commands/AbortDocumentVersionUploadCommand.js +4 -4
  61. package/dist-es/commands/ActivateUserCommand.js +4 -4
  62. package/dist-es/commands/AddResourcePermissionsCommand.js +4 -4
  63. package/dist-es/commands/CreateCommentCommand.js +4 -4
  64. package/dist-es/commands/CreateCustomMetadataCommand.js +4 -4
  65. package/dist-es/commands/CreateFolderCommand.js +4 -4
  66. package/dist-es/commands/CreateLabelsCommand.js +4 -4
  67. package/dist-es/commands/CreateNotificationSubscriptionCommand.js +4 -4
  68. package/dist-es/commands/CreateUserCommand.js +4 -4
  69. package/dist-es/commands/DeactivateUserCommand.js +4 -4
  70. package/dist-es/commands/DeleteCommentCommand.js +4 -4
  71. package/dist-es/commands/DeleteCustomMetadataCommand.js +4 -4
  72. package/dist-es/commands/DeleteDocumentCommand.js +4 -4
  73. package/dist-es/commands/DeleteDocumentVersionCommand.js +4 -4
  74. package/dist-es/commands/DeleteFolderCommand.js +4 -4
  75. package/dist-es/commands/DeleteFolderContentsCommand.js +4 -4
  76. package/dist-es/commands/DeleteLabelsCommand.js +4 -4
  77. package/dist-es/commands/DeleteNotificationSubscriptionCommand.js +4 -4
  78. package/dist-es/commands/DeleteUserCommand.js +4 -4
  79. package/dist-es/commands/DescribeActivitiesCommand.js +4 -4
  80. package/dist-es/commands/DescribeCommentsCommand.js +4 -4
  81. package/dist-es/commands/DescribeDocumentVersionsCommand.js +4 -4
  82. package/dist-es/commands/DescribeFolderContentsCommand.js +4 -4
  83. package/dist-es/commands/DescribeGroupsCommand.js +4 -4
  84. package/dist-es/commands/DescribeNotificationSubscriptionsCommand.js +4 -4
  85. package/dist-es/commands/DescribeResourcePermissionsCommand.js +4 -4
  86. package/dist-es/commands/DescribeRootFoldersCommand.js +4 -4
  87. package/dist-es/commands/DescribeUsersCommand.js +4 -4
  88. package/dist-es/commands/GetCurrentUserCommand.js +4 -4
  89. package/dist-es/commands/GetDocumentCommand.js +4 -4
  90. package/dist-es/commands/GetDocumentPathCommand.js +4 -4
  91. package/dist-es/commands/GetDocumentVersionCommand.js +4 -4
  92. package/dist-es/commands/GetFolderCommand.js +4 -4
  93. package/dist-es/commands/GetFolderPathCommand.js +4 -4
  94. package/dist-es/commands/GetResourcesCommand.js +4 -4
  95. package/dist-es/commands/InitiateDocumentVersionUploadCommand.js +4 -4
  96. package/dist-es/commands/RemoveAllResourcePermissionsCommand.js +4 -4
  97. package/dist-es/commands/RemoveResourcePermissionCommand.js +4 -4
  98. package/dist-es/commands/RestoreDocumentVersionsCommand.js +4 -4
  99. package/dist-es/commands/SearchResourcesCommand.js +42 -0
  100. package/dist-es/commands/UpdateDocumentCommand.js +4 -4
  101. package/dist-es/commands/UpdateDocumentVersionCommand.js +4 -4
  102. package/dist-es/commands/UpdateFolderCommand.js +4 -4
  103. package/dist-es/commands/UpdateUserCommand.js +4 -4
  104. package/dist-es/commands/index.js +1 -0
  105. package/dist-es/endpoint/ruleset.js +3 -3
  106. package/dist-es/models/models_0.js +156 -0
  107. package/dist-es/pagination/DescribeActivitiesPaginator.js +25 -0
  108. package/dist-es/pagination/DescribeCommentsPaginator.js +25 -0
  109. package/dist-es/pagination/DescribeGroupsPaginator.js +25 -0
  110. package/dist-es/pagination/DescribeNotificationSubscriptionsPaginator.js +25 -0
  111. package/dist-es/pagination/DescribeResourcePermissionsPaginator.js +25 -0
  112. package/dist-es/pagination/DescribeRootFoldersPaginator.js +25 -0
  113. package/dist-es/pagination/SearchResourcesPaginator.js +25 -0
  114. package/dist-es/pagination/index.js +7 -0
  115. package/dist-es/protocols/Aws_restJson1.js +241 -0
  116. package/dist-types/WorkDocs.d.ts +7 -0
  117. package/dist-types/WorkDocsClient.d.ts +5 -4
  118. package/dist-types/commands/InitiateDocumentVersionUploadCommand.d.ts +3 -0
  119. package/dist-types/commands/SearchResourcesCommand.d.ts +56 -0
  120. package/dist-types/commands/index.d.ts +1 -0
  121. package/dist-types/endpoint/EndpointParameters.d.ts +2 -2
  122. package/dist-types/models/models_0.d.ts +295 -0
  123. package/dist-types/pagination/DescribeActivitiesPaginator.d.ts +4 -0
  124. package/dist-types/pagination/DescribeCommentsPaginator.d.ts +4 -0
  125. package/dist-types/pagination/DescribeGroupsPaginator.d.ts +4 -0
  126. package/dist-types/pagination/DescribeNotificationSubscriptionsPaginator.d.ts +4 -0
  127. package/dist-types/pagination/DescribeResourcePermissionsPaginator.d.ts +4 -0
  128. package/dist-types/pagination/DescribeRootFoldersPaginator.d.ts +4 -0
  129. package/dist-types/pagination/SearchResourcesPaginator.d.ts +4 -0
  130. package/dist-types/pagination/index.d.ts +7 -0
  131. package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
  132. package/dist-types/ts3.4/WorkDocs.d.ts +17 -0
  133. package/dist-types/ts3.4/WorkDocsClient.d.ts +10 -4
  134. package/dist-types/ts3.4/commands/SearchResourcesCommand.d.ts +37 -0
  135. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  136. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +4 -5
  137. package/dist-types/ts3.4/models/models_0.d.ts +156 -0
  138. package/dist-types/ts3.4/pagination/DescribeActivitiesPaginator.d.ts +11 -0
  139. package/dist-types/ts3.4/pagination/DescribeCommentsPaginator.d.ts +11 -0
  140. package/dist-types/ts3.4/pagination/DescribeGroupsPaginator.d.ts +11 -0
  141. package/dist-types/ts3.4/pagination/DescribeNotificationSubscriptionsPaginator.d.ts +11 -0
  142. package/dist-types/ts3.4/pagination/DescribeResourcePermissionsPaginator.d.ts +11 -0
  143. package/dist-types/ts3.4/pagination/DescribeRootFoldersPaginator.d.ts +11 -0
  144. package/dist-types/ts3.4/pagination/SearchResourcesPaginator.d.ts +11 -0
  145. package/dist-types/ts3.4/pagination/index.d.ts +7 -0
  146. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
  147. package/package.json +36 -36
@@ -921,6 +921,38 @@ export const serializeAws_restJson1RestoreDocumentVersionsCommand = async (input
921
921
  body,
922
922
  });
923
923
  };
924
+ export const serializeAws_restJson1SearchResourcesCommand = async (input, context) => {
925
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
926
+ const headers = map({}, isSerializableHeaderValue, {
927
+ "content-type": "application/json",
928
+ authentication: input.AuthenticationToken,
929
+ });
930
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/search";
931
+ let body;
932
+ body = JSON.stringify({
933
+ ...(input.AdditionalResponseFields != null && {
934
+ AdditionalResponseFields: serializeAws_restJson1AdditionalResponseFieldsList(input.AdditionalResponseFields, context),
935
+ }),
936
+ ...(input.Filters != null && { Filters: serializeAws_restJson1Filters(input.Filters, context) }),
937
+ ...(input.Limit != null && { Limit: input.Limit }),
938
+ ...(input.Marker != null && { Marker: input.Marker }),
939
+ ...(input.OrderBy != null && { OrderBy: serializeAws_restJson1SearchResultSortList(input.OrderBy, context) }),
940
+ ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }),
941
+ ...(input.QueryScopes != null && {
942
+ QueryScopes: serializeAws_restJson1SearchQueryScopeTypeList(input.QueryScopes, context),
943
+ }),
944
+ ...(input.QueryText != null && { QueryText: input.QueryText }),
945
+ });
946
+ return new __HttpRequest({
947
+ protocol,
948
+ hostname,
949
+ port,
950
+ method: "POST",
951
+ headers,
952
+ path: resolvedPath,
953
+ body,
954
+ });
955
+ };
924
956
  export const serializeAws_restJson1UpdateDocumentCommand = async (input, context) => {
925
957
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
926
958
  const headers = map({}, isSerializableHeaderValue, {
@@ -2756,6 +2788,9 @@ const deserializeAws_restJson1InitiateDocumentVersionUploadCommandError = async
2756
2788
  case "FailedDependencyException":
2757
2789
  case "com.amazonaws.workdocs#FailedDependencyException":
2758
2790
  throw await deserializeAws_restJson1FailedDependencyExceptionResponse(parsedOutput, context);
2791
+ case "InvalidArgumentException":
2792
+ case "com.amazonaws.workdocs#InvalidArgumentException":
2793
+ throw await deserializeAws_restJson1InvalidArgumentExceptionResponse(parsedOutput, context);
2759
2794
  case "InvalidPasswordException":
2760
2795
  case "com.amazonaws.workdocs#InvalidPasswordException":
2761
2796
  throw await deserializeAws_restJson1InvalidPasswordExceptionResponse(parsedOutput, context);
@@ -2922,6 +2957,51 @@ const deserializeAws_restJson1RestoreDocumentVersionsCommandError = async (outpu
2922
2957
  });
2923
2958
  }
2924
2959
  };
2960
+ export const deserializeAws_restJson1SearchResourcesCommand = async (output, context) => {
2961
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2962
+ return deserializeAws_restJson1SearchResourcesCommandError(output, context);
2963
+ }
2964
+ const contents = map({
2965
+ $metadata: deserializeMetadata(output),
2966
+ });
2967
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2968
+ if (data.Items != null) {
2969
+ contents.Items = deserializeAws_restJson1ResponseItemsList(data.Items, context);
2970
+ }
2971
+ if (data.Marker != null) {
2972
+ contents.Marker = __expectString(data.Marker);
2973
+ }
2974
+ return contents;
2975
+ };
2976
+ const deserializeAws_restJson1SearchResourcesCommandError = async (output, context) => {
2977
+ const parsedOutput = {
2978
+ ...output,
2979
+ body: await parseErrorBody(output.body, context),
2980
+ };
2981
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2982
+ switch (errorCode) {
2983
+ case "InvalidArgumentException":
2984
+ case "com.amazonaws.workdocs#InvalidArgumentException":
2985
+ throw await deserializeAws_restJson1InvalidArgumentExceptionResponse(parsedOutput, context);
2986
+ case "ServiceUnavailableException":
2987
+ case "com.amazonaws.workdocs#ServiceUnavailableException":
2988
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
2989
+ case "UnauthorizedOperationException":
2990
+ case "com.amazonaws.workdocs#UnauthorizedOperationException":
2991
+ throw await deserializeAws_restJson1UnauthorizedOperationExceptionResponse(parsedOutput, context);
2992
+ case "UnauthorizedResourceAccessException":
2993
+ case "com.amazonaws.workdocs#UnauthorizedResourceAccessException":
2994
+ throw await deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse(parsedOutput, context);
2995
+ default:
2996
+ const parsedBody = parsedOutput.body;
2997
+ throwDefaultError({
2998
+ output,
2999
+ parsedBody,
3000
+ exceptionCtor: __BaseException,
3001
+ errorCode,
3002
+ });
3003
+ }
3004
+ };
2925
3005
  export const deserializeAws_restJson1UpdateDocumentCommand = async (output, context) => {
2926
3006
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2927
3007
  return deserializeAws_restJson1UpdateDocumentCommandError(output, context);
@@ -3454,6 +3534,13 @@ const deserializeAws_restJson1UnauthorizedResourceAccessExceptionResponse = asyn
3454
3534
  });
3455
3535
  return __decorateServiceException(exception, parsedOutput.body);
3456
3536
  };
3537
+ const serializeAws_restJson1AdditionalResponseFieldsList = (input, context) => {
3538
+ return input
3539
+ .filter((e) => e != null)
3540
+ .map((entry) => {
3541
+ return entry;
3542
+ });
3543
+ };
3457
3544
  const serializeAws_restJson1CustomMetadataMap = (input, context) => {
3458
3545
  return Object.entries(input).reduce((acc, [key, value]) => {
3459
3546
  if (value === null) {
@@ -3463,12 +3550,129 @@ const serializeAws_restJson1CustomMetadataMap = (input, context) => {
3463
3550
  return acc;
3464
3551
  }, {});
3465
3552
  };
3553
+ const serializeAws_restJson1DateRangeType = (input, context) => {
3554
+ return {
3555
+ ...(input.EndValue != null && { EndValue: Math.round(input.EndValue.getTime() / 1000) }),
3556
+ ...(input.StartValue != null && { StartValue: Math.round(input.StartValue.getTime() / 1000) }),
3557
+ };
3558
+ };
3559
+ const serializeAws_restJson1Filters = (input, context) => {
3560
+ return {
3561
+ ...(input.AncestorIds != null && {
3562
+ AncestorIds: serializeAws_restJson1SearchAncestorIdList(input.AncestorIds, context),
3563
+ }),
3564
+ ...(input.ContentCategories != null && {
3565
+ ContentCategories: serializeAws_restJson1SearchContentCategoryTypeList(input.ContentCategories, context),
3566
+ }),
3567
+ ...(input.CreatedRange != null && {
3568
+ CreatedRange: serializeAws_restJson1DateRangeType(input.CreatedRange, context),
3569
+ }),
3570
+ ...(input.Labels != null && { Labels: serializeAws_restJson1SearchLabelList(input.Labels, context) }),
3571
+ ...(input.ModifiedRange != null && {
3572
+ ModifiedRange: serializeAws_restJson1DateRangeType(input.ModifiedRange, context),
3573
+ }),
3574
+ ...(input.Principals != null && {
3575
+ Principals: serializeAws_restJson1SearchPrincipalTypeList(input.Principals, context),
3576
+ }),
3577
+ ...(input.ResourceTypes != null && {
3578
+ ResourceTypes: serializeAws_restJson1SearchResourceTypeList(input.ResourceTypes, context),
3579
+ }),
3580
+ ...(input.SearchCollectionTypes != null && {
3581
+ SearchCollectionTypes: serializeAws_restJson1SearchCollectionTypeList(input.SearchCollectionTypes, context),
3582
+ }),
3583
+ ...(input.SizeRange != null && { SizeRange: serializeAws_restJson1LongRangeType(input.SizeRange, context) }),
3584
+ ...(input.TextLocales != null && {
3585
+ TextLocales: serializeAws_restJson1TextLocaleTypeList(input.TextLocales, context),
3586
+ }),
3587
+ };
3588
+ };
3589
+ const serializeAws_restJson1LongRangeType = (input, context) => {
3590
+ return {
3591
+ ...(input.EndValue != null && { EndValue: input.EndValue }),
3592
+ ...(input.StartValue != null && { StartValue: input.StartValue }),
3593
+ };
3594
+ };
3466
3595
  const serializeAws_restJson1NotificationOptions = (input, context) => {
3467
3596
  return {
3468
3597
  ...(input.EmailMessage != null && { EmailMessage: input.EmailMessage }),
3469
3598
  ...(input.SendEmail != null && { SendEmail: input.SendEmail }),
3470
3599
  };
3471
3600
  };
3601
+ const serializeAws_restJson1SearchAncestorIdList = (input, context) => {
3602
+ return input
3603
+ .filter((e) => e != null)
3604
+ .map((entry) => {
3605
+ return entry;
3606
+ });
3607
+ };
3608
+ const serializeAws_restJson1SearchCollectionTypeList = (input, context) => {
3609
+ return input
3610
+ .filter((e) => e != null)
3611
+ .map((entry) => {
3612
+ return entry;
3613
+ });
3614
+ };
3615
+ const serializeAws_restJson1SearchContentCategoryTypeList = (input, context) => {
3616
+ return input
3617
+ .filter((e) => e != null)
3618
+ .map((entry) => {
3619
+ return entry;
3620
+ });
3621
+ };
3622
+ const serializeAws_restJson1SearchLabelList = (input, context) => {
3623
+ return input
3624
+ .filter((e) => e != null)
3625
+ .map((entry) => {
3626
+ return entry;
3627
+ });
3628
+ };
3629
+ const serializeAws_restJson1SearchPrincipalRoleList = (input, context) => {
3630
+ return input
3631
+ .filter((e) => e != null)
3632
+ .map((entry) => {
3633
+ return entry;
3634
+ });
3635
+ };
3636
+ const serializeAws_restJson1SearchPrincipalType = (input, context) => {
3637
+ return {
3638
+ ...(input.Id != null && { Id: input.Id }),
3639
+ ...(input.Roles != null && { Roles: serializeAws_restJson1SearchPrincipalRoleList(input.Roles, context) }),
3640
+ };
3641
+ };
3642
+ const serializeAws_restJson1SearchPrincipalTypeList = (input, context) => {
3643
+ return input
3644
+ .filter((e) => e != null)
3645
+ .map((entry) => {
3646
+ return serializeAws_restJson1SearchPrincipalType(entry, context);
3647
+ });
3648
+ };
3649
+ const serializeAws_restJson1SearchQueryScopeTypeList = (input, context) => {
3650
+ return input
3651
+ .filter((e) => e != null)
3652
+ .map((entry) => {
3653
+ return entry;
3654
+ });
3655
+ };
3656
+ const serializeAws_restJson1SearchResourceTypeList = (input, context) => {
3657
+ return input
3658
+ .filter((e) => e != null)
3659
+ .map((entry) => {
3660
+ return entry;
3661
+ });
3662
+ };
3663
+ const serializeAws_restJson1SearchResultSortList = (input, context) => {
3664
+ return input
3665
+ .filter((e) => e != null)
3666
+ .map((entry) => {
3667
+ return serializeAws_restJson1SearchSortResult(entry, context);
3668
+ });
3669
+ };
3670
+ const serializeAws_restJson1SearchSortResult = (input, context) => {
3671
+ return {
3672
+ ...(input.Field != null && { Field: input.Field }),
3673
+ ...(input.Order != null && { Order: input.Order }),
3674
+ };
3675
+ };
3472
3676
  const serializeAws_restJson1SharedLabels = (input, context) => {
3473
3677
  return input
3474
3678
  .filter((e) => e != null)
@@ -3496,6 +3700,13 @@ const serializeAws_restJson1StorageRuleType = (input, context) => {
3496
3700
  ...(input.StorageType != null && { StorageType: input.StorageType }),
3497
3701
  };
3498
3702
  };
3703
+ const serializeAws_restJson1TextLocaleTypeList = (input, context) => {
3704
+ return input
3705
+ .filter((e) => e != null)
3706
+ .map((entry) => {
3707
+ return entry;
3708
+ });
3709
+ };
3499
3710
  const deserializeAws_restJson1Activity = (output, context) => {
3500
3711
  return {
3501
3712
  CommentMetadata: output.CommentMetadata != null
@@ -3546,6 +3757,7 @@ const deserializeAws_restJson1CommentMetadata = (output, context) => {
3546
3757
  CommentId: __expectString(output.CommentId),
3547
3758
  CommentStatus: __expectString(output.CommentStatus),
3548
3759
  Contributor: output.Contributor != null ? deserializeAws_restJson1User(output.Contributor, context) : undefined,
3760
+ ContributorId: __expectString(output.ContributorId),
3549
3761
  CreatedTimestamp: output.CreatedTimestamp != null
3550
3762
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp)))
3551
3763
  : undefined,
@@ -3789,6 +4001,35 @@ const deserializeAws_restJson1ResourcePathComponentList = (output, context) => {
3789
4001
  });
3790
4002
  return retVal;
3791
4003
  };
4004
+ const deserializeAws_restJson1ResponseItem = (output, context) => {
4005
+ return {
4006
+ CommentMetadata: output.CommentMetadata != null
4007
+ ? deserializeAws_restJson1CommentMetadata(output.CommentMetadata, context)
4008
+ : undefined,
4009
+ DocumentMetadata: output.DocumentMetadata != null
4010
+ ? deserializeAws_restJson1DocumentMetadata(output.DocumentMetadata, context)
4011
+ : undefined,
4012
+ DocumentVersionMetadata: output.DocumentVersionMetadata != null
4013
+ ? deserializeAws_restJson1DocumentVersionMetadata(output.DocumentVersionMetadata, context)
4014
+ : undefined,
4015
+ FolderMetadata: output.FolderMetadata != null
4016
+ ? deserializeAws_restJson1FolderMetadata(output.FolderMetadata, context)
4017
+ : undefined,
4018
+ ResourceType: __expectString(output.ResourceType),
4019
+ WebUrl: __expectString(output.WebUrl),
4020
+ };
4021
+ };
4022
+ const deserializeAws_restJson1ResponseItemsList = (output, context) => {
4023
+ const retVal = (output || [])
4024
+ .filter((e) => e != null)
4025
+ .map((entry) => {
4026
+ if (entry === null) {
4027
+ return null;
4028
+ }
4029
+ return deserializeAws_restJson1ResponseItem(entry, context);
4030
+ });
4031
+ return retVal;
4032
+ };
3792
4033
  const deserializeAws_restJson1SharedLabels = (output, context) => {
3793
4034
  const retVal = (output || [])
3794
4035
  .filter((e) => e != null)
@@ -38,6 +38,7 @@ import { InitiateDocumentVersionUploadCommandInput, InitiateDocumentVersionUploa
38
38
  import { RemoveAllResourcePermissionsCommandInput, RemoveAllResourcePermissionsCommandOutput } from "./commands/RemoveAllResourcePermissionsCommand";
39
39
  import { RemoveResourcePermissionCommandInput, RemoveResourcePermissionCommandOutput } from "./commands/RemoveResourcePermissionCommand";
40
40
  import { RestoreDocumentVersionsCommandInput, RestoreDocumentVersionsCommandOutput } from "./commands/RestoreDocumentVersionsCommand";
41
+ import { SearchResourcesCommandInput, SearchResourcesCommandOutput } from "./commands/SearchResourcesCommand";
41
42
  import { UpdateDocumentCommandInput, UpdateDocumentCommandOutput } from "./commands/UpdateDocumentCommand";
42
43
  import { UpdateDocumentVersionCommandInput, UpdateDocumentVersionCommandOutput } from "./commands/UpdateDocumentVersionCommand";
43
44
  import { UpdateFolderCommandInput, UpdateFolderCommandOutput } from "./commands/UpdateFolderCommand";
@@ -397,6 +398,12 @@ export declare class WorkDocs extends WorkDocsClient {
397
398
  restoreDocumentVersions(args: RestoreDocumentVersionsCommandInput, options?: __HttpHandlerOptions): Promise<RestoreDocumentVersionsCommandOutput>;
398
399
  restoreDocumentVersions(args: RestoreDocumentVersionsCommandInput, cb: (err: any, data?: RestoreDocumentVersionsCommandOutput) => void): void;
399
400
  restoreDocumentVersions(args: RestoreDocumentVersionsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RestoreDocumentVersionsCommandOutput) => void): void;
401
+ /**
402
+ * <p>Searches metadata and the content of folders, documents, document versions, and comments.</p>
403
+ */
404
+ searchResources(args: SearchResourcesCommandInput, options?: __HttpHandlerOptions): Promise<SearchResourcesCommandOutput>;
405
+ searchResources(args: SearchResourcesCommandInput, cb: (err: any, data?: SearchResourcesCommandOutput) => void): void;
406
+ searchResources(args: SearchResourcesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: SearchResourcesCommandOutput) => void): void;
400
407
  /**
401
408
  * <p>Updates the specified attributes of a document. The user must have access to both
402
409
  * the document and its parent folder, if applicable.</p>
@@ -46,13 +46,14 @@ import { InitiateDocumentVersionUploadCommandInput, InitiateDocumentVersionUploa
46
46
  import { RemoveAllResourcePermissionsCommandInput, RemoveAllResourcePermissionsCommandOutput } from "./commands/RemoveAllResourcePermissionsCommand";
47
47
  import { RemoveResourcePermissionCommandInput, RemoveResourcePermissionCommandOutput } from "./commands/RemoveResourcePermissionCommand";
48
48
  import { RestoreDocumentVersionsCommandInput, RestoreDocumentVersionsCommandOutput } from "./commands/RestoreDocumentVersionsCommand";
49
+ import { SearchResourcesCommandInput, SearchResourcesCommandOutput } from "./commands/SearchResourcesCommand";
49
50
  import { UpdateDocumentCommandInput, UpdateDocumentCommandOutput } from "./commands/UpdateDocumentCommand";
50
51
  import { UpdateDocumentVersionCommandInput, UpdateDocumentVersionCommandOutput } from "./commands/UpdateDocumentVersionCommand";
51
52
  import { UpdateFolderCommandInput, UpdateFolderCommandOutput } from "./commands/UpdateFolderCommand";
52
53
  import { UpdateUserCommandInput, UpdateUserCommandOutput } from "./commands/UpdateUserCommand";
53
54
  import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
54
- export declare type ServiceInputTypes = AbortDocumentVersionUploadCommandInput | ActivateUserCommandInput | AddResourcePermissionsCommandInput | CreateCommentCommandInput | CreateCustomMetadataCommandInput | CreateFolderCommandInput | CreateLabelsCommandInput | CreateNotificationSubscriptionCommandInput | CreateUserCommandInput | DeactivateUserCommandInput | DeleteCommentCommandInput | DeleteCustomMetadataCommandInput | DeleteDocumentCommandInput | DeleteDocumentVersionCommandInput | DeleteFolderCommandInput | DeleteFolderContentsCommandInput | DeleteLabelsCommandInput | DeleteNotificationSubscriptionCommandInput | DeleteUserCommandInput | DescribeActivitiesCommandInput | DescribeCommentsCommandInput | DescribeDocumentVersionsCommandInput | DescribeFolderContentsCommandInput | DescribeGroupsCommandInput | DescribeNotificationSubscriptionsCommandInput | DescribeResourcePermissionsCommandInput | DescribeRootFoldersCommandInput | DescribeUsersCommandInput | GetCurrentUserCommandInput | GetDocumentCommandInput | GetDocumentPathCommandInput | GetDocumentVersionCommandInput | GetFolderCommandInput | GetFolderPathCommandInput | GetResourcesCommandInput | InitiateDocumentVersionUploadCommandInput | RemoveAllResourcePermissionsCommandInput | RemoveResourcePermissionCommandInput | RestoreDocumentVersionsCommandInput | UpdateDocumentCommandInput | UpdateDocumentVersionCommandInput | UpdateFolderCommandInput | UpdateUserCommandInput;
55
- export declare type ServiceOutputTypes = AbortDocumentVersionUploadCommandOutput | ActivateUserCommandOutput | AddResourcePermissionsCommandOutput | CreateCommentCommandOutput | CreateCustomMetadataCommandOutput | CreateFolderCommandOutput | CreateLabelsCommandOutput | CreateNotificationSubscriptionCommandOutput | CreateUserCommandOutput | DeactivateUserCommandOutput | DeleteCommentCommandOutput | DeleteCustomMetadataCommandOutput | DeleteDocumentCommandOutput | DeleteDocumentVersionCommandOutput | DeleteFolderCommandOutput | DeleteFolderContentsCommandOutput | DeleteLabelsCommandOutput | DeleteNotificationSubscriptionCommandOutput | DeleteUserCommandOutput | DescribeActivitiesCommandOutput | DescribeCommentsCommandOutput | DescribeDocumentVersionsCommandOutput | DescribeFolderContentsCommandOutput | DescribeGroupsCommandOutput | DescribeNotificationSubscriptionsCommandOutput | DescribeResourcePermissionsCommandOutput | DescribeRootFoldersCommandOutput | DescribeUsersCommandOutput | GetCurrentUserCommandOutput | GetDocumentCommandOutput | GetDocumentPathCommandOutput | GetDocumentVersionCommandOutput | GetFolderCommandOutput | GetFolderPathCommandOutput | GetResourcesCommandOutput | InitiateDocumentVersionUploadCommandOutput | RemoveAllResourcePermissionsCommandOutput | RemoveResourcePermissionCommandOutput | RestoreDocumentVersionsCommandOutput | UpdateDocumentCommandOutput | UpdateDocumentVersionCommandOutput | UpdateFolderCommandOutput | UpdateUserCommandOutput;
55
+ export type ServiceInputTypes = AbortDocumentVersionUploadCommandInput | ActivateUserCommandInput | AddResourcePermissionsCommandInput | CreateCommentCommandInput | CreateCustomMetadataCommandInput | CreateFolderCommandInput | CreateLabelsCommandInput | CreateNotificationSubscriptionCommandInput | CreateUserCommandInput | DeactivateUserCommandInput | DeleteCommentCommandInput | DeleteCustomMetadataCommandInput | DeleteDocumentCommandInput | DeleteDocumentVersionCommandInput | DeleteFolderCommandInput | DeleteFolderContentsCommandInput | DeleteLabelsCommandInput | DeleteNotificationSubscriptionCommandInput | DeleteUserCommandInput | DescribeActivitiesCommandInput | DescribeCommentsCommandInput | DescribeDocumentVersionsCommandInput | DescribeFolderContentsCommandInput | DescribeGroupsCommandInput | DescribeNotificationSubscriptionsCommandInput | DescribeResourcePermissionsCommandInput | DescribeRootFoldersCommandInput | DescribeUsersCommandInput | GetCurrentUserCommandInput | GetDocumentCommandInput | GetDocumentPathCommandInput | GetDocumentVersionCommandInput | GetFolderCommandInput | GetFolderPathCommandInput | GetResourcesCommandInput | InitiateDocumentVersionUploadCommandInput | RemoveAllResourcePermissionsCommandInput | RemoveResourcePermissionCommandInput | RestoreDocumentVersionsCommandInput | SearchResourcesCommandInput | UpdateDocumentCommandInput | UpdateDocumentVersionCommandInput | UpdateFolderCommandInput | UpdateUserCommandInput;
56
+ export type ServiceOutputTypes = AbortDocumentVersionUploadCommandOutput | ActivateUserCommandOutput | AddResourcePermissionsCommandOutput | CreateCommentCommandOutput | CreateCustomMetadataCommandOutput | CreateFolderCommandOutput | CreateLabelsCommandOutput | CreateNotificationSubscriptionCommandOutput | CreateUserCommandOutput | DeactivateUserCommandOutput | DeleteCommentCommandOutput | DeleteCustomMetadataCommandOutput | DeleteDocumentCommandOutput | DeleteDocumentVersionCommandOutput | DeleteFolderCommandOutput | DeleteFolderContentsCommandOutput | DeleteLabelsCommandOutput | DeleteNotificationSubscriptionCommandOutput | DeleteUserCommandOutput | DescribeActivitiesCommandOutput | DescribeCommentsCommandOutput | DescribeDocumentVersionsCommandOutput | DescribeFolderContentsCommandOutput | DescribeGroupsCommandOutput | DescribeNotificationSubscriptionsCommandOutput | DescribeResourcePermissionsCommandOutput | DescribeRootFoldersCommandOutput | DescribeUsersCommandOutput | GetCurrentUserCommandOutput | GetDocumentCommandOutput | GetDocumentPathCommandOutput | GetDocumentVersionCommandOutput | GetFolderCommandOutput | GetFolderPathCommandOutput | GetResourcesCommandOutput | InitiateDocumentVersionUploadCommandOutput | RemoveAllResourcePermissionsCommandOutput | RemoveResourcePermissionCommandOutput | RestoreDocumentVersionsCommandOutput | SearchResourcesCommandOutput | UpdateDocumentCommandOutput | UpdateDocumentVersionCommandOutput | UpdateFolderCommandOutput | UpdateUserCommandOutput;
56
57
  export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
57
58
  /**
58
59
  * The HTTP handler to use. Fetch in browser and Https in Nodejs.
@@ -153,13 +154,13 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
153
154
  */
154
155
  defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
155
156
  }
156
- declare type WorkDocsClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointInputConfig<EndpointParameters> & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig & ClientInputEndpointParameters;
157
+ type WorkDocsClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointInputConfig<EndpointParameters> & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig & ClientInputEndpointParameters;
157
158
  /**
158
159
  * The configuration interface of WorkDocsClient class constructor that set the region, credentials and other options.
159
160
  */
160
161
  export interface WorkDocsClientConfig extends WorkDocsClientConfigType {
161
162
  }
162
- declare type WorkDocsClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> & RetryResolvedConfig & HostHeaderResolvedConfig & AwsAuthResolvedConfig & UserAgentResolvedConfig & ClientResolvedEndpointParameters;
163
+ type WorkDocsClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> & RetryResolvedConfig & HostHeaderResolvedConfig & AwsAuthResolvedConfig & UserAgentResolvedConfig & ClientResolvedEndpointParameters;
163
164
  /**
164
165
  * The resolved configuration interface of WorkDocsClient class. This is resolved and normalized from the {@link WorkDocsClientConfig | constructor configuration interface}.
165
166
  */
@@ -49,6 +49,9 @@ export interface InitiateDocumentVersionUploadCommandOutput extends InitiateDocu
49
49
  * under the control of the organization is failing, such as a connected Active
50
50
  * Directory.</p>
51
51
  *
52
+ * @throws {@link InvalidArgumentException} (client fault)
53
+ * <p>The pagination marker or limit fields are not valid.</p>
54
+ *
52
55
  * @throws {@link InvalidPasswordException} (client fault)
53
56
  * <p>The password is invalid.</p>
54
57
  *
@@ -0,0 +1,56 @@
1
+ import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
+ import { Command as $Command } from "@aws-sdk/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
+ import { SearchResourcesRequest, SearchResourcesResponse } from "../models/models_0";
5
+ import { ServiceInputTypes, ServiceOutputTypes, WorkDocsClientResolvedConfig } from "../WorkDocsClient";
6
+ /**
7
+ * The input for {@link SearchResourcesCommand}.
8
+ */
9
+ export interface SearchResourcesCommandInput extends SearchResourcesRequest {
10
+ }
11
+ /**
12
+ * The output of {@link SearchResourcesCommand}.
13
+ */
14
+ export interface SearchResourcesCommandOutput extends SearchResourcesResponse, __MetadataBearer {
15
+ }
16
+ /**
17
+ * <p>Searches metadata and the content of folders, documents, document versions, and comments.</p>
18
+ * @example
19
+ * Use a bare-bones client and the command you need to make an API call.
20
+ * ```javascript
21
+ * import { WorkDocsClient, SearchResourcesCommand } from "@aws-sdk/client-workdocs"; // ES Modules import
22
+ * // const { WorkDocsClient, SearchResourcesCommand } = require("@aws-sdk/client-workdocs"); // CommonJS import
23
+ * const client = new WorkDocsClient(config);
24
+ * const command = new SearchResourcesCommand(input);
25
+ * const response = await client.send(command);
26
+ * ```
27
+ *
28
+ * @see {@link SearchResourcesCommandInput} for command's `input` shape.
29
+ * @see {@link SearchResourcesCommandOutput} for command's `response` shape.
30
+ * @see {@link WorkDocsClientResolvedConfig | config} for WorkDocsClient's `config` shape.
31
+ *
32
+ * @throws {@link InvalidArgumentException} (client fault)
33
+ * <p>The pagination marker or limit fields are not valid.</p>
34
+ *
35
+ * @throws {@link ServiceUnavailableException} (server fault)
36
+ * <p>One or more of the dependencies is unavailable.</p>
37
+ *
38
+ * @throws {@link UnauthorizedOperationException} (client fault)
39
+ * <p>The operation is not permitted.</p>
40
+ *
41
+ * @throws {@link UnauthorizedResourceAccessException} (client fault)
42
+ * <p>The caller does not have access to perform the action on the resource.</p>
43
+ *
44
+ *
45
+ */
46
+ export declare class SearchResourcesCommand extends $Command<SearchResourcesCommandInput, SearchResourcesCommandOutput, WorkDocsClientResolvedConfig> {
47
+ readonly input: SearchResourcesCommandInput;
48
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
49
+ constructor(input: SearchResourcesCommandInput);
50
+ /**
51
+ * @internal
52
+ */
53
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: WorkDocsClientResolvedConfig, options?: __HttpHandlerOptions): Handler<SearchResourcesCommandInput, SearchResourcesCommandOutput>;
54
+ private serialize;
55
+ private deserialize;
56
+ }
@@ -37,6 +37,7 @@ export * from "./InitiateDocumentVersionUploadCommand";
37
37
  export * from "./RemoveAllResourcePermissionsCommand";
38
38
  export * from "./RemoveResourcePermissionCommand";
39
39
  export * from "./RestoreDocumentVersionsCommand";
40
+ export * from "./SearchResourcesCommand";
40
41
  export * from "./UpdateDocumentCommand";
41
42
  export * from "./UpdateDocumentVersionCommand";
42
43
  export * from "./UpdateFolderCommand";
@@ -5,14 +5,14 @@ export interface ClientInputEndpointParameters {
5
5
  useFipsEndpoint?: boolean | Provider<boolean>;
6
6
  endpoint?: string | Provider<string> | Endpoint | Provider<Endpoint> | EndpointV2 | Provider<EndpointV2>;
7
7
  }
8
- export declare type ClientResolvedEndpointParameters = ClientInputEndpointParameters & {
8
+ export type ClientResolvedEndpointParameters = ClientInputEndpointParameters & {
9
9
  defaultSigningName: string;
10
10
  };
11
11
  export declare const resolveClientEndpointParameters: <T>(options: T & ClientInputEndpointParameters) => T & ClientInputEndpointParameters & {
12
12
  defaultSigningName: string;
13
13
  };
14
14
  export interface EndpointParameters extends __EndpointParameters {
15
- Region: string;
15
+ Region?: string;
16
16
  UseDualStack?: boolean;
17
17
  UseFIPS?: boolean;
18
18
  Endpoint?: string;