Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mfriesen committed Oct 5, 2023
1 parent 4bcb068 commit 452b0cb
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 10 deletions.
8 changes: 7 additions & 1 deletion docs/openapi/openapi-iam.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4188,9 +4188,15 @@
contentLength:
type: integer
description: Document size
versionId:
version:
type: string
description: Document version
versionKey:
type: string
description: Document Version Identifier
s3version:
type: string
description: Document storage version
belongsToDocumentId:
type: string
description: Parent Document Identifier
Expand Down
8 changes: 7 additions & 1 deletion docs/openapi/openapi-jwt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4188,9 +4188,15 @@
contentLength:
type: integer
description: Document size
versionId:
version:
type: string
description: Document version
versionKey:
type: string
description: Document Version Identifier
s3version:
type: string
description: Document storage version
belongsToDocumentId:
type: string
description: Parent Document Identifier
Expand Down
10 changes: 8 additions & 2 deletions docs/openapi/openapi-key.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4188,9 +4188,15 @@
contentLength:
type: integer
description: Document size
versionId:
version:
type: string
description: Document version
versionKey:
type: string
description: Document Version Identifier
s3version:
type: string
description: Document storage version
belongsToDocumentId:
type: string
description: Parent Document Identifier
Expand Down Expand Up @@ -5215,7 +5221,7 @@
x-amazon-apigateway-authorizer:
identitySource: $request.header.Authorization
authorizerUri:
Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ApiKeyAuthorizer.Arn}/invocations
Fn::Sub: arn:${Partition}:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ApiKeyAuthorizer.Arn}/invocations
authorizerResultTtlInSeconds: 300
authorizerPayloadFormatVersion: "2.0"
enableSimpleResponses: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,14 @@ public static Map<String, Object> toMap(final HttpResponse<String> response) thr
* @param client {@link ApiClient}
* @param siteId {@link String}
* @param documentId {@link String}
* @param actionStatus {@link String}
* @return {@link GetDocumentActionsResponse}
* @throws ApiException ApiException
* @throws InterruptedException InterruptedException
*/
public static GetDocumentActionsResponse waitForActionsComplete(final ApiClient client,
final String siteId, final String documentId) throws ApiException, InterruptedException {
public static GetDocumentActionsResponse waitForActions(final ApiClient client,
final String siteId, final String documentId, final String actionStatus)
throws ApiException, InterruptedException {

GetDocumentActionsResponse response = null;
DocumentActionsApi api = new DocumentActionsApi(client);
Expand All @@ -256,7 +258,7 @@ public static GetDocumentActionsResponse waitForActionsComplete(final ApiClient
try {
response = api.getDocumentActions(documentId, siteId, null);

o = response.getActions().stream().filter(a -> a.getStatus().equalsIgnoreCase("COMPLETE"))
o = response.getActions().stream().filter(a -> a.getStatus().equalsIgnoreCase(actionStatus))
.findAny();
} catch (ApiException e) {
// ignore
Expand All @@ -270,6 +272,21 @@ public static GetDocumentActionsResponse waitForActionsComplete(final ApiClient
return response;
}

/**
* Wait for Actions to Complete.
*
* @param client {@link ApiClient}
* @param siteId {@link String}
* @param documentId {@link String}
* @return {@link GetDocumentActionsResponse}
* @throws ApiException ApiException
* @throws InterruptedException InterruptedException
*/
public static GetDocumentActionsResponse waitForActionsComplete(final ApiClient client,
final String siteId, final String documentId) throws ApiException, InterruptedException {
return waitForActions(client, siteId, documentId, "COMPLETE");
}

/**
* Wait for Actions to Complete.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4190,9 +4190,15 @@ Resources:
contentLength:
type: "integer"
description: "Document size"
versionId:
version:
type: "string"
description: "Document version"
versionKey:
type: "string"
description: "Document Version Identifier"
s3version:
type: "string"
description: "Document storage version"
belongsToDocumentId:
type: "string"
description: "Parent Document Identifier"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4190,9 +4190,15 @@ Resources:
contentLength:
type: "integer"
description: "Document size"
versionId:
version:
type: "string"
description: "Document version"
versionKey:
type: "string"
description: "Document Version Identifier"
s3version:
type: "string"
description: "Document storage version"
belongsToDocumentId:
type: "string"
description: "Parent Document Identifier"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4190,9 +4190,15 @@ Resources:
contentLength:
type: "integer"
description: "Document size"
versionId:
version:
type: "string"
description: "Document version"
versionKey:
type: "string"
description: "Document Version Identifier"
s3version:
type: "string"
description: "Document storage version"
belongsToDocumentId:
type: "string"
description: "Parent Document Identifier"
Expand Down

0 comments on commit 452b0cb

Please sign in to comment.