From d6fa87dd89edf8d4bcb717acc9e2863bb78d94bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20W=C3=B3jcik?= Date: Wed, 3 Jun 2026 14:37:58 +0200 Subject: [PATCH 1/6] Openapi files with new error catalog --- openapi-raw.yaml | 285 +++++++++++++++++++++++++++++++++++++++++++++++ openapi-sdk.yaml | 285 +++++++++++++++++++++++++++++++++++++++++++++++ openapi.yaml | 285 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 855 insertions(+) diff --git a/openapi-raw.yaml b/openapi-raw.yaml index 132929285..ed2a2ab39 100644 --- a/openapi-raw.yaml +++ b/openapi-raw.yaml @@ -929,6 +929,44 @@ paths: seo: title: '_t__ApiAppList::SEO::TITLE' description: '_t__ApiAppList::SEO::DESCRIPTION' + /notification/retry: + post: + tags: + - 'Callbacks and Events' + summary: 'Resend an API notification asynchronously.' + description: 'Queues an API notification by event_type and id. A new notification event is generated from current object state.' + operationId: apiNotificationRetry + responses: + '202': + description: 'Resend queued' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - request_signature + - signature_request_access '/bulk_send_job/{bulk_send_job_id}': get: tags: @@ -11481,6 +11519,68 @@ components: error_name: description: '_t__ErrorResponseError::ERROR_NAME' type: string + enum: + - bad_request + - unauthorized + - payment_required + - forbidden + - not_found + - method_not_supported + - conflict + - deleted + - unprocessable_entity + - exceeded_rate + - max_faxes + - unavailable + - maintenance + - invalid_recipient + - invalid_reminder + - team_invite_failed + - signature_request_cancel_failed + - signature_request_remove_failed + - signature_request_expired + - unknown + x-fern-enum: + bad_request: + description: 'The request contained invalid or malformed parameters.' + unauthorized: + description: 'The credentials supplied are missing or invalid.' + payment_required: + description: 'The account must be credited or upgraded to perform this action.' + forbidden: + description: 'The action is not allowed for these credentials or in the current context.' + not_found: + description: 'Nothing matches the requested resource.' + method_not_supported: + description: 'The HTTP method is not supported for this endpoint.' + conflict: + description: 'The request was well-formed but conflicts with the current state.' + deleted: + description: 'The request was cancelled or deleted.' + unprocessable_entity: + description: 'The request was understood but the target entity cannot be processed.' + exceeded_rate: + description: "Your account's API request rate limit has been exceeded." + max_faxes: + description: 'Too many fax transmissions are currently pending or transmitting.' + unavailable: + description: 'The service is temporarily unavailable.' + maintenance: + description: 'The request could not be completed because the site is under maintenance.' + invalid_recipient: + description: 'The recipient (fax number or email address) is invalid.' + invalid_reminder: + description: 'The signature request reminder was invalid.' + team_invite_failed: + description: 'The team invitation could not be completed.' + signature_request_cancel_failed: + description: 'The signature request could not be cancelled.' + signature_request_remove_failed: + description: 'Access to the signature request could not be removed.' + signature_request_expired: + description: 'The signature request has expired.' + unknown: + description: 'An unexpected error occurred.' type: object FaxResponse: required: @@ -13928,3 +14028,188 @@ x-webhooks: responses: '200': $ref: '#/components/responses/EventCallbackResponse' +x-error-codes: + bad_request: + http_status: 400 + summary: 'The request contained invalid or malformed parameters.' + cause: 'A parameter failed validation, or the request body was malformed.' + remediation: 'Inspect error_msg and error_path, correct the offending parameter, and resend.' + retryable: 'no' + category: validation + unauthorized: + http_status: 401 + summary: 'The credentials supplied are missing or invalid.' + cause: 'Missing, malformed, or invalid API key or OAuth access token.' + remediation: 'Verify the API key or OAuth token and the Authorization header, then retry.' + retryable: 'no' + category: auth + payment_required: + http_status: 402 + summary: 'The account must be credited or upgraded to perform this action.' + cause: 'The action requires a paid plan, additional quota, or API credits.' + remediation: 'Upgrade the plan or add the required credits/quota, then retry.' + retryable: 'no' + category: plan + forbidden: + http_status: 403 + summary: 'The action is not allowed for these credentials or in the current context.' + cause: 'The authenticated account lacks access to the resource or operation.' + remediation: 'Confirm the account has access to the resource and the required permissions.' + retryable: 'no' + category: auth + not_found: + http_status: 404 + summary: 'Nothing matches the requested resource.' + cause: 'The resource id does not exist or is not visible to this account.' + remediation: 'Verify the id and that the resource belongs to the authenticated account.' + retryable: 'no' + category: not_found + method_not_supported: + http_status: 405 + summary: 'The HTTP method is not supported for this endpoint.' + cause: 'The request used a verb the endpoint does not accept.' + remediation: 'Use the HTTP method documented for the endpoint.' + retryable: 'no' + category: validation + conflict: + http_status: 409 + summary: 'The request was well-formed but conflicts with the current state.' + cause: 'The target resource is in a state incompatible with the request.' + remediation: 'Re-read the resource state, resolve the conflict, then retry.' + retryable: conditional + category: conflict + deleted: + http_status: 410 + summary: 'The request was cancelled or deleted.' + cause: 'The resource has been cancelled or removed and is no longer available.' + remediation: 'Do not retry; the resource is permanently gone.' + retryable: 'no' + category: not_found + unprocessable_entity: + http_status: 422 + summary: 'The request was understood but the target entity cannot be processed.' + cause: 'The resource is still being processed, or it is in an error state.' + remediation: 'If the resource is still processing, wait and retry; if it is in an error state, recreate/resend it instead of retrying.' + retryable: conditional + category: validation + backoff: 'If still processing, retry with exponential backoff; if in an error state, do not retry.' + exceeded_rate: + http_status: 429 + summary: "Your account's API request rate limit has been exceeded." + cause: 'Too many requests were sent within the rate-limit window for this request type.' + remediation: 'Pace requests using the X-RateLimit-* response headers and retry after the window resets.' + retryable: 'yes' + category: rate_limit + backoff: 'Honor X-Ratelimit-Reset (Unix epoch); otherwise exponential backoff with jitter. No Retry-After header is sent.' + max_faxes: + http_status: 429 + summary: 'Too many fax transmissions are currently pending or transmitting.' + cause: 'The account has reached the limit of concurrent in-flight fax transmissions.' + remediation: 'Wait for outstanding transmissions to complete, then retry.' + retryable: 'yes' + category: rate_limit + backoff: 'Retry with exponential backoff once pending transmissions clear.' + unavailable: + http_status: 503 + summary: 'The service is temporarily unavailable.' + cause: 'A downstream dependency or the service itself is temporarily unavailable.' + remediation: 'Retry later with exponential backoff.' + retryable: 'yes' + category: maintenance + backoff: 'Retry later with exponential backoff and jitter.' + maintenance: + http_status: 503 + summary: 'The request could not be completed because the site is under maintenance.' + cause: 'The API is in a scheduled maintenance window.' + remediation: 'Retry once the maintenance window ends.' + retryable: 'yes' + category: maintenance + backoff: 'Retry later with exponential backoff.' + invalid_recipient: + http_status: 400 + summary: 'The recipient (fax number or email address) is invalid.' + cause: 'A recipient value did not pass validation.' + remediation: 'Correct the recipient value and resend.' + retryable: 'no' + category: validation + invalid_reminder: + http_status: 400 + summary: 'The signature request reminder was invalid.' + cause: 'A reminder was attempted against an ineligible request (e.g. embedded, closed, or expired).' + remediation: 'Only send reminders for eligible (non-embedded, open) signature requests.' + retryable: 'no' + category: validation + team_invite_failed: + http_status: 403 + summary: 'The team invitation could not be completed.' + cause: 'The invitee already belongs to a team, or the invite is otherwise not permitted.' + remediation: 'Confirm the invitee is not already on a team before inviting.' + retryable: 'no' + category: validation + signature_request_cancel_failed: + http_status: 400 + summary: 'The signature request could not be cancelled.' + cause: 'The caller is not the requester, or the request is already fully executed/closed.' + remediation: 'Only the requester can cancel, and only before the request is fully executed.' + retryable: 'no' + category: conflict + signature_request_remove_failed: + http_status: 400 + summary: 'Access to the signature request could not be removed.' + cause: 'The caller is not a party to the request, or it is not yet fully executed.' + remediation: 'Access can only be removed once the request is fully executed; use /signature_request/cancel for incomplete requests.' + retryable: 'no' + category: conflict + signature_request_expired: + http_status: + - 400 + - 403 + summary: 'The signature request has expired.' + cause: 'The operation targets a request whose expiration has passed. Most endpoints return 400; final-copy/download endpoints return 403.' + remediation: 'The request can no longer be acted upon; create a new signature request.' + retryable: 'no' + category: conflict + unknown: + http_status: 500 + summary: 'An unexpected error occurred.' + cause: 'An unhandled server-side error, or a status code without a more specific error_name.' + remediation: 'Retry transient failures; if it persists, contact support with the request details.' + retryable: conditional + category: server + backoff: 'For transient 5xx, retry with exponential backoff; otherwise do not retry.' +x-error-events: + signature_request_invalid: + event_type: signature_request_invalid + delivery: webhook + summary: 'Asynchronous error while processing a signature request.' + cause: 'A signature request could not be processed (e.g. invalid tags, fields, or merge data).' + remediation: 'Inspect event.event_metadata.event_message in the callback, correct the request, and resend.' + retryable: conditional + template_error: + event_type: template_error + delivery: webhook + summary: 'Asynchronous error while creating a template.' + cause: 'Template file processing failed (e.g. unsupported or corrupt file).' + remediation: 'Recreate the template with a valid file; check status in the API dashboard.' + retryable: conditional + file_error: + event_type: file_error + delivery: webhook + summary: 'Asynchronous error while processing an uploaded file.' + cause: 'A file attached to a request could not be processed.' + remediation: 'Resend the request with a supported, non-corrupt file.' + retryable: conditional + sign_url_invalid: + event_type: sign_url_invalid + delivery: webhook + summary: 'An embedded signing URL has expired or become invalid.' + cause: 'The embedded sign_url is no longer valid (e.g. expired).' + remediation: 'Generate a fresh embedded sign_url via the embedded sign URL endpoint.' + retryable: 'yes' + unknown_error: + event_type: unknown_error + delivery: webhook + summary: 'An unspecified asynchronous processing error occurred.' + cause: 'An unexpected error occurred while processing the request asynchronously.' + remediation: 'Check the request status in the API dashboard; retry or contact support if it persists.' + retryable: conditional diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index ed174d3ca..5be68e43f 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -935,6 +935,44 @@ paths: seo: title: 'List API Apps | API Documentation | Dropbox Sign for Developers' description: 'The Dropbox Sign API allows you to build with a wide range of tools. To find out how to return a list of API Apps that are accessible by you, click here.' + /notification/retry: + post: + tags: + - 'Callbacks and Events' + summary: 'Resend an API notification asynchronously.' + description: 'Queues an API notification by event_type and id. A new notification event is generated from current object state.' + operationId: apiNotificationRetry + responses: + '202': + description: 'Resend queued' + '4XX': + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - request_signature + - signature_request_access '/bulk_send_job/{bulk_send_job_id}': get: tags: @@ -11945,6 +11983,68 @@ components: error_name: description: 'Name of the error.' type: string + enum: + - bad_request + - unauthorized + - payment_required + - forbidden + - not_found + - method_not_supported + - conflict + - deleted + - unprocessable_entity + - exceeded_rate + - max_faxes + - unavailable + - maintenance + - invalid_recipient + - invalid_reminder + - team_invite_failed + - signature_request_cancel_failed + - signature_request_remove_failed + - signature_request_expired + - unknown + x-fern-enum: + bad_request: + description: 'The request contained invalid or malformed parameters.' + unauthorized: + description: 'The credentials supplied are missing or invalid.' + payment_required: + description: 'The account must be credited or upgraded to perform this action.' + forbidden: + description: 'The action is not allowed for these credentials or in the current context.' + not_found: + description: 'Nothing matches the requested resource.' + method_not_supported: + description: 'The HTTP method is not supported for this endpoint.' + conflict: + description: 'The request was well-formed but conflicts with the current state.' + deleted: + description: 'The request was cancelled or deleted.' + unprocessable_entity: + description: 'The request was understood but the target entity cannot be processed.' + exceeded_rate: + description: 'Your account''s API request rate limit has been exceeded.' + max_faxes: + description: 'Too many fax transmissions are currently pending or transmitting.' + unavailable: + description: 'The service is temporarily unavailable.' + maintenance: + description: 'The request could not be completed because the site is under maintenance.' + invalid_recipient: + description: 'The recipient (fax number or email address) is invalid.' + invalid_reminder: + description: 'The signature request reminder was invalid.' + team_invite_failed: + description: 'The team invitation could not be completed.' + signature_request_cancel_failed: + description: 'The signature request could not be cancelled.' + signature_request_remove_failed: + description: 'Access to the signature request could not be removed.' + signature_request_expired: + description: 'The signature request has expired.' + unknown: + description: 'An unexpected error occurred.' type: object FaxResponse: required: @@ -14507,3 +14607,188 @@ x-webhooks: responses: 200: $ref: '#/components/responses/EventCallbackResponse' +x-error-codes: + bad_request: + http_status: 400 + summary: 'The request contained invalid or malformed parameters.' + cause: 'A parameter failed validation, or the request body was malformed.' + remediation: 'Inspect error_msg and error_path, correct the offending parameter, and resend.' + retryable: 'no' + category: validation + unauthorized: + http_status: 401 + summary: 'The credentials supplied are missing or invalid.' + cause: 'Missing, malformed, or invalid API key or OAuth access token.' + remediation: 'Verify the API key or OAuth token and the Authorization header, then retry.' + retryable: 'no' + category: auth + payment_required: + http_status: 402 + summary: 'The account must be credited or upgraded to perform this action.' + cause: 'The action requires a paid plan, additional quota, or API credits.' + remediation: 'Upgrade the plan or add the required credits/quota, then retry.' + retryable: 'no' + category: plan + forbidden: + http_status: 403 + summary: 'The action is not allowed for these credentials or in the current context.' + cause: 'The authenticated account lacks access to the resource or operation.' + remediation: 'Confirm the account has access to the resource and the required permissions.' + retryable: 'no' + category: auth + not_found: + http_status: 404 + summary: 'Nothing matches the requested resource.' + cause: 'The resource id does not exist or is not visible to this account.' + remediation: 'Verify the id and that the resource belongs to the authenticated account.' + retryable: 'no' + category: not_found + method_not_supported: + http_status: 405 + summary: 'The HTTP method is not supported for this endpoint.' + cause: 'The request used a verb the endpoint does not accept.' + remediation: 'Use the HTTP method documented for the endpoint.' + retryable: 'no' + category: validation + conflict: + http_status: 409 + summary: 'The request was well-formed but conflicts with the current state.' + cause: 'The target resource is in a state incompatible with the request.' + remediation: 'Re-read the resource state, resolve the conflict, then retry.' + retryable: conditional + category: conflict + deleted: + http_status: 410 + summary: 'The request was cancelled or deleted.' + cause: 'The resource has been cancelled or removed and is no longer available.' + remediation: 'Do not retry; the resource is permanently gone.' + retryable: 'no' + category: not_found + unprocessable_entity: + http_status: 422 + summary: 'The request was understood but the target entity cannot be processed.' + cause: 'The resource is still being processed, or it is in an error state.' + remediation: 'If the resource is still processing, wait and retry; if it is in an error state, recreate/resend it instead of retrying.' + retryable: conditional + category: validation + backoff: 'If still processing, retry with exponential backoff; if in an error state, do not retry.' + exceeded_rate: + http_status: 429 + summary: 'Your account''s API request rate limit has been exceeded.' + cause: 'Too many requests were sent within the rate-limit window for this request type.' + remediation: 'Pace requests using the X-RateLimit-* response headers and retry after the window resets.' + retryable: 'yes' + category: rate_limit + backoff: 'Honor X-Ratelimit-Reset (Unix epoch); otherwise exponential backoff with jitter. No Retry-After header is sent.' + max_faxes: + http_status: 429 + summary: 'Too many fax transmissions are currently pending or transmitting.' + cause: 'The account has reached the limit of concurrent in-flight fax transmissions.' + remediation: 'Wait for outstanding transmissions to complete, then retry.' + retryable: 'yes' + category: rate_limit + backoff: 'Retry with exponential backoff once pending transmissions clear.' + unavailable: + http_status: 503 + summary: 'The service is temporarily unavailable.' + cause: 'A downstream dependency or the service itself is temporarily unavailable.' + remediation: 'Retry later with exponential backoff.' + retryable: 'yes' + category: maintenance + backoff: 'Retry later with exponential backoff and jitter.' + maintenance: + http_status: 503 + summary: 'The request could not be completed because the site is under maintenance.' + cause: 'The API is in a scheduled maintenance window.' + remediation: 'Retry once the maintenance window ends.' + retryable: 'yes' + category: maintenance + backoff: 'Retry later with exponential backoff.' + invalid_recipient: + http_status: 400 + summary: 'The recipient (fax number or email address) is invalid.' + cause: 'A recipient value did not pass validation.' + remediation: 'Correct the recipient value and resend.' + retryable: 'no' + category: validation + invalid_reminder: + http_status: 400 + summary: 'The signature request reminder was invalid.' + cause: 'A reminder was attempted against an ineligible request (e.g. embedded, closed, or expired).' + remediation: 'Only send reminders for eligible (non-embedded, open) signature requests.' + retryable: 'no' + category: validation + team_invite_failed: + http_status: 403 + summary: 'The team invitation could not be completed.' + cause: 'The invitee already belongs to a team, or the invite is otherwise not permitted.' + remediation: 'Confirm the invitee is not already on a team before inviting.' + retryable: 'no' + category: validation + signature_request_cancel_failed: + http_status: 400 + summary: 'The signature request could not be cancelled.' + cause: 'The caller is not the requester, or the request is already fully executed/closed.' + remediation: 'Only the requester can cancel, and only before the request is fully executed.' + retryable: 'no' + category: conflict + signature_request_remove_failed: + http_status: 400 + summary: 'Access to the signature request could not be removed.' + cause: 'The caller is not a party to the request, or it is not yet fully executed.' + remediation: 'Access can only be removed once the request is fully executed; use /signature_request/cancel for incomplete requests.' + retryable: 'no' + category: conflict + signature_request_expired: + http_status: + - 400 + - 403 + summary: 'The signature request has expired.' + cause: 'The operation targets a request whose expiration has passed. Most endpoints return 400; final-copy/download endpoints return 403.' + remediation: 'The request can no longer be acted upon; create a new signature request.' + retryable: 'no' + category: conflict + unknown: + http_status: 500 + summary: 'An unexpected error occurred.' + cause: 'An unhandled server-side error, or a status code without a more specific error_name.' + remediation: 'Retry transient failures; if it persists, contact support with the request details.' + retryable: conditional + category: server + backoff: 'For transient 5xx, retry with exponential backoff; otherwise do not retry.' +x-error-events: + signature_request_invalid: + event_type: signature_request_invalid + delivery: webhook + summary: 'Asynchronous error while processing a signature request.' + cause: 'A signature request could not be processed (e.g. invalid tags, fields, or merge data).' + remediation: 'Inspect event.event_metadata.event_message in the callback, correct the request, and resend.' + retryable: conditional + template_error: + event_type: template_error + delivery: webhook + summary: 'Asynchronous error while creating a template.' + cause: 'Template file processing failed (e.g. unsupported or corrupt file).' + remediation: 'Recreate the template with a valid file; check status in the API dashboard.' + retryable: conditional + file_error: + event_type: file_error + delivery: webhook + summary: 'Asynchronous error while processing an uploaded file.' + cause: 'A file attached to a request could not be processed.' + remediation: 'Resend the request with a supported, non-corrupt file.' + retryable: conditional + sign_url_invalid: + event_type: sign_url_invalid + delivery: webhook + summary: 'An embedded signing URL has expired or become invalid.' + cause: 'The embedded sign_url is no longer valid (e.g. expired).' + remediation: 'Generate a fresh embedded sign_url via the embedded sign URL endpoint.' + retryable: 'yes' + unknown_error: + event_type: unknown_error + delivery: webhook + summary: 'An unspecified asynchronous processing error occurred.' + cause: 'An unexpected error occurred while processing the request asynchronously.' + remediation: 'Check the request status in the API dashboard; retry or contact support if it persists.' + retryable: conditional diff --git a/openapi.yaml b/openapi.yaml index 41e64091d..6afeb3fb5 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -935,6 +935,44 @@ paths: seo: title: 'List API Apps | API Documentation | Dropbox Sign for Developers' description: 'The Dropbox Sign API allows you to build with a wide range of tools. To find out how to return a list of API Apps that are accessible by you, click here.' + /notification/retry: + post: + tags: + - 'Callbacks and Events' + summary: 'Resend an API notification asynchronously.' + description: 'Queues an API notification by event_type and id. A new notification event is generated from current object state.' + operationId: apiNotificationRetry + responses: + '202': + description: 'Resend queued' + '4XX': + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 404_example: + $ref: '#/components/examples/Error404Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' + security: + - + api_key: [] + - + oauth2: + - request_signature + - signature_request_access '/bulk_send_job/{bulk_send_job_id}': get: tags: @@ -11925,6 +11963,68 @@ components: error_name: description: 'Name of the error.' type: string + enum: + - bad_request + - unauthorized + - payment_required + - forbidden + - not_found + - method_not_supported + - conflict + - deleted + - unprocessable_entity + - exceeded_rate + - max_faxes + - unavailable + - maintenance + - invalid_recipient + - invalid_reminder + - team_invite_failed + - signature_request_cancel_failed + - signature_request_remove_failed + - signature_request_expired + - unknown + x-fern-enum: + bad_request: + description: 'The request contained invalid or malformed parameters.' + unauthorized: + description: 'The credentials supplied are missing or invalid.' + payment_required: + description: 'The account must be credited or upgraded to perform this action.' + forbidden: + description: 'The action is not allowed for these credentials or in the current context.' + not_found: + description: 'Nothing matches the requested resource.' + method_not_supported: + description: 'The HTTP method is not supported for this endpoint.' + conflict: + description: 'The request was well-formed but conflicts with the current state.' + deleted: + description: 'The request was cancelled or deleted.' + unprocessable_entity: + description: 'The request was understood but the target entity cannot be processed.' + exceeded_rate: + description: 'Your account''s API request rate limit has been exceeded.' + max_faxes: + description: 'Too many fax transmissions are currently pending or transmitting.' + unavailable: + description: 'The service is temporarily unavailable.' + maintenance: + description: 'The request could not be completed because the site is under maintenance.' + invalid_recipient: + description: 'The recipient (fax number or email address) is invalid.' + invalid_reminder: + description: 'The signature request reminder was invalid.' + team_invite_failed: + description: 'The team invitation could not be completed.' + signature_request_cancel_failed: + description: 'The signature request could not be cancelled.' + signature_request_remove_failed: + description: 'Access to the signature request could not be removed.' + signature_request_expired: + description: 'The signature request has expired.' + unknown: + description: 'An unexpected error occurred.' type: object FaxResponse: required: @@ -14542,3 +14642,188 @@ x-webhooks: responses: 200: $ref: '#/components/responses/EventCallbackResponse' +x-error-codes: + bad_request: + http_status: 400 + summary: 'The request contained invalid or malformed parameters.' + cause: 'A parameter failed validation, or the request body was malformed.' + remediation: 'Inspect error_msg and error_path, correct the offending parameter, and resend.' + retryable: 'no' + category: validation + unauthorized: + http_status: 401 + summary: 'The credentials supplied are missing or invalid.' + cause: 'Missing, malformed, or invalid API key or OAuth access token.' + remediation: 'Verify the API key or OAuth token and the Authorization header, then retry.' + retryable: 'no' + category: auth + payment_required: + http_status: 402 + summary: 'The account must be credited or upgraded to perform this action.' + cause: 'The action requires a paid plan, additional quota, or API credits.' + remediation: 'Upgrade the plan or add the required credits/quota, then retry.' + retryable: 'no' + category: plan + forbidden: + http_status: 403 + summary: 'The action is not allowed for these credentials or in the current context.' + cause: 'The authenticated account lacks access to the resource or operation.' + remediation: 'Confirm the account has access to the resource and the required permissions.' + retryable: 'no' + category: auth + not_found: + http_status: 404 + summary: 'Nothing matches the requested resource.' + cause: 'The resource id does not exist or is not visible to this account.' + remediation: 'Verify the id and that the resource belongs to the authenticated account.' + retryable: 'no' + category: not_found + method_not_supported: + http_status: 405 + summary: 'The HTTP method is not supported for this endpoint.' + cause: 'The request used a verb the endpoint does not accept.' + remediation: 'Use the HTTP method documented for the endpoint.' + retryable: 'no' + category: validation + conflict: + http_status: 409 + summary: 'The request was well-formed but conflicts with the current state.' + cause: 'The target resource is in a state incompatible with the request.' + remediation: 'Re-read the resource state, resolve the conflict, then retry.' + retryable: conditional + category: conflict + deleted: + http_status: 410 + summary: 'The request was cancelled or deleted.' + cause: 'The resource has been cancelled or removed and is no longer available.' + remediation: 'Do not retry; the resource is permanently gone.' + retryable: 'no' + category: not_found + unprocessable_entity: + http_status: 422 + summary: 'The request was understood but the target entity cannot be processed.' + cause: 'The resource is still being processed, or it is in an error state.' + remediation: 'If the resource is still processing, wait and retry; if it is in an error state, recreate/resend it instead of retrying.' + retryable: conditional + category: validation + backoff: 'If still processing, retry with exponential backoff; if in an error state, do not retry.' + exceeded_rate: + http_status: 429 + summary: 'Your account''s API request rate limit has been exceeded.' + cause: 'Too many requests were sent within the rate-limit window for this request type.' + remediation: 'Pace requests using the X-RateLimit-* response headers and retry after the window resets.' + retryable: 'yes' + category: rate_limit + backoff: 'Honor X-Ratelimit-Reset (Unix epoch); otherwise exponential backoff with jitter. No Retry-After header is sent.' + max_faxes: + http_status: 429 + summary: 'Too many fax transmissions are currently pending or transmitting.' + cause: 'The account has reached the limit of concurrent in-flight fax transmissions.' + remediation: 'Wait for outstanding transmissions to complete, then retry.' + retryable: 'yes' + category: rate_limit + backoff: 'Retry with exponential backoff once pending transmissions clear.' + unavailable: + http_status: 503 + summary: 'The service is temporarily unavailable.' + cause: 'A downstream dependency or the service itself is temporarily unavailable.' + remediation: 'Retry later with exponential backoff.' + retryable: 'yes' + category: maintenance + backoff: 'Retry later with exponential backoff and jitter.' + maintenance: + http_status: 503 + summary: 'The request could not be completed because the site is under maintenance.' + cause: 'The API is in a scheduled maintenance window.' + remediation: 'Retry once the maintenance window ends.' + retryable: 'yes' + category: maintenance + backoff: 'Retry later with exponential backoff.' + invalid_recipient: + http_status: 400 + summary: 'The recipient (fax number or email address) is invalid.' + cause: 'A recipient value did not pass validation.' + remediation: 'Correct the recipient value and resend.' + retryable: 'no' + category: validation + invalid_reminder: + http_status: 400 + summary: 'The signature request reminder was invalid.' + cause: 'A reminder was attempted against an ineligible request (e.g. embedded, closed, or expired).' + remediation: 'Only send reminders for eligible (non-embedded, open) signature requests.' + retryable: 'no' + category: validation + team_invite_failed: + http_status: 403 + summary: 'The team invitation could not be completed.' + cause: 'The invitee already belongs to a team, or the invite is otherwise not permitted.' + remediation: 'Confirm the invitee is not already on a team before inviting.' + retryable: 'no' + category: validation + signature_request_cancel_failed: + http_status: 400 + summary: 'The signature request could not be cancelled.' + cause: 'The caller is not the requester, or the request is already fully executed/closed.' + remediation: 'Only the requester can cancel, and only before the request is fully executed.' + retryable: 'no' + category: conflict + signature_request_remove_failed: + http_status: 400 + summary: 'Access to the signature request could not be removed.' + cause: 'The caller is not a party to the request, or it is not yet fully executed.' + remediation: 'Access can only be removed once the request is fully executed; use /signature_request/cancel for incomplete requests.' + retryable: 'no' + category: conflict + signature_request_expired: + http_status: + - 400 + - 403 + summary: 'The signature request has expired.' + cause: 'The operation targets a request whose expiration has passed. Most endpoints return 400; final-copy/download endpoints return 403.' + remediation: 'The request can no longer be acted upon; create a new signature request.' + retryable: 'no' + category: conflict + unknown: + http_status: 500 + summary: 'An unexpected error occurred.' + cause: 'An unhandled server-side error, or a status code without a more specific error_name.' + remediation: 'Retry transient failures; if it persists, contact support with the request details.' + retryable: conditional + category: server + backoff: 'For transient 5xx, retry with exponential backoff; otherwise do not retry.' +x-error-events: + signature_request_invalid: + event_type: signature_request_invalid + delivery: webhook + summary: 'Asynchronous error while processing a signature request.' + cause: 'A signature request could not be processed (e.g. invalid tags, fields, or merge data).' + remediation: 'Inspect event.event_metadata.event_message in the callback, correct the request, and resend.' + retryable: conditional + template_error: + event_type: template_error + delivery: webhook + summary: 'Asynchronous error while creating a template.' + cause: 'Template file processing failed (e.g. unsupported or corrupt file).' + remediation: 'Recreate the template with a valid file; check status in the API dashboard.' + retryable: conditional + file_error: + event_type: file_error + delivery: webhook + summary: 'Asynchronous error while processing an uploaded file.' + cause: 'A file attached to a request could not be processed.' + remediation: 'Resend the request with a supported, non-corrupt file.' + retryable: conditional + sign_url_invalid: + event_type: sign_url_invalid + delivery: webhook + summary: 'An embedded signing URL has expired or become invalid.' + cause: 'The embedded sign_url is no longer valid (e.g. expired).' + remediation: 'Generate a fresh embedded sign_url via the embedded sign URL endpoint.' + retryable: 'yes' + unknown_error: + event_type: unknown_error + delivery: webhook + summary: 'An unspecified asynchronous processing error occurred.' + cause: 'An unexpected error occurred while processing the request asynchronously.' + remediation: 'Check the request status in the API dashboard; retry or contact support if it persists.' + retryable: conditional From e93e149bf9b83acff425e58e63e7b85a78b93dd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20W=C3=B3jcik?= Date: Wed, 3 Jun 2026 14:46:51 +0200 Subject: [PATCH 2/6] Remove notification retry from openapi files --- openapi-raw.yaml | 3 +++ openapi-sdk.yaml | 38 -------------------------------------- openapi.yaml | 38 -------------------------------------- 3 files changed, 3 insertions(+), 76 deletions(-) diff --git a/openapi-raw.yaml b/openapi-raw.yaml index ed2a2ab39..de2ca5625 100644 --- a/openapi-raw.yaml +++ b/openapi-raw.yaml @@ -967,6 +967,9 @@ paths: oauth2: - request_signature - signature_request_access + x-hideOn: + - sdk + - doc '/bulk_send_job/{bulk_send_job_id}': get: tags: diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index 5be68e43f..469ac65a9 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -935,44 +935,6 @@ paths: seo: title: 'List API Apps | API Documentation | Dropbox Sign for Developers' description: 'The Dropbox Sign API allows you to build with a wide range of tools. To find out how to return a list of API Apps that are accessible by you, click here.' - /notification/retry: - post: - tags: - - 'Callbacks and Events' - summary: 'Resend an API notification asynchronously.' - description: 'Queues an API notification by event_type and id. A new notification event is generated from current object state.' - operationId: apiNotificationRetry - responses: - '202': - description: 'Resend queued' - '4XX': - description: failed_operation - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - 400_example: - $ref: '#/components/examples/Error400Response' - 401_example: - $ref: '#/components/examples/Error401Response' - 402_example: - $ref: '#/components/examples/Error402Response' - 403_example: - $ref: '#/components/examples/Error403Response' - 429_example: - $ref: '#/components/examples/Error429Response' - 404_example: - $ref: '#/components/examples/Error404Response' - 4XX_example: - $ref: '#/components/examples/Error4XXResponse' - security: - - - api_key: [] - - - oauth2: - - request_signature - - signature_request_access '/bulk_send_job/{bulk_send_job_id}': get: tags: diff --git a/openapi.yaml b/openapi.yaml index 6afeb3fb5..f043f8fd2 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -935,44 +935,6 @@ paths: seo: title: 'List API Apps | API Documentation | Dropbox Sign for Developers' description: 'The Dropbox Sign API allows you to build with a wide range of tools. To find out how to return a list of API Apps that are accessible by you, click here.' - /notification/retry: - post: - tags: - - 'Callbacks and Events' - summary: 'Resend an API notification asynchronously.' - description: 'Queues an API notification by event_type and id. A new notification event is generated from current object state.' - operationId: apiNotificationRetry - responses: - '202': - description: 'Resend queued' - '4XX': - description: failed_operation - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - 400_example: - $ref: '#/components/examples/Error400Response' - 401_example: - $ref: '#/components/examples/Error401Response' - 402_example: - $ref: '#/components/examples/Error402Response' - 403_example: - $ref: '#/components/examples/Error403Response' - 429_example: - $ref: '#/components/examples/Error429Response' - 404_example: - $ref: '#/components/examples/Error404Response' - 4XX_example: - $ref: '#/components/examples/Error4XXResponse' - security: - - - api_key: [] - - - oauth2: - - request_signature - - signature_request_access '/bulk_send_job/{bulk_send_job_id}': get: tags: From d7ed9a8abd42a6d35124a09b3f278984747ecea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20W=C3=B3jcik?= Date: Wed, 3 Jun 2026 15:35:09 +0200 Subject: [PATCH 3/6] Change error name from string to enum in sdks --- .../Dropbox.Sign/Model/ErrorResponseError.cs | 157 +++++++++++++++--- sdks/java-v1/docs/ErrorResponseError.md | 29 +++- .../sign/model/ErrorResponseError.java | 79 ++++++++- sdks/java-v2/docs/ErrorResponseError.md | 29 +++- .../sign/model/ErrorResponseError.java | 79 ++++++++- sdks/node/dist/api.js | 28 +++- sdks/node/model/errorResponseError.ts | 29 +++- sdks/node/model/index.ts | 1 + sdks/node/types/model/errorResponseError.d.ts | 26 ++- sdks/php/src/Model/ErrorResponseError.php | 71 ++++++++ .../models/error_response_error.py | 34 +++- .../models/error_response_error.rb | 34 +++- 12 files changed, 557 insertions(+), 39 deletions(-) diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/ErrorResponseError.cs b/sdks/dotnet/src/Dropbox.Sign/Model/ErrorResponseError.cs index f1b9ca907..48476bbe4 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/ErrorResponseError.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/ErrorResponseError.cs @@ -33,6 +33,141 @@ namespace Dropbox.Sign.Model [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] public partial class ErrorResponseError : IEquatable, IValidatableObject { + /// + /// Name of the error. + /// + /// Name of the error. + [JsonConverter(typeof(StringEnumConverter))] + public enum ErrorNameEnum + { + /// + /// Enum BadRequest for value: bad_request + /// + [EnumMember(Value = "bad_request")] + BadRequest = 1, + + /// + /// Enum Unauthorized for value: unauthorized + /// + [EnumMember(Value = "unauthorized")] + Unauthorized = 2, + + /// + /// Enum PaymentRequired for value: payment_required + /// + [EnumMember(Value = "payment_required")] + PaymentRequired = 3, + + /// + /// Enum Forbidden for value: forbidden + /// + [EnumMember(Value = "forbidden")] + Forbidden = 4, + + /// + /// Enum NotFound for value: not_found + /// + [EnumMember(Value = "not_found")] + NotFound = 5, + + /// + /// Enum MethodNotSupported for value: method_not_supported + /// + [EnumMember(Value = "method_not_supported")] + MethodNotSupported = 6, + + /// + /// Enum Conflict for value: conflict + /// + [EnumMember(Value = "conflict")] + Conflict = 7, + + /// + /// Enum Deleted for value: deleted + /// + [EnumMember(Value = "deleted")] + Deleted = 8, + + /// + /// Enum UnprocessableEntity for value: unprocessable_entity + /// + [EnumMember(Value = "unprocessable_entity")] + UnprocessableEntity = 9, + + /// + /// Enum ExceededRate for value: exceeded_rate + /// + [EnumMember(Value = "exceeded_rate")] + ExceededRate = 10, + + /// + /// Enum MaxFaxes for value: max_faxes + /// + [EnumMember(Value = "max_faxes")] + MaxFaxes = 11, + + /// + /// Enum Unavailable for value: unavailable + /// + [EnumMember(Value = "unavailable")] + Unavailable = 12, + + /// + /// Enum Maintenance for value: maintenance + /// + [EnumMember(Value = "maintenance")] + Maintenance = 13, + + /// + /// Enum InvalidRecipient for value: invalid_recipient + /// + [EnumMember(Value = "invalid_recipient")] + InvalidRecipient = 14, + + /// + /// Enum InvalidReminder for value: invalid_reminder + /// + [EnumMember(Value = "invalid_reminder")] + InvalidReminder = 15, + + /// + /// Enum TeamInviteFailed for value: team_invite_failed + /// + [EnumMember(Value = "team_invite_failed")] + TeamInviteFailed = 16, + + /// + /// Enum SignatureRequestCancelFailed for value: signature_request_cancel_failed + /// + [EnumMember(Value = "signature_request_cancel_failed")] + SignatureRequestCancelFailed = 17, + + /// + /// Enum SignatureRequestRemoveFailed for value: signature_request_remove_failed + /// + [EnumMember(Value = "signature_request_remove_failed")] + SignatureRequestRemoveFailed = 18, + + /// + /// Enum SignatureRequestExpired for value: signature_request_expired + /// + [EnumMember(Value = "signature_request_expired")] + SignatureRequestExpired = 19, + + /// + /// Enum Unknown for value: unknown + /// + [EnumMember(Value = "unknown")] + Unknown = 20 + } + + + /// + /// Name of the error. + /// + /// Name of the error. + [DataMember(Name = "error_name", IsRequired = true, EmitDefaultValue = true)] + public ErrorNameEnum ErrorName { get; set; } /// /// Initializes a new instance of the class. /// @@ -44,7 +179,7 @@ protected ErrorResponseError() { } /// Message describing an error. (required). /// Path at which an error occurred.. /// Name of the error. (required). - public ErrorResponseError(string errorMsg = default(string), string errorPath = default(string), string errorName = default(string)) + public ErrorResponseError(string errorMsg = default(string), string errorPath = default(string), ErrorNameEnum errorName = default(ErrorNameEnum)) { // to ensure "errorMsg" is required (not null) @@ -53,11 +188,6 @@ protected ErrorResponseError() { } throw new ArgumentNullException("errorMsg is a required property for ErrorResponseError and cannot be null"); } this.ErrorMsg = errorMsg; - // to ensure "errorName" is required (not null) - if (errorName == null) - { - throw new ArgumentNullException("errorName is a required property for ErrorResponseError and cannot be null"); - } this.ErrorName = errorName; this.ErrorPath = errorPath; } @@ -85,13 +215,6 @@ public static ErrorResponseError Init(string jsonData) [DataMember(Name = "error_msg", IsRequired = true, EmitDefaultValue = true)] public string ErrorMsg { get; set; } - /// - /// Name of the error. - /// - /// Name of the error. - [DataMember(Name = "error_name", IsRequired = true, EmitDefaultValue = true)] - public string ErrorName { get; set; } - /// /// Path at which an error occurred. /// @@ -152,8 +275,7 @@ public bool Equals(ErrorResponseError input) ) && ( this.ErrorName == input.ErrorName || - (this.ErrorName != null && - this.ErrorName.Equals(input.ErrorName)) + this.ErrorName.Equals(input.ErrorName) ) && ( this.ErrorPath == input.ErrorPath || @@ -175,10 +297,7 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.ErrorMsg.GetHashCode(); } - if (this.ErrorName != null) - { - hashCode = (hashCode * 59) + this.ErrorName.GetHashCode(); - } + hashCode = (hashCode * 59) + this.ErrorName.GetHashCode(); if (this.ErrorPath != null) { hashCode = (hashCode * 59) + this.ErrorPath.GetHashCode(); diff --git a/sdks/java-v1/docs/ErrorResponseError.md b/sdks/java-v1/docs/ErrorResponseError.md index 656aa5c7f..9f4d0272f 100644 --- a/sdks/java-v1/docs/ErrorResponseError.md +++ b/sdks/java-v1/docs/ErrorResponseError.md @@ -9,8 +9,35 @@ Contains information about an error that occurred. | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | `errorMsg`*_required_ | ```String``` | Message describing an error. | | -| `errorName`*_required_ | ```String``` | Name of the error. | | +| `errorName`*_required_ | [```ErrorNameEnum```](#ErrorNameEnum) | Name of the error. | | | `errorPath` | ```String``` | Path at which an error occurred. | | +## Enum: ErrorNameEnum + +| Name | Value | +---- | ----- +| BAD_REQUEST | "bad_request" | +| UNAUTHORIZED | "unauthorized" | +| PAYMENT_REQUIRED | "payment_required" | +| FORBIDDEN | "forbidden" | +| NOT_FOUND | "not_found" | +| METHOD_NOT_SUPPORTED | "method_not_supported" | +| CONFLICT | "conflict" | +| DELETED | "deleted" | +| UNPROCESSABLE_ENTITY | "unprocessable_entity" | +| EXCEEDED_RATE | "exceeded_rate" | +| MAX_FAXES | "max_faxes" | +| UNAVAILABLE | "unavailable" | +| MAINTENANCE | "maintenance" | +| INVALID_RECIPIENT | "invalid_recipient" | +| INVALID_REMINDER | "invalid_reminder" | +| TEAM_INVITE_FAILED | "team_invite_failed" | +| SIGNATURE_REQUEST_CANCEL_FAILED | "signature_request_cancel_failed" | +| SIGNATURE_REQUEST_REMOVE_FAILED | "signature_request_remove_failed" | +| SIGNATURE_REQUEST_EXPIRED | "signature_request_expired" | +| UNKNOWN | "unknown" | + + + diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponseError.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponseError.java index e9624c65f..db3674082 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponseError.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponseError.java @@ -14,10 +14,12 @@ import com.dropbox.sign.ApiException; import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.databind.ObjectMapper; import java.util.HashMap; import java.util.Map; @@ -37,8 +39,77 @@ public class ErrorResponseError { public static final String JSON_PROPERTY_ERROR_MSG = "error_msg"; @javax.annotation.Nonnull private String errorMsg; + /** Name of the error. */ + public enum ErrorNameEnum { + BAD_REQUEST(String.valueOf("bad_request")), + + UNAUTHORIZED(String.valueOf("unauthorized")), + + PAYMENT_REQUIRED(String.valueOf("payment_required")), + + FORBIDDEN(String.valueOf("forbidden")), + + NOT_FOUND(String.valueOf("not_found")), + + METHOD_NOT_SUPPORTED(String.valueOf("method_not_supported")), + + CONFLICT(String.valueOf("conflict")), + + DELETED(String.valueOf("deleted")), + + UNPROCESSABLE_ENTITY(String.valueOf("unprocessable_entity")), + + EXCEEDED_RATE(String.valueOf("exceeded_rate")), + + MAX_FAXES(String.valueOf("max_faxes")), + + UNAVAILABLE(String.valueOf("unavailable")), + + MAINTENANCE(String.valueOf("maintenance")), + + INVALID_RECIPIENT(String.valueOf("invalid_recipient")), + + INVALID_REMINDER(String.valueOf("invalid_reminder")), + + TEAM_INVITE_FAILED(String.valueOf("team_invite_failed")), + + SIGNATURE_REQUEST_CANCEL_FAILED(String.valueOf("signature_request_cancel_failed")), + + SIGNATURE_REQUEST_REMOVE_FAILED(String.valueOf("signature_request_remove_failed")), + + SIGNATURE_REQUEST_EXPIRED(String.valueOf("signature_request_expired")), + + UNKNOWN(String.valueOf("unknown")); + + private String value; + + ErrorNameEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ErrorNameEnum fromValue(String value) { + for (ErrorNameEnum b : ErrorNameEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + public static final String JSON_PROPERTY_ERROR_NAME = "error_name"; - @javax.annotation.Nonnull private String errorName; + @javax.annotation.Nonnull private ErrorNameEnum errorName; public static final String JSON_PROPERTY_ERROR_PATH = "error_path"; @javax.annotation.Nullable private String errorPath; @@ -82,7 +153,7 @@ public void setErrorMsg(@javax.annotation.Nonnull String errorMsg) { this.errorMsg = errorMsg; } - public ErrorResponseError errorName(@javax.annotation.Nonnull String errorName) { + public ErrorResponseError errorName(@javax.annotation.Nonnull ErrorNameEnum errorName) { this.errorName = errorName; return this; } @@ -95,13 +166,13 @@ public ErrorResponseError errorName(@javax.annotation.Nonnull String errorName) @javax.annotation.Nonnull @JsonProperty(JSON_PROPERTY_ERROR_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getErrorName() { + public ErrorNameEnum getErrorName() { return errorName; } @JsonProperty(JSON_PROPERTY_ERROR_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setErrorName(@javax.annotation.Nonnull String errorName) { + public void setErrorName(@javax.annotation.Nonnull ErrorNameEnum errorName) { this.errorName = errorName; } diff --git a/sdks/java-v2/docs/ErrorResponseError.md b/sdks/java-v2/docs/ErrorResponseError.md index 656aa5c7f..9f4d0272f 100644 --- a/sdks/java-v2/docs/ErrorResponseError.md +++ b/sdks/java-v2/docs/ErrorResponseError.md @@ -9,8 +9,35 @@ Contains information about an error that occurred. | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | `errorMsg`*_required_ | ```String``` | Message describing an error. | | -| `errorName`*_required_ | ```String``` | Name of the error. | | +| `errorName`*_required_ | [```ErrorNameEnum```](#ErrorNameEnum) | Name of the error. | | | `errorPath` | ```String``` | Path at which an error occurred. | | +## Enum: ErrorNameEnum + +| Name | Value | +---- | ----- +| BAD_REQUEST | "bad_request" | +| UNAUTHORIZED | "unauthorized" | +| PAYMENT_REQUIRED | "payment_required" | +| FORBIDDEN | "forbidden" | +| NOT_FOUND | "not_found" | +| METHOD_NOT_SUPPORTED | "method_not_supported" | +| CONFLICT | "conflict" | +| DELETED | "deleted" | +| UNPROCESSABLE_ENTITY | "unprocessable_entity" | +| EXCEEDED_RATE | "exceeded_rate" | +| MAX_FAXES | "max_faxes" | +| UNAVAILABLE | "unavailable" | +| MAINTENANCE | "maintenance" | +| INVALID_RECIPIENT | "invalid_recipient" | +| INVALID_REMINDER | "invalid_reminder" | +| TEAM_INVITE_FAILED | "team_invite_failed" | +| SIGNATURE_REQUEST_CANCEL_FAILED | "signature_request_cancel_failed" | +| SIGNATURE_REQUEST_REMOVE_FAILED | "signature_request_remove_failed" | +| SIGNATURE_REQUEST_EXPIRED | "signature_request_expired" | +| UNKNOWN | "unknown" | + + + diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ErrorResponseError.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ErrorResponseError.java index af87ec4aa..8c36f632d 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ErrorResponseError.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ErrorResponseError.java @@ -44,9 +44,80 @@ public class ErrorResponseError { @jakarta.annotation.Nonnull private String errorMsg; + /** + * Name of the error. + */ + public enum ErrorNameEnum { + BAD_REQUEST(String.valueOf("bad_request")), + + UNAUTHORIZED(String.valueOf("unauthorized")), + + PAYMENT_REQUIRED(String.valueOf("payment_required")), + + FORBIDDEN(String.valueOf("forbidden")), + + NOT_FOUND(String.valueOf("not_found")), + + METHOD_NOT_SUPPORTED(String.valueOf("method_not_supported")), + + CONFLICT(String.valueOf("conflict")), + + DELETED(String.valueOf("deleted")), + + UNPROCESSABLE_ENTITY(String.valueOf("unprocessable_entity")), + + EXCEEDED_RATE(String.valueOf("exceeded_rate")), + + MAX_FAXES(String.valueOf("max_faxes")), + + UNAVAILABLE(String.valueOf("unavailable")), + + MAINTENANCE(String.valueOf("maintenance")), + + INVALID_RECIPIENT(String.valueOf("invalid_recipient")), + + INVALID_REMINDER(String.valueOf("invalid_reminder")), + + TEAM_INVITE_FAILED(String.valueOf("team_invite_failed")), + + SIGNATURE_REQUEST_CANCEL_FAILED(String.valueOf("signature_request_cancel_failed")), + + SIGNATURE_REQUEST_REMOVE_FAILED(String.valueOf("signature_request_remove_failed")), + + SIGNATURE_REQUEST_EXPIRED(String.valueOf("signature_request_expired")), + + UNKNOWN(String.valueOf("unknown")); + + private String value; + + ErrorNameEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ErrorNameEnum fromValue(String value) { + for (ErrorNameEnum b : ErrorNameEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + public static final String JSON_PROPERTY_ERROR_NAME = "error_name"; @jakarta.annotation.Nonnull - private String errorName; + private ErrorNameEnum errorName; public static final String JSON_PROPERTY_ERROR_PATH = "error_path"; @jakarta.annotation.Nullable @@ -95,7 +166,7 @@ public void setErrorMsg(@jakarta.annotation.Nonnull String errorMsg) { } - public ErrorResponseError errorName(@jakarta.annotation.Nonnull String errorName) { + public ErrorResponseError errorName(@jakarta.annotation.Nonnull ErrorNameEnum errorName) { this.errorName = errorName; return this; } @@ -108,14 +179,14 @@ public ErrorResponseError errorName(@jakarta.annotation.Nonnull String errorName @JsonProperty(JSON_PROPERTY_ERROR_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getErrorName() { + public ErrorNameEnum getErrorName() { return errorName; } @JsonProperty(JSON_PROPERTY_ERROR_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setErrorName(@jakarta.annotation.Nonnull String errorName) { + public void setErrorName(@jakarta.annotation.Nonnull ErrorNameEnum errorName) { this.errorName = errorName; } diff --git a/sdks/node/dist/api.js b/sdks/node/dist/api.js index 2e7b36985..4e7945208 100644 --- a/sdks/node/dist/api.js +++ b/sdks/node/dist/api.js @@ -18009,7 +18009,7 @@ var ErrorResponseError = class _ErrorResponseError { { name: "errorName", baseName: "error_name", - type: "string" + type: "ErrorResponseError.ErrorNameEnum" }, { name: "errorPath", @@ -18026,6 +18026,31 @@ var ErrorResponseError = class _ErrorResponseError { return ObjectSerializer.deserialize(data, "ErrorResponseError"); } }; +((ErrorResponseError2) => { + let ErrorNameEnum; + ((ErrorNameEnum2) => { + ErrorNameEnum2["BadRequest"] = "bad_request"; + ErrorNameEnum2["Unauthorized"] = "unauthorized"; + ErrorNameEnum2["PaymentRequired"] = "payment_required"; + ErrorNameEnum2["Forbidden"] = "forbidden"; + ErrorNameEnum2["NotFound"] = "not_found"; + ErrorNameEnum2["MethodNotSupported"] = "method_not_supported"; + ErrorNameEnum2["Conflict"] = "conflict"; + ErrorNameEnum2["Deleted"] = "deleted"; + ErrorNameEnum2["UnprocessableEntity"] = "unprocessable_entity"; + ErrorNameEnum2["ExceededRate"] = "exceeded_rate"; + ErrorNameEnum2["MaxFaxes"] = "max_faxes"; + ErrorNameEnum2["Unavailable"] = "unavailable"; + ErrorNameEnum2["Maintenance"] = "maintenance"; + ErrorNameEnum2["InvalidRecipient"] = "invalid_recipient"; + ErrorNameEnum2["InvalidReminder"] = "invalid_reminder"; + ErrorNameEnum2["TeamInviteFailed"] = "team_invite_failed"; + ErrorNameEnum2["SignatureRequestCancelFailed"] = "signature_request_cancel_failed"; + ErrorNameEnum2["SignatureRequestRemoveFailed"] = "signature_request_remove_failed"; + ErrorNameEnum2["SignatureRequestExpired"] = "signature_request_expired"; + ErrorNameEnum2["Unknown"] = "unknown"; + })(ErrorNameEnum = ErrorResponseError2.ErrorNameEnum || (ErrorResponseError2.ErrorNameEnum = {})); +})(ErrorResponseError || (ErrorResponseError = {})); // model/eventCallbackHelper.ts var crypto2 = __toESM(require("crypto")); @@ -26790,6 +26815,7 @@ var WarningResponse = class _WarningResponse { // model/index.ts var enumsMap = { + "ErrorResponseError.ErrorNameEnum": ErrorResponseError.ErrorNameEnum, "EventCallbackRequestEvent.EventTypeEnum": EventCallbackRequestEvent.EventTypeEnum, FaxLineAreaCodeGetCountryEnum, FaxLineAreaCodeGetProvinceEnum, diff --git a/sdks/node/model/errorResponseError.ts b/sdks/node/model/errorResponseError.ts index 577bb5dd5..a29549eb4 100644 --- a/sdks/node/model/errorResponseError.ts +++ b/sdks/node/model/errorResponseError.ts @@ -35,7 +35,7 @@ export class ErrorResponseError { /** * Name of the error. */ - "errorName": string; + "errorName": ErrorResponseError.ErrorNameEnum; /** * Path at which an error occurred. */ @@ -52,7 +52,7 @@ export class ErrorResponseError { { name: "errorName", baseName: "error_name", - type: "string", + type: "ErrorResponseError.ErrorNameEnum", }, { name: "errorPath", @@ -70,3 +70,28 @@ export class ErrorResponseError { return ObjectSerializer.deserialize(data, "ErrorResponseError"); } } + +export namespace ErrorResponseError { + export enum ErrorNameEnum { + BadRequest = "bad_request", + Unauthorized = "unauthorized", + PaymentRequired = "payment_required", + Forbidden = "forbidden", + NotFound = "not_found", + MethodNotSupported = "method_not_supported", + Conflict = "conflict", + Deleted = "deleted", + UnprocessableEntity = "unprocessable_entity", + ExceededRate = "exceeded_rate", + MaxFaxes = "max_faxes", + Unavailable = "unavailable", + Maintenance = "maintenance", + InvalidRecipient = "invalid_recipient", + InvalidReminder = "invalid_reminder", + TeamInviteFailed = "team_invite_failed", + SignatureRequestCancelFailed = "signature_request_cancel_failed", + SignatureRequestRemoveFailed = "signature_request_remove_failed", + SignatureRequestExpired = "signature_request_expired", + Unknown = "unknown", + } +} diff --git a/sdks/node/model/index.ts b/sdks/node/model/index.ts index 47632382b..963d98157 100644 --- a/sdks/node/model/index.ts +++ b/sdks/node/model/index.ts @@ -206,6 +206,7 @@ import { UnclaimedDraftResponse } from "./unclaimedDraftResponse"; import { WarningResponse } from "./warningResponse"; export let enumsMap: { [index: string]: any } = { + "ErrorResponseError.ErrorNameEnum": ErrorResponseError.ErrorNameEnum, "EventCallbackRequestEvent.EventTypeEnum": EventCallbackRequestEvent.EventTypeEnum, FaxLineAreaCodeGetCountryEnum: FaxLineAreaCodeGetCountryEnum, diff --git a/sdks/node/types/model/errorResponseError.d.ts b/sdks/node/types/model/errorResponseError.d.ts index 084f883b1..ad57732a1 100644 --- a/sdks/node/types/model/errorResponseError.d.ts +++ b/sdks/node/types/model/errorResponseError.d.ts @@ -1,10 +1,34 @@ import { AttributeTypeMap } from "./"; export declare class ErrorResponseError { "errorMsg": string; - "errorName": string; + "errorName": ErrorResponseError.ErrorNameEnum; "errorPath"?: string; static discriminator: string | undefined; static attributeTypeMap: AttributeTypeMap; static getAttributeTypeMap(): AttributeTypeMap; static init(data: any): ErrorResponseError; } +export declare namespace ErrorResponseError { + enum ErrorNameEnum { + BadRequest = "bad_request", + Unauthorized = "unauthorized", + PaymentRequired = "payment_required", + Forbidden = "forbidden", + NotFound = "not_found", + MethodNotSupported = "method_not_supported", + Conflict = "conflict", + Deleted = "deleted", + UnprocessableEntity = "unprocessable_entity", + ExceededRate = "exceeded_rate", + MaxFaxes = "max_faxes", + Unavailable = "unavailable", + Maintenance = "maintenance", + InvalidRecipient = "invalid_recipient", + InvalidReminder = "invalid_reminder", + TeamInviteFailed = "team_invite_failed", + SignatureRequestCancelFailed = "signature_request_cancel_failed", + SignatureRequestRemoveFailed = "signature_request_remove_failed", + SignatureRequestExpired = "signature_request_expired", + Unknown = "unknown" + } +} diff --git a/sdks/php/src/Model/ErrorResponseError.php b/sdks/php/src/Model/ErrorResponseError.php index 65c09c1dc..02dbda810 100644 --- a/sdks/php/src/Model/ErrorResponseError.php +++ b/sdks/php/src/Model/ErrorResponseError.php @@ -233,6 +233,58 @@ public function getModelName() return self::$openAPIModelName; } + public const ERROR_NAME_BAD_REQUEST = 'bad_request'; + public const ERROR_NAME_UNAUTHORIZED = 'unauthorized'; + public const ERROR_NAME_PAYMENT_REQUIRED = 'payment_required'; + public const ERROR_NAME_FORBIDDEN = 'forbidden'; + public const ERROR_NAME_NOT_FOUND = 'not_found'; + public const ERROR_NAME_METHOD_NOT_SUPPORTED = 'method_not_supported'; + public const ERROR_NAME_CONFLICT = 'conflict'; + public const ERROR_NAME_DELETED = 'deleted'; + public const ERROR_NAME_UNPROCESSABLE_ENTITY = 'unprocessable_entity'; + public const ERROR_NAME_EXCEEDED_RATE = 'exceeded_rate'; + public const ERROR_NAME_MAX_FAXES = 'max_faxes'; + public const ERROR_NAME_UNAVAILABLE = 'unavailable'; + public const ERROR_NAME_MAINTENANCE = 'maintenance'; + public const ERROR_NAME_INVALID_RECIPIENT = 'invalid_recipient'; + public const ERROR_NAME_INVALID_REMINDER = 'invalid_reminder'; + public const ERROR_NAME_TEAM_INVITE_FAILED = 'team_invite_failed'; + public const ERROR_NAME_SIGNATURE_REQUEST_CANCEL_FAILED = 'signature_request_cancel_failed'; + public const ERROR_NAME_SIGNATURE_REQUEST_REMOVE_FAILED = 'signature_request_remove_failed'; + public const ERROR_NAME_SIGNATURE_REQUEST_EXPIRED = 'signature_request_expired'; + public const ERROR_NAME_UNKNOWN = 'unknown'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getErrorNameAllowableValues() + { + return [ + self::ERROR_NAME_BAD_REQUEST, + self::ERROR_NAME_UNAUTHORIZED, + self::ERROR_NAME_PAYMENT_REQUIRED, + self::ERROR_NAME_FORBIDDEN, + self::ERROR_NAME_NOT_FOUND, + self::ERROR_NAME_METHOD_NOT_SUPPORTED, + self::ERROR_NAME_CONFLICT, + self::ERROR_NAME_DELETED, + self::ERROR_NAME_UNPROCESSABLE_ENTITY, + self::ERROR_NAME_EXCEEDED_RATE, + self::ERROR_NAME_MAX_FAXES, + self::ERROR_NAME_UNAVAILABLE, + self::ERROR_NAME_MAINTENANCE, + self::ERROR_NAME_INVALID_RECIPIENT, + self::ERROR_NAME_INVALID_REMINDER, + self::ERROR_NAME_TEAM_INVITE_FAILED, + self::ERROR_NAME_SIGNATURE_REQUEST_CANCEL_FAILED, + self::ERROR_NAME_SIGNATURE_REQUEST_REMOVE_FAILED, + self::ERROR_NAME_SIGNATURE_REQUEST_EXPIRED, + self::ERROR_NAME_UNKNOWN, + ]; + } + /** * Associative array for storing property values * @@ -304,6 +356,15 @@ public function listInvalidProperties() if ($this->container['error_name'] === null) { $invalidProperties[] = "'error_name' can't be null"; } + $allowedValues = $this->getErrorNameAllowableValues(); + if (!is_null($this->container['error_name']) && !in_array($this->container['error_name'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'error_name', must be one of '%s'", + $this->container['error_name'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -367,6 +428,16 @@ public function setErrorName(string $error_name) if (is_null($error_name)) { throw new InvalidArgumentException('non-nullable error_name cannot be null'); } + $allowedValues = $this->getErrorNameAllowableValues(); + if (!in_array($error_name, $allowedValues, true)) { + throw new InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'error_name', must be one of '%s'", + $error_name, + implode("', '", $allowedValues) + ) + ); + } $this->container['error_name'] = $error_name; return $this; diff --git a/sdks/python/dropbox_sign/models/error_response_error.py b/sdks/python/dropbox_sign/models/error_response_error.py index 4f17bb6ee..db67be601 100644 --- a/sdks/python/dropbox_sign/models/error_response_error.py +++ b/sdks/python/dropbox_sign/models/error_response_error.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -38,6 +38,38 @@ class ErrorResponseError(BaseModel): ) __properties: ClassVar[List[str]] = ["error_msg", "error_name", "error_path"] + @field_validator("error_name") + def error_name_validate_enum(cls, value): + """Validates the enum""" + if value not in set( + [ + "bad_request", + "unauthorized", + "payment_required", + "forbidden", + "not_found", + "method_not_supported", + "conflict", + "deleted", + "unprocessable_entity", + "exceeded_rate", + "max_faxes", + "unavailable", + "maintenance", + "invalid_recipient", + "invalid_reminder", + "team_invite_failed", + "signature_request_cancel_failed", + "signature_request_remove_failed", + "signature_request_expired", + "unknown", + ] + ): + raise ValueError( + "must be one of enum values ('bad_request', 'unauthorized', 'payment_required', 'forbidden', 'not_found', 'method_not_supported', 'conflict', 'deleted', 'unprocessable_entity', 'exceeded_rate', 'max_faxes', 'unavailable', 'maintenance', 'invalid_recipient', 'invalid_reminder', 'team_invite_failed', 'signature_request_cancel_failed', 'signature_request_remove_failed', 'signature_request_expired', 'unknown')" + ) + return value + model_config = ConfigDict( populate_by_name=True, validate_assignment=True, diff --git a/sdks/ruby/lib/dropbox-sign/models/error_response_error.rb b/sdks/ruby/lib/dropbox-sign/models/error_response_error.rb index b1b85ff45..348cf4217 100644 --- a/sdks/ruby/lib/dropbox-sign/models/error_response_error.rb +++ b/sdks/ruby/lib/dropbox-sign/models/error_response_error.rb @@ -31,6 +31,28 @@ class ErrorResponseError # @return [String] attr_accessor :error_path + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -139,6 +161,8 @@ def list_invalid_properties def valid? return false if @error_msg.nil? return false if @error_name.nil? + error_name_validator = EnumAttributeValidator.new('String', ["bad_request", "unauthorized", "payment_required", "forbidden", "not_found", "method_not_supported", "conflict", "deleted", "unprocessable_entity", "exceeded_rate", "max_faxes", "unavailable", "maintenance", "invalid_recipient", "invalid_reminder", "team_invite_failed", "signature_request_cancel_failed", "signature_request_remove_failed", "signature_request_expired", "unknown"]) + return false unless error_name_validator.valid?(@error_name) true end @@ -152,13 +176,13 @@ def error_msg=(error_msg) @error_msg = error_msg end - # Custom attribute writer method with validation - # @param [Object] error_name Value to be assigned + # Custom attribute writer method checking allowed values (enum). + # @param [Object] error_name Object to be assigned def error_name=(error_name) - if error_name.nil? - fail ArgumentError, 'error_name cannot be nil' + validator = EnumAttributeValidator.new('String', ["bad_request", "unauthorized", "payment_required", "forbidden", "not_found", "method_not_supported", "conflict", "deleted", "unprocessable_entity", "exceeded_rate", "max_faxes", "unavailable", "maintenance", "invalid_recipient", "invalid_reminder", "team_invite_failed", "signature_request_cancel_failed", "signature_request_remove_failed", "signature_request_expired", "unknown"]) + unless validator.valid?(error_name) + fail ArgumentError, "invalid value for \"error_name\", must be one of #{validator.allowable_values}." end - @error_name = error_name end From 9fed8e20470ed54825c620bf5d13c7634b518750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20W=C3=B3jcik?= Date: Mon, 8 Jun 2026 15:03:43 +0200 Subject: [PATCH 4/6] update after refactoring script --- openapi-raw.yaml | 333 ++++++++---- openapi-sdk.yaml | 333 ++++++++---- openapi.yaml | 333 ++++++++---- sdks/dotnet/README.md | 2 + sdks/dotnet/docs/OAuthErrorResponse.md | 10 + sdks/dotnet/docs/OAuthErrorResponseError.md | 11 + .../Dropbox.Sign/Model/ErrorResponseError.cs | 86 +-- .../Dropbox.Sign/Model/OAuthErrorResponse.cs | 170 ++++++ .../Model/OAuthErrorResponseError.cs | 267 +++++++++ sdks/java-v1/README.md | 2 + sdks/java-v1/docs/ErrorResponseError.md | 16 +- sdks/java-v1/docs/OAuthErrorResponse.md | 14 + sdks/java-v1/docs/OAuthErrorResponseError.md | 33 ++ .../sign/model/ErrorResponseError.java | 28 +- .../sign/model/OAuthErrorResponse.java | 166 ++++++ .../sign/model/OAuthErrorResponseError.java | 273 ++++++++++ sdks/java-v2/README.md | 2 + sdks/java-v2/docs/ErrorResponseError.md | 16 +- sdks/java-v2/docs/OAuthErrorResponse.md | 14 + sdks/java-v2/docs/OAuthErrorResponseError.md | 33 ++ .../java/com/dropbox/sign/api/OAuthApi.java | 2 +- .../sign/model/ErrorResponseError.java | 28 +- .../sign/model/OAuthErrorResponse.java | 180 +++++++ .../sign/model/OAuthErrorResponseError.java | 283 ++++++++++ sdks/node/README.md | 2 + sdks/node/api/oAuthApi.ts | 4 +- sdks/node/dist/api.js | 94 +++- sdks/node/docs/model/OAuthErrorResponse.md | 11 + .../docs/model/OAuthErrorResponseError.md | 12 + sdks/node/model/errorResponseError.ts | 16 +- sdks/node/model/index.ts | 8 + sdks/node/model/oAuthErrorResponse.ts | 49 ++ sdks/node/model/oAuthErrorResponseError.ts | 79 +++ sdks/node/types/model/errorResponseError.d.ts | 18 +- sdks/node/types/model/index.d.ts | 4 +- sdks/node/types/model/oAuthErrorResponse.d.ts | 9 + .../types/model/oAuthErrorResponseError.d.ts | 24 + sdks/php/README.md | 2 + sdks/php/docs/Model/OAuthErrorResponse.md | 11 + .../php/docs/Model/OAuthErrorResponseError.md | 12 + sdks/php/src/Api/OAuthApi.php | 16 +- sdks/php/src/Model/ErrorResponseError.php | 32 +- sdks/php/src/Model/OAuthErrorResponse.php | 416 ++++++++++++++ .../php/src/Model/OAuthErrorResponseError.php | 507 ++++++++++++++++++ sdks/python/README.md | 2 + sdks/python/docs/OAuthErrorResponse.md | 12 + sdks/python/docs/OAuthErrorResponseError.md | 13 + sdks/python/dropbox_sign/__init__.py | 2 + sdks/python/dropbox_sign/api/o_auth_api.py | 12 +- sdks/python/dropbox_sign/models/__init__.py | 2 + .../models/error_response_error.py | 18 +- .../models/o_auth_error_response.py | 131 +++++ .../models/o_auth_error_response_error.py | 146 +++++ sdks/ruby/README.md | 2 + sdks/ruby/docs/OAuthErrorResponse.md | 10 + sdks/ruby/docs/OAuthErrorResponseError.md | 11 + sdks/ruby/lib/dropbox-sign.rb | 2 + sdks/ruby/lib/dropbox-sign/api/o_auth_api.rb | 4 +- .../models/error_response_error.rb | 4 +- .../models/o_auth_error_response.rb | 266 +++++++++ .../models/o_auth_error_response_error.rb | 318 +++++++++++ 61 files changed, 4425 insertions(+), 491 deletions(-) create mode 100644 sdks/dotnet/docs/OAuthErrorResponse.md create mode 100644 sdks/dotnet/docs/OAuthErrorResponseError.md create mode 100644 sdks/dotnet/src/Dropbox.Sign/Model/OAuthErrorResponse.cs create mode 100644 sdks/dotnet/src/Dropbox.Sign/Model/OAuthErrorResponseError.cs create mode 100644 sdks/java-v1/docs/OAuthErrorResponse.md create mode 100644 sdks/java-v1/docs/OAuthErrorResponseError.md create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthErrorResponse.java create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthErrorResponseError.java create mode 100644 sdks/java-v2/docs/OAuthErrorResponse.md create mode 100644 sdks/java-v2/docs/OAuthErrorResponseError.md create mode 100644 sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthErrorResponse.java create mode 100644 sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthErrorResponseError.java create mode 100644 sdks/node/docs/model/OAuthErrorResponse.md create mode 100644 sdks/node/docs/model/OAuthErrorResponseError.md create mode 100644 sdks/node/model/oAuthErrorResponse.ts create mode 100644 sdks/node/model/oAuthErrorResponseError.ts create mode 100644 sdks/node/types/model/oAuthErrorResponse.d.ts create mode 100644 sdks/node/types/model/oAuthErrorResponseError.d.ts create mode 100644 sdks/php/docs/Model/OAuthErrorResponse.md create mode 100644 sdks/php/docs/Model/OAuthErrorResponseError.md create mode 100644 sdks/php/src/Model/OAuthErrorResponse.php create mode 100644 sdks/php/src/Model/OAuthErrorResponseError.php create mode 100644 sdks/python/docs/OAuthErrorResponse.md create mode 100644 sdks/python/docs/OAuthErrorResponseError.md create mode 100644 sdks/python/dropbox_sign/models/o_auth_error_response.py create mode 100644 sdks/python/dropbox_sign/models/o_auth_error_response_error.py create mode 100644 sdks/ruby/docs/OAuthErrorResponse.md create mode 100644 sdks/ruby/docs/OAuthErrorResponseError.md create mode 100644 sdks/ruby/lib/dropbox-sign/models/o_auth_error_response.rb create mode 100644 sdks/ruby/lib/dropbox-sign/models/o_auth_error_response_error.rb diff --git a/openapi-raw.yaml b/openapi-raw.yaml index de2ca5625..a0addf039 100644 --- a/openapi-raw.yaml +++ b/openapi-raw.yaml @@ -2704,20 +2704,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - 400_example: - $ref: '#/components/examples/Error400Response' - 401_example: - $ref: '#/components/examples/Error401Response' - 402_example: - $ref: '#/components/examples/Error402Response' - 403_example: - $ref: '#/components/examples/Error403Response' - 429_example: - $ref: '#/components/examples/Error429Response' - 4XX_example: - $ref: '#/components/examples/Error4XXResponse' + $ref: '#/components/schemas/OAuthErrorResponse' security: [] servers: - @@ -2801,20 +2788,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - 400_example: - $ref: '#/components/examples/Error400Response' - 401_example: - $ref: '#/components/examples/Error401Response' - 402_example: - $ref: '#/components/examples/Error402Response' - 403_example: - $ref: '#/components/examples/Error403Response' - 429_example: - $ref: '#/components/examples/Error429Response' - 4XX_example: - $ref: '#/components/examples/Error4XXResponse' + $ref: '#/components/schemas/OAuthErrorResponse' security: [] servers: - @@ -11181,6 +11155,13 @@ components: type: string type: object x-internal-class: true + OAuthErrorResponse: + required: + - error + properties: + error: + $ref: '#/components/schemas/OAuthErrorResponseError' + type: object ReportCreateResponse: required: - report @@ -11528,21 +11509,21 @@ components: - payment_required - forbidden - not_found - - method_not_supported - conflict - - deleted - - unprocessable_entity - exceeded_rate + - unknown + - team_invite_failed - max_faxes - - unavailable - - maintenance - invalid_recipient - - invalid_reminder - - team_invite_failed - signature_request_cancel_failed - signature_request_remove_failed + - maintenance + - deleted + - method_not_supported + - invalid_reminder + - unavailable + - unprocessable_entity - signature_request_expired - - unknown x-fern-enum: bad_request: description: 'The request contained invalid or malformed parameters.' @@ -11554,36 +11535,36 @@ components: description: 'The action is not allowed for these credentials or in the current context.' not_found: description: 'Nothing matches the requested resource.' - method_not_supported: - description: 'The HTTP method is not supported for this endpoint.' conflict: description: 'The request was well-formed but conflicts with the current state.' - deleted: - description: 'The request was cancelled or deleted.' - unprocessable_entity: - description: 'The request was understood but the target entity cannot be processed.' exceeded_rate: description: "Your account's API request rate limit has been exceeded." + unknown: + description: 'An unexpected error occurred.' + team_invite_failed: + description: 'The team invitation could not be completed.' max_faxes: description: 'Too many fax transmissions are currently pending or transmitting.' - unavailable: - description: 'The service is temporarily unavailable.' - maintenance: - description: 'The request could not be completed because the site is under maintenance.' invalid_recipient: description: 'The recipient (fax number or email address) is invalid.' - invalid_reminder: - description: 'The signature request reminder was invalid.' - team_invite_failed: - description: 'The team invitation could not be completed.' signature_request_cancel_failed: description: 'The signature request could not be cancelled.' signature_request_remove_failed: description: 'Access to the signature request could not be removed.' + maintenance: + description: 'The request could not be completed because the site is under maintenance.' + deleted: + description: 'The request was cancelled or deleted.' + method_not_supported: + description: 'The HTTP method is not supported for this endpoint.' + invalid_reminder: + description: 'The signature request reminder was invalid.' + unavailable: + description: 'The service is temporarily unavailable.' + unprocessable_entity: + description: 'The request was understood but the target entity cannot be processed.' signature_request_expired: description: 'The signature request has expired.' - unknown: - description: 'An unexpected error occurred.' type: object FaxResponse: required: @@ -11697,6 +11678,54 @@ components: type: integer type: object x-internal-class: true + OAuthErrorResponseError: + description: '_t__OAuthErrorResponseError::DESCRIPTION' + required: + - error_msg + - error_name + properties: + error_msg: + description: '_t__OAuthErrorResponseError::ERROR_MSG' + type: string + error_name: + description: '_t__OAuthErrorResponseError::ERROR_NAME' + type: string + enum: + - invalid_grant + - invalid_client + - invalid_request + - unauthorized_client + - unsupported_grant_type + - payment_required + - addon_required + - invalid_scope + - quota_reached + - server_error + - temporary_unavailable + x-fern-enum: + invalid_grant: + description: 'The OAuth grant (authorization code or refresh token) is invalid or expired.' + invalid_client: + description: 'The OAuth client credentials are invalid.' + invalid_request: + description: 'The OAuth request is malformed or missing required parameters.' + unauthorized_client: + description: 'The OAuth client is not authorized to perform this action.' + unsupported_grant_type: + description: 'The grant type is not supported.' + payment_required: + description: 'The account requires a paid plan to use this OAuth app.' + addon_required: + description: 'An add-on is required to use this OAuth app.' + invalid_scope: + description: 'The requested OAuth scope is invalid.' + quota_reached: + description: 'The account has reached its usage quota for this OAuth app.' + server_error: + description: 'An internal server error occurred during OAuth processing.' + temporary_unavailable: + description: 'The OAuth service is temporarily unavailable.' + type: object ReportResponse: description: '_t__ReportResponse::DESCRIPTION' properties: @@ -14067,13 +14096,6 @@ x-error-codes: remediation: 'Verify the id and that the resource belongs to the authenticated account.' retryable: 'no' category: not_found - method_not_supported: - http_status: 405 - summary: 'The HTTP method is not supported for this endpoint.' - cause: 'The request used a verb the endpoint does not accept.' - remediation: 'Use the HTTP method documented for the endpoint.' - retryable: 'no' - category: validation conflict: http_status: 409 summary: 'The request was well-formed but conflicts with the current state.' @@ -14081,21 +14103,6 @@ x-error-codes: remediation: 'Re-read the resource state, resolve the conflict, then retry.' retryable: conditional category: conflict - deleted: - http_status: 410 - summary: 'The request was cancelled or deleted.' - cause: 'The resource has been cancelled or removed and is no longer available.' - remediation: 'Do not retry; the resource is permanently gone.' - retryable: 'no' - category: not_found - unprocessable_entity: - http_status: 422 - summary: 'The request was understood but the target entity cannot be processed.' - cause: 'The resource is still being processed, or it is in an error state.' - remediation: 'If the resource is still processing, wait and retry; if it is in an error state, recreate/resend it instead of retrying.' - retryable: conditional - category: validation - backoff: 'If still processing, retry with exponential backoff; if in an error state, do not retry.' exceeded_rate: http_status: 429 summary: "Your account's API request rate limit has been exceeded." @@ -14104,6 +14111,21 @@ x-error-codes: retryable: 'yes' category: rate_limit backoff: 'Honor X-Ratelimit-Reset (Unix epoch); otherwise exponential backoff with jitter. No Retry-After header is sent.' + unknown: + http_status: 500 + summary: 'An unexpected error occurred.' + cause: 'An unhandled server-side error, or a status code without a more specific error_name.' + remediation: 'Retry transient failures; if it persists, contact support with the request details.' + retryable: conditional + category: server + backoff: 'For transient 5xx, retry with exponential backoff; otherwise do not retry.' + team_invite_failed: + http_status: 403 + summary: 'The team invitation could not be completed.' + cause: 'The invitee already belongs to a team, or the invite is otherwise not permitted.' + remediation: 'Confirm the invitee is not already on a team before inviting.' + retryable: 'no' + category: validation max_faxes: http_status: 429 summary: 'Too many fax transmissions are currently pending or transmitting.' @@ -14112,22 +14134,6 @@ x-error-codes: retryable: 'yes' category: rate_limit backoff: 'Retry with exponential backoff once pending transmissions clear.' - unavailable: - http_status: 503 - summary: 'The service is temporarily unavailable.' - cause: 'A downstream dependency or the service itself is temporarily unavailable.' - remediation: 'Retry later with exponential backoff.' - retryable: 'yes' - category: maintenance - backoff: 'Retry later with exponential backoff and jitter.' - maintenance: - http_status: 503 - summary: 'The request could not be completed because the site is under maintenance.' - cause: 'The API is in a scheduled maintenance window.' - remediation: 'Retry once the maintenance window ends.' - retryable: 'yes' - category: maintenance - backoff: 'Retry later with exponential backoff.' invalid_recipient: http_status: 400 summary: 'The recipient (fax number or email address) is invalid.' @@ -14135,20 +14141,6 @@ x-error-codes: remediation: 'Correct the recipient value and resend.' retryable: 'no' category: validation - invalid_reminder: - http_status: 400 - summary: 'The signature request reminder was invalid.' - cause: 'A reminder was attempted against an ineligible request (e.g. embedded, closed, or expired).' - remediation: 'Only send reminders for eligible (non-embedded, open) signature requests.' - retryable: 'no' - category: validation - team_invite_failed: - http_status: 403 - summary: 'The team invitation could not be completed.' - cause: 'The invitee already belongs to a team, or the invite is otherwise not permitted.' - remediation: 'Confirm the invitee is not already on a team before inviting.' - retryable: 'no' - category: validation signature_request_cancel_failed: http_status: 400 summary: 'The signature request could not be cancelled.' @@ -14163,6 +14155,51 @@ x-error-codes: remediation: 'Access can only be removed once the request is fully executed; use /signature_request/cancel for incomplete requests.' retryable: 'no' category: conflict + maintenance: + http_status: 503 + summary: 'The request could not be completed because the site is under maintenance.' + cause: 'The API is in a scheduled maintenance window.' + remediation: 'Retry once the maintenance window ends.' + retryable: 'yes' + category: maintenance + backoff: 'Retry later with exponential backoff.' + deleted: + http_status: 410 + summary: 'The request was cancelled or deleted.' + cause: 'The resource has been cancelled or removed and is no longer available.' + remediation: 'Do not retry; the resource is permanently gone.' + retryable: 'no' + category: not_found + method_not_supported: + http_status: 405 + summary: 'The HTTP method is not supported for this endpoint.' + cause: 'The request used a verb the endpoint does not accept.' + remediation: 'Use the HTTP method documented for the endpoint.' + retryable: 'no' + category: validation + invalid_reminder: + http_status: 400 + summary: 'The signature request reminder was invalid.' + cause: 'A reminder was attempted against an ineligible request (e.g. embedded, closed, or expired).' + remediation: 'Only send reminders for eligible (non-embedded, open) signature requests.' + retryable: 'no' + category: validation + unavailable: + http_status: 503 + summary: 'The service is temporarily unavailable.' + cause: 'A downstream dependency or the service itself is temporarily unavailable.' + remediation: 'Retry later with exponential backoff.' + retryable: 'yes' + category: maintenance + backoff: 'Retry later with exponential backoff and jitter.' + unprocessable_entity: + http_status: 422 + summary: 'The request was understood but the target entity cannot be processed.' + cause: 'The resource is still being processed, or it is in an error state.' + remediation: 'If the resource is still processing, wait and retry; if it is in an error state, recreate/resend it instead of retrying.' + retryable: conditional + category: validation + backoff: 'If still processing, retry with exponential backoff; if in an error state, do not retry.' signature_request_expired: http_status: - 400 @@ -14172,14 +14209,90 @@ x-error-codes: remediation: 'The request can no longer be acted upon; create a new signature request.' retryable: 'no' category: conflict - unknown: +x-oauth-error-codes: + invalid_grant: + http_status: + - 400 + - 401 + summary: 'The OAuth grant (authorization code or refresh token) is invalid or expired.' + cause: 'The code/token was already used, expired, or does not match the client.' + remediation: 'Re-initiate the OAuth flow to obtain a fresh authorization code.' + retryable: 'no' + category: auth + invalid_client: + http_status: 400 + summary: 'The OAuth client credentials are invalid.' + cause: 'The client_id or client_secret is unrecognized or incorrect.' + remediation: 'Verify the client_id and client_secret from the API app settings.' + retryable: 'no' + category: auth + invalid_request: + http_status: 400 + summary: 'The OAuth request is malformed or missing required parameters.' + cause: 'A required parameter is missing, or the request format is invalid.' + remediation: 'Check the request against the OAuth token endpoint documentation.' + retryable: 'no' + category: validation + unauthorized_client: + http_status: + - 401 + - 403 + summary: 'The OAuth client is not authorized to perform this action.' + cause: 'The app has not been approved, or the action is outside the granted scopes.' + remediation: 'Ensure the app is approved and the required scopes are granted.' + retryable: 'no' + category: auth + unsupported_grant_type: + http_status: 400 + summary: 'The grant type is not supported.' + cause: 'The grant_type parameter value is not recognized.' + remediation: 'Use authorization_code or refresh_token as the grant_type.' + retryable: 'no' + category: validation + payment_required: + http_status: 402 + summary: 'The account requires a paid plan to use this OAuth app.' + cause: 'The authorizing account does not have a plan that supports this integration.' + remediation: 'Upgrade the account to a plan that includes OAuth app access.' + retryable: 'no' + category: plan + addon_required: + http_status: 402 + summary: 'An add-on is required to use this OAuth app.' + cause: 'The account plan does not include the add-on needed for this integration.' + remediation: 'Add the required add-on to the account subscription.' + retryable: 'no' + category: plan + invalid_scope: + http_status: 400 + summary: 'The requested OAuth scope is invalid.' + cause: 'The scope parameter contains values not permitted for the app.' + remediation: 'Request only scopes that the app is configured to use.' + retryable: 'no' + category: validation + quota_reached: + http_status: 402 + summary: 'The account has reached its usage quota for this OAuth app.' + cause: 'The authorizing account has exhausted its quota for the integration.' + remediation: 'Contact the app owner or upgrade the account quota.' + retryable: 'no' + category: plan + server_error: http_status: 500 - summary: 'An unexpected error occurred.' - cause: 'An unhandled server-side error, or a status code without a more specific error_name.' - remediation: 'Retry transient failures; if it persists, contact support with the request details.' - retryable: conditional + summary: 'An internal server error occurred during OAuth processing.' + cause: 'An unexpected error on the server side while handling the OAuth request.' + remediation: 'Retry the request; if it persists, contact support.' + retryable: 'yes' category: server - backoff: 'For transient 5xx, retry with exponential backoff; otherwise do not retry.' + backoff: 'Retry with exponential backoff.' + temporary_unavailable: + http_status: 503 + summary: 'The OAuth service is temporarily unavailable.' + cause: 'The service is under maintenance or experiencing temporary issues.' + remediation: 'Retry after a short delay.' + retryable: 'yes' + category: maintenance + backoff: 'Retry with exponential backoff.' x-error-events: signature_request_invalid: event_type: signature_request_invalid diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index 469ac65a9..8bc2a258c 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -2669,20 +2669,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - 400_example: - $ref: '#/components/examples/Error400Response' - 401_example: - $ref: '#/components/examples/Error401Response' - 402_example: - $ref: '#/components/examples/Error402Response' - 403_example: - $ref: '#/components/examples/Error403Response' - 429_example: - $ref: '#/components/examples/Error429Response' - 4XX_example: - $ref: '#/components/examples/Error4XXResponse' + $ref: '#/components/schemas/OAuthErrorResponse' security: [] servers: - @@ -2766,20 +2753,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - 400_example: - $ref: '#/components/examples/Error400Response' - 401_example: - $ref: '#/components/examples/Error401Response' - 402_example: - $ref: '#/components/examples/Error402Response' - 403_example: - $ref: '#/components/examples/Error403Response' - 429_example: - $ref: '#/components/examples/Error429Response' - 4XX_example: - $ref: '#/components/examples/Error4XXResponse' + $ref: '#/components/schemas/OAuthErrorResponse' security: [] servers: - @@ -11604,6 +11578,13 @@ components: type: string type: object x-internal-class: true + OAuthErrorResponse: + required: + - error + properties: + error: + $ref: '#/components/schemas/OAuthErrorResponseError' + type: object ReportCreateResponse: required: - report @@ -11951,21 +11932,21 @@ components: - payment_required - forbidden - not_found - - method_not_supported - conflict - - deleted - - unprocessable_entity - exceeded_rate + - unknown + - team_invite_failed - max_faxes - - unavailable - - maintenance - invalid_recipient - - invalid_reminder - - team_invite_failed - signature_request_cancel_failed - signature_request_remove_failed + - maintenance + - deleted + - method_not_supported + - invalid_reminder + - unavailable + - unprocessable_entity - signature_request_expired - - unknown x-fern-enum: bad_request: description: 'The request contained invalid or malformed parameters.' @@ -11977,36 +11958,36 @@ components: description: 'The action is not allowed for these credentials or in the current context.' not_found: description: 'Nothing matches the requested resource.' - method_not_supported: - description: 'The HTTP method is not supported for this endpoint.' conflict: description: 'The request was well-formed but conflicts with the current state.' - deleted: - description: 'The request was cancelled or deleted.' - unprocessable_entity: - description: 'The request was understood but the target entity cannot be processed.' exceeded_rate: description: 'Your account''s API request rate limit has been exceeded.' + unknown: + description: 'An unexpected error occurred.' + team_invite_failed: + description: 'The team invitation could not be completed.' max_faxes: description: 'Too many fax transmissions are currently pending or transmitting.' - unavailable: - description: 'The service is temporarily unavailable.' - maintenance: - description: 'The request could not be completed because the site is under maintenance.' invalid_recipient: description: 'The recipient (fax number or email address) is invalid.' - invalid_reminder: - description: 'The signature request reminder was invalid.' - team_invite_failed: - description: 'The team invitation could not be completed.' signature_request_cancel_failed: description: 'The signature request could not be cancelled.' signature_request_remove_failed: description: 'Access to the signature request could not be removed.' + maintenance: + description: 'The request could not be completed because the site is under maintenance.' + deleted: + description: 'The request was cancelled or deleted.' + method_not_supported: + description: 'The HTTP method is not supported for this endpoint.' + invalid_reminder: + description: 'The signature request reminder was invalid.' + unavailable: + description: 'The service is temporarily unavailable.' + unprocessable_entity: + description: 'The request was understood but the target entity cannot be processed.' signature_request_expired: description: 'The signature request has expired.' - unknown: - description: 'An unexpected error occurred.' type: object FaxResponse: required: @@ -12120,6 +12101,54 @@ components: type: integer type: object x-internal-class: true + OAuthErrorResponseError: + description: '_t__OAuthErrorResponseError::DESCRIPTION' + required: + - error_msg + - error_name + properties: + error_msg: + description: '_t__OAuthErrorResponseError::ERROR_MSG' + type: string + error_name: + description: '_t__OAuthErrorResponseError::ERROR_NAME' + type: string + enum: + - invalid_grant + - invalid_client + - invalid_request + - unauthorized_client + - unsupported_grant_type + - payment_required + - addon_required + - invalid_scope + - quota_reached + - server_error + - temporary_unavailable + x-fern-enum: + invalid_grant: + description: 'The OAuth grant (authorization code or refresh token) is invalid or expired.' + invalid_client: + description: 'The OAuth client credentials are invalid.' + invalid_request: + description: 'The OAuth request is malformed or missing required parameters.' + unauthorized_client: + description: 'The OAuth client is not authorized to perform this action.' + unsupported_grant_type: + description: 'The grant type is not supported.' + payment_required: + description: 'The account requires a paid plan to use this OAuth app.' + addon_required: + description: 'An add-on is required to use this OAuth app.' + invalid_scope: + description: 'The requested OAuth scope is invalid.' + quota_reached: + description: 'The account has reached its usage quota for this OAuth app.' + server_error: + description: 'An internal server error occurred during OAuth processing.' + temporary_unavailable: + description: 'The OAuth service is temporarily unavailable.' + type: object ReportResponse: description: 'Contains information about the report request.' properties: @@ -14605,13 +14634,6 @@ x-error-codes: remediation: 'Verify the id and that the resource belongs to the authenticated account.' retryable: 'no' category: not_found - method_not_supported: - http_status: 405 - summary: 'The HTTP method is not supported for this endpoint.' - cause: 'The request used a verb the endpoint does not accept.' - remediation: 'Use the HTTP method documented for the endpoint.' - retryable: 'no' - category: validation conflict: http_status: 409 summary: 'The request was well-formed but conflicts with the current state.' @@ -14619,21 +14641,6 @@ x-error-codes: remediation: 'Re-read the resource state, resolve the conflict, then retry.' retryable: conditional category: conflict - deleted: - http_status: 410 - summary: 'The request was cancelled or deleted.' - cause: 'The resource has been cancelled or removed and is no longer available.' - remediation: 'Do not retry; the resource is permanently gone.' - retryable: 'no' - category: not_found - unprocessable_entity: - http_status: 422 - summary: 'The request was understood but the target entity cannot be processed.' - cause: 'The resource is still being processed, or it is in an error state.' - remediation: 'If the resource is still processing, wait and retry; if it is in an error state, recreate/resend it instead of retrying.' - retryable: conditional - category: validation - backoff: 'If still processing, retry with exponential backoff; if in an error state, do not retry.' exceeded_rate: http_status: 429 summary: 'Your account''s API request rate limit has been exceeded.' @@ -14642,6 +14649,21 @@ x-error-codes: retryable: 'yes' category: rate_limit backoff: 'Honor X-Ratelimit-Reset (Unix epoch); otherwise exponential backoff with jitter. No Retry-After header is sent.' + unknown: + http_status: 500 + summary: 'An unexpected error occurred.' + cause: 'An unhandled server-side error, or a status code without a more specific error_name.' + remediation: 'Retry transient failures; if it persists, contact support with the request details.' + retryable: conditional + category: server + backoff: 'For transient 5xx, retry with exponential backoff; otherwise do not retry.' + team_invite_failed: + http_status: 403 + summary: 'The team invitation could not be completed.' + cause: 'The invitee already belongs to a team, or the invite is otherwise not permitted.' + remediation: 'Confirm the invitee is not already on a team before inviting.' + retryable: 'no' + category: validation max_faxes: http_status: 429 summary: 'Too many fax transmissions are currently pending or transmitting.' @@ -14650,22 +14672,6 @@ x-error-codes: retryable: 'yes' category: rate_limit backoff: 'Retry with exponential backoff once pending transmissions clear.' - unavailable: - http_status: 503 - summary: 'The service is temporarily unavailable.' - cause: 'A downstream dependency or the service itself is temporarily unavailable.' - remediation: 'Retry later with exponential backoff.' - retryable: 'yes' - category: maintenance - backoff: 'Retry later with exponential backoff and jitter.' - maintenance: - http_status: 503 - summary: 'The request could not be completed because the site is under maintenance.' - cause: 'The API is in a scheduled maintenance window.' - remediation: 'Retry once the maintenance window ends.' - retryable: 'yes' - category: maintenance - backoff: 'Retry later with exponential backoff.' invalid_recipient: http_status: 400 summary: 'The recipient (fax number or email address) is invalid.' @@ -14673,20 +14679,6 @@ x-error-codes: remediation: 'Correct the recipient value and resend.' retryable: 'no' category: validation - invalid_reminder: - http_status: 400 - summary: 'The signature request reminder was invalid.' - cause: 'A reminder was attempted against an ineligible request (e.g. embedded, closed, or expired).' - remediation: 'Only send reminders for eligible (non-embedded, open) signature requests.' - retryable: 'no' - category: validation - team_invite_failed: - http_status: 403 - summary: 'The team invitation could not be completed.' - cause: 'The invitee already belongs to a team, or the invite is otherwise not permitted.' - remediation: 'Confirm the invitee is not already on a team before inviting.' - retryable: 'no' - category: validation signature_request_cancel_failed: http_status: 400 summary: 'The signature request could not be cancelled.' @@ -14701,6 +14693,51 @@ x-error-codes: remediation: 'Access can only be removed once the request is fully executed; use /signature_request/cancel for incomplete requests.' retryable: 'no' category: conflict + maintenance: + http_status: 503 + summary: 'The request could not be completed because the site is under maintenance.' + cause: 'The API is in a scheduled maintenance window.' + remediation: 'Retry once the maintenance window ends.' + retryable: 'yes' + category: maintenance + backoff: 'Retry later with exponential backoff.' + deleted: + http_status: 410 + summary: 'The request was cancelled or deleted.' + cause: 'The resource has been cancelled or removed and is no longer available.' + remediation: 'Do not retry; the resource is permanently gone.' + retryable: 'no' + category: not_found + method_not_supported: + http_status: 405 + summary: 'The HTTP method is not supported for this endpoint.' + cause: 'The request used a verb the endpoint does not accept.' + remediation: 'Use the HTTP method documented for the endpoint.' + retryable: 'no' + category: validation + invalid_reminder: + http_status: 400 + summary: 'The signature request reminder was invalid.' + cause: 'A reminder was attempted against an ineligible request (e.g. embedded, closed, or expired).' + remediation: 'Only send reminders for eligible (non-embedded, open) signature requests.' + retryable: 'no' + category: validation + unavailable: + http_status: 503 + summary: 'The service is temporarily unavailable.' + cause: 'A downstream dependency or the service itself is temporarily unavailable.' + remediation: 'Retry later with exponential backoff.' + retryable: 'yes' + category: maintenance + backoff: 'Retry later with exponential backoff and jitter.' + unprocessable_entity: + http_status: 422 + summary: 'The request was understood but the target entity cannot be processed.' + cause: 'The resource is still being processed, or it is in an error state.' + remediation: 'If the resource is still processing, wait and retry; if it is in an error state, recreate/resend it instead of retrying.' + retryable: conditional + category: validation + backoff: 'If still processing, retry with exponential backoff; if in an error state, do not retry.' signature_request_expired: http_status: - 400 @@ -14710,14 +14747,90 @@ x-error-codes: remediation: 'The request can no longer be acted upon; create a new signature request.' retryable: 'no' category: conflict - unknown: +x-oauth-error-codes: + invalid_grant: + http_status: + - 400 + - 401 + summary: 'The OAuth grant (authorization code or refresh token) is invalid or expired.' + cause: 'The code/token was already used, expired, or does not match the client.' + remediation: 'Re-initiate the OAuth flow to obtain a fresh authorization code.' + retryable: 'no' + category: auth + invalid_client: + http_status: 400 + summary: 'The OAuth client credentials are invalid.' + cause: 'The client_id or client_secret is unrecognized or incorrect.' + remediation: 'Verify the client_id and client_secret from the API app settings.' + retryable: 'no' + category: auth + invalid_request: + http_status: 400 + summary: 'The OAuth request is malformed or missing required parameters.' + cause: 'A required parameter is missing, or the request format is invalid.' + remediation: 'Check the request against the OAuth token endpoint documentation.' + retryable: 'no' + category: validation + unauthorized_client: + http_status: + - 401 + - 403 + summary: 'The OAuth client is not authorized to perform this action.' + cause: 'The app has not been approved, or the action is outside the granted scopes.' + remediation: 'Ensure the app is approved and the required scopes are granted.' + retryable: 'no' + category: auth + unsupported_grant_type: + http_status: 400 + summary: 'The grant type is not supported.' + cause: 'The grant_type parameter value is not recognized.' + remediation: 'Use authorization_code or refresh_token as the grant_type.' + retryable: 'no' + category: validation + payment_required: + http_status: 402 + summary: 'The account requires a paid plan to use this OAuth app.' + cause: 'The authorizing account does not have a plan that supports this integration.' + remediation: 'Upgrade the account to a plan that includes OAuth app access.' + retryable: 'no' + category: plan + addon_required: + http_status: 402 + summary: 'An add-on is required to use this OAuth app.' + cause: 'The account plan does not include the add-on needed for this integration.' + remediation: 'Add the required add-on to the account subscription.' + retryable: 'no' + category: plan + invalid_scope: + http_status: 400 + summary: 'The requested OAuth scope is invalid.' + cause: 'The scope parameter contains values not permitted for the app.' + remediation: 'Request only scopes that the app is configured to use.' + retryable: 'no' + category: validation + quota_reached: + http_status: 402 + summary: 'The account has reached its usage quota for this OAuth app.' + cause: 'The authorizing account has exhausted its quota for the integration.' + remediation: 'Contact the app owner or upgrade the account quota.' + retryable: 'no' + category: plan + server_error: http_status: 500 - summary: 'An unexpected error occurred.' - cause: 'An unhandled server-side error, or a status code without a more specific error_name.' - remediation: 'Retry transient failures; if it persists, contact support with the request details.' - retryable: conditional + summary: 'An internal server error occurred during OAuth processing.' + cause: 'An unexpected error on the server side while handling the OAuth request.' + remediation: 'Retry the request; if it persists, contact support.' + retryable: 'yes' category: server - backoff: 'For transient 5xx, retry with exponential backoff; otherwise do not retry.' + backoff: 'Retry with exponential backoff.' + temporary_unavailable: + http_status: 503 + summary: 'The OAuth service is temporarily unavailable.' + cause: 'The service is under maintenance or experiencing temporary issues.' + remediation: 'Retry after a short delay.' + retryable: 'yes' + category: maintenance + backoff: 'Retry with exponential backoff.' x-error-events: signature_request_invalid: event_type: signature_request_invalid diff --git a/openapi.yaml b/openapi.yaml index f043f8fd2..a4dc34037 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -2669,20 +2669,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - 400_example: - $ref: '#/components/examples/Error400Response' - 401_example: - $ref: '#/components/examples/Error401Response' - 402_example: - $ref: '#/components/examples/Error402Response' - 403_example: - $ref: '#/components/examples/Error403Response' - 429_example: - $ref: '#/components/examples/Error429Response' - 4XX_example: - $ref: '#/components/examples/Error4XXResponse' + $ref: '#/components/schemas/OAuthErrorResponse' security: [] servers: - @@ -2766,20 +2753,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - examples: - 400_example: - $ref: '#/components/examples/Error400Response' - 401_example: - $ref: '#/components/examples/Error401Response' - 402_example: - $ref: '#/components/examples/Error402Response' - 403_example: - $ref: '#/components/examples/Error403Response' - 429_example: - $ref: '#/components/examples/Error429Response' - 4XX_example: - $ref: '#/components/examples/Error4XXResponse' + $ref: '#/components/schemas/OAuthErrorResponse' security: [] servers: - @@ -11584,6 +11558,13 @@ components: type: string type: object x-internal-class: true + OAuthErrorResponse: + required: + - error + properties: + error: + $ref: '#/components/schemas/OAuthErrorResponseError' + type: object ReportCreateResponse: required: - report @@ -11931,21 +11912,21 @@ components: - payment_required - forbidden - not_found - - method_not_supported - conflict - - deleted - - unprocessable_entity - exceeded_rate + - unknown + - team_invite_failed - max_faxes - - unavailable - - maintenance - invalid_recipient - - invalid_reminder - - team_invite_failed - signature_request_cancel_failed - signature_request_remove_failed + - maintenance + - deleted + - method_not_supported + - invalid_reminder + - unavailable + - unprocessable_entity - signature_request_expired - - unknown x-fern-enum: bad_request: description: 'The request contained invalid or malformed parameters.' @@ -11957,36 +11938,36 @@ components: description: 'The action is not allowed for these credentials or in the current context.' not_found: description: 'Nothing matches the requested resource.' - method_not_supported: - description: 'The HTTP method is not supported for this endpoint.' conflict: description: 'The request was well-formed but conflicts with the current state.' - deleted: - description: 'The request was cancelled or deleted.' - unprocessable_entity: - description: 'The request was understood but the target entity cannot be processed.' exceeded_rate: description: 'Your account''s API request rate limit has been exceeded.' + unknown: + description: 'An unexpected error occurred.' + team_invite_failed: + description: 'The team invitation could not be completed.' max_faxes: description: 'Too many fax transmissions are currently pending or transmitting.' - unavailable: - description: 'The service is temporarily unavailable.' - maintenance: - description: 'The request could not be completed because the site is under maintenance.' invalid_recipient: description: 'The recipient (fax number or email address) is invalid.' - invalid_reminder: - description: 'The signature request reminder was invalid.' - team_invite_failed: - description: 'The team invitation could not be completed.' signature_request_cancel_failed: description: 'The signature request could not be cancelled.' signature_request_remove_failed: description: 'Access to the signature request could not be removed.' + maintenance: + description: 'The request could not be completed because the site is under maintenance.' + deleted: + description: 'The request was cancelled or deleted.' + method_not_supported: + description: 'The HTTP method is not supported for this endpoint.' + invalid_reminder: + description: 'The signature request reminder was invalid.' + unavailable: + description: 'The service is temporarily unavailable.' + unprocessable_entity: + description: 'The request was understood but the target entity cannot be processed.' signature_request_expired: description: 'The signature request has expired.' - unknown: - description: 'An unexpected error occurred.' type: object FaxResponse: required: @@ -12100,6 +12081,54 @@ components: type: integer type: object x-internal-class: true + OAuthErrorResponseError: + description: '_t__OAuthErrorResponseError::DESCRIPTION' + required: + - error_msg + - error_name + properties: + error_msg: + description: '_t__OAuthErrorResponseError::ERROR_MSG' + type: string + error_name: + description: '_t__OAuthErrorResponseError::ERROR_NAME' + type: string + enum: + - invalid_grant + - invalid_client + - invalid_request + - unauthorized_client + - unsupported_grant_type + - payment_required + - addon_required + - invalid_scope + - quota_reached + - server_error + - temporary_unavailable + x-fern-enum: + invalid_grant: + description: 'The OAuth grant (authorization code or refresh token) is invalid or expired.' + invalid_client: + description: 'The OAuth client credentials are invalid.' + invalid_request: + description: 'The OAuth request is malformed or missing required parameters.' + unauthorized_client: + description: 'The OAuth client is not authorized to perform this action.' + unsupported_grant_type: + description: 'The grant type is not supported.' + payment_required: + description: 'The account requires a paid plan to use this OAuth app.' + addon_required: + description: 'An add-on is required to use this OAuth app.' + invalid_scope: + description: 'The requested OAuth scope is invalid.' + quota_reached: + description: 'The account has reached its usage quota for this OAuth app.' + server_error: + description: 'An internal server error occurred during OAuth processing.' + temporary_unavailable: + description: 'The OAuth service is temporarily unavailable.' + type: object ReportResponse: description: 'Contains information about the report request.' properties: @@ -14640,13 +14669,6 @@ x-error-codes: remediation: 'Verify the id and that the resource belongs to the authenticated account.' retryable: 'no' category: not_found - method_not_supported: - http_status: 405 - summary: 'The HTTP method is not supported for this endpoint.' - cause: 'The request used a verb the endpoint does not accept.' - remediation: 'Use the HTTP method documented for the endpoint.' - retryable: 'no' - category: validation conflict: http_status: 409 summary: 'The request was well-formed but conflicts with the current state.' @@ -14654,21 +14676,6 @@ x-error-codes: remediation: 'Re-read the resource state, resolve the conflict, then retry.' retryable: conditional category: conflict - deleted: - http_status: 410 - summary: 'The request was cancelled or deleted.' - cause: 'The resource has been cancelled or removed and is no longer available.' - remediation: 'Do not retry; the resource is permanently gone.' - retryable: 'no' - category: not_found - unprocessable_entity: - http_status: 422 - summary: 'The request was understood but the target entity cannot be processed.' - cause: 'The resource is still being processed, or it is in an error state.' - remediation: 'If the resource is still processing, wait and retry; if it is in an error state, recreate/resend it instead of retrying.' - retryable: conditional - category: validation - backoff: 'If still processing, retry with exponential backoff; if in an error state, do not retry.' exceeded_rate: http_status: 429 summary: 'Your account''s API request rate limit has been exceeded.' @@ -14677,6 +14684,21 @@ x-error-codes: retryable: 'yes' category: rate_limit backoff: 'Honor X-Ratelimit-Reset (Unix epoch); otherwise exponential backoff with jitter. No Retry-After header is sent.' + unknown: + http_status: 500 + summary: 'An unexpected error occurred.' + cause: 'An unhandled server-side error, or a status code without a more specific error_name.' + remediation: 'Retry transient failures; if it persists, contact support with the request details.' + retryable: conditional + category: server + backoff: 'For transient 5xx, retry with exponential backoff; otherwise do not retry.' + team_invite_failed: + http_status: 403 + summary: 'The team invitation could not be completed.' + cause: 'The invitee already belongs to a team, or the invite is otherwise not permitted.' + remediation: 'Confirm the invitee is not already on a team before inviting.' + retryable: 'no' + category: validation max_faxes: http_status: 429 summary: 'Too many fax transmissions are currently pending or transmitting.' @@ -14685,22 +14707,6 @@ x-error-codes: retryable: 'yes' category: rate_limit backoff: 'Retry with exponential backoff once pending transmissions clear.' - unavailable: - http_status: 503 - summary: 'The service is temporarily unavailable.' - cause: 'A downstream dependency or the service itself is temporarily unavailable.' - remediation: 'Retry later with exponential backoff.' - retryable: 'yes' - category: maintenance - backoff: 'Retry later with exponential backoff and jitter.' - maintenance: - http_status: 503 - summary: 'The request could not be completed because the site is under maintenance.' - cause: 'The API is in a scheduled maintenance window.' - remediation: 'Retry once the maintenance window ends.' - retryable: 'yes' - category: maintenance - backoff: 'Retry later with exponential backoff.' invalid_recipient: http_status: 400 summary: 'The recipient (fax number or email address) is invalid.' @@ -14708,20 +14714,6 @@ x-error-codes: remediation: 'Correct the recipient value and resend.' retryable: 'no' category: validation - invalid_reminder: - http_status: 400 - summary: 'The signature request reminder was invalid.' - cause: 'A reminder was attempted against an ineligible request (e.g. embedded, closed, or expired).' - remediation: 'Only send reminders for eligible (non-embedded, open) signature requests.' - retryable: 'no' - category: validation - team_invite_failed: - http_status: 403 - summary: 'The team invitation could not be completed.' - cause: 'The invitee already belongs to a team, or the invite is otherwise not permitted.' - remediation: 'Confirm the invitee is not already on a team before inviting.' - retryable: 'no' - category: validation signature_request_cancel_failed: http_status: 400 summary: 'The signature request could not be cancelled.' @@ -14736,6 +14728,51 @@ x-error-codes: remediation: 'Access can only be removed once the request is fully executed; use /signature_request/cancel for incomplete requests.' retryable: 'no' category: conflict + maintenance: + http_status: 503 + summary: 'The request could not be completed because the site is under maintenance.' + cause: 'The API is in a scheduled maintenance window.' + remediation: 'Retry once the maintenance window ends.' + retryable: 'yes' + category: maintenance + backoff: 'Retry later with exponential backoff.' + deleted: + http_status: 410 + summary: 'The request was cancelled or deleted.' + cause: 'The resource has been cancelled or removed and is no longer available.' + remediation: 'Do not retry; the resource is permanently gone.' + retryable: 'no' + category: not_found + method_not_supported: + http_status: 405 + summary: 'The HTTP method is not supported for this endpoint.' + cause: 'The request used a verb the endpoint does not accept.' + remediation: 'Use the HTTP method documented for the endpoint.' + retryable: 'no' + category: validation + invalid_reminder: + http_status: 400 + summary: 'The signature request reminder was invalid.' + cause: 'A reminder was attempted against an ineligible request (e.g. embedded, closed, or expired).' + remediation: 'Only send reminders for eligible (non-embedded, open) signature requests.' + retryable: 'no' + category: validation + unavailable: + http_status: 503 + summary: 'The service is temporarily unavailable.' + cause: 'A downstream dependency or the service itself is temporarily unavailable.' + remediation: 'Retry later with exponential backoff.' + retryable: 'yes' + category: maintenance + backoff: 'Retry later with exponential backoff and jitter.' + unprocessable_entity: + http_status: 422 + summary: 'The request was understood but the target entity cannot be processed.' + cause: 'The resource is still being processed, or it is in an error state.' + remediation: 'If the resource is still processing, wait and retry; if it is in an error state, recreate/resend it instead of retrying.' + retryable: conditional + category: validation + backoff: 'If still processing, retry with exponential backoff; if in an error state, do not retry.' signature_request_expired: http_status: - 400 @@ -14745,14 +14782,90 @@ x-error-codes: remediation: 'The request can no longer be acted upon; create a new signature request.' retryable: 'no' category: conflict - unknown: +x-oauth-error-codes: + invalid_grant: + http_status: + - 400 + - 401 + summary: 'The OAuth grant (authorization code or refresh token) is invalid or expired.' + cause: 'The code/token was already used, expired, or does not match the client.' + remediation: 'Re-initiate the OAuth flow to obtain a fresh authorization code.' + retryable: 'no' + category: auth + invalid_client: + http_status: 400 + summary: 'The OAuth client credentials are invalid.' + cause: 'The client_id or client_secret is unrecognized or incorrect.' + remediation: 'Verify the client_id and client_secret from the API app settings.' + retryable: 'no' + category: auth + invalid_request: + http_status: 400 + summary: 'The OAuth request is malformed or missing required parameters.' + cause: 'A required parameter is missing, or the request format is invalid.' + remediation: 'Check the request against the OAuth token endpoint documentation.' + retryable: 'no' + category: validation + unauthorized_client: + http_status: + - 401 + - 403 + summary: 'The OAuth client is not authorized to perform this action.' + cause: 'The app has not been approved, or the action is outside the granted scopes.' + remediation: 'Ensure the app is approved and the required scopes are granted.' + retryable: 'no' + category: auth + unsupported_grant_type: + http_status: 400 + summary: 'The grant type is not supported.' + cause: 'The grant_type parameter value is not recognized.' + remediation: 'Use authorization_code or refresh_token as the grant_type.' + retryable: 'no' + category: validation + payment_required: + http_status: 402 + summary: 'The account requires a paid plan to use this OAuth app.' + cause: 'The authorizing account does not have a plan that supports this integration.' + remediation: 'Upgrade the account to a plan that includes OAuth app access.' + retryable: 'no' + category: plan + addon_required: + http_status: 402 + summary: 'An add-on is required to use this OAuth app.' + cause: 'The account plan does not include the add-on needed for this integration.' + remediation: 'Add the required add-on to the account subscription.' + retryable: 'no' + category: plan + invalid_scope: + http_status: 400 + summary: 'The requested OAuth scope is invalid.' + cause: 'The scope parameter contains values not permitted for the app.' + remediation: 'Request only scopes that the app is configured to use.' + retryable: 'no' + category: validation + quota_reached: + http_status: 402 + summary: 'The account has reached its usage quota for this OAuth app.' + cause: 'The authorizing account has exhausted its quota for the integration.' + remediation: 'Contact the app owner or upgrade the account quota.' + retryable: 'no' + category: plan + server_error: http_status: 500 - summary: 'An unexpected error occurred.' - cause: 'An unhandled server-side error, or a status code without a more specific error_name.' - remediation: 'Retry transient failures; if it persists, contact support with the request details.' - retryable: conditional + summary: 'An internal server error occurred during OAuth processing.' + cause: 'An unexpected error on the server side while handling the OAuth request.' + remediation: 'Retry the request; if it persists, contact support.' + retryable: 'yes' category: server - backoff: 'For transient 5xx, retry with exponential backoff; otherwise do not retry.' + backoff: 'Retry with exponential backoff.' + temporary_unavailable: + http_status: 503 + summary: 'The OAuth service is temporarily unavailable.' + cause: 'The service is under maintenance or experiencing temporary issues.' + remediation: 'Retry after a short delay.' + retryable: 'yes' + category: maintenance + backoff: 'Retry with exponential backoff.' x-error-events: signature_request_invalid: event_type: signature_request_invalid diff --git a/sdks/dotnet/README.md b/sdks/dotnet/README.md index 414467bc4..21e35eef4 100644 --- a/sdks/dotnet/README.md +++ b/sdks/dotnet/README.md @@ -263,6 +263,8 @@ Class | Method | HTTP request | Description - [Model.FileResponse](docs/FileResponse.md) - [Model.FileResponseDataUri](docs/FileResponseDataUri.md) - [Model.ListInfoResponse](docs/ListInfoResponse.md) + - [Model.OAuthErrorResponse](docs/OAuthErrorResponse.md) + - [Model.OAuthErrorResponseError](docs/OAuthErrorResponseError.md) - [Model.OAuthTokenGenerateRequest](docs/OAuthTokenGenerateRequest.md) - [Model.OAuthTokenRefreshRequest](docs/OAuthTokenRefreshRequest.md) - [Model.OAuthTokenResponse](docs/OAuthTokenResponse.md) diff --git a/sdks/dotnet/docs/OAuthErrorResponse.md b/sdks/dotnet/docs/OAuthErrorResponse.md new file mode 100644 index 000000000..d617921ed --- /dev/null +++ b/sdks/dotnet/docs/OAuthErrorResponse.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.OAuthErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | [**OAuthErrorResponseError**](OAuthErrorResponseError.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/dotnet/docs/OAuthErrorResponseError.md b/sdks/dotnet/docs/OAuthErrorResponseError.md new file mode 100644 index 000000000..736f18288 --- /dev/null +++ b/sdks/dotnet/docs/OAuthErrorResponseError.md @@ -0,0 +1,11 @@ +# Dropbox.Sign.Model.OAuthErrorResponseError +_t__OAuthErrorResponseError::DESCRIPTION + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ErrorMsg** | **string** | _t__OAuthErrorResponseError::ERROR_MSG | **ErrorName** | **string** | _t__OAuthErrorResponseError::ERROR_NAME | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/ErrorResponseError.cs b/sdks/dotnet/src/Dropbox.Sign/Model/ErrorResponseError.cs index 48476bbe4..f925bdc01 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/ErrorResponseError.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/ErrorResponseError.cs @@ -70,95 +70,95 @@ public enum ErrorNameEnum [EnumMember(Value = "not_found")] NotFound = 5, - /// - /// Enum MethodNotSupported for value: method_not_supported - /// - [EnumMember(Value = "method_not_supported")] - MethodNotSupported = 6, - /// /// Enum Conflict for value: conflict /// [EnumMember(Value = "conflict")] - Conflict = 7, + Conflict = 6, /// - /// Enum Deleted for value: deleted + /// Enum ExceededRate for value: exceeded_rate /// - [EnumMember(Value = "deleted")] - Deleted = 8, + [EnumMember(Value = "exceeded_rate")] + ExceededRate = 7, /// - /// Enum UnprocessableEntity for value: unprocessable_entity + /// Enum Unknown for value: unknown /// - [EnumMember(Value = "unprocessable_entity")] - UnprocessableEntity = 9, + [EnumMember(Value = "unknown")] + Unknown = 8, /// - /// Enum ExceededRate for value: exceeded_rate + /// Enum TeamInviteFailed for value: team_invite_failed /// - [EnumMember(Value = "exceeded_rate")] - ExceededRate = 10, + [EnumMember(Value = "team_invite_failed")] + TeamInviteFailed = 9, /// /// Enum MaxFaxes for value: max_faxes /// [EnumMember(Value = "max_faxes")] - MaxFaxes = 11, + MaxFaxes = 10, /// - /// Enum Unavailable for value: unavailable + /// Enum InvalidRecipient for value: invalid_recipient /// - [EnumMember(Value = "unavailable")] - Unavailable = 12, + [EnumMember(Value = "invalid_recipient")] + InvalidRecipient = 11, + + /// + /// Enum SignatureRequestCancelFailed for value: signature_request_cancel_failed + /// + [EnumMember(Value = "signature_request_cancel_failed")] + SignatureRequestCancelFailed = 12, + + /// + /// Enum SignatureRequestRemoveFailed for value: signature_request_remove_failed + /// + [EnumMember(Value = "signature_request_remove_failed")] + SignatureRequestRemoveFailed = 13, /// /// Enum Maintenance for value: maintenance /// [EnumMember(Value = "maintenance")] - Maintenance = 13, + Maintenance = 14, /// - /// Enum InvalidRecipient for value: invalid_recipient + /// Enum Deleted for value: deleted /// - [EnumMember(Value = "invalid_recipient")] - InvalidRecipient = 14, + [EnumMember(Value = "deleted")] + Deleted = 15, /// - /// Enum InvalidReminder for value: invalid_reminder + /// Enum MethodNotSupported for value: method_not_supported /// - [EnumMember(Value = "invalid_reminder")] - InvalidReminder = 15, + [EnumMember(Value = "method_not_supported")] + MethodNotSupported = 16, /// - /// Enum TeamInviteFailed for value: team_invite_failed + /// Enum InvalidReminder for value: invalid_reminder /// - [EnumMember(Value = "team_invite_failed")] - TeamInviteFailed = 16, + [EnumMember(Value = "invalid_reminder")] + InvalidReminder = 17, /// - /// Enum SignatureRequestCancelFailed for value: signature_request_cancel_failed + /// Enum Unavailable for value: unavailable /// - [EnumMember(Value = "signature_request_cancel_failed")] - SignatureRequestCancelFailed = 17, + [EnumMember(Value = "unavailable")] + Unavailable = 18, /// - /// Enum SignatureRequestRemoveFailed for value: signature_request_remove_failed + /// Enum UnprocessableEntity for value: unprocessable_entity /// - [EnumMember(Value = "signature_request_remove_failed")] - SignatureRequestRemoveFailed = 18, + [EnumMember(Value = "unprocessable_entity")] + UnprocessableEntity = 19, /// /// Enum SignatureRequestExpired for value: signature_request_expired /// [EnumMember(Value = "signature_request_expired")] - SignatureRequestExpired = 19, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 20 + SignatureRequestExpired = 20 } diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/OAuthErrorResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/OAuthErrorResponse.cs new file mode 100644 index 000000000..a633fdb72 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/OAuthErrorResponse.cs @@ -0,0 +1,170 @@ +/* + * Dropbox Sign API + * + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; + +namespace Dropbox.Sign.Model +{ + /// + /// OAuthErrorResponse + /// + [DataContract(Name = "OAuthErrorResponse")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class OAuthErrorResponse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected OAuthErrorResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// error (required). + public OAuthErrorResponse(OAuthErrorResponseError error = default(OAuthErrorResponseError)) + { + + // to ensure "error" is required (not null) + if (error == null) + { + throw new ArgumentNullException("error is a required property for OAuthErrorResponse and cannot be null"); + } + this.Error = error; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static OAuthErrorResponse Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of OAuthErrorResponse"); + } + + return obj; + } + + /// + /// Gets or Sets Error + /// + [DataMember(Name = "error", IsRequired = true, EmitDefaultValue = true)] + public OAuthErrorResponseError Error { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class OAuthErrorResponse {\n"); + sb.Append(" Error: ").Append(Error).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as OAuthErrorResponse); + } + + /// + /// Returns true if OAuthErrorResponse instances are equal + /// + /// Instance of OAuthErrorResponse to be compared + /// Boolean + public bool Equals(OAuthErrorResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.Error == input.Error || + (this.Error != null && + this.Error.Equals(input.Error)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Error != null) + { + hashCode = (hashCode * 59) + this.Error.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType() + { + Name = "error", + Property = "Error", + Type = "OAuthErrorResponseError", + Value = Error, + }); + + return types; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/OAuthErrorResponseError.cs b/sdks/dotnet/src/Dropbox.Sign/Model/OAuthErrorResponseError.cs new file mode 100644 index 000000000..5d14d9d98 --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/OAuthErrorResponseError.cs @@ -0,0 +1,267 @@ +/* + * Dropbox Sign API + * + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; + +namespace Dropbox.Sign.Model +{ + /// + /// _t__OAuthErrorResponseError::DESCRIPTION + /// + [DataContract(Name = "OAuthErrorResponseError")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class OAuthErrorResponseError : IEquatable, IValidatableObject + { + /// + /// _t__OAuthErrorResponseError::ERROR_NAME + /// + /// _t__OAuthErrorResponseError::ERROR_NAME + [JsonConverter(typeof(StringEnumConverter))] + public enum ErrorNameEnum + { + /// + /// Enum InvalidGrant for value: invalid_grant + /// + [EnumMember(Value = "invalid_grant")] + InvalidGrant = 1, + + /// + /// Enum InvalidClient for value: invalid_client + /// + [EnumMember(Value = "invalid_client")] + InvalidClient = 2, + + /// + /// Enum InvalidRequest for value: invalid_request + /// + [EnumMember(Value = "invalid_request")] + InvalidRequest = 3, + + /// + /// Enum UnauthorizedClient for value: unauthorized_client + /// + [EnumMember(Value = "unauthorized_client")] + UnauthorizedClient = 4, + + /// + /// Enum UnsupportedGrantType for value: unsupported_grant_type + /// + [EnumMember(Value = "unsupported_grant_type")] + UnsupportedGrantType = 5, + + /// + /// Enum PaymentRequired for value: payment_required + /// + [EnumMember(Value = "payment_required")] + PaymentRequired = 6, + + /// + /// Enum AddonRequired for value: addon_required + /// + [EnumMember(Value = "addon_required")] + AddonRequired = 7, + + /// + /// Enum InvalidScope for value: invalid_scope + /// + [EnumMember(Value = "invalid_scope")] + InvalidScope = 8, + + /// + /// Enum QuotaReached for value: quota_reached + /// + [EnumMember(Value = "quota_reached")] + QuotaReached = 9, + + /// + /// Enum ServerError for value: server_error + /// + [EnumMember(Value = "server_error")] + ServerError = 10, + + /// + /// Enum TemporaryUnavailable for value: temporary_unavailable + /// + [EnumMember(Value = "temporary_unavailable")] + TemporaryUnavailable = 11 + } + + + /// + /// _t__OAuthErrorResponseError::ERROR_NAME + /// + /// _t__OAuthErrorResponseError::ERROR_NAME + [DataMember(Name = "error_name", IsRequired = true, EmitDefaultValue = true)] + public ErrorNameEnum ErrorName { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected OAuthErrorResponseError() { } + /// + /// Initializes a new instance of the class. + /// + /// _t__OAuthErrorResponseError::ERROR_MSG (required). + /// _t__OAuthErrorResponseError::ERROR_NAME (required). + public OAuthErrorResponseError(string errorMsg = default(string), ErrorNameEnum errorName = default(ErrorNameEnum)) + { + + // to ensure "errorMsg" is required (not null) + if (errorMsg == null) + { + throw new ArgumentNullException("errorMsg is a required property for OAuthErrorResponseError and cannot be null"); + } + this.ErrorMsg = errorMsg; + this.ErrorName = errorName; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static OAuthErrorResponseError Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of OAuthErrorResponseError"); + } + + return obj; + } + + /// + /// _t__OAuthErrorResponseError::ERROR_MSG + /// + /// _t__OAuthErrorResponseError::ERROR_MSG + [DataMember(Name = "error_msg", IsRequired = true, EmitDefaultValue = true)] + public string ErrorMsg { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class OAuthErrorResponseError {\n"); + sb.Append(" ErrorMsg: ").Append(ErrorMsg).Append("\n"); + sb.Append(" ErrorName: ").Append(ErrorName).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as OAuthErrorResponseError); + } + + /// + /// Returns true if OAuthErrorResponseError instances are equal + /// + /// Instance of OAuthErrorResponseError to be compared + /// Boolean + public bool Equals(OAuthErrorResponseError input) + { + if (input == null) + { + return false; + } + return + ( + this.ErrorMsg == input.ErrorMsg || + (this.ErrorMsg != null && + this.ErrorMsg.Equals(input.ErrorMsg)) + ) && + ( + this.ErrorName == input.ErrorName || + this.ErrorName.Equals(input.ErrorName) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ErrorMsg != null) + { + hashCode = (hashCode * 59) + this.ErrorMsg.GetHashCode(); + } + hashCode = (hashCode * 59) + this.ErrorName.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType() + { + Name = "error_msg", + Property = "ErrorMsg", + Type = "string", + Value = ErrorMsg, + }); + types.Add(new OpenApiType() + { + Name = "error_name", + Property = "ErrorName", + Type = "string", + Value = ErrorName, + }); + + return types; + } + } + +} diff --git a/sdks/java-v1/README.md b/sdks/java-v1/README.md index 7ea39626e..0b3747654 100644 --- a/sdks/java-v1/README.md +++ b/sdks/java-v1/README.md @@ -305,6 +305,8 @@ Class | Method | HTTP request | Description - [FileResponse](docs/FileResponse.md) - [FileResponseDataUri](docs/FileResponseDataUri.md) - [ListInfoResponse](docs/ListInfoResponse.md) + - [OAuthErrorResponse](docs/OAuthErrorResponse.md) + - [OAuthErrorResponseError](docs/OAuthErrorResponseError.md) - [OAuthTokenGenerateRequest](docs/OAuthTokenGenerateRequest.md) - [OAuthTokenRefreshRequest](docs/OAuthTokenRefreshRequest.md) - [OAuthTokenResponse](docs/OAuthTokenResponse.md) diff --git a/sdks/java-v1/docs/ErrorResponseError.md b/sdks/java-v1/docs/ErrorResponseError.md index 9f4d0272f..e6590f07d 100644 --- a/sdks/java-v1/docs/ErrorResponseError.md +++ b/sdks/java-v1/docs/ErrorResponseError.md @@ -23,21 +23,21 @@ Contains information about an error that occurred. | PAYMENT_REQUIRED | "payment_required" | | FORBIDDEN | "forbidden" | | NOT_FOUND | "not_found" | -| METHOD_NOT_SUPPORTED | "method_not_supported" | | CONFLICT | "conflict" | -| DELETED | "deleted" | -| UNPROCESSABLE_ENTITY | "unprocessable_entity" | | EXCEEDED_RATE | "exceeded_rate" | +| UNKNOWN | "unknown" | +| TEAM_INVITE_FAILED | "team_invite_failed" | | MAX_FAXES | "max_faxes" | -| UNAVAILABLE | "unavailable" | -| MAINTENANCE | "maintenance" | | INVALID_RECIPIENT | "invalid_recipient" | -| INVALID_REMINDER | "invalid_reminder" | -| TEAM_INVITE_FAILED | "team_invite_failed" | | SIGNATURE_REQUEST_CANCEL_FAILED | "signature_request_cancel_failed" | | SIGNATURE_REQUEST_REMOVE_FAILED | "signature_request_remove_failed" | +| MAINTENANCE | "maintenance" | +| DELETED | "deleted" | +| METHOD_NOT_SUPPORTED | "method_not_supported" | +| INVALID_REMINDER | "invalid_reminder" | +| UNAVAILABLE | "unavailable" | +| UNPROCESSABLE_ENTITY | "unprocessable_entity" | | SIGNATURE_REQUEST_EXPIRED | "signature_request_expired" | -| UNKNOWN | "unknown" | diff --git a/sdks/java-v1/docs/OAuthErrorResponse.md b/sdks/java-v1/docs/OAuthErrorResponse.md new file mode 100644 index 000000000..c856c0d02 --- /dev/null +++ b/sdks/java-v1/docs/OAuthErrorResponse.md @@ -0,0 +1,14 @@ + + +# OAuthErrorResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `error`*_required_ | [```OAuthErrorResponseError```](OAuthErrorResponseError.md) | | | + + + diff --git a/sdks/java-v1/docs/OAuthErrorResponseError.md b/sdks/java-v1/docs/OAuthErrorResponseError.md new file mode 100644 index 000000000..1d96477c4 --- /dev/null +++ b/sdks/java-v1/docs/OAuthErrorResponseError.md @@ -0,0 +1,33 @@ + + +# OAuthErrorResponseError + +_t__OAuthErrorResponseError::DESCRIPTION + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `errorMsg`*_required_ | ```String``` | _t__OAuthErrorResponseError::ERROR_MSG | | +| `errorName`*_required_ | [```ErrorNameEnum```](#ErrorNameEnum) | _t__OAuthErrorResponseError::ERROR_NAME | | + + + +## Enum: ErrorNameEnum + +| Name | Value | +---- | ----- +| INVALID_GRANT | "invalid_grant" | +| INVALID_CLIENT | "invalid_client" | +| INVALID_REQUEST | "invalid_request" | +| UNAUTHORIZED_CLIENT | "unauthorized_client" | +| UNSUPPORTED_GRANT_TYPE | "unsupported_grant_type" | +| PAYMENT_REQUIRED | "payment_required" | +| ADDON_REQUIRED | "addon_required" | +| INVALID_SCOPE | "invalid_scope" | +| QUOTA_REACHED | "quota_reached" | +| SERVER_ERROR | "server_error" | +| TEMPORARY_UNAVAILABLE | "temporary_unavailable" | + + + diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponseError.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponseError.java index db3674082..c922f865c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponseError.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponseError.java @@ -51,35 +51,35 @@ public enum ErrorNameEnum { NOT_FOUND(String.valueOf("not_found")), - METHOD_NOT_SUPPORTED(String.valueOf("method_not_supported")), - CONFLICT(String.valueOf("conflict")), - DELETED(String.valueOf("deleted")), + EXCEEDED_RATE(String.valueOf("exceeded_rate")), - UNPROCESSABLE_ENTITY(String.valueOf("unprocessable_entity")), + UNKNOWN(String.valueOf("unknown")), - EXCEEDED_RATE(String.valueOf("exceeded_rate")), + TEAM_INVITE_FAILED(String.valueOf("team_invite_failed")), MAX_FAXES(String.valueOf("max_faxes")), - UNAVAILABLE(String.valueOf("unavailable")), + INVALID_RECIPIENT(String.valueOf("invalid_recipient")), - MAINTENANCE(String.valueOf("maintenance")), + SIGNATURE_REQUEST_CANCEL_FAILED(String.valueOf("signature_request_cancel_failed")), - INVALID_RECIPIENT(String.valueOf("invalid_recipient")), + SIGNATURE_REQUEST_REMOVE_FAILED(String.valueOf("signature_request_remove_failed")), - INVALID_REMINDER(String.valueOf("invalid_reminder")), + MAINTENANCE(String.valueOf("maintenance")), - TEAM_INVITE_FAILED(String.valueOf("team_invite_failed")), + DELETED(String.valueOf("deleted")), - SIGNATURE_REQUEST_CANCEL_FAILED(String.valueOf("signature_request_cancel_failed")), + METHOD_NOT_SUPPORTED(String.valueOf("method_not_supported")), - SIGNATURE_REQUEST_REMOVE_FAILED(String.valueOf("signature_request_remove_failed")), + INVALID_REMINDER(String.valueOf("invalid_reminder")), - SIGNATURE_REQUEST_EXPIRED(String.valueOf("signature_request_expired")), + UNAVAILABLE(String.valueOf("unavailable")), + + UNPROCESSABLE_ENTITY(String.valueOf("unprocessable_entity")), - UNKNOWN(String.valueOf("unknown")); + SIGNATURE_REQUEST_EXPIRED(String.valueOf("signature_request_expired")); private String value; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthErrorResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthErrorResponse.java new file mode 100644 index 000000000..a9616a0eb --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthErrorResponse.java @@ -0,0 +1,166 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.dropbox.sign.model; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** OAuthErrorResponse */ +@JsonPropertyOrder({OAuthErrorResponse.JSON_PROPERTY_ERROR}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class OAuthErrorResponse { + public static final String JSON_PROPERTY_ERROR = "error"; + @javax.annotation.Nonnull private OAuthErrorResponseError error; + + public OAuthErrorResponse() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static OAuthErrorResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, OAuthErrorResponse.class); + } + + public static OAuthErrorResponse init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue(new ObjectMapper().writeValueAsString(data), OAuthErrorResponse.class); + } + + public OAuthErrorResponse error(@javax.annotation.Nonnull OAuthErrorResponseError error) { + this.error = error; + return this; + } + + /** + * Get error + * + * @return error + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OAuthErrorResponseError getError() { + return error; + } + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setError(@javax.annotation.Nonnull OAuthErrorResponseError error) { + this.error = error; + } + + /** Return true if this OAuthErrorResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OAuthErrorResponse oauthErrorResponse = (OAuthErrorResponse) o; + return Objects.equals(this.error, oauthErrorResponse.error); + } + + @Override + public int hashCode() { + return Objects.hash(error); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OAuthErrorResponse {\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (error != null) { + if (isFileTypeOrListOfFiles(error)) { + fileTypeFound = true; + } + + if (error.getClass().equals(java.io.File.class) + || error.getClass().equals(Integer.class) + || error.getClass().equals(String.class) + || error.getClass().isEnum()) { + map.put("error", error); + } else if (isListOfFile(error)) { + for (int i = 0; i < getListSize(error); i++) { + map.put("error[" + i + "]", getFromList(error, i)); + } + } else { + map.put("error", JSON.getDefault().getMapper().writeValueAsString(error)); + } + } + } catch (Exception e) { + throw new ApiException(e); + } + + return fileTypeFound ? map : new HashMap<>(); + } + + private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { + return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); + } + + private boolean isListOfFile(Object obj) throws Exception { + return obj instanceof java.util.List + && !isListEmpty(obj) + && getFromList(obj, 0) instanceof java.io.File; + } + + private boolean isListEmpty(Object obj) throws Exception { + return (boolean) + Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); + } + + private Object getFromList(Object obj, int index) throws Exception { + return Class.forName(java.util.List.class.getName()) + .getMethod("get", int.class) + .invoke(obj, index); + } + + private int getListSize(Object obj) throws Exception { + return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthErrorResponseError.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthErrorResponseError.java new file mode 100644 index 000000000..991a86bf8 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthErrorResponseError.java @@ -0,0 +1,273 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.dropbox.sign.model; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** _t__OAuthErrorResponseError::DESCRIPTION */ +@JsonPropertyOrder({ + OAuthErrorResponseError.JSON_PROPERTY_ERROR_MSG, + OAuthErrorResponseError.JSON_PROPERTY_ERROR_NAME +}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class OAuthErrorResponseError { + public static final String JSON_PROPERTY_ERROR_MSG = "error_msg"; + @javax.annotation.Nonnull private String errorMsg; + + /** _t__OAuthErrorResponseError::ERROR_NAME */ + public enum ErrorNameEnum { + INVALID_GRANT(String.valueOf("invalid_grant")), + + INVALID_CLIENT(String.valueOf("invalid_client")), + + INVALID_REQUEST(String.valueOf("invalid_request")), + + UNAUTHORIZED_CLIENT(String.valueOf("unauthorized_client")), + + UNSUPPORTED_GRANT_TYPE(String.valueOf("unsupported_grant_type")), + + PAYMENT_REQUIRED(String.valueOf("payment_required")), + + ADDON_REQUIRED(String.valueOf("addon_required")), + + INVALID_SCOPE(String.valueOf("invalid_scope")), + + QUOTA_REACHED(String.valueOf("quota_reached")), + + SERVER_ERROR(String.valueOf("server_error")), + + TEMPORARY_UNAVAILABLE(String.valueOf("temporary_unavailable")); + + private String value; + + ErrorNameEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ErrorNameEnum fromValue(String value) { + for (ErrorNameEnum b : ErrorNameEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ERROR_NAME = "error_name"; + @javax.annotation.Nonnull private ErrorNameEnum errorName; + + public OAuthErrorResponseError() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static OAuthErrorResponseError init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, OAuthErrorResponseError.class); + } + + public static OAuthErrorResponseError init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue( + new ObjectMapper().writeValueAsString(data), OAuthErrorResponseError.class); + } + + public OAuthErrorResponseError errorMsg(@javax.annotation.Nonnull String errorMsg) { + this.errorMsg = errorMsg; + return this; + } + + /** + * _t__OAuthErrorResponseError::ERROR_MSG + * + * @return errorMsg + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ERROR_MSG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getErrorMsg() { + return errorMsg; + } + + @JsonProperty(JSON_PROPERTY_ERROR_MSG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setErrorMsg(@javax.annotation.Nonnull String errorMsg) { + this.errorMsg = errorMsg; + } + + public OAuthErrorResponseError errorName(@javax.annotation.Nonnull ErrorNameEnum errorName) { + this.errorName = errorName; + return this; + } + + /** + * _t__OAuthErrorResponseError::ERROR_NAME + * + * @return errorName + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ERROR_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ErrorNameEnum getErrorName() { + return errorName; + } + + @JsonProperty(JSON_PROPERTY_ERROR_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setErrorName(@javax.annotation.Nonnull ErrorNameEnum errorName) { + this.errorName = errorName; + } + + /** Return true if this OAuthErrorResponseError object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OAuthErrorResponseError oauthErrorResponseError = (OAuthErrorResponseError) o; + return Objects.equals(this.errorMsg, oauthErrorResponseError.errorMsg) + && Objects.equals(this.errorName, oauthErrorResponseError.errorName); + } + + @Override + public int hashCode() { + return Objects.hash(errorMsg, errorName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OAuthErrorResponseError {\n"); + sb.append(" errorMsg: ").append(toIndentedString(errorMsg)).append("\n"); + sb.append(" errorName: ").append(toIndentedString(errorName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (errorMsg != null) { + if (isFileTypeOrListOfFiles(errorMsg)) { + fileTypeFound = true; + } + + if (errorMsg.getClass().equals(java.io.File.class) + || errorMsg.getClass().equals(Integer.class) + || errorMsg.getClass().equals(String.class) + || errorMsg.getClass().isEnum()) { + map.put("error_msg", errorMsg); + } else if (isListOfFile(errorMsg)) { + for (int i = 0; i < getListSize(errorMsg); i++) { + map.put("error_msg[" + i + "]", getFromList(errorMsg, i)); + } + } else { + map.put( + "error_msg", + JSON.getDefault().getMapper().writeValueAsString(errorMsg)); + } + } + if (errorName != null) { + if (isFileTypeOrListOfFiles(errorName)) { + fileTypeFound = true; + } + + if (errorName.getClass().equals(java.io.File.class) + || errorName.getClass().equals(Integer.class) + || errorName.getClass().equals(String.class) + || errorName.getClass().isEnum()) { + map.put("error_name", errorName); + } else if (isListOfFile(errorName)) { + for (int i = 0; i < getListSize(errorName); i++) { + map.put("error_name[" + i + "]", getFromList(errorName, i)); + } + } else { + map.put( + "error_name", + JSON.getDefault().getMapper().writeValueAsString(errorName)); + } + } + } catch (Exception e) { + throw new ApiException(e); + } + + return fileTypeFound ? map : new HashMap<>(); + } + + private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { + return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); + } + + private boolean isListOfFile(Object obj) throws Exception { + return obj instanceof java.util.List + && !isListEmpty(obj) + && getFromList(obj, 0) instanceof java.io.File; + } + + private boolean isListEmpty(Object obj) throws Exception { + return (boolean) + Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); + } + + private Object getFromList(Object obj, int index) throws Exception { + return Class.forName(java.util.List.class.getName()) + .getMethod("get", int.class) + .invoke(obj, index); + } + + private int getListSize(Object obj) throws Exception { + return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/sdks/java-v2/README.md b/sdks/java-v2/README.md index 91850482a..4a486766e 100644 --- a/sdks/java-v2/README.md +++ b/sdks/java-v2/README.md @@ -281,6 +281,8 @@ Class | Method | HTTP request | Description - [FileResponse](docs/FileResponse.md) - [FileResponseDataUri](docs/FileResponseDataUri.md) - [ListInfoResponse](docs/ListInfoResponse.md) + - [OAuthErrorResponse](docs/OAuthErrorResponse.md) + - [OAuthErrorResponseError](docs/OAuthErrorResponseError.md) - [OAuthTokenGenerateRequest](docs/OAuthTokenGenerateRequest.md) - [OAuthTokenRefreshRequest](docs/OAuthTokenRefreshRequest.md) - [OAuthTokenResponse](docs/OAuthTokenResponse.md) diff --git a/sdks/java-v2/docs/ErrorResponseError.md b/sdks/java-v2/docs/ErrorResponseError.md index 9f4d0272f..e6590f07d 100644 --- a/sdks/java-v2/docs/ErrorResponseError.md +++ b/sdks/java-v2/docs/ErrorResponseError.md @@ -23,21 +23,21 @@ Contains information about an error that occurred. | PAYMENT_REQUIRED | "payment_required" | | FORBIDDEN | "forbidden" | | NOT_FOUND | "not_found" | -| METHOD_NOT_SUPPORTED | "method_not_supported" | | CONFLICT | "conflict" | -| DELETED | "deleted" | -| UNPROCESSABLE_ENTITY | "unprocessable_entity" | | EXCEEDED_RATE | "exceeded_rate" | +| UNKNOWN | "unknown" | +| TEAM_INVITE_FAILED | "team_invite_failed" | | MAX_FAXES | "max_faxes" | -| UNAVAILABLE | "unavailable" | -| MAINTENANCE | "maintenance" | | INVALID_RECIPIENT | "invalid_recipient" | -| INVALID_REMINDER | "invalid_reminder" | -| TEAM_INVITE_FAILED | "team_invite_failed" | | SIGNATURE_REQUEST_CANCEL_FAILED | "signature_request_cancel_failed" | | SIGNATURE_REQUEST_REMOVE_FAILED | "signature_request_remove_failed" | +| MAINTENANCE | "maintenance" | +| DELETED | "deleted" | +| METHOD_NOT_SUPPORTED | "method_not_supported" | +| INVALID_REMINDER | "invalid_reminder" | +| UNAVAILABLE | "unavailable" | +| UNPROCESSABLE_ENTITY | "unprocessable_entity" | | SIGNATURE_REQUEST_EXPIRED | "signature_request_expired" | -| UNKNOWN | "unknown" | diff --git a/sdks/java-v2/docs/OAuthErrorResponse.md b/sdks/java-v2/docs/OAuthErrorResponse.md new file mode 100644 index 000000000..c856c0d02 --- /dev/null +++ b/sdks/java-v2/docs/OAuthErrorResponse.md @@ -0,0 +1,14 @@ + + +# OAuthErrorResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `error`*_required_ | [```OAuthErrorResponseError```](OAuthErrorResponseError.md) | | | + + + diff --git a/sdks/java-v2/docs/OAuthErrorResponseError.md b/sdks/java-v2/docs/OAuthErrorResponseError.md new file mode 100644 index 000000000..1d96477c4 --- /dev/null +++ b/sdks/java-v2/docs/OAuthErrorResponseError.md @@ -0,0 +1,33 @@ + + +# OAuthErrorResponseError + +_t__OAuthErrorResponseError::DESCRIPTION + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `errorMsg`*_required_ | ```String``` | _t__OAuthErrorResponseError::ERROR_MSG | | +| `errorName`*_required_ | [```ErrorNameEnum```](#ErrorNameEnum) | _t__OAuthErrorResponseError::ERROR_NAME | | + + + +## Enum: ErrorNameEnum + +| Name | Value | +---- | ----- +| INVALID_GRANT | "invalid_grant" | +| INVALID_CLIENT | "invalid_client" | +| INVALID_REQUEST | "invalid_request" | +| UNAUTHORIZED_CLIENT | "unauthorized_client" | +| UNSUPPORTED_GRANT_TYPE | "unsupported_grant_type" | +| PAYMENT_REQUIRED | "payment_required" | +| ADDON_REQUIRED | "addon_required" | +| INVALID_SCOPE | "invalid_scope" | +| QUOTA_REACHED | "quota_reached" | +| SERVER_ERROR | "server_error" | +| TEMPORARY_UNAVAILABLE | "temporary_unavailable" | + + + diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/api/OAuthApi.java b/sdks/java-v2/src/main/java/com/dropbox/sign/api/OAuthApi.java index ddcaa24aa..deb964864 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/api/OAuthApi.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/api/OAuthApi.java @@ -8,7 +8,7 @@ import jakarta.ws.rs.core.GenericType; -import com.dropbox.sign.model.ErrorResponse; +import com.dropbox.sign.model.OAuthErrorResponse; import com.dropbox.sign.model.OAuthTokenGenerateRequest; import com.dropbox.sign.model.OAuthTokenRefreshRequest; import com.dropbox.sign.model.OAuthTokenResponse; diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ErrorResponseError.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ErrorResponseError.java index 8c36f632d..47fed16ad 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/ErrorResponseError.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/ErrorResponseError.java @@ -58,35 +58,35 @@ public enum ErrorNameEnum { NOT_FOUND(String.valueOf("not_found")), - METHOD_NOT_SUPPORTED(String.valueOf("method_not_supported")), - CONFLICT(String.valueOf("conflict")), - DELETED(String.valueOf("deleted")), + EXCEEDED_RATE(String.valueOf("exceeded_rate")), - UNPROCESSABLE_ENTITY(String.valueOf("unprocessable_entity")), + UNKNOWN(String.valueOf("unknown")), - EXCEEDED_RATE(String.valueOf("exceeded_rate")), + TEAM_INVITE_FAILED(String.valueOf("team_invite_failed")), MAX_FAXES(String.valueOf("max_faxes")), - UNAVAILABLE(String.valueOf("unavailable")), + INVALID_RECIPIENT(String.valueOf("invalid_recipient")), - MAINTENANCE(String.valueOf("maintenance")), + SIGNATURE_REQUEST_CANCEL_FAILED(String.valueOf("signature_request_cancel_failed")), - INVALID_RECIPIENT(String.valueOf("invalid_recipient")), + SIGNATURE_REQUEST_REMOVE_FAILED(String.valueOf("signature_request_remove_failed")), - INVALID_REMINDER(String.valueOf("invalid_reminder")), + MAINTENANCE(String.valueOf("maintenance")), - TEAM_INVITE_FAILED(String.valueOf("team_invite_failed")), + DELETED(String.valueOf("deleted")), - SIGNATURE_REQUEST_CANCEL_FAILED(String.valueOf("signature_request_cancel_failed")), + METHOD_NOT_SUPPORTED(String.valueOf("method_not_supported")), - SIGNATURE_REQUEST_REMOVE_FAILED(String.valueOf("signature_request_remove_failed")), + INVALID_REMINDER(String.valueOf("invalid_reminder")), - SIGNATURE_REQUEST_EXPIRED(String.valueOf("signature_request_expired")), + UNAVAILABLE(String.valueOf("unavailable")), + + UNPROCESSABLE_ENTITY(String.valueOf("unprocessable_entity")), - UNKNOWN(String.valueOf("unknown")); + SIGNATURE_REQUEST_EXPIRED(String.valueOf("signature_request_expired")); private String value; diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthErrorResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthErrorResponse.java new file mode 100644 index 000000000..dfeaee715 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthErrorResponse.java @@ -0,0 +1,180 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.dropbox.sign.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.dropbox.sign.model.OAuthErrorResponseError; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; + + +import com.dropbox.sign.ApiException; +/** + * OAuthErrorResponse + */ +@JsonPropertyOrder({ + OAuthErrorResponse.JSON_PROPERTY_ERROR +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown=true) +public class OAuthErrorResponse { + public static final String JSON_PROPERTY_ERROR = "error"; + @jakarta.annotation.Nonnull + private OAuthErrorResponseError error; + + public OAuthErrorResponse() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public OAuthErrorResponse init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, OAuthErrorResponse.class); + } + + static public OAuthErrorResponse init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + OAuthErrorResponse.class + ); + } + + public OAuthErrorResponse error(@jakarta.annotation.Nonnull OAuthErrorResponseError error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OAuthErrorResponseError getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setError(@jakarta.annotation.Nonnull OAuthErrorResponseError error) { + this.error = error; + } + + + /** + * Return true if this OAuthErrorResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OAuthErrorResponse oauthErrorResponse = (OAuthErrorResponse) o; + return Objects.equals(this.error, oauthErrorResponse.error); + } + + @Override + public int hashCode() { + return Objects.hash(error); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OAuthErrorResponse {\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (error != null) { + if (isFileTypeOrListOfFiles(error)) { + fileTypeFound = true; + } + + if (error.getClass().equals(java.io.File.class) || + error.getClass().equals(Integer.class) || + error.getClass().equals(String.class) || + error.getClass().isEnum()) { + map.put("error", error); + } else if (isListOfFile(error)) { + for(int i = 0; i< getListSize(error); i++) { + map.put("error[" + i + "]", getFromList(error, i)); + } + } + else { + map.put("error", JSON.getDefault().getMapper().writeValueAsString(error)); + } + } + } catch (Exception e) { + throw new ApiException(e); + } + + return fileTypeFound ? map : new HashMap<>(); + } + + private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { + return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); + } + + private boolean isListOfFile(Object obj) throws Exception { + return obj instanceof java.util.List && !isListEmpty(obj) && getFromList(obj, 0) instanceof java.io.File; + } + + private boolean isListEmpty(Object obj) throws Exception { + return (boolean) Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); + } + + private Object getFromList(Object obj, int index) throws Exception { + return Class.forName(java.util.List.class.getName()).getMethod("get", int.class).invoke(obj, index); + } + + private int getListSize(Object obj) throws Exception { + return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthErrorResponseError.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthErrorResponseError.java new file mode 100644 index 000000000..2c7d9ade8 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthErrorResponseError.java @@ -0,0 +1,283 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.dropbox.sign.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; + + +import com.dropbox.sign.ApiException; +/** + * _t__OAuthErrorResponseError::DESCRIPTION + */ +@JsonPropertyOrder({ + OAuthErrorResponseError.JSON_PROPERTY_ERROR_MSG, + OAuthErrorResponseError.JSON_PROPERTY_ERROR_NAME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown=true) +public class OAuthErrorResponseError { + public static final String JSON_PROPERTY_ERROR_MSG = "error_msg"; + @jakarta.annotation.Nonnull + private String errorMsg; + + /** + * _t__OAuthErrorResponseError::ERROR_NAME + */ + public enum ErrorNameEnum { + INVALID_GRANT(String.valueOf("invalid_grant")), + + INVALID_CLIENT(String.valueOf("invalid_client")), + + INVALID_REQUEST(String.valueOf("invalid_request")), + + UNAUTHORIZED_CLIENT(String.valueOf("unauthorized_client")), + + UNSUPPORTED_GRANT_TYPE(String.valueOf("unsupported_grant_type")), + + PAYMENT_REQUIRED(String.valueOf("payment_required")), + + ADDON_REQUIRED(String.valueOf("addon_required")), + + INVALID_SCOPE(String.valueOf("invalid_scope")), + + QUOTA_REACHED(String.valueOf("quota_reached")), + + SERVER_ERROR(String.valueOf("server_error")), + + TEMPORARY_UNAVAILABLE(String.valueOf("temporary_unavailable")); + + private String value; + + ErrorNameEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ErrorNameEnum fromValue(String value) { + for (ErrorNameEnum b : ErrorNameEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ERROR_NAME = "error_name"; + @jakarta.annotation.Nonnull + private ErrorNameEnum errorName; + + public OAuthErrorResponseError() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public OAuthErrorResponseError init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, OAuthErrorResponseError.class); + } + + static public OAuthErrorResponseError init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + OAuthErrorResponseError.class + ); + } + + public OAuthErrorResponseError errorMsg(@jakarta.annotation.Nonnull String errorMsg) { + this.errorMsg = errorMsg; + return this; + } + + /** + * _t__OAuthErrorResponseError::ERROR_MSG + * @return errorMsg + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ERROR_MSG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getErrorMsg() { + return errorMsg; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_MSG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setErrorMsg(@jakarta.annotation.Nonnull String errorMsg) { + this.errorMsg = errorMsg; + } + + + public OAuthErrorResponseError errorName(@jakarta.annotation.Nonnull ErrorNameEnum errorName) { + this.errorName = errorName; + return this; + } + + /** + * _t__OAuthErrorResponseError::ERROR_NAME + * @return errorName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ERROR_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ErrorNameEnum getErrorName() { + return errorName; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setErrorName(@jakarta.annotation.Nonnull ErrorNameEnum errorName) { + this.errorName = errorName; + } + + + /** + * Return true if this OAuthErrorResponseError object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OAuthErrorResponseError oauthErrorResponseError = (OAuthErrorResponseError) o; + return Objects.equals(this.errorMsg, oauthErrorResponseError.errorMsg) && + Objects.equals(this.errorName, oauthErrorResponseError.errorName); + } + + @Override + public int hashCode() { + return Objects.hash(errorMsg, errorName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OAuthErrorResponseError {\n"); + sb.append(" errorMsg: ").append(toIndentedString(errorMsg)).append("\n"); + sb.append(" errorName: ").append(toIndentedString(errorName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (errorMsg != null) { + if (isFileTypeOrListOfFiles(errorMsg)) { + fileTypeFound = true; + } + + if (errorMsg.getClass().equals(java.io.File.class) || + errorMsg.getClass().equals(Integer.class) || + errorMsg.getClass().equals(String.class) || + errorMsg.getClass().isEnum()) { + map.put("error_msg", errorMsg); + } else if (isListOfFile(errorMsg)) { + for(int i = 0; i< getListSize(errorMsg); i++) { + map.put("error_msg[" + i + "]", getFromList(errorMsg, i)); + } + } + else { + map.put("error_msg", JSON.getDefault().getMapper().writeValueAsString(errorMsg)); + } + } + if (errorName != null) { + if (isFileTypeOrListOfFiles(errorName)) { + fileTypeFound = true; + } + + if (errorName.getClass().equals(java.io.File.class) || + errorName.getClass().equals(Integer.class) || + errorName.getClass().equals(String.class) || + errorName.getClass().isEnum()) { + map.put("error_name", errorName); + } else if (isListOfFile(errorName)) { + for(int i = 0; i< getListSize(errorName); i++) { + map.put("error_name[" + i + "]", getFromList(errorName, i)); + } + } + else { + map.put("error_name", JSON.getDefault().getMapper().writeValueAsString(errorName)); + } + } + } catch (Exception e) { + throw new ApiException(e); + } + + return fileTypeFound ? map : new HashMap<>(); + } + + private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { + return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); + } + + private boolean isListOfFile(Object obj) throws Exception { + return obj instanceof java.util.List && !isListEmpty(obj) && getFromList(obj, 0) instanceof java.io.File; + } + + private boolean isListEmpty(Object obj) throws Exception { + return (boolean) Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); + } + + private Object getFromList(Object obj, int index) throws Exception { + return Class.forName(java.util.List.class.getName()).getMethod("get", int.class).invoke(obj, index); + } + + private int getListSize(Object obj) throws Exception { + return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/sdks/node/README.md b/sdks/node/README.md index bb45ec624..3ac54f11f 100644 --- a/sdks/node/README.md +++ b/sdks/node/README.md @@ -209,6 +209,8 @@ All URIs are relative to *https://api.hellosign.com/v3* - [FileResponse](./docs/model/FileResponse.md) - [FileResponseDataUri](./docs/model/FileResponseDataUri.md) - [ListInfoResponse](./docs/model/ListInfoResponse.md) +- [OAuthErrorResponse](./docs/model/OAuthErrorResponse.md) +- [OAuthErrorResponseError](./docs/model/OAuthErrorResponseError.md) - [OAuthTokenGenerateRequest](./docs/model/OAuthTokenGenerateRequest.md) - [OAuthTokenRefreshRequest](./docs/model/OAuthTokenRefreshRequest.md) - [OAuthTokenResponse](./docs/model/OAuthTokenResponse.md) diff --git a/sdks/node/api/oAuthApi.ts b/sdks/node/api/oAuthApi.ts index 1478d53e0..8c93a41fd 100644 --- a/sdks/node/api/oAuthApi.ts +++ b/sdks/node/api/oAuthApi.ts @@ -241,7 +241,7 @@ export class OAuthApi { reject, error.response, "4XX", - "ErrorResponse" + "OAuthErrorResponse" ) ) { return; @@ -377,7 +377,7 @@ export class OAuthApi { reject, error.response, "4XX", - "ErrorResponse" + "OAuthErrorResponse" ) ) { return; diff --git a/sdks/node/dist/api.js b/sdks/node/dist/api.js index 4e7945208..25cf77e58 100644 --- a/sdks/node/dist/api.js +++ b/sdks/node/dist/api.js @@ -13211,6 +13211,8 @@ __export(api_exports, { ListInfoResponse: () => ListInfoResponse, OAuth: () => OAuth, OAuthApi: () => OAuthApi, + OAuthErrorResponse: () => OAuthErrorResponse, + OAuthErrorResponseError: () => OAuthErrorResponseError, OAuthTokenGenerateRequest: () => OAuthTokenGenerateRequest, OAuthTokenRefreshRequest: () => OAuthTokenRefreshRequest, OAuthTokenResponse: () => OAuthTokenResponse, @@ -18034,21 +18036,21 @@ var ErrorResponseError = class _ErrorResponseError { ErrorNameEnum2["PaymentRequired"] = "payment_required"; ErrorNameEnum2["Forbidden"] = "forbidden"; ErrorNameEnum2["NotFound"] = "not_found"; - ErrorNameEnum2["MethodNotSupported"] = "method_not_supported"; ErrorNameEnum2["Conflict"] = "conflict"; - ErrorNameEnum2["Deleted"] = "deleted"; - ErrorNameEnum2["UnprocessableEntity"] = "unprocessable_entity"; ErrorNameEnum2["ExceededRate"] = "exceeded_rate"; + ErrorNameEnum2["Unknown"] = "unknown"; + ErrorNameEnum2["TeamInviteFailed"] = "team_invite_failed"; ErrorNameEnum2["MaxFaxes"] = "max_faxes"; - ErrorNameEnum2["Unavailable"] = "unavailable"; - ErrorNameEnum2["Maintenance"] = "maintenance"; ErrorNameEnum2["InvalidRecipient"] = "invalid_recipient"; - ErrorNameEnum2["InvalidReminder"] = "invalid_reminder"; - ErrorNameEnum2["TeamInviteFailed"] = "team_invite_failed"; ErrorNameEnum2["SignatureRequestCancelFailed"] = "signature_request_cancel_failed"; ErrorNameEnum2["SignatureRequestRemoveFailed"] = "signature_request_remove_failed"; + ErrorNameEnum2["Maintenance"] = "maintenance"; + ErrorNameEnum2["Deleted"] = "deleted"; + ErrorNameEnum2["MethodNotSupported"] = "method_not_supported"; + ErrorNameEnum2["InvalidReminder"] = "invalid_reminder"; + ErrorNameEnum2["Unavailable"] = "unavailable"; + ErrorNameEnum2["UnprocessableEntity"] = "unprocessable_entity"; ErrorNameEnum2["SignatureRequestExpired"] = "signature_request_expired"; - ErrorNameEnum2["Unknown"] = "unknown"; })(ErrorNameEnum = ErrorResponseError2.ErrorNameEnum || (ErrorResponseError2.ErrorNameEnum = {})); })(ErrorResponseError || (ErrorResponseError = {})); @@ -19129,6 +19131,73 @@ var VoidAuth = class { } }; +// model/oAuthErrorResponse.ts +var OAuthErrorResponse = class _OAuthErrorResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "error", + baseName: "error", + type: "OAuthErrorResponseError" + } + ]; + } + static getAttributeTypeMap() { + return _OAuthErrorResponse.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize(data, "OAuthErrorResponse"); + } +}; + +// model/oAuthErrorResponseError.ts +var OAuthErrorResponseError = class _OAuthErrorResponseError { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "errorMsg", + baseName: "error_msg", + type: "string" + }, + { + name: "errorName", + baseName: "error_name", + type: "OAuthErrorResponseError.ErrorNameEnum" + } + ]; + } + static getAttributeTypeMap() { + return _OAuthErrorResponseError.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize(data, "OAuthErrorResponseError"); + } +}; +((OAuthErrorResponseError2) => { + let ErrorNameEnum; + ((ErrorNameEnum2) => { + ErrorNameEnum2["InvalidGrant"] = "invalid_grant"; + ErrorNameEnum2["InvalidClient"] = "invalid_client"; + ErrorNameEnum2["InvalidRequest"] = "invalid_request"; + ErrorNameEnum2["UnauthorizedClient"] = "unauthorized_client"; + ErrorNameEnum2["UnsupportedGrantType"] = "unsupported_grant_type"; + ErrorNameEnum2["PaymentRequired"] = "payment_required"; + ErrorNameEnum2["AddonRequired"] = "addon_required"; + ErrorNameEnum2["InvalidScope"] = "invalid_scope"; + ErrorNameEnum2["QuotaReached"] = "quota_reached"; + ErrorNameEnum2["ServerError"] = "server_error"; + ErrorNameEnum2["TemporaryUnavailable"] = "temporary_unavailable"; + })(ErrorNameEnum = OAuthErrorResponseError2.ErrorNameEnum || (OAuthErrorResponseError2.ErrorNameEnum = {})); +})(OAuthErrorResponseError || (OAuthErrorResponseError = {})); + // model/oAuthTokenGenerateRequest.ts var OAuthTokenGenerateRequest = class _OAuthTokenGenerateRequest { constructor() { @@ -26822,6 +26891,7 @@ var enumsMap = { FaxLineAreaCodeGetStateEnum, "FaxLineCreateRequest.CountryEnum": FaxLineCreateRequest.CountryEnum, "FaxResponseTransmission.StatusCodeEnum": FaxResponseTransmission.StatusCodeEnum, + "OAuthErrorResponseError.ErrorNameEnum": OAuthErrorResponseError.ErrorNameEnum, "ReportCreateRequest.ReportTypeEnum": ReportCreateRequest.ReportTypeEnum, "ReportResponse.ReportTypeEnum": ReportResponse.ReportTypeEnum, SignatureRequestResponseCustomFieldTypeEnum, @@ -26901,6 +26971,8 @@ var typeMap = { FileResponse, FileResponseDataUri, ListInfoResponse, + OAuthErrorResponse, + OAuthErrorResponseError, OAuthTokenGenerateRequest, OAuthTokenRefreshRequest, OAuthTokenResponse, @@ -30418,7 +30490,7 @@ var OAuthApi = class { reject, error.response, "4XX", - "ErrorResponse" + "OAuthErrorResponse" )) { return; } @@ -30528,7 +30600,7 @@ var OAuthApi = class { reject, error.response, "4XX", - "ErrorResponse" + "OAuthErrorResponse" )) { return; } @@ -36429,6 +36501,8 @@ var APIS = [ ListInfoResponse, OAuth, OAuthApi, + OAuthErrorResponse, + OAuthErrorResponseError, OAuthTokenGenerateRequest, OAuthTokenRefreshRequest, OAuthTokenResponse, diff --git a/sdks/node/docs/model/OAuthErrorResponse.md b/sdks/node/docs/model/OAuthErrorResponse.md new file mode 100644 index 000000000..29e42ab31 --- /dev/null +++ b/sdks/node/docs/model/OAuthErrorResponse.md @@ -0,0 +1,11 @@ +# # OAuthErrorResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `error`*_required_ | [```OAuthErrorResponseError```](OAuthErrorResponseError.md) | | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/node/docs/model/OAuthErrorResponseError.md b/sdks/node/docs/model/OAuthErrorResponseError.md new file mode 100644 index 000000000..903c2f0d0 --- /dev/null +++ b/sdks/node/docs/model/OAuthErrorResponseError.md @@ -0,0 +1,12 @@ +# # OAuthErrorResponseError + +_t__OAuthErrorResponseError::DESCRIPTION + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `errorMsg`*_required_ | ```string``` | _t__OAuthErrorResponseError::ERROR_MSG | | +| `errorName`*_required_ | ```string``` | _t__OAuthErrorResponseError::ERROR_NAME | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/node/model/errorResponseError.ts b/sdks/node/model/errorResponseError.ts index a29549eb4..ac6e173ac 100644 --- a/sdks/node/model/errorResponseError.ts +++ b/sdks/node/model/errorResponseError.ts @@ -78,20 +78,20 @@ export namespace ErrorResponseError { PaymentRequired = "payment_required", Forbidden = "forbidden", NotFound = "not_found", - MethodNotSupported = "method_not_supported", Conflict = "conflict", - Deleted = "deleted", - UnprocessableEntity = "unprocessable_entity", ExceededRate = "exceeded_rate", + Unknown = "unknown", + TeamInviteFailed = "team_invite_failed", MaxFaxes = "max_faxes", - Unavailable = "unavailable", - Maintenance = "maintenance", InvalidRecipient = "invalid_recipient", - InvalidReminder = "invalid_reminder", - TeamInviteFailed = "team_invite_failed", SignatureRequestCancelFailed = "signature_request_cancel_failed", SignatureRequestRemoveFailed = "signature_request_remove_failed", + Maintenance = "maintenance", + Deleted = "deleted", + MethodNotSupported = "method_not_supported", + InvalidReminder = "invalid_reminder", + Unavailable = "unavailable", + UnprocessableEntity = "unprocessable_entity", SignatureRequestExpired = "signature_request_expired", - Unknown = "unknown", } } diff --git a/sdks/node/model/index.ts b/sdks/node/model/index.ts index 963d98157..56f91f90d 100644 --- a/sdks/node/model/index.ts +++ b/sdks/node/model/index.ts @@ -66,6 +66,8 @@ import { RequestFile, VoidAuth, } from "./models"; +import { OAuthErrorResponse } from "./oAuthErrorResponse"; +import { OAuthErrorResponseError } from "./oAuthErrorResponseError"; import { OAuthTokenGenerateRequest } from "./oAuthTokenGenerateRequest"; import { OAuthTokenRefreshRequest } from "./oAuthTokenRefreshRequest"; import { OAuthTokenResponse } from "./oAuthTokenResponse"; @@ -215,6 +217,8 @@ export let enumsMap: { [index: string]: any } = { "FaxLineCreateRequest.CountryEnum": FaxLineCreateRequest.CountryEnum, "FaxResponseTransmission.StatusCodeEnum": FaxResponseTransmission.StatusCodeEnum, + "OAuthErrorResponseError.ErrorNameEnum": + OAuthErrorResponseError.ErrorNameEnum, "ReportCreateRequest.ReportTypeEnum": ReportCreateRequest.ReportTypeEnum, "ReportResponse.ReportTypeEnum": ReportResponse.ReportTypeEnum, SignatureRequestResponseCustomFieldTypeEnum: @@ -308,6 +312,8 @@ export let typeMap: { [index: string]: any } = { FileResponse: FileResponse, FileResponseDataUri: FileResponseDataUri, ListInfoResponse: ListInfoResponse, + OAuthErrorResponse: OAuthErrorResponse, + OAuthErrorResponseError: OAuthErrorResponseError, OAuthTokenGenerateRequest: OAuthTokenGenerateRequest, OAuthTokenRefreshRequest: OAuthTokenRefreshRequest, OAuthTokenResponse: OAuthTokenResponse, @@ -546,6 +552,8 @@ export { Interceptor, ListInfoResponse, OAuth, + OAuthErrorResponse, + OAuthErrorResponseError, OAuthTokenGenerateRequest, OAuthTokenRefreshRequest, OAuthTokenResponse, diff --git a/sdks/node/model/oAuthErrorResponse.ts b/sdks/node/model/oAuthErrorResponse.ts new file mode 100644 index 000000000..970b17586 --- /dev/null +++ b/sdks/node/model/oAuthErrorResponse.ts @@ -0,0 +1,49 @@ +/** + * The MIT License (MIT) + * + * Copyright (C) 2023 dropbox.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import { AttributeTypeMap, ObjectSerializer } from "./"; +import { OAuthErrorResponseError } from "./oAuthErrorResponseError"; + +export class OAuthErrorResponse { + "error": OAuthErrorResponseError; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "error", + baseName: "error", + type: "OAuthErrorResponseError", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return OAuthErrorResponse.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): OAuthErrorResponse { + return ObjectSerializer.deserialize(data, "OAuthErrorResponse"); + } +} diff --git a/sdks/node/model/oAuthErrorResponseError.ts b/sdks/node/model/oAuthErrorResponseError.ts new file mode 100644 index 000000000..25690e227 --- /dev/null +++ b/sdks/node/model/oAuthErrorResponseError.ts @@ -0,0 +1,79 @@ +/** + * The MIT License (MIT) + * + * Copyright (C) 2023 dropbox.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import { AttributeTypeMap, ObjectSerializer } from "./"; + +/** + * _t__OAuthErrorResponseError::DESCRIPTION + */ +export class OAuthErrorResponseError { + /** + * _t__OAuthErrorResponseError::ERROR_MSG + */ + "errorMsg": string; + /** + * _t__OAuthErrorResponseError::ERROR_NAME + */ + "errorName": OAuthErrorResponseError.ErrorNameEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "errorMsg", + baseName: "error_msg", + type: "string", + }, + { + name: "errorName", + baseName: "error_name", + type: "OAuthErrorResponseError.ErrorNameEnum", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return OAuthErrorResponseError.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): OAuthErrorResponseError { + return ObjectSerializer.deserialize(data, "OAuthErrorResponseError"); + } +} + +export namespace OAuthErrorResponseError { + export enum ErrorNameEnum { + InvalidGrant = "invalid_grant", + InvalidClient = "invalid_client", + InvalidRequest = "invalid_request", + UnauthorizedClient = "unauthorized_client", + UnsupportedGrantType = "unsupported_grant_type", + PaymentRequired = "payment_required", + AddonRequired = "addon_required", + InvalidScope = "invalid_scope", + QuotaReached = "quota_reached", + ServerError = "server_error", + TemporaryUnavailable = "temporary_unavailable", + } +} diff --git a/sdks/node/types/model/errorResponseError.d.ts b/sdks/node/types/model/errorResponseError.d.ts index ad57732a1..ecfe5d6d8 100644 --- a/sdks/node/types/model/errorResponseError.d.ts +++ b/sdks/node/types/model/errorResponseError.d.ts @@ -15,20 +15,20 @@ export declare namespace ErrorResponseError { PaymentRequired = "payment_required", Forbidden = "forbidden", NotFound = "not_found", - MethodNotSupported = "method_not_supported", Conflict = "conflict", - Deleted = "deleted", - UnprocessableEntity = "unprocessable_entity", ExceededRate = "exceeded_rate", + Unknown = "unknown", + TeamInviteFailed = "team_invite_failed", MaxFaxes = "max_faxes", - Unavailable = "unavailable", - Maintenance = "maintenance", InvalidRecipient = "invalid_recipient", - InvalidReminder = "invalid_reminder", - TeamInviteFailed = "team_invite_failed", SignatureRequestCancelFailed = "signature_request_cancel_failed", SignatureRequestRemoveFailed = "signature_request_remove_failed", - SignatureRequestExpired = "signature_request_expired", - Unknown = "unknown" + Maintenance = "maintenance", + Deleted = "deleted", + MethodNotSupported = "method_not_supported", + InvalidReminder = "invalid_reminder", + Unavailable = "unavailable", + UnprocessableEntity = "unprocessable_entity", + SignatureRequestExpired = "signature_request_expired" } } diff --git a/sdks/node/types/model/index.d.ts b/sdks/node/types/model/index.d.ts index d36185eb5..f923f6bab 100644 --- a/sdks/node/types/model/index.d.ts +++ b/sdks/node/types/model/index.d.ts @@ -54,6 +54,8 @@ import { FileResponse } from "./fileResponse"; import { FileResponseDataUri } from "./fileResponseDataUri"; import { ListInfoResponse } from "./listInfoResponse"; import { ApiKeyAuth, AttributeTypeMap, Authentication, HttpBasicAuth, HttpBearerAuth, Interceptor, OAuth, ObjectSerializer, RequestDetailedFile, RequestFile, VoidAuth } from "./models"; +import { OAuthErrorResponse } from "./oAuthErrorResponse"; +import { OAuthErrorResponseError } from "./oAuthErrorResponseError"; import { OAuthTokenGenerateRequest } from "./oAuthTokenGenerateRequest"; import { OAuthTokenRefreshRequest } from "./oAuthTokenRefreshRequest"; import { OAuthTokenResponse } from "./oAuthTokenResponse"; @@ -198,4 +200,4 @@ export declare let enumsMap: { export declare let typeMap: { [index: string]: any; }; -export { AccountCreateRequest, AccountCreateResponse, AccountGetResponse, AccountResponse, AccountResponseQuotas, AccountResponseSettings, AccountResponseUsage, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, AccountVerifyResponseAccount, ApiAppCreateRequest, ApiAppGetResponse, ApiAppListResponse, ApiAppResponse, ApiAppResponseOAuth, ApiAppResponseOptions, ApiAppResponseOwnerAccount, ApiAppResponseWhiteLabelingOptions, ApiAppUpdateRequest, ApiKeyAuth, AttributeTypeMap, Authentication, BulkSendJobGetResponse, BulkSendJobGetResponseSignatureRequests, BulkSendJobListResponse, BulkSendJobResponse, BulkSendJobSendResponse, EmbeddedEditUrlRequest, EmbeddedEditUrlResponse, EmbeddedEditUrlResponseEmbedded, EmbeddedSignUrlResponse, EmbeddedSignUrlResponseEmbedded, ErrorResponse, ErrorResponseError, EventCallbackHelper, EventCallbackRequest, EventCallbackRequestEvent, EventCallbackRequestEventMetadata, FaxGetResponse, FaxLineAddUserRequest, FaxLineAreaCodeGetCountryEnum, FaxLineAreaCodeGetProvinceEnum, FaxLineAreaCodeGetResponse, FaxLineAreaCodeGetStateEnum, FaxLineCreateRequest, FaxLineDeleteRequest, FaxLineListResponse, FaxLineRemoveUserRequest, FaxLineResponse, FaxLineResponseFaxLine, FaxListResponse, FaxResponse, FaxResponseTransmission, FaxSendRequest, FileResponse, FileResponseDataUri, HttpBasicAuth, HttpBearerAuth, Interceptor, ListInfoResponse, OAuth, OAuthTokenGenerateRequest, OAuthTokenRefreshRequest, OAuthTokenResponse, ObjectSerializer, ReportCreateRequest, ReportCreateResponse, ReportResponse, RequestDetailedFile, RequestFile, SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, SignatureRequestEditEmbeddedRequest, SignatureRequestEditEmbeddedWithTemplateRequest, SignatureRequestEditRequest, SignatureRequestEditWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, SignatureRequestResponse, SignatureRequestResponseAttachment, SignatureRequestResponseCustomFieldBase, SignatureRequestResponseCustomFieldCheckbox, SignatureRequestResponseCustomFieldText, SignatureRequestResponseCustomFieldTypeEnum, SignatureRequestResponseDataBase, SignatureRequestResponseDataTypeEnum, SignatureRequestResponseDataValueCheckbox, SignatureRequestResponseDataValueCheckboxMerge, SignatureRequestResponseDataValueDateSigned, SignatureRequestResponseDataValueDropdown, SignatureRequestResponseDataValueInitials, SignatureRequestResponseDataValueRadio, SignatureRequestResponseDataValueSignature, SignatureRequestResponseDataValueText, SignatureRequestResponseDataValueTextMerge, SignatureRequestResponseSignatures, SignatureRequestSendRequest, SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest, SubAttachment, SubBulkSignerList, SubBulkSignerListCustomField, SubCC, SubCustomField, SubEditorOptions, SubFieldOptions, SubFormFieldGroup, SubFormFieldRule, SubFormFieldRuleAction, SubFormFieldRuleTrigger, SubFormFieldsPerDocumentBase, SubFormFieldsPerDocumentCheckbox, SubFormFieldsPerDocumentCheckboxMerge, SubFormFieldsPerDocumentDateSigned, SubFormFieldsPerDocumentDropdown, SubFormFieldsPerDocumentFontEnum, SubFormFieldsPerDocumentHyperlink, SubFormFieldsPerDocumentInitials, SubFormFieldsPerDocumentRadio, SubFormFieldsPerDocumentSignature, SubFormFieldsPerDocumentText, SubFormFieldsPerDocumentTextMerge, SubFormFieldsPerDocumentTypeEnum, SubMergeField, SubOAuth, SubOptions, SubSignatureRequestGroupedSigners, SubSignatureRequestSigner, SubSignatureRequestTemplateSigner, SubSigningOptions, SubTeamResponse, SubTemplateRole, SubUnclaimedDraftSigner, SubUnclaimedDraftTemplateSigner, SubWhiteLabelingOptions, TeamAddMemberRequest, TeamCreateRequest, TeamGetInfoResponse, TeamGetResponse, TeamInfoResponse, TeamInviteResponse, TeamInvitesResponse, TeamMemberResponse, TeamMembersResponse, TeamParentResponse, TeamRemoveMemberRequest, TeamResponse, TeamSubTeamsResponse, TeamUpdateRequest, TemplateAddUserRequest, TemplateCreateEmbeddedDraftRequest, TemplateCreateEmbeddedDraftResponse, TemplateCreateEmbeddedDraftResponseTemplate, TemplateCreateRequest, TemplateCreateResponse, TemplateCreateResponseTemplate, TemplateGetResponse, TemplateListResponse, TemplateRemoveUserRequest, TemplateResponse, TemplateResponseAccount, TemplateResponseAccountQuota, TemplateResponseCCRole, TemplateResponseDocument, TemplateResponseDocumentCustomFieldBase, TemplateResponseDocumentCustomFieldCheckbox, TemplateResponseDocumentCustomFieldText, TemplateResponseDocumentFieldGroup, TemplateResponseDocumentFieldGroupRule, TemplateResponseDocumentFormFieldBase, TemplateResponseDocumentFormFieldCheckbox, TemplateResponseDocumentFormFieldDateSigned, TemplateResponseDocumentFormFieldDropdown, TemplateResponseDocumentFormFieldHyperlink, TemplateResponseDocumentFormFieldInitials, TemplateResponseDocumentFormFieldRadio, TemplateResponseDocumentFormFieldSignature, TemplateResponseDocumentFormFieldText, TemplateResponseDocumentStaticFieldBase, TemplateResponseDocumentStaticFieldCheckbox, TemplateResponseDocumentStaticFieldDateSigned, TemplateResponseDocumentStaticFieldDropdown, TemplateResponseDocumentStaticFieldHyperlink, TemplateResponseDocumentStaticFieldInitials, TemplateResponseDocumentStaticFieldRadio, TemplateResponseDocumentStaticFieldSignature, TemplateResponseDocumentStaticFieldText, TemplateResponseFieldAvgTextLength, TemplateResponseSignerRole, TemplateUpdateFilesRequest, TemplateUpdateFilesResponse, TemplateUpdateFilesResponseTemplate, UnclaimedDraftCreateEmbeddedRequest, UnclaimedDraftCreateEmbeddedWithTemplateRequest, UnclaimedDraftCreateRequest, UnclaimedDraftCreateResponse, UnclaimedDraftEditAndResendRequest, UnclaimedDraftResponse, VoidAuth, WarningResponse, }; +export { AccountCreateRequest, AccountCreateResponse, AccountGetResponse, AccountResponse, AccountResponseQuotas, AccountResponseSettings, AccountResponseUsage, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, AccountVerifyResponseAccount, ApiAppCreateRequest, ApiAppGetResponse, ApiAppListResponse, ApiAppResponse, ApiAppResponseOAuth, ApiAppResponseOptions, ApiAppResponseOwnerAccount, ApiAppResponseWhiteLabelingOptions, ApiAppUpdateRequest, ApiKeyAuth, AttributeTypeMap, Authentication, BulkSendJobGetResponse, BulkSendJobGetResponseSignatureRequests, BulkSendJobListResponse, BulkSendJobResponse, BulkSendJobSendResponse, EmbeddedEditUrlRequest, EmbeddedEditUrlResponse, EmbeddedEditUrlResponseEmbedded, EmbeddedSignUrlResponse, EmbeddedSignUrlResponseEmbedded, ErrorResponse, ErrorResponseError, EventCallbackHelper, EventCallbackRequest, EventCallbackRequestEvent, EventCallbackRequestEventMetadata, FaxGetResponse, FaxLineAddUserRequest, FaxLineAreaCodeGetCountryEnum, FaxLineAreaCodeGetProvinceEnum, FaxLineAreaCodeGetResponse, FaxLineAreaCodeGetStateEnum, FaxLineCreateRequest, FaxLineDeleteRequest, FaxLineListResponse, FaxLineRemoveUserRequest, FaxLineResponse, FaxLineResponseFaxLine, FaxListResponse, FaxResponse, FaxResponseTransmission, FaxSendRequest, FileResponse, FileResponseDataUri, HttpBasicAuth, HttpBearerAuth, Interceptor, ListInfoResponse, OAuth, OAuthErrorResponse, OAuthErrorResponseError, OAuthTokenGenerateRequest, OAuthTokenRefreshRequest, OAuthTokenResponse, ObjectSerializer, ReportCreateRequest, ReportCreateResponse, ReportResponse, RequestDetailedFile, RequestFile, SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, SignatureRequestEditEmbeddedRequest, SignatureRequestEditEmbeddedWithTemplateRequest, SignatureRequestEditRequest, SignatureRequestEditWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, SignatureRequestResponse, SignatureRequestResponseAttachment, SignatureRequestResponseCustomFieldBase, SignatureRequestResponseCustomFieldCheckbox, SignatureRequestResponseCustomFieldText, SignatureRequestResponseCustomFieldTypeEnum, SignatureRequestResponseDataBase, SignatureRequestResponseDataTypeEnum, SignatureRequestResponseDataValueCheckbox, SignatureRequestResponseDataValueCheckboxMerge, SignatureRequestResponseDataValueDateSigned, SignatureRequestResponseDataValueDropdown, SignatureRequestResponseDataValueInitials, SignatureRequestResponseDataValueRadio, SignatureRequestResponseDataValueSignature, SignatureRequestResponseDataValueText, SignatureRequestResponseDataValueTextMerge, SignatureRequestResponseSignatures, SignatureRequestSendRequest, SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest, SubAttachment, SubBulkSignerList, SubBulkSignerListCustomField, SubCC, SubCustomField, SubEditorOptions, SubFieldOptions, SubFormFieldGroup, SubFormFieldRule, SubFormFieldRuleAction, SubFormFieldRuleTrigger, SubFormFieldsPerDocumentBase, SubFormFieldsPerDocumentCheckbox, SubFormFieldsPerDocumentCheckboxMerge, SubFormFieldsPerDocumentDateSigned, SubFormFieldsPerDocumentDropdown, SubFormFieldsPerDocumentFontEnum, SubFormFieldsPerDocumentHyperlink, SubFormFieldsPerDocumentInitials, SubFormFieldsPerDocumentRadio, SubFormFieldsPerDocumentSignature, SubFormFieldsPerDocumentText, SubFormFieldsPerDocumentTextMerge, SubFormFieldsPerDocumentTypeEnum, SubMergeField, SubOAuth, SubOptions, SubSignatureRequestGroupedSigners, SubSignatureRequestSigner, SubSignatureRequestTemplateSigner, SubSigningOptions, SubTeamResponse, SubTemplateRole, SubUnclaimedDraftSigner, SubUnclaimedDraftTemplateSigner, SubWhiteLabelingOptions, TeamAddMemberRequest, TeamCreateRequest, TeamGetInfoResponse, TeamGetResponse, TeamInfoResponse, TeamInviteResponse, TeamInvitesResponse, TeamMemberResponse, TeamMembersResponse, TeamParentResponse, TeamRemoveMemberRequest, TeamResponse, TeamSubTeamsResponse, TeamUpdateRequest, TemplateAddUserRequest, TemplateCreateEmbeddedDraftRequest, TemplateCreateEmbeddedDraftResponse, TemplateCreateEmbeddedDraftResponseTemplate, TemplateCreateRequest, TemplateCreateResponse, TemplateCreateResponseTemplate, TemplateGetResponse, TemplateListResponse, TemplateRemoveUserRequest, TemplateResponse, TemplateResponseAccount, TemplateResponseAccountQuota, TemplateResponseCCRole, TemplateResponseDocument, TemplateResponseDocumentCustomFieldBase, TemplateResponseDocumentCustomFieldCheckbox, TemplateResponseDocumentCustomFieldText, TemplateResponseDocumentFieldGroup, TemplateResponseDocumentFieldGroupRule, TemplateResponseDocumentFormFieldBase, TemplateResponseDocumentFormFieldCheckbox, TemplateResponseDocumentFormFieldDateSigned, TemplateResponseDocumentFormFieldDropdown, TemplateResponseDocumentFormFieldHyperlink, TemplateResponseDocumentFormFieldInitials, TemplateResponseDocumentFormFieldRadio, TemplateResponseDocumentFormFieldSignature, TemplateResponseDocumentFormFieldText, TemplateResponseDocumentStaticFieldBase, TemplateResponseDocumentStaticFieldCheckbox, TemplateResponseDocumentStaticFieldDateSigned, TemplateResponseDocumentStaticFieldDropdown, TemplateResponseDocumentStaticFieldHyperlink, TemplateResponseDocumentStaticFieldInitials, TemplateResponseDocumentStaticFieldRadio, TemplateResponseDocumentStaticFieldSignature, TemplateResponseDocumentStaticFieldText, TemplateResponseFieldAvgTextLength, TemplateResponseSignerRole, TemplateUpdateFilesRequest, TemplateUpdateFilesResponse, TemplateUpdateFilesResponseTemplate, UnclaimedDraftCreateEmbeddedRequest, UnclaimedDraftCreateEmbeddedWithTemplateRequest, UnclaimedDraftCreateRequest, UnclaimedDraftCreateResponse, UnclaimedDraftEditAndResendRequest, UnclaimedDraftResponse, VoidAuth, WarningResponse, }; diff --git a/sdks/node/types/model/oAuthErrorResponse.d.ts b/sdks/node/types/model/oAuthErrorResponse.d.ts new file mode 100644 index 000000000..e27d0ab67 --- /dev/null +++ b/sdks/node/types/model/oAuthErrorResponse.d.ts @@ -0,0 +1,9 @@ +import { AttributeTypeMap } from "./"; +import { OAuthErrorResponseError } from "./oAuthErrorResponseError"; +export declare class OAuthErrorResponse { + "error": OAuthErrorResponseError; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): OAuthErrorResponse; +} diff --git a/sdks/node/types/model/oAuthErrorResponseError.d.ts b/sdks/node/types/model/oAuthErrorResponseError.d.ts new file mode 100644 index 000000000..1d584c57b --- /dev/null +++ b/sdks/node/types/model/oAuthErrorResponseError.d.ts @@ -0,0 +1,24 @@ +import { AttributeTypeMap } from "./"; +export declare class OAuthErrorResponseError { + "errorMsg": string; + "errorName": OAuthErrorResponseError.ErrorNameEnum; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): OAuthErrorResponseError; +} +export declare namespace OAuthErrorResponseError { + enum ErrorNameEnum { + InvalidGrant = "invalid_grant", + InvalidClient = "invalid_client", + InvalidRequest = "invalid_request", + UnauthorizedClient = "unauthorized_client", + UnsupportedGrantType = "unsupported_grant_type", + PaymentRequired = "payment_required", + AddonRequired = "addon_required", + InvalidScope = "invalid_scope", + QuotaReached = "quota_reached", + ServerError = "server_error", + TemporaryUnavailable = "temporary_unavailable" + } +} diff --git a/sdks/php/README.md b/sdks/php/README.md index d510976a0..1d346b3a9 100644 --- a/sdks/php/README.md +++ b/sdks/php/README.md @@ -278,6 +278,8 @@ All URIs are relative to *https://api.hellosign.com/v3* - [FileResponse](docs/Model/FileResponse.md) - [FileResponseDataUri](docs/Model/FileResponseDataUri.md) - [ListInfoResponse](docs/Model/ListInfoResponse.md) +- [OAuthErrorResponse](docs/Model/OAuthErrorResponse.md) +- [OAuthErrorResponseError](docs/Model/OAuthErrorResponseError.md) - [OAuthTokenGenerateRequest](docs/Model/OAuthTokenGenerateRequest.md) - [OAuthTokenRefreshRequest](docs/Model/OAuthTokenRefreshRequest.md) - [OAuthTokenResponse](docs/Model/OAuthTokenResponse.md) diff --git a/sdks/php/docs/Model/OAuthErrorResponse.md b/sdks/php/docs/Model/OAuthErrorResponse.md new file mode 100644 index 000000000..f06ed1bd7 --- /dev/null +++ b/sdks/php/docs/Model/OAuthErrorResponse.md @@ -0,0 +1,11 @@ +# # OAuthErrorResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `error`*_required_ | [```\Dropbox\Sign\Model\OAuthErrorResponseError```](OAuthErrorResponseError.md) | | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/php/docs/Model/OAuthErrorResponseError.md b/sdks/php/docs/Model/OAuthErrorResponseError.md new file mode 100644 index 000000000..4a3bf3ee9 --- /dev/null +++ b/sdks/php/docs/Model/OAuthErrorResponseError.md @@ -0,0 +1,12 @@ +# # OAuthErrorResponseError + +_t__OAuthErrorResponseError::DESCRIPTION + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `error_msg`*_required_ | ```string``` | _t__OAuthErrorResponseError::ERROR_MSG | | +| `error_name`*_required_ | ```string``` | _t__OAuthErrorResponseError::ERROR_NAME | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/php/src/Api/OAuthApi.php b/sdks/php/src/Api/OAuthApi.php index 19b137a75..c5eda6ebb 100644 --- a/sdks/php/src/Api/OAuthApi.php +++ b/sdks/php/src/Api/OAuthApi.php @@ -142,7 +142,7 @@ public function getResponse() * * @param Model\OAuthTokenGenerateRequest $o_auth_token_generate_request o_auth_token_generate_request (required) * - * @return Model\OAuthTokenResponse + * @return Model\OAuthTokenResponse|Model\OAuthErrorResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ @@ -166,7 +166,7 @@ public function oauthTokenGenerate(Model\OAuthTokenGenerateRequest $o_auth_token * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['oauthTokenGenerate'] to see the possible values for this operation * - * @return array of Model\OAuthTokenResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of Model\OAuthTokenResponse|\Dropbox\Sign\Model\OAuthErrorResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::oauthTokenGenerate. This method will eventually become unavailable @@ -201,7 +201,7 @@ public function oauthTokenGenerateWithHttpInfo(Model\OAuthTokenGenerateRequest $ $result = $this->handleRangeCodeResponse( $response, '4XX', - '\Dropbox\Sign\Model\ErrorResponse' + '\Dropbox\Sign\Model\OAuthErrorResponse' ); if ($result) { return $result; @@ -278,7 +278,7 @@ public function oauthTokenGenerateWithHttpInfo(Model\OAuthTokenGenerateRequest $ $response->getHeaders(), ]; } catch (ApiException $e) { - if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { + if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\OAuthErrorResponse')) { throw $e; } switch ($e->getCode()) { @@ -525,7 +525,7 @@ protected function getHostSettingsForoauthTokenGenerate(): array * * @param Model\OAuthTokenRefreshRequest $o_auth_token_refresh_request o_auth_token_refresh_request (required) * - * @return Model\OAuthTokenResponse + * @return Model\OAuthTokenResponse|Model\OAuthErrorResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ @@ -549,7 +549,7 @@ public function oauthTokenRefresh(Model\OAuthTokenRefreshRequest $o_auth_token_r * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['oauthTokenRefresh'] to see the possible values for this operation * - * @return array of Model\OAuthTokenResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of Model\OAuthTokenResponse|\Dropbox\Sign\Model\OAuthErrorResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::oauthTokenRefresh. This method will eventually become unavailable @@ -584,7 +584,7 @@ public function oauthTokenRefreshWithHttpInfo(Model\OAuthTokenRefreshRequest $o_ $result = $this->handleRangeCodeResponse( $response, '4XX', - '\Dropbox\Sign\Model\ErrorResponse' + '\Dropbox\Sign\Model\OAuthErrorResponse' ); if ($result) { return $result; @@ -661,7 +661,7 @@ public function oauthTokenRefreshWithHttpInfo(Model\OAuthTokenRefreshRequest $o_ $response->getHeaders(), ]; } catch (ApiException $e) { - if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { + if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\OAuthErrorResponse')) { throw $e; } switch ($e->getCode()) { diff --git a/sdks/php/src/Model/ErrorResponseError.php b/sdks/php/src/Model/ErrorResponseError.php index 02dbda810..7de829459 100644 --- a/sdks/php/src/Model/ErrorResponseError.php +++ b/sdks/php/src/Model/ErrorResponseError.php @@ -238,21 +238,21 @@ public function getModelName() public const ERROR_NAME_PAYMENT_REQUIRED = 'payment_required'; public const ERROR_NAME_FORBIDDEN = 'forbidden'; public const ERROR_NAME_NOT_FOUND = 'not_found'; - public const ERROR_NAME_METHOD_NOT_SUPPORTED = 'method_not_supported'; public const ERROR_NAME_CONFLICT = 'conflict'; - public const ERROR_NAME_DELETED = 'deleted'; - public const ERROR_NAME_UNPROCESSABLE_ENTITY = 'unprocessable_entity'; public const ERROR_NAME_EXCEEDED_RATE = 'exceeded_rate'; + public const ERROR_NAME_UNKNOWN = 'unknown'; + public const ERROR_NAME_TEAM_INVITE_FAILED = 'team_invite_failed'; public const ERROR_NAME_MAX_FAXES = 'max_faxes'; - public const ERROR_NAME_UNAVAILABLE = 'unavailable'; - public const ERROR_NAME_MAINTENANCE = 'maintenance'; public const ERROR_NAME_INVALID_RECIPIENT = 'invalid_recipient'; - public const ERROR_NAME_INVALID_REMINDER = 'invalid_reminder'; - public const ERROR_NAME_TEAM_INVITE_FAILED = 'team_invite_failed'; public const ERROR_NAME_SIGNATURE_REQUEST_CANCEL_FAILED = 'signature_request_cancel_failed'; public const ERROR_NAME_SIGNATURE_REQUEST_REMOVE_FAILED = 'signature_request_remove_failed'; + public const ERROR_NAME_MAINTENANCE = 'maintenance'; + public const ERROR_NAME_DELETED = 'deleted'; + public const ERROR_NAME_METHOD_NOT_SUPPORTED = 'method_not_supported'; + public const ERROR_NAME_INVALID_REMINDER = 'invalid_reminder'; + public const ERROR_NAME_UNAVAILABLE = 'unavailable'; + public const ERROR_NAME_UNPROCESSABLE_ENTITY = 'unprocessable_entity'; public const ERROR_NAME_SIGNATURE_REQUEST_EXPIRED = 'signature_request_expired'; - public const ERROR_NAME_UNKNOWN = 'unknown'; /** * Gets allowable values of the enum @@ -267,21 +267,21 @@ public function getErrorNameAllowableValues() self::ERROR_NAME_PAYMENT_REQUIRED, self::ERROR_NAME_FORBIDDEN, self::ERROR_NAME_NOT_FOUND, - self::ERROR_NAME_METHOD_NOT_SUPPORTED, self::ERROR_NAME_CONFLICT, - self::ERROR_NAME_DELETED, - self::ERROR_NAME_UNPROCESSABLE_ENTITY, self::ERROR_NAME_EXCEEDED_RATE, + self::ERROR_NAME_UNKNOWN, + self::ERROR_NAME_TEAM_INVITE_FAILED, self::ERROR_NAME_MAX_FAXES, - self::ERROR_NAME_UNAVAILABLE, - self::ERROR_NAME_MAINTENANCE, self::ERROR_NAME_INVALID_RECIPIENT, - self::ERROR_NAME_INVALID_REMINDER, - self::ERROR_NAME_TEAM_INVITE_FAILED, self::ERROR_NAME_SIGNATURE_REQUEST_CANCEL_FAILED, self::ERROR_NAME_SIGNATURE_REQUEST_REMOVE_FAILED, + self::ERROR_NAME_MAINTENANCE, + self::ERROR_NAME_DELETED, + self::ERROR_NAME_METHOD_NOT_SUPPORTED, + self::ERROR_NAME_INVALID_REMINDER, + self::ERROR_NAME_UNAVAILABLE, + self::ERROR_NAME_UNPROCESSABLE_ENTITY, self::ERROR_NAME_SIGNATURE_REQUEST_EXPIRED, - self::ERROR_NAME_UNKNOWN, ]; } diff --git a/sdks/php/src/Model/OAuthErrorResponse.php b/sdks/php/src/Model/OAuthErrorResponse.php new file mode 100644 index 000000000..fe015f3e7 --- /dev/null +++ b/sdks/php/src/Model/OAuthErrorResponse.php @@ -0,0 +1,416 @@ + + */ +class OAuthErrorResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'OAuthErrorResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'error' => '\Dropbox\Sign\Model\OAuthErrorResponseError', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'error' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'error' => false, + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return bool[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'error' => 'error', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'error' => 'setError', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'error' => 'getError', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('error', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): OAuthErrorResponse + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): OAuthErrorResponse + { + /** @var OAuthErrorResponse */ + return ObjectSerializer::deserialize( + $data, + OAuthErrorResponse::class, + ); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string|int|object|array|mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['error'] === null) { + $invalidProperties[] = "'error' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets error + * + * @return OAuthErrorResponseError + */ + public function getError() + { + return $this->container['error']; + } + + /** + * Sets error + * + * @param OAuthErrorResponseError $error error + * + * @return self + */ + public function setError(OAuthErrorResponseError $error) + { + if (is_null($error)) { + throw new InvalidArgumentException('non-nullable error cannot be null'); + } + $this->container['error'] = $error; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + #[ReturnTypeWillChange] + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + #[ReturnTypeWillChange] + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @see https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + #[ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_UNESCAPED_SLASHES + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/sdks/php/src/Model/OAuthErrorResponseError.php b/sdks/php/src/Model/OAuthErrorResponseError.php new file mode 100644 index 000000000..77622370f --- /dev/null +++ b/sdks/php/src/Model/OAuthErrorResponseError.php @@ -0,0 +1,507 @@ + + */ +class OAuthErrorResponseError implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'OAuthErrorResponseError'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'error_msg' => 'string', + 'error_name' => 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'error_msg' => null, + 'error_name' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'error_msg' => false, + 'error_name' => false, + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return bool[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'error_msg' => 'error_msg', + 'error_name' => 'error_name', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'error_msg' => 'setErrorMsg', + 'error_name' => 'setErrorName', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'error_msg' => 'getErrorMsg', + 'error_name' => 'getErrorName', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const ERROR_NAME_INVALID_GRANT = 'invalid_grant'; + public const ERROR_NAME_INVALID_CLIENT = 'invalid_client'; + public const ERROR_NAME_INVALID_REQUEST = 'invalid_request'; + public const ERROR_NAME_UNAUTHORIZED_CLIENT = 'unauthorized_client'; + public const ERROR_NAME_UNSUPPORTED_GRANT_TYPE = 'unsupported_grant_type'; + public const ERROR_NAME_PAYMENT_REQUIRED = 'payment_required'; + public const ERROR_NAME_ADDON_REQUIRED = 'addon_required'; + public const ERROR_NAME_INVALID_SCOPE = 'invalid_scope'; + public const ERROR_NAME_QUOTA_REACHED = 'quota_reached'; + public const ERROR_NAME_SERVER_ERROR = 'server_error'; + public const ERROR_NAME_TEMPORARY_UNAVAILABLE = 'temporary_unavailable'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getErrorNameAllowableValues() + { + return [ + self::ERROR_NAME_INVALID_GRANT, + self::ERROR_NAME_INVALID_CLIENT, + self::ERROR_NAME_INVALID_REQUEST, + self::ERROR_NAME_UNAUTHORIZED_CLIENT, + self::ERROR_NAME_UNSUPPORTED_GRANT_TYPE, + self::ERROR_NAME_PAYMENT_REQUIRED, + self::ERROR_NAME_ADDON_REQUIRED, + self::ERROR_NAME_INVALID_SCOPE, + self::ERROR_NAME_QUOTA_REACHED, + self::ERROR_NAME_SERVER_ERROR, + self::ERROR_NAME_TEMPORARY_UNAVAILABLE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('error_msg', $data ?? [], null); + $this->setIfExists('error_name', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): OAuthErrorResponseError + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): OAuthErrorResponseError + { + /** @var OAuthErrorResponseError */ + return ObjectSerializer::deserialize( + $data, + OAuthErrorResponseError::class, + ); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string|int|object|array|mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['error_msg'] === null) { + $invalidProperties[] = "'error_msg' can't be null"; + } + if ($this->container['error_name'] === null) { + $invalidProperties[] = "'error_name' can't be null"; + } + $allowedValues = $this->getErrorNameAllowableValues(); + if (!is_null($this->container['error_name']) && !in_array($this->container['error_name'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'error_name', must be one of '%s'", + $this->container['error_name'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets error_msg + * + * @return string + */ + public function getErrorMsg() + { + return $this->container['error_msg']; + } + + /** + * Sets error_msg + * + * @param string $error_msg _t__OAuthErrorResponseError::ERROR_MSG + * + * @return self + */ + public function setErrorMsg(string $error_msg) + { + if (is_null($error_msg)) { + throw new InvalidArgumentException('non-nullable error_msg cannot be null'); + } + $this->container['error_msg'] = $error_msg; + + return $this; + } + + /** + * Gets error_name + * + * @return string + */ + public function getErrorName() + { + return $this->container['error_name']; + } + + /** + * Sets error_name + * + * @param string $error_name _t__OAuthErrorResponseError::ERROR_NAME + * + * @return self + */ + public function setErrorName(string $error_name) + { + if (is_null($error_name)) { + throw new InvalidArgumentException('non-nullable error_name cannot be null'); + } + $allowedValues = $this->getErrorNameAllowableValues(); + if (!in_array($error_name, $allowedValues, true)) { + throw new InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'error_name', must be one of '%s'", + $error_name, + implode("', '", $allowedValues) + ) + ); + } + $this->container['error_name'] = $error_name; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + #[ReturnTypeWillChange] + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + #[ReturnTypeWillChange] + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @see https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + #[ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_UNESCAPED_SLASHES + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/sdks/python/README.md b/sdks/python/README.md index 1837792ca..c46aba78f 100644 --- a/sdks/python/README.md +++ b/sdks/python/README.md @@ -234,6 +234,8 @@ Class | Method | HTTP request | Description - [FileResponse](docs/FileResponse.md) - [FileResponseDataUri](docs/FileResponseDataUri.md) - [ListInfoResponse](docs/ListInfoResponse.md) + - [OAuthErrorResponse](docs/OAuthErrorResponse.md) + - [OAuthErrorResponseError](docs/OAuthErrorResponseError.md) - [OAuthTokenGenerateRequest](docs/OAuthTokenGenerateRequest.md) - [OAuthTokenRefreshRequest](docs/OAuthTokenRefreshRequest.md) - [OAuthTokenResponse](docs/OAuthTokenResponse.md) diff --git a/sdks/python/docs/OAuthErrorResponse.md b/sdks/python/docs/OAuthErrorResponse.md new file mode 100644 index 000000000..704c19b5f --- /dev/null +++ b/sdks/python/docs/OAuthErrorResponse.md @@ -0,0 +1,12 @@ +# OAuthErrorResponse + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `error`*_required_ | [```OAuthErrorResponseError```](OAuthErrorResponseError.md) | | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/python/docs/OAuthErrorResponseError.md b/sdks/python/docs/OAuthErrorResponseError.md new file mode 100644 index 000000000..0e6606851 --- /dev/null +++ b/sdks/python/docs/OAuthErrorResponseError.md @@ -0,0 +1,13 @@ +# OAuthErrorResponseError + +_t__OAuthErrorResponseError::DESCRIPTION + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `error_msg`*_required_ | ```str``` | _t__OAuthErrorResponseError::ERROR_MSG | | +| `error_name`*_required_ | ```str``` | _t__OAuthErrorResponseError::ERROR_NAME | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/python/dropbox_sign/__init__.py b/sdks/python/dropbox_sign/__init__.py index aac250c6c..e8abd54fb 100644 --- a/sdks/python/dropbox_sign/__init__.py +++ b/sdks/python/dropbox_sign/__init__.py @@ -107,6 +107,8 @@ from dropbox_sign.models.file_response import FileResponse from dropbox_sign.models.file_response_data_uri import FileResponseDataUri from dropbox_sign.models.list_info_response import ListInfoResponse +from dropbox_sign.models.o_auth_error_response import OAuthErrorResponse +from dropbox_sign.models.o_auth_error_response_error import OAuthErrorResponseError from dropbox_sign.models.o_auth_token_generate_request import OAuthTokenGenerateRequest from dropbox_sign.models.o_auth_token_refresh_request import OAuthTokenRefreshRequest from dropbox_sign.models.o_auth_token_response import OAuthTokenResponse diff --git a/sdks/python/dropbox_sign/api/o_auth_api.py b/sdks/python/dropbox_sign/api/o_auth_api.py index 6ea59b559..baf6d80cf 100644 --- a/sdks/python/dropbox_sign/api/o_auth_api.py +++ b/sdks/python/dropbox_sign/api/o_auth_api.py @@ -93,7 +93,7 @@ def oauth_token_generate( _response_types_map: Dict[str, Optional[str]] = { "200": "OAuthTokenResponse", - "4XX": "ErrorResponse", + "4XX": "OAuthErrorResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -158,7 +158,7 @@ def oauth_token_generate_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "OAuthTokenResponse", - "4XX": "ErrorResponse", + "4XX": "OAuthErrorResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -223,7 +223,7 @@ def oauth_token_generate_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "OAuthTokenResponse", - "4XX": "ErrorResponse", + "4XX": "OAuthErrorResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -371,7 +371,7 @@ def oauth_token_refresh( _response_types_map: Dict[str, Optional[str]] = { "200": "OAuthTokenResponse", - "4XX": "ErrorResponse", + "4XX": "OAuthErrorResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -436,7 +436,7 @@ def oauth_token_refresh_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "OAuthTokenResponse", - "4XX": "ErrorResponse", + "4XX": "OAuthErrorResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -501,7 +501,7 @@ def oauth_token_refresh_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "OAuthTokenResponse", - "4XX": "ErrorResponse", + "4XX": "OAuthErrorResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout diff --git a/sdks/python/dropbox_sign/models/__init__.py b/sdks/python/dropbox_sign/models/__init__.py index bb54e9011..ccdda34a7 100644 --- a/sdks/python/dropbox_sign/models/__init__.py +++ b/sdks/python/dropbox_sign/models/__init__.py @@ -90,6 +90,8 @@ from dropbox_sign.models.file_response import FileResponse from dropbox_sign.models.file_response_data_uri import FileResponseDataUri from dropbox_sign.models.list_info_response import ListInfoResponse +from dropbox_sign.models.o_auth_error_response import OAuthErrorResponse +from dropbox_sign.models.o_auth_error_response_error import OAuthErrorResponseError from dropbox_sign.models.o_auth_token_generate_request import OAuthTokenGenerateRequest from dropbox_sign.models.o_auth_token_refresh_request import OAuthTokenRefreshRequest from dropbox_sign.models.o_auth_token_response import OAuthTokenResponse diff --git a/sdks/python/dropbox_sign/models/error_response_error.py b/sdks/python/dropbox_sign/models/error_response_error.py index db67be601..b56b7f04f 100644 --- a/sdks/python/dropbox_sign/models/error_response_error.py +++ b/sdks/python/dropbox_sign/models/error_response_error.py @@ -48,25 +48,25 @@ def error_name_validate_enum(cls, value): "payment_required", "forbidden", "not_found", - "method_not_supported", "conflict", - "deleted", - "unprocessable_entity", "exceeded_rate", + "unknown", + "team_invite_failed", "max_faxes", - "unavailable", - "maintenance", "invalid_recipient", - "invalid_reminder", - "team_invite_failed", "signature_request_cancel_failed", "signature_request_remove_failed", + "maintenance", + "deleted", + "method_not_supported", + "invalid_reminder", + "unavailable", + "unprocessable_entity", "signature_request_expired", - "unknown", ] ): raise ValueError( - "must be one of enum values ('bad_request', 'unauthorized', 'payment_required', 'forbidden', 'not_found', 'method_not_supported', 'conflict', 'deleted', 'unprocessable_entity', 'exceeded_rate', 'max_faxes', 'unavailable', 'maintenance', 'invalid_recipient', 'invalid_reminder', 'team_invite_failed', 'signature_request_cancel_failed', 'signature_request_remove_failed', 'signature_request_expired', 'unknown')" + "must be one of enum values ('bad_request', 'unauthorized', 'payment_required', 'forbidden', 'not_found', 'conflict', 'exceeded_rate', 'unknown', 'team_invite_failed', 'max_faxes', 'invalid_recipient', 'signature_request_cancel_failed', 'signature_request_remove_failed', 'maintenance', 'deleted', 'method_not_supported', 'invalid_reminder', 'unavailable', 'unprocessable_entity', 'signature_request_expired')" ) return value diff --git a/sdks/python/dropbox_sign/models/o_auth_error_response.py b/sdks/python/dropbox_sign/models/o_auth_error_response.py new file mode 100644 index 000000000..d698e36fa --- /dev/null +++ b/sdks/python/dropbox_sign/models/o_auth_error_response.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" +Dropbox Sign API + +Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from dropbox_sign.models.o_auth_error_response_error import OAuthErrorResponseError +from typing import Optional, Set +from typing_extensions import Self +from typing import Tuple, Union +import io +from pydantic import StrictBool + + +class OAuthErrorResponse(BaseModel): + """ + OAuthErrorResponse + """ # noqa: E501 + + error: OAuthErrorResponseError + __properties: ClassVar[List[str]] = ["error"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + arbitrary_types_allowed=True, + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: + data: List[Tuple[str, str]] = [] + + for key, value in self.to_dict(excluded_fields).items(): + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OAuthErrorResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict["error"] = self.error.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OAuthErrorResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "error": ( + OAuthErrorResponseError.from_dict(obj["error"]) + if obj.get("error") is not None + else None + ) + } + ) + return _obj + + @classmethod + def init(cls, data: Any) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + if isinstance(data, str): + data = json.loads(data) + + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[str, str]: + return { + "error": "(OAuthErrorResponseError,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/o_auth_error_response_error.py b/sdks/python/dropbox_sign/models/o_auth_error_response_error.py new file mode 100644 index 000000000..14a75a54b --- /dev/null +++ b/sdks/python/dropbox_sign/models/o_auth_error_response_error.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" +Dropbox Sign API + +Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from typing import Tuple, Union +import io +from pydantic import StrictBool + + +class OAuthErrorResponseError(BaseModel): + """ + _t__OAuthErrorResponseError::DESCRIPTION + """ # noqa: E501 + + error_msg: StrictStr = Field(description="_t__OAuthErrorResponseError::ERROR_MSG") + error_name: StrictStr = Field(description="_t__OAuthErrorResponseError::ERROR_NAME") + __properties: ClassVar[List[str]] = ["error_msg", "error_name"] + + @field_validator("error_name") + def error_name_validate_enum(cls, value): + """Validates the enum""" + if value not in set( + [ + "invalid_grant", + "invalid_client", + "invalid_request", + "unauthorized_client", + "unsupported_grant_type", + "payment_required", + "addon_required", + "invalid_scope", + "quota_reached", + "server_error", + "temporary_unavailable", + ] + ): + raise ValueError( + "must be one of enum values ('invalid_grant', 'invalid_client', 'invalid_request', 'unauthorized_client', 'unsupported_grant_type', 'payment_required', 'addon_required', 'invalid_scope', 'quota_reached', 'server_error', 'temporary_unavailable')" + ) + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + arbitrary_types_allowed=True, + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: + data: List[Tuple[str, str]] = [] + + for key, value in self.to_dict(excluded_fields).items(): + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OAuthErrorResponseError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OAuthErrorResponseError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"error_msg": obj.get("error_msg"), "error_name": obj.get("error_name")} + ) + return _obj + + @classmethod + def init(cls, data: Any) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + if isinstance(data, str): + data = json.loads(data) + + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[str, str]: + return { + "error_msg": "(str,)", + "error_name": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [] diff --git a/sdks/ruby/README.md b/sdks/ruby/README.md index 4d11460d2..47b5c776b 100644 --- a/sdks/ruby/README.md +++ b/sdks/ruby/README.md @@ -238,6 +238,8 @@ All URIs are relative to *https://api.hellosign.com/v3* - [Dropbox::Sign::FileResponse](docs/FileResponse.md) - [Dropbox::Sign::FileResponseDataUri](docs/FileResponseDataUri.md) - [Dropbox::Sign::ListInfoResponse](docs/ListInfoResponse.md) + - [Dropbox::Sign::OAuthErrorResponse](docs/OAuthErrorResponse.md) + - [Dropbox::Sign::OAuthErrorResponseError](docs/OAuthErrorResponseError.md) - [Dropbox::Sign::OAuthTokenGenerateRequest](docs/OAuthTokenGenerateRequest.md) - [Dropbox::Sign::OAuthTokenRefreshRequest](docs/OAuthTokenRefreshRequest.md) - [Dropbox::Sign::OAuthTokenResponse](docs/OAuthTokenResponse.md) diff --git a/sdks/ruby/docs/OAuthErrorResponse.md b/sdks/ruby/docs/OAuthErrorResponse.md new file mode 100644 index 000000000..0034680f5 --- /dev/null +++ b/sdks/ruby/docs/OAuthErrorResponse.md @@ -0,0 +1,10 @@ +# Dropbox::Sign::OAuthErrorResponse + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `error`*_required_ | [```OAuthErrorResponseError```](OAuthErrorResponseError.md) | | | + diff --git a/sdks/ruby/docs/OAuthErrorResponseError.md b/sdks/ruby/docs/OAuthErrorResponseError.md new file mode 100644 index 000000000..5eaf8cb47 --- /dev/null +++ b/sdks/ruby/docs/OAuthErrorResponseError.md @@ -0,0 +1,11 @@ +# Dropbox::Sign::OAuthErrorResponseError + +_t__OAuthErrorResponseError::DESCRIPTION + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `error_msg`*_required_ | ```String``` | _t__OAuthErrorResponseError::ERROR_MSG | | +| `error_name`*_required_ | ```String``` | _t__OAuthErrorResponseError::ERROR_NAME | | + diff --git a/sdks/ruby/lib/dropbox-sign.rb b/sdks/ruby/lib/dropbox-sign.rb index e85d1d545..07365789a 100644 --- a/sdks/ruby/lib/dropbox-sign.rb +++ b/sdks/ruby/lib/dropbox-sign.rb @@ -71,6 +71,8 @@ require 'dropbox-sign/models/file_response' require 'dropbox-sign/models/file_response_data_uri' require 'dropbox-sign/models/list_info_response' +require 'dropbox-sign/models/o_auth_error_response' +require 'dropbox-sign/models/o_auth_error_response_error' require 'dropbox-sign/models/o_auth_token_generate_request' require 'dropbox-sign/models/o_auth_token_refresh_request' require 'dropbox-sign/models/o_auth_token_response' diff --git a/sdks/ruby/lib/dropbox-sign/api/o_auth_api.rb b/sdks/ruby/lib/dropbox-sign/api/o_auth_api.rb index ae9af5a5c..e89a9eca3 100644 --- a/sdks/ruby/lib/dropbox-sign/api/o_auth_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/o_auth_api.rb @@ -114,7 +114,7 @@ def oauth_token_generate_with_http_info(o_auth_token_generate_request, opts = {} if e.code >= range_code_left && e.code <= range_code_right body = @api_client.convert_to_type( JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], - "Dropbox::Sign::ErrorResponse" + "Dropbox::Sign::OAuthErrorResponse" ) fail ApiError.new(:code => e.code, @@ -223,7 +223,7 @@ def oauth_token_refresh_with_http_info(o_auth_token_refresh_request, opts = {}) if e.code >= range_code_left && e.code <= range_code_right body = @api_client.convert_to_type( JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], - "Dropbox::Sign::ErrorResponse" + "Dropbox::Sign::OAuthErrorResponse" ) fail ApiError.new(:code => e.code, diff --git a/sdks/ruby/lib/dropbox-sign/models/error_response_error.rb b/sdks/ruby/lib/dropbox-sign/models/error_response_error.rb index 348cf4217..0419ed78d 100644 --- a/sdks/ruby/lib/dropbox-sign/models/error_response_error.rb +++ b/sdks/ruby/lib/dropbox-sign/models/error_response_error.rb @@ -161,7 +161,7 @@ def list_invalid_properties def valid? return false if @error_msg.nil? return false if @error_name.nil? - error_name_validator = EnumAttributeValidator.new('String', ["bad_request", "unauthorized", "payment_required", "forbidden", "not_found", "method_not_supported", "conflict", "deleted", "unprocessable_entity", "exceeded_rate", "max_faxes", "unavailable", "maintenance", "invalid_recipient", "invalid_reminder", "team_invite_failed", "signature_request_cancel_failed", "signature_request_remove_failed", "signature_request_expired", "unknown"]) + error_name_validator = EnumAttributeValidator.new('String', ["bad_request", "unauthorized", "payment_required", "forbidden", "not_found", "conflict", "exceeded_rate", "unknown", "team_invite_failed", "max_faxes", "invalid_recipient", "signature_request_cancel_failed", "signature_request_remove_failed", "maintenance", "deleted", "method_not_supported", "invalid_reminder", "unavailable", "unprocessable_entity", "signature_request_expired"]) return false unless error_name_validator.valid?(@error_name) true end @@ -179,7 +179,7 @@ def error_msg=(error_msg) # Custom attribute writer method checking allowed values (enum). # @param [Object] error_name Object to be assigned def error_name=(error_name) - validator = EnumAttributeValidator.new('String', ["bad_request", "unauthorized", "payment_required", "forbidden", "not_found", "method_not_supported", "conflict", "deleted", "unprocessable_entity", "exceeded_rate", "max_faxes", "unavailable", "maintenance", "invalid_recipient", "invalid_reminder", "team_invite_failed", "signature_request_cancel_failed", "signature_request_remove_failed", "signature_request_expired", "unknown"]) + validator = EnumAttributeValidator.new('String', ["bad_request", "unauthorized", "payment_required", "forbidden", "not_found", "conflict", "exceeded_rate", "unknown", "team_invite_failed", "max_faxes", "invalid_recipient", "signature_request_cancel_failed", "signature_request_remove_failed", "maintenance", "deleted", "method_not_supported", "invalid_reminder", "unavailable", "unprocessable_entity", "signature_request_expired"]) unless validator.valid?(error_name) fail ArgumentError, "invalid value for \"error_name\", must be one of #{validator.allowable_values}." end diff --git a/sdks/ruby/lib/dropbox-sign/models/o_auth_error_response.rb b/sdks/ruby/lib/dropbox-sign/models/o_auth_error_response.rb new file mode 100644 index 000000000..03a9ee062 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/o_auth_error_response.rb @@ -0,0 +1,266 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class OAuthErrorResponse + # @return [OAuthErrorResponseError] + attr_accessor :error + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'error' => :'error' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'error' => :'OAuthErrorResponseError' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Returns attribute map of this model + parent + def self.merged_attributes + self.attribute_map + end + + # Attribute type mapping of this model + parent + def self.merged_types + self.openapi_types + end + + # Returns list of attributes with nullable: true of this model + parent + def self.merged_nullable + self.openapi_nullable + end + + # Attempt to instantiate and hydrate a new instance of this class + # @param [Object] data Data to be converted + # @return [OAuthErrorResponse] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "OAuthErrorResponse" + ) || OAuthErrorResponse.new + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Dropbox::Sign::OAuthErrorResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::OAuthErrorResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'error') + self.error = attributes[:'error'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @error.nil? + invalid_properties.push('invalid value for "error", error cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @error.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] error Value to be assigned + def error=(error) + if error.nil? + fail ArgumentError, 'error cannot be nil' + end + + @error = error + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + error == o.error + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [error].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attribute_map = self.class.merged_attributes + + self.class.merged_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + klass = Dropbox::Sign.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash(include_nil = true) + hash = {} + self.class.merged_attributes.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + next unless include_nil + is_nullable = self.class.merged_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value, include_nil) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value, include_nil = true) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v, include_nil) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v, include_nil) } + end + elsif value.respond_to? :to_hash + value.to_hash(include_nil) + else + value + end + end + end +end diff --git a/sdks/ruby/lib/dropbox-sign/models/o_auth_error_response_error.rb b/sdks/ruby/lib/dropbox-sign/models/o_auth_error_response_error.rb new file mode 100644 index 000000000..2eae449ac --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/o_auth_error_response_error.rb @@ -0,0 +1,318 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + # _t__OAuthErrorResponseError::DESCRIPTION + class OAuthErrorResponseError + # _t__OAuthErrorResponseError::ERROR_MSG + # @return [String] + attr_accessor :error_msg + + # _t__OAuthErrorResponseError::ERROR_NAME + # @return [String] + attr_accessor :error_name + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'error_msg' => :'error_msg', + :'error_name' => :'error_name' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'error_msg' => :'String', + :'error_name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Returns attribute map of this model + parent + def self.merged_attributes + self.attribute_map + end + + # Attribute type mapping of this model + parent + def self.merged_types + self.openapi_types + end + + # Returns list of attributes with nullable: true of this model + parent + def self.merged_nullable + self.openapi_nullable + end + + # Attempt to instantiate and hydrate a new instance of this class + # @param [Object] data Data to be converted + # @return [OAuthErrorResponseError] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "OAuthErrorResponseError" + ) || OAuthErrorResponseError.new + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Dropbox::Sign::OAuthErrorResponseError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::OAuthErrorResponseError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'error_msg') + self.error_msg = attributes[:'error_msg'] + end + + if attributes.key?(:'error_name') + self.error_name = attributes[:'error_name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @error_msg.nil? + invalid_properties.push('invalid value for "error_msg", error_msg cannot be nil.') + end + + if @error_name.nil? + invalid_properties.push('invalid value for "error_name", error_name cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @error_msg.nil? + return false if @error_name.nil? + error_name_validator = EnumAttributeValidator.new('String', ["invalid_grant", "invalid_client", "invalid_request", "unauthorized_client", "unsupported_grant_type", "payment_required", "addon_required", "invalid_scope", "quota_reached", "server_error", "temporary_unavailable"]) + return false unless error_name_validator.valid?(@error_name) + true + end + + # Custom attribute writer method with validation + # @param [Object] error_msg Value to be assigned + def error_msg=(error_msg) + if error_msg.nil? + fail ArgumentError, 'error_msg cannot be nil' + end + + @error_msg = error_msg + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] error_name Object to be assigned + def error_name=(error_name) + validator = EnumAttributeValidator.new('String', ["invalid_grant", "invalid_client", "invalid_request", "unauthorized_client", "unsupported_grant_type", "payment_required", "addon_required", "invalid_scope", "quota_reached", "server_error", "temporary_unavailable"]) + unless validator.valid?(error_name) + fail ArgumentError, "invalid value for \"error_name\", must be one of #{validator.allowable_values}." + end + @error_name = error_name + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + error_msg == o.error_msg && + error_name == o.error_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [error_msg, error_name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attribute_map = self.class.merged_attributes + + self.class.merged_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + klass = Dropbox::Sign.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash(include_nil = true) + hash = {} + self.class.merged_attributes.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + next unless include_nil + is_nullable = self.class.merged_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value, include_nil) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value, include_nil = true) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v, include_nil) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v, include_nil) } + end + elsif value.respond_to? :to_hash + value.to_hash(include_nil) + else + value + end + end + end +end From 0ca7732a054232cca61d56d363fe49ef69c16d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20W=C3=B3jcik?= Date: Tue, 9 Jun 2026 11:33:31 +0200 Subject: [PATCH 5/6] Remove separated OAuth Error class + add translations --- openapi-raw.yaml | 404 ++++++++++++++++++------------------------- openapi-sdk.yaml | 150 +++++----------- openapi.yaml | 150 +++++----------- translations/en.yaml | 164 ++++++++++++++++++ 4 files changed, 429 insertions(+), 439 deletions(-) diff --git a/openapi-raw.yaml b/openapi-raw.yaml index a0addf039..b0ead1772 100644 --- a/openapi-raw.yaml +++ b/openapi-raw.yaml @@ -968,8 +968,8 @@ paths: - request_signature - signature_request_access x-hideOn: - - sdk - doc + - sdk '/bulk_send_job/{bulk_send_job_id}': get: tags: @@ -2704,7 +2704,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OAuthErrorResponse' + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' security: [] servers: - @@ -2788,7 +2801,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OAuthErrorResponse' + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' security: [] servers: - @@ -5041,6 +5067,8 @@ paths: $ref: '#/components/examples/Error429Response' 404_example: $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' 4XX_example: $ref: '#/components/examples/Error4XXResponse' security: @@ -11155,13 +11183,6 @@ components: type: string type: object x-internal-class: true - OAuthErrorResponse: - required: - - error - properties: - error: - $ref: '#/components/schemas/OAuthErrorResponseError' - type: object ReportCreateResponse: required: - report @@ -11526,45 +11547,45 @@ components: - signature_request_expired x-fern-enum: bad_request: - description: 'The request contained invalid or malformed parameters.' + description: '_t__ErrorCatalog::bad_request::SUMMARY' unauthorized: - description: 'The credentials supplied are missing or invalid.' + description: '_t__ErrorCatalog::unauthorized::SUMMARY' payment_required: - description: 'The account must be credited or upgraded to perform this action.' + description: '_t__ErrorCatalog::payment_required::SUMMARY' forbidden: - description: 'The action is not allowed for these credentials or in the current context.' + description: '_t__ErrorCatalog::forbidden::SUMMARY' not_found: - description: 'Nothing matches the requested resource.' + description: '_t__ErrorCatalog::not_found::SUMMARY' conflict: - description: 'The request was well-formed but conflicts with the current state.' + description: '_t__ErrorCatalog::conflict::SUMMARY' exceeded_rate: - description: "Your account's API request rate limit has been exceeded." + description: '_t__ErrorCatalog::exceeded_rate::SUMMARY' unknown: - description: 'An unexpected error occurred.' + description: '_t__ErrorCatalog::unknown::SUMMARY' team_invite_failed: - description: 'The team invitation could not be completed.' + description: '_t__ErrorCatalog::team_invite_failed::SUMMARY' max_faxes: - description: 'Too many fax transmissions are currently pending or transmitting.' + description: '_t__ErrorCatalog::max_faxes::SUMMARY' invalid_recipient: - description: 'The recipient (fax number or email address) is invalid.' + description: '_t__ErrorCatalog::invalid_recipient::SUMMARY' signature_request_cancel_failed: - description: 'The signature request could not be cancelled.' + description: '_t__ErrorCatalog::signature_request_cancel_failed::SUMMARY' signature_request_remove_failed: - description: 'Access to the signature request could not be removed.' + description: '_t__ErrorCatalog::signature_request_remove_failed::SUMMARY' maintenance: - description: 'The request could not be completed because the site is under maintenance.' + description: '_t__ErrorCatalog::maintenance::SUMMARY' deleted: - description: 'The request was cancelled or deleted.' + description: '_t__ErrorCatalog::deleted::SUMMARY' method_not_supported: - description: 'The HTTP method is not supported for this endpoint.' + description: '_t__ErrorCatalog::method_not_supported::SUMMARY' invalid_reminder: - description: 'The signature request reminder was invalid.' + description: '_t__ErrorCatalog::invalid_reminder::SUMMARY' unavailable: - description: 'The service is temporarily unavailable.' + description: '_t__ErrorCatalog::unavailable::SUMMARY' unprocessable_entity: - description: 'The request was understood but the target entity cannot be processed.' + description: '_t__ErrorCatalog::unprocessable_entity::SUMMARY' signature_request_expired: - description: 'The signature request has expired.' + description: '_t__ErrorCatalog::signature_request_expired::SUMMARY' type: object FaxResponse: required: @@ -11678,54 +11699,6 @@ components: type: integer type: object x-internal-class: true - OAuthErrorResponseError: - description: '_t__OAuthErrorResponseError::DESCRIPTION' - required: - - error_msg - - error_name - properties: - error_msg: - description: '_t__OAuthErrorResponseError::ERROR_MSG' - type: string - error_name: - description: '_t__OAuthErrorResponseError::ERROR_NAME' - type: string - enum: - - invalid_grant - - invalid_client - - invalid_request - - unauthorized_client - - unsupported_grant_type - - payment_required - - addon_required - - invalid_scope - - quota_reached - - server_error - - temporary_unavailable - x-fern-enum: - invalid_grant: - description: 'The OAuth grant (authorization code or refresh token) is invalid or expired.' - invalid_client: - description: 'The OAuth client credentials are invalid.' - invalid_request: - description: 'The OAuth request is malformed or missing required parameters.' - unauthorized_client: - description: 'The OAuth client is not authorized to perform this action.' - unsupported_grant_type: - description: 'The grant type is not supported.' - payment_required: - description: 'The account requires a paid plan to use this OAuth app.' - addon_required: - description: 'An add-on is required to use this OAuth app.' - invalid_scope: - description: 'The requested OAuth scope is invalid.' - quota_reached: - description: 'The account has reached its usage quota for this OAuth app.' - server_error: - description: 'An internal server error occurred during OAuth processing.' - temporary_unavailable: - description: 'The OAuth service is temporarily unavailable.' - type: object ReportResponse: description: '_t__ReportResponse::DESCRIPTION' properties: @@ -14063,269 +14036,238 @@ x-webhooks: x-error-codes: bad_request: http_status: 400 - summary: 'The request contained invalid or malformed parameters.' - cause: 'A parameter failed validation, or the request body was malformed.' - remediation: 'Inspect error_msg and error_path, correct the offending parameter, and resend.' + summary: '_t__ErrorCatalog::bad_request::SUMMARY' + cause: '_t__ErrorCatalog::bad_request::CAUSE' + remediation: '_t__ErrorCatalog::bad_request::REMEDIATION' retryable: 'no' - category: validation unauthorized: http_status: 401 - summary: 'The credentials supplied are missing or invalid.' - cause: 'Missing, malformed, or invalid API key or OAuth access token.' - remediation: 'Verify the API key or OAuth token and the Authorization header, then retry.' + summary: '_t__ErrorCatalog::unauthorized::SUMMARY' + cause: '_t__ErrorCatalog::unauthorized::CAUSE' + remediation: '_t__ErrorCatalog::unauthorized::REMEDIATION' retryable: 'no' - category: auth payment_required: http_status: 402 - summary: 'The account must be credited or upgraded to perform this action.' - cause: 'The action requires a paid plan, additional quota, or API credits.' - remediation: 'Upgrade the plan or add the required credits/quota, then retry.' + summary: '_t__ErrorCatalog::payment_required::SUMMARY' + cause: '_t__ErrorCatalog::payment_required::CAUSE' + remediation: '_t__ErrorCatalog::payment_required::REMEDIATION' retryable: 'no' - category: plan forbidden: http_status: 403 - summary: 'The action is not allowed for these credentials or in the current context.' - cause: 'The authenticated account lacks access to the resource or operation.' - remediation: 'Confirm the account has access to the resource and the required permissions.' + summary: '_t__ErrorCatalog::forbidden::SUMMARY' + cause: '_t__ErrorCatalog::forbidden::CAUSE' + remediation: '_t__ErrorCatalog::forbidden::REMEDIATION' retryable: 'no' - category: auth not_found: http_status: 404 - summary: 'Nothing matches the requested resource.' - cause: 'The resource id does not exist or is not visible to this account.' - remediation: 'Verify the id and that the resource belongs to the authenticated account.' + summary: '_t__ErrorCatalog::not_found::SUMMARY' + cause: '_t__ErrorCatalog::not_found::CAUSE' + remediation: '_t__ErrorCatalog::not_found::REMEDIATION' retryable: 'no' - category: not_found conflict: http_status: 409 - summary: 'The request was well-formed but conflicts with the current state.' - cause: 'The target resource is in a state incompatible with the request.' - remediation: 'Re-read the resource state, resolve the conflict, then retry.' + summary: '_t__ErrorCatalog::conflict::SUMMARY' + cause: '_t__ErrorCatalog::conflict::CAUSE' + remediation: '_t__ErrorCatalog::conflict::REMEDIATION' retryable: conditional - category: conflict exceeded_rate: http_status: 429 - summary: "Your account's API request rate limit has been exceeded." - cause: 'Too many requests were sent within the rate-limit window for this request type.' - remediation: 'Pace requests using the X-RateLimit-* response headers and retry after the window resets.' + summary: '_t__ErrorCatalog::exceeded_rate::SUMMARY' + cause: '_t__ErrorCatalog::exceeded_rate::CAUSE' + remediation: '_t__ErrorCatalog::exceeded_rate::REMEDIATION' retryable: 'yes' - category: rate_limit - backoff: 'Honor X-Ratelimit-Reset (Unix epoch); otherwise exponential backoff with jitter. No Retry-After header is sent.' + backoff: '_t__ErrorCatalog::exceeded_rate::BACKOFF' unknown: http_status: 500 - summary: 'An unexpected error occurred.' - cause: 'An unhandled server-side error, or a status code without a more specific error_name.' - remediation: 'Retry transient failures; if it persists, contact support with the request details.' + summary: '_t__ErrorCatalog::unknown::SUMMARY' + cause: '_t__ErrorCatalog::unknown::CAUSE' + remediation: '_t__ErrorCatalog::unknown::REMEDIATION' retryable: conditional - category: server - backoff: 'For transient 5xx, retry with exponential backoff; otherwise do not retry.' + backoff: '_t__ErrorCatalog::unknown::BACKOFF' team_invite_failed: http_status: 403 - summary: 'The team invitation could not be completed.' - cause: 'The invitee already belongs to a team, or the invite is otherwise not permitted.' - remediation: 'Confirm the invitee is not already on a team before inviting.' + summary: '_t__ErrorCatalog::team_invite_failed::SUMMARY' + cause: '_t__ErrorCatalog::team_invite_failed::CAUSE' + remediation: '_t__ErrorCatalog::team_invite_failed::REMEDIATION' retryable: 'no' - category: validation max_faxes: http_status: 429 - summary: 'Too many fax transmissions are currently pending or transmitting.' - cause: 'The account has reached the limit of concurrent in-flight fax transmissions.' - remediation: 'Wait for outstanding transmissions to complete, then retry.' + summary: '_t__ErrorCatalog::max_faxes::SUMMARY' + cause: '_t__ErrorCatalog::max_faxes::CAUSE' + remediation: '_t__ErrorCatalog::max_faxes::REMEDIATION' retryable: 'yes' - category: rate_limit - backoff: 'Retry with exponential backoff once pending transmissions clear.' + backoff: '_t__ErrorCatalog::max_faxes::BACKOFF' invalid_recipient: http_status: 400 - summary: 'The recipient (fax number or email address) is invalid.' - cause: 'A recipient value did not pass validation.' - remediation: 'Correct the recipient value and resend.' + summary: '_t__ErrorCatalog::invalid_recipient::SUMMARY' + cause: '_t__ErrorCatalog::invalid_recipient::CAUSE' + remediation: '_t__ErrorCatalog::invalid_recipient::REMEDIATION' retryable: 'no' - category: validation signature_request_cancel_failed: http_status: 400 - summary: 'The signature request could not be cancelled.' - cause: 'The caller is not the requester, or the request is already fully executed/closed.' - remediation: 'Only the requester can cancel, and only before the request is fully executed.' + summary: '_t__ErrorCatalog::signature_request_cancel_failed::SUMMARY' + cause: '_t__ErrorCatalog::signature_request_cancel_failed::CAUSE' + remediation: '_t__ErrorCatalog::signature_request_cancel_failed::REMEDIATION' retryable: 'no' - category: conflict signature_request_remove_failed: http_status: 400 - summary: 'Access to the signature request could not be removed.' - cause: 'The caller is not a party to the request, or it is not yet fully executed.' - remediation: 'Access can only be removed once the request is fully executed; use /signature_request/cancel for incomplete requests.' + summary: '_t__ErrorCatalog::signature_request_remove_failed::SUMMARY' + cause: '_t__ErrorCatalog::signature_request_remove_failed::CAUSE' + remediation: '_t__ErrorCatalog::signature_request_remove_failed::REMEDIATION' retryable: 'no' - category: conflict maintenance: http_status: 503 - summary: 'The request could not be completed because the site is under maintenance.' - cause: 'The API is in a scheduled maintenance window.' - remediation: 'Retry once the maintenance window ends.' + summary: '_t__ErrorCatalog::maintenance::SUMMARY' + cause: '_t__ErrorCatalog::maintenance::CAUSE' + remediation: '_t__ErrorCatalog::maintenance::REMEDIATION' retryable: 'yes' - category: maintenance - backoff: 'Retry later with exponential backoff.' + backoff: '_t__ErrorCatalog::maintenance::BACKOFF' deleted: http_status: 410 - summary: 'The request was cancelled or deleted.' - cause: 'The resource has been cancelled or removed and is no longer available.' - remediation: 'Do not retry; the resource is permanently gone.' + summary: '_t__ErrorCatalog::deleted::SUMMARY' + cause: '_t__ErrorCatalog::deleted::CAUSE' + remediation: '_t__ErrorCatalog::deleted::REMEDIATION' retryable: 'no' - category: not_found method_not_supported: http_status: 405 - summary: 'The HTTP method is not supported for this endpoint.' - cause: 'The request used a verb the endpoint does not accept.' - remediation: 'Use the HTTP method documented for the endpoint.' + summary: '_t__ErrorCatalog::method_not_supported::SUMMARY' + cause: '_t__ErrorCatalog::method_not_supported::CAUSE' + remediation: '_t__ErrorCatalog::method_not_supported::REMEDIATION' retryable: 'no' - category: validation invalid_reminder: http_status: 400 - summary: 'The signature request reminder was invalid.' - cause: 'A reminder was attempted against an ineligible request (e.g. embedded, closed, or expired).' - remediation: 'Only send reminders for eligible (non-embedded, open) signature requests.' + summary: '_t__ErrorCatalog::invalid_reminder::SUMMARY' + cause: '_t__ErrorCatalog::invalid_reminder::CAUSE' + remediation: '_t__ErrorCatalog::invalid_reminder::REMEDIATION' retryable: 'no' - category: validation unavailable: http_status: 503 - summary: 'The service is temporarily unavailable.' - cause: 'A downstream dependency or the service itself is temporarily unavailable.' - remediation: 'Retry later with exponential backoff.' + summary: '_t__ErrorCatalog::unavailable::SUMMARY' + cause: '_t__ErrorCatalog::unavailable::CAUSE' + remediation: '_t__ErrorCatalog::unavailable::REMEDIATION' retryable: 'yes' - category: maintenance - backoff: 'Retry later with exponential backoff and jitter.' + backoff: '_t__ErrorCatalog::unavailable::BACKOFF' unprocessable_entity: http_status: 422 - summary: 'The request was understood but the target entity cannot be processed.' - cause: 'The resource is still being processed, or it is in an error state.' - remediation: 'If the resource is still processing, wait and retry; if it is in an error state, recreate/resend it instead of retrying.' + summary: '_t__ErrorCatalog::unprocessable_entity::SUMMARY' + cause: '_t__ErrorCatalog::unprocessable_entity::CAUSE' + remediation: '_t__ErrorCatalog::unprocessable_entity::REMEDIATION' retryable: conditional - category: validation - backoff: 'If still processing, retry with exponential backoff; if in an error state, do not retry.' + backoff: '_t__ErrorCatalog::unprocessable_entity::BACKOFF' signature_request_expired: http_status: - 400 - 403 - summary: 'The signature request has expired.' - cause: 'The operation targets a request whose expiration has passed. Most endpoints return 400; final-copy/download endpoints return 403.' - remediation: 'The request can no longer be acted upon; create a new signature request.' + summary: '_t__ErrorCatalog::signature_request_expired::SUMMARY' + cause: '_t__ErrorCatalog::signature_request_expired::CAUSE' + remediation: '_t__ErrorCatalog::signature_request_expired::REMEDIATION' retryable: 'no' - category: conflict x-oauth-error-codes: invalid_grant: http_status: - 400 - 401 - summary: 'The OAuth grant (authorization code or refresh token) is invalid or expired.' - cause: 'The code/token was already used, expired, or does not match the client.' - remediation: 'Re-initiate the OAuth flow to obtain a fresh authorization code.' + summary: '_t__OAuthErrorCatalog::invalid_grant::SUMMARY' + cause: '_t__OAuthErrorCatalog::invalid_grant::CAUSE' + remediation: '_t__OAuthErrorCatalog::invalid_grant::REMEDIATION' retryable: 'no' - category: auth invalid_client: http_status: 400 - summary: 'The OAuth client credentials are invalid.' - cause: 'The client_id or client_secret is unrecognized or incorrect.' - remediation: 'Verify the client_id and client_secret from the API app settings.' + summary: '_t__OAuthErrorCatalog::invalid_client::SUMMARY' + cause: '_t__OAuthErrorCatalog::invalid_client::CAUSE' + remediation: '_t__OAuthErrorCatalog::invalid_client::REMEDIATION' retryable: 'no' - category: auth invalid_request: http_status: 400 - summary: 'The OAuth request is malformed or missing required parameters.' - cause: 'A required parameter is missing, or the request format is invalid.' - remediation: 'Check the request against the OAuth token endpoint documentation.' + summary: '_t__OAuthErrorCatalog::invalid_request::SUMMARY' + cause: '_t__OAuthErrorCatalog::invalid_request::CAUSE' + remediation: '_t__OAuthErrorCatalog::invalid_request::REMEDIATION' retryable: 'no' - category: validation unauthorized_client: http_status: - 401 - 403 - summary: 'The OAuth client is not authorized to perform this action.' - cause: 'The app has not been approved, or the action is outside the granted scopes.' - remediation: 'Ensure the app is approved and the required scopes are granted.' + summary: '_t__OAuthErrorCatalog::unauthorized_client::SUMMARY' + cause: '_t__OAuthErrorCatalog::unauthorized_client::CAUSE' + remediation: '_t__OAuthErrorCatalog::unauthorized_client::REMEDIATION' retryable: 'no' - category: auth unsupported_grant_type: http_status: 400 - summary: 'The grant type is not supported.' - cause: 'The grant_type parameter value is not recognized.' - remediation: 'Use authorization_code or refresh_token as the grant_type.' + summary: '_t__OAuthErrorCatalog::unsupported_grant_type::SUMMARY' + cause: '_t__OAuthErrorCatalog::unsupported_grant_type::CAUSE' + remediation: '_t__OAuthErrorCatalog::unsupported_grant_type::REMEDIATION' retryable: 'no' - category: validation payment_required: http_status: 402 - summary: 'The account requires a paid plan to use this OAuth app.' - cause: 'The authorizing account does not have a plan that supports this integration.' - remediation: 'Upgrade the account to a plan that includes OAuth app access.' + summary: '_t__OAuthErrorCatalog::payment_required::SUMMARY' + cause: '_t__OAuthErrorCatalog::payment_required::CAUSE' + remediation: '_t__OAuthErrorCatalog::payment_required::REMEDIATION' retryable: 'no' - category: plan addon_required: http_status: 402 - summary: 'An add-on is required to use this OAuth app.' - cause: 'The account plan does not include the add-on needed for this integration.' - remediation: 'Add the required add-on to the account subscription.' + summary: '_t__OAuthErrorCatalog::addon_required::SUMMARY' + cause: '_t__OAuthErrorCatalog::addon_required::CAUSE' + remediation: '_t__OAuthErrorCatalog::addon_required::REMEDIATION' retryable: 'no' - category: plan invalid_scope: http_status: 400 - summary: 'The requested OAuth scope is invalid.' - cause: 'The scope parameter contains values not permitted for the app.' - remediation: 'Request only scopes that the app is configured to use.' + summary: '_t__OAuthErrorCatalog::invalid_scope::SUMMARY' + cause: '_t__OAuthErrorCatalog::invalid_scope::CAUSE' + remediation: '_t__OAuthErrorCatalog::invalid_scope::REMEDIATION' retryable: 'no' - category: validation quota_reached: http_status: 402 - summary: 'The account has reached its usage quota for this OAuth app.' - cause: 'The authorizing account has exhausted its quota for the integration.' - remediation: 'Contact the app owner or upgrade the account quota.' + summary: '_t__OAuthErrorCatalog::quota_reached::SUMMARY' + cause: '_t__OAuthErrorCatalog::quota_reached::CAUSE' + remediation: '_t__OAuthErrorCatalog::quota_reached::REMEDIATION' retryable: 'no' - category: plan server_error: http_status: 500 - summary: 'An internal server error occurred during OAuth processing.' - cause: 'An unexpected error on the server side while handling the OAuth request.' - remediation: 'Retry the request; if it persists, contact support.' + summary: '_t__OAuthErrorCatalog::server_error::SUMMARY' + cause: '_t__OAuthErrorCatalog::server_error::CAUSE' + remediation: '_t__OAuthErrorCatalog::server_error::REMEDIATION' retryable: 'yes' - category: server - backoff: 'Retry with exponential backoff.' + backoff: '_t__OAuthErrorCatalog::server_error::BACKOFF' temporary_unavailable: http_status: 503 - summary: 'The OAuth service is temporarily unavailable.' - cause: 'The service is under maintenance or experiencing temporary issues.' - remediation: 'Retry after a short delay.' + summary: '_t__OAuthErrorCatalog::temporary_unavailable::SUMMARY' + cause: '_t__OAuthErrorCatalog::temporary_unavailable::CAUSE' + remediation: '_t__OAuthErrorCatalog::temporary_unavailable::REMEDIATION' retryable: 'yes' - category: maintenance - backoff: 'Retry with exponential backoff.' + backoff: '_t__OAuthErrorCatalog::temporary_unavailable::BACKOFF' x-error-events: signature_request_invalid: event_type: signature_request_invalid delivery: webhook - summary: 'Asynchronous error while processing a signature request.' - cause: 'A signature request could not be processed (e.g. invalid tags, fields, or merge data).' - remediation: 'Inspect event.event_metadata.event_message in the callback, correct the request, and resend.' + summary: '_t__ErrorEventCatalog::signature_request_invalid::SUMMARY' + cause: '_t__ErrorEventCatalog::signature_request_invalid::CAUSE' + remediation: '_t__ErrorEventCatalog::signature_request_invalid::REMEDIATION' retryable: conditional - template_error: - event_type: template_error + unknown_error: + event_type: unknown_error delivery: webhook - summary: 'Asynchronous error while creating a template.' - cause: 'Template file processing failed (e.g. unsupported or corrupt file).' - remediation: 'Recreate the template with a valid file; check status in the API dashboard.' + summary: '_t__ErrorEventCatalog::unknown_error::SUMMARY' + cause: '_t__ErrorEventCatalog::unknown_error::CAUSE' + remediation: '_t__ErrorEventCatalog::unknown_error::REMEDIATION' retryable: conditional file_error: event_type: file_error delivery: webhook - summary: 'Asynchronous error while processing an uploaded file.' - cause: 'A file attached to a request could not be processed.' - remediation: 'Resend the request with a supported, non-corrupt file.' + summary: '_t__ErrorEventCatalog::file_error::SUMMARY' + cause: '_t__ErrorEventCatalog::file_error::CAUSE' + remediation: '_t__ErrorEventCatalog::file_error::REMEDIATION' + retryable: conditional + template_error: + event_type: template_error + delivery: webhook + summary: '_t__ErrorEventCatalog::template_error::SUMMARY' + cause: '_t__ErrorEventCatalog::template_error::CAUSE' + remediation: '_t__ErrorEventCatalog::template_error::REMEDIATION' retryable: conditional sign_url_invalid: event_type: sign_url_invalid delivery: webhook - summary: 'An embedded signing URL has expired or become invalid.' - cause: 'The embedded sign_url is no longer valid (e.g. expired).' - remediation: 'Generate a fresh embedded sign_url via the embedded sign URL endpoint.' + summary: '_t__ErrorEventCatalog::sign_url_invalid::SUMMARY' + cause: '_t__ErrorEventCatalog::sign_url_invalid::CAUSE' + remediation: '_t__ErrorEventCatalog::sign_url_invalid::REMEDIATION' retryable: 'yes' - unknown_error: - event_type: unknown_error - delivery: webhook - summary: 'An unspecified asynchronous processing error occurred.' - cause: 'An unexpected error occurred while processing the request asynchronously.' - remediation: 'Check the request status in the API dashboard; retry or contact support if it persists.' - retryable: conditional diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index 8bc2a258c..bcddbab0c 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -2669,7 +2669,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OAuthErrorResponse' + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' security: [] servers: - @@ -2753,7 +2766,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OAuthErrorResponse' + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' security: [] servers: - @@ -5061,6 +5087,8 @@ paths: $ref: '#/components/examples/Error429Response' 404_example: $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' 4XX_example: $ref: '#/components/examples/Error4XXResponse' security: @@ -11578,13 +11606,6 @@ components: type: string type: object x-internal-class: true - OAuthErrorResponse: - required: - - error - properties: - error: - $ref: '#/components/schemas/OAuthErrorResponseError' - type: object ReportCreateResponse: required: - report @@ -12101,54 +12122,6 @@ components: type: integer type: object x-internal-class: true - OAuthErrorResponseError: - description: '_t__OAuthErrorResponseError::DESCRIPTION' - required: - - error_msg - - error_name - properties: - error_msg: - description: '_t__OAuthErrorResponseError::ERROR_MSG' - type: string - error_name: - description: '_t__OAuthErrorResponseError::ERROR_NAME' - type: string - enum: - - invalid_grant - - invalid_client - - invalid_request - - unauthorized_client - - unsupported_grant_type - - payment_required - - addon_required - - invalid_scope - - quota_reached - - server_error - - temporary_unavailable - x-fern-enum: - invalid_grant: - description: 'The OAuth grant (authorization code or refresh token) is invalid or expired.' - invalid_client: - description: 'The OAuth client credentials are invalid.' - invalid_request: - description: 'The OAuth request is malformed or missing required parameters.' - unauthorized_client: - description: 'The OAuth client is not authorized to perform this action.' - unsupported_grant_type: - description: 'The grant type is not supported.' - payment_required: - description: 'The account requires a paid plan to use this OAuth app.' - addon_required: - description: 'An add-on is required to use this OAuth app.' - invalid_scope: - description: 'The requested OAuth scope is invalid.' - quota_reached: - description: 'The account has reached its usage quota for this OAuth app.' - server_error: - description: 'An internal server error occurred during OAuth processing.' - temporary_unavailable: - description: 'The OAuth service is temporarily unavailable.' - type: object ReportResponse: description: 'Contains information about the report request.' properties: @@ -14605,49 +14578,42 @@ x-error-codes: cause: 'A parameter failed validation, or the request body was malformed.' remediation: 'Inspect error_msg and error_path, correct the offending parameter, and resend.' retryable: 'no' - category: validation unauthorized: http_status: 401 summary: 'The credentials supplied are missing or invalid.' cause: 'Missing, malformed, or invalid API key or OAuth access token.' remediation: 'Verify the API key or OAuth token and the Authorization header, then retry.' retryable: 'no' - category: auth payment_required: http_status: 402 summary: 'The account must be credited or upgraded to perform this action.' cause: 'The action requires a paid plan, additional quota, or API credits.' remediation: 'Upgrade the plan or add the required credits/quota, then retry.' retryable: 'no' - category: plan forbidden: http_status: 403 summary: 'The action is not allowed for these credentials or in the current context.' cause: 'The authenticated account lacks access to the resource or operation.' remediation: 'Confirm the account has access to the resource and the required permissions.' retryable: 'no' - category: auth not_found: http_status: 404 summary: 'Nothing matches the requested resource.' cause: 'The resource id does not exist or is not visible to this account.' remediation: 'Verify the id and that the resource belongs to the authenticated account.' retryable: 'no' - category: not_found conflict: http_status: 409 summary: 'The request was well-formed but conflicts with the current state.' - cause: 'The target resource is in a state incompatible with the request.' - remediation: 'Re-read the resource state, resolve the conflict, then retry.' + cause: 'The target resource is in a state incompatible with the request (e.g. a signature request is still being set up).' + remediation: 'Wait briefly and retry, or listen for a callback event confirming the resource is ready.' retryable: conditional - category: conflict exceeded_rate: http_status: 429 summary: 'Your account''s API request rate limit has been exceeded.' cause: 'Too many requests were sent within the rate-limit window for this request type.' remediation: 'Pace requests using the X-RateLimit-* response headers and retry after the window resets.' retryable: 'yes' - category: rate_limit backoff: 'Honor X-Ratelimit-Reset (Unix epoch); otherwise exponential backoff with jitter. No Retry-After header is sent.' unknown: http_status: 500 @@ -14655,7 +14621,6 @@ x-error-codes: cause: 'An unhandled server-side error, or a status code without a more specific error_name.' remediation: 'Retry transient failures; if it persists, contact support with the request details.' retryable: conditional - category: server backoff: 'For transient 5xx, retry with exponential backoff; otherwise do not retry.' team_invite_failed: http_status: 403 @@ -14663,14 +14628,12 @@ x-error-codes: cause: 'The invitee already belongs to a team, or the invite is otherwise not permitted.' remediation: 'Confirm the invitee is not already on a team before inviting.' retryable: 'no' - category: validation max_faxes: http_status: 429 summary: 'Too many fax transmissions are currently pending or transmitting.' cause: 'The account has reached the limit of concurrent in-flight fax transmissions.' remediation: 'Wait for outstanding transmissions to complete, then retry.' retryable: 'yes' - category: rate_limit backoff: 'Retry with exponential backoff once pending transmissions clear.' invalid_recipient: http_status: 400 @@ -14678,28 +14641,24 @@ x-error-codes: cause: 'A recipient value did not pass validation.' remediation: 'Correct the recipient value and resend.' retryable: 'no' - category: validation signature_request_cancel_failed: http_status: 400 summary: 'The signature request could not be cancelled.' cause: 'The caller is not the requester, or the request is already fully executed/closed.' remediation: 'Only the requester can cancel, and only before the request is fully executed.' retryable: 'no' - category: conflict signature_request_remove_failed: http_status: 400 summary: 'Access to the signature request could not be removed.' - cause: 'The caller is not a party to the request, or it is not yet fully executed.' - remediation: 'Access can only be removed once the request is fully executed; use /signature_request/cancel for incomplete requests.' + cause: 'The signature request has not yet been fully executed, so access cannot be revoked.' + remediation: 'Wait until all parties have signed, or call /signature_request/cancel to cancel incomplete requests instead.' retryable: 'no' - category: conflict maintenance: http_status: 503 summary: 'The request could not be completed because the site is under maintenance.' cause: 'The API is in a scheduled maintenance window.' remediation: 'Retry once the maintenance window ends.' retryable: 'yes' - category: maintenance backoff: 'Retry later with exponential backoff.' deleted: http_status: 410 @@ -14707,28 +14666,24 @@ x-error-codes: cause: 'The resource has been cancelled or removed and is no longer available.' remediation: 'Do not retry; the resource is permanently gone.' retryable: 'no' - category: not_found method_not_supported: http_status: 405 summary: 'The HTTP method is not supported for this endpoint.' cause: 'The request used a verb the endpoint does not accept.' remediation: 'Use the HTTP method documented for the endpoint.' retryable: 'no' - category: validation invalid_reminder: http_status: 400 summary: 'The signature request reminder was invalid.' cause: 'A reminder was attempted against an ineligible request (e.g. embedded, closed, or expired).' remediation: 'Only send reminders for eligible (non-embedded, open) signature requests.' retryable: 'no' - category: validation unavailable: http_status: 503 summary: 'The service is temporarily unavailable.' cause: 'A downstream dependency or the service itself is temporarily unavailable.' remediation: 'Retry later with exponential backoff.' retryable: 'yes' - category: maintenance backoff: 'Retry later with exponential backoff and jitter.' unprocessable_entity: http_status: 422 @@ -14736,7 +14691,6 @@ x-error-codes: cause: 'The resource is still being processed, or it is in an error state.' remediation: 'If the resource is still processing, wait and retry; if it is in an error state, recreate/resend it instead of retrying.' retryable: conditional - category: validation backoff: 'If still processing, retry with exponential backoff; if in an error state, do not retry.' signature_request_expired: http_status: @@ -14746,7 +14700,6 @@ x-error-codes: cause: 'The operation targets a request whose expiration has passed. Most endpoints return 400; final-copy/download endpoints return 403.' remediation: 'The request can no longer be acted upon; create a new signature request.' retryable: 'no' - category: conflict x-oauth-error-codes: invalid_grant: http_status: @@ -14756,21 +14709,18 @@ x-oauth-error-codes: cause: 'The code/token was already used, expired, or does not match the client.' remediation: 'Re-initiate the OAuth flow to obtain a fresh authorization code.' retryable: 'no' - category: auth invalid_client: http_status: 400 summary: 'The OAuth client credentials are invalid.' cause: 'The client_id or client_secret is unrecognized or incorrect.' remediation: 'Verify the client_id and client_secret from the API app settings.' retryable: 'no' - category: auth invalid_request: http_status: 400 summary: 'The OAuth request is malformed or missing required parameters.' cause: 'A required parameter is missing, or the request format is invalid.' remediation: 'Check the request against the OAuth token endpoint documentation.' retryable: 'no' - category: validation unauthorized_client: http_status: - 401 @@ -14779,49 +14729,42 @@ x-oauth-error-codes: cause: 'The app has not been approved, or the action is outside the granted scopes.' remediation: 'Ensure the app is approved and the required scopes are granted.' retryable: 'no' - category: auth unsupported_grant_type: http_status: 400 summary: 'The grant type is not supported.' cause: 'The grant_type parameter value is not recognized.' remediation: 'Use authorization_code or refresh_token as the grant_type.' retryable: 'no' - category: validation payment_required: http_status: 402 summary: 'The account requires a paid plan to use this OAuth app.' cause: 'The authorizing account does not have a plan that supports this integration.' remediation: 'Upgrade the account to a plan that includes OAuth app access.' retryable: 'no' - category: plan addon_required: http_status: 402 summary: 'An add-on is required to use this OAuth app.' cause: 'The account plan does not include the add-on needed for this integration.' remediation: 'Add the required add-on to the account subscription.' retryable: 'no' - category: plan invalid_scope: http_status: 400 summary: 'The requested OAuth scope is invalid.' cause: 'The scope parameter contains values not permitted for the app.' remediation: 'Request only scopes that the app is configured to use.' retryable: 'no' - category: validation quota_reached: http_status: 402 summary: 'The account has reached its usage quota for this OAuth app.' cause: 'The authorizing account has exhausted its quota for the integration.' remediation: 'Contact the app owner or upgrade the account quota.' retryable: 'no' - category: plan server_error: http_status: 500 summary: 'An internal server error occurred during OAuth processing.' cause: 'An unexpected error on the server side while handling the OAuth request.' remediation: 'Retry the request; if it persists, contact support.' retryable: 'yes' - category: server backoff: 'Retry with exponential backoff.' temporary_unavailable: http_status: 503 @@ -14829,7 +14772,6 @@ x-oauth-error-codes: cause: 'The service is under maintenance or experiencing temporary issues.' remediation: 'Retry after a short delay.' retryable: 'yes' - category: maintenance backoff: 'Retry with exponential backoff.' x-error-events: signature_request_invalid: @@ -14839,12 +14781,12 @@ x-error-events: cause: 'A signature request could not be processed (e.g. invalid tags, fields, or merge data).' remediation: 'Inspect event.event_metadata.event_message in the callback, correct the request, and resend.' retryable: conditional - template_error: - event_type: template_error + unknown_error: + event_type: unknown_error delivery: webhook - summary: 'Asynchronous error while creating a template.' - cause: 'Template file processing failed (e.g. unsupported or corrupt file).' - remediation: 'Recreate the template with a valid file; check status in the API dashboard.' + summary: 'An unspecified asynchronous processing error occurred.' + cause: 'An unexpected error occurred while processing the request asynchronously.' + remediation: 'Check the request status in the API dashboard; retry or contact support if it persists.' retryable: conditional file_error: event_type: file_error @@ -14853,6 +14795,13 @@ x-error-events: cause: 'A file attached to a request could not be processed.' remediation: 'Resend the request with a supported, non-corrupt file.' retryable: conditional + template_error: + event_type: template_error + delivery: webhook + summary: 'Asynchronous error while creating a template.' + cause: 'Template file processing failed (e.g. unsupported or corrupt file).' + remediation: 'Recreate the template with a valid file; check status in the API dashboard.' + retryable: conditional sign_url_invalid: event_type: sign_url_invalid delivery: webhook @@ -14860,10 +14809,3 @@ x-error-events: cause: 'The embedded sign_url is no longer valid (e.g. expired).' remediation: 'Generate a fresh embedded sign_url via the embedded sign URL endpoint.' retryable: 'yes' - unknown_error: - event_type: unknown_error - delivery: webhook - summary: 'An unspecified asynchronous processing error occurred.' - cause: 'An unexpected error occurred while processing the request asynchronously.' - remediation: 'Check the request status in the API dashboard; retry or contact support if it persists.' - retryable: conditional diff --git a/openapi.yaml b/openapi.yaml index a4dc34037..daa3b8560 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -2669,7 +2669,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OAuthErrorResponse' + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' security: [] servers: - @@ -2753,7 +2766,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OAuthErrorResponse' + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400Response' + 401_example: + $ref: '#/components/examples/Error401Response' + 402_example: + $ref: '#/components/examples/Error402Response' + 403_example: + $ref: '#/components/examples/Error403Response' + 429_example: + $ref: '#/components/examples/Error429Response' + 4XX_example: + $ref: '#/components/examples/Error4XXResponse' security: [] servers: - @@ -5061,6 +5087,8 @@ paths: $ref: '#/components/examples/Error429Response' 404_example: $ref: '#/components/examples/Error404Response' + 409_example: + $ref: '#/components/examples/Error409Response' 4XX_example: $ref: '#/components/examples/Error4XXResponse' security: @@ -11558,13 +11586,6 @@ components: type: string type: object x-internal-class: true - OAuthErrorResponse: - required: - - error - properties: - error: - $ref: '#/components/schemas/OAuthErrorResponseError' - type: object ReportCreateResponse: required: - report @@ -12081,54 +12102,6 @@ components: type: integer type: object x-internal-class: true - OAuthErrorResponseError: - description: '_t__OAuthErrorResponseError::DESCRIPTION' - required: - - error_msg - - error_name - properties: - error_msg: - description: '_t__OAuthErrorResponseError::ERROR_MSG' - type: string - error_name: - description: '_t__OAuthErrorResponseError::ERROR_NAME' - type: string - enum: - - invalid_grant - - invalid_client - - invalid_request - - unauthorized_client - - unsupported_grant_type - - payment_required - - addon_required - - invalid_scope - - quota_reached - - server_error - - temporary_unavailable - x-fern-enum: - invalid_grant: - description: 'The OAuth grant (authorization code or refresh token) is invalid or expired.' - invalid_client: - description: 'The OAuth client credentials are invalid.' - invalid_request: - description: 'The OAuth request is malformed or missing required parameters.' - unauthorized_client: - description: 'The OAuth client is not authorized to perform this action.' - unsupported_grant_type: - description: 'The grant type is not supported.' - payment_required: - description: 'The account requires a paid plan to use this OAuth app.' - addon_required: - description: 'An add-on is required to use this OAuth app.' - invalid_scope: - description: 'The requested OAuth scope is invalid.' - quota_reached: - description: 'The account has reached its usage quota for this OAuth app.' - server_error: - description: 'An internal server error occurred during OAuth processing.' - temporary_unavailable: - description: 'The OAuth service is temporarily unavailable.' - type: object ReportResponse: description: 'Contains information about the report request.' properties: @@ -14640,49 +14613,42 @@ x-error-codes: cause: 'A parameter failed validation, or the request body was malformed.' remediation: 'Inspect error_msg and error_path, correct the offending parameter, and resend.' retryable: 'no' - category: validation unauthorized: http_status: 401 summary: 'The credentials supplied are missing or invalid.' cause: 'Missing, malformed, or invalid API key or OAuth access token.' remediation: 'Verify the API key or OAuth token and the Authorization header, then retry.' retryable: 'no' - category: auth payment_required: http_status: 402 summary: 'The account must be credited or upgraded to perform this action.' cause: 'The action requires a paid plan, additional quota, or API credits.' remediation: 'Upgrade the plan or add the required credits/quota, then retry.' retryable: 'no' - category: plan forbidden: http_status: 403 summary: 'The action is not allowed for these credentials or in the current context.' cause: 'The authenticated account lacks access to the resource or operation.' remediation: 'Confirm the account has access to the resource and the required permissions.' retryable: 'no' - category: auth not_found: http_status: 404 summary: 'Nothing matches the requested resource.' cause: 'The resource id does not exist or is not visible to this account.' remediation: 'Verify the id and that the resource belongs to the authenticated account.' retryable: 'no' - category: not_found conflict: http_status: 409 summary: 'The request was well-formed but conflicts with the current state.' - cause: 'The target resource is in a state incompatible with the request.' - remediation: 'Re-read the resource state, resolve the conflict, then retry.' + cause: 'The target resource is in a state incompatible with the request (e.g. a signature request is still being set up).' + remediation: 'Wait briefly and retry, or listen for a callback event confirming the resource is ready.' retryable: conditional - category: conflict exceeded_rate: http_status: 429 summary: 'Your account''s API request rate limit has been exceeded.' cause: 'Too many requests were sent within the rate-limit window for this request type.' remediation: 'Pace requests using the X-RateLimit-* response headers and retry after the window resets.' retryable: 'yes' - category: rate_limit backoff: 'Honor X-Ratelimit-Reset (Unix epoch); otherwise exponential backoff with jitter. No Retry-After header is sent.' unknown: http_status: 500 @@ -14690,7 +14656,6 @@ x-error-codes: cause: 'An unhandled server-side error, or a status code without a more specific error_name.' remediation: 'Retry transient failures; if it persists, contact support with the request details.' retryable: conditional - category: server backoff: 'For transient 5xx, retry with exponential backoff; otherwise do not retry.' team_invite_failed: http_status: 403 @@ -14698,14 +14663,12 @@ x-error-codes: cause: 'The invitee already belongs to a team, or the invite is otherwise not permitted.' remediation: 'Confirm the invitee is not already on a team before inviting.' retryable: 'no' - category: validation max_faxes: http_status: 429 summary: 'Too many fax transmissions are currently pending or transmitting.' cause: 'The account has reached the limit of concurrent in-flight fax transmissions.' remediation: 'Wait for outstanding transmissions to complete, then retry.' retryable: 'yes' - category: rate_limit backoff: 'Retry with exponential backoff once pending transmissions clear.' invalid_recipient: http_status: 400 @@ -14713,28 +14676,24 @@ x-error-codes: cause: 'A recipient value did not pass validation.' remediation: 'Correct the recipient value and resend.' retryable: 'no' - category: validation signature_request_cancel_failed: http_status: 400 summary: 'The signature request could not be cancelled.' cause: 'The caller is not the requester, or the request is already fully executed/closed.' remediation: 'Only the requester can cancel, and only before the request is fully executed.' retryable: 'no' - category: conflict signature_request_remove_failed: http_status: 400 summary: 'Access to the signature request could not be removed.' - cause: 'The caller is not a party to the request, or it is not yet fully executed.' - remediation: 'Access can only be removed once the request is fully executed; use /signature_request/cancel for incomplete requests.' + cause: 'The signature request has not yet been fully executed, so access cannot be revoked.' + remediation: 'Wait until all parties have signed, or call /signature_request/cancel to cancel incomplete requests instead.' retryable: 'no' - category: conflict maintenance: http_status: 503 summary: 'The request could not be completed because the site is under maintenance.' cause: 'The API is in a scheduled maintenance window.' remediation: 'Retry once the maintenance window ends.' retryable: 'yes' - category: maintenance backoff: 'Retry later with exponential backoff.' deleted: http_status: 410 @@ -14742,28 +14701,24 @@ x-error-codes: cause: 'The resource has been cancelled or removed and is no longer available.' remediation: 'Do not retry; the resource is permanently gone.' retryable: 'no' - category: not_found method_not_supported: http_status: 405 summary: 'The HTTP method is not supported for this endpoint.' cause: 'The request used a verb the endpoint does not accept.' remediation: 'Use the HTTP method documented for the endpoint.' retryable: 'no' - category: validation invalid_reminder: http_status: 400 summary: 'The signature request reminder was invalid.' cause: 'A reminder was attempted against an ineligible request (e.g. embedded, closed, or expired).' remediation: 'Only send reminders for eligible (non-embedded, open) signature requests.' retryable: 'no' - category: validation unavailable: http_status: 503 summary: 'The service is temporarily unavailable.' cause: 'A downstream dependency or the service itself is temporarily unavailable.' remediation: 'Retry later with exponential backoff.' retryable: 'yes' - category: maintenance backoff: 'Retry later with exponential backoff and jitter.' unprocessable_entity: http_status: 422 @@ -14771,7 +14726,6 @@ x-error-codes: cause: 'The resource is still being processed, or it is in an error state.' remediation: 'If the resource is still processing, wait and retry; if it is in an error state, recreate/resend it instead of retrying.' retryable: conditional - category: validation backoff: 'If still processing, retry with exponential backoff; if in an error state, do not retry.' signature_request_expired: http_status: @@ -14781,7 +14735,6 @@ x-error-codes: cause: 'The operation targets a request whose expiration has passed. Most endpoints return 400; final-copy/download endpoints return 403.' remediation: 'The request can no longer be acted upon; create a new signature request.' retryable: 'no' - category: conflict x-oauth-error-codes: invalid_grant: http_status: @@ -14791,21 +14744,18 @@ x-oauth-error-codes: cause: 'The code/token was already used, expired, or does not match the client.' remediation: 'Re-initiate the OAuth flow to obtain a fresh authorization code.' retryable: 'no' - category: auth invalid_client: http_status: 400 summary: 'The OAuth client credentials are invalid.' cause: 'The client_id or client_secret is unrecognized or incorrect.' remediation: 'Verify the client_id and client_secret from the API app settings.' retryable: 'no' - category: auth invalid_request: http_status: 400 summary: 'The OAuth request is malformed or missing required parameters.' cause: 'A required parameter is missing, or the request format is invalid.' remediation: 'Check the request against the OAuth token endpoint documentation.' retryable: 'no' - category: validation unauthorized_client: http_status: - 401 @@ -14814,49 +14764,42 @@ x-oauth-error-codes: cause: 'The app has not been approved, or the action is outside the granted scopes.' remediation: 'Ensure the app is approved and the required scopes are granted.' retryable: 'no' - category: auth unsupported_grant_type: http_status: 400 summary: 'The grant type is not supported.' cause: 'The grant_type parameter value is not recognized.' remediation: 'Use authorization_code or refresh_token as the grant_type.' retryable: 'no' - category: validation payment_required: http_status: 402 summary: 'The account requires a paid plan to use this OAuth app.' cause: 'The authorizing account does not have a plan that supports this integration.' remediation: 'Upgrade the account to a plan that includes OAuth app access.' retryable: 'no' - category: plan addon_required: http_status: 402 summary: 'An add-on is required to use this OAuth app.' cause: 'The account plan does not include the add-on needed for this integration.' remediation: 'Add the required add-on to the account subscription.' retryable: 'no' - category: plan invalid_scope: http_status: 400 summary: 'The requested OAuth scope is invalid.' cause: 'The scope parameter contains values not permitted for the app.' remediation: 'Request only scopes that the app is configured to use.' retryable: 'no' - category: validation quota_reached: http_status: 402 summary: 'The account has reached its usage quota for this OAuth app.' cause: 'The authorizing account has exhausted its quota for the integration.' remediation: 'Contact the app owner or upgrade the account quota.' retryable: 'no' - category: plan server_error: http_status: 500 summary: 'An internal server error occurred during OAuth processing.' cause: 'An unexpected error on the server side while handling the OAuth request.' remediation: 'Retry the request; if it persists, contact support.' retryable: 'yes' - category: server backoff: 'Retry with exponential backoff.' temporary_unavailable: http_status: 503 @@ -14864,7 +14807,6 @@ x-oauth-error-codes: cause: 'The service is under maintenance or experiencing temporary issues.' remediation: 'Retry after a short delay.' retryable: 'yes' - category: maintenance backoff: 'Retry with exponential backoff.' x-error-events: signature_request_invalid: @@ -14874,12 +14816,12 @@ x-error-events: cause: 'A signature request could not be processed (e.g. invalid tags, fields, or merge data).' remediation: 'Inspect event.event_metadata.event_message in the callback, correct the request, and resend.' retryable: conditional - template_error: - event_type: template_error + unknown_error: + event_type: unknown_error delivery: webhook - summary: 'Asynchronous error while creating a template.' - cause: 'Template file processing failed (e.g. unsupported or corrupt file).' - remediation: 'Recreate the template with a valid file; check status in the API dashboard.' + summary: 'An unspecified asynchronous processing error occurred.' + cause: 'An unexpected error occurred while processing the request asynchronously.' + remediation: 'Check the request status in the API dashboard; retry or contact support if it persists.' retryable: conditional file_error: event_type: file_error @@ -14888,6 +14830,13 @@ x-error-events: cause: 'A file attached to a request could not be processed.' remediation: 'Resend the request with a supported, non-corrupt file.' retryable: conditional + template_error: + event_type: template_error + delivery: webhook + summary: 'Asynchronous error while creating a template.' + cause: 'Template file processing failed (e.g. unsupported or corrupt file).' + remediation: 'Recreate the template with a valid file; check status in the API dashboard.' + retryable: conditional sign_url_invalid: event_type: sign_url_invalid delivery: webhook @@ -14895,10 +14844,3 @@ x-error-events: cause: 'The embedded sign_url is no longer valid (e.g. expired).' remediation: 'Generate a fresh embedded sign_url via the embedded sign URL endpoint.' retryable: 'yes' - unknown_error: - event_type: unknown_error - delivery: webhook - summary: 'An unspecified asynchronous processing error occurred.' - cause: 'An unexpected error occurred while processing the request asynchronously.' - remediation: 'Check the request status in the API dashboard; retry or contact support if it persists.' - retryable: conditional diff --git a/translations/en.yaml b/translations/en.yaml index f32507e4f..4e85607ac 100644 --- a/translations/en.yaml +++ b/translations/en.yaml @@ -1887,3 +1887,167 @@ "accountUpdateEventCallback::SEO::DESCRIPTION": "The Dropbox Sign API allows you to build with a wide range of tools. To find out how to consume Dropbox Sign Events at the account level, click here." "appCreateEventCallback::SEO::TITLE": "App Callbacks | API Documentation | Dropbox Sign for Developers" "appCreateEventCallback::SEO::DESCRIPTION": "The Dropbox Sign API allows you to build with a wide range of tools. To find out how to consume Dropbox Sign Events at the App level, click here." + +################## +# Error Catalog # +################## + +"ErrorCatalog::bad_request::SUMMARY": "The request contained invalid or malformed parameters." +"ErrorCatalog::bad_request::CAUSE": "A parameter failed validation, or the request body was malformed." +"ErrorCatalog::bad_request::REMEDIATION": "Inspect error_msg and error_path, correct the offending parameter, and resend." + +"ErrorCatalog::unauthorized::SUMMARY": "The credentials supplied are missing or invalid." +"ErrorCatalog::unauthorized::CAUSE": "Missing, malformed, or invalid API key or OAuth access token." +"ErrorCatalog::unauthorized::REMEDIATION": "Verify the API key or OAuth token and the Authorization header, then retry." + +"ErrorCatalog::payment_required::SUMMARY": "The account must be credited or upgraded to perform this action." +"ErrorCatalog::payment_required::CAUSE": "The action requires a paid plan, additional quota, or API credits." +"ErrorCatalog::payment_required::REMEDIATION": "Upgrade the plan or add the required credits/quota, then retry." + +"ErrorCatalog::forbidden::SUMMARY": "The action is not allowed for these credentials or in the current context." +"ErrorCatalog::forbidden::CAUSE": "The authenticated account lacks access to the resource or operation." +"ErrorCatalog::forbidden::REMEDIATION": "Confirm the account has access to the resource and the required permissions." + +"ErrorCatalog::not_found::SUMMARY": "Nothing matches the requested resource." +"ErrorCatalog::not_found::CAUSE": "The resource id does not exist or is not visible to this account." +"ErrorCatalog::not_found::REMEDIATION": "Verify the id and that the resource belongs to the authenticated account." + +"ErrorCatalog::conflict::SUMMARY": "The request was well-formed but conflicts with the current state." +"ErrorCatalog::conflict::CAUSE": "The target resource is in a state incompatible with the request (e.g. a signature request is still being set up)." +"ErrorCatalog::conflict::REMEDIATION": "Wait briefly and retry, or listen for a callback event confirming the resource is ready." + +"ErrorCatalog::exceeded_rate::SUMMARY": "Your account's API request rate limit has been exceeded." +"ErrorCatalog::exceeded_rate::CAUSE": "Too many requests were sent within the rate-limit window for this request type." +"ErrorCatalog::exceeded_rate::REMEDIATION": "Pace requests using the X-RateLimit-* response headers and retry after the window resets." +"ErrorCatalog::exceeded_rate::BACKOFF": "Honor X-Ratelimit-Reset (Unix epoch); otherwise exponential backoff with jitter. No Retry-After header is sent." + +"ErrorCatalog::unknown::SUMMARY": "An unexpected error occurred." +"ErrorCatalog::unknown::CAUSE": "An unhandled server-side error, or a status code without a more specific error_name." +"ErrorCatalog::unknown::REMEDIATION": "Retry transient failures; if it persists, contact support with the request details." +"ErrorCatalog::unknown::BACKOFF": "For transient 5xx, retry with exponential backoff; otherwise do not retry." + +"ErrorCatalog::team_invite_failed::SUMMARY": "The team invitation could not be completed." +"ErrorCatalog::team_invite_failed::CAUSE": "The invitee already belongs to a team, or the invite is otherwise not permitted." +"ErrorCatalog::team_invite_failed::REMEDIATION": "Confirm the invitee is not already on a team before inviting." + +"ErrorCatalog::max_faxes::SUMMARY": "Too many fax transmissions are currently pending or transmitting." +"ErrorCatalog::max_faxes::CAUSE": "The account has reached the limit of concurrent in-flight fax transmissions." +"ErrorCatalog::max_faxes::REMEDIATION": "Wait for outstanding transmissions to complete, then retry." +"ErrorCatalog::max_faxes::BACKOFF": "Retry with exponential backoff once pending transmissions clear." + +"ErrorCatalog::invalid_recipient::SUMMARY": "The recipient (fax number or email address) is invalid." +"ErrorCatalog::invalid_recipient::CAUSE": "A recipient value did not pass validation." +"ErrorCatalog::invalid_recipient::REMEDIATION": "Correct the recipient value and resend." + +"ErrorCatalog::signature_request_cancel_failed::SUMMARY": "The signature request could not be cancelled." +"ErrorCatalog::signature_request_cancel_failed::CAUSE": "The caller is not the requester, or the request is already fully executed/closed." +"ErrorCatalog::signature_request_cancel_failed::REMEDIATION": "Only the requester can cancel, and only before the request is fully executed." + +"ErrorCatalog::signature_request_remove_failed::SUMMARY": "Access to the signature request could not be removed." +"ErrorCatalog::signature_request_remove_failed::CAUSE": "The signature request has not yet been fully executed, so access cannot be revoked." +"ErrorCatalog::signature_request_remove_failed::REMEDIATION": "Wait until all parties have signed, or call /signature_request/cancel to cancel incomplete requests instead." + +"ErrorCatalog::maintenance::SUMMARY": "The request could not be completed because the site is under maintenance." +"ErrorCatalog::maintenance::CAUSE": "The API is in a scheduled maintenance window." +"ErrorCatalog::maintenance::REMEDIATION": "Retry once the maintenance window ends." +"ErrorCatalog::maintenance::BACKOFF": "Retry later with exponential backoff." + +"ErrorCatalog::deleted::SUMMARY": "The request was cancelled or deleted." +"ErrorCatalog::deleted::CAUSE": "The resource has been cancelled or removed and is no longer available." +"ErrorCatalog::deleted::REMEDIATION": "Do not retry; the resource is permanently gone." + +"ErrorCatalog::method_not_supported::SUMMARY": "The HTTP method is not supported for this endpoint." +"ErrorCatalog::method_not_supported::CAUSE": "The request used a verb the endpoint does not accept." +"ErrorCatalog::method_not_supported::REMEDIATION": "Use the HTTP method documented for the endpoint." + +"ErrorCatalog::invalid_reminder::SUMMARY": "The signature request reminder was invalid." +"ErrorCatalog::invalid_reminder::CAUSE": "A reminder was attempted against an ineligible request (e.g. embedded, closed, or expired)." +"ErrorCatalog::invalid_reminder::REMEDIATION": "Only send reminders for eligible (non-embedded, open) signature requests." + +"ErrorCatalog::unavailable::SUMMARY": "The service is temporarily unavailable." +"ErrorCatalog::unavailable::CAUSE": "A downstream dependency or the service itself is temporarily unavailable." +"ErrorCatalog::unavailable::REMEDIATION": "Retry later with exponential backoff." +"ErrorCatalog::unavailable::BACKOFF": "Retry later with exponential backoff and jitter." + +"ErrorCatalog::unprocessable_entity::SUMMARY": "The request was understood but the target entity cannot be processed." +"ErrorCatalog::unprocessable_entity::CAUSE": "The resource is still being processed, or it is in an error state." +"ErrorCatalog::unprocessable_entity::REMEDIATION": "If the resource is still processing, wait and retry; if it is in an error state, recreate/resend it instead of retrying." +"ErrorCatalog::unprocessable_entity::BACKOFF": "If still processing, retry with exponential backoff; if in an error state, do not retry." + +"ErrorCatalog::signature_request_expired::SUMMARY": "The signature request has expired." +"ErrorCatalog::signature_request_expired::CAUSE": "The operation targets a request whose expiration has passed. Most endpoints return 400; final-copy/download endpoints return 403." +"ErrorCatalog::signature_request_expired::REMEDIATION": "The request can no longer be acted upon; create a new signature request." + +######################## +# OAuth Error Catalog # +######################## + +"OAuthErrorCatalog::invalid_grant::SUMMARY": "The OAuth grant (authorization code or refresh token) is invalid or expired." +"OAuthErrorCatalog::invalid_grant::CAUSE": "The code/token was already used, expired, or does not match the client." +"OAuthErrorCatalog::invalid_grant::REMEDIATION": "Re-initiate the OAuth flow to obtain a fresh authorization code." + +"OAuthErrorCatalog::invalid_client::SUMMARY": "The OAuth client credentials are invalid." +"OAuthErrorCatalog::invalid_client::CAUSE": "The client_id or client_secret is unrecognized or incorrect." +"OAuthErrorCatalog::invalid_client::REMEDIATION": "Verify the client_id and client_secret from the API app settings." + +"OAuthErrorCatalog::invalid_request::SUMMARY": "The OAuth request is malformed or missing required parameters." +"OAuthErrorCatalog::invalid_request::CAUSE": "A required parameter is missing, or the request format is invalid." +"OAuthErrorCatalog::invalid_request::REMEDIATION": "Check the request against the OAuth token endpoint documentation." + +"OAuthErrorCatalog::unauthorized_client::SUMMARY": "The OAuth client is not authorized to perform this action." +"OAuthErrorCatalog::unauthorized_client::CAUSE": "The app has not been approved, or the action is outside the granted scopes." +"OAuthErrorCatalog::unauthorized_client::REMEDIATION": "Ensure the app is approved and the required scopes are granted." + +"OAuthErrorCatalog::unsupported_grant_type::SUMMARY": "The grant type is not supported." +"OAuthErrorCatalog::unsupported_grant_type::CAUSE": "The grant_type parameter value is not recognized." +"OAuthErrorCatalog::unsupported_grant_type::REMEDIATION": "Use authorization_code or refresh_token as the grant_type." + +"OAuthErrorCatalog::payment_required::SUMMARY": "The account requires a paid plan to use this OAuth app." +"OAuthErrorCatalog::payment_required::CAUSE": "The authorizing account does not have a plan that supports this integration." +"OAuthErrorCatalog::payment_required::REMEDIATION": "Upgrade the account to a plan that includes OAuth app access." + +"OAuthErrorCatalog::addon_required::SUMMARY": "An add-on is required to use this OAuth app." +"OAuthErrorCatalog::addon_required::CAUSE": "The account plan does not include the add-on needed for this integration." +"OAuthErrorCatalog::addon_required::REMEDIATION": "Add the required add-on to the account subscription." + +"OAuthErrorCatalog::invalid_scope::SUMMARY": "The requested OAuth scope is invalid." +"OAuthErrorCatalog::invalid_scope::CAUSE": "The scope parameter contains values not permitted for the app." +"OAuthErrorCatalog::invalid_scope::REMEDIATION": "Request only scopes that the app is configured to use." + +"OAuthErrorCatalog::quota_reached::SUMMARY": "The account has reached its usage quota for this OAuth app." +"OAuthErrorCatalog::quota_reached::CAUSE": "The authorizing account has exhausted its quota for the integration." +"OAuthErrorCatalog::quota_reached::REMEDIATION": "Contact the app owner or upgrade the account quota." + +"OAuthErrorCatalog::server_error::SUMMARY": "An internal server error occurred during OAuth processing." +"OAuthErrorCatalog::server_error::CAUSE": "An unexpected error on the server side while handling the OAuth request." +"OAuthErrorCatalog::server_error::REMEDIATION": "Retry the request; if it persists, contact support." +"OAuthErrorCatalog::server_error::BACKOFF": "Retry with exponential backoff." + +"OAuthErrorCatalog::temporary_unavailable::SUMMARY": "The OAuth service is temporarily unavailable." +"OAuthErrorCatalog::temporary_unavailable::CAUSE": "The service is under maintenance or experiencing temporary issues." +"OAuthErrorCatalog::temporary_unavailable::REMEDIATION": "Retry after a short delay." +"OAuthErrorCatalog::temporary_unavailable::BACKOFF": "Retry with exponential backoff." + +############################# +# Webhook Error Events # +############################# + +"ErrorEventCatalog::signature_request_invalid::SUMMARY": "Asynchronous error while processing a signature request." +"ErrorEventCatalog::signature_request_invalid::CAUSE": "A signature request could not be processed (e.g. invalid tags, fields, or merge data)." +"ErrorEventCatalog::signature_request_invalid::REMEDIATION": "Inspect event.event_metadata.event_message in the callback, correct the request, and resend." + +"ErrorEventCatalog::unknown_error::SUMMARY": "An unspecified asynchronous processing error occurred." +"ErrorEventCatalog::unknown_error::CAUSE": "An unexpected error occurred while processing the request asynchronously." +"ErrorEventCatalog::unknown_error::REMEDIATION": "Check the request status in the API dashboard; retry or contact support if it persists." + +"ErrorEventCatalog::file_error::SUMMARY": "Asynchronous error while processing an uploaded file." +"ErrorEventCatalog::file_error::CAUSE": "A file attached to a request could not be processed." +"ErrorEventCatalog::file_error::REMEDIATION": "Resend the request with a supported, non-corrupt file." + +"ErrorEventCatalog::template_error::SUMMARY": "Asynchronous error while creating a template." +"ErrorEventCatalog::template_error::CAUSE": "Template file processing failed (e.g. unsupported or corrupt file)." +"ErrorEventCatalog::template_error::REMEDIATION": "Recreate the template with a valid file; check status in the API dashboard." + +"ErrorEventCatalog::sign_url_invalid::SUMMARY": "An embedded signing URL has expired or become invalid." +"ErrorEventCatalog::sign_url_invalid::CAUSE": "The embedded sign_url is no longer valid (e.g. expired)." +"ErrorEventCatalog::sign_url_invalid::REMEDIATION": "Generate a fresh embedded sign_url via the embedded sign URL endpoint." From a96acaefc4fa8df1517472cc129fc569aa157cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20W=C3=B3jcik?= Date: Tue, 9 Jun 2026 11:46:03 +0200 Subject: [PATCH 6/6] update sdks --- sdks/dotnet/README.md | 2 - sdks/dotnet/docs/OAuthErrorResponse.md | 10 - sdks/dotnet/docs/OAuthErrorResponseError.md | 11 - .../Dropbox.Sign/Model/OAuthErrorResponse.cs | 170 ------ .../Model/OAuthErrorResponseError.cs | 267 --------- sdks/java-v1/README.md | 2 - sdks/java-v1/docs/OAuthErrorResponse.md | 14 - sdks/java-v1/docs/OAuthErrorResponseError.md | 33 -- .../sign/model/OAuthErrorResponse.java | 166 ------ .../sign/model/OAuthErrorResponseError.java | 273 ---------- sdks/java-v2/README.md | 2 - sdks/java-v2/docs/OAuthErrorResponse.md | 14 - sdks/java-v2/docs/OAuthErrorResponseError.md | 33 -- .../java/com/dropbox/sign/api/OAuthApi.java | 2 +- .../sign/model/OAuthErrorResponse.java | 180 ------- .../sign/model/OAuthErrorResponseError.java | 283 ---------- sdks/node/README.md | 2 - sdks/node/api/oAuthApi.ts | 4 +- sdks/node/dist/api.js | 78 +-- sdks/node/docs/model/OAuthErrorResponse.md | 11 - .../docs/model/OAuthErrorResponseError.md | 12 - sdks/node/model/index.ts | 8 - sdks/node/model/oAuthErrorResponse.ts | 49 -- sdks/node/model/oAuthErrorResponseError.ts | 79 --- sdks/node/types/model/index.d.ts | 4 +- sdks/node/types/model/oAuthErrorResponse.d.ts | 9 - .../types/model/oAuthErrorResponseError.d.ts | 24 - sdks/php/README.md | 2 - sdks/php/docs/Model/OAuthErrorResponse.md | 11 - .../php/docs/Model/OAuthErrorResponseError.md | 12 - sdks/php/src/Api/OAuthApi.php | 16 +- sdks/php/src/Model/OAuthErrorResponse.php | 416 -------------- .../php/src/Model/OAuthErrorResponseError.php | 507 ------------------ sdks/python/README.md | 2 - sdks/python/docs/OAuthErrorResponse.md | 12 - sdks/python/docs/OAuthErrorResponseError.md | 13 - sdks/python/dropbox_sign/__init__.py | 2 - sdks/python/dropbox_sign/api/o_auth_api.py | 12 +- sdks/python/dropbox_sign/models/__init__.py | 2 - .../models/o_auth_error_response.py | 131 ----- .../models/o_auth_error_response_error.py | 146 ----- sdks/ruby/README.md | 2 - sdks/ruby/docs/OAuthErrorResponse.md | 10 - sdks/ruby/docs/OAuthErrorResponseError.md | 11 - sdks/ruby/lib/dropbox-sign.rb | 2 - sdks/ruby/lib/dropbox-sign/api/o_auth_api.rb | 4 +- .../models/o_auth_error_response.rb | 266 --------- .../models/o_auth_error_response_error.rb | 318 ----------- 48 files changed, 22 insertions(+), 3617 deletions(-) delete mode 100644 sdks/dotnet/docs/OAuthErrorResponse.md delete mode 100644 sdks/dotnet/docs/OAuthErrorResponseError.md delete mode 100644 sdks/dotnet/src/Dropbox.Sign/Model/OAuthErrorResponse.cs delete mode 100644 sdks/dotnet/src/Dropbox.Sign/Model/OAuthErrorResponseError.cs delete mode 100644 sdks/java-v1/docs/OAuthErrorResponse.md delete mode 100644 sdks/java-v1/docs/OAuthErrorResponseError.md delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthErrorResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthErrorResponseError.java delete mode 100644 sdks/java-v2/docs/OAuthErrorResponse.md delete mode 100644 sdks/java-v2/docs/OAuthErrorResponseError.md delete mode 100644 sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthErrorResponse.java delete mode 100644 sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthErrorResponseError.java delete mode 100644 sdks/node/docs/model/OAuthErrorResponse.md delete mode 100644 sdks/node/docs/model/OAuthErrorResponseError.md delete mode 100644 sdks/node/model/oAuthErrorResponse.ts delete mode 100644 sdks/node/model/oAuthErrorResponseError.ts delete mode 100644 sdks/node/types/model/oAuthErrorResponse.d.ts delete mode 100644 sdks/node/types/model/oAuthErrorResponseError.d.ts delete mode 100644 sdks/php/docs/Model/OAuthErrorResponse.md delete mode 100644 sdks/php/docs/Model/OAuthErrorResponseError.md delete mode 100644 sdks/php/src/Model/OAuthErrorResponse.php delete mode 100644 sdks/php/src/Model/OAuthErrorResponseError.php delete mode 100644 sdks/python/docs/OAuthErrorResponse.md delete mode 100644 sdks/python/docs/OAuthErrorResponseError.md delete mode 100644 sdks/python/dropbox_sign/models/o_auth_error_response.py delete mode 100644 sdks/python/dropbox_sign/models/o_auth_error_response_error.py delete mode 100644 sdks/ruby/docs/OAuthErrorResponse.md delete mode 100644 sdks/ruby/docs/OAuthErrorResponseError.md delete mode 100644 sdks/ruby/lib/dropbox-sign/models/o_auth_error_response.rb delete mode 100644 sdks/ruby/lib/dropbox-sign/models/o_auth_error_response_error.rb diff --git a/sdks/dotnet/README.md b/sdks/dotnet/README.md index 21e35eef4..414467bc4 100644 --- a/sdks/dotnet/README.md +++ b/sdks/dotnet/README.md @@ -263,8 +263,6 @@ Class | Method | HTTP request | Description - [Model.FileResponse](docs/FileResponse.md) - [Model.FileResponseDataUri](docs/FileResponseDataUri.md) - [Model.ListInfoResponse](docs/ListInfoResponse.md) - - [Model.OAuthErrorResponse](docs/OAuthErrorResponse.md) - - [Model.OAuthErrorResponseError](docs/OAuthErrorResponseError.md) - [Model.OAuthTokenGenerateRequest](docs/OAuthTokenGenerateRequest.md) - [Model.OAuthTokenRefreshRequest](docs/OAuthTokenRefreshRequest.md) - [Model.OAuthTokenResponse](docs/OAuthTokenResponse.md) diff --git a/sdks/dotnet/docs/OAuthErrorResponse.md b/sdks/dotnet/docs/OAuthErrorResponse.md deleted file mode 100644 index d617921ed..000000000 --- a/sdks/dotnet/docs/OAuthErrorResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# Dropbox.Sign.Model.OAuthErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Error** | [**OAuthErrorResponseError**](OAuthErrorResponseError.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/dotnet/docs/OAuthErrorResponseError.md b/sdks/dotnet/docs/OAuthErrorResponseError.md deleted file mode 100644 index 736f18288..000000000 --- a/sdks/dotnet/docs/OAuthErrorResponseError.md +++ /dev/null @@ -1,11 +0,0 @@ -# Dropbox.Sign.Model.OAuthErrorResponseError -_t__OAuthErrorResponseError::DESCRIPTION - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ErrorMsg** | **string** | _t__OAuthErrorResponseError::ERROR_MSG | **ErrorName** | **string** | _t__OAuthErrorResponseError::ERROR_NAME | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/OAuthErrorResponse.cs b/sdks/dotnet/src/Dropbox.Sign/Model/OAuthErrorResponse.cs deleted file mode 100644 index a633fdb72..000000000 --- a/sdks/dotnet/src/Dropbox.Sign/Model/OAuthErrorResponse.cs +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Dropbox Sign API - * - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; - -namespace Dropbox.Sign.Model -{ - /// - /// OAuthErrorResponse - /// - [DataContract(Name = "OAuthErrorResponse")] - [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class OAuthErrorResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected OAuthErrorResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// error (required). - public OAuthErrorResponse(OAuthErrorResponseError error = default(OAuthErrorResponseError)) - { - - // to ensure "error" is required (not null) - if (error == null) - { - throw new ArgumentNullException("error is a required property for OAuthErrorResponse and cannot be null"); - } - this.Error = error; - } - - /// - /// Attempt to instantiate and hydrate a new instance of this class - /// - /// String of JSON data representing target object - public static OAuthErrorResponse Init(string jsonData) - { - var obj = JsonConvert.DeserializeObject(jsonData); - - if (obj == null) - { - throw new Exception("Unable to deserialize JSON to instance of OAuthErrorResponse"); - } - - return obj; - } - - /// - /// Gets or Sets Error - /// - [DataMember(Name = "error", IsRequired = true, EmitDefaultValue = true)] - public OAuthErrorResponseError Error { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class OAuthErrorResponse {\n"); - sb.Append(" Error: ").Append(Error).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OAuthErrorResponse); - } - - /// - /// Returns true if OAuthErrorResponse instances are equal - /// - /// Instance of OAuthErrorResponse to be compared - /// Boolean - public bool Equals(OAuthErrorResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType() - { - Name = "error", - Property = "Error", - Type = "OAuthErrorResponseError", - Value = Error, - }); - - return types; - } - } - -} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/OAuthErrorResponseError.cs b/sdks/dotnet/src/Dropbox.Sign/Model/OAuthErrorResponseError.cs deleted file mode 100644 index 5d14d9d98..000000000 --- a/sdks/dotnet/src/Dropbox.Sign/Model/OAuthErrorResponseError.cs +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Dropbox Sign API - * - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; - -namespace Dropbox.Sign.Model -{ - /// - /// _t__OAuthErrorResponseError::DESCRIPTION - /// - [DataContract(Name = "OAuthErrorResponseError")] - [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] - public partial class OAuthErrorResponseError : IEquatable, IValidatableObject - { - /// - /// _t__OAuthErrorResponseError::ERROR_NAME - /// - /// _t__OAuthErrorResponseError::ERROR_NAME - [JsonConverter(typeof(StringEnumConverter))] - public enum ErrorNameEnum - { - /// - /// Enum InvalidGrant for value: invalid_grant - /// - [EnumMember(Value = "invalid_grant")] - InvalidGrant = 1, - - /// - /// Enum InvalidClient for value: invalid_client - /// - [EnumMember(Value = "invalid_client")] - InvalidClient = 2, - - /// - /// Enum InvalidRequest for value: invalid_request - /// - [EnumMember(Value = "invalid_request")] - InvalidRequest = 3, - - /// - /// Enum UnauthorizedClient for value: unauthorized_client - /// - [EnumMember(Value = "unauthorized_client")] - UnauthorizedClient = 4, - - /// - /// Enum UnsupportedGrantType for value: unsupported_grant_type - /// - [EnumMember(Value = "unsupported_grant_type")] - UnsupportedGrantType = 5, - - /// - /// Enum PaymentRequired for value: payment_required - /// - [EnumMember(Value = "payment_required")] - PaymentRequired = 6, - - /// - /// Enum AddonRequired for value: addon_required - /// - [EnumMember(Value = "addon_required")] - AddonRequired = 7, - - /// - /// Enum InvalidScope for value: invalid_scope - /// - [EnumMember(Value = "invalid_scope")] - InvalidScope = 8, - - /// - /// Enum QuotaReached for value: quota_reached - /// - [EnumMember(Value = "quota_reached")] - QuotaReached = 9, - - /// - /// Enum ServerError for value: server_error - /// - [EnumMember(Value = "server_error")] - ServerError = 10, - - /// - /// Enum TemporaryUnavailable for value: temporary_unavailable - /// - [EnumMember(Value = "temporary_unavailable")] - TemporaryUnavailable = 11 - } - - - /// - /// _t__OAuthErrorResponseError::ERROR_NAME - /// - /// _t__OAuthErrorResponseError::ERROR_NAME - [DataMember(Name = "error_name", IsRequired = true, EmitDefaultValue = true)] - public ErrorNameEnum ErrorName { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected OAuthErrorResponseError() { } - /// - /// Initializes a new instance of the class. - /// - /// _t__OAuthErrorResponseError::ERROR_MSG (required). - /// _t__OAuthErrorResponseError::ERROR_NAME (required). - public OAuthErrorResponseError(string errorMsg = default(string), ErrorNameEnum errorName = default(ErrorNameEnum)) - { - - // to ensure "errorMsg" is required (not null) - if (errorMsg == null) - { - throw new ArgumentNullException("errorMsg is a required property for OAuthErrorResponseError and cannot be null"); - } - this.ErrorMsg = errorMsg; - this.ErrorName = errorName; - } - - /// - /// Attempt to instantiate and hydrate a new instance of this class - /// - /// String of JSON data representing target object - public static OAuthErrorResponseError Init(string jsonData) - { - var obj = JsonConvert.DeserializeObject(jsonData); - - if (obj == null) - { - throw new Exception("Unable to deserialize JSON to instance of OAuthErrorResponseError"); - } - - return obj; - } - - /// - /// _t__OAuthErrorResponseError::ERROR_MSG - /// - /// _t__OAuthErrorResponseError::ERROR_MSG - [DataMember(Name = "error_msg", IsRequired = true, EmitDefaultValue = true)] - public string ErrorMsg { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class OAuthErrorResponseError {\n"); - sb.Append(" ErrorMsg: ").Append(ErrorMsg).Append("\n"); - sb.Append(" ErrorName: ").Append(ErrorName).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OAuthErrorResponseError); - } - - /// - /// Returns true if OAuthErrorResponseError instances are equal - /// - /// Instance of OAuthErrorResponseError to be compared - /// Boolean - public bool Equals(OAuthErrorResponseError input) - { - if (input == null) - { - return false; - } - return - ( - this.ErrorMsg == input.ErrorMsg || - (this.ErrorMsg != null && - this.ErrorMsg.Equals(input.ErrorMsg)) - ) && - ( - this.ErrorName == input.ErrorName || - this.ErrorName.Equals(input.ErrorName) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ErrorMsg != null) - { - hashCode = (hashCode * 59) + this.ErrorMsg.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ErrorName.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - public List GetOpenApiTypes() - { - var types = new List(); - types.Add(new OpenApiType() - { - Name = "error_msg", - Property = "ErrorMsg", - Type = "string", - Value = ErrorMsg, - }); - types.Add(new OpenApiType() - { - Name = "error_name", - Property = "ErrorName", - Type = "string", - Value = ErrorName, - }); - - return types; - } - } - -} diff --git a/sdks/java-v1/README.md b/sdks/java-v1/README.md index 0b3747654..7ea39626e 100644 --- a/sdks/java-v1/README.md +++ b/sdks/java-v1/README.md @@ -305,8 +305,6 @@ Class | Method | HTTP request | Description - [FileResponse](docs/FileResponse.md) - [FileResponseDataUri](docs/FileResponseDataUri.md) - [ListInfoResponse](docs/ListInfoResponse.md) - - [OAuthErrorResponse](docs/OAuthErrorResponse.md) - - [OAuthErrorResponseError](docs/OAuthErrorResponseError.md) - [OAuthTokenGenerateRequest](docs/OAuthTokenGenerateRequest.md) - [OAuthTokenRefreshRequest](docs/OAuthTokenRefreshRequest.md) - [OAuthTokenResponse](docs/OAuthTokenResponse.md) diff --git a/sdks/java-v1/docs/OAuthErrorResponse.md b/sdks/java-v1/docs/OAuthErrorResponse.md deleted file mode 100644 index c856c0d02..000000000 --- a/sdks/java-v1/docs/OAuthErrorResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# OAuthErrorResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `error`*_required_ | [```OAuthErrorResponseError```](OAuthErrorResponseError.md) | | | - - - diff --git a/sdks/java-v1/docs/OAuthErrorResponseError.md b/sdks/java-v1/docs/OAuthErrorResponseError.md deleted file mode 100644 index 1d96477c4..000000000 --- a/sdks/java-v1/docs/OAuthErrorResponseError.md +++ /dev/null @@ -1,33 +0,0 @@ - - -# OAuthErrorResponseError - -_t__OAuthErrorResponseError::DESCRIPTION - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `errorMsg`*_required_ | ```String``` | _t__OAuthErrorResponseError::ERROR_MSG | | -| `errorName`*_required_ | [```ErrorNameEnum```](#ErrorNameEnum) | _t__OAuthErrorResponseError::ERROR_NAME | | - - - -## Enum: ErrorNameEnum - -| Name | Value | ----- | ----- -| INVALID_GRANT | "invalid_grant" | -| INVALID_CLIENT | "invalid_client" | -| INVALID_REQUEST | "invalid_request" | -| UNAUTHORIZED_CLIENT | "unauthorized_client" | -| UNSUPPORTED_GRANT_TYPE | "unsupported_grant_type" | -| PAYMENT_REQUIRED | "payment_required" | -| ADDON_REQUIRED | "addon_required" | -| INVALID_SCOPE | "invalid_scope" | -| QUOTA_REACHED | "quota_reached" | -| SERVER_ERROR | "server_error" | -| TEMPORARY_UNAVAILABLE | "temporary_unavailable" | - - - diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthErrorResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthErrorResponse.java deleted file mode 100644 index a9616a0eb..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthErrorResponse.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** OAuthErrorResponse */ -@JsonPropertyOrder({OAuthErrorResponse.JSON_PROPERTY_ERROR}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class OAuthErrorResponse { - public static final String JSON_PROPERTY_ERROR = "error"; - @javax.annotation.Nonnull private OAuthErrorResponseError error; - - public OAuthErrorResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static OAuthErrorResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, OAuthErrorResponse.class); - } - - public static OAuthErrorResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), OAuthErrorResponse.class); - } - - public OAuthErrorResponse error(@javax.annotation.Nonnull OAuthErrorResponseError error) { - this.error = error; - return this; - } - - /** - * Get error - * - * @return error - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ERROR) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OAuthErrorResponseError getError() { - return error; - } - - @JsonProperty(JSON_PROPERTY_ERROR) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setError(@javax.annotation.Nonnull OAuthErrorResponseError error) { - this.error = error; - } - - /** Return true if this OAuthErrorResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OAuthErrorResponse oauthErrorResponse = (OAuthErrorResponse) o; - return Objects.equals(this.error, oauthErrorResponse.error); - } - - @Override - public int hashCode() { - return Objects.hash(error); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OAuthErrorResponse {\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (error != null) { - if (isFileTypeOrListOfFiles(error)) { - fileTypeFound = true; - } - - if (error.getClass().equals(java.io.File.class) - || error.getClass().equals(Integer.class) - || error.getClass().equals(String.class) - || error.getClass().isEnum()) { - map.put("error", error); - } else if (isListOfFile(error)) { - for (int i = 0; i < getListSize(error); i++) { - map.put("error[" + i + "]", getFromList(error, i)); - } - } else { - map.put("error", JSON.getDefault().getMapper().writeValueAsString(error)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthErrorResponseError.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthErrorResponseError.java deleted file mode 100644 index 991a86bf8..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthErrorResponseError.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** _t__OAuthErrorResponseError::DESCRIPTION */ -@JsonPropertyOrder({ - OAuthErrorResponseError.JSON_PROPERTY_ERROR_MSG, - OAuthErrorResponseError.JSON_PROPERTY_ERROR_NAME -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class OAuthErrorResponseError { - public static final String JSON_PROPERTY_ERROR_MSG = "error_msg"; - @javax.annotation.Nonnull private String errorMsg; - - /** _t__OAuthErrorResponseError::ERROR_NAME */ - public enum ErrorNameEnum { - INVALID_GRANT(String.valueOf("invalid_grant")), - - INVALID_CLIENT(String.valueOf("invalid_client")), - - INVALID_REQUEST(String.valueOf("invalid_request")), - - UNAUTHORIZED_CLIENT(String.valueOf("unauthorized_client")), - - UNSUPPORTED_GRANT_TYPE(String.valueOf("unsupported_grant_type")), - - PAYMENT_REQUIRED(String.valueOf("payment_required")), - - ADDON_REQUIRED(String.valueOf("addon_required")), - - INVALID_SCOPE(String.valueOf("invalid_scope")), - - QUOTA_REACHED(String.valueOf("quota_reached")), - - SERVER_ERROR(String.valueOf("server_error")), - - TEMPORARY_UNAVAILABLE(String.valueOf("temporary_unavailable")); - - private String value; - - ErrorNameEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ErrorNameEnum fromValue(String value) { - for (ErrorNameEnum b : ErrorNameEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_ERROR_NAME = "error_name"; - @javax.annotation.Nonnull private ErrorNameEnum errorName; - - public OAuthErrorResponseError() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static OAuthErrorResponseError init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, OAuthErrorResponseError.class); - } - - public static OAuthErrorResponseError init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), OAuthErrorResponseError.class); - } - - public OAuthErrorResponseError errorMsg(@javax.annotation.Nonnull String errorMsg) { - this.errorMsg = errorMsg; - return this; - } - - /** - * _t__OAuthErrorResponseError::ERROR_MSG - * - * @return errorMsg - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ERROR_MSG) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getErrorMsg() { - return errorMsg; - } - - @JsonProperty(JSON_PROPERTY_ERROR_MSG) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setErrorMsg(@javax.annotation.Nonnull String errorMsg) { - this.errorMsg = errorMsg; - } - - public OAuthErrorResponseError errorName(@javax.annotation.Nonnull ErrorNameEnum errorName) { - this.errorName = errorName; - return this; - } - - /** - * _t__OAuthErrorResponseError::ERROR_NAME - * - * @return errorName - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ERROR_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ErrorNameEnum getErrorName() { - return errorName; - } - - @JsonProperty(JSON_PROPERTY_ERROR_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setErrorName(@javax.annotation.Nonnull ErrorNameEnum errorName) { - this.errorName = errorName; - } - - /** Return true if this OAuthErrorResponseError object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OAuthErrorResponseError oauthErrorResponseError = (OAuthErrorResponseError) o; - return Objects.equals(this.errorMsg, oauthErrorResponseError.errorMsg) - && Objects.equals(this.errorName, oauthErrorResponseError.errorName); - } - - @Override - public int hashCode() { - return Objects.hash(errorMsg, errorName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OAuthErrorResponseError {\n"); - sb.append(" errorMsg: ").append(toIndentedString(errorMsg)).append("\n"); - sb.append(" errorName: ").append(toIndentedString(errorName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (errorMsg != null) { - if (isFileTypeOrListOfFiles(errorMsg)) { - fileTypeFound = true; - } - - if (errorMsg.getClass().equals(java.io.File.class) - || errorMsg.getClass().equals(Integer.class) - || errorMsg.getClass().equals(String.class) - || errorMsg.getClass().isEnum()) { - map.put("error_msg", errorMsg); - } else if (isListOfFile(errorMsg)) { - for (int i = 0; i < getListSize(errorMsg); i++) { - map.put("error_msg[" + i + "]", getFromList(errorMsg, i)); - } - } else { - map.put( - "error_msg", - JSON.getDefault().getMapper().writeValueAsString(errorMsg)); - } - } - if (errorName != null) { - if (isFileTypeOrListOfFiles(errorName)) { - fileTypeFound = true; - } - - if (errorName.getClass().equals(java.io.File.class) - || errorName.getClass().equals(Integer.class) - || errorName.getClass().equals(String.class) - || errorName.getClass().isEnum()) { - map.put("error_name", errorName); - } else if (isListOfFile(errorName)) { - for (int i = 0; i < getListSize(errorName); i++) { - map.put("error_name[" + i + "]", getFromList(errorName, i)); - } - } else { - map.put( - "error_name", - JSON.getDefault().getMapper().writeValueAsString(errorName)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/sdks/java-v2/README.md b/sdks/java-v2/README.md index 4a486766e..91850482a 100644 --- a/sdks/java-v2/README.md +++ b/sdks/java-v2/README.md @@ -281,8 +281,6 @@ Class | Method | HTTP request | Description - [FileResponse](docs/FileResponse.md) - [FileResponseDataUri](docs/FileResponseDataUri.md) - [ListInfoResponse](docs/ListInfoResponse.md) - - [OAuthErrorResponse](docs/OAuthErrorResponse.md) - - [OAuthErrorResponseError](docs/OAuthErrorResponseError.md) - [OAuthTokenGenerateRequest](docs/OAuthTokenGenerateRequest.md) - [OAuthTokenRefreshRequest](docs/OAuthTokenRefreshRequest.md) - [OAuthTokenResponse](docs/OAuthTokenResponse.md) diff --git a/sdks/java-v2/docs/OAuthErrorResponse.md b/sdks/java-v2/docs/OAuthErrorResponse.md deleted file mode 100644 index c856c0d02..000000000 --- a/sdks/java-v2/docs/OAuthErrorResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# OAuthErrorResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `error`*_required_ | [```OAuthErrorResponseError```](OAuthErrorResponseError.md) | | | - - - diff --git a/sdks/java-v2/docs/OAuthErrorResponseError.md b/sdks/java-v2/docs/OAuthErrorResponseError.md deleted file mode 100644 index 1d96477c4..000000000 --- a/sdks/java-v2/docs/OAuthErrorResponseError.md +++ /dev/null @@ -1,33 +0,0 @@ - - -# OAuthErrorResponseError - -_t__OAuthErrorResponseError::DESCRIPTION - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `errorMsg`*_required_ | ```String``` | _t__OAuthErrorResponseError::ERROR_MSG | | -| `errorName`*_required_ | [```ErrorNameEnum```](#ErrorNameEnum) | _t__OAuthErrorResponseError::ERROR_NAME | | - - - -## Enum: ErrorNameEnum - -| Name | Value | ----- | ----- -| INVALID_GRANT | "invalid_grant" | -| INVALID_CLIENT | "invalid_client" | -| INVALID_REQUEST | "invalid_request" | -| UNAUTHORIZED_CLIENT | "unauthorized_client" | -| UNSUPPORTED_GRANT_TYPE | "unsupported_grant_type" | -| PAYMENT_REQUIRED | "payment_required" | -| ADDON_REQUIRED | "addon_required" | -| INVALID_SCOPE | "invalid_scope" | -| QUOTA_REACHED | "quota_reached" | -| SERVER_ERROR | "server_error" | -| TEMPORARY_UNAVAILABLE | "temporary_unavailable" | - - - diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/api/OAuthApi.java b/sdks/java-v2/src/main/java/com/dropbox/sign/api/OAuthApi.java index deb964864..ddcaa24aa 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/api/OAuthApi.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/api/OAuthApi.java @@ -8,7 +8,7 @@ import jakarta.ws.rs.core.GenericType; -import com.dropbox.sign.model.OAuthErrorResponse; +import com.dropbox.sign.model.ErrorResponse; import com.dropbox.sign.model.OAuthTokenGenerateRequest; import com.dropbox.sign.model.OAuthTokenRefreshRequest; import com.dropbox.sign.model.OAuthTokenResponse; diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthErrorResponse.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthErrorResponse.java deleted file mode 100644 index dfeaee715..000000000 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthErrorResponse.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.dropbox.sign.model; - -import java.util.Objects; -import java.util.Map; -import java.util.HashMap; -import com.dropbox.sign.model.OAuthErrorResponseError; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.databind.ObjectMapper; - - -import com.dropbox.sign.ApiException; -/** - * OAuthErrorResponse - */ -@JsonPropertyOrder({ - OAuthErrorResponse.JSON_PROPERTY_ERROR -}) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") -@JsonIgnoreProperties(ignoreUnknown=true) -public class OAuthErrorResponse { - public static final String JSON_PROPERTY_ERROR = "error"; - @jakarta.annotation.Nonnull - private OAuthErrorResponseError error; - - public OAuthErrorResponse() { - } - - /** - * Attempt to instantiate and hydrate a new instance of this class - * @param jsonData String of JSON data representing target object - */ - static public OAuthErrorResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, OAuthErrorResponse.class); - } - - static public OAuthErrorResponse init(HashMap data) throws Exception { - return new ObjectMapper().readValue( - new ObjectMapper().writeValueAsString(data), - OAuthErrorResponse.class - ); - } - - public OAuthErrorResponse error(@jakarta.annotation.Nonnull OAuthErrorResponseError error) { - this.error = error; - return this; - } - - /** - * Get error - * @return error - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ERROR) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public OAuthErrorResponseError getError() { - return error; - } - - - @JsonProperty(JSON_PROPERTY_ERROR) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setError(@jakarta.annotation.Nonnull OAuthErrorResponseError error) { - this.error = error; - } - - - /** - * Return true if this OAuthErrorResponse object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OAuthErrorResponse oauthErrorResponse = (OAuthErrorResponse) o; - return Objects.equals(this.error, oauthErrorResponse.error); - } - - @Override - public int hashCode() { - return Objects.hash(error); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OAuthErrorResponse {\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (error != null) { - if (isFileTypeOrListOfFiles(error)) { - fileTypeFound = true; - } - - if (error.getClass().equals(java.io.File.class) || - error.getClass().equals(Integer.class) || - error.getClass().equals(String.class) || - error.getClass().isEnum()) { - map.put("error", error); - } else if (isListOfFile(error)) { - for(int i = 0; i< getListSize(error); i++) { - map.put("error[" + i + "]", getFromList(error, i)); - } - } - else { - map.put("error", JSON.getDefault().getMapper().writeValueAsString(error)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List && !isListEmpty(obj) && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()).getMethod("get", int.class).invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthErrorResponseError.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthErrorResponseError.java deleted file mode 100644 index 2c7d9ade8..000000000 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/OAuthErrorResponseError.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.dropbox.sign.model; - -import java.util.Objects; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.databind.ObjectMapper; - - -import com.dropbox.sign.ApiException; -/** - * _t__OAuthErrorResponseError::DESCRIPTION - */ -@JsonPropertyOrder({ - OAuthErrorResponseError.JSON_PROPERTY_ERROR_MSG, - OAuthErrorResponseError.JSON_PROPERTY_ERROR_NAME -}) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") -@JsonIgnoreProperties(ignoreUnknown=true) -public class OAuthErrorResponseError { - public static final String JSON_PROPERTY_ERROR_MSG = "error_msg"; - @jakarta.annotation.Nonnull - private String errorMsg; - - /** - * _t__OAuthErrorResponseError::ERROR_NAME - */ - public enum ErrorNameEnum { - INVALID_GRANT(String.valueOf("invalid_grant")), - - INVALID_CLIENT(String.valueOf("invalid_client")), - - INVALID_REQUEST(String.valueOf("invalid_request")), - - UNAUTHORIZED_CLIENT(String.valueOf("unauthorized_client")), - - UNSUPPORTED_GRANT_TYPE(String.valueOf("unsupported_grant_type")), - - PAYMENT_REQUIRED(String.valueOf("payment_required")), - - ADDON_REQUIRED(String.valueOf("addon_required")), - - INVALID_SCOPE(String.valueOf("invalid_scope")), - - QUOTA_REACHED(String.valueOf("quota_reached")), - - SERVER_ERROR(String.valueOf("server_error")), - - TEMPORARY_UNAVAILABLE(String.valueOf("temporary_unavailable")); - - private String value; - - ErrorNameEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ErrorNameEnum fromValue(String value) { - for (ErrorNameEnum b : ErrorNameEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_ERROR_NAME = "error_name"; - @jakarta.annotation.Nonnull - private ErrorNameEnum errorName; - - public OAuthErrorResponseError() { - } - - /** - * Attempt to instantiate and hydrate a new instance of this class - * @param jsonData String of JSON data representing target object - */ - static public OAuthErrorResponseError init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, OAuthErrorResponseError.class); - } - - static public OAuthErrorResponseError init(HashMap data) throws Exception { - return new ObjectMapper().readValue( - new ObjectMapper().writeValueAsString(data), - OAuthErrorResponseError.class - ); - } - - public OAuthErrorResponseError errorMsg(@jakarta.annotation.Nonnull String errorMsg) { - this.errorMsg = errorMsg; - return this; - } - - /** - * _t__OAuthErrorResponseError::ERROR_MSG - * @return errorMsg - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ERROR_MSG) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public String getErrorMsg() { - return errorMsg; - } - - - @JsonProperty(JSON_PROPERTY_ERROR_MSG) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setErrorMsg(@jakarta.annotation.Nonnull String errorMsg) { - this.errorMsg = errorMsg; - } - - - public OAuthErrorResponseError errorName(@jakarta.annotation.Nonnull ErrorNameEnum errorName) { - this.errorName = errorName; - return this; - } - - /** - * _t__OAuthErrorResponseError::ERROR_NAME - * @return errorName - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ERROR_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public ErrorNameEnum getErrorName() { - return errorName; - } - - - @JsonProperty(JSON_PROPERTY_ERROR_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setErrorName(@jakarta.annotation.Nonnull ErrorNameEnum errorName) { - this.errorName = errorName; - } - - - /** - * Return true if this OAuthErrorResponseError object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OAuthErrorResponseError oauthErrorResponseError = (OAuthErrorResponseError) o; - return Objects.equals(this.errorMsg, oauthErrorResponseError.errorMsg) && - Objects.equals(this.errorName, oauthErrorResponseError.errorName); - } - - @Override - public int hashCode() { - return Objects.hash(errorMsg, errorName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OAuthErrorResponseError {\n"); - sb.append(" errorMsg: ").append(toIndentedString(errorMsg)).append("\n"); - sb.append(" errorName: ").append(toIndentedString(errorName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (errorMsg != null) { - if (isFileTypeOrListOfFiles(errorMsg)) { - fileTypeFound = true; - } - - if (errorMsg.getClass().equals(java.io.File.class) || - errorMsg.getClass().equals(Integer.class) || - errorMsg.getClass().equals(String.class) || - errorMsg.getClass().isEnum()) { - map.put("error_msg", errorMsg); - } else if (isListOfFile(errorMsg)) { - for(int i = 0; i< getListSize(errorMsg); i++) { - map.put("error_msg[" + i + "]", getFromList(errorMsg, i)); - } - } - else { - map.put("error_msg", JSON.getDefault().getMapper().writeValueAsString(errorMsg)); - } - } - if (errorName != null) { - if (isFileTypeOrListOfFiles(errorName)) { - fileTypeFound = true; - } - - if (errorName.getClass().equals(java.io.File.class) || - errorName.getClass().equals(Integer.class) || - errorName.getClass().equals(String.class) || - errorName.getClass().isEnum()) { - map.put("error_name", errorName); - } else if (isListOfFile(errorName)) { - for(int i = 0; i< getListSize(errorName); i++) { - map.put("error_name[" + i + "]", getFromList(errorName, i)); - } - } - else { - map.put("error_name", JSON.getDefault().getMapper().writeValueAsString(errorName)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List && !isListEmpty(obj) && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()).getMethod("get", int.class).invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/sdks/node/README.md b/sdks/node/README.md index 3ac54f11f..bb45ec624 100644 --- a/sdks/node/README.md +++ b/sdks/node/README.md @@ -209,8 +209,6 @@ All URIs are relative to *https://api.hellosign.com/v3* - [FileResponse](./docs/model/FileResponse.md) - [FileResponseDataUri](./docs/model/FileResponseDataUri.md) - [ListInfoResponse](./docs/model/ListInfoResponse.md) -- [OAuthErrorResponse](./docs/model/OAuthErrorResponse.md) -- [OAuthErrorResponseError](./docs/model/OAuthErrorResponseError.md) - [OAuthTokenGenerateRequest](./docs/model/OAuthTokenGenerateRequest.md) - [OAuthTokenRefreshRequest](./docs/model/OAuthTokenRefreshRequest.md) - [OAuthTokenResponse](./docs/model/OAuthTokenResponse.md) diff --git a/sdks/node/api/oAuthApi.ts b/sdks/node/api/oAuthApi.ts index 8c93a41fd..1478d53e0 100644 --- a/sdks/node/api/oAuthApi.ts +++ b/sdks/node/api/oAuthApi.ts @@ -241,7 +241,7 @@ export class OAuthApi { reject, error.response, "4XX", - "OAuthErrorResponse" + "ErrorResponse" ) ) { return; @@ -377,7 +377,7 @@ export class OAuthApi { reject, error.response, "4XX", - "OAuthErrorResponse" + "ErrorResponse" ) ) { return; diff --git a/sdks/node/dist/api.js b/sdks/node/dist/api.js index 25cf77e58..2fff627fa 100644 --- a/sdks/node/dist/api.js +++ b/sdks/node/dist/api.js @@ -13211,8 +13211,6 @@ __export(api_exports, { ListInfoResponse: () => ListInfoResponse, OAuth: () => OAuth, OAuthApi: () => OAuthApi, - OAuthErrorResponse: () => OAuthErrorResponse, - OAuthErrorResponseError: () => OAuthErrorResponseError, OAuthTokenGenerateRequest: () => OAuthTokenGenerateRequest, OAuthTokenRefreshRequest: () => OAuthTokenRefreshRequest, OAuthTokenResponse: () => OAuthTokenResponse, @@ -19131,73 +19129,6 @@ var VoidAuth = class { } }; -// model/oAuthErrorResponse.ts -var OAuthErrorResponse = class _OAuthErrorResponse { - static { - this.discriminator = void 0; - } - static { - this.attributeTypeMap = [ - { - name: "error", - baseName: "error", - type: "OAuthErrorResponseError" - } - ]; - } - static getAttributeTypeMap() { - return _OAuthErrorResponse.attributeTypeMap; - } - /** Attempt to instantiate and hydrate a new instance of this class */ - static init(data) { - return ObjectSerializer.deserialize(data, "OAuthErrorResponse"); - } -}; - -// model/oAuthErrorResponseError.ts -var OAuthErrorResponseError = class _OAuthErrorResponseError { - static { - this.discriminator = void 0; - } - static { - this.attributeTypeMap = [ - { - name: "errorMsg", - baseName: "error_msg", - type: "string" - }, - { - name: "errorName", - baseName: "error_name", - type: "OAuthErrorResponseError.ErrorNameEnum" - } - ]; - } - static getAttributeTypeMap() { - return _OAuthErrorResponseError.attributeTypeMap; - } - /** Attempt to instantiate and hydrate a new instance of this class */ - static init(data) { - return ObjectSerializer.deserialize(data, "OAuthErrorResponseError"); - } -}; -((OAuthErrorResponseError2) => { - let ErrorNameEnum; - ((ErrorNameEnum2) => { - ErrorNameEnum2["InvalidGrant"] = "invalid_grant"; - ErrorNameEnum2["InvalidClient"] = "invalid_client"; - ErrorNameEnum2["InvalidRequest"] = "invalid_request"; - ErrorNameEnum2["UnauthorizedClient"] = "unauthorized_client"; - ErrorNameEnum2["UnsupportedGrantType"] = "unsupported_grant_type"; - ErrorNameEnum2["PaymentRequired"] = "payment_required"; - ErrorNameEnum2["AddonRequired"] = "addon_required"; - ErrorNameEnum2["InvalidScope"] = "invalid_scope"; - ErrorNameEnum2["QuotaReached"] = "quota_reached"; - ErrorNameEnum2["ServerError"] = "server_error"; - ErrorNameEnum2["TemporaryUnavailable"] = "temporary_unavailable"; - })(ErrorNameEnum = OAuthErrorResponseError2.ErrorNameEnum || (OAuthErrorResponseError2.ErrorNameEnum = {})); -})(OAuthErrorResponseError || (OAuthErrorResponseError = {})); - // model/oAuthTokenGenerateRequest.ts var OAuthTokenGenerateRequest = class _OAuthTokenGenerateRequest { constructor() { @@ -26891,7 +26822,6 @@ var enumsMap = { FaxLineAreaCodeGetStateEnum, "FaxLineCreateRequest.CountryEnum": FaxLineCreateRequest.CountryEnum, "FaxResponseTransmission.StatusCodeEnum": FaxResponseTransmission.StatusCodeEnum, - "OAuthErrorResponseError.ErrorNameEnum": OAuthErrorResponseError.ErrorNameEnum, "ReportCreateRequest.ReportTypeEnum": ReportCreateRequest.ReportTypeEnum, "ReportResponse.ReportTypeEnum": ReportResponse.ReportTypeEnum, SignatureRequestResponseCustomFieldTypeEnum, @@ -26971,8 +26901,6 @@ var typeMap = { FileResponse, FileResponseDataUri, ListInfoResponse, - OAuthErrorResponse, - OAuthErrorResponseError, OAuthTokenGenerateRequest, OAuthTokenRefreshRequest, OAuthTokenResponse, @@ -30490,7 +30418,7 @@ var OAuthApi = class { reject, error.response, "4XX", - "OAuthErrorResponse" + "ErrorResponse" )) { return; } @@ -30600,7 +30528,7 @@ var OAuthApi = class { reject, error.response, "4XX", - "OAuthErrorResponse" + "ErrorResponse" )) { return; } @@ -36501,8 +36429,6 @@ var APIS = [ ListInfoResponse, OAuth, OAuthApi, - OAuthErrorResponse, - OAuthErrorResponseError, OAuthTokenGenerateRequest, OAuthTokenRefreshRequest, OAuthTokenResponse, diff --git a/sdks/node/docs/model/OAuthErrorResponse.md b/sdks/node/docs/model/OAuthErrorResponse.md deleted file mode 100644 index 29e42ab31..000000000 --- a/sdks/node/docs/model/OAuthErrorResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# # OAuthErrorResponse - - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| `error`*_required_ | [```OAuthErrorResponseError```](OAuthErrorResponseError.md) | | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/node/docs/model/OAuthErrorResponseError.md b/sdks/node/docs/model/OAuthErrorResponseError.md deleted file mode 100644 index 903c2f0d0..000000000 --- a/sdks/node/docs/model/OAuthErrorResponseError.md +++ /dev/null @@ -1,12 +0,0 @@ -# # OAuthErrorResponseError - -_t__OAuthErrorResponseError::DESCRIPTION - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| `errorMsg`*_required_ | ```string``` | _t__OAuthErrorResponseError::ERROR_MSG | | -| `errorName`*_required_ | ```string``` | _t__OAuthErrorResponseError::ERROR_NAME | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/node/model/index.ts b/sdks/node/model/index.ts index 56f91f90d..963d98157 100644 --- a/sdks/node/model/index.ts +++ b/sdks/node/model/index.ts @@ -66,8 +66,6 @@ import { RequestFile, VoidAuth, } from "./models"; -import { OAuthErrorResponse } from "./oAuthErrorResponse"; -import { OAuthErrorResponseError } from "./oAuthErrorResponseError"; import { OAuthTokenGenerateRequest } from "./oAuthTokenGenerateRequest"; import { OAuthTokenRefreshRequest } from "./oAuthTokenRefreshRequest"; import { OAuthTokenResponse } from "./oAuthTokenResponse"; @@ -217,8 +215,6 @@ export let enumsMap: { [index: string]: any } = { "FaxLineCreateRequest.CountryEnum": FaxLineCreateRequest.CountryEnum, "FaxResponseTransmission.StatusCodeEnum": FaxResponseTransmission.StatusCodeEnum, - "OAuthErrorResponseError.ErrorNameEnum": - OAuthErrorResponseError.ErrorNameEnum, "ReportCreateRequest.ReportTypeEnum": ReportCreateRequest.ReportTypeEnum, "ReportResponse.ReportTypeEnum": ReportResponse.ReportTypeEnum, SignatureRequestResponseCustomFieldTypeEnum: @@ -312,8 +308,6 @@ export let typeMap: { [index: string]: any } = { FileResponse: FileResponse, FileResponseDataUri: FileResponseDataUri, ListInfoResponse: ListInfoResponse, - OAuthErrorResponse: OAuthErrorResponse, - OAuthErrorResponseError: OAuthErrorResponseError, OAuthTokenGenerateRequest: OAuthTokenGenerateRequest, OAuthTokenRefreshRequest: OAuthTokenRefreshRequest, OAuthTokenResponse: OAuthTokenResponse, @@ -552,8 +546,6 @@ export { Interceptor, ListInfoResponse, OAuth, - OAuthErrorResponse, - OAuthErrorResponseError, OAuthTokenGenerateRequest, OAuthTokenRefreshRequest, OAuthTokenResponse, diff --git a/sdks/node/model/oAuthErrorResponse.ts b/sdks/node/model/oAuthErrorResponse.ts deleted file mode 100644 index 970b17586..000000000 --- a/sdks/node/model/oAuthErrorResponse.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * The MIT License (MIT) - * - * Copyright (C) 2023 dropbox.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import { AttributeTypeMap, ObjectSerializer } from "./"; -import { OAuthErrorResponseError } from "./oAuthErrorResponseError"; - -export class OAuthErrorResponse { - "error": OAuthErrorResponseError; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: AttributeTypeMap = [ - { - name: "error", - baseName: "error", - type: "OAuthErrorResponseError", - }, - ]; - - static getAttributeTypeMap(): AttributeTypeMap { - return OAuthErrorResponse.attributeTypeMap; - } - - /** Attempt to instantiate and hydrate a new instance of this class */ - static init(data: any): OAuthErrorResponse { - return ObjectSerializer.deserialize(data, "OAuthErrorResponse"); - } -} diff --git a/sdks/node/model/oAuthErrorResponseError.ts b/sdks/node/model/oAuthErrorResponseError.ts deleted file mode 100644 index 25690e227..000000000 --- a/sdks/node/model/oAuthErrorResponseError.ts +++ /dev/null @@ -1,79 +0,0 @@ -/** - * The MIT License (MIT) - * - * Copyright (C) 2023 dropbox.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -import { AttributeTypeMap, ObjectSerializer } from "./"; - -/** - * _t__OAuthErrorResponseError::DESCRIPTION - */ -export class OAuthErrorResponseError { - /** - * _t__OAuthErrorResponseError::ERROR_MSG - */ - "errorMsg": string; - /** - * _t__OAuthErrorResponseError::ERROR_NAME - */ - "errorName": OAuthErrorResponseError.ErrorNameEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: AttributeTypeMap = [ - { - name: "errorMsg", - baseName: "error_msg", - type: "string", - }, - { - name: "errorName", - baseName: "error_name", - type: "OAuthErrorResponseError.ErrorNameEnum", - }, - ]; - - static getAttributeTypeMap(): AttributeTypeMap { - return OAuthErrorResponseError.attributeTypeMap; - } - - /** Attempt to instantiate and hydrate a new instance of this class */ - static init(data: any): OAuthErrorResponseError { - return ObjectSerializer.deserialize(data, "OAuthErrorResponseError"); - } -} - -export namespace OAuthErrorResponseError { - export enum ErrorNameEnum { - InvalidGrant = "invalid_grant", - InvalidClient = "invalid_client", - InvalidRequest = "invalid_request", - UnauthorizedClient = "unauthorized_client", - UnsupportedGrantType = "unsupported_grant_type", - PaymentRequired = "payment_required", - AddonRequired = "addon_required", - InvalidScope = "invalid_scope", - QuotaReached = "quota_reached", - ServerError = "server_error", - TemporaryUnavailable = "temporary_unavailable", - } -} diff --git a/sdks/node/types/model/index.d.ts b/sdks/node/types/model/index.d.ts index f923f6bab..d36185eb5 100644 --- a/sdks/node/types/model/index.d.ts +++ b/sdks/node/types/model/index.d.ts @@ -54,8 +54,6 @@ import { FileResponse } from "./fileResponse"; import { FileResponseDataUri } from "./fileResponseDataUri"; import { ListInfoResponse } from "./listInfoResponse"; import { ApiKeyAuth, AttributeTypeMap, Authentication, HttpBasicAuth, HttpBearerAuth, Interceptor, OAuth, ObjectSerializer, RequestDetailedFile, RequestFile, VoidAuth } from "./models"; -import { OAuthErrorResponse } from "./oAuthErrorResponse"; -import { OAuthErrorResponseError } from "./oAuthErrorResponseError"; import { OAuthTokenGenerateRequest } from "./oAuthTokenGenerateRequest"; import { OAuthTokenRefreshRequest } from "./oAuthTokenRefreshRequest"; import { OAuthTokenResponse } from "./oAuthTokenResponse"; @@ -200,4 +198,4 @@ export declare let enumsMap: { export declare let typeMap: { [index: string]: any; }; -export { AccountCreateRequest, AccountCreateResponse, AccountGetResponse, AccountResponse, AccountResponseQuotas, AccountResponseSettings, AccountResponseUsage, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, AccountVerifyResponseAccount, ApiAppCreateRequest, ApiAppGetResponse, ApiAppListResponse, ApiAppResponse, ApiAppResponseOAuth, ApiAppResponseOptions, ApiAppResponseOwnerAccount, ApiAppResponseWhiteLabelingOptions, ApiAppUpdateRequest, ApiKeyAuth, AttributeTypeMap, Authentication, BulkSendJobGetResponse, BulkSendJobGetResponseSignatureRequests, BulkSendJobListResponse, BulkSendJobResponse, BulkSendJobSendResponse, EmbeddedEditUrlRequest, EmbeddedEditUrlResponse, EmbeddedEditUrlResponseEmbedded, EmbeddedSignUrlResponse, EmbeddedSignUrlResponseEmbedded, ErrorResponse, ErrorResponseError, EventCallbackHelper, EventCallbackRequest, EventCallbackRequestEvent, EventCallbackRequestEventMetadata, FaxGetResponse, FaxLineAddUserRequest, FaxLineAreaCodeGetCountryEnum, FaxLineAreaCodeGetProvinceEnum, FaxLineAreaCodeGetResponse, FaxLineAreaCodeGetStateEnum, FaxLineCreateRequest, FaxLineDeleteRequest, FaxLineListResponse, FaxLineRemoveUserRequest, FaxLineResponse, FaxLineResponseFaxLine, FaxListResponse, FaxResponse, FaxResponseTransmission, FaxSendRequest, FileResponse, FileResponseDataUri, HttpBasicAuth, HttpBearerAuth, Interceptor, ListInfoResponse, OAuth, OAuthErrorResponse, OAuthErrorResponseError, OAuthTokenGenerateRequest, OAuthTokenRefreshRequest, OAuthTokenResponse, ObjectSerializer, ReportCreateRequest, ReportCreateResponse, ReportResponse, RequestDetailedFile, RequestFile, SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, SignatureRequestEditEmbeddedRequest, SignatureRequestEditEmbeddedWithTemplateRequest, SignatureRequestEditRequest, SignatureRequestEditWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, SignatureRequestResponse, SignatureRequestResponseAttachment, SignatureRequestResponseCustomFieldBase, SignatureRequestResponseCustomFieldCheckbox, SignatureRequestResponseCustomFieldText, SignatureRequestResponseCustomFieldTypeEnum, SignatureRequestResponseDataBase, SignatureRequestResponseDataTypeEnum, SignatureRequestResponseDataValueCheckbox, SignatureRequestResponseDataValueCheckboxMerge, SignatureRequestResponseDataValueDateSigned, SignatureRequestResponseDataValueDropdown, SignatureRequestResponseDataValueInitials, SignatureRequestResponseDataValueRadio, SignatureRequestResponseDataValueSignature, SignatureRequestResponseDataValueText, SignatureRequestResponseDataValueTextMerge, SignatureRequestResponseSignatures, SignatureRequestSendRequest, SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest, SubAttachment, SubBulkSignerList, SubBulkSignerListCustomField, SubCC, SubCustomField, SubEditorOptions, SubFieldOptions, SubFormFieldGroup, SubFormFieldRule, SubFormFieldRuleAction, SubFormFieldRuleTrigger, SubFormFieldsPerDocumentBase, SubFormFieldsPerDocumentCheckbox, SubFormFieldsPerDocumentCheckboxMerge, SubFormFieldsPerDocumentDateSigned, SubFormFieldsPerDocumentDropdown, SubFormFieldsPerDocumentFontEnum, SubFormFieldsPerDocumentHyperlink, SubFormFieldsPerDocumentInitials, SubFormFieldsPerDocumentRadio, SubFormFieldsPerDocumentSignature, SubFormFieldsPerDocumentText, SubFormFieldsPerDocumentTextMerge, SubFormFieldsPerDocumentTypeEnum, SubMergeField, SubOAuth, SubOptions, SubSignatureRequestGroupedSigners, SubSignatureRequestSigner, SubSignatureRequestTemplateSigner, SubSigningOptions, SubTeamResponse, SubTemplateRole, SubUnclaimedDraftSigner, SubUnclaimedDraftTemplateSigner, SubWhiteLabelingOptions, TeamAddMemberRequest, TeamCreateRequest, TeamGetInfoResponse, TeamGetResponse, TeamInfoResponse, TeamInviteResponse, TeamInvitesResponse, TeamMemberResponse, TeamMembersResponse, TeamParentResponse, TeamRemoveMemberRequest, TeamResponse, TeamSubTeamsResponse, TeamUpdateRequest, TemplateAddUserRequest, TemplateCreateEmbeddedDraftRequest, TemplateCreateEmbeddedDraftResponse, TemplateCreateEmbeddedDraftResponseTemplate, TemplateCreateRequest, TemplateCreateResponse, TemplateCreateResponseTemplate, TemplateGetResponse, TemplateListResponse, TemplateRemoveUserRequest, TemplateResponse, TemplateResponseAccount, TemplateResponseAccountQuota, TemplateResponseCCRole, TemplateResponseDocument, TemplateResponseDocumentCustomFieldBase, TemplateResponseDocumentCustomFieldCheckbox, TemplateResponseDocumentCustomFieldText, TemplateResponseDocumentFieldGroup, TemplateResponseDocumentFieldGroupRule, TemplateResponseDocumentFormFieldBase, TemplateResponseDocumentFormFieldCheckbox, TemplateResponseDocumentFormFieldDateSigned, TemplateResponseDocumentFormFieldDropdown, TemplateResponseDocumentFormFieldHyperlink, TemplateResponseDocumentFormFieldInitials, TemplateResponseDocumentFormFieldRadio, TemplateResponseDocumentFormFieldSignature, TemplateResponseDocumentFormFieldText, TemplateResponseDocumentStaticFieldBase, TemplateResponseDocumentStaticFieldCheckbox, TemplateResponseDocumentStaticFieldDateSigned, TemplateResponseDocumentStaticFieldDropdown, TemplateResponseDocumentStaticFieldHyperlink, TemplateResponseDocumentStaticFieldInitials, TemplateResponseDocumentStaticFieldRadio, TemplateResponseDocumentStaticFieldSignature, TemplateResponseDocumentStaticFieldText, TemplateResponseFieldAvgTextLength, TemplateResponseSignerRole, TemplateUpdateFilesRequest, TemplateUpdateFilesResponse, TemplateUpdateFilesResponseTemplate, UnclaimedDraftCreateEmbeddedRequest, UnclaimedDraftCreateEmbeddedWithTemplateRequest, UnclaimedDraftCreateRequest, UnclaimedDraftCreateResponse, UnclaimedDraftEditAndResendRequest, UnclaimedDraftResponse, VoidAuth, WarningResponse, }; +export { AccountCreateRequest, AccountCreateResponse, AccountGetResponse, AccountResponse, AccountResponseQuotas, AccountResponseSettings, AccountResponseUsage, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, AccountVerifyResponseAccount, ApiAppCreateRequest, ApiAppGetResponse, ApiAppListResponse, ApiAppResponse, ApiAppResponseOAuth, ApiAppResponseOptions, ApiAppResponseOwnerAccount, ApiAppResponseWhiteLabelingOptions, ApiAppUpdateRequest, ApiKeyAuth, AttributeTypeMap, Authentication, BulkSendJobGetResponse, BulkSendJobGetResponseSignatureRequests, BulkSendJobListResponse, BulkSendJobResponse, BulkSendJobSendResponse, EmbeddedEditUrlRequest, EmbeddedEditUrlResponse, EmbeddedEditUrlResponseEmbedded, EmbeddedSignUrlResponse, EmbeddedSignUrlResponseEmbedded, ErrorResponse, ErrorResponseError, EventCallbackHelper, EventCallbackRequest, EventCallbackRequestEvent, EventCallbackRequestEventMetadata, FaxGetResponse, FaxLineAddUserRequest, FaxLineAreaCodeGetCountryEnum, FaxLineAreaCodeGetProvinceEnum, FaxLineAreaCodeGetResponse, FaxLineAreaCodeGetStateEnum, FaxLineCreateRequest, FaxLineDeleteRequest, FaxLineListResponse, FaxLineRemoveUserRequest, FaxLineResponse, FaxLineResponseFaxLine, FaxListResponse, FaxResponse, FaxResponseTransmission, FaxSendRequest, FileResponse, FileResponseDataUri, HttpBasicAuth, HttpBearerAuth, Interceptor, ListInfoResponse, OAuth, OAuthTokenGenerateRequest, OAuthTokenRefreshRequest, OAuthTokenResponse, ObjectSerializer, ReportCreateRequest, ReportCreateResponse, ReportResponse, RequestDetailedFile, RequestFile, SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, SignatureRequestEditEmbeddedRequest, SignatureRequestEditEmbeddedWithTemplateRequest, SignatureRequestEditRequest, SignatureRequestEditWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, SignatureRequestResponse, SignatureRequestResponseAttachment, SignatureRequestResponseCustomFieldBase, SignatureRequestResponseCustomFieldCheckbox, SignatureRequestResponseCustomFieldText, SignatureRequestResponseCustomFieldTypeEnum, SignatureRequestResponseDataBase, SignatureRequestResponseDataTypeEnum, SignatureRequestResponseDataValueCheckbox, SignatureRequestResponseDataValueCheckboxMerge, SignatureRequestResponseDataValueDateSigned, SignatureRequestResponseDataValueDropdown, SignatureRequestResponseDataValueInitials, SignatureRequestResponseDataValueRadio, SignatureRequestResponseDataValueSignature, SignatureRequestResponseDataValueText, SignatureRequestResponseDataValueTextMerge, SignatureRequestResponseSignatures, SignatureRequestSendRequest, SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest, SubAttachment, SubBulkSignerList, SubBulkSignerListCustomField, SubCC, SubCustomField, SubEditorOptions, SubFieldOptions, SubFormFieldGroup, SubFormFieldRule, SubFormFieldRuleAction, SubFormFieldRuleTrigger, SubFormFieldsPerDocumentBase, SubFormFieldsPerDocumentCheckbox, SubFormFieldsPerDocumentCheckboxMerge, SubFormFieldsPerDocumentDateSigned, SubFormFieldsPerDocumentDropdown, SubFormFieldsPerDocumentFontEnum, SubFormFieldsPerDocumentHyperlink, SubFormFieldsPerDocumentInitials, SubFormFieldsPerDocumentRadio, SubFormFieldsPerDocumentSignature, SubFormFieldsPerDocumentText, SubFormFieldsPerDocumentTextMerge, SubFormFieldsPerDocumentTypeEnum, SubMergeField, SubOAuth, SubOptions, SubSignatureRequestGroupedSigners, SubSignatureRequestSigner, SubSignatureRequestTemplateSigner, SubSigningOptions, SubTeamResponse, SubTemplateRole, SubUnclaimedDraftSigner, SubUnclaimedDraftTemplateSigner, SubWhiteLabelingOptions, TeamAddMemberRequest, TeamCreateRequest, TeamGetInfoResponse, TeamGetResponse, TeamInfoResponse, TeamInviteResponse, TeamInvitesResponse, TeamMemberResponse, TeamMembersResponse, TeamParentResponse, TeamRemoveMemberRequest, TeamResponse, TeamSubTeamsResponse, TeamUpdateRequest, TemplateAddUserRequest, TemplateCreateEmbeddedDraftRequest, TemplateCreateEmbeddedDraftResponse, TemplateCreateEmbeddedDraftResponseTemplate, TemplateCreateRequest, TemplateCreateResponse, TemplateCreateResponseTemplate, TemplateGetResponse, TemplateListResponse, TemplateRemoveUserRequest, TemplateResponse, TemplateResponseAccount, TemplateResponseAccountQuota, TemplateResponseCCRole, TemplateResponseDocument, TemplateResponseDocumentCustomFieldBase, TemplateResponseDocumentCustomFieldCheckbox, TemplateResponseDocumentCustomFieldText, TemplateResponseDocumentFieldGroup, TemplateResponseDocumentFieldGroupRule, TemplateResponseDocumentFormFieldBase, TemplateResponseDocumentFormFieldCheckbox, TemplateResponseDocumentFormFieldDateSigned, TemplateResponseDocumentFormFieldDropdown, TemplateResponseDocumentFormFieldHyperlink, TemplateResponseDocumentFormFieldInitials, TemplateResponseDocumentFormFieldRadio, TemplateResponseDocumentFormFieldSignature, TemplateResponseDocumentFormFieldText, TemplateResponseDocumentStaticFieldBase, TemplateResponseDocumentStaticFieldCheckbox, TemplateResponseDocumentStaticFieldDateSigned, TemplateResponseDocumentStaticFieldDropdown, TemplateResponseDocumentStaticFieldHyperlink, TemplateResponseDocumentStaticFieldInitials, TemplateResponseDocumentStaticFieldRadio, TemplateResponseDocumentStaticFieldSignature, TemplateResponseDocumentStaticFieldText, TemplateResponseFieldAvgTextLength, TemplateResponseSignerRole, TemplateUpdateFilesRequest, TemplateUpdateFilesResponse, TemplateUpdateFilesResponseTemplate, UnclaimedDraftCreateEmbeddedRequest, UnclaimedDraftCreateEmbeddedWithTemplateRequest, UnclaimedDraftCreateRequest, UnclaimedDraftCreateResponse, UnclaimedDraftEditAndResendRequest, UnclaimedDraftResponse, VoidAuth, WarningResponse, }; diff --git a/sdks/node/types/model/oAuthErrorResponse.d.ts b/sdks/node/types/model/oAuthErrorResponse.d.ts deleted file mode 100644 index e27d0ab67..000000000 --- a/sdks/node/types/model/oAuthErrorResponse.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { AttributeTypeMap } from "./"; -import { OAuthErrorResponseError } from "./oAuthErrorResponseError"; -export declare class OAuthErrorResponse { - "error": OAuthErrorResponseError; - static discriminator: string | undefined; - static attributeTypeMap: AttributeTypeMap; - static getAttributeTypeMap(): AttributeTypeMap; - static init(data: any): OAuthErrorResponse; -} diff --git a/sdks/node/types/model/oAuthErrorResponseError.d.ts b/sdks/node/types/model/oAuthErrorResponseError.d.ts deleted file mode 100644 index 1d584c57b..000000000 --- a/sdks/node/types/model/oAuthErrorResponseError.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { AttributeTypeMap } from "./"; -export declare class OAuthErrorResponseError { - "errorMsg": string; - "errorName": OAuthErrorResponseError.ErrorNameEnum; - static discriminator: string | undefined; - static attributeTypeMap: AttributeTypeMap; - static getAttributeTypeMap(): AttributeTypeMap; - static init(data: any): OAuthErrorResponseError; -} -export declare namespace OAuthErrorResponseError { - enum ErrorNameEnum { - InvalidGrant = "invalid_grant", - InvalidClient = "invalid_client", - InvalidRequest = "invalid_request", - UnauthorizedClient = "unauthorized_client", - UnsupportedGrantType = "unsupported_grant_type", - PaymentRequired = "payment_required", - AddonRequired = "addon_required", - InvalidScope = "invalid_scope", - QuotaReached = "quota_reached", - ServerError = "server_error", - TemporaryUnavailable = "temporary_unavailable" - } -} diff --git a/sdks/php/README.md b/sdks/php/README.md index 1d346b3a9..d510976a0 100644 --- a/sdks/php/README.md +++ b/sdks/php/README.md @@ -278,8 +278,6 @@ All URIs are relative to *https://api.hellosign.com/v3* - [FileResponse](docs/Model/FileResponse.md) - [FileResponseDataUri](docs/Model/FileResponseDataUri.md) - [ListInfoResponse](docs/Model/ListInfoResponse.md) -- [OAuthErrorResponse](docs/Model/OAuthErrorResponse.md) -- [OAuthErrorResponseError](docs/Model/OAuthErrorResponseError.md) - [OAuthTokenGenerateRequest](docs/Model/OAuthTokenGenerateRequest.md) - [OAuthTokenRefreshRequest](docs/Model/OAuthTokenRefreshRequest.md) - [OAuthTokenResponse](docs/Model/OAuthTokenResponse.md) diff --git a/sdks/php/docs/Model/OAuthErrorResponse.md b/sdks/php/docs/Model/OAuthErrorResponse.md deleted file mode 100644 index f06ed1bd7..000000000 --- a/sdks/php/docs/Model/OAuthErrorResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# # OAuthErrorResponse - - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| `error`*_required_ | [```\Dropbox\Sign\Model\OAuthErrorResponseError```](OAuthErrorResponseError.md) | | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/php/docs/Model/OAuthErrorResponseError.md b/sdks/php/docs/Model/OAuthErrorResponseError.md deleted file mode 100644 index 4a3bf3ee9..000000000 --- a/sdks/php/docs/Model/OAuthErrorResponseError.md +++ /dev/null @@ -1,12 +0,0 @@ -# # OAuthErrorResponseError - -_t__OAuthErrorResponseError::DESCRIPTION - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| `error_msg`*_required_ | ```string``` | _t__OAuthErrorResponseError::ERROR_MSG | | -| `error_name`*_required_ | ```string``` | _t__OAuthErrorResponseError::ERROR_NAME | | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/php/src/Api/OAuthApi.php b/sdks/php/src/Api/OAuthApi.php index c5eda6ebb..19b137a75 100644 --- a/sdks/php/src/Api/OAuthApi.php +++ b/sdks/php/src/Api/OAuthApi.php @@ -142,7 +142,7 @@ public function getResponse() * * @param Model\OAuthTokenGenerateRequest $o_auth_token_generate_request o_auth_token_generate_request (required) * - * @return Model\OAuthTokenResponse|Model\OAuthErrorResponse + * @return Model\OAuthTokenResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ @@ -166,7 +166,7 @@ public function oauthTokenGenerate(Model\OAuthTokenGenerateRequest $o_auth_token * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['oauthTokenGenerate'] to see the possible values for this operation * - * @return array of Model\OAuthTokenResponse|\Dropbox\Sign\Model\OAuthErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of Model\OAuthTokenResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::oauthTokenGenerate. This method will eventually become unavailable @@ -201,7 +201,7 @@ public function oauthTokenGenerateWithHttpInfo(Model\OAuthTokenGenerateRequest $ $result = $this->handleRangeCodeResponse( $response, '4XX', - '\Dropbox\Sign\Model\OAuthErrorResponse' + '\Dropbox\Sign\Model\ErrorResponse' ); if ($result) { return $result; @@ -278,7 +278,7 @@ public function oauthTokenGenerateWithHttpInfo(Model\OAuthTokenGenerateRequest $ $response->getHeaders(), ]; } catch (ApiException $e) { - if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\OAuthErrorResponse')) { + if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; } switch ($e->getCode()) { @@ -525,7 +525,7 @@ protected function getHostSettingsForoauthTokenGenerate(): array * * @param Model\OAuthTokenRefreshRequest $o_auth_token_refresh_request o_auth_token_refresh_request (required) * - * @return Model\OAuthTokenResponse|Model\OAuthErrorResponse + * @return Model\OAuthTokenResponse * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException */ @@ -549,7 +549,7 @@ public function oauthTokenRefresh(Model\OAuthTokenRefreshRequest $o_auth_token_r * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['oauthTokenRefresh'] to see the possible values for this operation * - * @return array of Model\OAuthTokenResponse|\Dropbox\Sign\Model\OAuthErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of Model\OAuthTokenResponse, HTTP status code, HTTP response headers (array of strings) * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException * @deprecated Prefer to use ::oauthTokenRefresh. This method will eventually become unavailable @@ -584,7 +584,7 @@ public function oauthTokenRefreshWithHttpInfo(Model\OAuthTokenRefreshRequest $o_ $result = $this->handleRangeCodeResponse( $response, '4XX', - '\Dropbox\Sign\Model\OAuthErrorResponse' + '\Dropbox\Sign\Model\ErrorResponse' ); if ($result) { return $result; @@ -661,7 +661,7 @@ public function oauthTokenRefreshWithHttpInfo(Model\OAuthTokenRefreshRequest $o_ $response->getHeaders(), ]; } catch (ApiException $e) { - if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\OAuthErrorResponse')) { + if ($this->handleRangeCodeException($e, '4XX', '\Dropbox\Sign\Model\ErrorResponse')) { throw $e; } switch ($e->getCode()) { diff --git a/sdks/php/src/Model/OAuthErrorResponse.php b/sdks/php/src/Model/OAuthErrorResponse.php deleted file mode 100644 index fe015f3e7..000000000 --- a/sdks/php/src/Model/OAuthErrorResponse.php +++ /dev/null @@ -1,416 +0,0 @@ - - */ -class OAuthErrorResponse implements ModelInterface, ArrayAccess, JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'OAuthErrorResponse'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'error' => '\Dropbox\Sign\Model\OAuthErrorResponseError', - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'error' => null, - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var bool[] - */ - protected static array $openAPINullables = [ - 'error' => false, - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var bool[] - */ - protected array $openAPINullablesSetToNull = []; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of nullable properties - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return bool[] - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param bool[] $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * Checks if a property is nullable - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * Checks if a nullable property is set to null. - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'error' => 'error', - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'error' => 'setError', - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'error' => 'getError', - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[]|null $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->setIfExists('error', $data ?? [], null); - } - - /** - * @deprecated use ::init() - */ - public static function fromArray(array $data): OAuthErrorResponse - { - return self::init($data); - } - - /** - * Attempt to instantiate and hydrate a new instance of this class - */ - public static function init(array $data): OAuthErrorResponse - { - /** @var OAuthErrorResponse */ - return ObjectSerializer::deserialize( - $data, - OAuthErrorResponse::class, - ); - } - - /** - * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName - * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the - * $this->openAPINullablesSetToNull array - * - * @param string|int|object|array|mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['error'] === null) { - $invalidProperties[] = "'error' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - /** - * Gets error - * - * @return OAuthErrorResponseError - */ - public function getError() - { - return $this->container['error']; - } - - /** - * Sets error - * - * @param OAuthErrorResponseError $error error - * - * @return self - */ - public function setError(OAuthErrorResponseError $error) - { - if (is_null($error)) { - throw new InvalidArgumentException('non-nullable error cannot be null'); - } - $this->container['error'] = $error; - - return $this; - } - - /** - * Returns true if offset exists. False otherwise. - * - * @param int $offset Offset - */ - #[ReturnTypeWillChange] - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param int $offset Offset - * - * @return mixed|null - */ - #[ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - */ - #[ReturnTypeWillChange] - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param int $offset Offset - */ - #[ReturnTypeWillChange] - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @see https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource - */ - #[ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_UNESCAPED_SLASHES - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/sdks/php/src/Model/OAuthErrorResponseError.php b/sdks/php/src/Model/OAuthErrorResponseError.php deleted file mode 100644 index 77622370f..000000000 --- a/sdks/php/src/Model/OAuthErrorResponseError.php +++ /dev/null @@ -1,507 +0,0 @@ - - */ -class OAuthErrorResponseError implements ModelInterface, ArrayAccess, JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'OAuthErrorResponseError'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'error_msg' => 'string', - 'error_name' => 'string', - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'error_msg' => null, - 'error_name' => null, - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var bool[] - */ - protected static array $openAPINullables = [ - 'error_msg' => false, - 'error_name' => false, - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var bool[] - */ - protected array $openAPINullablesSetToNull = []; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of nullable properties - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return bool[] - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param bool[] $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * Checks if a property is nullable - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * Checks if a nullable property is set to null. - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'error_msg' => 'error_msg', - 'error_name' => 'error_name', - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'error_msg' => 'setErrorMsg', - 'error_name' => 'setErrorName', - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'error_msg' => 'getErrorMsg', - 'error_name' => 'getErrorName', - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - public const ERROR_NAME_INVALID_GRANT = 'invalid_grant'; - public const ERROR_NAME_INVALID_CLIENT = 'invalid_client'; - public const ERROR_NAME_INVALID_REQUEST = 'invalid_request'; - public const ERROR_NAME_UNAUTHORIZED_CLIENT = 'unauthorized_client'; - public const ERROR_NAME_UNSUPPORTED_GRANT_TYPE = 'unsupported_grant_type'; - public const ERROR_NAME_PAYMENT_REQUIRED = 'payment_required'; - public const ERROR_NAME_ADDON_REQUIRED = 'addon_required'; - public const ERROR_NAME_INVALID_SCOPE = 'invalid_scope'; - public const ERROR_NAME_QUOTA_REACHED = 'quota_reached'; - public const ERROR_NAME_SERVER_ERROR = 'server_error'; - public const ERROR_NAME_TEMPORARY_UNAVAILABLE = 'temporary_unavailable'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getErrorNameAllowableValues() - { - return [ - self::ERROR_NAME_INVALID_GRANT, - self::ERROR_NAME_INVALID_CLIENT, - self::ERROR_NAME_INVALID_REQUEST, - self::ERROR_NAME_UNAUTHORIZED_CLIENT, - self::ERROR_NAME_UNSUPPORTED_GRANT_TYPE, - self::ERROR_NAME_PAYMENT_REQUIRED, - self::ERROR_NAME_ADDON_REQUIRED, - self::ERROR_NAME_INVALID_SCOPE, - self::ERROR_NAME_QUOTA_REACHED, - self::ERROR_NAME_SERVER_ERROR, - self::ERROR_NAME_TEMPORARY_UNAVAILABLE, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[]|null $data Associated array of property values - * initializing the model - */ - public function __construct(?array $data = null) - { - $this->setIfExists('error_msg', $data ?? [], null); - $this->setIfExists('error_name', $data ?? [], null); - } - - /** - * @deprecated use ::init() - */ - public static function fromArray(array $data): OAuthErrorResponseError - { - return self::init($data); - } - - /** - * Attempt to instantiate and hydrate a new instance of this class - */ - public static function init(array $data): OAuthErrorResponseError - { - /** @var OAuthErrorResponseError */ - return ObjectSerializer::deserialize( - $data, - OAuthErrorResponseError::class, - ); - } - - /** - * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName - * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the - * $this->openAPINullablesSetToNull array - * - * @param string|int|object|array|mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['error_msg'] === null) { - $invalidProperties[] = "'error_msg' can't be null"; - } - if ($this->container['error_name'] === null) { - $invalidProperties[] = "'error_name' can't be null"; - } - $allowedValues = $this->getErrorNameAllowableValues(); - if (!is_null($this->container['error_name']) && !in_array($this->container['error_name'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'error_name', must be one of '%s'", - $this->container['error_name'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - /** - * Gets error_msg - * - * @return string - */ - public function getErrorMsg() - { - return $this->container['error_msg']; - } - - /** - * Sets error_msg - * - * @param string $error_msg _t__OAuthErrorResponseError::ERROR_MSG - * - * @return self - */ - public function setErrorMsg(string $error_msg) - { - if (is_null($error_msg)) { - throw new InvalidArgumentException('non-nullable error_msg cannot be null'); - } - $this->container['error_msg'] = $error_msg; - - return $this; - } - - /** - * Gets error_name - * - * @return string - */ - public function getErrorName() - { - return $this->container['error_name']; - } - - /** - * Sets error_name - * - * @param string $error_name _t__OAuthErrorResponseError::ERROR_NAME - * - * @return self - */ - public function setErrorName(string $error_name) - { - if (is_null($error_name)) { - throw new InvalidArgumentException('non-nullable error_name cannot be null'); - } - $allowedValues = $this->getErrorNameAllowableValues(); - if (!in_array($error_name, $allowedValues, true)) { - throw new InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'error_name', must be one of '%s'", - $error_name, - implode("', '", $allowedValues) - ) - ); - } - $this->container['error_name'] = $error_name; - - return $this; - } - - /** - * Returns true if offset exists. False otherwise. - * - * @param int $offset Offset - */ - #[ReturnTypeWillChange] - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param int $offset Offset - * - * @return mixed|null - */ - #[ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - */ - #[ReturnTypeWillChange] - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param int $offset Offset - */ - #[ReturnTypeWillChange] - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @see https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource - */ - #[ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_UNESCAPED_SLASHES - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/sdks/python/README.md b/sdks/python/README.md index c46aba78f..1837792ca 100644 --- a/sdks/python/README.md +++ b/sdks/python/README.md @@ -234,8 +234,6 @@ Class | Method | HTTP request | Description - [FileResponse](docs/FileResponse.md) - [FileResponseDataUri](docs/FileResponseDataUri.md) - [ListInfoResponse](docs/ListInfoResponse.md) - - [OAuthErrorResponse](docs/OAuthErrorResponse.md) - - [OAuthErrorResponseError](docs/OAuthErrorResponseError.md) - [OAuthTokenGenerateRequest](docs/OAuthTokenGenerateRequest.md) - [OAuthTokenRefreshRequest](docs/OAuthTokenRefreshRequest.md) - [OAuthTokenResponse](docs/OAuthTokenResponse.md) diff --git a/sdks/python/docs/OAuthErrorResponse.md b/sdks/python/docs/OAuthErrorResponse.md deleted file mode 100644 index 704c19b5f..000000000 --- a/sdks/python/docs/OAuthErrorResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# OAuthErrorResponse - - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| `error`*_required_ | [```OAuthErrorResponseError```](OAuthErrorResponseError.md) | | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/python/docs/OAuthErrorResponseError.md b/sdks/python/docs/OAuthErrorResponseError.md deleted file mode 100644 index 0e6606851..000000000 --- a/sdks/python/docs/OAuthErrorResponseError.md +++ /dev/null @@ -1,13 +0,0 @@ -# OAuthErrorResponseError - -_t__OAuthErrorResponseError::DESCRIPTION - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -| `error_msg`*_required_ | ```str``` | _t__OAuthErrorResponseError::ERROR_MSG | | -| `error_name`*_required_ | ```str``` | _t__OAuthErrorResponseError::ERROR_NAME | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/python/dropbox_sign/__init__.py b/sdks/python/dropbox_sign/__init__.py index e8abd54fb..aac250c6c 100644 --- a/sdks/python/dropbox_sign/__init__.py +++ b/sdks/python/dropbox_sign/__init__.py @@ -107,8 +107,6 @@ from dropbox_sign.models.file_response import FileResponse from dropbox_sign.models.file_response_data_uri import FileResponseDataUri from dropbox_sign.models.list_info_response import ListInfoResponse -from dropbox_sign.models.o_auth_error_response import OAuthErrorResponse -from dropbox_sign.models.o_auth_error_response_error import OAuthErrorResponseError from dropbox_sign.models.o_auth_token_generate_request import OAuthTokenGenerateRequest from dropbox_sign.models.o_auth_token_refresh_request import OAuthTokenRefreshRequest from dropbox_sign.models.o_auth_token_response import OAuthTokenResponse diff --git a/sdks/python/dropbox_sign/api/o_auth_api.py b/sdks/python/dropbox_sign/api/o_auth_api.py index baf6d80cf..6ea59b559 100644 --- a/sdks/python/dropbox_sign/api/o_auth_api.py +++ b/sdks/python/dropbox_sign/api/o_auth_api.py @@ -93,7 +93,7 @@ def oauth_token_generate( _response_types_map: Dict[str, Optional[str]] = { "200": "OAuthTokenResponse", - "4XX": "OAuthErrorResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -158,7 +158,7 @@ def oauth_token_generate_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "OAuthTokenResponse", - "4XX": "OAuthErrorResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -223,7 +223,7 @@ def oauth_token_generate_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "OAuthTokenResponse", - "4XX": "OAuthErrorResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -371,7 +371,7 @@ def oauth_token_refresh( _response_types_map: Dict[str, Optional[str]] = { "200": "OAuthTokenResponse", - "4XX": "OAuthErrorResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -436,7 +436,7 @@ def oauth_token_refresh_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "OAuthTokenResponse", - "4XX": "OAuthErrorResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -501,7 +501,7 @@ def oauth_token_refresh_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "OAuthTokenResponse", - "4XX": "OAuthErrorResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout diff --git a/sdks/python/dropbox_sign/models/__init__.py b/sdks/python/dropbox_sign/models/__init__.py index ccdda34a7..bb54e9011 100644 --- a/sdks/python/dropbox_sign/models/__init__.py +++ b/sdks/python/dropbox_sign/models/__init__.py @@ -90,8 +90,6 @@ from dropbox_sign.models.file_response import FileResponse from dropbox_sign.models.file_response_data_uri import FileResponseDataUri from dropbox_sign.models.list_info_response import ListInfoResponse -from dropbox_sign.models.o_auth_error_response import OAuthErrorResponse -from dropbox_sign.models.o_auth_error_response_error import OAuthErrorResponseError from dropbox_sign.models.o_auth_token_generate_request import OAuthTokenGenerateRequest from dropbox_sign.models.o_auth_token_refresh_request import OAuthTokenRefreshRequest from dropbox_sign.models.o_auth_token_response import OAuthTokenResponse diff --git a/sdks/python/dropbox_sign/models/o_auth_error_response.py b/sdks/python/dropbox_sign/models/o_auth_error_response.py deleted file mode 100644 index d698e36fa..000000000 --- a/sdks/python/dropbox_sign/models/o_auth_error_response.py +++ /dev/null @@ -1,131 +0,0 @@ -# coding: utf-8 - -""" -Dropbox Sign API - -Dropbox Sign v3 API - -The version of the OpenAPI document: 3.0.0 -Contact: apisupport@hellosign.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from dropbox_sign.models.o_auth_error_response_error import OAuthErrorResponseError -from typing import Optional, Set -from typing_extensions import Self -from typing import Tuple, Union -import io -from pydantic import StrictBool - - -class OAuthErrorResponse(BaseModel): - """ - OAuthErrorResponse - """ # noqa: E501 - - error: OAuthErrorResponseError - __properties: ClassVar[List[str]] = ["error"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - arbitrary_types_allowed=True, - ) - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - def to_json_form_params( - self, excluded_fields: Set[str] = None - ) -> List[Tuple[str, str]]: - data: List[Tuple[str, str]] = [] - - for key, value in self.to_dict(excluded_fields).items(): - if isinstance(value, (int, str, bool)): - data.append((key, value)) - else: - data.append((key, json.dumps(value, ensure_ascii=False))) - - return data - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OAuthErrorResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of error - if self.error: - _dict["error"] = self.error.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OAuthErrorResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate( - { - "error": ( - OAuthErrorResponseError.from_dict(obj["error"]) - if obj.get("error") is not None - else None - ) - } - ) - return _obj - - @classmethod - def init(cls, data: Any) -> Self: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - if isinstance(data, str): - data = json.loads(data) - - return cls.from_dict(data) - - @classmethod - def openapi_types(cls) -> Dict[str, str]: - return { - "error": "(OAuthErrorResponseError,)", - } - - @classmethod - def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [] diff --git a/sdks/python/dropbox_sign/models/o_auth_error_response_error.py b/sdks/python/dropbox_sign/models/o_auth_error_response_error.py deleted file mode 100644 index 14a75a54b..000000000 --- a/sdks/python/dropbox_sign/models/o_auth_error_response_error.py +++ /dev/null @@ -1,146 +0,0 @@ -# coding: utf-8 - -""" -Dropbox Sign API - -Dropbox Sign v3 API - -The version of the OpenAPI document: 3.0.0 -Contact: apisupport@hellosign.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from typing import Tuple, Union -import io -from pydantic import StrictBool - - -class OAuthErrorResponseError(BaseModel): - """ - _t__OAuthErrorResponseError::DESCRIPTION - """ # noqa: E501 - - error_msg: StrictStr = Field(description="_t__OAuthErrorResponseError::ERROR_MSG") - error_name: StrictStr = Field(description="_t__OAuthErrorResponseError::ERROR_NAME") - __properties: ClassVar[List[str]] = ["error_msg", "error_name"] - - @field_validator("error_name") - def error_name_validate_enum(cls, value): - """Validates the enum""" - if value not in set( - [ - "invalid_grant", - "invalid_client", - "invalid_request", - "unauthorized_client", - "unsupported_grant_type", - "payment_required", - "addon_required", - "invalid_scope", - "quota_reached", - "server_error", - "temporary_unavailable", - ] - ): - raise ValueError( - "must be one of enum values ('invalid_grant', 'invalid_client', 'invalid_request', 'unauthorized_client', 'unsupported_grant_type', 'payment_required', 'addon_required', 'invalid_scope', 'quota_reached', 'server_error', 'temporary_unavailable')" - ) - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - arbitrary_types_allowed=True, - ) - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - def to_json_form_params( - self, excluded_fields: Set[str] = None - ) -> List[Tuple[str, str]]: - data: List[Tuple[str, str]] = [] - - for key, value in self.to_dict(excluded_fields).items(): - if isinstance(value, (int, str, bool)): - data.append((key, value)) - else: - data.append((key, json.dumps(value, ensure_ascii=False))) - - return data - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OAuthErrorResponseError from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OAuthErrorResponseError from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate( - {"error_msg": obj.get("error_msg"), "error_name": obj.get("error_name")} - ) - return _obj - - @classmethod - def init(cls, data: Any) -> Self: - """ - Attempt to instantiate and hydrate a new instance of this class - """ - if isinstance(data, str): - data = json.loads(data) - - return cls.from_dict(data) - - @classmethod - def openapi_types(cls) -> Dict[str, str]: - return { - "error_msg": "(str,)", - "error_name": "(str,)", - } - - @classmethod - def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [] diff --git a/sdks/ruby/README.md b/sdks/ruby/README.md index 47b5c776b..4d11460d2 100644 --- a/sdks/ruby/README.md +++ b/sdks/ruby/README.md @@ -238,8 +238,6 @@ All URIs are relative to *https://api.hellosign.com/v3* - [Dropbox::Sign::FileResponse](docs/FileResponse.md) - [Dropbox::Sign::FileResponseDataUri](docs/FileResponseDataUri.md) - [Dropbox::Sign::ListInfoResponse](docs/ListInfoResponse.md) - - [Dropbox::Sign::OAuthErrorResponse](docs/OAuthErrorResponse.md) - - [Dropbox::Sign::OAuthErrorResponseError](docs/OAuthErrorResponseError.md) - [Dropbox::Sign::OAuthTokenGenerateRequest](docs/OAuthTokenGenerateRequest.md) - [Dropbox::Sign::OAuthTokenRefreshRequest](docs/OAuthTokenRefreshRequest.md) - [Dropbox::Sign::OAuthTokenResponse](docs/OAuthTokenResponse.md) diff --git a/sdks/ruby/docs/OAuthErrorResponse.md b/sdks/ruby/docs/OAuthErrorResponse.md deleted file mode 100644 index 0034680f5..000000000 --- a/sdks/ruby/docs/OAuthErrorResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# Dropbox::Sign::OAuthErrorResponse - - - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| `error`*_required_ | [```OAuthErrorResponseError```](OAuthErrorResponseError.md) | | | - diff --git a/sdks/ruby/docs/OAuthErrorResponseError.md b/sdks/ruby/docs/OAuthErrorResponseError.md deleted file mode 100644 index 5eaf8cb47..000000000 --- a/sdks/ruby/docs/OAuthErrorResponseError.md +++ /dev/null @@ -1,11 +0,0 @@ -# Dropbox::Sign::OAuthErrorResponseError - -_t__OAuthErrorResponseError::DESCRIPTION - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| `error_msg`*_required_ | ```String``` | _t__OAuthErrorResponseError::ERROR_MSG | | -| `error_name`*_required_ | ```String``` | _t__OAuthErrorResponseError::ERROR_NAME | | - diff --git a/sdks/ruby/lib/dropbox-sign.rb b/sdks/ruby/lib/dropbox-sign.rb index 07365789a..e85d1d545 100644 --- a/sdks/ruby/lib/dropbox-sign.rb +++ b/sdks/ruby/lib/dropbox-sign.rb @@ -71,8 +71,6 @@ require 'dropbox-sign/models/file_response' require 'dropbox-sign/models/file_response_data_uri' require 'dropbox-sign/models/list_info_response' -require 'dropbox-sign/models/o_auth_error_response' -require 'dropbox-sign/models/o_auth_error_response_error' require 'dropbox-sign/models/o_auth_token_generate_request' require 'dropbox-sign/models/o_auth_token_refresh_request' require 'dropbox-sign/models/o_auth_token_response' diff --git a/sdks/ruby/lib/dropbox-sign/api/o_auth_api.rb b/sdks/ruby/lib/dropbox-sign/api/o_auth_api.rb index e89a9eca3..ae9af5a5c 100644 --- a/sdks/ruby/lib/dropbox-sign/api/o_auth_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/o_auth_api.rb @@ -114,7 +114,7 @@ def oauth_token_generate_with_http_info(o_auth_token_generate_request, opts = {} if e.code >= range_code_left && e.code <= range_code_right body = @api_client.convert_to_type( JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], - "Dropbox::Sign::OAuthErrorResponse" + "Dropbox::Sign::ErrorResponse" ) fail ApiError.new(:code => e.code, @@ -223,7 +223,7 @@ def oauth_token_refresh_with_http_info(o_auth_token_refresh_request, opts = {}) if e.code >= range_code_left && e.code <= range_code_right body = @api_client.convert_to_type( JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], - "Dropbox::Sign::OAuthErrorResponse" + "Dropbox::Sign::ErrorResponse" ) fail ApiError.new(:code => e.code, diff --git a/sdks/ruby/lib/dropbox-sign/models/o_auth_error_response.rb b/sdks/ruby/lib/dropbox-sign/models/o_auth_error_response.rb deleted file mode 100644 index 03a9ee062..000000000 --- a/sdks/ruby/lib/dropbox-sign/models/o_auth_error_response.rb +++ /dev/null @@ -1,266 +0,0 @@ -=begin -#Dropbox Sign API - -#Dropbox Sign v3 API - -The version of the OpenAPI document: 3.0.0 -Contact: apisupport@hellosign.com -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Dropbox -end - -module Dropbox::Sign - class OAuthErrorResponse - # @return [OAuthErrorResponseError] - attr_accessor :error - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'error' => :'error' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'error' => :'OAuthErrorResponseError' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Returns attribute map of this model + parent - def self.merged_attributes - self.attribute_map - end - - # Attribute type mapping of this model + parent - def self.merged_types - self.openapi_types - end - - # Returns list of attributes with nullable: true of this model + parent - def self.merged_nullable - self.openapi_nullable - end - - # Attempt to instantiate and hydrate a new instance of this class - # @param [Object] data Data to be converted - # @return [OAuthErrorResponse] - def self.init(data) - ApiClient.default.convert_to_type( - data, - "OAuthErrorResponse" - ) || OAuthErrorResponse.new - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Dropbox::Sign::OAuthErrorResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::OAuthErrorResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'error') - self.error = attributes[:'error'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if @error.nil? - invalid_properties.push('invalid value for "error", error cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @error.nil? - true - end - - # Custom attribute writer method with validation - # @param [Object] error Value to be assigned - def error=(error) - if error.nil? - fail ArgumentError, 'error cannot be nil' - end - - @error = error - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - error == o.error - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [error].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attribute_map = self.class.merged_attributes - - self.class.merged_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash(include_nil = true) - hash = {} - self.class.merged_attributes.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - next unless include_nil - is_nullable = self.class.merged_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value, include_nil) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value, include_nil = true) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v, include_nil) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v, include_nil) } - end - elsif value.respond_to? :to_hash - value.to_hash(include_nil) - else - value - end - end - end -end diff --git a/sdks/ruby/lib/dropbox-sign/models/o_auth_error_response_error.rb b/sdks/ruby/lib/dropbox-sign/models/o_auth_error_response_error.rb deleted file mode 100644 index 2eae449ac..000000000 --- a/sdks/ruby/lib/dropbox-sign/models/o_auth_error_response_error.rb +++ /dev/null @@ -1,318 +0,0 @@ -=begin -#Dropbox Sign API - -#Dropbox Sign v3 API - -The version of the OpenAPI document: 3.0.0 -Contact: apisupport@hellosign.com -Generated by: https://openapi-generator.tech -Generator version: 7.12.0 - -=end - -require 'date' -require 'time' - -module Dropbox -end - -module Dropbox::Sign - # _t__OAuthErrorResponseError::DESCRIPTION - class OAuthErrorResponseError - # _t__OAuthErrorResponseError::ERROR_MSG - # @return [String] - attr_accessor :error_msg - - # _t__OAuthErrorResponseError::ERROR_NAME - # @return [String] - attr_accessor :error_name - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'error_msg' => :'error_msg', - :'error_name' => :'error_name' - } - end - - # Returns attribute mapping this model knows about - def self.acceptable_attribute_map - attribute_map - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - acceptable_attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'error_msg' => :'String', - :'error_name' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Returns attribute map of this model + parent - def self.merged_attributes - self.attribute_map - end - - # Attribute type mapping of this model + parent - def self.merged_types - self.openapi_types - end - - # Returns list of attributes with nullable: true of this model + parent - def self.merged_nullable - self.openapi_nullable - end - - # Attempt to instantiate and hydrate a new instance of this class - # @param [Object] data Data to be converted - # @return [OAuthErrorResponseError] - def self.init(data) - ApiClient.default.convert_to_type( - data, - "OAuthErrorResponseError" - ) || OAuthErrorResponseError.new - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Dropbox::Sign::OAuthErrorResponseError` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - acceptable_attribute_map = self.class.acceptable_attribute_map - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.merged_attributes.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::OAuthErrorResponseError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'error_msg') - self.error_msg = attributes[:'error_msg'] - end - - if attributes.key?(:'error_name') - self.error_name = attributes[:'error_name'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if @error_msg.nil? - invalid_properties.push('invalid value for "error_msg", error_msg cannot be nil.') - end - - if @error_name.nil? - invalid_properties.push('invalid value for "error_name", error_name cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @error_msg.nil? - return false if @error_name.nil? - error_name_validator = EnumAttributeValidator.new('String', ["invalid_grant", "invalid_client", "invalid_request", "unauthorized_client", "unsupported_grant_type", "payment_required", "addon_required", "invalid_scope", "quota_reached", "server_error", "temporary_unavailable"]) - return false unless error_name_validator.valid?(@error_name) - true - end - - # Custom attribute writer method with validation - # @param [Object] error_msg Value to be assigned - def error_msg=(error_msg) - if error_msg.nil? - fail ArgumentError, 'error_msg cannot be nil' - end - - @error_msg = error_msg - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] error_name Object to be assigned - def error_name=(error_name) - validator = EnumAttributeValidator.new('String', ["invalid_grant", "invalid_client", "invalid_request", "unauthorized_client", "unsupported_grant_type", "payment_required", "addon_required", "invalid_scope", "quota_reached", "server_error", "temporary_unavailable"]) - unless validator.valid?(error_name) - fail ArgumentError, "invalid value for \"error_name\", must be one of #{validator.allowable_values}." - end - @error_name = error_name - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - error_msg == o.error_msg && - error_name == o.error_name - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [error_msg, error_name].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attribute_map = self.class.merged_attributes - - self.class.merged_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - klass = Dropbox::Sign.const_get(type) - klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash(include_nil = true) - hash = {} - self.class.merged_attributes.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - next unless include_nil - is_nullable = self.class.merged_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value, include_nil) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value, include_nil = true) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v, include_nil) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v, include_nil) } - end - elsif value.respond_to? :to_hash - value.to_hash(include_nil) - else - value - end - end - end -end