From b162269f70a90594962792ffaaa40d3a7ee9f4e4 Mon Sep 17 00:00:00 2001 From: Gil Gardosh Date: Wed, 17 Aug 2022 08:50:49 +0300 Subject: [PATCH] openAPI handler tests migration (#4235) * some tests * lowercase header fix * add missing Proxy fields * */* access header fix * cookies srtingify fix * test server fix * If additionalProperties is basically type: string, ignore (#4274) * more informative error message * Fix union handling (#4289) * Make arguments related to query params nullable if it is already defined in queryParams (#4290) * Error extensions and fix JSON scalars (#4292) * convert format uuid into UUID scalar * remove type args if provided by operationHeaders * fix for Query.getFields * Do not respect user's accept header if we have a better option (#4272) * Openapi multiple argument sources fix (#4311) * Add a changeset Co-authored-by: github-actions[bot] Co-authored-by: Arda TANRIKULU Co-authored-by: github-actions[bot] --- .changeset/bright-bags-care.md | 36 + .../json-schema-example.test.js.snap | 11 +- .../tests/__snapshots__/jira.test.js.snap | 1130 ++++-------- .../tests/__snapshots__/orbit.test.js.snap | 176 +- .../openapi/test/example_api_server.ts | 2 +- packages/json-machete/src/healJSONSchema.ts | 34 +- .../src/addExecutionLogicToComposer.ts | 75 +- .../src/getComposerFromJSONSchema.ts | 24 +- .../src/getTypeResolverFromOutputTCs.ts | 39 +- packages/loaders/openapi/package.json | 3 +- .../getJSONSchemaOptionsFromOpenAPIOptions.ts | 119 +- .../tests/__snapshots__/basket.test.ts.snap | 12 +- .../cloudfunction_expanded.test.ts.snap | 27 + .../__snapshots__/deduplication.test.ts.snap | 21 +- .../tests/__snapshots__/deepl.test.ts.snap | 279 +-- .../tests/__snapshots__/docusign.test.ts.snap | 81 +- .../__snapshots__/example_api.test.ts.snap | 21 +- .../example_api_combined.test.ts.snap | 14 +- .../tests/__snapshots__/toto.test.ts.snap | 71 +- .../tests/cloudfunction_expanded.test.ts | 33 + .../loaders/openapi/tests/example_api.test.ts | 1539 ++++++++++++++++- 21 files changed, 2492 insertions(+), 1255 deletions(-) create mode 100644 .changeset/bright-bags-care.md create mode 100644 packages/loaders/openapi/tests/__snapshots__/cloudfunction_expanded.test.ts.snap create mode 100644 packages/loaders/openapi/tests/cloudfunction_expanded.test.ts diff --git a/.changeset/bright-bags-care.md b/.changeset/bright-bags-care.md new file mode 100644 index 0000000000000..b0ba5930d348c --- /dev/null +++ b/.changeset/bright-bags-care.md @@ -0,0 +1,36 @@ +--- +"@graphql-mesh/openapi": minor +"@omnigraph/json-schema": minor +"@omnigraph/openapi": minor +--- + +- Support "$request.query" and "$request.path" usages in [OpenAPI runtime expressions](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#runtimeExpression) +- Fix `Field not found` error when an OpenAPI link refers to an operation which is not `Mutation` +- Do not use AJV and check field names in the received object to resolve the type name for a union field +- Fix `queryParams` which allows you to pass query parameters for all operations +- Handle cookie paramters correctly defined in the OpenAPI document by trimming empty values +- Respect the mime types defined in the OpenAPI document. Now it creates a union for each mime type defined in the document, and resolve it by the mime type. +- Respect JSON examples given in the OpenAPI document correctly even if they are strings with JSON content. +- Normalize(lowercase header names) and merge final operation headers correctly from different places `operationHeaders` from the bundle and configuration plus `headers` defined for that specific operation. + +**BREAKING CHANGES:** + +- If a JSON Schema type cannot be represented in GraphQL (object without properties etc.), it will no longer use `Any` type but `JSON` type instead which is a scalar from `graphql-scalars`. + +- Due to the improvements in `healJSONSchema` some of types that are not named in the JSON Schema might be named in a different way. Please make sure the content of the types are correct and report us on GitHub if they are represented incorrectly. + +- UUID format is now represented as `UUID` scalar type which is a scalar from `graphql-scalars`. + +- HTTP Errors are now in a more descriptive way. If your consumer respects them strictly, they will probably need to update their implementation. + +```diff +{ + "url": "http://www.google.com/api", + "method": "GET", +- "status": 401, ++ "statusCode": 401, ++ "statusText": "Unauthorized", +- "responseJson": {} ++ "responseBody": {} +} +``` diff --git a/examples/json-schema-example/tests/__snapshots__/json-schema-example.test.js.snap b/examples/json-schema-example/tests/__snapshots__/json-schema-example.test.js.snap index d4a9a4689b705..238cebe74e064 100644 --- a/examples/json-schema-example/tests/__snapshots__/json-schema-example.test.js.snap +++ b/examples/json-schema-example/tests/__snapshots__/json-schema-example.test.js.snap @@ -1,9 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`JSON Schema Example should generate correct schema 1`] = ` -"scalar Any - -\\"\\"\\"Fake Company\\"\\"\\" +"\\"\\"\\"Fake Company\\"\\"\\" type Company { employers: [User] name: String @@ -29,9 +27,14 @@ type Foo { id: String } +\\"\\"\\" +The \`JSON\` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). +\\"\\"\\" +scalar JSON @specifiedBy(url: \\"http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf\\") + type Mutation { createUser(input: CreateUpdateUserInput): User - deleteUser(id: ID!): Any + deleteUser(id: ID!): JSON updateUser(id: ID!, input: CreateUpdateUserInput): User } diff --git a/examples/openapi-jira/tests/__snapshots__/jira.test.js.snap b/examples/openapi-jira/tests/__snapshots__/jira.test.js.snap index 05dac134d243d..c0a956a0f56be 100644 --- a/examples/openapi-jira/tests/__snapshots__/jira.test.js.snap +++ b/examples/openapi-jira/tests/__snapshots__/jira.test.js.snap @@ -276,7 +276,7 @@ type Query { \\"Returns the value of a [project property](https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties).\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the property.\\" getProjectProperty(projectIdOrKey: String!, propertyKey: String!): EntityProperty \\"Returns a list of [project roles](https://confluence.atlassian.com/x/3odKLg) for the project returning the name and self URL for each role.\\\\n\\\\nNote that all project roles are shared with all projects in Jira Cloud. See [Get all project roles](#api-rest-api-3-role-get) for more information.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for any project on the site or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" - getProjectRoles(projectIdOrKey: String!): getProjectRoles_200_response + getProjectRoles(projectIdOrKey: String!): JSON \\"Returns a project role's details and actors associated with the project. The list of actors is sorted by display name.\\\\n\\\\nTo check whether a user belongs to a role based on their group memberships, use [Get user](#api-rest-api-3-user-get) with the \`groups\` expand parameter selected. Then check whether the user keys and groups match with the actors returned for the project.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" getProjectRole(input: getProjectRole_request_Input, projectIdOrKey: String!, id: Int!): ProjectRole \\"Returns all [project roles](https://confluence.atlassian.com/x/3odKLg) and the details for each role. Note that the list of project roles is common to all projects.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) or *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project.\\" @@ -474,15 +474,11 @@ enum query_getBanner_oneOf_0_visibility { type ErrorCollection { \\"The list of error messages produced by this operation. For example, \\\\\\"input parameter 'key' must be provided\\\\\\"\\" errorMessages: [String] - errors: query_getBanner_oneOf_1_errors + \\"The list of errors by parameter returned by the operation. For example,\\\\\\"projectKey\\\\\\": \\\\\\"Project keys must start with an uppercase letter, followed by one or more uppercase alphanumeric characters.\\\\\\"\\" + errors: JSON status: Int } -\\"The list of errors by parameter returned by the operation. For example,\\\\\\"projectKey\\\\\\": \\\\\\"Project keys must start with an uppercase letter, followed by one or more uppercase alphanumeric characters.\\\\\\"\\" -type query_getBanner_oneOf_1_errors { - additionalProperties: JSON -} - \\"The \`JSON\` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).\\" scalar JSON @specifiedBy(url: \\"http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf\\") @@ -516,18 +512,10 @@ type ContextualConfiguration { id: String! \\"The ID of the field context the configuration is associated with.\\" fieldContextId: String! - configuration: query_getCustomFieldConfiguration_values_items_configuration - schema: query_getCustomFieldConfiguration_values_items_schema -} - -\\"The field configuration.\\" -type query_getCustomFieldConfiguration_values_items_configuration { - additionalProperties: JSON -} - -\\"The field value schema.\\" -type query_getCustomFieldConfiguration_values_items_schema { - additionalProperties: JSON + \\"The field configuration.\\" + configuration: JSON + \\"The field value schema.\\" + schema: JSON } input getCustomFieldConfiguration_request_Input { @@ -659,7 +647,8 @@ type AttachmentMetadata { size: BigInt \\"The MIME type of the attachment.\\" mimeType: String - properties: query_getAttachment + \\"Additional properties of the attachment.\\" + properties: JSON \\"The URL of the attachment.\\" content: String \\"The URL of a thumbnail representing the attachment.\\" @@ -729,11 +718,6 @@ scalar ListWrapperCallbackGroupName \\"A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the \`date-time\` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.\\" scalar DateTime -\\"Additional properties of the attachment.\\" -type query_getAttachment { - additionalProperties: JSON -} - \\"Metadata for an archive (for example a zip) and its contents.\\" type AttachmentArchiveMetadataReadable { \\"The ID of the attachment.\\" @@ -871,12 +855,8 @@ type Avatar { isDeletable: Boolean \\"The file name of the avatar icon. Returned for system avatars.\\" fileName: String - urls: query_getAllSystemAvatars_system_items_urls - additionalProperties: JSON -} - -\\"The list of avatar icon URLs.\\" -type query_getAllSystemAvatars_system_items_urls { + \\"The list of avatar icon URLs.\\" + urls: JSON additionalProperties: JSON } @@ -898,12 +878,8 @@ type PropertyKey { type EntityProperty { \\"The key of the property. Required on create and update.\\" key: String - value: query_getCommentProperty_value -} - -\\"The value of the property. Required on create and update.\\" -type query_getCommentProperty_value { - additionalProperties: JSON + \\"The value of the property. Required on create and update.\\" + value: JSON } \\"Details about a project component.\\" @@ -1136,7 +1112,8 @@ type Project { versions: [Version] \\"The name of the project.\\" name: String - roles: query_getAllDashboards_oneOf_0_dashboards_items_sharePermissions_items_project_roles + \\"The name and self URL for each role defined in the project. For more information, see [Create project role](#api-rest-api-3-role-post).\\" + roles: JSON avatarUrls: AvatarUrlsBean projectCategory: UpdatedProjectCategory projectTypeKey: query_getAllDashboards_oneOf_0_dashboards_items_sharePermissions_items_project_issueTypes_items_scope_project_projectTypeKey @@ -1149,9 +1126,10 @@ type Project { isPrivate: Boolean issueTypeHierarchy: Hierarchy permissions: ProjectPermissions - properties: query_getAllDashboards_oneOf_0_dashboards_items_sharePermissions_items_project + \\"Map of project properties\\" + properties: JSON \\"Unique ID for next-gen projects.\\" - uuid: String + uuid: UUID insight: ProjectInsight \\"Whether the project is marked as deleted.\\" deleted: Boolean @@ -1185,12 +1163,15 @@ type IssueTypeDetails { \\"The ID of the issue type's avatar.\\" avatarId: BigInt \\"Unique ID for next-gen projects.\\" - entityId: String + entityId: UUID \\"Hierarchy level of the issue type.\\" hierarchyLevel: Int scope: Scope } +\\"A field whose value is a generic Universally Unique Identifier: https://en.wikipedia.org/wiki/Universally_unique_identifier.\\" +scalar UUID + \\"The projects the item is associated with. Indicated for items associated with [next-gen projects](https://confluence.atlassian.com/x/loMyO).\\" type Scope { type: query_getAllDashboards_oneOf_0_dashboards_items_sharePermissions_items_project_issueTypes_items_scope_type @@ -1310,11 +1291,6 @@ type VersionIssuesStatus { additionalProperties: JSON } -\\"The name and self URL for each role defined in the project. For more information, see [Create project role](#api-rest-api-3-role-post).\\" -type query_getAllDashboards_oneOf_0_dashboards_items_sharePermissions_items_project_roles { - additionalProperties: JSON -} - \\"The type of the project.\\" enum query_getAllDashboards_oneOf_0_dashboards_items_sharePermissions_items_project_style { classic @@ -1345,7 +1321,7 @@ type SimplifiedHierarchyLevel { \\"The issue types available in this hierarchy level.\\" issueTypeIds: [BigInt] \\"The external UUID of the hierarchy level. This property is deprecated, see [Change notice: Removing hierarchy level IDs from next-gen APIs](https://developer.atlassian.com/cloud/jira/platform/change-notice-removing-hierarchy-level-ids-from-next-gen-apis/).\\" - externalUuid: String + externalUuid: UUID globalHierarchyLevel: query_getAllDashboards_oneOf_0_dashboards_items_sharePermissions_items_project_issueTypeHierarchy_levels_items_globalHierarchyLevel } @@ -1361,11 +1337,6 @@ type ProjectPermissions { canEdit: Boolean } -\\"Map of project properties\\" -type query_getAllDashboards_oneOf_0_dashboards_items_sharePermissions_items_project { - additionalProperties: JSON -} - \\"Additional details about a project.\\" type ProjectInsight { \\"Total issue count.\\" @@ -1378,7 +1349,7 @@ type ProjectLandingPageInfo { url: String projectKey: String projectType: String - attributes: query_getAllDashboards_oneOf_0_dashboards_items_sharePermissions_items_project_landingPageInfo_attributes + attributes: JSON simplified: Boolean queueCategory: String boardName: String @@ -1388,10 +1359,6 @@ type ProjectLandingPageInfo { queueName: String } -type query_getAllDashboards_oneOf_0_dashboards_items_sharePermissions_items_project_landingPageInfo_attributes { - additionalProperties: JSON -} - \\"Details about the roles in a project.\\" type ProjectRole { \\"The URL the project role details.\\" @@ -1442,6 +1409,7 @@ enum query_getAllDashboards_oneOf_0_dashboards_items_sharePermissions_items_role type ProjectRoleUser { \\"The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. Returns *unknown* if the record is deleted and corrupted, for example, as the result of a server import.\\" accountId: query_getAllDashboards_oneOf_0_dashboards_items_sharePermissions_items_role_actors_items_actorUser_accountId + additionalProperties: JSON } \\"The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. Returns *unknown* if the record is deleted and corrupted, for example, as the result of a server import.\\" @@ -1455,6 +1423,7 @@ type ProjectRoleGroup { name: String \\"The ID of the group.\\" groupId: String + additionalProperties: JSON } input getAllDashboards_request_Input { @@ -1657,12 +1626,8 @@ type JsonTypeBean { custom: String \\"If the field is a custom field, the custom ID of the field.\\" customId: BigInt - configuration: query_getFields_items_schema_configuration -} - -\\"If the field is a custom field, the configuration of the field.\\" -type query_getFields_items_schema_configuration { - additionalProperties: JSON + \\"If the field is a custom field, the configuration of the field.\\" + configuration: JSON } union getFieldsPaginated_response = PageBeanField | ErrorCollection @@ -1822,18 +1787,14 @@ type CustomFieldContext { type getContextsForField_403_response { errorMessages: [String] - errors: query_getContextsForField_oneOf_1_errors + errors: JSON } -scalar query_getContextsForField_oneOf_1_errors - type getContextsForField_404_response { errorMessages: [String] - errors: query_getContextsForField_oneOf_2_errors + errors: JSON } -scalar query_getContextsForField_oneOf_2_errors - input getContextsForField_request_Input { \\"Whether to return contexts that apply to all issue types.\\" isAnyIssueType: Boolean @@ -2105,18 +2066,14 @@ type CustomFieldContextDefaultValueForgeMultiUserField { type getDefaultValues_403_response { errorMessages: [String] - errors: query_getDefaultValues_oneOf_1_errors + errors: JSON } -scalar query_getDefaultValues_oneOf_1_errors - type getDefaultValues_404_response { errorMessages: [String] - errors: query_getDefaultValues_oneOf_2_errors + errors: JSON } -scalar query_getDefaultValues_oneOf_2_errors - input getDefaultValues_request_Input { \\"The IDs of the contexts.\\" contextId: [BigInt] @@ -2158,11 +2115,9 @@ type IssueTypeToContextMapping { type getIssueTypeMappingsForContexts_403_response { errorMessages: [String] - errors: query_getIssueTypeMappingsForContexts_oneOf_1_errors + errors: JSON } -scalar query_getIssueTypeMappingsForContexts_oneOf_1_errors - input getIssueTypeMappingsForContexts_request_Input { \\"The ID of the context. To include multiple contexts, provide an ampersand-separated list. For example, \`contextId=10001&contextId=10002\`.\\" contextId: [BigInt] @@ -2204,18 +2159,14 @@ type CustomFieldContextProjectMapping { type getProjectContextMapping_403_response { errorMessages: [String] - errors: query_getProjectContextMapping_oneOf_1_errors + errors: JSON } -scalar query_getProjectContextMapping_oneOf_1_errors - type getProjectContextMapping_404_response { errorMessages: [String] - errors: query_getProjectContextMapping_oneOf_2_errors + errors: JSON } -scalar query_getProjectContextMapping_oneOf_2_errors - input getProjectContextMapping_request_Input { \\"The list of context IDs. To include multiple context, separate IDs with ampersand: \`contextId=10000&contextId=10001\`.\\" contextId: [BigInt] @@ -2259,25 +2210,19 @@ type CustomFieldContextOption { type getOptionsForContext_400_response { errorMessages: [String] - errors: query_getOptionsForContext_oneOf_1_errors + errors: JSON } -scalar query_getOptionsForContext_oneOf_1_errors - type getOptionsForContext_403_response { errorMessages: [String] - errors: query_getOptionsForContext_oneOf_2_errors + errors: JSON } -scalar query_getOptionsForContext_oneOf_2_errors - type getOptionsForContext_404_response { errorMessages: [String] - errors: query_getOptionsForContext_oneOf_3_errors + errors: JSON } -scalar query_getOptionsForContext_oneOf_3_errors - input getOptionsForContext_request_Input { \\"The ID of the option.\\" optionId: BigInt @@ -2394,15 +2339,11 @@ type IssueFieldOption { id: BigInt! \\"The option's name, which is displayed in Jira.\\" value: String! - properties: query_getAllIssueFieldOptions_values_items + \\"The properties of the object, as arbitrary key-value pairs. These properties can be searched using JQL, if the extractions (see [Issue Field Option Property Index](https://developer.atlassian.com/cloud/jira/platform/modules/issue-field-option-property-index/)) are defined in the descriptor for the issue field module.\\" + properties: JSON config: IssueFieldOptionConfiguration } -\\"The properties of the object, as arbitrary key-value pairs. These properties can be searched using JQL, if the extractions (see [Issue Field Option Property Index](https://developer.atlassian.com/cloud/jira/platform/modules/issue-field-option-property-index/)) are defined in the descriptor for the issue field module.\\" -type query_getAllIssueFieldOptions_values_items { - additionalProperties: JSON -} - \\"Details of the projects the option is available in.\\" type IssueFieldOptionConfiguration { scope: IssueFieldOptionScopeBean @@ -2942,11 +2883,9 @@ type GroupDetails { type bulkGetGroups_403_response { errorMessages: [String] - errors: query_bulkGetGroups_oneOf_1_errors + errors: JSON } -scalar query_bulkGetGroups_oneOf_1_errors - input bulkGetGroups_request_Input { \\"The index of the first item to return in a page of results (page offset).\\" startAt: BigInt @@ -3178,7 +3117,7 @@ type IssueTypeIssueCreateMetadata { \\"The ID of the issue type's avatar.\\" avatarId: BigInt \\"Unique ID for next-gen projects.\\" - entityId: String + entityId: UUID \\"Hierarchy level of the issue type.\\" hierarchyLevel: Int scope: Scope @@ -3203,22 +3142,11 @@ type FieldMetadata { \\"The list of operations that can be performed on the field.\\" operations: [String]! \\"The list of values allowed in the field.\\" - allowedValues: [query_getCreateIssueMeta_projects_items_issuetypes_items_fields_additionalProperties_allowedValues_items] - defaultValue: query_getCreateIssueMeta_projects_items_issuetypes_items_fields_additionalProperties_defaultValue - configuration: query_getCreateIssueMeta_projects_items_issuetypes_items_fields_additionalProperties_allowedValues_items2 -} - -type query_getCreateIssueMeta_projects_items_issuetypes_items_fields_additionalProperties_allowedValues_items { - additionalProperties: JSON -} - -\\"The default value of the field.\\" -type query_getCreateIssueMeta_projects_items_issuetypes_items_fields_additionalProperties_defaultValue { - additionalProperties: JSON -} - -type query_getCreateIssueMeta_projects_items_issuetypes_items_fields_additionalProperties_allowedValues_items2 { - additionalProperties: JSON + allowedValues: [JSON] + \\"The default value of the field.\\" + defaultValue: JSON + \\"The configuration properties.\\" + configuration: JSON } input getCreateIssueMeta_request_Input { @@ -3295,31 +3223,22 @@ type IssueBean { self: URL \\"The key of the issue.\\" key: String - renderedFields: query_getCreateIssueMeta_projects_items_issuetypes_items_fields_additionalProperties_allowedValues_items3 - properties: query_getCreateIssueMeta_projects_items_issuetypes_items_fields_additionalProperties_allowedValues_items4 - names: query_getIssue_names + \\"The rendered value of each field present on the issue.\\" + renderedFields: JSON + \\"Details of the issue properties identified in the request.\\" + properties: JSON + \\"The ID and name of each field present on the issue.\\" + names: JSON schema: JsonTypeBean2 \\"The transitions that can be performed on the issue.\\" transitions: [IssueTransition] operations: Operations editmeta: IssueUpdateMetadata changelog: PageOfChangelogs - versionedRepresentations: query_getCreateIssueMeta_projects_items_issuetypes_items_fields_additionalProperties_allowedValues_items5 + \\"The versions of each field on the issue.\\" + versionedRepresentations: JSON fieldsToInclude: IncludedFields - fields: query_getIssue_fields -} - -type query_getCreateIssueMeta_projects_items_issuetypes_items_fields_additionalProperties_allowedValues_items3 { - additionalProperties: JSON -} - -type query_getCreateIssueMeta_projects_items_issuetypes_items_fields_additionalProperties_allowedValues_items4 { - additionalProperties: JSON -} - -\\"The ID and name of each field present on the issue.\\" -type query_getIssue_names { - additionalProperties: JSON + fields: JSON } \\"The schema of a field.\\" @@ -3334,7 +3253,8 @@ type JsonTypeBean2 { custom: String \\"If the field is a custom field, the custom ID of the field.\\" customId: BigInt - configuration: query_getFields_items_schema_configuration + \\"If the field is a custom field, the configuration of the field.\\" + configuration: JSON } \\"Details of an issue transition.\\" @@ -3408,9 +3328,11 @@ type FieldMetadata2 { \\"The list of operations that can be performed on the field.\\" operations: [String]! \\"The list of values allowed in the field.\\" - allowedValues: [query_getCreateIssueMeta_projects_items_issuetypes_items_fields_additionalProperties_allowedValues_items] - defaultValue: query_getCreateIssueMeta_projects_items_issuetypes_items_fields_additionalProperties_defaultValue - configuration: query_getCreateIssueMeta_projects_items_issuetypes_items_fields_additionalProperties_allowedValues_items2 + allowedValues: [JSON] + \\"The default value of the field.\\" + defaultValue: JSON + \\"The configuration properties.\\" + configuration: JSON } \\"Details of the operations that can be performed on the issue.\\" @@ -3451,9 +3373,11 @@ type FieldMetadata3 { \\"The list of operations that can be performed on the field.\\" operations: [String]! \\"The list of values allowed in the field.\\" - allowedValues: [query_getCreateIssueMeta_projects_items_issuetypes_items_fields_additionalProperties_allowedValues_items] - defaultValue: query_getCreateIssueMeta_projects_items_issuetypes_items_fields_additionalProperties_defaultValue - configuration: query_getCreateIssueMeta_projects_items_issuetypes_items_fields_additionalProperties_allowedValues_items2 + allowedValues: [JSON] + \\"The default value of the field.\\" + defaultValue: JSON + \\"The configuration properties.\\" + configuration: JSON } \\"A page of changelogs.\\" @@ -3517,7 +3441,8 @@ type HistoryMetadata { actor: HistoryMetadataParticipant generator: HistoryMetadataParticipant cause: HistoryMetadataParticipant - extraData: query_getIssue_changelog_histories_items_historyMetadata_extraData + \\"Additional arbitrary information about the history record.\\" + extraData: JSON additionalProperties: JSON } @@ -3538,25 +3463,12 @@ type HistoryMetadataParticipant { additionalProperties: JSON } -\\"Additional arbitrary information about the history record.\\" -type query_getIssue_changelog_histories_items_historyMetadata_extraData { - additionalProperties: JSON -} - -type query_getCreateIssueMeta_projects_items_issuetypes_items_fields_additionalProperties_allowedValues_items5 { - additionalProperties: JSON -} - type IncludedFields { excluded: [String] included: [String] actuallyIncluded: [String] } -type query_getIssue_fields { - additionalProperties: JSON -} - input getIssue_request_Input { \\"A list of fields to return for the issue. This parameter accepts a comma-separated list. Use it to retrieve a subset of fields. Allowed values:\\\\n\\\\n * \`*all\` Returns all fields.\\\\n * \`*navigable\` Returns navigable fields.\\\\n * Any issue field, prefixed with a minus to exclude.\\\\n\\\\nExamples:\\\\n\\\\n * \`summary,comment\` Returns only the summary and comments fields.\\\\n * \`-description\` Returns all (default) fields except description.\\\\n * \`*navigable,-comment\` Returns all navigable fields except comment.\\\\n\\\\nThis parameter may be specified multiple times. For example, \`fields=field1,field2& fields=field3\`.\\\\n\\\\nNote: All fields are returned by default. This differs from [Search for issues using JQL (GET)](#api-rest-api-3-search-get) and [Search for issues using JQL (POST)](#api-rest-api-3-search-post) where the default is all navigable fields.\\" fields: [String] @@ -3615,7 +3527,8 @@ type Comment { \\"The ID of the comment.\\" id: String author: UserDetails - body: query_getComments_comments_items_body + \\"The comment text in [Atlassian Document Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/).\\" + body: JSON \\"The rendered version of the comment.\\" renderedBody: String updateAuthor: UserDetails @@ -3633,11 +3546,6 @@ type Comment { additionalProperties: JSON } -\\"The comment text in [Atlassian Document Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/).\\" -type query_getComments_comments_items_body { - additionalProperties: JSON -} - \\"The group or role to which this item is visible.\\" type Visibility { type: query_getComments_comments_items_visibility_type @@ -3807,7 +3715,8 @@ type Worklog { self: URL author: UserDetails updateAuthor: UserDetails - comment: query_getIssueWorklog_worklogs_items_comment + \\"A comment about the worklog in [Atlassian Document Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/). Optional when creating or updating a worklog.\\" + comment: JSON \\"The datetime on which the worklog was created.\\" created: DateTime \\"The datetime on which the worklog was last updated.\\" @@ -3828,11 +3737,6 @@ type Worklog { additionalProperties: JSON } -\\"A comment about the worklog in [Atlassian Document Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/). Optional when creating or updating a worklog.\\" -type query_getIssueWorklog_worklogs_items_comment { - additionalProperties: JSON -} - input getIssueWorklog_request_Input { \\"The index of the first item to return in a page of results (page offset).\\" startAt: BigInt @@ -4901,10 +4805,6 @@ enum query_getFeaturesForProject_features_items_state { COMING_SOON } -type getProjectRoles_200_response { - additionalProperties: JSON -} - input getProjectRole_request_Input { \\"Exclude inactive users.\\" excludeInactiveUsers: Boolean @@ -5026,7 +4926,7 @@ type ProjectIssueTypeHierarchy { \\"Details of an issue type hierarchy level.\\" type ProjectIssueTypesHierarchyLevel { \\"The ID of the issue type hierarchy level. This property is deprecated, see [Change notice: Removing hierarchy level IDs from next-gen APIs](https://developer.atlassian.com/cloud/jira/platform/change-notice-removing-hierarchy-level-ids-from-next-gen-apis/).\\" - entityId: String + entityId: UUID \\"The level of the issue type hierarchy level.\\" level: Int \\"The name of the issue type hierarchy level.\\" @@ -5242,15 +5142,11 @@ type SearchResults { issues: [IssueBean] \\"Any warnings related to the JQL query.\\" warningMessages: [String] - names: query_searchForIssuesUsingJql_names + \\"The ID and name of each field in the search results.\\" + names: JSON schema: JsonTypeBean3 } -\\"The ID and name of each field in the search results.\\" -type query_searchForIssuesUsingJql_names { - additionalProperties: JSON -} - \\"The schema of a field.\\" type JsonTypeBean3 { \\"The data type of the field.\\" @@ -5263,7 +5159,8 @@ type JsonTypeBean3 { custom: String \\"If the field is a custom field, the custom ID of the field.\\" customId: BigInt - configuration: query_getFields_items_schema_configuration + \\"If the field is a custom field, the configuration of the field.\\" + configuration: JSON } input searchForIssuesUsingJql_request_Input { @@ -5426,7 +5323,8 @@ type TaskProgressBeanObject { status: query_getTask_status! \\"Information about the progress of the task.\\" message: String - result: query_getTask_result + \\"The result of the task execution.\\" + result: JSON \\"The ID of the user who submitted the task.\\" submittedBy: BigInt! \\"The progress of the task, as a percentage complete.\\" @@ -5454,11 +5352,6 @@ enum query_getTask_status { DEAD } -\\"The result of the task execution.\\" -type query_getTask_result { - additionalProperties: JSON -} - \\"A page of items.\\" type PageBeanUiModificationDetails { \\"The URL of the page.\\" @@ -6051,6 +5944,7 @@ type WorkflowTransition { id: Int! \\"The transition name.\\" name: String! + additionalProperties: JSON } input getWorkflowTransitionRuleConfigurations_request_Input { @@ -6149,7 +6043,8 @@ type Transition { type: query_getWorkflowsPaginated_oneOf_0_values_items_transitions_items_type! screen: TransitionScreenDetails rules: WorkflowRules - properties: query_getWorkflowsPaginated_oneOf_0_values_items_transitions_items_additionalProperties + \\"The properties of the transition.\\" + properties: JSON } \\"The type of the transition.\\" @@ -6208,17 +6103,8 @@ enum query_getWorkflowsPaginated_oneOf_0_values_items_transitions_items_rules_co type WorkflowTransitionRule { \\"The type of the transition rule.\\" type: String! - configuration: query_getWorkflowsPaginated_oneOf_0_values_items_transitions_items_rules_validators_items_configuration -} - -\\"EXPERIMENTAL. The configuration of the transition rule.\\" -type query_getWorkflowsPaginated_oneOf_0_values_items_transitions_items_rules_validators_items_configuration { - additionalProperties: JSON -} - -\\"The properties of the transition.\\" -type query_getWorkflowsPaginated_oneOf_0_values_items_transitions_items_additionalProperties { - additionalProperties: JSON + \\"EXPERIMENTAL. The configuration of the transition rule.\\" + configuration: JSON } \\"Details of a workflow status.\\" @@ -6227,12 +6113,8 @@ type WorkflowStatus { id: String! \\"The name of the status in the workflow.\\" name: String! - properties: query_getWorkflowsPaginated_oneOf_0_values_items_statuses_items_additionalProperties -} - -\\"Additional properties that modify the behavior of issues in this status. Supports the properties jira.issue.editable and issueEditable (deprecated) that indicate whether issues are editable.\\" -type query_getWorkflowsPaginated_oneOf_0_values_items_statuses_items_additionalProperties { - additionalProperties: JSON + \\"Additional properties that modify the behavior of issues in this status. Supports the properties \`jira.issue.editable\` and \`issueEditable\` (deprecated) that indicate whether issues are editable.\\" + properties: JSON } \\"The ID and the name of the workflow scheme.\\" @@ -6335,10 +6217,12 @@ type WorkflowScheme { description: String \\"The name of the default workflow for the workflow scheme. The default workflow has *All Unassigned Issue Types* assigned to it in Jira. If \`defaultWorkflow\` is not specified when creating a workflow scheme, it is set to *Jira Workflow (jira)*.\\" defaultWorkflow: String - issueTypeMappings: query_getAllWorkflowSchemes_values_items_issueTypeMappings + \\"The issue type to workflow mappings, where each mapping is an issue type ID and workflow name pair. Note that an issue type can only be mapped to one workflow in a workflow scheme.\\" + issueTypeMappings: JSON \\"For draft workflow schemes, this property is the name of the default workflow for the original workflow scheme. The default workflow has *All Unassigned Issue Types* assigned to it in Jira.\\" originalDefaultWorkflow: String - originalIssueTypeMappings: query_getAllWorkflowSchemes_values_items_originalIssueTypeMappings + \\"For draft workflow schemes, this property is the issue type to workflow mappings for the original workflow scheme, where each mapping is an issue type ID and workflow name pair. Note that an issue type can only be mapped to one workflow in a workflow scheme.\\" + originalIssueTypeMappings: JSON \\"Whether the workflow scheme is a draft or not.\\" draft: Boolean lastModifiedUser: User @@ -6350,16 +6234,6 @@ type WorkflowScheme { issueTypes: IssueTypeDetails2 } -\\"The issue type to workflow mappings, where each mapping is an issue type ID and workflow name pair. Note that an issue type can only be mapped to one workflow in a workflow scheme.\\" -type query_getAllWorkflowSchemes_values_items_issueTypeMappings { - additionalProperties: JSON -} - -\\"For draft workflow schemes, this property is the issue type to workflow mappings for the original workflow scheme, where each mapping is an issue type ID and workflow name pair. Note that an issue type can only be mapped to one workflow in a workflow scheme.\\" -type query_getAllWorkflowSchemes_values_items_originalIssueTypeMappings { - additionalProperties: JSON -} - \\"Details about an issue type.\\" type IssueTypeDetails2 { \\"The URL of these issue type details.\\" @@ -6377,7 +6251,7 @@ type IssueTypeDetails2 { \\"The ID of the issue type's avatar.\\" avatarId: BigInt \\"Unique ID for next-gen projects.\\" - entityId: String + entityId: UUID \\"Hierarchy level of the issue type.\\" hierarchyLevel: Int scope: Scope @@ -6409,11 +6283,9 @@ type query_getWorkflowSchemeProjectAssociations_oneOf_1_errors { type getWorkflowSchemeProjectAssociations_403_response { errorMessages: [String] - errors: query_getWorkflowSchemeProjectAssociations_oneOf_2_errors + errors: JSON } -scalar query_getWorkflowSchemeProjectAssociations_oneOf_2_errors - input getWorkflowSchemeProjectAssociations_request_Input { \\"The ID of a project to return the workflow schemes for. To include multiple projects, provide an ampersand-Jim: oneseparated list. For example, \`projectId=10000&projectId=10001\`.\\" projectId: [BigInt]! @@ -6533,23 +6405,27 @@ type ConnectModules { \\"A [Connect module](https://developer.atlassian.com/cloud/jira/platform/about-jira-modules/) in the same format as in the\\\\n[app descriptor](https://developer.atlassian.com/cloud/jira/platform/app-descriptor/).\\" type ConnectModule { - description: description + description: query_DynamicModulesResource_getModules_get_oneOf_0_modules_items_description type: String - extractions: [extractions_items] - name: description + extractions: [query_DynamicModulesResource_getModules_get_oneOf_0_modules_items_extractions_items] + name: query_DynamicModulesResource_getModules_get_oneOf_0_modules_items_name key: String } -type description { +type query_DynamicModulesResource_getModules_get_oneOf_0_modules_items_description { value: String } -type extractions_items { +type query_DynamicModulesResource_getModules_get_oneOf_0_modules_items_extractions_items { path: String type: String name: String } +type query_DynamicModulesResource_getModules_get_oneOf_0_modules_items_name { + value: String +} + type ErrorMessage { \\"The error message.\\" message: String! @@ -6559,11 +6435,11 @@ type Mutation { \\"Updates the announcement banner configuration.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" setBanner(input: AnnouncementBannerConfigurationUpdate_Input): setBanner_response \\"Updates the value of one or more custom fields on one or more issues. Combinations of custom field and issue should be unique within the request. Custom fields can only be updated by the Forge app that created them.\\\\n\\\\n**[Permissions](#permissions) required:** Only the app that created the custom field can update its values with this operation.\\" - updateMultipleCustomFieldValues(input: MultipleCustomFieldValuesUpdateDetails_Input, generateChangelog: Boolean): Any + updateMultipleCustomFieldValues(input: MultipleCustomFieldValuesUpdateDetails_Input, generateChangelog: Boolean): JSON \\"Update the configuration for contexts of a custom field created by a [Forge app](https://developer.atlassian.com/platform/forge/).\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the Forge app that created the custom field.\\" - updateCustomFieldConfiguration(input: CustomFieldConfigurations_Input!, fieldIdOrKey: String!): Any + updateCustomFieldConfiguration(input: CustomFieldConfigurations_Input!, fieldIdOrKey: String!): JSON \\"Updates the value of a custom field on one or more issues. Custom fields can only be updated by the Forge app that created them.\\\\n\\\\n**[Permissions](#permissions) required:** Only the app that created the custom field can update its values with this operation.\\" - updateCustomFieldValue(input: CustomFieldValueUpdateDetails_Input, fieldIdOrKey: String!, generateChangelog: Boolean): Any + updateCustomFieldValue(input: CustomFieldValueUpdateDetails_Input, fieldIdOrKey: String!, generateChangelog: Boolean): JSON \\"Changes the value of an application property. For example, you can change the value of the \`jira.clone.prefix\` from its default value of *CLONE -* to *Clone -* if you prefer sentence case capitalization. Editable properties are described below along with their default values.\\\\n\\\\n#### Advanced settings ####\\\\n\\\\nThe advanced settings below are also accessible in [Jira](https://confluence.atlassian.com/x/vYXKM).\\\\n\\\\n| Key | Description | Default value | \\\\n| -- | -- | -- | \\\\n| \`jira.clone.prefix\` | The string of text prefixed to the title of a cloned issue. | \`CLONE -\` | \\\\n| \`jira.date.picker.java.format\` | The date format for the Java (server-side) generated dates. This must be the same as the \`jira.date.picker.javascript.format\` format setting. | \`d/MMM/yy\` | \\\\n| \`jira.date.picker.javascript.format\` | The date format for the JavaScript (client-side) generated dates. This must be the same as the \`jira.date.picker.java.format\` format setting. | \`%e/%b/%y\` | \\\\n| \`jira.date.time.picker.java.format\` | The date format for the Java (server-side) generated date times. This must be the same as the \`jira.date.time.picker.javascript.format\` format setting. | \`dd/MMM/yy h:mm a\` | \\\\n| \`jira.date.time.picker.javascript.format\` | The date format for the JavaScript (client-side) generated date times. This must be the same as the \`jira.date.time.picker.java.format\` format setting. | \`%e/%b/%y %I:%M %p\` | \\\\n| \`jira.issue.actions.order\` | The default order of actions (such as *Comments* or *Change history*) displayed on the issue view. | \`asc\` | \\\\n| \`jira.table.cols.subtasks\` | The columns to show while viewing subtask issues in a table. For example, a list of subtasks on an issue. | \`issuetype, status, assignee, progress\` | \\\\n| \`jira.view.issue.links.sort.order\` | The sort order of the list of issue links on the issue view. | \`type, status, priority\` | \\\\n| \`jira.comment.collapsing.minimum.hidden\` | The minimum number of comments required for comment collapsing to occur. A value of \`0\` disables comment collapsing. | \`4\` | \\\\n| \`jira.newsletter.tip.delay.days\` | The number of days before a prompt to sign up to the Jira Insiders newsletter is shown. A value of \`-1\` disables this feature. | \`7\` | \\\\n\\\\n\\\\n#### Look and feel ####\\\\n\\\\nThe settings listed below adjust the [look and feel](https://confluence.atlassian.com/x/VwCLLg).\\\\n\\\\n| Key | Description | Default value | \\\\n| -- | -- | -- | \\\\n| \`jira.lf.date.time\` | The [ time format](https://docs.oracle.com/javase/6/docs/api/index.html?java/text/SimpleDateFormat.html). | \`h:mm a\` | \\\\n| \`jira.lf.date.day\` | The [ day format](https://docs.oracle.com/javase/6/docs/api/index.html?java/text/SimpleDateFormat.html). | \`EEEE h:mm a\` | \\\\n| \`jira.lf.date.complete\` | The [ date and time format](https://docs.oracle.com/javase/6/docs/api/index.html?java/text/SimpleDateFormat.html). | \`dd/MMM/yy h:mm a\` | \\\\n| \`jira.lf.date.dmy\` | The [ date format](https://docs.oracle.com/javase/6/docs/api/index.html?java/text/SimpleDateFormat.html). | \`dd/MMM/yy\` | \\\\n| \`jira.date.time.picker.use.iso8061\` | When enabled, sets Monday as the first day of the week in the date picker, as specified by the ISO8601 standard. | \`false\` | \\\\n| \`jira.lf.logo.url\` | The URL of the logo image file. | \`/images/icon-jira-logo.png\` | \\\\n| \`jira.lf.logo.show.application.title\` | Controls the visibility of the application title on the sidebar. | \`false\` | \\\\n| \`jira.lf.favicon.url\` | The URL of the favicon. | \`/favicon.ico\` | \\\\n| \`jira.lf.favicon.hires.url\` | The URL of the high-resolution favicon. | \`/images/64jira.png\` | \\\\n| \`jira.lf.navigation.bgcolour\` | The background color of the sidebar. | \`#0747A6\` | \\\\n| \`jira.lf.navigation.highlightcolour\` | The color of the text and logo of the sidebar. | \`#DEEBFF\` | \\\\n| \`jira.lf.hero.button.base.bg.colour\` | The background color of the hero button. | \`#3b7fc4\` | \\\\n| \`jira.title\` | The text for the application title. The application title can also be set in *General settings*. | \`Jira\` | \\\\n| \`jira.option.globalsharing\` | Whether filters and dashboards can be shared with anyone signed into Jira. | \`true\` | \\\\n| \`xflow.product.suggestions.enabled\` | Whether to expose product suggestions for other Atlassian products within Jira. | \`true\` | \\\\n\\\\n\\\\n#### Other settings ####\\\\n\\\\n| Key | Description | Default value | \\\\n| -- | -- | -- | \\\\n| \`jira.issuenav.criteria.autoupdate\` | Whether instant updates to search criteria is active. | \`true\` | \\\\n\\\\n\\\\n*Note: Be careful when changing [application properties and advanced settings](https://confluence.atlassian.com/x/vYXKM).*\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" setApplicationProperty(input: SimpleApplicationPropertyBean_Input, id: String!): ApplicationProperty \\"Deletes an attachment from an issue.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:** For the project holding the issue containing the attachment:\\\\n\\\\n * *Delete own attachments* [project permission](https://confluence.atlassian.com/x/yodKLg) to delete an attachment created by the calling user.\\\\n * *Delete all attachments* [project permission](https://confluence.atlassian.com/x/yodKLg) to delete an attachment created by any user.\\" @@ -6571,7 +6447,7 @@ type Mutation { \\"Returns a [paginated](#pagination) list of comments specified by a list of comment IDs.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:** Comments are returned where the user:\\\\n\\\\n * has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the comment.\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.\\\\n * If the comment has visibility restrictions, belongs to the group or has the role visibility is restricted to.\\" getCommentsByIds(input: IssueCommentListRequestBean_Input!, expand: String): PageBeanComment \\"Creates or updates the value of a property for a comment. Use this resource to store custom data against a comment.\\\\n\\\\nThe value of the request body must be a [valid](http://tools.ietf.org/html/rfc4627), non-empty JSON blob. The maximum length is 32768 characters.\\\\n\\\\n**[Permissions](#permissions) required:** either of:\\\\n\\\\n * *Edit All Comments* [project permission](https://confluence.atlassian.com/x/yodKLg) to create or update the value of a property on any comment.\\\\n * *Edit Own Comments* [project permission](https://confluence.atlassian.com/x/yodKLg) to create or update the value of a property on a comment created by the user.\\\\n\\\\nAlso, when the visibility of a comment is restricted to a role or group the user must be a member of that role or group.\\" - setCommentProperty(commentId: String!, propertyKey: String!): Any + setCommentProperty(commentId: String!, propertyKey: String!): JSON \\"Deletes a comment property.\\\\n\\\\n**[Permissions](#permissions) required:** either of:\\\\n\\\\n * *Edit All Comments* [project permission](https://confluence.atlassian.com/x/yodKLg) to delete a property from any comment.\\\\n * *Edit Own Comments* [project permission](https://confluence.atlassian.com/x/yodKLg) to delete a property from a comment created by the user.\\\\n\\\\nAlso, when the visibility of a comment is restricted to a role or group the user must be a member of that role or group.\\" deleteCommentProperty(commentId: String!, propertyKey: String!): Void \\"Creates a component. Use components to provide containers for issues within a project.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project in which the component is created or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" @@ -6581,7 +6457,7 @@ type Mutation { \\"Deletes a component.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the component or *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" deleteComponent(id: String!, moveIssuesTo: String): Void \\"Selects a time tracking provider.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" - selectTimeTrackingImplementation(input: TimeTrackingProvider_Input!): Any + selectTimeTrackingImplementation(input: TimeTrackingProvider_Input!): JSON \\"Sets the time tracking settings.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" setSharedTimeTrackingConfiguration(input: TimeTrackingConfiguration_Input!): TimeTrackingConfiguration \\"Creates a dashboard.\\\\n\\\\n**[Permissions](#permissions) required:** None.\\" @@ -6641,7 +6517,7 @@ type Mutation { \\"Updates or creates an option for a select list issue field. This operation requires that the option ID is provided when creating an option, therefore, the option ID needs to be specified as a path and body parameter. The option ID provided in the path and body must be identical.\\\\n\\\\nNote that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app providing the field.\\" updateIssueFieldOption(input: IssueFieldOption_Input!, fieldKey: String!, optionId: Int!): IssueFieldOption \\"Deletes an option from a select list issue field.\\\\n\\\\nNote that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app providing the field.\\" - deleteIssueFieldOption(fieldKey: String!, optionId: Int!): Any + deleteIssueFieldOption(fieldKey: String!, optionId: Int!): JSON \\"Deselects an issue-field select-list option from all issues where it is selected. A different option can be selected to replace the deselected option. The update can also be limited to a smaller set of issues by using a JQL query.\\\\n\\\\nConnect and Forge app users with *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) can override the screen security configuration using \`overrideScreenSecurity\` and \`overrideEditableFlag\`.\\\\n\\\\nThis is an [asynchronous operation](#async). The response object contains a link to the long-running task.\\\\n\\\\nNote that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app providing the field.\\" replaceIssueFieldOption(fieldKey: String!, optionId: Int!, replaceWith: Int, jql: String, overrideScreenSecurity: Boolean, overrideEditableFlag: Boolean): replaceIssueFieldOption_response \\"Deletes a custom field. The custom field is deleted whether it is in the trash or not. See [Edit or delete a custom field](https://confluence.atlassian.com/x/Z44fOw) for more information on trashing and deleting custom fields.\\\\n\\\\nThis operation is [asynchronous](#async). Follow the \`location\` link in the response to determine the status of the task and use [Get task](#api-rest-api-3-task-taskId-get) to obtain subsequent updates.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" @@ -6653,11 +6529,11 @@ type Mutation { \\"Creates a field configuration. The field configuration is created with the same field properties as the default configuration, with all the fields being optional.\\\\n\\\\nThis operation can only create configurations for use in company-managed (classic) projects.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" createFieldConfiguration(input: FieldConfigurationDetails_Input!): FieldConfiguration \\"Updates a field configuration. The name and the description provided in the request override the existing values.\\\\n\\\\nThis operation can only update configurations used in company-managed (classic) projects.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" - updateFieldConfiguration(input: FieldConfigurationDetails_Input!, id: Int!): Any + updateFieldConfiguration(input: FieldConfigurationDetails_Input!, id: Int!): JSON \\"Deletes a field configuration.\\\\n\\\\nThis operation can only delete configurations used in company-managed (classic) projects.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" - deleteFieldConfiguration(id: Int!): Any + deleteFieldConfiguration(id: Int!): JSON \\"Updates fields in a field configuration. The properties of the field configuration fields provided override the existing values.\\\\n\\\\nThis operation can only update field configurations used in company-managed (classic) projects.\\\\n\\\\nThe operation can set the renderer for text fields to the default text renderer (\`text-renderer\`) or wiki style renderer (\`wiki-renderer\`). However, the renderer cannot be updated for fields using the autocomplete renderer (\`autocomplete-renderer\`).\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" - updateFieldConfigurationItems(input: FieldConfigurationItemsDetails_Input!, id: Int!): Any + updateFieldConfigurationItems(input: FieldConfigurationItemsDetails_Input!, id: Int!): JSON \\"Creates a field configuration scheme.\\\\n\\\\nThis operation can only create field configuration schemes used in company-managed (classic) projects.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" createFieldConfigurationScheme(input: UpdateFieldConfigurationSchemeDetails_Input!): createFieldConfigurationScheme_response \\"Assigns a field configuration scheme to a project. If the field configuration scheme ID is \`null\`, the operation assigns the default field configuration scheme.\\\\n\\\\nField configuration schemes can only be assigned to classic projects.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" @@ -6665,9 +6541,9 @@ type Mutation { \\"Updates a field configuration scheme.\\\\n\\\\nThis operation can only update field configuration schemes used in company-managed (classic) projects.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" updateFieldConfigurationScheme(input: UpdateFieldConfigurationSchemeDetails_Input!, id: Int!): updateFieldConfigurationScheme_response \\"Deletes a field configuration scheme.\\\\n\\\\nThis operation can only delete field configuration schemes used in company-managed (classic) projects.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" - deleteFieldConfigurationScheme(id: Int!): Any + deleteFieldConfigurationScheme(id: Int!): JSON \\"Assigns issue types to field configurations on field configuration scheme.\\\\n\\\\nThis operation can only modify field configuration schemes used in company-managed (classic) projects.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" - setFieldConfigurationSchemeMapping(input: AssociateFieldConfigurationsWithIssueTypesRequest_Input!, id: Int!): Any + setFieldConfigurationSchemeMapping(input: AssociateFieldConfigurationsWithIssueTypesRequest_Input!, id: Int!): JSON \\"Removes issue types from the field configuration scheme.\\\\n\\\\nThis operation can only modify field configuration schemes used in company-managed (classic) projects.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" removeIssueTypesFromGlobalFieldConfigurationScheme(input: IssueTypeIdsToRemove_Input!, id: Int!): removeIssueTypesFromGlobalFieldConfigurationScheme_response \\"Creates a filter. The filter is shared according to the [default share scope](#api-rest-api-3-filter-post). The filter is not selected as a favorite.\\\\n\\\\n**[Permissions](#permissions) required:** Permission to access Jira.\\" @@ -6679,7 +6555,7 @@ type Mutation { \\"Delete a filter.\\\\n\\\\n**[Permissions](#permissions) required:** Permission to access Jira, however filters can only be deleted by the creator of the filter or a user with *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" deleteFilter(id: Int!): Void \\"Sets the columns for a filter. Only navigable fields can be set as columns. Use [Get fields](#api-rest-api-3-field-get) to get the list fields in Jira. A navigable field has \`navigable\` set to \`true\`.\\\\n\\\\nThe parameters for this resource are expressed as HTML form data. For example, in curl:\\\\n\\\\n\`curl -X PUT -d columns=summary -d columns=description https://your-domain.atlassian.net/rest/api/3/filter/10000/columns\`\\\\n\\\\n**[Permissions](#permissions) required:** Permission to access Jira, however, columns are only set for:\\\\n\\\\n * filters owned by the user.\\\\n * filters shared with a group that the user is a member of.\\\\n * filters shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for.\\\\n * filters shared with a public project.\\\\n * filters shared with the public.\\" - setColumns(input: String, id: Int!): Any + setColumns(input: String, id: Int!): JSON \\"Reset the user's column configuration for the filter to the default.\\\\n\\\\n**[Permissions](#permissions) required:** Permission to access Jira, however, columns are only reset for:\\\\n\\\\n * filters owned by the user.\\\\n * filters shared with a group that the user is a member of.\\\\n * filters shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for.\\\\n * filters shared with a public project.\\\\n * filters shared with the public.\\" resetColumns(id: Int!): Void \\"Add a filter as a favorite for the user.\\\\n\\\\n**[Permissions](#permissions) required:** Permission to access Jira, however, the user can only favorite:\\\\n\\\\n * filters owned by the user.\\\\n * filters shared with a group that the user is a member of.\\\\n * filters shared with a private project that the user has *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for.\\\\n * filters shared with a public project.\\\\n * filters shared with the public.\\" @@ -6687,7 +6563,7 @@ type Mutation { \\"Removes a filter as a favorite for the user. Note that this operation only removes filters visible to the user from the user's favorites list. For example, if the user favorites a public filter that is subsequently made private (and is therefore no longer visible on their favorites list) they cannot remove it from their favorites list.\\\\n\\\\n**[Permissions](#permissions) required:** Permission to access Jira.\\" deleteFavouriteForFilter(id: Int!, expand: String): Filter \\"Changes the owner of the filter.\\\\n\\\\n**[Permissions](#permissions) required:** Permission to access Jira. However, the user must own the filter or have the *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" - changeFilterOwner(input: ChangeFilterOwner_Input!, id: Int!): Any + changeFilterOwner(input: ChangeFilterOwner_Input!, id: Int!): JSON \\"Add a share permissions to a filter. If you add a global share permission (one for all logged-in users or the public) it will overwrite all share permissions for the filter.\\\\n\\\\nBe aware that this operation uses different objects for updating share permissions compared to [Update filter](#api-rest-api-3-filter-id-put).\\\\n\\\\n**[Permissions](#permissions) required:** *Share dashboards and filters* [global permission](https://confluence.atlassian.com/x/x4dKLg) and the user must own the filter.\\" addSharePermission(input: SharePermissionInputBean_Input!, id: Int!): [SharePermission] \\"Deletes a share permission from a filter.\\\\n\\\\n**[Permissions](#permissions) required:** Permission to access Jira and the user must own the filter.\\" @@ -6695,11 +6571,11 @@ type Mutation { \\"Creates a group.\\\\n\\\\n**[Permissions](#permissions) required:** Site administration (that is, member of the *site-admin* [group](https://confluence.atlassian.com/x/24xjL)).\\" createGroup(input: AddGroupBean_Input2): Group \\"Deletes a group.\\\\n\\\\n**[Permissions](#permissions) required:** Site administration (that is, member of the *site-admin* strategic [group](https://confluence.atlassian.com/x/24xjL)).\\" - removeGroup(groupname: String, groupId: String, swapGroup: String, swapGroupId: String): Any + removeGroup(groupname: String, groupId: String, swapGroup: String, swapGroupId: String): JSON \\"Adds a user to a group.\\\\n\\\\n**[Permissions](#permissions) required:** Site administration (that is, member of the *site-admin* [group](https://confluence.atlassian.com/x/24xjL)).\\" addUserToGroup(input: UpdateUserToGroupBean_Input2, groupname: String, groupId: String): Group \\"Removes a user from a group.\\\\n\\\\n**[Permissions](#permissions) required:** Site administration (that is, member of the *site-admin* [group](https://confluence.atlassian.com/x/24xjL)).\\" - removeUserFromGroup(groupname: String, groupId: String, username: String, accountId: String!): Any + removeUserFromGroup(groupname: String, groupId: String, username: String, accountId: String!): JSON \\"Creates an issue or, where the option to create subtasks is enabled in Jira, a subtask. A transition may be applied, to move the issue or subtask to a workflow step other than the default start step, and issue properties set.\\\\n\\\\nThe content of the issue or subtask is defined using \`update\` and \`fields\`. The fields that can be set in the issue or subtask are determined using the [ Get create issue metadata](#api-rest-api-3-issue-createmeta-get). These are the same fields that appear on the issue's create screen. Note that the \`description\`, \`environment\`, and any \`textarea\` type custom fields (multi-line text fields) take Atlassian Document Format content. Single line custom fields (\`textfield\`) accept a string and don't handle Atlassian Document Format content.\\\\n\\\\nCreating a subtask differs from creating an issue as follows:\\\\n\\\\n * \`issueType\` must be set to a subtask issue type (use [ Get create issue metadata](#api-rest-api-3-issue-createmeta-get) to find subtask issue types).\\\\n * \`parent\` must contain the ID or key of the parent issue.\\\\n\\\\nIn a next-gen project any issue may be made a child providing that the parent and child are members of the same project.\\\\n\\\\n**[Permissions](#permissions) required:** *Browse projects* and *Create issues* [project permissions](https://confluence.atlassian.com/x/yodKLg) for the project in which the issue or subtask is created.\\" createIssue(input: IssueUpdateDetails_Input2, updateHistory: Boolean): createIssue_response \\"Creates upto **50** issues and, where the option to create subtasks is enabled in Jira, subtasks. Transitions may be applied, to move the issues or subtasks to a workflow step other than the default start step, and issue properties set.\\\\n\\\\nThe content of each issue or subtask is defined using \`update\` and \`fields\`. The fields that can be set in the issue or subtask are determined using the [ Get create issue metadata](#api-rest-api-3-issue-createmeta-get). These are the same fields that appear on the issues' create screens. Note that the \`description\`, \`environment\`, and any \`textarea\` type custom fields (multi-line text fields) take Atlassian Document Format content. Single line custom fields (\`textfield\`) accept a string and don't handle Atlassian Document Format content.\\\\n\\\\nCreating a subtask differs from creating an issue as follows:\\\\n\\\\n * \`issueType\` must be set to a subtask issue type (use [ Get create issue metadata](#api-rest-api-3-issue-createmeta-get) to find subtask issue types).\\\\n * \`parent\` the must contain the ID or key of the parent issue.\\\\n\\\\n**[Permissions](#permissions) required:** *Browse projects* and *Create issues* [project permissions](https://confluence.atlassian.com/x/yodKLg) for the project in which each issue or subtask is created.\\" @@ -6715,11 +6591,11 @@ type Mutation { \\"Returns, for the user, details of the watched status of issues from a list. If an issue ID is invalid, the returned watched status is \`false\`.\\\\n\\\\nThis operation requires the **Allow users to watch issues** option to be *ON*. This option is set in General configuration for Jira. See [Configuring Jira application options](https://confluence.atlassian.com/x/uYXKM) for details.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.\\" getIsWatchingIssueBulk(input: IssueList_Input!): BulkIssueIsWatching \\"Edits an issue. A transition may be applied and issue properties updated as part of the edit.\\\\n\\\\nThe edits to the issue's fields are defined using \`update\` and \`fields\`. The fields that can be edited are determined using [ Get edit issue metadata](#api-rest-api-3-issue-issueIdOrKey-editmeta-get).\\\\n\\\\nThe parent field may be set by key or ID. For standard issue types, the parent may be removed by setting \`update.parent.set.none\` to *true*. Note that the \`description\`, \`environment\`, and any \`textarea\` type custom fields (multi-line text fields) take Atlassian Document Format content. Single line custom fields (\`textfield\`) accept a string and don't handle Atlassian Document Format content.\\\\n\\\\nConnect apps having an app user with *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), and Forge apps acting on behalf of users with *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), can override the screen security configuration using \`overrideScreenSecurity\` and \`overrideEditableFlag\`.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Browse projects* and *Edit issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.\\" - editIssue(input: IssueUpdateDetails_Input2, issueIdOrKey: String!, notifyUsers: Boolean, overrideScreenSecurity: Boolean, overrideEditableFlag: Boolean): Any + editIssue(input: IssueUpdateDetails_Input2, issueIdOrKey: String!, notifyUsers: Boolean, overrideScreenSecurity: Boolean, overrideEditableFlag: Boolean): JSON \\"Deletes an issue.\\\\n\\\\nAn issue cannot be deleted if it has one or more subtasks. To delete an issue with subtasks, set \`deleteSubtasks\`. This causes the issue's subtasks to be deleted with the issue.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Browse projects* and *Delete issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the issue.\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.\\" deleteIssue(issueIdOrKey: String!, deleteSubtasks: String): Void \\"Assigns an issue to a user. Use this operation when the calling user does not have the *Edit Issues* permission but has the *Assign issue* permission for the project that the issue is in.\\\\n\\\\nIf \`name\` or \`accountId\` is set to:\\\\n\\\\n * \`\\\\\\"-1\\\\\\"\`, the issue is assigned to the default assignee for the project.\\\\n * \`null\`, the issue is set to unassigned.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Browse Projects* and *Assign Issues* [ project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.\\" - assignIssue(input: User_Input, issueIdOrKey: String!): Any + assignIssue(input: User_Input, issueIdOrKey: String!): JSON \\"Adds one or more attachments to an issue. Attachments are posted as multipart/form-data ([RFC 1867](https://www.ietf.org/rfc/rfc1867.txt)).\\\\n\\\\nNote that:\\\\n\\\\n * The request must have a \`X-Atlassian-Token: no-check\` header, if not it is blocked. See [Special headers](#special-request-headers) for more information.\\\\n * The name of the multipart/form-data parameter that contains the attachments must be \`file\`.\\\\n\\\\nThe following examples upload a file called *myfile.txt* to the issue *TEST-123*:\\\\n\\\\n#### curl ####\\\\n\\\\n curl --location --request POST 'https://your-domain.atlassian.net/rest/api/3/issue/TEST-123/attachments'\\\\n -u 'email@example.com:'\\\\n -H 'X-Atlassian-Token: no-check'\\\\n --form 'file=@\\\\\\"myfile.txt\\\\\\"'\\\\n\\\\n#### Node.js ####\\\\n\\\\n // This code sample uses the 'node-fetch' and 'form-data' libraries:\\\\n // https://www.npmjs.com/package/node-fetch\\\\n // https://www.npmjs.com/package/form-data\\\\n const fetch = require('node-fetch');\\\\n const FormData = require('form-data');\\\\n const fs = require('fs');\\\\n \\\\n const filePath = 'myfile.txt';\\\\n const form = new FormData();\\\\n const stats = fs.statSync(filePath);\\\\n const fileSizeInBytes = stats.size;\\\\n const fileStream = fs.createReadStream(filePath);\\\\n \\\\n form.append('file', fileStream, {knownLength: fileSizeInBytes});\\\\n \\\\n fetch('https://your-domain.atlassian.net/rest/api/3/issue/TEST-123/attachments', {\\\\n method: 'POST',\\\\n body: form,\\\\n headers: {\\\\n 'Authorization': \`Basic \${Buffer.from(\\\\n 'email@example.com:'\\\\n ).toString('base64')}\`,\\\\n 'Accept': 'application/json',\\\\n 'X-Atlassian-Token': 'no-check'\\\\n }\\\\n })\\\\n .then(response => {\\\\n console.log(\\\\n \`Response: \${response.status} \${response.statusText}\`\\\\n );\\\\n return response.text();\\\\n })\\\\n .then(text => console.log(text))\\\\n .catch(err => console.error(err));\\\\n\\\\n#### Java ####\\\\n\\\\n // This code sample uses the 'Unirest' library:\\\\n // http://unirest.io/java.html\\\\n HttpResponse response = Unirest.post(\\\\\\"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\\\\\\")\\\\n .basicAuth(\\\\\\"email@example.com\\\\\\", \\\\\\"\\\\\\")\\\\n .header(\\\\\\"Accept\\\\\\", \\\\\\"application/json\\\\\\")\\\\n .header(\\\\\\"X-Atlassian-Token\\\\\\", \\\\\\"no-check\\\\\\")\\\\n .field(\\\\\\"file\\\\\\", new File(\\\\\\"myfile.txt\\\\\\"))\\\\n .asJson();\\\\n \\\\n System.out.println(response.getBody());\\\\n\\\\n#### Python ####\\\\n\\\\n # This code sample uses the 'requests' library:\\\\n # http://docs.python-requests.org\\\\n import requests\\\\n from requests.auth import HTTPBasicAuth\\\\n import json\\\\n \\\\n url = \\\\\\"https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments\\\\\\"\\\\n \\\\n auth = HTTPBasicAuth(\\\\\\"email@example.com\\\\\\", \\\\\\"\\\\\\")\\\\n \\\\n headers = {\\\\n \\\\\\"Accept\\\\\\": \\\\\\"application/json\\\\\\",\\\\n \\\\\\"X-Atlassian-Token\\\\\\": \\\\\\"no-check\\\\\\"\\\\n }\\\\n \\\\n response = requests.request(\\\\n \\\\\\"POST\\\\\\",\\\\n url,\\\\n headers = headers,\\\\n auth = auth,\\\\n files = {\\\\n \\\\\\"file\\\\\\": (\\\\\\"myfile.txt\\\\\\", open(\\\\\\"myfile.txt\\\\\\",\\\\\\"rb\\\\\\"), \\\\\\"application-type\\\\\\")\\\\n }\\\\n )\\\\n \\\\n print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(\\\\\\",\\\\\\", \\\\\\": \\\\\\")))\\\\n\\\\n#### PHP ####\\\\n\\\\n // This code sample uses the 'Unirest' library:\\\\n // http://unirest.io/php.html\\\\n Unirest\\\\\\\\Request::auth('email@example.com', '');\\\\n \\\\n $headers = array(\\\\n 'Accept' => 'application/json',\\\\n 'X-Atlassian-Token' => 'no-check'\\\\n );\\\\n \\\\n $parameters = array(\\\\n 'file' => File::add('myfile.txt')\\\\n );\\\\n \\\\n $response = Unirest\\\\\\\\Request::post(\\\\n 'https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments',\\\\n $headers,\\\\n $parameters\\\\n );\\\\n \\\\n var_dump($response)\\\\n\\\\n#### Forge ####\\\\n\\\\n // This sample uses Atlassian Forge and the \`form-data\` library.\\\\n // https://developer.atlassian.com/platform/forge/\\\\n // https://www.npmjs.com/package/form-data\\\\n import api from \\\\\\"@forge/api\\\\\\";\\\\n import FormData from \\\\\\"form-data\\\\\\";\\\\n \\\\n const form = new FormData();\\\\n form.append('file', fileStream, {knownLength: fileSizeInBytes});\\\\n \\\\n const response = await api.asApp().requestJira('/rest/api/2/issue/{issueIdOrKey}/attachments', {\\\\n method: 'POST',\\\\n body: form,\\\\n headers: {\\\\n 'Accept': 'application/json',\\\\n 'X-Atlassian-Token': 'no-check'\\\\n }\\\\n });\\\\n \\\\n console.log(\`Response: \${response.status} \${response.statusText}\`);\\\\n console.log(await response.json());\\\\n\\\\nTip: Use a client library. Many client libraries have classes for handling multipart POST operations. For example, in Java, the Apache HTTP Components library provides a [MultiPartEntity](http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntity.html) class for multipart POST operations.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:** \\\\n\\\\n * *Browse Projects* and *Create attachments* [ project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.\\" addAttachment(input: String, issueIdOrKey: String!): [Attachment] \\"Returns changelogs for an issue specified by a list of changelog IDs.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.\\" @@ -6731,9 +6607,9 @@ type Mutation { \\"Deletes a comment.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue containing the comment is in.\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.\\\\n * *Delete all comments*[ project permission](https://confluence.atlassian.com/x/yodKLg) to delete any comment or *Delete own comments* to delete comment created by the user,\\\\n * If the comment has visibility restrictions, the user belongs to the group or has the role visibility is restricted to.\\" deleteComment(issueIdOrKey: String!, id: String!): Void \\"Creates an email notification for an issue and adds it to the mail queue.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.\\" - notify(input: Notification_Input2, issueIdOrKey: String!): Any + notify(input: Notification_Input2, issueIdOrKey: String!): JSON \\"Sets the value of an issue's property. Use this resource to store custom data against an issue.\\\\n\\\\nThe value of the request body must be a [valid](http://tools.ietf.org/html/rfc4627), non-empty JSON blob. The maximum length is 32768 characters.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Browse projects* and *Edit issues* [project permissions](https://confluence.atlassian.com/x/yodKLg) for the project containing the issue.\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.\\" - setIssueProperty(issueIdOrKey: String!, propertyKey: String!): Any + setIssueProperty(issueIdOrKey: String!, propertyKey: String!): JSON \\"Deletes an issue's property.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Browse projects* and *Edit issues* [project permissions](https://confluence.atlassian.com/x/yodKLg) for the project containing the issue.\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.\\" deleteIssueProperty(issueIdOrKey: String!, propertyKey: String!): Void \\"Creates or updates a remote issue link for an issue.\\\\n\\\\nIf a \`globalId\` is provided and a remote issue link with that global ID is found it is updated. Any fields without values in the request are set to null. Otherwise, the remote issue link is created.\\\\n\\\\nThis operation requires [issue linking to be active](https://confluence.atlassian.com/x/yoXKM).\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Browse projects* and *Link issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.\\" @@ -6745,13 +6621,13 @@ type Mutation { \\"Deletes a remote issue link from an issue.\\\\n\\\\nThis operation requires [issue linking to be active](https://confluence.atlassian.com/x/yoXKM).\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Browse projects*, *Edit issues*, and *Link issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.\\" deleteRemoteIssueLinkById(issueIdOrKey: String!, linkId: String!): Void \\"Performs an issue transition and, if the transition has a screen, updates the fields from the transition screen.\\\\n\\\\nsortByCategory To update the fields on the transition screen, specify the fields in the \`fields\` or \`update\` parameters in the request body. Get details about the fields using [ Get transitions](#api-rest-api-3-issue-issueIdOrKey-transitions-get) with the \`transitions.fields\` expand.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Browse projects* and *Transition issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.\\" - doTransition(input: IssueUpdateDetails_Input2, issueIdOrKey: String!): Any + doTransition(input: IssueUpdateDetails_Input2, issueIdOrKey: String!): JSON \\"Adds the user's vote to an issue. This is the equivalent of the user clicking *Vote* on an issue in Jira.\\\\n\\\\nThis operation requires the **Allow users to vote on issues** option to be *ON*. This option is set in General configuration for Jira. See [Configuring Jira application options](https://confluence.atlassian.com/x/uYXKM) for details.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.\\" - addVote(issueIdOrKey: String!): Any + addVote(issueIdOrKey: String!): JSON \\"Deletes a user's vote from an issue. This is the equivalent of the user clicking *Unvote* on an issue in Jira.\\\\n\\\\nThis operation requires the **Allow users to vote on issues** option to be *ON*. This option is set in General configuration for Jira. See [Configuring Jira application options](https://confluence.atlassian.com/x/uYXKM) for details.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.\\" removeVote(issueIdOrKey: String!): Void \\"Adds a user as a watcher of an issue by passing the account ID of the user. For example, \`\\\\\\"5b10ac8d82e05b22cc7d4ef5\\\\\\"\`. If no user is specified the calling user is added.\\\\n\\\\nThis operation requires the **Allow users to watch issues** option to be *ON*. This option is set in General configuration for Jira. See [Configuring Jira application options](https://confluence.atlassian.com/x/uYXKM) for details.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.\\\\n * To add users other than themselves to the watchlist, *Manage watcher list* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.\\" - addWatcher(input: String, issueIdOrKey: String!): Any + addWatcher(input: String, issueIdOrKey: String!): JSON \\"Deletes a user as a watcher of an issue.\\\\n\\\\nThis operation requires the **Allow users to watch issues** option to be *ON*. This option is set in General configuration for Jira. See [Configuring Jira application options](https://confluence.atlassian.com/x/uYXKM) for details.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.\\\\n * To remove users other than themselves from the watchlist, *Manage watcher list* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.\\" removeWatcher(issueIdOrKey: String!, username: String, accountId: String): Void \\"Adds a worklog to an issue.\\\\n\\\\nTime tracking must be enabled in Jira, otherwise this operation returns an error. For more information, see [Configuring time tracking](https://confluence.atlassian.com/x/qoXKM).\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Browse projects* and *Work on issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.\\" @@ -6761,11 +6637,11 @@ type Mutation { \\"Deletes a worklog from an issue.\\\\n\\\\nTime tracking must be enabled in Jira, otherwise this operation returns an error. For more information, see [Configuring time tracking](https://confluence.atlassian.com/x/qoXKM).\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.\\\\n * *Delete all worklogs*[ project permission](https://confluence.atlassian.com/x/yodKLg) to delete any worklog or *Delete own worklogs* to delete worklogs created by the user,\\\\n * If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to.\\" deleteWorklog(issueIdOrKey: String!, id: String!, notifyUsers: Boolean, adjustEstimate: String, newEstimate: String, increaseBy: String, overrideEditableFlag: Boolean): Void \\"Sets the value of a worklog property. Use this operation to store custom data against the worklog.\\\\n\\\\nThe value of the request body must be a [valid](http://tools.ietf.org/html/rfc4627), non-empty JSON blob. The maximum length is 32768 characters.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.\\\\n * *Edit all worklogs*[ project permission](https://confluence.atlassian.com/x/yodKLg) to update any worklog or *Edit own worklogs* to update worklogs created by the user.\\\\n * If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to.\\" - setWorklogProperty(issueIdOrKey: String!, worklogId: String!, propertyKey: String!): Any + setWorklogProperty(issueIdOrKey: String!, worklogId: String!, propertyKey: String!): JSON \\"Deletes a worklog property.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.\\\\n * If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to.\\" deleteWorklogProperty(issueIdOrKey: String!, worklogId: String!, propertyKey: String!): Void \\"Creates a link between two issues. Use this operation to indicate a relationship between two issues and optionally add a comment to the from (outward) issue. To use this resource the site must have [Issue Linking](https://confluence.atlassian.com/x/yoXKM) enabled.\\\\n\\\\nThis resource returns nothing on the creation of an issue link. To obtain the ID of the issue link, use \`https://your-domain.atlassian.net/rest/api/3/issue/[linked issue key]?fields=issuelinks\`.\\\\n\\\\nIf the link request duplicates a link, the response indicates that the issue link was created. If the request included a comment, the comment is added.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Browse project* [project permission](https://confluence.atlassian.com/x/yodKLg) for all the projects containing the issues to be linked,\\\\n * *Link issues* [project permission](https://confluence.atlassian.com/x/yodKLg) on the project containing the from (outward) issue,\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.\\\\n * If the comment has visibility restrictions, belongs to the group or has the role visibility is restricted to.\\" - linkIssues(input: LinkIssueRequestJsonBean_Input!): Any + linkIssues(input: LinkIssueRequestJsonBean_Input!): JSON \\"Deletes an issue link.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * Browse project [project permission](https://confluence.atlassian.com/x/yodKLg) for all the projects containing the issues in the link.\\\\n * *Link issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for at least one of the projects containing issues in the link.\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, permission to view both of the issues.\\" deleteIssueLink(linkId: String!): Void \\"Creates an issue link type. Use this operation to create descriptions of the reasons why issues are linked. The issue link type consists of a name and descriptions for a link's inward and outward relationships.\\\\n\\\\nTo use this operation, the site must have [issue linking](https://confluence.atlassian.com/x/yoXKM) enabled.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" @@ -6783,7 +6659,7 @@ type Mutation { \\"Loads an avatar for the issue type.\\\\n\\\\nSpecify the avatar's local file location in the body of the request. Also, include the following headers:\\\\n\\\\n * \`X-Atlassian-Token: no-check\` To prevent XSRF protection blocking the request, for more information see [Special Headers](#special-request-headers).\\\\n * \`Content-Type: image/image type\` Valid image types are JPEG, GIF, or PNG.\\\\n\\\\nFor example: \\\\n\`curl --request POST \\\\\\\\ --user email@example.com: \\\\\\\\ --header 'X-Atlassian-Token: no-check' \\\\\\\\ --header 'Content-Type: image/< image_type>' \\\\\\\\ --data-binary \\\\\\"<@/path/to/file/with/your/avatar>\\\\\\" \\\\\\\\ --url 'https://your-domain.atlassian.net/rest/api/3/issuetype/{issueTypeId}'This\`\\\\n\\\\nThe avatar is cropped to a square. If no crop parameters are specified, the square originates at the top left of the image. The length of the square's sides is set to the smaller of the height or width of the image.\\\\n\\\\nThe cropped image is then used to create avatars of 16x16, 24x24, 32x32, and 48x48 in size.\\\\n\\\\nAfter creating the avatar, use [ Update issue type](#api-rest-api-3-issuetype-id-put) to set it as the issue type's displayed avatar.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" createIssueTypeAvatar(id: String!, x: Int, y: Int, size: Int!): Avatar \\"Creates or updates the value of the [issue type property](https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties). Use this resource to store and update data against an issue type.\\\\n\\\\nThe value of the request body must be a [valid](http://tools.ietf.org/html/rfc4627), non-empty JSON blob. The maximum length is 32768 characters.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" - setIssueTypeProperty(issueTypeId: String!, propertyKey: String!): Any + setIssueTypeProperty(issueTypeId: String!, propertyKey: String!): JSON \\"Deletes the [issue type property](https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties).\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" deleteIssueTypeProperty(issueTypeId: String!, propertyKey: String!): Void \\"Creates an issue type scheme.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" @@ -6825,13 +6701,13 @@ type Mutation { \\"Sanitizes one or more JQL queries by converting readable details into IDs where a user doesn't have permission to view the entity.\\\\n\\\\nFor example, if the query contains the clause *project = 'Secret project'*, and a user does not have browse permission for the project \\\\\\"Secret project\\\\\\", the sanitized query replaces the clause with *project = 12345\\\\\\"* (where 12345 is the ID of the project). If a user has the required permission, the clause is not sanitized. If the account ID is null, sanitizing is performed for an anonymous user.\\\\n\\\\nNote that sanitization doesn't make the queries GDPR-compliant, because it doesn't remove user identifiers (username or user key). If you need to make queries GDPR-compliant, use [Convert user identifiers to account IDs in JQL queries](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-jql/#api-rest-api-3-jql-sanitize-post).\\\\n\\\\nBefore sanitization each JQL query is parsed. The queries are returned in the same order that they were passed.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" sanitiseJqlQueries(input: JqlQueriesToSanitize_Input!): sanitiseJqlQueries_response \\"Creates a preference for the user or updates a preference's value by sending a plain text string. For example, \`false\`. An arbitrary preference can be created with the value containing up to 255 characters. In addition, the following keys define system preferences that can be set or created:\\\\n\\\\n * *user.notifications.mimetype* The mime type used in notifications sent to the user. Defaults to \`html\`.\\\\n * *user.notify.own.changes* Whether the user gets notified of their own changes. Defaults to \`false\`.\\\\n * *user.default.share.private* Whether new [ filters](https://confluence.atlassian.com/x/eQiiLQ) are set to private. Defaults to \`true\`.\\\\n * *user.keyboard.shortcuts.disabled* Whether keyboard shortcuts are disabled. Defaults to \`false\`.\\\\n * *user.autowatch.disabled* Whether the user automatically watches issues they create or add a comment to. By default, not set: the user takes the instance autowatch setting.\\\\n\\\\nNote that these keys are deprecated:\\\\n\\\\n * *jira.user.locale* The locale of the user. By default, not set. The user takes the instance locale.\\\\n * *jira.user.timezone* The time zone of the user. By default, not set. The user takes the instance timezone.\\\\n\\\\nUse [ Update a user profile](https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-profile-patch) from the user management REST API to manage timezone and locale instead.\\\\n\\\\n**[Permissions](#permissions) required:** Permission to access Jira.\\" - setPreference(input: String, key: String!): Any + setPreference(input: String, key: String!): JSON \\"Deletes a preference of the user, which restores the default value of system defined settings.\\\\n\\\\nNote that these keys are deprecated:\\\\n\\\\n * *jira.user.locale* The locale of the user. By default, not set. The user takes the instance locale.\\\\n * *jira.user.timezone* The time zone of the user. By default, not set. The user takes the instance timezone.\\\\n\\\\nUse [ Update a user profile](https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-profile-patch) from the user management REST API to manage timezone and locale instead.\\\\n\\\\n**[Permissions](#permissions) required:** Permission to access Jira.\\" removePreference(key: String!): Void \\"Deprecated, use [ Update a user profile](https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-profile-patch) from the user management REST API instead.\\\\n\\\\nSets the locale of the user. The locale must be one supported by the instance of Jira.\\\\n\\\\n**[Permissions](#permissions) required:** Permission to access Jira.\\" - setLocale(input: Locale_Input): Any + setLocale(input: Locale_Input): JSON \\"Deprecated, use [ Update a user profile](https://developer.atlassian.com/cloud/admin/user-management/rest/#api-users-account-id-manage-profile-patch) from the user management REST API instead.\\\\n\\\\nDeletes the locale of the user, which restores the default setting.\\\\n\\\\n**[Permissions](#permissions) required:** Permission to access Jira.\\" - deleteLocale: Any + deleteLocale: JSON \\"Returns:\\\\n\\\\n * for a list of global permissions, the global permissions granted to a user.\\\\n * for a list of project permissions and lists of projects and issues, for each project permission a list of the projects and issues a user can access or manipulate.\\\\n\\\\nIf no account ID is provided, the operation returns details for the logged in user.\\\\n\\\\nNote that:\\\\n\\\\n * Invalid project and issue IDs are ignored.\\\\n * A maximum of 1000 projects and 1000 issues can be checked.\\\\n * Null values in \`globalPermissions\`, \`projectPermissions\`, \`projectPermissions.projects\`, and \`projectPermissions.issues\` are ignored.\\\\n * Empty strings in \`projectPermissions.permissions\` are ignored.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) to check the permissions for other users, otherwise none. However, Connect apps can make a call from the app server to the product to obtain permission details for any user, without admin permission. This Connect app ability doesn't apply to calls made using AP.request() in a browser.\\" getBulkPermissions(input: BulkPermissionsRequestBean_Input): getBulkPermissions_response \\"Returns all the projects where the user is granted a list of project permissions.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:** None.\\" @@ -6857,9 +6733,9 @@ type Mutation { \\"Deletes a project.\\\\n\\\\nYou can't delete a project if it's archived. To delete an archived project, restore the project and then delete it. To restore a project, use the Jira UI.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" deleteProject(projectIdOrKey: String!, enableUndo: Boolean): Void \\"Archives a project. You can't delete a project if it's archived. To delete an archived project, restore the project and then delete it. To restore a project, use the Jira UI.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" - archiveProject(projectIdOrKey: String!): Any + archiveProject(projectIdOrKey: String!): JSON \\"Sets the avatar displayed for a project.\\\\n\\\\nUse [Load project avatar](#api-rest-api-3-project-projectIdOrKey-avatar2-post) to store avatars against the project, before using this operation to set the displayed avatar.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg).\\" - updateProjectAvatar(input: Avatar_Input2, projectIdOrKey: String!): Any + updateProjectAvatar(input: Avatar_Input2, projectIdOrKey: String!): JSON \\"Deletes a custom avatar from a project. Note that system avatars cannot be deleted.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg).\\" deleteProjectAvatar(projectIdOrKey: String!, id: Int!): Void \\"Loads an avatar for a project.\\\\n\\\\nSpecify the avatar's local file location in the body of the request. Also, include the following headers:\\\\n\\\\n * \`X-Atlassian-Token: no-check\` To prevent XSRF protection blocking the request, for more information see [Special Headers](#special-request-headers).\\\\n * \`Content-Type: image/image type\` Valid image types are JPEG, GIF, or PNG.\\\\n\\\\nFor example: \\\\n\`curl --request POST \`\\\\n\\\\n\`--user email@example.com: \`\\\\n\\\\n\`--header 'X-Atlassian-Token: no-check' \`\\\\n\\\\n\`--header 'Content-Type: image/< image_type>' \`\\\\n\\\\n\`--data-binary \\\\\\"<@/path/to/file/with/your/avatar>\\\\\\" \`\\\\n\\\\n\`--url 'https://your-domain.atlassian.net/rest/api/3/project/{projectIdOrKey}/avatar2'\`\\\\n\\\\nThe avatar is cropped to a square. If no crop parameters are specified, the square originates at the top left of the image. The length of the square's sides is set to the smaller of the height or width of the image.\\\\n\\\\nThe cropped image is then used to create avatars of 16x16, 24x24, 32x32, and 48x48 in size.\\\\n\\\\nAfter creating the avatar use [Set project avatar](#api-rest-api-3-project-projectIdOrKey-avatar-put) to set it as the project's displayed avatar.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg).\\" @@ -6869,7 +6745,7 @@ type Mutation { \\"Sets the state of a project feature.\\" toggleFeatureForProject(input: ProjectFeatureState_Input, projectIdOrKey: String!, featureKey: String!): ContainerForProjectFeatures \\"Sets the value of the [project property](https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties). You can use project properties to store custom data against the project.\\\\n\\\\nThe value of the request body must be a [valid](http://tools.ietf.org/html/rfc4627), non-empty JSON blob. The maximum length is 32768 characters.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) or *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project in which the property is created.\\" - setProjectProperty(projectIdOrKey: String!, propertyKey: String!): Any + setProjectProperty(projectIdOrKey: String!, propertyKey: String!): JSON \\"Deletes the [property](https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties) from a project.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) or *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the property.\\" deleteProjectProperty(projectIdOrKey: String!, propertyKey: String!): Void \\"Restores a project from the Jira recycle bin.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" @@ -6883,7 +6759,7 @@ type Mutation { \\"Deprecated, this feature is no longer supported and no alternatives are available, see [Convert project to a different template or type](https://confluence.atlassian.com/x/yEKeOQ). Updates a [project type](https://confluence.atlassian.com/x/GwiiLQ). The project type can be updated for classic projects only, project type cannot be updated for next-gen projects.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" updateProjectType(projectIdOrKey: String!, newProjectTypeKey: String!): Project \\"Sets the [project's sender email address](https://confluence.atlassian.com/x/dolKLg).\\\\n\\\\nIf \`emailAddress\` is an empty string, the default email address is restored.\\\\n\\\\n**[Permissions](#permissions) required:** *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project.\\" - updateProjectEmail(input: ProjectEmailAddress_Input, projectId: Int!): Any + updateProjectEmail(input: ProjectEmailAddress_Input, projectId: Int!): JSON \\"Assigns a permission scheme with a project. See [Managing project permissions](https://confluence.atlassian.com/x/yodKLg) for more information about permission schemes.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg)\\" assignPermissionScheme(input: IdBean_Input!, projectKeyOrId: String!, expand: String): PermissionScheme \\"Creates a project category.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" @@ -6907,7 +6783,7 @@ type Mutation { \\"Creates a screen with a default field tab.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" createScreen(input: ScreenDetails_Input!): createScreen_response \\"Adds a field to the default tab of the default screen.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" - addFieldToDefaultScreen(fieldId: String!): Any + addFieldToDefaultScreen(fieldId: String!): JSON \\"Updates a screen. Only screens used in classic projects can be updated.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" updateScreen(input: ScreenDetails_Input!, screenId: Int!): updateScreen_response \\"Deletes a screen. A screen cannot be deleted if it is used in a screen scheme, workflow, or workflow draft.\\\\n\\\\nOnly screens used in classic projects can be deleted.\\" @@ -6923,9 +6799,9 @@ type Mutation { \\"Removes a field from a screen tab.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" removeScreenTabField(screenId: Int!, tabId: Int!, id: String!): Void \\"Moves a screen tab field.\\\\n\\\\nIf \`after\` and \`position\` are provided in the request, \`position\` is ignored.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" - moveScreenTabField(input: MoveFieldBean_Input, screenId: Int!, tabId: Int!, id: String!): Any + moveScreenTabField(input: MoveFieldBean_Input, screenId: Int!, tabId: Int!, id: String!): JSON \\"Moves a screen tab.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" - moveScreenTab(screenId: Int!, tabId: Int!, pos: Int!): Any + moveScreenTab(screenId: Int!, tabId: Int!, pos: Int!): JSON \\"Creates a screen scheme.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" createScreenScheme(input: ScreenSchemeDetails_Input!): createScreenScheme_response \\"Updates a screen scheme. Only screen schemes used in classic projects can be updated.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" @@ -6935,7 +6811,7 @@ type Mutation { \\"Searches for issues using [JQL](https://confluence.atlassian.com/x/egORLQ).\\\\n\\\\nThere is a [GET](#api-rest-api-3-search-get) version of this resource that can be used for smaller JQL query expressions.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:** Issues are included in the response where the user has:\\\\n\\\\n * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the issue.\\\\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.\\" searchForIssuesUsingJqlPost(input: SearchRequestBean_Input): SearchResults \\"Sets the default issue navigator columns.\\\\n\\\\nThe \`columns\` parameter accepts a navigable field value and is expressed as HTML form data. To specify multiple columns, pass multiple \`columns\` parameters. For example, in curl:\\\\n\\\\n\`curl -X PUT -d columns=summary -d columns=description https://your-domain.atlassian.net/rest/api/3/settings/columns\`\\\\n\\\\nIf no column details are sent, then all default columns are removed.\\\\n\\\\nA navigable field is one that can be used as a column on the issue navigator. Find details of navigable issue columns using [Get fields](#api-rest-api-3-field-get).\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" - setIssueNavigatorDefaultColumns(input: String): Any + setIssueNavigatorDefaultColumns(input: String): JSON \\"Updates statuses by ID.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Administer projects* [project permission.](https://confluence.atlassian.com/x/yodKLg)\\\\n * *Administer Jira* [project permission.](https://confluence.atlassian.com/x/yodKLg)\\" updateStatuses(input: StatusUpdateRequest_Input): setDashboardItemProperty_400_response \\"Creates statuses for a global or project scope.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Administer projects* [project permission.](https://confluence.atlassian.com/x/yodKLg)\\\\n * *Administer Jira* [project permission.](https://confluence.atlassian.com/x/yodKLg)\\" @@ -6947,9 +6823,9 @@ type Mutation { \\"Creates a UI modification. UI modification can only be created by Forge apps.\\\\n\\\\nEach app can define up to 100 UI modifications. Each UI modification can define up to 1000 contexts.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *None* if the UI modification is created without contexts.\\\\n * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for one or more projects, if the UI modification is created with contexts.\\" createUiModification(input: CreateUiModificationDetails_Input!): UiModificationIdentifiers \\"Updates a UI modification. UI modification can only be updated by Forge apps.\\\\n\\\\nEach UI modification can define up to 1000 contexts.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *None* if the UI modification is created without contexts.\\\\n * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for one or more projects, if the UI modification is created with contexts.\\" - updateUiModification(input: UpdateUiModificationDetails_Input, uiModificationId: String!): Any + updateUiModification(input: UpdateUiModificationDetails_Input, uiModificationId: String!): JSON \\"Deletes a UI modification. All the contexts that belong to the UI modification are deleted too. UI modification can only be deleted by Forge apps.\\\\n\\\\n**[Permissions](#permissions) required:** None.\\" - deleteUiModification(uiModificationId: String!): Any + deleteUiModification(uiModificationId: String!): JSON \\"Loads a custom avatar for a project or issue type.\\\\n\\\\nSpecify the avatar's local file location in the body of the request. Also, include the following headers:\\\\n\\\\n * \`X-Atlassian-Token: no-check\` To prevent XSRF protection blocking the request, for more information see [Special Headers](#special-request-headers).\\\\n * \`Content-Type: image/image type\` Valid image types are JPEG, GIF, or PNG.\\\\n\\\\nFor example: \\\\n\`curl --request POST \`\\\\n\\\\n\`--user email@example.com: \`\\\\n\\\\n\`--header 'X-Atlassian-Token: no-check' \`\\\\n\\\\n\`--header 'Content-Type: image/< image_type>' \`\\\\n\\\\n\`--data-binary \\\\\\"<@/path/to/file/with/your/avatar>\\\\\\" \`\\\\n\\\\n\`--url 'https://your-domain.atlassian.net/rest/api/3/universal_avatar/type/{type}/owner/{entityId}'\`\\\\n\\\\nThe avatar is cropped to a square. If no crop parameters are specified, the square originates at the top left of the image. The length of the square's sides is set to the smaller of the height or width of the image.\\\\n\\\\nThe cropped image is then used to create avatars of 16x16, 24x24, 32x32, and 48x48 in size.\\\\n\\\\nAfter creating the avatar use:\\\\n\\\\n * [Update issue type](#api-rest-api-3-issuetype-id-put) to set it as the issue type's displayed avatar.\\\\n * [Set project avatar](#api-rest-api-3-project-projectIdOrKey-avatar-put) to set it as the project's displayed avatar.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" storeAvatar(type: String!, entityId: String!, x: Int, y: Int, size: Int!): Avatar \\"Deletes an avatar from a project or issue type.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" @@ -6959,11 +6835,11 @@ type Mutation { \\"Deletes a user. If the operation completes successfully then the user is removed from Jira's user base. This operation does not delete the user's Atlassian account.\\\\n\\\\n**[Permissions](#permissions) required:** Site administration (that is, membership of the *site-admin* [group](https://confluence.atlassian.com/x/24xjL)).\\" removeUser(accountId: String!, username: String, key: String): Void \\"Sets the default [ issue table columns](https://confluence.atlassian.com/x/XYdKLg) for the user. If an account ID is not passed, the calling user's default columns are set. If no column details are sent, then all default columns are removed.\\\\n\\\\nThe parameters for this resource are expressed as HTML form data. For example, in curl:\\\\n\\\\n\`curl -X PUT -d columns=summary -d columns=description https://your-domain.atlassian.net/rest/api/3/user/columns?accountId=5b10ac8d82e05b22cc7d4ef5'\`\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), to set the columns on any user.\\\\n * Permission to access Jira, to set the calling user's columns.\\" - setUserColumns(input: String, accountId: String): Any + setUserColumns(input: String, accountId: String): JSON \\"Resets the default [ issue table columns](https://confluence.atlassian.com/x/XYdKLg) for the user to the system default. If \`accountId\` is not passed, the calling user's default columns are reset.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), to set the columns on any user.\\\\n * Permission to access Jira, to set the calling user's columns.\\" resetUserColumns(accountId: String, username: String): Void \\"Sets the value of a user's property. Use this resource to store custom data against a user.\\\\n\\\\nNote: This operation does not access the [user properties](https://confluence.atlassian.com/x/8YxjL) created and maintained in Jira.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), to set a property on any user.\\\\n * Access to Jira, to set a property on the calling user's record.\\" - setUserProperty(propertyKey: String!, accountId: String, userKey: String, username: String): Any + setUserProperty(propertyKey: String!, accountId: String, userKey: String, username: String): JSON \\"Deletes a property from a user.\\\\n\\\\nNote: This operation does not access the [user properties](https://confluence.atlassian.com/x/8YxjL) created and maintained in Jira.\\\\n\\\\n**[Permissions](#permissions) required:**\\\\n\\\\n * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), to delete a property from any user.\\\\n * Access to Jira, to delete a property from the calling user's record.\\" deleteUserProperty(propertyKey: String!, accountId: String, userKey: String, username: String): Void \\"Creates a project version.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) or *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project the version is added to.\\" @@ -6973,11 +6849,11 @@ type Mutation { \\"Deletes a project version.\\\\n\\\\nDeprecated, use [ Delete and replace version](#api-rest-api-3-version-id-removeAndSwap-post) that supports swapping version values in custom fields, in addition to the swapping for \`fixVersion\` and \`affectedVersion\` provided in this resource.\\\\n\\\\nAlternative versions can be provided to update issues that use the deleted version in \`fixVersion\` or \`affectedVersion\`. If alternatives are not provided, occurrences of \`fixVersion\` and \`affectedVersion\` that contain the deleted version are cleared.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) or *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that contains the version.\\" deleteVersion(id: String!, moveFixIssuesTo: String, moveAffectedIssuesTo: String): Void \\"Merges two project versions. The merge is completed by deleting the version specified in \`id\` and replacing any occurrences of its ID in \`fixVersion\` with the version ID specified in \`moveIssuesTo\`.\\\\n\\\\nConsider using [ Delete and replace version](#api-rest-api-3-version-id-removeAndSwap-post) instead. This resource supports swapping version values in \`fixVersion\`, \`affectedVersion\`, and custom fields.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) or *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that contains the version.\\" - mergeVersions(id: String!, moveIssuesTo: String!): Any + mergeVersions(id: String!, moveIssuesTo: String!): JSON \\"Modifies the version's sequence within the project, which affects the display order of the versions in Jira.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:** *Browse projects* project permission for the project that contains the version.\\" moveVersion(input: VersionMoveBean_Input, id: String!): Version \\"Deletes a project version.\\\\n\\\\nAlternative versions can be provided to update issues that use the deleted version in \`fixVersion\`, \`affectedVersion\`, or any version picker custom fields. If alternatives are not provided, occurrences of \`fixVersion\`, \`affectedVersion\`, and any version picker custom field, that contain the deleted version, are cleared. Any replacement version must be in the same project as the version being deleted and cannot be the version being deleted.\\\\n\\\\nThis operation can be accessed anonymously.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) or *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that contains the version.\\" - deleteAndReplaceVersion(input: DeleteAndReplaceVersionBean_Input, id: String!): Any + deleteAndReplaceVersion(input: DeleteAndReplaceVersionBean_Input, id: String!): JSON \\"Registers webhooks.\\\\n\\\\n**[Permissions](#permissions) required:** Only [Connect](https://developer.atlassian.com/cloud/jira/platform/#connect-apps) and [OAuth 2.0](https://developer.atlassian.com/cloud/jira/platform/oauth-2-3lo-apps) apps can use this operation.\\" registerDynamicWebhooks(input: WebhookRegistrationDetails_Input!): registerDynamicWebhooks_response \\"Removes webhooks by ID. Only webhooks registered by the calling app are removed. If webhooks created by other apps are specified, they are ignored.\\\\n\\\\n**[Permissions](#permissions) required:** Only [Connect](https://developer.atlassian.com/cloud/jira/platform/#connect-apps) and [OAuth 2.0](https://developer.atlassian.com/cloud/jira/platform/oauth-2-3lo-apps) apps can use this operation.\\" @@ -6995,7 +6871,7 @@ type Mutation { \\"Adds a property to a workflow transition. Transition properties are used to change the behavior of a transition. For more information, see [Transition properties](https://confluence.atlassian.com/x/zIhKLg#Advancedworkflowconfiguration-transitionproperties) and [Workflow properties](https://confluence.atlassian.com/x/JYlKLg).\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" createWorkflowTransitionProperty(input: WorkflowTransitionProperty_Input2, transitionId: Int!, key: String!, workflowName: String!, workflowMode: String): WorkflowTransitionProperty \\"Deletes a property from a workflow transition. Transition properties are used to change the behavior of a transition. For more information, see [Transition properties](https://confluence.atlassian.com/x/zIhKLg#Advancedworkflowconfiguration-transitionproperties) and [Workflow properties](https://confluence.atlassian.com/x/JYlKLg).\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" - deleteWorkflowTransitionProperty(transitionId: Int!, key: String!, workflowName: String!, workflowMode: String): Any + deleteWorkflowTransitionProperty(transitionId: Int!, key: String!, workflowName: String!, workflowMode: String): JSON \\"Deletes a workflow.\\\\n\\\\nThe workflow cannot be deleted if it is:\\\\n\\\\n * an active workflow.\\\\n * a system workflow.\\\\n * associated with any workflow scheme.\\\\n * associated with any draft workflow scheme.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" deleteInactiveWorkflow(entityId: String!): deleteInactiveWorkflow_response \\"Creates a workflow scheme.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" @@ -7005,7 +6881,7 @@ type Mutation { \\"Updates a workflow scheme, including the name, default workflow, issue type to project mappings, and more. If the workflow scheme is active (that is, being used by at least one project), then a draft workflow scheme is created or updated instead, provided that \`updateDraftIfNeeded\` is set to \`true\`.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" updateWorkflowScheme(input: WorkflowScheme_Input, id: Int!): WorkflowScheme \\"Deletes a workflow scheme. Note that a workflow scheme cannot be deleted if it is active (that is, being used by at least one project).\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" - deleteWorkflowScheme(id: Int!): Any + deleteWorkflowScheme(id: Int!): JSON \\"Create a draft workflow scheme from an active workflow scheme, by copying the active workflow scheme. Note that an active workflow scheme can only have one draft workflow scheme.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" createWorkflowSchemeDraftFromParent(id: Int!): WorkflowScheme \\"Sets the default workflow for a workflow scheme.\\\\n\\\\nNote that active workflow schemes cannot be edited. If the workflow scheme is active, set \`updateDraftIfNeeded\` to \`true\` in the request object and a draft workflow scheme is created or updated with the new default workflow. The draft workflow scheme can be published in Jira.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" @@ -7029,7 +6905,7 @@ type Mutation { \\"Sets the issue types for a workflow in a workflow scheme's draft. The workflow can also be set as the default workflow for the draft workflow scheme. Unmapped issues types are mapped to the default workflow.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" updateDraftWorkflowMapping(input: IssueTypesWorkflowMapping_Input, id: Int!, workflowName: String!): WorkflowScheme \\"Deletes the workflow-issue type mapping for a workflow in a workflow scheme's draft.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" - deleteDraftWorkflowMapping(id: Int!, workflowName: String!): Any + deleteDraftWorkflowMapping(id: Int!, workflowName: String!): JSON \\"Sets the workflow for an issue type in a workflow scheme.\\\\n\\\\nNote that active workflow schemes cannot be edited. If the workflow scheme is active, set \`updateDraftIfNeeded\` to \`true\` in the request body and a draft workflow scheme is created or updated with the new issue type-workflow mapping. The draft workflow scheme can be published in Jira.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" setWorkflowSchemeIssueType(input: IssueTypeWorkflowMapping_Input, id: Int!, issueType: String!): WorkflowScheme \\"Deletes the issue type-workflow mapping for an issue type in a workflow scheme.\\\\n\\\\nNote that active workflow schemes cannot be edited. If the workflow scheme is active, set \`updateDraftIfNeeded\` to \`true\` and a draft workflow scheme is created or updated with the issue type-workflow mapping deleted. The draft workflow scheme can be published in Jira.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" @@ -7037,7 +6913,7 @@ type Mutation { \\"Sets the issue types for a workflow in a workflow scheme. The workflow can also be set as the default workflow for the workflow scheme. Unmapped issues types are mapped to the default workflow.\\\\n\\\\nNote that active workflow schemes cannot be edited. If the workflow scheme is active, set \`updateDraftIfNeeded\` to \`true\` in the request body and a draft workflow scheme is created or updated with the new workflow-issue types mappings. The draft workflow scheme can be published in Jira.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" updateWorkflowMapping(input: IssueTypesWorkflowMapping_Input, id: Int!, workflowName: String!): WorkflowScheme \\"Deletes the workflow-issue type mapping for a workflow in a workflow scheme.\\\\n\\\\nNote that active workflow schemes cannot be edited. If the workflow scheme is active, set \`updateDraftIfNeeded\` to \`true\` and a draft workflow scheme is created or updated with the workflow-issue type mapping deleted. The draft workflow scheme can be published in Jira.\\\\n\\\\n**[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).\\" - deleteWorkflowMapping(id: Int!, workflowName: String!, updateDraftIfNeeded: Boolean): Any + deleteWorkflowMapping(id: Int!, workflowName: String!, updateDraftIfNeeded: Boolean): JSON \\"Returns worklog details for a list of worklog IDs.\\\\n\\\\nThe returned list of worklogs is limited to 1000 items.\\\\n\\\\n**[Permissions](#permissions) required:** Permission to access Jira, however, worklogs are only returned where either of the following is true:\\\\n\\\\n * the worklog is set as *Viewable by All Users*.\\\\n * the user is a member of a project role or group with permission to view the worklog.\\" getWorklogsForIds(input: WorklogIdsRequestBean_Input!, expand: String): [Worklog] \\"Sets the value of an app's property. Use this resource to store custom data for your app.\\\\n\\\\nThe value of the request body must be a [valid](http://tools.ietf.org/html/rfc4627), non-empty JSON blob. The maximum length is 32768 characters.\\\\n\\\\n**[Permissions](#permissions) required:** Only a Connect app whose key matches \`addonKey\` can make this request.\\" @@ -7049,9 +6925,9 @@ type Mutation { \\"Remove all or a list of modules registered by the calling app.\\\\n\\\\n**[Permissions](#permissions) required:** Only Connect apps can make this request.\\" DynamicModulesResource_removeModules_delete(moduleKey: ID): DynamicModulesResource_removeModules_delete_response \\"Updates the value of a custom field added by Connect apps on one or more issues.\\\\nThe values of up to 200 custom fields can be updated.\\\\n\\\\n**[Permissions](#permissions) required:** Only Connect apps can make this request.\\" - AppIssueFieldValueUpdateResource_updateIssueFields_put(input: ConnectCustomFieldValues_Input, Atlassian_Transfer_Id: String!): Any + AppIssueFieldValueUpdateResource_updateIssueFields_put(input: ConnectCustomFieldValues_Input, Atlassian_Transfer_Id: String!): JSON \\"Updates the values of multiple entity properties for an object, up to 50 updates per request. This operation is for use by Connect apps during app migration.\\" - MigrationResource_updateEntityPropertiesValue_put(input: [EntityPropertyDetails_Input]!, Atlassian_Transfer_Id: String!, entityType: String!): Any + MigrationResource_updateEntityPropertiesValue_put(input: [EntityPropertyDetails_Input]!, Atlassian_Transfer_Id: String!, entityType: String!): JSON \\"Returns configurations for workflow transition rules migrated from server to cloud and owned by the calling Connect app.\\" MigrationResource_workflowRuleSearch_post(input: WorkflowRulesSearch_Input!, Atlassian_Transfer_Id: String!): WorkflowRulesSearchDetails } @@ -7070,8 +6946,6 @@ input AnnouncementBannerConfigurationUpdate_Input { visibility: String } -scalar Any - \\"List of updates for a custom fields.\\" input MultipleCustomFieldValuesUpdateDetails_Input { updates: [MultipleCustomFieldValuesUpdate_Input] @@ -7083,12 +6957,10 @@ input MultipleCustomFieldValuesUpdate_Input { customField: String! \\"The list of issue IDs.\\" issueIds: [BigInt]! - value: mutationInput_updateMultipleCustomFieldValues_updates_items_value_Input2! + \\"The value for the custom field. The value must be compatible with the [custom field type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field/#data-types) as follows:\\\\n\\\\n * \`string\` the value must be a string.\\\\n * \`number\` the value must be a number.\\\\n * \`datetime\` the value must be a string that represents a date in the ISO format or the simplified extended ISO format. For example, \`\\\\\\"2023-01-18T12:00:00-03:00\\\\\\"\` or \`\\\\\\"2023-01-18T12:00:00.000Z\\\\\\"\`. However, the milliseconds part is ignored.\\\\n * \`user\` the value must be an object that contains the \`accountId\` field.\\\\n * \`group\` the value must be an object that contains the group \`name\` or \`groupId\` field. Because group names can change, we recommend using \`groupId\`.\\\\n\\\\nA list of appropriate values must be provided if the field is of the \`list\` [collection type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field/#collection-types).\\" + value: JSON! } -\\"The value for the custom field. The value must be compatible with the [custom field type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field/#data-types) as follows:\\\\n\\\\n * \`string\` the value must be a string.\\\\n * \`number\` the value must be a number.\\\\n * \`datetime\` the value must be a string that represents a date in the ISO format or the simplified extended ISO format. For example, \`\\\\\\"2023-01-18T12:00:00-03:00\\\\\\"\` or \`\\\\\\"2023-01-18T12:00:00.000Z\\\\\\"\`. However, the milliseconds part is ignored.\\\\n * \`user\` the value must be an object that contains the \`accountId\` field.\\\\n * \`group\` the value must be an object that contains the group \`name\` or \`groupId\` field. Because group names can change, we recommend using \`groupId\`.\\\\n\\\\nA list of appropriate values must be provided if the field is of the \`list\` [collection type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field/#collection-types).\\" -scalar mutationInput_updateMultipleCustomFieldValues_updates_items_value_Input2 - \\"Details of configurations for a custom field.\\" input CustomFieldConfigurations_Input { \\"The list of custom field configuration details.\\" @@ -7101,16 +6973,12 @@ input ContextualConfiguration_Input { id: String! \\"The ID of the field context the configuration is associated with.\\" fieldContextId: String! - configuration: query_getCustomFieldConfiguration_values_items_configuration_Input2 - schema: query_getCustomFieldConfiguration_values_items_schema_Input2 + \\"The field configuration.\\" + configuration: JSON + \\"The field value schema.\\" + schema: JSON } -\\"The field configuration.\\" -scalar query_getCustomFieldConfiguration_values_items_configuration_Input2 - -\\"The field value schema.\\" -scalar query_getCustomFieldConfiguration_values_items_schema_Input2 - \\"Details of updates for a custom field.\\" input CustomFieldValueUpdateDetails_Input { \\"The list of custom field update details.\\" @@ -7121,7 +6989,8 @@ input CustomFieldValueUpdateDetails_Input { input CustomFieldValueUpdate_Input { \\"The list of issue IDs.\\" issueIds: [BigInt]! - value: mutationInput_updateMultipleCustomFieldValues_updates_items_value_Input2! + \\"The value for the custom field. The value must be compatible with the [custom field type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field/#data-types) as follows:\\\\n\\\\n * \`string\` the value must be a string.\\\\n * \`number\` the value must be a number.\\\\n * \`datetime\` the value must be a string that represents a date in the ISO format or the simplified extended ISO format. For example, \`\\\\\\"2023-01-18T12:00:00-03:00\\\\\\"\` or \`\\\\\\"2023-01-18T12:00:00.000Z\\\\\\"\`. However, the milliseconds part is ignored.\\\\n * \`user\` the value must be an object that contains the \`accountId\` field.\\\\n * \`group\` the value must be an object that contains the group \`name\` or \`groupId\` field. Because group names can change, we recommend using \`groupId\`.\\\\n\\\\nA list of appropriate values must be provided if the field is of the \`list\` [collection type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field/#collection-types).\\" + value: JSON! } input SimpleApplicationPropertyBean_Input { @@ -7314,7 +7183,8 @@ input Project_Input { versions: [Version_Input] \\"The name of the project.\\" name: String - roles: query_getAllDashboards_oneOf_0_dashboards_items_sharePermissions_items_project_roles_Input2 + \\"The name and self URL for each role defined in the project. For more information, see [Create project role](#api-rest-api-3-role-post).\\" + roles: JSON avatarUrls: AvatarUrlsBean_Input projectCategory: UpdatedProjectCategory_Input projectTypeKey: query_getAllDashboards_oneOf_0_dashboards_items_sharePermissions_items_project_issueTypes_items_scope_project_projectTypeKey @@ -7327,9 +7197,10 @@ input Project_Input { isPrivate: Boolean issueTypeHierarchy: Hierarchy_Input permissions: ProjectPermissions_Input - properties: query_getAllDashboards_oneOf_0_dashboards_items_sharePermissions_items_project_Input2 + \\"Map of project properties\\" + properties: JSON \\"Unique ID for next-gen projects.\\" - uuid: String + uuid: UUID insight: ProjectInsight_Input \\"Whether the project is marked as deleted.\\" deleted: Boolean @@ -7363,7 +7234,7 @@ input IssueTypeDetails_Input { \\"The ID of the issue type's avatar.\\" avatarId: BigInt \\"Unique ID for next-gen projects.\\" - entityId: String + entityId: UUID \\"Hierarchy level of the issue type.\\" hierarchyLevel: Int scope: Scope_Input2 @@ -7423,9 +7294,6 @@ input SimpleLink_Input { \\"Counts of the number of issues in various statuses.\\" scalar VersionIssuesStatus_Input2 -\\"The name and self URL for each role defined in the project. For more information, see [Create project role](#api-rest-api-3-role-post).\\" -scalar query_getAllDashboards_oneOf_0_dashboards_items_sharePermissions_items_project_roles_Input2 - \\"A project category.\\" input UpdatedProjectCategory_Input { \\"The URL of the project category.\\" @@ -7462,7 +7330,7 @@ input SimplifiedHierarchyLevel_Input { \\"The issue types available in this hierarchy level.\\" issueTypeIds: [BigInt] \\"The external UUID of the hierarchy level. This property is deprecated, see [Change notice: Removing hierarchy level IDs from next-gen APIs](https://developer.atlassian.com/cloud/jira/platform/change-notice-removing-hierarchy-level-ids-from-next-gen-apis/).\\" - externalUuid: String + externalUuid: UUID globalHierarchyLevel: query_getAllDashboards_oneOf_0_dashboards_items_sharePermissions_items_project_issueTypeHierarchy_levels_items_globalHierarchyLevel } @@ -7472,9 +7340,6 @@ input ProjectPermissions_Input { canEdit: Boolean } -\\"Map of project properties\\" -scalar query_getAllDashboards_oneOf_0_dashboards_items_sharePermissions_items_project_Input2 - \\"Additional details about a project.\\" input ProjectInsight_Input { \\"Total issue count.\\" @@ -7487,7 +7352,7 @@ input ProjectLandingPageInfo_Input { url: String projectKey: String projectType: String - attributes: query_getAllDashboards_oneOf_0_dashboards_items_sharePermissions_items_project_landingPageInfo_attributes_Input2 + attributes: JSON simplified: Boolean queueCategory: String boardName: String @@ -7497,8 +7362,6 @@ input ProjectLandingPageInfo_Input { queueName: String } -scalar query_getAllDashboards_oneOf_0_dashboards_items_sharePermissions_items_project_landingPageInfo_attributes_Input2 - \\"Details about the roles in a project.\\" input ProjectRole_Input { \\"The URL the project role details.\\" @@ -7535,25 +7398,15 @@ input RoleActor_Input { name: String \\"The avatar of the role actor.\\" avatarUrl: URL - actorUser: ProjectRoleUser_Input - actorGroup: ProjectRoleGroup_Input + actorUser: ProjectRoleUser_Input2 + actorGroup: ProjectRoleGroup_Input2 } \\"Details of the user associated with the role.\\" -input ProjectRoleUser_Input { - \\"The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. Returns *unknown* if the record is deleted and corrupted, for example, as the result of a server import.\\" - accountId: query_getAllDashboards_oneOf_0_dashboards_items_sharePermissions_items_role_actors_items_actorUser_accountId -} +scalar ProjectRoleUser_Input2 \\"Details of the group associated with the role.\\" -input ProjectRoleGroup_Input { - \\"The display name of the group.\\" - displayName: String - \\"The name of the group. As a group's name can change, use of \`groupId\` is recommended to identify the group.\\" - name: String - \\"The ID of the group.\\" - groupId: String -} +scalar ProjectRoleGroup_Input2 input UserBean_Input { \\"This property is deprecated in favor of \`accountId\` because of privacy changes. See the [migration guide](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. \\\\nThe key of the user.\\" @@ -7607,11 +7460,9 @@ input DashboardGadgetUpdateRequest_Input { type setDashboardItemProperty_400_response { errorMessages: [String] - errors: mutation_setDashboardItemProperty_errors + errors: JSON } -scalar mutation_setDashboardItemProperty_errors - union updateDashboard_response = Dashboard | ErrorCollection union deleteDashboard_response = Void_container | ErrorCollection @@ -7667,37 +7518,27 @@ enum mutation_analyseExpression_oneOf_0_results_items_errors_items_type { type JiraExpressionComplexity { \\"Information that can be used to determine how many [expensive operations](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/#expensive-operations) the evaluation of the expression will perform. This information may be a formula or number. For example:\\\\n\\\\n * \`issues.map(i => i.comments)\` performs as many expensive operations as there are issues on the issues list. So this parameter returns \`N\`, where \`N\` is the size of issue list.\\\\n * \`new Issue(10010).comments\` gets comments for one issue, so its complexity is \`2\` (\`1\` to retrieve issue 10010 from the database plus \`1\` to get its comments).\\" expensiveOperations: String! - variables: mutation_analyseExpression_oneOf_0_results_items_complexity_variables -} - -\\"Variables used in the formula, mapped to the parts of the expression they refer to.\\" -type mutation_analyseExpression_oneOf_0_results_items_complexity_variables { - additionalProperties: JSON + \\"Variables used in the formula, mapped to the parts of the expression they refer to.\\" + variables: JSON } \\"Details of Jira expressions for analysis.\\" input JiraExpressionForAnalysis_Input { \\"The list of Jira expressions to analyse.\\" expressions: [String]! - contextVariables: mutationInput_analyseExpression_contextVariables_Input2 + \\"Context variables and their types. The type checker assumes that [common context variables](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/#context-variables), such as \`issue\` or \`project\`, are available in context and sets their type. Use this property to override the default types or provide details of new variables.\\" + contextVariables: JSON } -\\"Context variables and their types. The type checker assumes that [common context variables](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/#context-variables), such as \`issue\` or \`project\`, are available in context and sets their type. Use this property to override the default types or provide details of new variables.\\" -scalar mutationInput_analyseExpression_contextVariables_Input2 - union evaluateJiraExpression_response = JiraExpressionResult | ErrorCollection \\"The result of evaluating a Jira expression.\\" type JiraExpressionResult { - value: mutation_evaluateJiraExpression_oneOf_0_value! + \\"The value of the evaluated expression. It may be a primitive JSON value or a Jira REST API object. (Some expressions do not produce any meaningful results—for example, an expression that returns a lambda function—if that's the case a simple string representation is returned. These string representations should not be relied upon and may change without notice.)\\" + value: JSON! meta: JiraExpressionEvaluationMetaDataBean } -\\"The value of the evaluated expression. It may be a primitive JSON value or a Jira REST API object. (Some expressions do not produce any meaningful results—for example, an expression that returns a lambda function—if that's the case a simple string representation is returned. These string representations should not be relied upon and may change without notice.)\\" -type mutation_evaluateJiraExpression_oneOf_0_value { - additionalProperties: JSON -} - type JiraExpressionEvaluationMetaDataBean { complexity: JiraExpressionsComplexityBean issues: IssuesMetaBean @@ -7824,25 +7665,19 @@ union updateCustomField_response = updateCustomField_400_response | updateCustom type updateCustomField_400_response { errorMessages: [String] - errors: mutation_updateCustomField_oneOf_0_errors + errors: JSON } -scalar mutation_updateCustomField_oneOf_0_errors - type updateCustomField_403_response { errorMessages: [String] - errors: mutation_updateCustomField_oneOf_1_errors + errors: JSON } -scalar mutation_updateCustomField_oneOf_1_errors - type updateCustomField_404_response { errorMessages: [String] - errors: mutation_updateCustomField_oneOf_2_errors + errors: JSON } -scalar mutation_updateCustomField_oneOf_2_errors - \\"Details of a custom field.\\" input UpdateCustomFieldDetails_Input { \\"The name of the custom field. It doesn't have to be unique. The maximum length is 255 characters.\\" @@ -7887,11 +7722,9 @@ type CreateCustomFieldContext { type createCustomFieldContext_409_response { errorMessages: [String] - errors: mutation_createCustomFieldContext_oneOf_1_errors + errors: JSON } -scalar mutation_createCustomFieldContext_oneOf_1_errors - \\"The details of a created custom field context.\\" input CreateCustomFieldContext_Input { \\"The ID of the context.\\" @@ -7910,25 +7743,19 @@ union setDefaultValues_response = setDefaultValues_400_response | setDefaultValu type setDefaultValues_400_response { errorMessages: [String] - errors: mutation_setDefaultValues_oneOf_0_errors + errors: JSON } -scalar mutation_setDefaultValues_oneOf_0_errors - type setDefaultValues_403_response { errorMessages: [String] - errors: mutation_setDefaultValues_oneOf_1_errors + errors: JSON } -scalar mutation_setDefaultValues_oneOf_1_errors - type setDefaultValues_404_response { errorMessages: [String] - errors: mutation_setDefaultValues_oneOf_2_errors + errors: JSON } -scalar mutation_setDefaultValues_oneOf_2_errors - \\"Default values to update.\\" input CustomFieldContextDefaultValueUpdate_Input { defaultValues: [CustomFieldContextDefaultValue_Input] @@ -8230,25 +8057,19 @@ type ContextForProjectAndIssueType { type getCustomFieldContextsForProjectsAndIssueTypes_400_response { errorMessages: [String] - errors: mutation_getCustomFieldContextsForProjectsAndIssueTypes_oneOf_1_errors + errors: JSON } -scalar mutation_getCustomFieldContextsForProjectsAndIssueTypes_oneOf_1_errors - type getCustomFieldContextsForProjectsAndIssueTypes_403_response { errorMessages: [String] - errors: mutation_getCustomFieldContextsForProjectsAndIssueTypes_oneOf_2_errors + errors: JSON } -scalar mutation_getCustomFieldContextsForProjectsAndIssueTypes_oneOf_2_errors - type getCustomFieldContextsForProjectsAndIssueTypes_404_response { errorMessages: [String] - errors: mutation_getCustomFieldContextsForProjectsAndIssueTypes_oneOf_3_errors + errors: JSON } -scalar mutation_getCustomFieldContextsForProjectsAndIssueTypes_oneOf_3_errors - \\"The project and issue type mappings.\\" input ProjectIssueTypeMappings_Input { \\"The project and issue type mappings.\\" @@ -8267,25 +8088,19 @@ union updateCustomFieldContext_response = updateCustomFieldContext_400_response type updateCustomFieldContext_400_response { errorMessages: [String] - errors: mutation_updateCustomFieldContext_oneOf_0_errors + errors: JSON } -scalar mutation_updateCustomFieldContext_oneOf_0_errors - type updateCustomFieldContext_403_response { errorMessages: [String] - errors: mutation_updateCustomFieldContext_oneOf_1_errors + errors: JSON } -scalar mutation_updateCustomFieldContext_oneOf_1_errors - type updateCustomFieldContext_404_response { errorMessages: [String] - errors: mutation_updateCustomFieldContext_oneOf_2_errors + errors: JSON } -scalar mutation_updateCustomFieldContext_oneOf_2_errors - \\"Details of a custom field context.\\" input CustomFieldContextUpdateDetails_Input { \\"The name of the custom field context. The name must be unique. The maximum length is 255 characters.\\" @@ -8298,55 +8113,41 @@ union deleteCustomFieldContext_response = deleteCustomFieldContext_400_response type deleteCustomFieldContext_400_response { errorMessages: [String] - errors: mutation_deleteCustomFieldContext_oneOf_0_errors + errors: JSON } -scalar mutation_deleteCustomFieldContext_oneOf_0_errors - type deleteCustomFieldContext_403_response { errorMessages: [String] - errors: mutation_deleteCustomFieldContext_oneOf_1_errors + errors: JSON } -scalar mutation_deleteCustomFieldContext_oneOf_1_errors - type deleteCustomFieldContext_404_response { errorMessages: [String] - errors: mutation_deleteCustomFieldContext_oneOf_2_errors + errors: JSON } -scalar mutation_deleteCustomFieldContext_oneOf_2_errors - union addIssueTypesToContext_response = addIssueTypesToContext_400_response | addIssueTypesToContext_403_response | addIssueTypesToContext_404_response | addIssueTypesToContext_409_response type addIssueTypesToContext_400_response { errorMessages: [String] - errors: mutation_addIssueTypesToContext_oneOf_0_errors + errors: JSON } -scalar mutation_addIssueTypesToContext_oneOf_0_errors - type addIssueTypesToContext_403_response { errorMessages: [String] - errors: mutation_addIssueTypesToContext_oneOf_1_errors + errors: JSON } -scalar mutation_addIssueTypesToContext_oneOf_1_errors - type addIssueTypesToContext_404_response { errorMessages: [String] - errors: mutation_addIssueTypesToContext_oneOf_2_errors + errors: JSON } -scalar mutation_addIssueTypesToContext_oneOf_2_errors - type addIssueTypesToContext_409_response { errorMessages: [String] - errors: mutation_addIssueTypesToContext_oneOf_3_errors + errors: JSON } -scalar mutation_addIssueTypesToContext_oneOf_3_errors - \\"The list of issue type IDs.\\" input IssueTypeIds_Input { \\"The list of issue type IDs.\\" @@ -8357,25 +8158,19 @@ union removeIssueTypesFromContext_response = removeIssueTypesFromContext_400_res type removeIssueTypesFromContext_400_response { errorMessages: [String] - errors: mutation_removeIssueTypesFromContext_oneOf_0_errors + errors: JSON } -scalar mutation_removeIssueTypesFromContext_oneOf_0_errors - type removeIssueTypesFromContext_403_response { errorMessages: [String] - errors: mutation_removeIssueTypesFromContext_oneOf_1_errors + errors: JSON } -scalar mutation_removeIssueTypesFromContext_oneOf_1_errors - type removeIssueTypesFromContext_404_response { errorMessages: [String] - errors: mutation_removeIssueTypesFromContext_oneOf_2_errors + errors: JSON } -scalar mutation_removeIssueTypesFromContext_oneOf_2_errors - union updateCustomFieldOption_response = CustomFieldUpdatedContextOptionsList | updateCustomFieldOption_400_response | updateCustomFieldOption_403_response | updateCustomFieldOption_404_response \\"A list of custom field options for a context.\\" @@ -8396,25 +8191,19 @@ type CustomFieldOptionUpdate { type updateCustomFieldOption_400_response { errorMessages: [String] - errors: mutation_updateCustomFieldOption_oneOf_1_errors + errors: JSON } -scalar mutation_updateCustomFieldOption_oneOf_1_errors - type updateCustomFieldOption_403_response { errorMessages: [String] - errors: mutation_updateCustomFieldOption_oneOf_2_errors + errors: JSON } -scalar mutation_updateCustomFieldOption_oneOf_2_errors - type updateCustomFieldOption_404_response { errorMessages: [String] - errors: mutation_updateCustomFieldOption_oneOf_3_errors + errors: JSON } -scalar mutation_updateCustomFieldOption_oneOf_3_errors - \\"Details of the options to update for a custom field.\\" input BulkCustomFieldOptionUpdateRequest_Input { \\"Details of the options to update.\\" @@ -8441,25 +8230,19 @@ type CustomFieldCreatedContextOptionsList { type createCustomFieldOption_400_response { errorMessages: [String] - errors: mutation_createCustomFieldOption_oneOf_1_errors + errors: JSON } -scalar mutation_createCustomFieldOption_oneOf_1_errors - type createCustomFieldOption_403_response { errorMessages: [String] - errors: mutation_createCustomFieldOption_oneOf_2_errors + errors: JSON } -scalar mutation_createCustomFieldOption_oneOf_2_errors - type createCustomFieldOption_404_response { errorMessages: [String] - errors: mutation_createCustomFieldOption_oneOf_3_errors + errors: JSON } -scalar mutation_createCustomFieldOption_oneOf_3_errors - \\"Details of the options to create for a custom field.\\" input BulkCustomFieldOptionCreateRequest_Input { \\"Details of options to create.\\" @@ -8480,25 +8263,19 @@ union reorderCustomFieldOptions_response = reorderCustomFieldOptions_400_respons type reorderCustomFieldOptions_400_response { errorMessages: [String] - errors: mutation_reorderCustomFieldOptions_oneOf_0_errors + errors: JSON } -scalar mutation_reorderCustomFieldOptions_oneOf_0_errors - type reorderCustomFieldOptions_403_response { errorMessages: [String] - errors: mutation_reorderCustomFieldOptions_oneOf_1_errors + errors: JSON } -scalar mutation_reorderCustomFieldOptions_oneOf_1_errors - type reorderCustomFieldOptions_404_response { errorMessages: [String] - errors: mutation_reorderCustomFieldOptions_oneOf_2_errors + errors: JSON } -scalar mutation_reorderCustomFieldOptions_oneOf_2_errors - \\"An ordered list of custom field option IDs and information on where to move them.\\" input OrderOfCustomFieldOptions_Input { \\"A list of IDs of custom field options to move. The order of the custom field option IDs in the list is the order they are given after the move. The list must contain custom field options or cascading options, but not both.\\" @@ -8518,48 +8295,36 @@ union deleteCustomFieldOption_response = Void_container | deleteCustomFieldOptio type deleteCustomFieldOption_400_response { errorMessages: [String] - errors: mutation_deleteCustomFieldOption_oneOf_1_errors + errors: JSON } -scalar mutation_deleteCustomFieldOption_oneOf_1_errors - type deleteCustomFieldOption_403_response { errorMessages: [String] - errors: mutation_deleteCustomFieldOption_oneOf_2_errors + errors: JSON } -scalar mutation_deleteCustomFieldOption_oneOf_2_errors - type deleteCustomFieldOption_404_response { errorMessages: [String] - errors: mutation_deleteCustomFieldOption_oneOf_3_errors + errors: JSON } -scalar mutation_deleteCustomFieldOption_oneOf_3_errors - union assignProjectsToCustomFieldContext_response = assignProjectsToCustomFieldContext_400_response | assignProjectsToCustomFieldContext_403_response | assignProjectsToCustomFieldContext_404_response type assignProjectsToCustomFieldContext_400_response { errorMessages: [String] - errors: mutation_assignProjectsToCustomFieldContext_oneOf_0_errors + errors: JSON } -scalar mutation_assignProjectsToCustomFieldContext_oneOf_0_errors - type assignProjectsToCustomFieldContext_403_response { errorMessages: [String] - errors: mutation_assignProjectsToCustomFieldContext_oneOf_1_errors + errors: JSON } -scalar mutation_assignProjectsToCustomFieldContext_oneOf_1_errors - type assignProjectsToCustomFieldContext_404_response { errorMessages: [String] - errors: mutation_assignProjectsToCustomFieldContext_oneOf_2_errors + errors: JSON } -scalar mutation_assignProjectsToCustomFieldContext_oneOf_2_errors - \\"A list of project IDs.\\" input ProjectIds_Input { \\"The IDs of projects.\\" @@ -8570,25 +8335,19 @@ union removeCustomFieldContextFromProjects_response = removeCustomFieldContextFr type removeCustomFieldContextFromProjects_400_response { errorMessages: [String] - errors: mutation_removeCustomFieldContextFromProjects_oneOf_0_errors + errors: JSON } -scalar mutation_removeCustomFieldContextFromProjects_oneOf_0_errors - type removeCustomFieldContextFromProjects_403_response { errorMessages: [String] - errors: mutation_removeCustomFieldContextFromProjects_oneOf_1_errors + errors: JSON } -scalar mutation_removeCustomFieldContextFromProjects_oneOf_1_errors - type removeCustomFieldContextFromProjects_404_response { errorMessages: [String] - errors: mutation_removeCustomFieldContextFromProjects_oneOf_2_errors + errors: JSON } -scalar mutation_removeCustomFieldContextFromProjects_oneOf_2_errors - scalar IssueFieldOptionCreateBean_Input2 \\"Details of the options for a select list issue field.\\" @@ -8597,13 +8356,11 @@ input IssueFieldOption_Input { id: BigInt! \\"The option's name, which is displayed in Jira.\\" value: String! - properties: query_getAllIssueFieldOptions_values_items_Input2 + \\"The properties of the object, as arbitrary key-value pairs. These properties can be searched using JQL, if the extractions (see [Issue Field Option Property Index](https://developer.atlassian.com/cloud/jira/platform/modules/issue-field-option-property-index/)) are defined in the descriptor for the issue field module.\\" + properties: JSON config: IssueFieldOptionConfiguration_Input } -\\"The properties of the object, as arbitrary key-value pairs. These properties can be searched using JQL, if the extractions (see [Issue Field Option Property Index](https://developer.atlassian.com/cloud/jira/platform/modules/issue-field-option-property-index/)) are defined in the descriptor for the issue field module.\\" -scalar query_getAllIssueFieldOptions_values_items_Input2 - \\"Details of the projects the option is available in.\\" input IssueFieldOptionConfiguration_Input { scope: IssueFieldOptionScopeBean_Input @@ -8681,24 +8438,18 @@ type RemoveOptionFromIssuesResult { } type SimpleErrorCollection { - errors: mutation_replaceIssueFieldOption_oneOf_0_result_errors_errors + \\"The list of errors by parameter returned by the operation. For example,\\\\\\"projectKey\\\\\\": \\\\\\"Project keys must start with an uppercase letter, followed by one or more uppercase alphanumeric characters.\\\\\\"\\" + errors: JSON \\"The list of error messages produced by this operation. For example, \\\\\\"input parameter 'key' must be provided\\\\\\"\\" errorMessages: [String] httpStatusCode: Int } -\\"The list of errors by parameter returned by the operation. For example,\\\\\\"projectKey\\\\\\": \\\\\\"Project keys must start with an uppercase letter, followed by one or more uppercase alphanumeric characters.\\\\\\"\\" -type mutation_replaceIssueFieldOption_oneOf_0_result_errors_errors { - additionalProperties: JSON -} - type replaceIssueFieldOption_403_response { errorMessages: [String] - errors: mutation_replaceIssueFieldOption_oneOf_1_errors + errors: JSON } -scalar mutation_replaceIssueFieldOption_oneOf_1_errors - union deleteCustomField_response = TaskProgressBeanObject | ErrorCollection union restoreCustomField_response = ErrorCollection @@ -8749,18 +8500,14 @@ union createFieldConfigurationScheme_response = FieldConfigurationScheme | creat type createFieldConfigurationScheme_400_response { errorMessages: [String] - errors: mutation_createFieldConfigurationScheme_oneOf_1_errors + errors: JSON } -scalar mutation_createFieldConfigurationScheme_oneOf_1_errors - type createFieldConfigurationScheme_403_response { errorMessages: [String] - errors: mutation_createFieldConfigurationScheme_oneOf_2_errors + errors: JSON } -scalar mutation_createFieldConfigurationScheme_oneOf_2_errors - \\"The details of the field configuration scheme.\\" input UpdateFieldConfigurationSchemeDetails_Input { \\"The name of the field configuration scheme. The name must be unique.\\" @@ -8779,25 +8526,19 @@ union assignFieldConfigurationSchemeToProject_response = assignFieldConfiguratio type assignFieldConfigurationSchemeToProject_400_response { errorMessages: [String] - errors: mutation_assignFieldConfigurationSchemeToProject_oneOf_0_errors + errors: JSON } -scalar mutation_assignFieldConfigurationSchemeToProject_oneOf_0_errors - type assignFieldConfigurationSchemeToProject_403_response { errorMessages: [String] - errors: mutation_assignFieldConfigurationSchemeToProject_oneOf_1_errors + errors: JSON } -scalar mutation_assignFieldConfigurationSchemeToProject_oneOf_1_errors - type assignFieldConfigurationSchemeToProject_404_response { errorMessages: [String] - errors: mutation_assignFieldConfigurationSchemeToProject_oneOf_2_errors + errors: JSON } -scalar mutation_assignFieldConfigurationSchemeToProject_oneOf_2_errors - \\"Associated field configuration scheme and project.\\" input FieldConfigurationSchemeProjectAssociation_Input { \\"The ID of the field configuration scheme. If the field configuration scheme ID is \`null\`, the operation assigns the default field configuration scheme.\\" @@ -8810,25 +8551,19 @@ union updateFieldConfigurationScheme_response = updateFieldConfigurationScheme_4 type updateFieldConfigurationScheme_400_response { errorMessages: [String] - errors: mutation_updateFieldConfigurationScheme_oneOf_0_errors + errors: JSON } -scalar mutation_updateFieldConfigurationScheme_oneOf_0_errors - type updateFieldConfigurationScheme_403_response { errorMessages: [String] - errors: mutation_updateFieldConfigurationScheme_oneOf_1_errors + errors: JSON } -scalar mutation_updateFieldConfigurationScheme_oneOf_1_errors - type updateFieldConfigurationScheme_404_response { errorMessages: [String] - errors: mutation_updateFieldConfigurationScheme_oneOf_2_errors + errors: JSON } -scalar mutation_updateFieldConfigurationScheme_oneOf_2_errors - \\"Details of a field configuration to issue type mappings.\\" input AssociateFieldConfigurationsWithIssueTypesRequest_Input { \\"Field configuration to issue type mappings.\\" @@ -9007,9 +8742,9 @@ input IssueEntityProperties_Input { input JsonNode_Input { array: Boolean - fields: mutation_setDashboardItemProperty_errors_Input + fields: mutationInput_bulkSetIssuesPropertiesList_additionalProperties_fields_Input null: Boolean - elements: mutation_setDashboardItemProperty_errors_Input + elements: mutationInput_bulkSetIssuesPropertiesList_additionalProperties_fields_Input floatingPointNumber: Boolean pojo: Boolean number: Boolean @@ -9039,12 +8774,12 @@ input JsonNode_Input { valueAsLong: BigInt valueAsDouble: Float valueAsBoolean: Boolean - fieldNames: mutation_setDashboardItemProperty_errors_Input + fieldNames: mutationInput_bulkSetIssuesPropertiesList_additionalProperties_fields_Input textValue: String valueAsText: String } -scalar mutation_setDashboardItemProperty_errors_Input +scalar mutationInput_bulkSetIssuesPropertiesList_additionalProperties_fields_Input enum mutationInput_bulkSetIssuesPropertiesList_additionalProperties_numberType { INT @@ -9072,9 +8807,9 @@ input IssueEntityPropertiesForMultiUpdate_Input { input JsonNode_Input2 { array: Boolean - fields: mutation_setDashboardItemProperty_errors_Input + fields: mutationInput_bulkSetIssuesPropertiesList_additionalProperties_fields_Input null: Boolean - elements: mutation_setDashboardItemProperty_errors_Input + elements: mutationInput_bulkSetIssuesPropertiesList_additionalProperties_fields_Input floatingPointNumber: Boolean pojo: Boolean number: Boolean @@ -9104,7 +8839,7 @@ input JsonNode_Input2 { valueAsLong: BigInt valueAsDouble: Float valueAsBoolean: Boolean - fieldNames: mutation_setDashboardItemProperty_errors_Input + fieldNames: mutationInput_bulkSetIssuesPropertiesList_additionalProperties_fields_Input textValue: String valueAsText: String } @@ -9113,44 +8848,37 @@ union bulkSetIssueProperty_response = ErrorCollection \\"Bulk issue property update request details.\\" input BulkIssuePropertyUpdateRequest_Input { - value: mutationInput_bulkSetIssueProperty_value_Input2 + \\"The value of the property. The value must be a [valid](https://tools.ietf.org/html/rfc4627), non-empty JSON blob. The maximum length is 32768 characters.\\" + value: JSON \\"EXPERIMENTAL. The Jira expression to calculate the value of the property. The value of the expression must be an object that can be converted to JSON, such as a number, boolean, string, list, or map. The context variables available to the expression are \`issue\` and \`user\`. Issues for which the expression returns a value whose JSON representation is longer than 32768 characters are ignored.\\" expression: String filter: IssueFilterForBulkPropertySet_Input } -\\"The value of the property. The value must be a [valid](https://tools.ietf.org/html/rfc4627), non-empty JSON blob. The maximum length is 32768 characters.\\" -scalar mutationInput_bulkSetIssueProperty_value_Input2 - \\"Bulk operation filter details.\\" input IssueFilterForBulkPropertySet_Input { \\"List of issues to perform the bulk operation on.\\" entityIds: [BigInt] - currentValue: mutationInput_bulkSetIssueProperty_filter_currentValue_Input2 + \\"The value of properties to perform the bulk operation on.\\" + currentValue: JSON \\"Whether the bulk operation occurs only when the property is present on or absent from an issue.\\" hasProperty: Boolean } -\\"The value of properties to perform the bulk operation on.\\" -scalar mutationInput_bulkSetIssueProperty_filter_currentValue_Input2 - union bulkDeleteIssueProperty_response = ErrorCollection \\"Bulk operation filter details.\\" input IssueFilterForBulkPropertyDelete_Input { \\"List of issues to perform the bulk delete operation on.\\" entityIds: [BigInt] - currentValue: mutationInput_bulkSetIssueProperty_filter_currentValue_Input2 + \\"The value of properties to perform the bulk operation on.\\" + currentValue: JSON } \\"A container for the watch status of a list of issues.\\" type BulkIssueIsWatching { - issuesIsWatching: mutation_getIsWatchingIssueBulk_issuesIsWatching -} - -\\"The map of issue ID to boolean watch status.\\" -type mutation_getIsWatchingIssueBulk_issuesIsWatching { - additionalProperties: JSON + \\"The map of issue ID to boolean watch status.\\" + issuesIsWatching: JSON } \\"A list of issue IDs.\\" @@ -9351,25 +9079,19 @@ type IssueTypeSchemeID { type createIssueTypeScheme_400_response { errorMessages: [String] - errors: mutation_createIssueTypeScheme_oneOf_1_errors + errors: JSON } -scalar mutation_createIssueTypeScheme_oneOf_1_errors - type createIssueTypeScheme_403_response { errorMessages: [String] - errors: mutation_createIssueTypeScheme_oneOf_2_errors + errors: JSON } -scalar mutation_createIssueTypeScheme_oneOf_2_errors - type createIssueTypeScheme_409_response { errorMessages: [String] - errors: mutation_createIssueTypeScheme_oneOf_3_errors + errors: JSON } -scalar mutation_createIssueTypeScheme_oneOf_3_errors - \\"Details of an issue type scheme and its associated issue types.\\" input IssueTypeSchemeDetails_Input { \\"The name of the issue type scheme. The name must be unique. The maximum length is 255 characters.\\" @@ -9386,25 +9108,19 @@ union assignIssueTypeSchemeToProject_response = assignIssueTypeSchemeToProject_4 type assignIssueTypeSchemeToProject_400_response { errorMessages: [String] - errors: mutation_assignIssueTypeSchemeToProject_oneOf_0_errors + errors: JSON } -scalar mutation_assignIssueTypeSchemeToProject_oneOf_0_errors - type assignIssueTypeSchemeToProject_403_response { errorMessages: [String] - errors: mutation_assignIssueTypeSchemeToProject_oneOf_1_errors + errors: JSON } -scalar mutation_assignIssueTypeSchemeToProject_oneOf_1_errors - type assignIssueTypeSchemeToProject_404_response { errorMessages: [String] - errors: mutation_assignIssueTypeSchemeToProject_oneOf_2_errors + errors: JSON } -scalar mutation_assignIssueTypeSchemeToProject_oneOf_2_errors - \\"Details of the association between an issue type scheme and project.\\" input IssueTypeSchemeProjectAssociation_Input { \\"The ID of the issue type scheme.\\" @@ -9417,25 +9133,19 @@ union updateIssueTypeScheme_response = updateIssueTypeScheme_400_response | upda type updateIssueTypeScheme_400_response { errorMessages: [String] - errors: mutation_updateIssueTypeScheme_oneOf_0_errors + errors: JSON } -scalar mutation_updateIssueTypeScheme_oneOf_0_errors - type updateIssueTypeScheme_403_response { errorMessages: [String] - errors: mutation_updateIssueTypeScheme_oneOf_1_errors + errors: JSON } -scalar mutation_updateIssueTypeScheme_oneOf_1_errors - type updateIssueTypeScheme_404_response { errorMessages: [String] - errors: mutation_updateIssueTypeScheme_oneOf_2_errors + errors: JSON } -scalar mutation_updateIssueTypeScheme_oneOf_2_errors - \\"Details of the name, description, and default issue type for an issue type scheme.\\" input IssueTypeSchemeUpdateDetails_Input { \\"The name of the issue type scheme. The name must be unique. The maximum length is 255 characters.\\" @@ -9450,71 +9160,53 @@ union deleteIssueTypeScheme_response = deleteIssueTypeScheme_400_response | dele type deleteIssueTypeScheme_400_response { errorMessages: [String] - errors: mutation_deleteIssueTypeScheme_oneOf_0_errors + errors: JSON } -scalar mutation_deleteIssueTypeScheme_oneOf_0_errors - type deleteIssueTypeScheme_403_response { errorMessages: [String] - errors: mutation_deleteIssueTypeScheme_oneOf_1_errors + errors: JSON } -scalar mutation_deleteIssueTypeScheme_oneOf_1_errors - type deleteIssueTypeScheme_404_response { errorMessages: [String] - errors: mutation_deleteIssueTypeScheme_oneOf_2_errors + errors: JSON } -scalar mutation_deleteIssueTypeScheme_oneOf_2_errors - union addIssueTypesToIssueTypeScheme_response = addIssueTypesToIssueTypeScheme_400_response | addIssueTypesToIssueTypeScheme_403_response | addIssueTypesToIssueTypeScheme_404_response type addIssueTypesToIssueTypeScheme_400_response { errorMessages: [String] - errors: mutation_addIssueTypesToIssueTypeScheme_oneOf_0_errors + errors: JSON } -scalar mutation_addIssueTypesToIssueTypeScheme_oneOf_0_errors - type addIssueTypesToIssueTypeScheme_403_response { errorMessages: [String] - errors: mutation_addIssueTypesToIssueTypeScheme_oneOf_1_errors + errors: JSON } -scalar mutation_addIssueTypesToIssueTypeScheme_oneOf_1_errors - type addIssueTypesToIssueTypeScheme_404_response { errorMessages: [String] - errors: mutation_addIssueTypesToIssueTypeScheme_oneOf_2_errors + errors: JSON } -scalar mutation_addIssueTypesToIssueTypeScheme_oneOf_2_errors - union reorderIssueTypesInIssueTypeScheme_response = reorderIssueTypesInIssueTypeScheme_400_response | reorderIssueTypesInIssueTypeScheme_403_response | reorderIssueTypesInIssueTypeScheme_404_response type reorderIssueTypesInIssueTypeScheme_400_response { errorMessages: [String] - errors: mutation_reorderIssueTypesInIssueTypeScheme_oneOf_0_errors + errors: JSON } -scalar mutation_reorderIssueTypesInIssueTypeScheme_oneOf_0_errors - type reorderIssueTypesInIssueTypeScheme_403_response { errorMessages: [String] - errors: mutation_reorderIssueTypesInIssueTypeScheme_oneOf_1_errors + errors: JSON } -scalar mutation_reorderIssueTypesInIssueTypeScheme_oneOf_1_errors - type reorderIssueTypesInIssueTypeScheme_404_response { errorMessages: [String] - errors: mutation_reorderIssueTypesInIssueTypeScheme_oneOf_2_errors + errors: JSON } -scalar mutation_reorderIssueTypesInIssueTypeScheme_oneOf_2_errors - \\"An ordered list of issue type IDs and information about where to move them.\\" input OrderOfIssueTypes_Input { \\"A list of the issue type IDs to move. The order of the issue type IDs in the list is the order they are given after the move.\\" @@ -9534,25 +9226,19 @@ union removeIssueTypeFromIssueTypeScheme_response = removeIssueTypeFromIssueType type removeIssueTypeFromIssueTypeScheme_400_response { errorMessages: [String] - errors: mutation_removeIssueTypeFromIssueTypeScheme_oneOf_0_errors + errors: JSON } -scalar mutation_removeIssueTypeFromIssueTypeScheme_oneOf_0_errors - type removeIssueTypeFromIssueTypeScheme_403_response { errorMessages: [String] - errors: mutation_removeIssueTypeFromIssueTypeScheme_oneOf_1_errors + errors: JSON } -scalar mutation_removeIssueTypeFromIssueTypeScheme_oneOf_1_errors - type removeIssueTypeFromIssueTypeScheme_404_response { errorMessages: [String] - errors: mutation_removeIssueTypeFromIssueTypeScheme_oneOf_2_errors + errors: JSON } -scalar mutation_removeIssueTypeFromIssueTypeScheme_oneOf_2_errors - union createIssueTypeScreenScheme_response = IssueTypeScreenSchemeId | createIssueTypeScreenScheme_400_response | createIssueTypeScreenScheme_403_response | createIssueTypeScreenScheme_404_response | createIssueTypeScreenScheme_409_response \\"The ID of an issue type screen scheme.\\" @@ -9563,32 +9249,24 @@ type IssueTypeScreenSchemeId { type createIssueTypeScreenScheme_400_response { errorMessages: [String] - errors: mutation_createIssueTypeScreenScheme_oneOf_1_errors + errors: JSON } -scalar mutation_createIssueTypeScreenScheme_oneOf_1_errors - type createIssueTypeScreenScheme_403_response { errorMessages: [String] - errors: mutation_createIssueTypeScreenScheme_oneOf_2_errors + errors: JSON } -scalar mutation_createIssueTypeScreenScheme_oneOf_2_errors - type createIssueTypeScreenScheme_404_response { errorMessages: [String] - errors: mutation_createIssueTypeScreenScheme_oneOf_3_errors + errors: JSON } -scalar mutation_createIssueTypeScreenScheme_oneOf_3_errors - type createIssueTypeScreenScheme_409_response { errorMessages: [String] - errors: mutation_createIssueTypeScreenScheme_oneOf_4_errors + errors: JSON } -scalar mutation_createIssueTypeScreenScheme_oneOf_4_errors - \\"The details of an issue type screen scheme.\\" input IssueTypeScreenSchemeDetails_Input { \\"The name of the issue type screen scheme. The name must be unique. The maximum length is 255 characters.\\" @@ -9611,25 +9289,19 @@ union assignIssueTypeScreenSchemeToProject_response = assignIssueTypeScreenSchem type assignIssueTypeScreenSchemeToProject_400_response { errorMessages: [String] - errors: mutation_assignIssueTypeScreenSchemeToProject_oneOf_0_errors + errors: JSON } -scalar mutation_assignIssueTypeScreenSchemeToProject_oneOf_0_errors - type assignIssueTypeScreenSchemeToProject_403_response { errorMessages: [String] - errors: mutation_assignIssueTypeScreenSchemeToProject_oneOf_1_errors + errors: JSON } -scalar mutation_assignIssueTypeScreenSchemeToProject_oneOf_1_errors - type assignIssueTypeScreenSchemeToProject_404_response { errorMessages: [String] - errors: mutation_assignIssueTypeScreenSchemeToProject_oneOf_2_errors + errors: JSON } -scalar mutation_assignIssueTypeScreenSchemeToProject_oneOf_2_errors - \\"Associated issue type screen scheme and project.\\" input IssueTypeScreenSchemeProjectAssociation_Input { \\"The ID of the issue type screen scheme.\\" @@ -9642,25 +9314,19 @@ union updateIssueTypeScreenScheme_response = updateIssueTypeScreenScheme_400_res type updateIssueTypeScreenScheme_400_response { errorMessages: [String] - errors: mutation_updateIssueTypeScreenScheme_oneOf_0_errors + errors: JSON } -scalar mutation_updateIssueTypeScreenScheme_oneOf_0_errors - type updateIssueTypeScreenScheme_403_response { errorMessages: [String] - errors: mutation_updateIssueTypeScreenScheme_oneOf_1_errors + errors: JSON } -scalar mutation_updateIssueTypeScreenScheme_oneOf_1_errors - type updateIssueTypeScreenScheme_404_response { errorMessages: [String] - errors: mutation_updateIssueTypeScreenScheme_oneOf_2_errors + errors: JSON } -scalar mutation_updateIssueTypeScreenScheme_oneOf_2_errors - \\"Details of an issue type screen scheme.\\" input IssueTypeScreenSchemeUpdateDetails_Input { \\"The name of the issue type screen scheme. The name must be unique. The maximum length is 255 characters.\\" @@ -9673,41 +9339,31 @@ union deleteIssueTypeScreenScheme_response = deleteIssueTypeScreenScheme_400_res type deleteIssueTypeScreenScheme_400_response { errorMessages: [String] - errors: mutation_deleteIssueTypeScreenScheme_oneOf_0_errors + errors: JSON } -scalar mutation_deleteIssueTypeScreenScheme_oneOf_0_errors - type deleteIssueTypeScreenScheme_404_response { errorMessages: [String] - errors: mutation_deleteIssueTypeScreenScheme_oneOf_1_errors + errors: JSON } -scalar mutation_deleteIssueTypeScreenScheme_oneOf_1_errors - union appendMappingsForIssueTypeScreenScheme_response = appendMappingsForIssueTypeScreenScheme_400_response | appendMappingsForIssueTypeScreenScheme_404_response | appendMappingsForIssueTypeScreenScheme_409_response type appendMappingsForIssueTypeScreenScheme_400_response { errorMessages: [String] - errors: mutation_appendMappingsForIssueTypeScreenScheme_oneOf_0_errors + errors: JSON } -scalar mutation_appendMappingsForIssueTypeScreenScheme_oneOf_0_errors - type appendMappingsForIssueTypeScreenScheme_404_response { errorMessages: [String] - errors: mutation_appendMappingsForIssueTypeScreenScheme_oneOf_1_errors + errors: JSON } -scalar mutation_appendMappingsForIssueTypeScreenScheme_oneOf_1_errors - type appendMappingsForIssueTypeScreenScheme_409_response { errorMessages: [String] - errors: mutation_appendMappingsForIssueTypeScreenScheme_oneOf_2_errors + errors: JSON } -scalar mutation_appendMappingsForIssueTypeScreenScheme_oneOf_2_errors - \\"A list of issue type screen scheme mappings.\\" input IssueTypeScreenSchemeMappingDetails_Input { \\"The list of issue type to screen scheme mappings. A *default* entry cannot be specified because a default entry is added when an issue type screen scheme is created.\\" @@ -9718,25 +9374,19 @@ union updateDefaultScreenScheme_response = updateDefaultScreenScheme_400_respons type updateDefaultScreenScheme_400_response { errorMessages: [String] - errors: mutation_updateDefaultScreenScheme_oneOf_0_errors + errors: JSON } -scalar mutation_updateDefaultScreenScheme_oneOf_0_errors - type updateDefaultScreenScheme_403_response { errorMessages: [String] - errors: mutation_updateDefaultScreenScheme_oneOf_1_errors + errors: JSON } -scalar mutation_updateDefaultScreenScheme_oneOf_1_errors - type updateDefaultScreenScheme_404_response { errorMessages: [String] - errors: mutation_updateDefaultScreenScheme_oneOf_2_errors + errors: JSON } -scalar mutation_updateDefaultScreenScheme_oneOf_2_errors - \\"The ID of a screen scheme.\\" input UpdateDefaultScreenScheme_Input { \\"The ID of the screen scheme.\\" @@ -9747,25 +9397,19 @@ union removeMappingsFromIssueTypeScreenScheme_response = removeMappingsFromIssue type removeMappingsFromIssueTypeScreenScheme_400_response { errorMessages: [String] - errors: mutation_removeMappingsFromIssueTypeScreenScheme_oneOf_0_errors + errors: JSON } -scalar mutation_removeMappingsFromIssueTypeScreenScheme_oneOf_0_errors - type removeMappingsFromIssueTypeScreenScheme_403_response { errorMessages: [String] - errors: mutation_removeMappingsFromIssueTypeScreenScheme_oneOf_1_errors + errors: JSON } -scalar mutation_removeMappingsFromIssueTypeScreenScheme_oneOf_1_errors - type removeMappingsFromIssueTypeScreenScheme_404_response { errorMessages: [String] - errors: mutation_removeMappingsFromIssueTypeScreenScheme_oneOf_2_errors + errors: JSON } -scalar mutation_removeMappingsFromIssueTypeScreenScheme_oneOf_2_errors - \\"Details of how to filter and list search auto complete information.\\" input SearchAutoCompleteFilter_Input { \\"List of project IDs used to filter the visible field details returned.\\" @@ -10237,12 +9881,10 @@ enum mutationInput_toggleFeatureForProject_state { input ProjectRoleActorsUpdateBean_Input { \\"The ID of the project role. Use [Get all project roles](#api-rest-api-3-role-get) to get a list of project role IDs.\\" id: BigInt - categorisedActors: mutationInput_setActors_categorisedActors_Input2 + \\"The actors to add to the project role.\\\\n\\\\nAdd groups using:\\\\n\\\\n * \`atlassian-group-role-actor\` and a list of group names.\\\\n * \`atlassian-group-role-actor-id\` and a list of group IDs.\\\\n\\\\nAs a group's name can change, use of \`atlassian-group-role-actor-id\` is recommended. For example, \`\\\\\\"atlassian-group-role-actor-id\\\\\\":[\\\\\\"eef79f81-0b89-4fca-a736-4be531a10869\\\\\\",\\\\\\"77f6ab39-e755-4570-a6ae-2d7a8df0bcb8\\\\\\"]\`.\\\\n\\\\nAdd users using \`atlassian-user-role-actor\` and a list of account IDs. For example, \`\\\\\\"atlassian-user-role-actor\\\\\\":[\\\\\\"12345678-9abc-def1-2345-6789abcdef12\\\\\\", \\\\\\"abcdef12-3456-789a-bcde-f123456789ab\\\\\\"]\`.\\" + categorisedActors: JSON } -\\"The actors to add to the project role.\\\\n\\\\nAdd groups using:\\\\n\\\\n * \`atlassian-group-role-actor\` and a list of group names.\\\\n * \`atlassian-group-role-actor-id\` and a list of group IDs.\\\\n\\\\nAs a group's name can change, use of \`atlassian-group-role-actor-id\` is recommended. For example, \`\\\\\\"atlassian-group-role-actor-id\\\\\\":[\\\\\\"eef79f81-0b89-4fca-a736-4be531a10869\\\\\\",\\\\\\"77f6ab39-e755-4570-a6ae-2d7a8df0bcb8\\\\\\"]\`.\\\\n\\\\nAdd users using \`atlassian-user-role-actor\` and a list of account IDs. For example, \`\\\\\\"atlassian-user-role-actor\\\\\\":[\\\\\\"12345678-9abc-def1-2345-6789abcdef12\\\\\\", \\\\\\"abcdef12-3456-789a-bcde-f123456789ab\\\\\\"]\`.\\" -scalar mutationInput_setActors_categorisedActors_Input2 - input ActorsMap_Input { \\"The user account ID of the user to add.\\" user: [String] @@ -10297,18 +9939,14 @@ union createScreen_response = Screen | createScreen_400_response | createScreen_ type createScreen_400_response { errorMessages: [String] - errors: mutation_createScreen_oneOf_1_errors + errors: JSON } -scalar mutation_createScreen_oneOf_1_errors - type createScreen_403_response { errorMessages: [String] - errors: mutation_createScreen_oneOf_2_errors + errors: JSON } -scalar mutation_createScreen_oneOf_2_errors - \\"Details of a screen.\\" input ScreenDetails_Input { \\"The name of the screen. The name must be unique. The maximum length is 255 characters.\\" @@ -10321,48 +9959,36 @@ union updateScreen_response = Screen | updateScreen_400_response | updateScreen_ type updateScreen_400_response { errorMessages: [String] - errors: mutation_updateScreen_oneOf_1_errors + errors: JSON } -scalar mutation_updateScreen_oneOf_1_errors - type updateScreen_403_response { errorMessages: [String] - errors: mutation_updateScreen_oneOf_2_errors + errors: JSON } -scalar mutation_updateScreen_oneOf_2_errors - type updateScreen_404_response { errorMessages: [String] - errors: mutation_updateScreen_oneOf_3_errors + errors: JSON } -scalar mutation_updateScreen_oneOf_3_errors - union deleteScreen_response = Void_container | deleteScreen_400_response | deleteScreen_403_response | deleteScreen_404_response type deleteScreen_400_response { errorMessages: [String] - errors: mutation_deleteScreen_oneOf_1_errors + errors: JSON } -scalar mutation_deleteScreen_oneOf_1_errors - type deleteScreen_403_response { errorMessages: [String] - errors: mutation_deleteScreen_oneOf_2_errors + errors: JSON } -scalar mutation_deleteScreen_oneOf_2_errors - type deleteScreen_404_response { errorMessages: [String] - errors: mutation_deleteScreen_oneOf_3_errors + errors: JSON } -scalar mutation_deleteScreen_oneOf_3_errors - \\"A screen tab.\\" input ScreenableTab_Input { \\"The ID of the screen tab.\\" @@ -10400,25 +10026,19 @@ type ScreenSchemeId { type createScreenScheme_400_response { errorMessages: [String] - errors: mutation_createScreenScheme_oneOf_1_errors + errors: JSON } -scalar mutation_createScreenScheme_oneOf_1_errors - type createScreenScheme_403_response { errorMessages: [String] - errors: mutation_createScreenScheme_oneOf_2_errors + errors: JSON } -scalar mutation_createScreenScheme_oneOf_2_errors - type createScreenScheme_404_response { errorMessages: [String] - errors: mutation_createScreenScheme_oneOf_3_errors + errors: JSON } -scalar mutation_createScreenScheme_oneOf_3_errors - \\"Details of a screen scheme.\\" input ScreenSchemeDetails_Input { \\"The name of the screen scheme. The name must be unique. The maximum length is 255 characters.\\" @@ -10444,48 +10064,36 @@ union updateScreenScheme_response = updateScreenScheme_400_response | updateScre type updateScreenScheme_400_response { errorMessages: [String] - errors: mutation_updateScreenScheme_oneOf_0_errors + errors: JSON } -scalar mutation_updateScreenScheme_oneOf_0_errors - type updateScreenScheme_403_response { errorMessages: [String] - errors: mutation_updateScreenScheme_oneOf_1_errors + errors: JSON } -scalar mutation_updateScreenScheme_oneOf_1_errors - type updateScreenScheme_404_response { errorMessages: [String] - errors: mutation_updateScreenScheme_oneOf_2_errors + errors: JSON } -scalar mutation_updateScreenScheme_oneOf_2_errors - union deleteScreenScheme_response = Void_container | deleteScreenScheme_400_response | deleteScreenScheme_403_response | deleteScreenScheme_404_response type deleteScreenScheme_400_response { errorMessages: [String] - errors: mutation_deleteScreenScheme_oneOf_1_errors + errors: JSON } -scalar mutation_deleteScreenScheme_oneOf_1_errors - type deleteScreenScheme_403_response { errorMessages: [String] - errors: mutation_deleteScreenScheme_oneOf_2_errors + errors: JSON } -scalar mutation_deleteScreenScheme_oneOf_2_errors - type deleteScreenScheme_404_response { errorMessages: [String] - errors: mutation_deleteScreenScheme_oneOf_3_errors + errors: JSON } -scalar mutation_deleteScreenScheme_oneOf_3_errors - input SearchRequestBean_Input { \\"A [JQL](https://confluence.atlassian.com/x/egORLQ) expression.\\" jql: String @@ -10534,11 +10142,9 @@ union createStatuses_response = JiraStatus | createStatuses_400_response type createStatuses_400_response { errorMessages: [String] - errors: mutation_createStatuses_oneOf_1_errors + errors: JSON } -scalar mutation_createStatuses_oneOf_1_errors - \\"Details of the statuses being created and their scope.\\" input StatusCreateRequest_Input { \\"Details of the statuses being created.\\" @@ -10731,25 +10337,19 @@ type WorkflowIDs { type createWorkflow_400_response { errorMessages: [String] - errors: mutation_createWorkflow_oneOf_1_errors + errors: JSON } -scalar mutation_createWorkflow_oneOf_1_errors - type createWorkflow_403_response { errorMessages: [String] - errors: mutation_createWorkflow_oneOf_2_errors + errors: JSON } -scalar mutation_createWorkflow_oneOf_2_errors - type createWorkflow_404_response { errorMessages: [String] - errors: mutation_createWorkflow_oneOf_3_errors + errors: JSON } -scalar mutation_createWorkflow_oneOf_3_errors - \\"The details of a workflow.\\" input CreateWorkflowDetails_Input { \\"The name of the workflow. The name must be unique. The maximum length is 255 characters. Characters can be separated by a whitespace but the name cannot start or end with a whitespace.\\" @@ -10775,7 +10375,8 @@ input CreateWorkflowTransitionDetails_Input { type: mutationInput_createWorkflow_transitions_items_type! rules: CreateWorkflowTransitionRulesDetails_Input screen: CreateWorkflowTransitionScreenDetails_Input - properties: mutationInput_createWorkflow_transitions_items_Input2 + \\"The properties of the transition.\\" + properties: JSON } \\"The type of the transition.\\" @@ -10801,7 +10402,8 @@ input CreateWorkflowCondition_Input { conditions: [CreateWorkflowCondition_Input] \\"The type of the transition rule.\\" type: String - configuration: mutationInput_createWorkflow_transitions_items_rules_conditions_conditions_items_configuration_additionalProperties_Input2 + \\"EXPERIMENTAL. The configuration of the transition rule.\\" + configuration: JSON } \\"The compound condition operator.\\" @@ -10810,14 +10412,12 @@ enum mutationInput_createWorkflow_transitions_items_rules_conditions_operator { OR } -\\"EXPERIMENTAL. The configuration of the transition rule.\\" -scalar mutationInput_createWorkflow_transitions_items_rules_conditions_conditions_items_configuration_additionalProperties_Input2 - \\"A workflow transition rule.\\" input CreateWorkflowTransitionRule_Input { \\"The type of the transition rule.\\" type: String! - configuration: mutationInput_createWorkflow_transitions_items_rules_conditions_conditions_items_configuration_additionalProperties_Input2 + \\"EXPERIMENTAL. The configuration of the transition rule.\\" + configuration: JSON } \\"The details of a transition screen.\\" @@ -10826,19 +10426,14 @@ input CreateWorkflowTransitionScreenDetails_Input { id: String! } -\\"The properties of the transition.\\" -scalar mutationInput_createWorkflow_transitions_items_Input2 - \\"The details of a transition status.\\" input CreateWorkflowStatusDetails_Input { \\"The ID of the status.\\" id: String! - properties: mutationInput_createWorkflow_statuses_items_Input2 + \\"The properties of the status.\\" + properties: JSON } -\\"The properties of the status.\\" -scalar mutationInput_createWorkflow_statuses_items_Input2 - union updateWorkflowTransitionRuleConfigurations_response = WorkflowTransitionRulesUpdateErrors | ErrorCollection \\"Details of any errors encountered while updating workflow transition rules.\\" @@ -10850,16 +10445,12 @@ type WorkflowTransitionRulesUpdateErrors { \\"Details of any errors encountered while updating workflow transition rules for a workflow.\\" type WorkflowTransitionRulesUpdateErrorDetails { workflowId: WorkflowId! - ruleUpdateErrors: mutation_updateWorkflowTransitionRuleConfigurations_oneOf_0_updateResults_items_ruleUpdateErrors! + \\"A list of transition rule update errors, indexed by the transition rule ID. Any transition rule that appears here wasn't updated.\\" + ruleUpdateErrors: JSON! \\"The list of errors that specify why the workflow update failed. The workflow was not updated if the list contains any entries.\\" updateErrors: [String]! } -\\"A list of transition rule update errors, indexed by the transition rule ID. Any transition rule that appears here wasn't updated.\\" -type mutation_updateWorkflowTransitionRuleConfigurations_oneOf_0_updateResults_items_ruleUpdateErrors { - additionalProperties: JSON -} - \\"Details about a workflow configuration update request.\\" input WorkflowTransitionRulesUpdate_Input { \\"The list of workflows with transition rules to update.\\" @@ -10892,7 +10483,7 @@ input ConnectWorkflowTransitionRule_Input { \\"The key of the rule, as defined in the Connect app descriptor.\\" key: String! configuration: RuleConfiguration_Input! - transition: WorkflowTransition_Input + transition: WorkflowTransition_Input2 } \\"A rule configuration.\\" @@ -10906,12 +10497,7 @@ input RuleConfiguration_Input { } \\"A workflow transition.\\" -input WorkflowTransition_Input { - \\"The transition ID.\\" - id: Int! - \\"The transition name.\\" - name: String! -} +scalar WorkflowTransition_Input2 union deleteWorkflowTransitionRuleConfigurations_response = WorkflowTransitionRulesUpdateErrors | ErrorCollection @@ -10935,25 +10521,19 @@ union deleteInactiveWorkflow_response = Void_container | deleteInactiveWorkflow_ type deleteInactiveWorkflow_400_response { errorMessages: [String] - errors: mutation_deleteInactiveWorkflow_oneOf_1_errors + errors: JSON } -scalar mutation_deleteInactiveWorkflow_oneOf_1_errors - type deleteInactiveWorkflow_403_response { errorMessages: [String] - errors: mutation_deleteInactiveWorkflow_oneOf_2_errors + errors: JSON } -scalar mutation_deleteInactiveWorkflow_oneOf_2_errors - type deleteInactiveWorkflow_404_response { errorMessages: [String] - errors: mutation_deleteInactiveWorkflow_oneOf_3_errors + errors: JSON } -scalar mutation_deleteInactiveWorkflow_oneOf_3_errors - \\"Details about a workflow scheme.\\" input WorkflowScheme_Input { \\"The ID of the workflow scheme.\\" @@ -10964,10 +10544,12 @@ input WorkflowScheme_Input { description: String \\"The name of the default workflow for the workflow scheme. The default workflow has *All Unassigned Issue Types* assigned to it in Jira. If \`defaultWorkflow\` is not specified when creating a workflow scheme, it is set to *Jira Workflow (jira)*.\\" defaultWorkflow: String - issueTypeMappings: query_getAllWorkflowSchemes_values_items_issueTypeMappings_Input2 + \\"The issue type to workflow mappings, where each mapping is an issue type ID and workflow name pair. Note that an issue type can only be mapped to one workflow in a workflow scheme.\\" + issueTypeMappings: JSON \\"For draft workflow schemes, this property is the name of the default workflow for the original workflow scheme. The default workflow has *All Unassigned Issue Types* assigned to it in Jira.\\" originalDefaultWorkflow: String - originalIssueTypeMappings: query_getAllWorkflowSchemes_values_items_originalIssueTypeMappings_Input2 + \\"For draft workflow schemes, this property is the issue type to workflow mappings for the original workflow scheme, where each mapping is an issue type ID and workflow name pair. Note that an issue type can only be mapped to one workflow in a workflow scheme.\\" + originalIssueTypeMappings: JSON \\"Whether the workflow scheme is a draft or not.\\" draft: Boolean lastModifiedUser: User_Input @@ -10979,12 +10561,6 @@ input WorkflowScheme_Input { issueTypes: IssueTypeDetails_Input2 } -\\"The issue type to workflow mappings, where each mapping is an issue type ID and workflow name pair. Note that an issue type can only be mapped to one workflow in a workflow scheme.\\" -scalar query_getAllWorkflowSchemes_values_items_issueTypeMappings_Input2 - -\\"For draft workflow schemes, this property is the issue type to workflow mappings for the original workflow scheme, where each mapping is an issue type ID and workflow name pair. Note that an issue type can only be mapped to one workflow in a workflow scheme.\\" -scalar query_getAllWorkflowSchemes_values_items_originalIssueTypeMappings_Input2 - \\"Details about an issue type.\\" input IssueTypeDetails_Input2 { \\"The URL of these issue type details.\\" @@ -11002,7 +10578,7 @@ input IssueTypeDetails_Input2 { \\"The ID of the issue type's avatar.\\" avatarId: BigInt \\"Unique ID for next-gen projects.\\" - entityId: String + entityId: UUID \\"Hierarchy level of the issue type.\\" hierarchyLevel: Int scope: Scope_Input2 @@ -11012,25 +10588,19 @@ union assignSchemeToProject_response = assignSchemeToProject_400_response | assi type assignSchemeToProject_400_response { errorMessages: [String] - errors: mutation_assignSchemeToProject_oneOf_0_errors + errors: JSON } -scalar mutation_assignSchemeToProject_oneOf_0_errors - type assignSchemeToProject_403_response { errorMessages: [String] - errors: mutation_assignSchemeToProject_oneOf_1_errors + errors: JSON } -scalar mutation_assignSchemeToProject_oneOf_1_errors - type assignSchemeToProject_404_response { errorMessages: [String] - errors: mutation_assignSchemeToProject_oneOf_2_errors + errors: JSON } -scalar mutation_assignSchemeToProject_oneOf_2_errors - \\"An associated workflow scheme and project.\\" input WorkflowSchemeProjectAssociation_Input { \\"The ID of the workflow scheme. If the workflow scheme ID is \`null\`, the operation assigns the default workflow scheme.\\" @@ -11061,18 +10631,14 @@ union publishDraftWorkflowScheme_response = Void_container | TaskProgressBeanObj type publishDraftWorkflowScheme_400_response { errorMessages: [String] - errors: mutation_publishDraftWorkflowScheme_oneOf_2_errors + errors: JSON } -scalar mutation_publishDraftWorkflowScheme_oneOf_2_errors - type publishDraftWorkflowScheme_404_response { errorMessages: [String] - errors: mutation_publishDraftWorkflowScheme_oneOf_3_errors + errors: JSON } -scalar mutation_publishDraftWorkflowScheme_oneOf_3_errors - \\"Details about the status mappings for publishing a draft workflow scheme.\\" input PublishDraftWorkflowScheme_Input { \\"Mappings of statuses to new statuses for issue types.\\" @@ -11119,23 +10685,27 @@ input ConnectModules_Input { \\"A [Connect module](https://developer.atlassian.com/cloud/jira/platform/about-jira-modules/) in the same format as in the\\\\n[app descriptor](https://developer.atlassian.com/cloud/jira/platform/app-descriptor/).\\" input ConnectModule_Input { - description: description_Input + description: query_DynamicModulesResource_getModules_get_oneOf_0_modules_items_description_Input type: String - extractions: [extractions_items_Input] - name: description_Input + extractions: [query_DynamicModulesResource_getModules_get_oneOf_0_modules_items_extractions_items_Input] + name: query_DynamicModulesResource_getModules_get_oneOf_0_modules_items_name_Input key: String } -input description_Input { +input query_DynamicModulesResource_getModules_get_oneOf_0_modules_items_description_Input { value: String } -input extractions_items_Input { +input query_DynamicModulesResource_getModules_get_oneOf_0_modules_items_extractions_items_Input { path: String type: String name: String } +input query_DynamicModulesResource_getModules_get_oneOf_0_modules_items_name_Input { + value: String +} + union DynamicModulesResource_removeModules_delete_response = Void_container | ErrorMessage \\"Details of updates for a custom field.\\" @@ -11185,9 +10755,9 @@ input EntityPropertyDetails_Input { \\"Details of workflow transition rules.\\" type WorkflowRulesSearchDetails { \\"The workflow ID.\\" - workflowEntityId: String + workflowEntityId: UUID \\"List of workflow rule IDs that do not belong to the workflow or can not be found.\\" - invalidRules: [String] + invalidRules: [UUID] \\"List of valid workflow transition rules.\\" validRules: [WorkflowTransitionRules] } @@ -11195,9 +10765,9 @@ type WorkflowRulesSearchDetails { \\"Details of the workflow and its transition rules.\\" input WorkflowRulesSearch_Input { \\"The workflow ID.\\" - workflowEntityId: String! + workflowEntityId: UUID! \\"The list of workflow rule IDs.\\" - ruleIds: [String]! + ruleIds: [UUID]! \\"Use expand to include additional information in the response. This parameter accepts \`transition\` which, for each rule, returns information about the transition the rule is assigned to.\\" expand: String }" diff --git a/examples/openapi-orbit/tests/__snapshots__/orbit.test.js.snap b/examples/openapi-orbit/tests/__snapshots__/orbit.test.js.snap index 2cac58ae48a4a..fd6fc64d32786 100644 --- a/examples/openapi-orbit/tests/__snapshots__/orbit.test.js.snap +++ b/examples/openapi-orbit/tests/__snapshots__/orbit.test.js.snap @@ -18,9 +18,9 @@ type Query { \\"List all activity types for a workspace\\" by_workspace_slug_activity_types(workspace_slug: String!): by_workspace_slug_activity_types_200_response \\"List activities for a member\\" - by_workspace_slug_members_by_member_slug_activities(input: by_workspace_slug_members_by_member_slug_activities_request_Input, workspace_slug: String!, member_slug: String!): by_workspace_slug_members_by_member_slug_activities_200_response + by_workspace_slug_members_by_member_slug_activities(input: by_workspace_slug_members_by_member_slug_activities_request_Input, workspace_slug: String!, member_slug: String!): by_workspace_slug_activities_200_response \\"Get the member's notes\\" - by_workspace_slug_members_by_member_slug_notes(input: by_workspace_slug_members_by_member_slug_notes_request_Input, workspace_slug: String!, member_slug: String!): by_workspace_slug_members_by_member_slug_activities_200_response + by_workspace_slug_members_by_member_slug_notes(input: by_workspace_slug_members_by_member_slug_notes_request_Input, workspace_slug: String!, member_slug: String!): by_workspace_slug_activities_200_response \\"List members in a workspace\\" by_workspace_slug_members(input: by_workspace_slug_members_request_Input, workspace_slug: String!): by_workspace_slug_activities_200_response \\"Get a member\\" @@ -28,11 +28,11 @@ type Query { \\"Provide a source and one of username/uid/email params to return a member with that identity, if one exists. Common values for source include github, twitter, and email.\\" by_workspace_slug_members_find(input: by_workspace_slug_members_find_request_Input, workspace_slug: String!): by_workspace_slug_members_find_response \\"List member activities in an organization\\" - by_workspace_slug_organizations_by_organization_id_activities(input: by_workspace_slug_organizations_by_organization_id_activities_request_Input, workspace_slug: String!, organization_id: String!): by_workspace_slug_members_by_member_slug_activities_200_response + by_workspace_slug_organizations_by_organization_id_activities(input: by_workspace_slug_organizations_by_organization_id_activities_request_Input, workspace_slug: String!, organization_id: String!): by_workspace_slug_activities_200_response \\"List members in an organization\\" by_workspace_slug_organizations_by_organization_id_members(input: by_workspace_slug_organizations_by_organization_id_members_request_Input, workspace_slug: String!, organization_id: String!): by_workspace_slug_activity_types_200_response \\"List organizations in a workspace\\" - by_workspace_slug_organizations(input: by_workspace_slug_organizations_request_Input, workspace_slug: String!): by_workspace_slug_organizations_200_response + by_workspace_slug_organizations(input: by_workspace_slug_organizations_request_Input, workspace_slug: String!): by_workspace_slug_activity_types_200_response \\"Get an organization\\" by_workspace_slug_organizations_by_organization_id(workspace_slug: String!, organization_id: String!): user_200_response \\"Get a workspace stats\\" @@ -116,8 +116,8 @@ scalar Void type query_by_workspace_slug_activities_data_items_relationships { activity_type: query_by_workspace_slug_activities_data_items_relationships_activity_type - member: query_by_workspace_slug_activities_data_items_relationships_activity_type - repository: query_by_workspace_slug_activities_data_items_relationships_activity_type + member: query_by_workspace_slug_activities_data_items_relationships_member + repository: query_by_workspace_slug_activities_data_items_relationships_repository } type query_by_workspace_slug_activities_data_items_relationships_activity_type { @@ -129,6 +129,24 @@ type query_by_workspace_slug_activities_data_items_relationships_activity_type_d type: String } +type query_by_workspace_slug_activities_data_items_relationships_member { + data: query_by_workspace_slug_activities_data_items_relationships_member_data +} + +type query_by_workspace_slug_activities_data_items_relationships_member_data { + id: String + type: String +} + +type query_by_workspace_slug_activities_data_items_relationships_repository { + data: query_by_workspace_slug_activities_data_items_relationships_repository_data +} + +type query_by_workspace_slug_activities_data_items_relationships_repository_data { + id: String + type: String +} + type query_by_workspace_slug_activities_included_items { id: String type: String @@ -239,7 +257,7 @@ enum queryInput_by_workspace_slug_activities_sort { type by_workspace_slug_activities_by_id_200_response { data: query_by_workspace_slug_activities_by_id_data - included: [query_by_workspace_slug_activities_included_items] + included: [query_by_workspace_slug_activities_by_id_included_items] } type query_by_workspace_slug_activities_by_id_data { @@ -268,17 +286,83 @@ type query_by_workspace_slug_activities_by_id_data_attributes2 { } type query_by_workspace_slug_activities_by_id_data_relationships { - activity_type: query_by_workspace_slug_activities_data_items_relationships_activity_type - member: query_by_workspace_slug_activities_data_items_relationships_activity_type - repository: query_by_workspace_slug_activities_data_items_relationships_activity_type - user: query_by_workspace_slug_activities_data_items_relationships_activity_type + activity_type: query_by_workspace_slug_activities_by_id_data_relationships_activity_type + member: query_by_workspace_slug_activities_by_id_data_relationships_member + repository: query_by_workspace_slug_activities_by_id_data_relationships_repository + user: query_by_workspace_slug_activities_by_id_data_relationships_user +} + +type query_by_workspace_slug_activities_by_id_data_relationships_activity_type { + data: query_by_workspace_slug_activities_by_id_data_relationships_activity_type_data +} + +type query_by_workspace_slug_activities_by_id_data_relationships_activity_type_data { + id: String + type: String +} + +type query_by_workspace_slug_activities_by_id_data_relationships_member { + data: query_by_workspace_slug_activities_by_id_data_relationships_member_data +} + +type query_by_workspace_slug_activities_by_id_data_relationships_member_data { + id: String + type: String +} + +type query_by_workspace_slug_activities_by_id_data_relationships_repository { + data: query_by_workspace_slug_activities_by_id_data_relationships_repository_data +} + +type query_by_workspace_slug_activities_by_id_data_relationships_repository_data { + id: String + type: String +} + +type query_by_workspace_slug_activities_by_id_data_relationships_user { + data: query_by_workspace_slug_activities_by_id_data_relationships_user_data +} + +type query_by_workspace_slug_activities_by_id_data_relationships_user_data { + id: String + type: String +} + +type query_by_workspace_slug_activities_by_id_included_items { + id: String + type: String + attributes: query_by_workspace_slug_activities_by_id_included_items_attributes +} + +type query_by_workspace_slug_activities_by_id_included_items_attributes { + name: String + short_name: String + key: URL + channel: String + source: String + weight: String } type by_workspace_slug_activity_types_200_response { - data: [query_by_workspace_slug_activities_included_items] + data: [query_by_workspace_slug_activity_types_data_items] links: query_by_workspace_slug_activity_types_links } +type query_by_workspace_slug_activity_types_data_items { + id: String + type: String + attributes: query_by_workspace_slug_activity_types_data_items_attributes +} + +type query_by_workspace_slug_activity_types_data_items_attributes { + name: String + short_name: String + key: URL + channel: String + source: String + weight: String +} + type query_by_workspace_slug_activity_types_links { first: String last: String @@ -286,12 +370,6 @@ type query_by_workspace_slug_activity_types_links { next: Void } -type by_workspace_slug_members_by_member_slug_activities_200_response { - data: [query_by_workspace_slug_activities_data_items] - included: [query_by_workspace_slug_activities_included_items] - links: query_by_workspace_slug_activity_types_links -} - input by_workspace_slug_members_by_member_slug_activities_request_Input { page: String direction: queryInput_by_workspace_slug_activities_direction @@ -471,11 +549,6 @@ input by_workspace_slug_organizations_by_organization_id_members_request_Input { items: queryInput_by_workspace_slug_activities_items } -type by_workspace_slug_organizations_200_response { - data: [query_by_workspace_slug_activities_included_items] - links: query_by_workspace_slug_activities_links -} - input by_workspace_slug_organizations_request_Input { query: String page: String @@ -500,10 +573,32 @@ input by_workspace_slug_reports_request_Input { } type workspaces_200_response { - data: [query_by_workspace_slug_activities_data_items] + data: [query_workspaces_data_items] included: [JSON] } +type query_workspaces_data_items { + id: String + type: String + attributes: query_workspaces_data_items_attributes + relationships: query_workspaces_data_items_relationships +} + +type query_workspaces_data_items_attributes { + name: String + slug: String + updated_at: DateTime + created_at: DateTime +} + +type query_workspaces_data_items_relationships { + repositories: query_workspaces_data_items_relationships_repositories +} + +type query_workspaces_data_items_relationships_repositories { + data: [JSON] +} + type Mutation { \\"Use this method when you know an identity of the member (github, email, twitter, etc.) but not their Orbit ID. Pass fields in the member object to update the member in addition to creating the activity.\\" post_by_workspace_slug_activities(input: activity_and_identity_Input, workspace_slug: String!): post_by_workspace_slug_activities_response @@ -518,7 +613,7 @@ type Mutation { \\"Remove identity from a member\\" delete_by_workspace_slug_members_by_member_slug_identities(input: identity_Input!, workspace_slug: String!, member_slug: String!): delete_by_workspace_slug_members_by_member_slug_identities_response \\"Create a note\\" - post_by_workspace_slug_members_by_member_slug_notes(input: note_Input!, workspace_slug: String!, member_slug: String!): post_by_workspace_slug_members_by_member_slug_notes_201_response + post_by_workspace_slug_members_by_member_slug_notes(input: note_Input!, workspace_slug: String!, member_slug: String!): user_200_response \\"Update a note\\" put_by_workspace_slug_members_by_member_slug_notes_by_id(input: note_Input!, workspace_slug: String!, member_slug: String!, id: String!): Void \\"This method is useful when you know a member's identity in another system and want to create or update the corresponding Orbit member. Identities can be specified in the identity object or member attributes like member.github. If no member exists, a new member will be created and linked to any provided identities.\\" @@ -556,7 +651,7 @@ type mutation_post_by_workspace_slug_activities_oneOf_0_data_attributes { occurred_at: DateTime updated_at: DateTime type: String - properties: mutation_post_by_workspace_slug_activities_oneOf_0_data_attributes2 + properties: JSON tags: [String] orbit_url: URL weight: String @@ -568,8 +663,6 @@ type mutation_post_by_workspace_slug_activities_oneOf_0_data_attributes { custom_context: Void } -scalar mutation_post_by_workspace_slug_activities_oneOf_0_data_attributes2 - type mutation_post_by_workspace_slug_activities_oneOf_0_data_relationships { activity_type: mutation_post_by_workspace_slug_activities_oneOf_0_data_relationships_activity_type member: mutation_post_by_workspace_slug_activities_oneOf_0_data_relationships_member @@ -731,7 +824,7 @@ type mutation_post_by_workspace_slug_members_by_member_slug_activities_oneOf_0_d occurred_at: DateTime updated_at: DateTime type: String - properties: mutation_post_by_workspace_slug_members_by_member_slug_activities_oneOf_0_data_attributes2 + properties: JSON tags: [String] orbit_url: URL weight: String @@ -743,8 +836,6 @@ type mutation_post_by_workspace_slug_members_by_member_slug_activities_oneOf_0_d custom_context: Void } -scalar mutation_post_by_workspace_slug_members_by_member_slug_activities_oneOf_0_data_attributes2 - type mutation_post_by_workspace_slug_members_by_member_slug_activities_oneOf_0_data_relationships { activity_type: mutation_post_by_workspace_slug_members_by_member_slug_activities_oneOf_0_data_relationships_activity_type member: mutation_post_by_workspace_slug_members_by_member_slug_activities_oneOf_0_data_relationships_member @@ -893,29 +984,6 @@ type mutation_delete_by_workspace_slug_members_by_member_slug_identities_oneOf_1 identity: [String] } -type post_by_workspace_slug_members_by_member_slug_notes_201_response { - data: mutation_post_by_workspace_slug_members_by_member_slug_notes_data -} - -type mutation_post_by_workspace_slug_members_by_member_slug_notes_data { - id: String - type: String - attributes: mutation_post_by_workspace_slug_members_by_member_slug_notes_data_attributes - relationships: mutation_post_by_workspace_slug_members_by_member_slug_notes_data_relationships -} - -type mutation_post_by_workspace_slug_members_by_member_slug_notes_data_attributes { - id: String - created_at: DateTime - body: String - updated_at: DateTime -} - -type mutation_post_by_workspace_slug_members_by_member_slug_notes_data_relationships { - member: query_by_workspace_slug_activities_data_items_relationships_activity_type - user: query_by_workspace_slug_activities_data_items_relationships_activity_type -} - input note_Input { body: String! } diff --git a/packages/handlers/openapi/test/example_api_server.ts b/packages/handlers/openapi/test/example_api_server.ts index f489027069ab9..341cbb7e40824 100644 --- a/packages/handlers/openapi/test/example_api_server.ts +++ b/packages/handlers/openapi/test/example_api_server.ts @@ -523,7 +523,7 @@ export function startServer(PORT: number) { app.get('/api/products/:id', (req, res) => { if (typeof req.params.id !== 'undefined' && typeof req.query['product-tag'] !== 'undefined') { const product = { - product_id: req.params.id, + 'product-id': req.params.id, 'product-tag': req.query['product-tag'], 'product-name': 'Super Product', }; diff --git a/packages/json-machete/src/healJSONSchema.ts b/packages/json-machete/src/healJSONSchema.ts index 3db58a2a5f746..4920b3342b78b 100644 --- a/packages/json-machete/src/healJSONSchema.ts +++ b/packages/json-machete/src/healJSONSchema.ts @@ -23,6 +23,7 @@ const JSONSchemaStringFormats = [ 'ipv4', 'ipv6', 'uri', + 'uuid', ]; const AnySchema = { @@ -183,7 +184,11 @@ export async function healJSONSchema( if (typeof subSchema.additionalProperties === 'object') { delete subSchema.additionalProperties.readOnly; delete subSchema.additionalProperties.writeOnly; - if (Object.keys(subSchema.additionalProperties).length === 0) { + const additionalPropertiesKeys = Object.keys(subSchema.additionalProperties); + if ( + additionalPropertiesKeys.length === 0 || + (additionalPropertiesKeys.length === 1 && subSchema.additionalProperties.type === 'string') + ) { logger.debug( `${path} has an empty additionalProperties object. So this is invalid. Replacing it with 'true'` ); @@ -194,19 +199,19 @@ export async function healJSONSchema( logger.debug(`${path} has an "allOf" definition with only one element. Removing it.`); const realSubschema = subSchema.allOf[0]; delete subSchema.allOf; - return realSubschema; + subSchema = realSubschema; } if (subSchema.anyOf != null && subSchema.anyOf.length === 1 && !subSchema.properties) { logger.debug(`${path} has an "anyOf" definition with only one element. Removing it.`); const realSubschema = subSchema.anyOf[0]; delete subSchema.anyOf; - return realSubschema; + subSchema = realSubschema; } if (subSchema.oneOf != null && subSchema.oneOf.length === 1 && !subSchema.properties) { logger.debug(`${path} has an "oneOf" definition with only one element. Removing it.`); const realSubschema = subSchema.oneOf[0]; delete subSchema.oneOf; - return realSubschema; + subSchema = realSubschema; } if (subSchema.description != null) { subSchema.description = subSchema.description.trim(); @@ -223,7 +228,7 @@ export async function healJSONSchema( ); const realSubschema = subSchema.items; delete subSchema.items; - return realSubschema; + subSchema = realSubschema; } if (subSchema.properties && subSchema.type !== 'object') { logger.debug(`${path} has "properties" with no type defined. Adding a type property with "object" value.`); @@ -321,8 +326,12 @@ export async function healJSONSchema( } } // If it is an object type but no properties given while example is available - if (((subSchema.type === 'object' && !subSchema.properties) || !subSchema.type) && subSchema.example) { - const generatedSchema = toJsonSchema(subSchema.example, { + if ( + ((subSchema.type === 'object' && !subSchema.properties) || !subSchema.type) && + (subSchema.example || subSchema.examples) + ) { + const examples = asArray(subSchema.examples || subSchema.example || []); + const generatedSchema = toJsonSchema(examples[0], { required: false, objects: { additionalProperties: false, @@ -333,11 +342,14 @@ export async function healJSONSchema( arrays: { mode: 'first', }, + postProcessFnc(type, schema, value, defaultFunc) { + if (schema.type === 'object' && !schema.properties && Object.keys(value).length === 0) { + return AnySchema as any; + } + return defaultFunc(type, schema, value); + }, }); - const healedGeneratedSchema: any = await healJSONSchema(generatedSchema as any, { - noDeduplication, - logger: logger.child('toJsonSchema'), - }); + const healedGeneratedSchema: any = generatedSchema; subSchema.type = asArray(healedGeneratedSchema.type)[0] as any; subSchema.properties = healedGeneratedSchema.properties; // If type for properties is already given, use it diff --git a/packages/loaders/json-schema/src/addExecutionLogicToComposer.ts b/packages/loaders/json-schema/src/addExecutionLogicToComposer.ts index 0cabe66e8f662..533786fa91190 100644 --- a/packages/loaders/json-schema/src/addExecutionLogicToComposer.ts +++ b/packages/loaders/json-schema/src/addExecutionLogicToComposer.ts @@ -160,25 +160,14 @@ ${operationConfig.description || ''} const nonInterpolatedValue = nonInterpolatedHeaders[headerName]; const interpolatedValue = stringInterpolator.parse(nonInterpolatedValue, interpolationData); if (interpolatedValue) { - headers[headerName] = interpolatedValue; + headers[headerName.toLowerCase()] = interpolatedValue; } } const requestInit: RequestInit = { method: httpMethod, headers, }; - if (queryParams) { - const interpolatedQueryParams: Record = {}; - for (const queryParamName in queryParams) { - interpolatedQueryParams[queryParamName] = stringInterpolator.parse( - queryParams[queryParamName], - interpolationData - ); - } - const queryParamsString = qsStringify(interpolatedQueryParams, qsOptions); - fullPath += fullPath.includes('?') ? '&' : '?'; - fullPath += queryParamsString; - } + const queryParamNames = []; // Handle binary data if ('binary' in operationConfig) { const binaryUpload = await args.input; @@ -224,6 +213,10 @@ ${operationConfig.description || ''} case 'CONNECT': case 'OPTIONS': case 'TRACE': { + // keep input keys for handling duplications + if (typeof input === 'object') { + queryParamNames.push(...Object.keys(input)); + } fullPath += fullPath.includes('?') ? '&' : '?'; fullPath += qsStringify(input, qsOptions); break; @@ -237,7 +230,7 @@ ${operationConfig.description || ''} if (contentType?.startsWith('application/x-www-form-urlencoded')) { requestInit.body = qsStringify(input, qsOptions); } else { - requestInit.body = JSON.stringify(input); + requestInit.body = typeof input === 'object' ? JSON.stringify(input) : input; } break; } @@ -249,6 +242,21 @@ ${operationConfig.description || ''} } } } + if (queryParams) { + const interpolatedQueryParams: Record = {}; + for (const queryParamName in queryParams) { + if (queryParamNames.includes(queryParamName)) { + continue; + } + interpolatedQueryParams[queryParamName] = stringInterpolator.parse( + queryParams[queryParamName], + interpolationData + ); + } + const queryParamsString = qsStringify(interpolatedQueryParams, qsOptions); + fullPath += fullPath.includes('?') ? '&' : '?'; + fullPath += queryParamsString; + } // Delete unused queryparams const [actualPath, queryString] = fullPath.split('?'); @@ -300,12 +308,16 @@ ${operationConfig.description || ''} if (!response.status.toString().startsWith('2')) { const returnNamedGraphQLType = getNamedType(field.type.getType()); if (!isUnionType(returnNamedGraphQLType)) { - return createError(`HTTP Error: ${response.status}`, { - url: fullPath, - method: httpMethod, - ...(response.statusText ? { status: response.statusText } : {}), - responseJson, - }); + return createError( + `HTTP Error: ${response.status}, Could not invoke operation ${operationConfig.method} ${operationConfig.path}`, + { + method: httpMethod, + url: fullPath, + statusCode: response.status, + statusText: response.statusText, + responseBody: responseJson, + } + ); } } @@ -368,7 +380,12 @@ ${operationConfig.description || ''} }, }); case 'header': + if ('get' in requestInit.headers) { + return getHeadersObj(requestInit.headers as Headers); + } return requestInit.headers; + case 'body': + return requestInit.body; } }, } @@ -386,6 +403,17 @@ ${operationConfig.description || ''} return getHeadersObj(response.headers); case 'body': return obj; + case 'query': + return qsParse(fullPath.split('?')[1]); + case 'path': + return new Proxy(args, { + get(_, prop) { + return args[prop] || args.input?.[prop] || obj?.[prop]; + }, + has(_, prop) { + return prop in args || (args.input && prop in args.input) || obj?.[prop]; + }, + }); } }, } @@ -404,12 +432,13 @@ ${operationConfig.description || ''} interpolationStrings.push(operationConfig.path); if ('links' in operationConfig) { + const queryFields = schemaComposer.Query.getFields(); for (const linkName in operationConfig.links) { const linkObj = operationConfig.links[linkName]; const typeTC = schemaComposer.getOTC(field.type.getTypeName()); typeTC.addFields({ [linkName]: () => { - const targetField = schemaComposer.Query.getField(linkObj.fieldName); + const targetField = queryFields[linkObj.fieldName] || schemaComposer.Mutation.getField(linkObj.fieldName); return { ...targetField, args: {}, @@ -458,11 +487,13 @@ ${operationConfig.description || ''} }, }); } + const queryFields = schemaComposer.Query.getFields(); for (const linkName in responseConfig.links || []) { typeTC.addFields({ [linkName]: () => { const linkObj = responseConfig.links[linkName]; - const targetField = schemaComposer.Query.getField(linkObj.fieldName); + const targetField = + queryFields[linkObj.fieldName] || schemaComposer.Mutation.getField(linkObj.fieldName); return { ...targetField, args: {}, diff --git a/packages/loaders/json-schema/src/getComposerFromJSONSchema.ts b/packages/loaders/json-schema/src/getComposerFromJSONSchema.ts index edb97e8c0facb..7bcd01b0e7445 100644 --- a/packages/loaders/json-schema/src/getComposerFromJSONSchema.ts +++ b/packages/loaders/json-schema/src/getComposerFromJSONSchema.ts @@ -28,6 +28,7 @@ import { GraphQLDateTime, GraphQLEmailAddress, GraphQLJSON, + GraphQLUUID, GraphQLIPv4, GraphQLIPv6, GraphQLTime, @@ -90,7 +91,7 @@ export function getComposerFromJSONSchema(schema: JSONSchema, logger: Logger): P return visitJSONSchema(schema, { enter(subSchema: JSONSchema, { path, visitedSubschemaResultMap }) { - if (typeof subSchema === 'boolean') { + if (typeof subSchema === 'boolean' || subSchema.title === 'Any') { const typeComposer = schemaComposer.getAnyTC(GraphQLJSON); return subSchema ? { @@ -330,6 +331,15 @@ export function getComposerFromJSONSchema(schema: JSONSchema, logger: Logger): P nullable: subSchema.nullable, }; } + case 'uuid': { + const typeComposer = schemaComposer.getAnyTC(GraphQLUUID); + return { + input: typeComposer, + output: typeComposer, + description: subSchema.description, + nullable: subSchema.nullable, + }; + } default: { const formatScalar = formatScalarMap.get(subSchema.format) || GraphQLString; const typeComposer = schemaComposer.getAnyTC(formatScalar); @@ -832,12 +842,22 @@ export function getComposerFromJSONSchema(schema: JSONSchema, logger: Logger): P inputFieldMap[fieldName] = inputTCFieldMap[fieldName]; } } - } else { + } else if (Object.keys(fieldMap).length > 0) { fieldMap.additionalProperties = { type: GraphQLJSON, resolve: (root: any) => root, }; inputFieldMap = {}; + } else { + const typeComposer = schemaComposer.getAnyTC(GraphQLJSON); + schemaComposer.delete((subSchemaAndTypeComposers.input as ObjectTypeComposer)?.getTypeName?.()); + schemaComposer.delete((subSchemaAndTypeComposers.output as ObjectTypeComposer)?.getTypeName?.()); + return { + input: typeComposer, + output: typeComposer, + description: subSchemaAndTypeComposers.description, + nullable: subSchemaAndTypeComposers.nullable, + }; } } diff --git a/packages/loaders/json-schema/src/getTypeResolverFromOutputTCs.ts b/packages/loaders/json-schema/src/getTypeResolverFromOutputTCs.ts index 9290a06f91da7..000f140c2b1da 100644 --- a/packages/loaders/json-schema/src/getTypeResolverFromOutputTCs.ts +++ b/packages/loaders/json-schema/src/getTypeResolverFromOutputTCs.ts @@ -28,19 +28,34 @@ export function getTypeResolverFromOutputTCs( } } const validationErrors: Record = {}; - for (const outputTypeComposer of outputTypeComposers) { - const validateFn = outputTypeComposer.getExtension('validateWithJSONSchema') as ValidateFunction; - if (validateFn) { - const isValid = validateFn(data); - const typeName = outputTypeComposer.getTypeName(); - if (isValid) { - if ('getFields' in outputTypeComposer) { - return outputTypeComposer.getTypeName(); - } else { - return outputTypeComposer.getResolveType()(data, context, info, outputTypeComposer.getType()); + const dataKeys = + typeof data === 'object' + ? Object.keys(data) + // Remove metadata fields used to pass data + .filter(property => !property.toString().startsWith('$')) + : null; + const allOutputTypeComposers = outputTypeComposers.flatMap(typeComposer => + 'getFields' in typeComposer ? typeComposer : typeComposer.getTypeComposers() + ); + for (const outputTypeComposer of allOutputTypeComposers) { + const typeName = outputTypeComposer.getTypeName(); + if (dataKeys != null) { + const typeFields = outputTypeComposer.getFieldNames(); + if ( + dataKeys.length <= typeFields.length && + dataKeys.every(property => typeFields.includes(property.toString())) + ) { + return typeName; + } + } else { + const validateFn = outputTypeComposer.getExtension('validateWithJSONSchema') as ValidateFunction; + if (validateFn) { + const isValid = validateFn(data); + if (isValid) { + return typeName; } + validationErrors[typeName] = ajv.errors || validateFn.errors; } - validationErrors[typeName] = ajv.errors || validateFn.errors; } } if (data.$response) { @@ -65,13 +80,11 @@ export function getTypeResolverFromOutputTCs( }, } ); - console.error(error); return error; } const error = new GraphQLError(`Received data doesn't met the union`, null, null, null, null, null, { validationErrors, }); - console.error(error); return error; }; } diff --git a/packages/loaders/openapi/package.json b/packages/loaders/openapi/package.json index c75f0f3f0f1b2..9f86c91168825 100644 --- a/packages/loaders/openapi/package.json +++ b/packages/loaders/openapi/package.json @@ -40,7 +40,8 @@ }, "devDependencies": { "@whatwg-node/fetch": "0.2.9", - "@graphql-tools/utils": "8.10.0" + "@graphql-tools/utils": "8.10.0", + "json-bigint-patch": "0.0.8" }, "publishConfig": { "access": "public", diff --git a/packages/loaders/openapi/src/getJSONSchemaOptionsFromOpenAPIOptions.ts b/packages/loaders/openapi/src/getJSONSchemaOptionsFromOpenAPIOptions.ts index f035c66c864c6..3b7fc76cd7e43 100644 --- a/packages/loaders/openapi/src/getJSONSchemaOptionsFromOpenAPIOptions.ts +++ b/packages/loaders/openapi/src/getJSONSchemaOptionsFromOpenAPIOptions.ts @@ -24,6 +24,7 @@ interface GetJSONSchemaOptionsFromOpenAPIOptionsParams { baseUrl?: string; schemaHeaders?: Record; operationHeaders?: OperationHeadersConfiguration; + queryParams?: Record; selectQueryOrMutationField?: OpenAPILoaderSelectQueryOrMutationFieldConfig[]; logger?: Logger; } @@ -36,6 +37,7 @@ export async function getJSONSchemaOptionsFromOpenAPIOptions({ baseUrl, schemaHeaders, operationHeaders, + queryParams = {}, selectQueryOrMutationField = [], logger = new DefaultLogger('getJSONSchemaOptionsFromOpenAPIOptions'), }: GetJSONSchemaOptionsFromOpenAPIOptionsParams) { @@ -116,7 +118,7 @@ export async function getJSONSchemaOptionsFromOpenAPIOptions({ if (requestSchema.properties.__typename) { delete requestSchema.properties.__typename; } - if (paramObj.required) { + if (paramObj.required && !(paramObj.name in queryParams)) { requestSchema.required = requestSchema.required || []; requestSchema.required.push(paramObj.name); } @@ -143,15 +145,24 @@ export async function getJSONSchemaOptionsFromOpenAPIOptions({ } case 'header': { operationConfig.headers = operationConfig.headers || {}; - operationConfig.headers[paramObj.name] = `{args.${argName}}`; + let defaultValue = ''; + if (typeof operationHeaders === 'object' && !operationHeaders[paramObj.name]?.includes('{')) { + defaultValue = `:${operationHeaders[paramObj.name]}`; + } else if (paramObj.schema?.default) { + defaultValue = `:${paramObj.schema.default}`; + } + if (defaultValue) { + paramObj.required = false; + } + operationConfig.headers[paramObj.name] = `{args.${argName}${defaultValue}}`; break; } case 'cookie': { operationConfig.headers = operationConfig.headers || {}; operationConfig.headers.cookie = operationConfig.headers.cookie || ''; - const cookieParams = operationConfig.headers.cookie.split('; '); - cookieParams.push(`${paramObj.name}={args.${argName}}`); - operationConfig.headers.cookie = cookieParams.join('; '); + const cookieParams = operationConfig.headers.cookie.split(' ').filter(c => !!c); + cookieParams.push(`${paramObj.name}={args.${argName}};`); + operationConfig.headers.cookie = `${cookieParams.join(' ')}`; break; } case 'body': @@ -223,33 +234,76 @@ export async function getJSONSchemaOptionsFromOpenAPIOptions({ let schemaObj: JSONSchemaObject; if ('content' in responseObj) { - const contentKey = Object.keys(responseObj.content)[0]; - if (!operationConfig.headers?.Accept && typeof contentKey === 'string') { + const responseObjForStatusCode: { + oneOf: JSONSchemaObject[]; + } = { + oneOf: [], + }; + + const allMimeTypes = Object.keys(responseObj.content); + const jsonLikeMimeTypes = allMimeTypes.filter(c => c !== '*/*' && c.toString().includes('json')); + const mimeTypes = jsonLikeMimeTypes.length > 0 ? jsonLikeMimeTypes : allMimeTypes; + + // If we have a better accept header, overwrite User's choice + if ((!operationConfig.headers?.accept && !operationConfig.headers?.Accept) || mimeTypes.length === 1) { operationConfig.headers = operationConfig.headers || {}; - operationConfig.headers.Accept = contentKey; + if (operationConfig.headers.Accept) { + delete operationConfig.headers.Accept; + } + operationConfig.headers.accept = + jsonLikeMimeTypes.length > 0 ? jsonLikeMimeTypes.join(',') : allMimeTypes[0].toString(); } - schemaObj = responseObj.content[contentKey].schema as any; - if (!schemaObj && contentKey.toString().startsWith('text')) { - responseByStatusCode[responseKey] = responseByStatusCode[responseKey] || {}; - responseByStatusCode[responseKey].responseSchema = { type: 'string' }; - } else if (schemaObj && Object.keys(schemaObj).length > 0) { - responseByStatusCode[responseKey] = responseByStatusCode[responseKey] || {}; - responseByStatusCode[responseKey].responseSchema = `${oasFilePath}#/paths/${relativePath - .split('/') - .join('~1')}/${method}/responses/${responseKey}/content/${contentKey - ?.toString() - .split('/') - .join('~1')}/schema`; + + for (const contentKey in responseObj.content) { + if (!mimeTypes.includes(contentKey)) { + continue; + } + schemaObj = responseObj.content[contentKey].schema as any; + if (schemaObj && Object.keys(schemaObj).length > 0) { + responseObjForStatusCode.oneOf.push({ + $ref: `${oasFilePath}#/paths/${relativePath + .split('/') + .join('~1')}/${method}/responses/${responseKey}/content/${contentKey + ?.toString() + .split('/') + .join('~1')}/schema`, + }); + } else if (contentKey.toString().startsWith('text')) { + responseObjForStatusCode.oneOf.push({ type: 'string' }); + } else { + const examplesObj = responseObj.content[contentKey].examples; + if (examplesObj) { + let examples = Object.values(examplesObj); + if (contentKey.includes('json')) { + examples = examples.map(example => { + if (typeof example === 'string') { + return JSON.parse(example); + } + return example; + }); + } + responseObjForStatusCode.oneOf.push({ + examples, + }); + } + let example = responseObj.content[contentKey].example; + if (example) { + if (typeof example === 'string' && contentKey.includes('json')) { + example = JSON.parse(example); + } + responseObjForStatusCode.oneOf.push({ + examples: [example], + }); + } + } } - const examplesObj = responseObj.content[contentKey].examples; - if (examplesObj) { + + if (responseObjForStatusCode.oneOf.length === 1) { responseByStatusCode[responseKey] = responseByStatusCode[responseKey] || {}; - responseByStatusCode[responseKey].responseSample = Object.values(examplesObj)[0]; - } - const example = responseObj.content[contentKey].example; - if (example) { + responseByStatusCode[responseKey].responseSchema = responseObjForStatusCode.oneOf[0]; + } else if (responseObjForStatusCode.oneOf.length > 1) { responseByStatusCode[responseKey] = responseByStatusCode[responseKey] || {}; - responseByStatusCode[responseKey].responseSample = example; + responseByStatusCode[responseKey].responseSchema = responseObjForStatusCode.oneOf; } } else if ('schema' in responseObj) { schemaObj = responseObj.schema as any; @@ -262,7 +316,16 @@ export async function getJSONSchemaOptionsFromOpenAPIOptions({ } else if ('examples' in responseObj) { const examples = Object.values(responseObj.examples); responseByStatusCode[responseKey] = responseByStatusCode[responseKey] || {}; - responseByStatusCode[responseKey].responseSample = examples[0]; + let example = examples[0]; + if (typeof example === 'string') { + try { + // Parse if possible + example = JSON.parse(example); + } catch (e) { + // Do nothing + } + } + responseByStatusCode[responseKey].responseSample = example; } else if (responseKey.toString() === '204') { responseByStatusCode[responseKey] = responseByStatusCode[responseKey] || {}; responseByStatusCode[responseKey].responseSchema = { diff --git a/packages/loaders/openapi/tests/__snapshots__/basket.test.ts.snap b/packages/loaders/openapi/tests/__snapshots__/basket.test.ts.snap index 5493781e3792a..a75181416c327 100644 --- a/packages/loaders/openapi/tests/__snapshots__/basket.test.ts.snap +++ b/packages/loaders/openapi/tests/__snapshots__/basket.test.ts.snap @@ -10,17 +10,23 @@ Object { "description": undefined, "field": "post_basket", "headers": Object { - "Accept": "application/json", + "accept": "application/json", }, "method": "POST", "operationHeaders": undefined, "path": "/basket", "responseByStatusCode": Object { "200": Object { - "responseSchema": "./fixtures/basket.json#/paths/~1basket/post/responses/200/content/application~1json/schema", + "responseSchema": Object { + "$ref": "./fixtures/basket.json#/paths/~1basket/post/responses/200/content/application~1json/schema", + "title": "post_basket_200_response", + }, }, "400": Object { - "responseSchema": "./fixtures/basket.json#/paths/~1basket/post/responses/400/content/application~1json/schema", + "responseSchema": Object { + "$ref": "./fixtures/basket.json#/paths/~1basket/post/responses/400/content/application~1json/schema", + "title": "post_basket_400_response", + }, }, }, "schemaHeaders": undefined, diff --git a/packages/loaders/openapi/tests/__snapshots__/cloudfunction_expanded.test.ts.snap b/packages/loaders/openapi/tests/__snapshots__/cloudfunction_expanded.test.ts.snap new file mode 100644 index 0000000000000..97094a5583e3d --- /dev/null +++ b/packages/loaders/openapi/tests/__snapshots__/cloudfunction_expanded.test.ts.snap @@ -0,0 +1,27 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Cloudfunction should generate correct schema: cloudfunction-schema 1`] = ` +"schema { + query: Query + mutation: Mutation +} + +type Query { + dummy: String +} + +type Mutation { + \\"Description of the action\\" + post_test_action_2(input: Payload_Input!, usernamePassword: ID, blocking: Boolean, result: Boolean): Response +} + +type Response { + payload: String! + age: Float! + valid: Boolean! +} + +input Payload_Input { + age: Float! +}" +`; diff --git a/packages/loaders/openapi/tests/__snapshots__/deduplication.test.ts.snap b/packages/loaders/openapi/tests/__snapshots__/deduplication.test.ts.snap index 154c94ac95107..5735c3a00331e 100644 --- a/packages/loaders/openapi/tests/__snapshots__/deduplication.test.ts.snap +++ b/packages/loaders/openapi/tests/__snapshots__/deduplication.test.ts.snap @@ -34,14 +34,17 @@ Object { "description": undefined, "field": "post_basket", "headers": Object { - "Accept": "application/json", + "accept": "application/json", }, "method": "POST", "operationHeaders": undefined, "path": "/basket", "responseByStatusCode": Object { "200": Object { - "responseSchema": "./fixtures/deduplication.json#/paths/~1basket/post/responses/200/content/application~1json/schema", + "responseSchema": Object { + "$ref": "./fixtures/deduplication.json#/paths/~1basket/post/responses/200/content/application~1json/schema", + "title": "post_basket_200_response", + }, }, }, "schemaHeaders": undefined, @@ -129,14 +132,17 @@ Object { "description": undefined, "field": "post_basket", "headers": Object { - "Accept": "application/json", + "accept": "application/json", }, "method": "POST", "operationHeaders": undefined, "path": "/basket", "responseByStatusCode": Object { "200": Object { - "responseSchema": "./fixtures/deduplication.json#/paths/~1basket/post/responses/200/content/application~1json/schema", + "responseSchema": Object { + "$ref": "./fixtures/deduplication.json#/paths/~1basket/post/responses/200/content/application~1json/schema", + "title": "post_basket_200_response", + }, }, }, "schemaHeaders": undefined, @@ -236,14 +242,17 @@ Object { "description": undefined, "field": "post_basket", "headers": Object { - "Accept": "application/json", + "accept": "application/json", }, "method": "POST", "operationHeaders": undefined, "path": "/basket", "responseByStatusCode": Object { "200": Object { - "responseSchema": "./fixtures/deduplication.json#/paths/~1basket/post/responses/200/content/application~1json/schema", + "responseSchema": Object { + "$ref": "./fixtures/deduplication.json#/paths/~1basket/post/responses/200/content/application~1json/schema", + "title": "post_basket_200_response", + }, }, }, "schemaHeaders": undefined, diff --git a/packages/loaders/openapi/tests/__snapshots__/deepl.test.ts.snap b/packages/loaders/openapi/tests/__snapshots__/deepl.test.ts.snap index 2b387b0c2c60a..eb9f1486b0ec1 100644 --- a/packages/loaders/openapi/tests/__snapshots__/deepl.test.ts.snap +++ b/packages/loaders/openapi/tests/__snapshots__/deepl.test.ts.snap @@ -10,8 +10,8 @@ Object { "description": "The translate function.", "field": "translateText", "headers": Object { - "Accept": "application/json", "Content-Type": "application/x-www-form-urlencoded", + "accept": "application/json", }, "method": "POST", "operationHeaders": undefined, @@ -28,17 +28,10 @@ Object { "requestSchema": "./fixtures/deepl.json#/paths/~1translate/post/requestBody/content/application~1x-www-form-urlencoded/schema", "responseByStatusCode": Object { "200": Object { - "responseSample": Object { - "value": Object { - "translations": Array [ - Object { - "detected_source_language": "EN", - "text": "Hallo, Welt!", - }, - ], - }, + "responseSchema": Object { + "$ref": "./fixtures/deepl.json#/paths/~1translate/post/responses/200/content/application~1json/schema", + "title": "translateText_200_response", }, - "responseSchema": "./fixtures/deepl.json#/paths/~1translate/post/responses/200/content/application~1json/schema", }, }, "schemaHeaders": undefined, @@ -66,8 +59,8 @@ You may specify the glossary to use for the document translation using the \`glo **Important:** This requires the \`source_lang\` parameter to be set and the language pair of the glossary has to match the language pair of the request.", "field": "translateDocument", "headers": Object { - "Accept": "application/json", "Content-Type": "multipart/form-data", + "accept": "application/json", }, "method": "POST", "operationHeaders": undefined, @@ -75,11 +68,10 @@ You may specify the glossary to use for the document translation using the \`glo "requestSchema": "./fixtures/deepl.json#/paths/~1document/post/requestBody/content/multipart~1form-data/schema", "responseByStatusCode": Object { "200": Object { - "responseSample": Object { - "document_id": "04DE5AD98A02647D83285A36021911C6", - "document_key": "0CB0054F1C132C1625B392EADDA41CB754A742822F6877173029A6C487E7F60A", + "responseSchema": Object { + "$ref": "./fixtures/deepl.json#/paths/~1document/post/responses/200/content/application~1json/schema", + "title": "translateDocument_200_response", }, - "responseSchema": "./fixtures/deepl.json#/paths/~1document/post/responses/200/content/application~1json/schema", }, }, "schemaHeaders": undefined, @@ -93,22 +85,17 @@ You may specify the glossary to use for the document translation using the \`glo If the translation is still in progress, the estimated time remaining is also included in the response.", "field": "getDocumentStatus", "headers": Object { - "Accept": "application/json", + "accept": "application/json", }, "method": "POST", "operationHeaders": undefined, "path": "/document/{args.document_id}", "responseByStatusCode": Object { "200": Object { - "responseSample": Object { - "summary": "Translating", - "value": Object { - "document_id": "04DE5AD98A02647D83285A36021911C6", - "seconds_remaining": 20, - "status": "translating", - }, + "responseSchema": Object { + "$ref": "./fixtures/deepl.json#/paths/~1document~1{document_id}/post/responses/200/content/application~1json/schema", + "title": "getDocumentStatus_200_response", }, - "responseSchema": "./fixtures/deepl.json#/paths/~1document~1{document_id}/post/responses/200/content/application~1json/schema", }, }, "schemaHeaders": undefined, @@ -124,18 +111,17 @@ If the translation is still in progress, the estimated time remaining is also in For privacy reasons the translated document is automatically removed from the server once it was downloaded and cannot be downloaded again.", "field": "downloadDocument", "headers": Object { - "Accept": "application/octet-stream", + "accept": "application/octet-stream", }, "method": "POST", "operationHeaders": undefined, "path": "/document/{args.document_id}/result", "responseByStatusCode": Object { "200": Object { - "responseSample": Object { - "description": "binary document data", - "summary": "OK", + "responseSchema": Object { + "$ref": "./fixtures/deepl.json#/paths/~1document~1{document_id}~1result/post/responses/200/content/application~1octet-stream/schema", + "title": "downloadDocument_200_response", }, - "responseSchema": "./fixtures/deepl.json#/paths/~1document~1{document_id}~1result/post/responses/200/content/application~1octet-stream/schema", }, }, "schemaHeaders": undefined, @@ -145,26 +131,17 @@ For privacy reasons the translated document is automatically removed from the se "description": "Retrieve the list of language pairs supported by the glossary feature.", "field": "listGlossaryLanguages", "headers": Object { - "Accept": "application/json", + "accept": "application/json", }, "method": "GET", "operationHeaders": undefined, "path": "/glossary-language-pairs", "responseByStatusCode": Object { "200": Object { - "responseSample": Object { - "supported_languages": Array [ - Object { - "source_lang": "de", - "target_lang": "en", - }, - Object { - "source_lang": "en", - "target_lang": "de", - }, - ], - }, - "responseSchema": "./fixtures/deepl.json#/paths/~1glossary-language-pairs/get/responses/200/content/application~1json/schema", + "responseSchema": Object { + "$ref": "./fixtures/deepl.json#/paths/~1glossary-language-pairs/get/responses/200/content/application~1json/schema", + "title": "listGlossaryLanguages_200_response", + }, }, }, "schemaHeaders": undefined, @@ -174,8 +151,8 @@ For privacy reasons the translated document is automatically removed from the se "description": "Create a Glossary", "field": "createGlossary", "headers": Object { - "Accept": "application/json", "Content-Type": "application/x-www-form-urlencoded", + "accept": "application/json", }, "method": "POST", "operationHeaders": undefined, @@ -183,7 +160,10 @@ For privacy reasons the translated document is automatically removed from the se "requestSchema": "./fixtures/deepl.json#/paths/~1glossaries/post/requestBody/content/application~1x-www-form-urlencoded/schema", "responseByStatusCode": Object { "201": Object { - "responseSchema": "./fixtures/deepl.json#/paths/~1glossaries/post/responses/201/content/application~1json/schema", + "responseSchema": Object { + "$ref": "./fixtures/deepl.json#/paths/~1glossaries/post/responses/201/content/application~1json/schema", + "title": "createGlossary_201_response", + }, }, }, "schemaHeaders": undefined, @@ -193,27 +173,17 @@ For privacy reasons the translated document is automatically removed from the se "description": "List all glossaries and their meta-information, but not the glossary entries.", "field": "listGlossaries", "headers": Object { - "Accept": "application/json", + "accept": "application/json", }, "method": "GET", "operationHeaders": undefined, "path": "/glossaries", "responseByStatusCode": Object { "200": Object { - "responseSample": Object { - "glossaries": Array [ - Object { - "creation_time": "2021-08-03T14:16:18.329Z", - "entry_count": 1, - "glossary_id": "def3a26b-3e84-45b3-84ae-0c0aaf3525f7", - "name": "My Glossary", - "ready": true, - "source_lang": "EN", - "target_lang": "DE", - }, - ], - }, - "responseSchema": "./fixtures/deepl.json#/paths/~1glossaries/get/responses/200/content/application~1json/schema", + "responseSchema": Object { + "$ref": "./fixtures/deepl.json#/paths/~1glossaries/get/responses/200/content/application~1json/schema", + "title": "listGlossaries_200_response", + }, }, }, "schemaHeaders": undefined, @@ -226,23 +196,17 @@ For privacy reasons the translated document is automatically removed from the se "description": "Retrieve meta information for a single glossary, omitting the glossary entries.", "field": "getGlossary", "headers": Object { - "Accept": "application/json", + "accept": "application/json", }, "method": "GET", "operationHeaders": undefined, "path": "/glossaries/{args.glossary_id}", "responseByStatusCode": Object { "200": Object { - "responseSample": Object { - "creation_time": "2021-08-03T14:16:18.329Z", - "entry_count": 1, - "id": "def3a26b-3e84-45b3-84ae-0c0aaf3525f7", - "name": "My Glossary", - "ready": true, - "source_lang": "EN", - "target_lang": "DE", - }, - "responseSchema": "./fixtures/deepl.json#/paths/~1glossaries~1{glossary_id}/get/responses/200/content/application~1json/schema", + "responseSchema": Object { + "$ref": "./fixtures/deepl.json#/paths/~1glossaries~1{glossary_id}/get/responses/200/content/application~1json/schema", + "title": "getGlossary_200_response", + }, }, }, "schemaHeaders": undefined, @@ -277,18 +241,14 @@ For privacy reasons the translated document is automatically removed from the se "description": "List the entries of a single glossary in the format specified by the \`Accept\` header.", "field": "getGlossaryEntries", "headers": Object { - "Accept": "{args.Accept}", + "accept": "text/tab-separated-values", }, "method": "GET", "operationHeaders": undefined, "path": "/glossaries/{args.glossary_id}/entries", "responseByStatusCode": Object { "200": Object { - "responseSample": "Hello! Guten Tag!", "responseSchema": Object { - "examples": Array [ - "Hello! Guten Tag!", - ], "title": "getGlossaryEntries_200_response", "type": "string", }, @@ -313,18 +273,17 @@ Character usage is only included for developer accounts. Document usage is only included for non-developer accounts, and team-combined document usage is only included for non-developer team accounts.", "field": "getUsage", "headers": Object { - "Accept": "application/json", + "accept": "application/json", }, "method": "GET", "operationHeaders": undefined, "path": "/usage", "responseByStatusCode": Object { "200": Object { - "responseSample": Object { - "character_count": 180118, - "character_limit": 1250000, + "responseSchema": Object { + "$ref": "./fixtures/deepl.json#/paths/~1usage/get/responses/200/content/application~1json/schema", + "title": "getUsage_200_response", }, - "responseSchema": "./fixtures/deepl.json#/paths/~1usage/get/responses/200/content/application~1json/schema", }, }, "schemaHeaders": undefined, @@ -337,7 +296,7 @@ Document usage is only included for non-developer accounts, and team-combined do "description": "Retrieve the list of languages that are currently supported for translation, either as source or target language, respectively.", "field": "getLanguages", "headers": Object { - "Accept": "application/json", + "accept": "application/json", }, "method": "GET", "operationHeaders": undefined, @@ -353,149 +312,10 @@ Document usage is only included for non-developer accounts, and team-combined do }, "responseByStatusCode": Object { "200": Object { - "responseSample": Array [ - Object { - "language": "BG", - "name": "Bulgarian", - "supports_formality": false, - }, - Object { - "language": "CS", - "name": "Czech", - "supports_formality": false, - }, - Object { - "language": "DA", - "name": "Danish", - "supports_formality": false, - }, - Object { - "language": "DE", - "name": "German", - "supports_formality": true, - }, - Object { - "language": "EL", - "name": "Greek", - "supports_formality": false, - }, - Object { - "language": "EN-GB", - "name": "English (British)", - "supports_formality": false, - }, - Object { - "language": "EN-US", - "name": "English (American)", - "supports_formality": false, - }, - Object { - "language": "ES", - "name": "Spanish", - "supports_formality": true, - }, - Object { - "language": "ET", - "name": "Estonian", - "supports_formality": false, - }, - Object { - "language": "FI", - "name": "Finnish", - "supports_formality": false, - }, - Object { - "language": "FR", - "name": "French", - "supports_formality": true, - }, - Object { - "language": "HU", - "name": "Hungarian", - "supports_formality": false, - }, - Object { - "language": "ID", - "name": "Indonesian", - "supports_formality": false, - }, - Object { - "language": "IT", - "name": "Italian", - "supports_formality": true, - }, - Object { - "language": "JA", - "name": "Japanese", - "supports_formality": false, - }, - Object { - "language": "LT", - "name": "Lithuanian", - "supports_formality": false, - }, - Object { - "language": "LV", - "name": "Latvian", - "supports_formality": false, - }, - Object { - "language": "NL", - "name": "Dutch", - "supports_formality": true, - }, - Object { - "language": "PL", - "name": "Polish", - "supports_formality": true, - }, - Object { - "language": "PT-BR", - "name": "Portuguese (Brazilian)", - "supports_formality": true, - }, - Object { - "language": "PT-PT", - "name": "Portuguese (European)", - "supports_formality": true, - }, - Object { - "language": "RO", - "name": "Romanian", - "supports_formality": false, - }, - Object { - "language": "RU", - "name": "Russian", - "supports_formality": true, - }, - Object { - "language": "SK", - "name": "Slovak", - "supports_formality": false, - }, - Object { - "language": "SL", - "name": "Slovenian", - "supports_formality": false, - }, - Object { - "language": "SV", - "name": "Swedish", - "supports_formality": false, - }, - Object { - "language": "TR", - "name": "Turkish", - "supports_formality": false, - }, - Object { - "language": "ZH", - "name": "Chinese", - "supports_formality": false, - }, - ], - "responseSchema": "./fixtures/deepl.json#/paths/~1languages/get/responses/200/content/application~1json/schema", + "responseSchema": Object { + "$ref": "./fixtures/deepl.json#/paths/~1languages/get/responses/200/content/application~1json/schema", + "title": "getLanguages_200_response", + }, }, }, "schemaHeaders": undefined, @@ -875,9 +695,6 @@ This parameter is only included while \`status\` is \`\\"translating\\"\`.", "type": "object", }, "getGlossaryEntries_200_response": Object { - "examples": Array [ - "Hello! Guten Tag!", - ], "title": "getGlossaryEntries_200_response", "type": "string", }, @@ -1410,7 +1227,7 @@ type Query { \\"Retrieve meta information for a single glossary, omitting the glossary entries.\\" getGlossary(glossary_id: String!): Glossary \\"List the entries of a single glossary in the format specified by the \`Accept\` header.\\" - getGlossaryEntries(Accept: String, glossary_id: String!): String + getGlossaryEntries(glossary_id: String!): String \\"Retrieve usage information within the current billing period together with the corresponding account limits. Usage is returned for:\\\\n- translated characters\\\\n- translated documents\\\\n- translated documents, team totals (for team accounts only)\\\\n\\\\nCharacter usage includes both text and document translations, and is measured by the source text length in Unicode code points,\\\\nso for example \\\\\\"A\\\\\\", \\\\\\"Δ\\\\\\", \\\\\\"あ\\\\\\", and \\\\\\"深\\\\\\" are each counted as a single character.\\\\n\\\\nDocument usage only includes document translations, and is measured in individual documents.\\\\n\\\\nDepending on the user account type, some usage types will be omitted.\\\\nCharacter usage is only included for developer accounts.\\\\nDocument usage is only included for non-developer accounts, and team-combined document usage is only included for non-developer team accounts.\\" getUsage: getUsage_200_response \\"Retrieve the list of languages that are currently supported for translation, either as source or target language, respectively.\\" @@ -1533,7 +1350,7 @@ type mutation_translateText_translations_items { type mutation_translateText_translations_items_detected_source_language { SourceLanguage: SourceLanguage - additionalProperties: JSON + JSON: JSON } \\"Language of the text to be translated. Options currently available:\\\\n * \`BG\` - Bulgarian\\\\n * \`CS\` - Czech\\\\n * \`DA\` - Danish\\\\n * \`DE\` - German\\\\n * \`EL\` - Greek\\\\n * \`EN\` - English\\\\n * \`ES\` - Spanish\\\\n * \`ET\` - Estonian\\\\n * \`FI\` - Finnish\\\\n * \`FR\` - French\\\\n * \`HU\` - Hungarian\\\\n * \`ID\` - Indonesian\\\\n * \`IT\` - Italian\\\\n * \`JA\` - Japanese\\\\n * \`LT\` - Lithuanian\\\\n * \`LV\` - Latvian\\\\n * \`NL\` - Dutch\\\\n * \`PL\` - Polish\\\\n * \`PT\` - Portuguese (all Portuguese varieties mixed)\\\\n * \`RO\` - Romanian\\\\n * \`RU\` - Russian\\\\n * \`SK\` - Slovak\\\\n * \`SL\` - Slovenian\\\\n * \`SV\` - Swedish\\\\n * \`TR\` - Turkish\\\\n * \`ZH\` - Chinese\\\\n\\\\nIf this parameter is omitted, the API will attempt to detect the language of the text and translate it.\\" diff --git a/packages/loaders/openapi/tests/__snapshots__/docusign.test.ts.snap b/packages/loaders/openapi/tests/__snapshots__/docusign.test.ts.snap index b9d5f085af2d7..55458a2e30b73 100644 --- a/packages/loaders/openapi/tests/__snapshots__/docusign.test.ts.snap +++ b/packages/loaders/openapi/tests/__snapshots__/docusign.test.ts.snap @@ -36,13 +36,13 @@ type Query { \\"Get information for a specific brand.\\" Brand_GetBrand(input: Brand_GetBrand_request_Input, accountId: String!, brandId: String!): brand \\"Export a specific brand.\\" - BrandExport_GetBrandExportFile(accountId: String!, brandId: String!): Any + BrandExport_GetBrandExportFile(accountId: String!, brandId: String!): JSON \\"Obtains the specified image for a brand.\\" - BrandLogo_GetBrandLogo(accountId: String!, brandId: String!, logoType: String!): Any + BrandLogo_GetBrandLogo(accountId: String!, brandId: String!, logoType: String!): JSON \\"Returns the specified account's list of branding resources (metadata).\\" BrandResources_GetBrandResourcesList(accountId: String!, brandId: String!): brandResourcesList \\"Returns the specified branding resource file.\\" - BrandResources_GetBrandResources(input: BrandResources_GetBrandResources_request_Input, accountId: String!, brandId: String!, resourceContentType: String!): Any + BrandResources_GetBrandResources(input: BrandResources_GetBrandResources_request_Input, accountId: String!, brandId: String!, resourceContentType: String!): JSON \\"Retrieves status information about all the bulk recipient batches. A bulk recipient batch is the set of envelopes sent from a single bulk recipient file. The response includes general information about each bulk recipient batch. \\\\n\\\\nThe response returns information about the envelopes sent with bulk recipient batches, including the \`batchId\` property, which can be used to retrieve a more detailed status of individual bulk recipient batches.\\" BulkEnvelopes_GetEnvelopesBulk(input: BulkEnvelopes_GetEnvelopesBulk_request_Input, accountId: String!): BulkEnvelopes \\"Retrieves the status information of a single bulk recipient batch. A bulk recipient batch is the set of envelopes sent from a single bulk recipient file. \\" @@ -76,7 +76,7 @@ type Query { \\"Returns a list of attachments associated with the specified envelope\\" Attachments_GetAttachments(accountId: String!, envelopeId: String!): envelopeAttachmentsResult \\"Retrieves an attachment from the envelope.\\" - Attachments_GetAttachment(accountId: String!, envelopeId: String!, attachmentId: String!): Any + Attachments_GetAttachment(accountId: String!, envelopeId: String!, attachmentId: String!): JSON \\"Gets the envelope audit events for the specified envelope.\\" AuditEvents_GetAuditEvents(accountId: String!, envelopeId: String!): envelopeAuditEventResponse \\"Retrieves the custom field information for the specified envelope. You can use these fields in the envelopes for your account to record information about the envelope, help search for envelopes, and track information. The envelope custom fields are shown in the Envelope Settings section when a user is creating an envelope in the DocuSign member console. The envelope custom fields are not seen by the envelope recipients.\\\\n\\\\nThere are two types of envelope custom fields, text, and list. A text custom field lets the sender enter the value for the field. With a list custom field, the sender selects the value of the field from a pre-made list.\\" @@ -248,7 +248,7 @@ type Query { \\"Retrieves workspace folder contents, which can include sub folders and files.\\" WorkspaceFolder_GetWorkspaceFolder(input: WorkspaceFolder_GetWorkspaceFolder_request_Input, accountId: String!, workspaceId: String!, folderId: String!): workspaceFolderContents \\"Retrieves a workspace file (the binary).\\" - WorkspaceFile_GetWorkspaceFile(input: WorkspaceFile_GetWorkspaceFile_request_Input, accountId: String!, workspaceId: String!, folderId: String!, fileId: String!): Any + WorkspaceFile_GetWorkspaceFile(input: WorkspaceFile_GetWorkspaceFile_request_Input, accountId: String!, workspaceId: String!, folderId: String!, fileId: String!): JSON \\"Retrieves a workspace file as rasterized pages.\\" WorkspaceFilePages_GetWorkspaceFilePages(input: WorkspaceFilePages_GetWorkspaceFilePages_request_Input, accountId: String!, workspaceId: String!, folderId: String!, fileId: String!): pageImages \\"Retrieves a list of the billing plans associated with a distributor.\\" @@ -859,7 +859,8 @@ input Brand_GetBrand_request_Input { include_logos: String } -scalar Any +\\"The \`JSON\` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).\\" +scalar JSON @specifiedBy(url: \\"http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf\\") type brandResourcesList { resourcesContentTypes: [brandResources] @@ -6100,25 +6101,25 @@ type Mutation { \\"Creates new DocuSign accounts.\\\\nYou can use this method to create\\\\na single account\\\\nor up to 100 accounts at a time.\\\\n\\\\nWhen creating a single account,\\\\nthe body of the request is a\\\\n[\`newAccountDefinition\`][newAccountDefinition]\\\\nobject.\\\\n\\\\nIf the request succeeds.\\\\nit returns a\\\\n201 (Created) code.\\\\nThe response returns the new account ID, password and the default user\\\\ninformation for each newly created account.\\\\n\\\\n\\\\nWhen creating multiple accounts,\\\\nthe body of the request is a\\\\n\`newAccountRequests\`\\\\nobject,\\\\nwhich contains one or more \\\\n[\`newAccountDefinition\`][newAccountDefinition]\\\\nobjects.\\\\nYou can create up to 100 new accounts\\\\nat a time this way.\\\\n\\\\nThe body for a multi-account\\\\ncreation request\\\\nlooks like this in JSON:\\\\n\\\\n\`\`\`\\\\n{\\\\n \\\\\\"newAccountRequests\\\\\\": [\\\\n {\\\\n \\\\\\"accountName\\\\\\": \\\\\\"accountone\\\\\\",\\\\n . . .\\\\n },\\\\n {\\\\n \\\\\\"accountName\\\\\\": \\\\\\"accounttwo\\\\\\",\\\\n . . .\\\\n }\\\\n ]\\\\n}\\\\n\`\`\`\\\\n\\\\nA multi-account request\\\\nlooks like this in XML:\\\\n\\\\n\`\`\`\\\\n\\\\n \\\\n \\\\n . . .\\\\n \\\\n \\\\n . . .\\\\n \\\\n \\\\n\\\\n\`\`\`\\\\n\\\\nA multi-account creation request\\\\nmay succeed (report a 201 code)\\\\neven if some accounts could not be created.\\\\nIn this case, the \`errorDetails\` property\\\\nin the response contains specific information\\\\nabout the failure.\\\\n\\\\n\\\\n\\\\nThe \`accountSettings\` property\\\\nis a [name/value][nameValue]\\\\nlist that can contain the following settings:\\\\n\\\\n| Name | Type | Authorization Required | Description | \\\\n| :------------------------------------------------- | :------ | :---------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | \\\\n| adoptSigConfig | Boolean | Admin | When **true**, the Signature Adoption Configuration page is available to account administrators. | \\\\n| allowAccessCodeFormat | Boolean | Admin | When **true**, the Access Code Format page is available to account administrators. | \\\\n| allowAccountManagementGranular | Boolean | Admin | When **true**, the Delegated Administration functionality is available to account. | \\\\n| allowBulkSend | Boolean | Admin | When **true**, the account can set if the bulk send feature can be used. | \\\\n| allowCDWithdraw | Boolean | Admin | When **true**, signers can withdraw their consent to use electronic signatures. | \\\\n| allowConnectSendFinishLater | Boolean | Reserved | Reserved for DocuSign. | \\\\n| allowDataDownload | Boolean | Admin | When **true**, the account can download envelope data. | \\\\n| allowEnvelopeCorrect | Boolean | Admin | When **true**, the account allows in process envelopes to be corrected. | \\\\n| allowEnvelopePublishReporting | Boolean | Admin | When **true**, the account can access the Envelope Publish section in Classic DocuSign Experience Account Administration. | \\\\n| allowExpressSignerCertificate | Boolean | Admin | When **true**, senders are allowed to use the DocuSign Express digital signatures. | \\\\n| allowExternalSignaturePad | Boolean | Admin | When **true**, an external signature pad can be used for signing. The signature pad type is set by the externalSignaturePadType property. | \\\\n| allowInPerson | Boolean | SysAdmin | When **true**, the account allows In Person Signing. | \\\\n| allowMarkup | Boolean | Admin | When **true**, the document markup feature is enabled for the account. | \\\\n| allowMemberTimezone | Boolean | Admin | When **true**, account users can set their own time zones. | \\\\n| allowMergeFields | Boolean | Admin | When **true**, the account can use merge fields in conjunction with DocuSign for Salesforce. | \\\\n| allowMultipleSignerAttachments | Boolean | Admin | When **true**, multiple signer attachments are allowed for an envelope. | \\\\n| allowOfflineSigning | Boolean | Admin | When **true**, the account can use Offline Signing and envelopes signed using offline signing on mobile devices are synchronized with this account. This option and the inSessionEnabled option must both be enabled (**true**) for a caller to use offline signing. | \\\\n| allowOpenTrustSignerCertificate | Boolean | Admin | When **true**, senders are allowed to use the OpenTrust digital signatures. | \\\\n| allowPaymentProcessing | Boolean | Admin | When **true**, the account can access the Payment Processing set up page. | \\\\n| allowPersonalSignerCertificate | Boolean | Admin | When **true**, the account can specify that signers must use personal signer certificates during signing. | \\\\n| allowPrivateSigningGroups | Boolean | SysAdmin Read Only | Reserved for DocuSign. This currently returns false in a response. This setting is only shown in the response when listing account settings. | \\\\n| allowReminders | Boolean | Admin | When **true**, the reminder and expiration functionality is available when sending envelops. | \\\\n| allowSafeBioPharmaSignerCertificate | Boolean | Admin | When **true**, senders are allowed to use the SAFE BioPharma digital signatures. | \\\\n| allowSharedTabs | Boolean | Admin | When **true**, the account allows users to share custom tabs (fields).
This setting is only shown when getting account settings. It cannot be modified. | \\\\n| allowSignDocumentFromHomePage | Boolean | Admin | When **true**, the Sign a Document Now button is available on the Home tab. | \\\\n| allowSignatureStamps | Boolean | Reserved | Reserved for DocuSign. | \\\\n| allowSignerReassign | Boolean | Admin | When **true**, the account allows signers to reassign an envelope. | \\\\n| allowSignerReassignOverride | Boolean | Admin | When **true**, the sender has the option override the default account setting for reassigning recipients. | \\\\n| allowSigningGroups | Boolean | SysAdmin Read Only | When **true**, the account can use signing groups. This setting is only shown in the response when listing account settings. | \\\\n| allowTabOrder | Boolean | Admin | When **true**, the Tab Order field is available for use when creating tabs. | \\\\n| allowWorkspaceComments | Boolean | Reserved | Reserved for DocuSign. | \\\\n| allowWorkspaceCreate | Boolean | Admin | When **true**, account users can create DocuSign Rooms. | \\\\n| attachCompletedEnvelope | Boolean | SysAdmin | When **true**, envelope documents are included as a PDF file attachment for signing completed emails. | \\\\n| authenticationCheck | String | Admin | Sets when authentication checks are applied for recipient envelope access. This setting only applies to the following ID checks:
  • Phone Authentication
  • SMS Authentication
  • Knowledge-Based ID
This setting takes one of the following options:
  • initial_access: The authentication check always applies the first time a recipient accesses the documents. Recipients are not asked to authenticate again when they access the documents from the same browser on the same device. If the recipient attempts to access the documents from a different browser or a different device, the recipient must pass authentication again. Once authenticated, that recipient is not challenged again on the new device or browser. The ability for a recipient to skip authentication for documents is limited to documents sent from the same sending account.

  • each_access: Authentication checks apply every time a recipient attempts to access the envelope. However, you can configure the Authentication Expiration setting to allow recipients to skip authentication when they have recently passed authentication by setting a variable timeframe.

| \\\\n| autoNavRule | String | Admin | The auto-navigation rule for the account. Enumeration values are:
  • off
  • required_fields
  • required_and_blank_fields
  • all_fields
  • page_then_required_fields
  • page_then_required_and_blank_fields
  • page_then_all_fields
| \\\\n| bulkSend | Boolean | Admin | When **true**, the account allows bulk sending of envelopes. | \\\\n| canSelfBrandSend | Boolean | SysAdmin | When **true**, account administrators can self-brand their sending console through the DocuSign Console. | \\\\n| canSelfBrandSign | Boolean | SysAdmin | When **true**, account administrators can self-brand their signing console through the DocuSign Console. | \\\\n| conditionalFieldsEnabled | Boolean | Admin | When **true**, conditional fields can be used by the account. | \\\\n| consumerDisclosureFrequency | enum | Admin | Possible values are:
  • once: Per account, the supplemental document is displayed once only per userId.
  • always: Per envelope, the supplemental document is displayed once only per userId.
  • each_access: - Per envelope, the supplemental document is displayed once only per recipientId.
| \\\\n| dataFieldRegexEnabled | Boolean | Admin | When **true**, the Regex field is available for tabs with that property. | \\\\n| dataFieldSizeEnabled | Boolean | Admin | When **true**, the maximum number of characters field is available for tabs with that property. | \\\\n| dataPopulationScope | String | Admin | Specifies how data is shared for tabs with the same tabLabel. There are two possible values:
  • document: Tabs in a document with the same label populate with the same data.
  • envelope: Tabs in all documents in the envelope with the same label populate with the same data.
This setting applies to the following tab types:
  • Check box
  • Company
  • Data Field
  • Dropdown List
  • Full Name
  • Formula
  • Note
  • Title
Changing this setting affects envelopes that have been sent but not completed. | \\\\n| disableMobilePushNotifications | Boolean | Admin | When **true**, mobile push notifications are disabled on the account. | \\\\n| disableMobileSending | Boolean | Admin | When **true**, sending from mobile applications is disabled. | \\\\n| disableMultipleSessions | Boolean | Admin | When **true**, account users cannot be logged into multiple sessions at once. | \\\\n| disableUploadSignature | Boolean | Admin | When **true**, signers cannot use the upload signature/initials image option when signing a document. | \\\\n| documentConversionRestrictions | String | Admin | Sets the account document upload restriction for non-account administrators. There are three possible values:
  • no_restrictions : there are no restrictions on the type of documents that can be uploaded.
  • allow_pdf_only : only: non-administrators can only upload PDF files.
  • no_upload : Non-administrators cannot upload files.
| \\\\n| enableAutoNav | Boolean | SysAdmin or EnableAutoNavByDSAdmin is set | When **true**, the auto-navigation is enabled for the account. | \\\\n| enableCalculatedFields | Boolean | Admin & AllowExpression is set | When **true**, this account can use the Calculated Fields feature. | \\\\n| enableDSPro | Boolean | SysAdmin | When **true**, this account can send and manage envelopes from the DocuSign Desktop Client. | \\\\n| enableEnvelopeStampingByAccountAdmin | Boolean | SysAdmin or account has EnableEnvelopeStampingByDSAdmin set | When **true**, senders for this account can choose to have the envelope ID stamped in the document margins. | \\\\n| enablePaymentProcessing | Boolean | Admin & AllowPaymentProcessing is set. | When **true**, Payment Processing is enabled for the account. | \\\\n| enablePowerForm | Boolean | SysAdmin | When **true**, PowerForm access is enabled for the account. | \\\\n| enablePowerFormDirect | Boolean | Admin | When **true**, direct PowerForms are enabled for the account. | \\\\n| enableRecipientDomainValidation | Boolean | Admin | When **true**, validation on recipient email domains for DocuSign Access feature is enabled. | \\\\n| enableRequireSignOnPaper | Boolean | Admin | When **true**, the account can use the requireSignOnPaper option. | \\\\n| enableReservedDomain | Boolean | SysAdmin | When **true**, an account administrator can reserve web domain and users. | \\\\n| enableSMSAuthentication | Boolean | Admin | When **true**, the account can use SMS authentication. | \\\\n| enableSendToAgent | Boolean | SysAdmin | When **true**, this account can use the Agent Recipient Type. | \\\\n| enableSendToIntermediary | Boolean | Admin & AllowSendToIntermediary is set | When **true**, this account can use the Intermediary Recipient Type. | \\\\n| enableSendToManage | Boolean | Admin | When **true**, this account can use the Editor Recipient Type. | \\\\n| enableSequentialSigningAPI | Boolean | SysAdmin | When **true**, the account can define the routing order of recipients for envelopes sent using the DocuSign API. | \\\\n| enableSequentialSigningUI | Boolean | SysAdmin | When **true**, the account can define the routing order of recipients for envelopes sent using the DocuSign console. | \\\\n| enableSignOnPaper | Boolean | Admin | When **true**, a user can allow signers to use the sign on paper option. | \\\\n| enableSignOnPaperOverride | Boolean | Admin | When **true**, a user can override the default account setting for the sign on paper option. | \\\\n| enableSignerAttachments | Boolean | Admin | When **true**, a user can request attachments from a signer. | \\\\n| enableTransactionPoint | Boolean | SysAdmin | When **true**, Transaction Point is enabled for this account. | \\\\n| enableVaulting | Boolean | SysAdmin | When **true**, this account can use electronic vaulting for documents. | \\\\n| enableWorkspaces | Boolean | Admin | When **true**, DocuSign Rooms is enabled for the account. | \\\\n| envelopeIntegrationAllowed | String | SysAdmin | Shows the envelope integration rule for the account.
Enumeration values are: NotAllowed, Full, IntegrationSendOnly. | \\\\n| envelopeIntegrationEnabled | Boolean | Admin & EnvelopeIntegrationAllowed is set | When **true**, envelope integration is enabled for the account. | \\\\n| envelopeStamplingDefaultValue | Boolean | (GET only) | When **true**, envelopes sent by this account automatically have the envelope ID stamped in the margins, unless the sender selects not to have them stamped. | \\\\n| externalSignaturePadType | String | Admin | Sets the type of signature pad that can be used. Possible values are:
  • none
  • topaz
  • e_padv9
  • e_pad_integrisign
| \\\\n| faxOutEnabled | Boolean | Admin | When **true**, the account can use the fax out feature. | \\\\n| idCheckExpire | String | Admin | Indicates when a user's authentication expires. Possible values are:
  • always
  • never
  • variable: Use the value in idCheckExpireDays
| \\\\n| idCheckExpireDays | Integer | Admin | The number of days before a user's authentication expires. Valid only if the \`IDCheckExpire\` value is Variable. | \\\\n| idCheckRequired | String | Admin | Indicates if authentication is required by envelope signers. Possible values are:
  • always
  • never
  • optional: Authentication is determined by the sender.
| \\\\n| inPersonIDCheckQuestion | String | Admin | The default question used by the In Person signing host for an In Person signing session. | \\\\n| inSessionEnabled | Boolean | Admin | When **true**, the account can use In Session (embedded) and offline signing. This option and the allowOfflineSigning option must both be enabled (**true**) for a caller to use offline signing. | \\\\n| inSessionSuppressEmails | Boolean | Admin | When **true**, emails are not sent to the embedded recipients on an envelope for the account. | \\\\n| maximumSigningGroups | String | SysAdmin Read Only | The maximum number of signing groups an account can have. The default value for this is 50. This setting is only shown in the response when listing account settings. | \\\\n| maximumUsersPerSigningGroup | String | SysAdmin Read Only | The maximum number of members in a signing group. The default value for this is 50. This setting is only shown in the response when listing account settings. | \\\\n| mobileSessionTimeout | String | Admin | Sets the amount of idle activity time, in minutes, before a mobile user is automatically logged off of the system. If the setting is 0, then DocuSign mobile application users are never automatically logged off the system. The minimum setting is 1 minute and the maximum setting is 120 minutes.
This setting only applies to the DocuSign for iOS v2.8.2 or later mobile app. | \\\\n| phoneAuthRecipientMayProvidePhoneNumber | Boolean | Admin | When **true**, senders can select to allow the recipient to provide a phone number for the Phone Authentication process. | \\\\n| pkiSignDownloadedPDFDocs | String | Admin | The policy for adding a digital certificate to downloaded, printed and emailed documents. Possible values are:
  • no_sign
  • no_sign_allow_user_override
  • yes_sign
| \\\\n| recipientsCanSignOffline | Boolean | Admin | When **true**, envelopes signed using offline signing on mobile devices are synchronized with this account. | \\\\n| requireDeclineReason | Boolean | Admin | When **true**, recipients that decline to sign an envelope must provide a reason. | \\\\n| requireSignerCertificateType | String | Admin | Sets which Digital Signature certificate is required when sending envelopes. There are three possible values:
  • none: a Digital Signature certificate is not required.
  • docusign_express: signers must use a DocuSign Express certificate.
  • docusign_personal: signers must use a DocuSign personal certificate.
  • open_trust: signers must use an OpenTrust certificate.
| \\\\n| rsaVeridAccountName | String | Admin | The RSA account name.
Modifying this value might inadvertently disrupt your ID Check capability. Ensure you have the correct value before changing this. | \\\\n| rsaVeridPassword | String | Admin | The password used with the RSA account.
Modifying this value might inadvertently disrupt your ID Check capability. Ensure you have the correct value before changing this. | \\\\n| rsaVeridRuleset | String | Admin | The RSA rule set used with the account.
Modifying this value might inadvertently disrupt your ID Check capability. Ensure you have the correct value before changing this. | \\\\n| rsaVeridUserId | String | Admin | The user ID for the RSA account.
Modifying this value might inadvertently disrupt your ID Check capability. Ensure you have the correct value before changing this. | \\\\n| savingCustomTabsEnabled | Boolean | Admin | When **true**, account users can save custom tabs. | \\\\n| selfSignedRecipientEmailDocument | String | Admin | Sets how self-signed documents are presented to the email recipients. Possible values are:
  • include_pdf: A PDF of the completed document is attached to the email
  • include_link: A secure link to the self-signed documents is included in the email.
| \\\\n| selfSignedRecipientEmailDocumentRights | Boolean | Admin | When **true**, account administrators can set the selfSignedRecipientEmailDocument option. | \\\\n| selfSignedRecipientEmailDocumentUserOverride | Boolean | Admin | When **true** the selfSignedRecipientEmailDocument userSetting can be set for an individual user. The userSetting will override the account setting. | \\\\n| selfSignedRecipientEmailDocumentUserOverrideRights | Boolean | Admin | When **true**, account administrators can set the selfSignedRecipientEmailDocumentOverride option. | \\\\n| sendToCertifiedDeliveryEnabled | Boolean | Admin | When **true**, the Certified Deliveries Recipient type can be used by the account. | \\\\n| senderMustAuthenticateSigning | Boolean | Admin | When **true**, a sender that is also a recipient of an envelope must follow the authentication requirements for the envelope. | \\\\n| sessionTimeout | Integer | Admin | The amount of idle activity time, in minutes, before a user is automatically logged out of the system. The minimum setting is 20 minutes and the maximum setting is 120 minutes. | \\\\n| setRecipEmailLang | Boolean | Admin | When **true**, senders can set the email languages for each recipient. | \\\\n| setRecipSignLang | Boolean | Admin | When **true**, senders can set the signing language used for each recipient. | \\\\n| sharedCustomTabsEnabled | Boolean | Admin | When **true**, saved custom tabs can be shared with account users. | \\\\n| signDateFormat | String | Admin | The date/time format applied to Date Signed fields for the account. | \\\\n| signTimeShowAmPm | Boolean | Admin | When **true**, AM or PM is shown as part of the time for signDateFormat. | \\\\n| signerAttachCertificateToEnvelopePDF | Boolean | AccountAdmin & account is selected in AccountSigningSettings| When **true**, the Certificate of Completion is included in the envelope documents PDF when it is downloaded. | \\\\n| signerAttachConcat | Boolean | Admin | When **true**, signer attachments are added to the parent document that the attachment tab is located on, instead of the default behavior that creates a new document in the envelope for every signer attachment. | \\\\n| signerCanCreateAccount | Boolean | AccountAdmin & account is selected in AccountSigningSettings| When **true**, the signer without a DocuSign account can create a DocuSign account after signing. | \\\\n| signerCanSignOnMobile | Boolean | AccountAdmin & account is selected in AccountSigningSettings| When **true**, signers can use the DocuSign mobile signing user interface. | \\\\n| signerInSessionUseEnvelopeCompleteEmail | Boolean | Admin | When **true**, an envelope complete email is sent to an In Session (embedded) or offline signer after DocuSign processes the envelope. | \\\\n| signerLoginRequirements | String | Admin | Sets the Login requirements for the signer. There are four options:
  • login_not_required: The signer is not required to log on to the system.
  • login_required_if_account_holder: If the signer has a DocuSign account, they must log on to sign the document.
  • login_required_per_session: The sender cannot send an envelope to anyone who does not have a DocuSign account.
  • login_required_per_envelope: The sender cannot send an envelope to anyone who does not have a DocuSign account and the signer must log on the system for each envelope they will sign.
If you use Direct PowerForms or captive/embedded signers, the \\\\\\"Account required\\\\\\" settings are bypassed for those signers. If your workflow requires that the signer have an account, you should not use those methods. | \\\\n| signerMustHaveAccount | Boolean | AccountAdmin & account is selected in AccountSigningSettings| When **true**, senders can only send an envelope to a recipient that has a DocuSign account. | \\\\n| signerMustLoginToSign | Boolean | AccountAdmin & account is selected in AccountSigningSettings| When **true**, an envelope signer must log in to the DocuSign console to sign an envelope. | \\\\n| signerShowSecureFieldInitialValues | Boolean | AccountAdmin & account is selected in AccountSigningSettings| When **true**, the initial value of all SecureFields is written to the document when sent. | \\\\n| tabDataLabelEnabled | Boolean | Admin | When **true**, senders can change the default tabLabel for tabs. | \\\\n| tabLockingEnabled | Boolean | Admin | When **true**, the locked option is available for tabs with that property. | \\\\n| tabTextFormattingEnabled | Boolean | Admin | When **true**, the formatting options (font type, font size, font color, bold, italic, and underline) are available for tabs with those properties. | \\\\n| universalSignatureOptIn | Boolean | Reserved | Reserved for DocuSign. | \\\\n| universalSignatureOptOut | Boolean | Reserved | Reserved for DocuSign. | \\\\n| useAccountLevelEmail | Boolean | AccountAdmin & account is selected in AccountSigningSettings| When **true**, the content of notification emails is determined at the account level. | \\\\n| useConsumerDisclosure | Boolean | Admin | When **true**, the account can use supplemental documents. | \\\\n| usesAPI | Boolean | SysAdmin | When **true**, the account can use the DocuSign API. | \\\\n\\\\n\\\\n\\\\n\\\\n\\\\n[newAccountDefinition]: #/definitions/newAccountDefinition\\\\n[nameValue]: #/definitions/nameValue\\\\n\\" Accounts_PostAccounts(input: newAccountDefinition_Input, preview_billing_plan: String): newAccountSummary \\"This closes the specified account. You must be an account admin to close your account. Once closed, an account must be reopened by DocuSign.\\" - Accounts_DeleteAccount(accountId: String!): Any + Accounts_DeleteAccount(accountId: String!): JSON \\"Posts a payment to a past due invoice. \\\\n\\\\n\\\\nThe response returns information for a single payment, if a payment ID was used in the endpoint, or a list of payments. If the from date or to date queries or payment ID are not used, the response returns payment information for the last 365 days. If the request was for a single payment ID, the \`nextUri\` and \`previousUri\` properties are not returned.\\\\n\\\\nPrivileges required: account administrator\\" BillingPayments_PostPayment(input: billingPaymentRequest_Input, accountId: String!): billingPaymentResponse \\"Updates the billing plan information, billing address, and credit card information for the specified account.\\" BillingPlan_PutBillingPlan(input: billingPlanInformation_Input, accountId: String!, preview_billing_plan: String): billingPlanUpdateResponse \\"Reserved: At this time, this endpoint is limited to DocuSign internal use only. Completes the purchase of envelopes for your account. The actual purchase is done as part of an internal workflow interaction with an envelope vendor.\\" - PurchasedEnvelopes_PutPurchasedEnvelopes(input: purchasedEnvelopesInformation_Input, accountId: String!): Any + PurchasedEnvelopes_PutPurchasedEnvelopes(input: purchasedEnvelopesInformation_Input, accountId: String!): JSON \\"Deletes one or more brand profiles from an account. The Account Branding feature (accountSettings properties \`canSelfBrandSend\` and \`canSelfBrandSend\`) must be set to **true** to use this call.\\" Brands_DeleteBrands(input: brandsRequest_Input, accountId: String!): AccountBrands \\"Creates one or more brand profile files for the account. The Account Branding feature (accountSettings properties \`canSelfBrandSend\` and \`canSelfBrandSig\`) must be set to **true** for the account to use this call.\\\\n\\\\nAn error is returned if \`brandId\` property for a brand profile is already set for the account. To upload a new version of an existing brand profile, you must delete the profile and then upload the newer version.\\\\n\\\\nWhen brand profile files are being uploaded, they must be combined into one zip file and the \`Content-Type\` must be \`application/zip\`.\\" Brands_PostBrands(input: brand_Input, accountId: String!): AccountBrands \\"Removes a brand.\\" - Brand_DeleteBrand(accountId: String!, brandId: String!): Any + Brand_DeleteBrand(accountId: String!, brandId: String!): JSON \\"Updates an existing brand.\\" Brand_PutBrand(input: brand_Input, accountId: String!, brandId: String!): brand \\"Delete one branding logo.\\" - BrandLogo_DeleteBrandLogo(accountId: String!, brandId: String!, logoType: String!): Any + BrandLogo_DeleteBrandLogo(accountId: String!, brandId: String!, logoType: String!): JSON \\"Put one branding logo.\\" - BrandLogo_PutBrandLogo(accountId: String!, brandId: String!, logoType: String!): Any + BrandLogo_PutBrandLogo(accountId: String!, brandId: String!, logoType: String!): JSON \\"Uploads a branding resource file.\\" BrandResources_PutBrandResources(accountId: String!, brandId: String!, resourceContentType: String!): brandResources \\"Deletes the signature for one or more captive recipient records; it is primarily used for testing. This provides a way to reset the signature associated with a client user ID so that a new signature can be created the next time the client user ID is used.\\" @@ -6140,13 +6141,13 @@ type Mutation { \\"Republishes Connect information for the specified envelope.\\" ConnectPublish_PutConnectRetryByEnvelope(accountId: String!, envelopeId: String!): connectFailureResults \\"Deletes the Connect failure log information for the specified entry.\\" - ConnectFailures_DeleteConnectFailureLog(accountId: String!, failureId: String!): Any + ConnectFailures_DeleteConnectFailureLog(accountId: String!, failureId: String!): JSON \\"Retrieves a list of connect log entries for your account.\\" - ConnectLog_DeleteConnectLogs(accountId: String!): Any + ConnectLog_DeleteConnectLogs(accountId: String!): JSON \\"Deletes a specified entry from the Connect Log.\\\\n\\" - ConnectLog_DeleteConnectLog(accountId: String!, logId: String!): Any + ConnectLog_DeleteConnectLog(accountId: String!, logId: String!): JSON \\"Deletes the specified DocuSign Connect configuration.\\\\n\\\\n\\\\n \\\\n\\" - Connect_DeleteConnectConfig(accountId: String!, connectId: String!): Any + Connect_DeleteConnectConfig(accountId: String!, connectId: String!): JSON \\"Update Consumer Disclosure.\\" ConsumerDisclosure_PutConsumerDisclosure(input: AccountConsumerDisclosures_Input, accountId: String!, langCode: String!, include_metadata: String): AccountConsumerDisclosures \\"Delete contacts associated with an account for the DocuSign service.\\" @@ -6160,7 +6161,7 @@ type Mutation { \\"Creates an acount custom field.\\" AccountCustomFields_PostAccountCustomFields(input: customField_Input, accountId: String!, apply_to_templates: String): AccountCustomFields \\"Delete an existing account custom field.\\" - AccountCustomFields_DeleteAccountCustomFields(accountId: String!, customFieldId: String!, apply_to_templates: String): Any + AccountCustomFields_DeleteAccountCustomFields(accountId: String!, customFieldId: String!, apply_to_templates: String): JSON \\"Updates an existing account custom field.\\" AccountCustomFields_PutAccountCustomFields(input: customField_Input, accountId: String!, customFieldId: String!, apply_to_templates: String): AccountCustomFields \\"Starts a new eMortgage Transaction\\" @@ -6188,7 +6189,7 @@ type Mutation { \\"Adds one or more documents to an existing envelope document.\\" Documents_PutDocuments(input: envelopeDefinition_Input, accountId: String!, envelopeId: String!, apply_document_fields: String): EnvelopeDocuments \\"Adds a document to an existing draft envelope.\\" - Documents_PutDocument(accountId: String!, envelopeId: String!, documentId: String!, apply_document_fields: String): Any + Documents_PutDocument(accountId: String!, envelopeId: String!, documentId: String!, apply_document_fields: String): JSON \\"Deletes custom document fields from an existing envelope document.\\" DocumentFields_DeleteDocumentFields(input: EnvelopeDocumentFields_Input, accountId: String!, envelopeId: String!, documentId: String!): EnvelopeDocumentFields \\"Creates custom document fields in an existing envelope document.\\" @@ -6196,13 +6197,13 @@ type Mutation { \\"Updates existing custom document fields in an existing envelope document.\\" DocumentFields_PutDocumentFields(input: EnvelopeDocumentFields_Input, accountId: String!, envelopeId: String!, documentId: String!): EnvelopeDocumentFields \\"Deletes a page from a document in an envelope based on the page number.\\" - Pages_DeletePage(accountId: String!, envelopeId: String!, documentId: String!, pageNumber: String!): Any + Pages_DeletePage(accountId: String!, envelopeId: String!, documentId: String!, pageNumber: String!): JSON \\"Rotates page image from an envelope for display. The page image can be rotated to the left or right.\\" - Pages_PutPageImage(input: pageRequest_Input, accountId: String!, envelopeId: String!, documentId: String!, pageNumber: String!): Any + Pages_PutPageImage(input: pageRequest_Input, accountId: String!, envelopeId: String!, documentId: String!, pageNumber: String!): JSON \\"Adds templates to a document in the specified envelope.\\" Templates_PostDocumentTemplates(input: documentTemplateList_Input, accountId: String!, envelopeId: String!, documentId: String!): documentTemplateList \\"Deletes the specified template from a document in an existing envelope.\\" - Templates_DeleteDocumentTemplates(accountId: String!, envelopeId: String!, documentId: String!, templateId: String!): Any + Templates_DeleteDocumentTemplates(accountId: String!, envelopeId: String!, documentId: String!, templateId: String!): JSON \\"Deletes all existing email override settings for the envelope. If you want to delete an individual email override setting, use the PUT and set the value to an empty string. Note that deleting email settings will only affect email communications that occur after the deletion and the normal account email settings are used for future email communications.\\" EmailSettings_DeleteEmailSettings(accountId: String!, envelopeId: String!): EnvelopeEmailSettings \\"Adds email override settings, changing the email address to reply to an email address, name, or the BCC for email archive information, for the envelope. Note that adding email settings will only affect email communications that occur after the addition was made.\\" @@ -6234,9 +6235,9 @@ type Mutation { \\"Updates document visibility for the recipients\\" Recipients_PutRecipientDocumentVisibility(input: EnvelopeDocumentVisibility_Input, accountId: String!, envelopeId: String!, recipientId: String!): EnvelopeDocumentVisibility \\"Updates the initials image for a signer that does not have a DocuSign account. The supported image formats for this file are: gif, png, jpeg, and bmp. The file size must be less than 200K.\\\\n\\\\nFor the Authentication/Authorization for this call, the credentials must match the sender of the envelope, the recipient must be an accountless signer or in person signer. The account must have the \`CanSendEnvelope\` property set to **true** and the \`ExpressSendOnly\` property in \`SendingUser\` structure must be set to **false**.\\" - Recipients_PutRecipientInitialsImage(accountId: String!, envelopeId: String!, recipientId: String!): Any + Recipients_PutRecipientInitialsImage(accountId: String!, envelopeId: String!, recipientId: String!): JSON \\"Updates the signature image for an accountless signer. The supported image formats for this file are: gif, png, jpeg, and bmp. The file size must be less than 200K.\\\\n\\\\nFor the Authentication/Authorization for this call, the credentials must match the sender of the envelope, the recipient must be an accountless signer or in person signer. The account must have the \`CanSendEnvelope\` property set to **true** and the \`ExpressSendOnly\` property in \`SendingUser\` structure must be set to **false**.\\" - Recipients_PutRecipientSignatureImage(accountId: String!, envelopeId: String!, recipientId: String!): Any + Recipients_PutRecipientSignatureImage(accountId: String!, envelopeId: String!, recipientId: String!): JSON \\"Deletes one or more tabs associated with a recipient in a draft envelope.\\" Recipients_DeleteRecipientTabs(input: EnvelopeRecipientTabs_Input, accountId: String!, envelopeId: String!, recipientId: String!): EnvelopeRecipientTabs \\"Adds one or more tabs for a recipient.\\" @@ -6272,7 +6273,7 @@ type Mutation { \\"Creates a new permission profile in the specified account.\\" PermissionProfiles_PostPermissionProfiles(input: AccountPermissionProfiles_Input, accountId: String!, include: String): AccountPermissionProfiles \\"Deletes a permissions profile within the specified account.\\" - PermissionProfiles_DeletePermissionProfiles(accountId: String!, permissionProfileId: String!): Any + PermissionProfiles_DeletePermissionProfiles(accountId: String!, permissionProfileId: String!): JSON \\"Updates a permission profile within the specified account.\\" PermissionProfiles_PutPermissionProfiles(input: AccountPermissionProfiles_Input, accountId: String!, permissionProfileId: String!, include: String): AccountPermissionProfiles \\"Deletes one or more PowerForms\\" @@ -6280,13 +6281,13 @@ type Mutation { \\"Creates a new PowerForm.\\" PowerForms_PostPowerForm(input: PowerForms_Input, accountId: String!): PowerForms \\"Delete a PowerForm.\\" - PowerForms_DeletePowerForm(accountId: String!, powerFormId: String!): Any + PowerForms_DeletePowerForm(accountId: String!, powerFormId: String!): JSON \\"Creates a new PowerForm.\\" PowerForms_PutPowerForm(input: PowerForms_Input, accountId: String!, powerFormId: String!): PowerForms \\"Updates the account settings for the specified account.\\" - Settings_PutSettings(input: accountSettingsInformation_Input, accountId: String!): Any + Settings_PutSettings(input: accountSettingsInformation_Input, accountId: String!): JSON \\"Deletes configuration information for the eNote eOriginal integration.\\" - ENoteConfiguration_DeleteENoteConfiguration(accountId: String!): Any + ENoteConfiguration_DeleteENoteConfiguration(accountId: String!): JSON \\"Updates configuration information for the eNote eOriginal integration.\\" ENoteConfiguration_PutENoteConfiguration(input: ENoteConfigurations_Input, accountId: String!): ENoteConfigurations \\"Update the password rules\\" @@ -6310,7 +6311,7 @@ type Mutation { \\"Creates a tab with pre-defined properties, such as a text tab with a certain font type and validation pattern. Users can access the custom tabs when sending documents through the DocuSign web application.\\\\n\\\\nCustom tabs can be created for approve, checkbox, company, date, date signed, decline, email, email address, envelope ID, first name, formula, full name, initial here, last name, list, note, number, radio, sign here, signer attachment, SSN, text, title, and zip tabs.\\" Tabs_PostTabDefinitions(input: CustomTabs_Input, accountId: String!): CustomTabs \\"Deletes the custom from the specified account.\\" - Tab_DeleteCustomTab(accountId: String!, customTabId: String!): Any + Tab_DeleteCustomTab(accountId: String!, customTabId: String!): JSON \\"Updates the information in a custom tab for the specified account.\\" Tab_PutCustomTab(input: CustomTabs_Input, accountId: String!, customTabId: String!): CustomTabs \\"Creates a template definition using a multipart request.\\\\n\\\\n\\\\nCall this endpoint to insert a recipient name and email address merge fields into the email subject line when creating or sending from a template.\\\\n\\\\nThe merge fields, based on the recipient's role name, are added to the \`emailSubject\` property when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line.\\\\n\\\\nBoth the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient.\\\\n\\\\nTo add a recipient's name in the subject line add the following text in the \`emailSubject\` property when creating the template or when sending an envelope from a template:\\\\n\\\\n\`[[_UserName]]\`\\\\n\\\\nExample:\\\\n\\\\n\`\\\\\\"emailSubject\\\\\\":\\\\\\"[[Signer 1_UserName]], Please sign this NDA\\\\\\",\`\\\\n\\\\nTo add a recipient's email address in the subject line add the following text in the \`emailSubject\` property when creating the template or when sending an envelope from a template:\\\\n\\\\n\`[[_Email]]\`\\\\n\\\\nExample:\\\\n\\\\n\`\\\\\\"emailSubject\\\\\\":\\\\\\"[[Signer 1_Email]], Please sign this NDA\\\\\\",\`\\\\n\\\\n\\\\nIn both cases the is the recipient's contents of the \`roleName\` property in the template.\\\\n\\\\nFor cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then \`[[_UserName]]\` or \`[[_Email]]\` is shown in the email subject.\\" @@ -6336,9 +6337,9 @@ type Mutation { \\"Updates existing custom document fields in an existing template document.\\" DocumentFields_PutTemplateDocumentFields(input: EnvelopeDocumentFields_Input, accountId: String!, templateId: String!, documentId: String!): EnvelopeDocumentFields \\"Deletes a page from a document in a template based on the page number.\\" - Pages_DeleteTemplatePage(input: pageRequest_Input, accountId: String!, templateId: String!, documentId: String!, pageNumber: String!): Any + Pages_DeleteTemplatePage(input: pageRequest_Input, accountId: String!, templateId: String!, documentId: String!, pageNumber: String!): JSON \\"Rotates page image from a template for display. The page image can be rotated to the left or right.\\" - Pages_PutTemplatePageImage(input: pageRequest_Input, accountId: String!, templateId: String!, documentId: String!, pageNumber: String!): Any + Pages_PutTemplatePageImage(input: pageRequest_Input, accountId: String!, templateId: String!, documentId: String!, pageNumber: String!): JSON \\"Deletes the lock from the specified template. The \`X-DocuSign-Edit\` header must be included in the request.\\" Lock_DeleteTemplateLock(input: lockRequest_Input, accountId: String!, templateId: String!): EnvelopeLocks \\"Locks the specified template, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the template.\\" @@ -6394,19 +6395,19 @@ type Mutation { \\"Adds or updates custom user settings for the specified user.\\\\n\\\\n\\\\nCustom settings provide a flexible way to store and retrieve custom user information that you can use in your own system.\\\\n\\\\n**Important**: There is a limit on the size for all the custom user settings for a single user. The limit is 4,000 characters, which includes the XML and JSON structure for the settings.\\\\n\\\\n\\\\nYou can group custom user settings when adding them. Grouping allows you to retrieve settings that are in a specific group, instead of retrieving all the user custom settings.\\\\n\\\\nTo group custom user settings, add the following information in the header, after Content-Type:\\\\n\\\\n\`X-DocuSign-User-Settings-Key:group_name\`\\\\n\\\\nWhere the \`group_name\` is your designated name for the group of customer user settings. Grouping is shown in the Example Request Body below.\\\\n\\\\nWhen getting or deleting grouped custom user settings, you must include the extra header information.\\\\n\\\\nGrouping custom user settings is not required and if the extra header information is not included, the custom user settings are added normally and can be retrieved or deleted without including the additional header.\\" UserCustomSettings_PutCustomSettings(input: UserCustomSettings_Input, accountId: String!, userId: String!): UserCustomSettings \\"Updates the user's detail information, profile information, privacy settings, and personal information in the user ID card.\\\\n\\\\nYou can also change a user's name by changing the information in the \`userDetails\` property. When changing a user's name, you can either change the information in the \`userName\` property OR change the information in \`firstName\`, \`middleName\`, \`lastName, suffixName\`, and \`title\` properties. Changes to \`firstName\`, \`middleName\`, \`lastName\`, \`suffixName\`, and \`title\` properties take precedence over changes to the \`userName\` property.\\" - UserProfile_PutProfile(input: UserProfiles_Input, accountId: String!, userId: String!): Any + UserProfile_PutProfile(input: UserProfiles_Input, accountId: String!, userId: String!): JSON \\"Deletes the user profile image from the specified user's profile.\\\\n\\\\nThe userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account.\\" - UserProfileImage_DeleteUserProfileImage(accountId: String!, userId: String!): Any + UserProfileImage_DeleteUserProfileImage(accountId: String!, userId: String!): JSON \\"Updates the user profile image by uploading an image to the user profile.\\\\n\\\\nThe supported image formats are: gif, png, jpeg, and bmp. The file must be less than 200K. For best viewing results, DocuSign recommends that the image is no more than 79 pixels wide and high.\\" - UserProfileImage_PutUserProfileImage(accountId: String!, userId: String!): Any + UserProfileImage_PutUserProfileImage(accountId: String!, userId: String!): JSON \\"Updates the account settings list and email notification types for the specified user.\\" - UserSettings_PutUserSettings(input: userSettingsInformation_Input, accountId: String!, userId: String!): Any + UserSettings_PutUserSettings(input: userSettingsInformation_Input, accountId: String!, userId: String!): JSON \\"Adds a user signature image and/or user initials image to the specified user. \\\\n\\\\nThe userId property specified in the endpoint must match the authenticated user's userId and the user must be a member of the account.\\\\n\\\\nThe rules and processes associated with this are:\\\\n\\\\n* If Content-Type is set to application/json, then the default behavior for creating a default signature image, based on the name and a DocuSign font, is used.\\\\n* If Content-Type is set to multipart/form-data, then the request must contain a first part with the user signature information, followed by parts that contain the images.\\\\n\\\\nFor each Image part, the Content-Disposition header has a \\\\\\"filename\\\\\\" value that is used to map to the \`signatureName\` and/or \`signatureInitials\` properties in the JSON to the image. \\\\n\\\\nFor example: \\\\n\`Content-Disposition: file; filename=\\\\\\"Ron Test20121127083900\\\\\\"\`\\\\n\\\\nIf no matching image (by filename value) is found, then the image is not set. One, both, or neither of the signature and initials images can be set with this call.\\\\n\\\\nThe Content-Transfer-Encoding: base64 header, set in the header for the part containing the image, can be set to indicate that the images are formatted as base64 instead of as binary.\\\\n\\\\nIf successful, 200-OK is returned, and a JSON structure containing the signature information is provided, note that the signatureId can change with each API POST, PUT, or DELETE since the changes to the signature structure cause the current signature to be closed, and a new signature record to be created.\\" UserSignatures_PostUserSignatures(input: userSignaturesInformation_Input, accountId: String!, userId: String!): userSignaturesInformation \\"Adds/updates a user signature.\\" UserSignatures_PutUserSignature(input: userSignaturesInformation_Input, accountId: String!, userId: String!): userSignaturesInformation \\"Removes the signature information for the user.\\\\n\\\\nThe userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account.\\\\n\\\\nThe \`signatureId\` accepts a signature ID or a signature name. DocuSign recommends you use signature ID (\`signatureId\`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. \\\\n\\\\nFor example encode \\\\\\"Bob Smith\\\\\\" as \\\\\\"Bob%20Smith\\\\\\".\\" - UserSignatures_DeleteUserSignature(accountId: String!, userId: String!, signatureId: String!): Any + UserSignatures_DeleteUserSignature(accountId: String!, userId: String!, signatureId: String!): JSON \\"Creates, or updates, the signature font and initials for the specified user. When creating a signature, you use this resource to create the signature name and then add the signature and initials images into the signature.\\\\n\\\\n\\\\nThe userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account.\\\\n\\\\nThe \`signatureId\` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (\`signatureId\`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. \\\\n\\\\nFor example encode \\\\\\"Bob Smith\\\\\\" as \\\\\\"Bob%20Smith\\\\\\".\\" UserSignatures_PutUserSignatureById(input: userSignatureDefinition_Input, accountId: String!, userId: String!, signatureId: String!, close_existing_signature: String): UserSignatures \\"Deletes the specified initials image or signature image for the specified user.\\\\n\\\\nThe function deletes one or the other of the image types, to delete both the initials image and signature image you must call the endpoint twice.\\\\n\\\\nThe userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account.\\\\n\\\\nThe \`signatureId\` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (\`signatureId\`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. \\\\n\\\\nFor example encode \\\\\\"Bob Smith\\\\\\" as \\\\\\"Bob%20Smith\\\\\\".\\" @@ -6414,9 +6415,9 @@ type Mutation { \\"Updates the user signature image or user initials image for the specified user. The supported image formats for this file are: gif, png, jpeg, and bmp. The file must be less than 200K.\\\\n\\\\nThe userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account.\\\\n\\\\nThe \`signatureId\` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (\`signatureId\`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. \\\\n\\\\nFor example encode \\\\\\"Bob Smith\\\\\\" as \\\\\\"Bob%20Smith\\\\\\".\\\\n\\" UserSignatures_PutUserSignatureImage(accountId: String!, userId: String!, signatureId: String!, imageType: String!): UserSignatures \\"Deletes a social account from a use's account.\\" - UserSocialLogin_DeleteUserSocialLogin(input: UserSocialAccountLogins_Input, accountId: String!, userId: String!): Any + UserSocialLogin_DeleteUserSocialLogin(input: UserSocialAccountLogins_Input, accountId: String!, userId: String!): JSON \\"Adds a new social account to a user's account.\\" - UserSocialLogin_PutUserSocialLogin(input: UserSocialAccountLogins_Input, accountId: String!, userId: String!): Any + UserSocialLogin_PutUserSocialLogin(input: UserSocialAccountLogins_Input, accountId: String!, userId: String!): JSON \\"Returns a URL that allows you to embed the authentication view of the DocuSign UI in your applications.\\" Views_PostAccountConsoleView(input: consoleViewRequest_Input, accountId: String!): EnvelopeViews \\"Update watermark information.\\" @@ -6430,19 +6431,19 @@ type Mutation { \\"Updates information about a specific workspace.\\" Workspace_PutWorkspace(input: Workspaces_Input, accountId: String!, workspaceId: String!): Workspaces \\"Deletes workspace one or more specific files/folders from the given folder or root.\\" - WorkspaceFolder_DeleteWorkspaceItems(input: workspaceItemList_Input, accountId: String!, workspaceId: String!, folderId: String!): Any + WorkspaceFolder_DeleteWorkspaceItems(input: workspaceItemList_Input, accountId: String!, workspaceId: String!, folderId: String!): JSON \\"Creates a workspace file.\\" WorkspaceFile_PostWorkspaceFiles(accountId: String!, workspaceId: String!, folderId: String!): WorkspaceItems \\"Updates workspace item metadata for one or more specific files/folders.\\" WorkspaceFile_PutWorkspaceFile(accountId: String!, workspaceId: String!, folderId: String!, fileId: String!): WorkspaceItems \\"Deletes the request log files.\\" - APIRequestLog_DeleteRequestLogs: Any + APIRequestLog_DeleteRequestLogs: JSON \\"Enables or disables API request logging for troubleshooting.\\\\n\\\\nWhen enabled (\`apiRequestLogging\` is set to true), REST API requests and responses for the user are added to a log. A log can have up to 50 requests/responses and the current number of log entries can be determined by getting the settings. Logging is automatically disabled when the log limit of 50 is reached.\\\\n\\\\nYou can call [ML:GetRequestLog] or [ML:GetRequestLogs] to download the log files (individually or as a zip file). Call [ML:DeleteRequestLogs] to clear the log by deleting current entries.\\\\n\\\\nPrivate information, such as passwords and integrator key information, which is normally located in the call header is omitted from the request/response log.\\\\n\\" APIRequestLog_PutRequestLogSettings(input: RequestLogs_Input): RequestLogs \\"Updates the password for a specified user.\\" - LoginInformation_PutLoginInformation(input: userPasswordInformation_Input, loginPart: String!): Any + LoginInformation_PutLoginInformation(input: userPasswordInformation_Input, loginPart: String!): JSON \\"**Deprecated**\\\\n\\\\nRevokes an OAuth2 authorization server token. After the revocation is complete, a caller must re-authenticate to restore access.\\\\n\\" - OAuth2_PostRevoke: Any + OAuth2_PostRevoke: JSON \\"**Deprecated**\\\\n\\\\nCreates an OAuth2 authorization server token endpoint.\\\\n\\" OAuth2_PostToken: oauthAccess } diff --git a/packages/loaders/openapi/tests/__snapshots__/example_api.test.ts.snap b/packages/loaders/openapi/tests/__snapshots__/example_api.test.ts.snap index aa69c6a7edb86..094b8e0a2a6d0 100644 --- a/packages/loaders/openapi/tests/__snapshots__/example_api.test.ts.snap +++ b/packages/loaders/openapi/tests/__snapshots__/example_api.test.ts.snap @@ -36,7 +36,7 @@ type Query { \\"Used to test empty responses\\" getBonuses: Void \\"Return an office.\\" - getOffice(accept: String, id: Int!): office + getOffice(id: Int!): office \\"Return a list of papers. Endpoint to test 2XX status code.\\" getPapers: [paper] \\"Another endpoint to test unsanitized parameters and data.\\" @@ -113,7 +113,7 @@ type familyObject { \\"A company is the employer of many users\\" type company { \\"The identifier of a company\\" - id: String + id: UUID \\"The legal name of a company\\" name: String \\"The legal form of a company\\" @@ -126,6 +126,9 @@ type company { ceoUser: user } +\\"A field whose value is a generic Universally Unique Identifier: https://en.wikipedia.org/wiki/Universally_unique_identifier.\\" +scalar UUID + input getUsers_request_Input { \\"Limit of the number of users to return.\\" limit: Int! @@ -137,24 +140,16 @@ type car { model: String \\"The color of the car.\\" color: String - features: query_getUserCar_features - tags: Tags + features: JSON + \\"Arbitrary (string) tags describing an entity.\\" + tags: JSON kind: query_getUserCar_kind rating: query_getUserCar_rating } -type query_getUserCar_features { - additionalProperties: JSON -} - \\"The \`JSON\` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).\\" scalar JSON @specifiedBy(url: \\"http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf\\") -\\"Arbitrary (string) tags describing an entity.\\" -type Tags { - additionalProperties: JSON -} - enum query_getUserCar_kind { SEDAN SUV diff --git a/packages/loaders/openapi/tests/__snapshots__/example_api_combined.test.ts.snap b/packages/loaders/openapi/tests/__snapshots__/example_api_combined.test.ts.snap index a0fc3bd5bbdaf..e5c37342ab7ac 100644 --- a/packages/loaders/openapi/tests/__snapshots__/example_api_combined.test.ts.snap +++ b/packages/loaders/openapi/tests/__snapshots__/example_api_combined.test.ts.snap @@ -15,24 +15,16 @@ type query_getAllCars_items { model: String \\"The color of the car.\\" color: String - features: query_getAllCars_items_allOf_0_features - tags: Tags + features: JSON + \\"Arbitrary (string) tags describing an entity.\\" + tags: JSON kind: query_getAllCars_items_allOf_0_kind rating: query_getAllCars_items_allOf_0_rating } -type query_getAllCars_items_allOf_0_features { - additionalProperties: JSON -} - \\"The \`JSON\` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).\\" scalar JSON @specifiedBy(url: \\"http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf\\") -\\"Arbitrary (string) tags describing an entity.\\" -type Tags { - additionalProperties: JSON -} - enum query_getAllCars_items_allOf_0_kind { SEDAN SUV diff --git a/packages/loaders/openapi/tests/__snapshots__/toto.test.ts.snap b/packages/loaders/openapi/tests/__snapshots__/toto.test.ts.snap index e55ccbf01dae3..703e9c3350a87 100644 --- a/packages/loaders/openapi/tests/__snapshots__/toto.test.ts.snap +++ b/packages/loaders/openapi/tests/__snapshots__/toto.test.ts.snap @@ -24,9 +24,9 @@ Object { "description": "List Resources At Any Folder Level", "field": "list_resources_at_any_folder_v1", "headers": Object { - "Accept": "application/json", "Accept-Language": "{args.Accept_Language}", "X-Correlation-Id": "{args.X_Correlation_Id}", + "accept": "application/json", }, "method": "GET", "operationHeaders": undefined, @@ -104,7 +104,10 @@ Object { }, "responseByStatusCode": Object { "200": Object { - "responseSchema": "./fixtures/toto.yml#/paths/~1api~1v1~1companies~1{companyId}~1knowledgecenter~1folders~1{folderId}~1resources/get/responses/200/content/application~1json/schema", + "responseSchema": Object { + "$ref": "./fixtures/toto.yml#/paths/~1api~1v1~1companies~1{companyId}~1knowledgecenter~1folders~1{folderId}~1resources/get/responses/200/content/application~1json/schema", + "title": "list_resources_at_any_folder_v1_200_response", + }, }, }, "schemaHeaders": undefined, @@ -120,10 +123,10 @@ Object { "description": "Create resources at any folder level", "field": "create_resource_at_any_folder_v1", "headers": Object { - "Accept": "application/json", "Accept-Language": "{args.Accept_Language}", "Content-Type": "application/json", "X-Correlation-Id": "{args.X_Correlation_Id}", + "accept": "application/json", }, "method": "POST", "operationHeaders": undefined, @@ -131,7 +134,10 @@ Object { "requestSchema": "./fixtures/toto.yml#/paths/~1api~1v1~1companies~1{companyId}~1knowledgecenter~1folders~1{folderId}~1resources/post/requestBody/content/application~1json/schema", "responseByStatusCode": Object { "201": Object { - "responseSchema": "./fixtures/toto.yml#/paths/~1api~1v1~1companies~1{companyId}~1knowledgecenter~1folders~1{folderId}~1resources/post/responses/201/content/application~1json/schema", + "responseSchema": Object { + "$ref": "./fixtures/toto.yml#/paths/~1api~1v1~1companies~1{companyId}~1knowledgecenter~1folders~1{folderId}~1resources/post/responses/201/content/application~1json/schema", + "title": "create_resource_at_any_folder_v1_201_response", + }, }, }, "schemaHeaders": undefined, @@ -148,10 +154,10 @@ Object { "description": "Update A Resource At Any Folder Level", "field": "update_resource_at_any_folder_v1", "headers": Object { - "Accept": "application/json", "Accept-Language": "{args.Accept_Language}", "Content-Type": "application/json", "X-Correlation-Id": "{args.X_Correlation_Id}", + "accept": "application/json", }, "method": "PUT", "operationHeaders": undefined, @@ -159,7 +165,10 @@ Object { "requestSchema": "./fixtures/toto.yml#/paths/~1api~1v1~1companies~1{companyId}~1knowledgecenter~1folders~1{folderId}~1resources~1{resourceId}/put/requestBody/content/application~1json/schema", "responseByStatusCode": Object { "200": Object { - "responseSchema": "./fixtures/toto.yml#/paths/~1api~1v1~1companies~1{companyId}~1knowledgecenter~1folders~1{folderId}~1resources~1{resourceId}/put/responses/200/content/application~1json/schema", + "responseSchema": Object { + "$ref": "./fixtures/toto.yml#/paths/~1api~1v1~1companies~1{companyId}~1knowledgecenter~1folders~1{folderId}~1resources~1{resourceId}/put/responses/200/content/application~1json/schema", + "title": "update_resource_at_any_folder_v1_200_response", + }, }, }, "schemaHeaders": undefined, @@ -182,9 +191,9 @@ Object { "description": "List All Resources At The Root Folder", "field": "list_resources_at_the_root_folder_v1", "headers": Object { - "Accept": "application/json", "Accept-Language": "{args.Accept_Language}", "X-Correlation-Id": "{args.X_Correlation_Id}", + "accept": "application/json", }, "method": "GET", "operationHeaders": undefined, @@ -273,7 +282,10 @@ Object { }, "responseByStatusCode": Object { "200": Object { - "responseSchema": "./fixtures/toto.yml#/paths/~1api~1v1~1companies~1{companyId}~1knowledgecenter~1resources/get/responses/200/content/application~1json/schema", + "responseSchema": Object { + "$ref": "./fixtures/toto.yml#/paths/~1api~1v1~1companies~1{companyId}~1knowledgecenter~1resources/get/responses/200/content/application~1json/schema", + "title": "list_resources_at_the_root_folder_v1_200_response", + }, }, }, "schemaHeaders": undefined, @@ -288,10 +300,10 @@ Object { "description": "Create A Resource At The Root Folder", "field": "create_resource_at_the_root_folder_v1", "headers": Object { - "Accept": "application/json", "Accept-Language": "{args.Accept_Language}", "Content-Type": "application/json", "X-Correlation-Id": "{args.X_Correlation_Id}", + "accept": "application/json", }, "method": "POST", "operationHeaders": undefined, @@ -299,7 +311,10 @@ Object { "requestSchema": "./fixtures/toto.yml#/paths/~1api~1v1~1companies~1{companyId}~1knowledgecenter~1resources/post/requestBody/content/application~1json/schema", "responseByStatusCode": Object { "201": Object { - "responseSchema": "./fixtures/toto.yml#/paths/~1api~1v1~1companies~1{companyId}~1knowledgecenter~1resources/post/responses/201/content/application~1json/schema", + "responseSchema": Object { + "$ref": "./fixtures/toto.yml#/paths/~1api~1v1~1companies~1{companyId}~1knowledgecenter~1resources/post/responses/201/content/application~1json/schema", + "title": "create_resource_at_the_root_folder_v1_201_response", + }, }, }, "schemaHeaders": undefined, @@ -315,16 +330,19 @@ Object { "description": "Get Resource by ID", "field": "get_resource_by_id_v1", "headers": Object { - "Accept": "application/json", "Accept-Language": "{args.Accept_Language}", "X-Correlation-Id": "{args.X_Correlation_Id}", + "accept": "application/json", }, "method": "GET", "operationHeaders": undefined, "path": "/api/v1/companies/{args.companyId}/knowledgecenter/resources/{args.resourceId}", "responseByStatusCode": Object { "200": Object { - "responseSchema": "./fixtures/toto.yml#/paths/~1api~1v1~1companies~1{companyId}~1knowledgecenter~1resources~1{resourceId}/get/responses/200/content/application~1json/schema", + "responseSchema": Object { + "$ref": "./fixtures/toto.yml#/paths/~1api~1v1~1companies~1{companyId}~1knowledgecenter~1resources~1{resourceId}/get/responses/200/content/application~1json/schema", + "title": "get_resource_by_id_v1_200_response", + }, }, }, "schemaHeaders": undefined, @@ -340,10 +358,10 @@ Object { "description": "Update A Resource At The Root Folder", "field": "update_resource_at_the_root_folder_v1", "headers": Object { - "Accept": "application/json", "Accept-Language": "{args.Accept_Language}", "Content-Type": "application/json", "X-Correlation-Id": "{args.X_Correlation_Id}", + "accept": "application/json", }, "method": "PUT", "operationHeaders": undefined, @@ -351,7 +369,10 @@ Object { "requestSchema": "./fixtures/toto.yml#/paths/~1api~1v1~1companies~1{companyId}~1knowledgecenter~1resources~1{resourceId}/put/requestBody/content/application~1json/schema", "responseByStatusCode": Object { "200": Object { - "responseSchema": "./fixtures/toto.yml#/paths/~1api~1v1~1companies~1{companyId}~1knowledgecenter~1resources~1{resourceId}/put/responses/200/content/application~1json/schema", + "responseSchema": Object { + "$ref": "./fixtures/toto.yml#/paths/~1api~1v1~1companies~1{companyId}~1knowledgecenter~1resources~1{resourceId}/put/responses/200/content/application~1json/schema", + "title": "update_resource_at_the_root_folder_v1_200_response", + }, }, }, "schemaHeaders": undefined, @@ -955,9 +976,7 @@ Object { }, "query_get_resource_by_id_v1_oneOf_0_allOf_2_i18n": Object { "additionalProperties": Object { - "additionalProperties": Object { - "type": "string", - }, + "additionalProperties": true, "title": "query_get_resource_by_id_v1_oneOf_0_allOf_2_i18n_additionalProperties", "type": "object", }, @@ -965,9 +984,7 @@ Object { "type": "object", }, "query_get_resource_by_id_v1_oneOf_0_allOf_2_i18n_additionalProperties": Object { - "additionalProperties": Object { - "type": "string", - }, + "additionalProperties": true, "title": "query_get_resource_by_id_v1_oneOf_0_allOf_2_i18n_additionalProperties", "type": "object", }, @@ -1162,11 +1179,7 @@ type FileGetWithI18nDTO { size: Int url: String contentType: String - i18n: query_get_resource_by_id_v1_oneOf_0_allOf_2_i18n_additionalProperties -} - -type query_get_resource_by_id_v1_oneOf_0_allOf_2_i18n_additionalProperties { - additionalProperties: JSON + i18n: JSON } \\"The \`JSON\` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).\\" @@ -1190,7 +1203,7 @@ type FolderGetWithI18nDTO { lastUpdateUserId: String fileCount: Int childFolderCount: Int - i18n: query_get_resource_by_id_v1_oneOf_0_allOf_2_i18n_additionalProperties + i18n: JSON } type Mutation { @@ -1222,15 +1235,13 @@ input FileCreateDTO_Input { punchedFenced: Boolean geoFenced: Boolean pinned: Boolean - i18n: query_get_resource_by_id_v1_oneOf_0_allOf_2_i18n_additionalProperties_Input2 + i18n: JSON type: [query_list_resources_at_any_folder_v1_items_anyOf_0_allOf_0_allOf_0_parentHierarchy_items_type_items]! size: Int url: String contentType: String } -scalar query_get_resource_by_id_v1_oneOf_0_allOf_2_i18n_additionalProperties_Input2 - input ResourceCreateDTO_Input { parentFolderId: String status: [query_list_resources_at_any_folder_v1_items_anyOf_0_allOf_0_allOf_0_parentHierarchy_items_status_items] @@ -1242,7 +1253,7 @@ input ResourceCreateDTO_Input { punchedFenced: Boolean geoFenced: Boolean pinned: Boolean - i18n: query_get_resource_by_id_v1_oneOf_0_allOf_2_i18n_additionalProperties_Input2 + i18n: JSON type: [query_list_resources_at_any_folder_v1_items_anyOf_0_allOf_0_allOf_0_parentHierarchy_items_type_items]! } diff --git a/packages/loaders/openapi/tests/cloudfunction_expanded.test.ts b/packages/loaders/openapi/tests/cloudfunction_expanded.test.ts new file mode 100644 index 0000000000000..063fc76f8572e --- /dev/null +++ b/packages/loaders/openapi/tests/cloudfunction_expanded.test.ts @@ -0,0 +1,33 @@ +import { GraphQLSchema, parse, validate } from 'graphql'; +import { join } from 'path'; +import { loadGraphQLSchemaFromOpenAPI } from '../src/loadGraphQLSchemaFromOpenAPI'; +import { printSchemaWithDirectives } from '@graphql-tools/utils'; + +describe('Cloudfunction', () => { + let createdSchema: GraphQLSchema; + beforeAll(async () => { + createdSchema = await loadGraphQLSchemaFromOpenAPI('test', { + oasFilePath: join(__dirname, '../../../handlers/openapi/test/fixtures/cloudfunction_expanded.json'), + operationHeaders: { + Authorization: 'Basic {args.usernamePassword|base64}', + }, + ignoreErrorResponses: true, // Because Error type is invalid in the OAS file + }); + }); + it('should generate correct schema', () => { + expect(printSchemaWithDirectives(createdSchema)).toMatchSnapshot('cloudfunction-schema'); + }); + it('should validate the following query', () => { + const query = /* GraphQL */ ` + mutation { + post_test_action_2(input: { age: 27 }, usernamePassword: "test:data") { + payload + age + } + } + `; + const document = parse(query); + const errors = validate(createdSchema, document); + expect(errors).toEqual([]); + }); +}); diff --git a/packages/loaders/openapi/tests/example_api.test.ts b/packages/loaders/openapi/tests/example_api.test.ts index 95a32e774960e..93f839c8fef78 100644 --- a/packages/loaders/openapi/tests/example_api.test.ts +++ b/packages/loaders/openapi/tests/example_api.test.ts @@ -1,26 +1,34 @@ -import { execute, GraphQLObjectType, GraphQLSchema, parse } from 'graphql'; +import { execute, graphql, GraphQLInputObjectType, GraphQLObjectType, GraphQLSchema, parse, validate } from 'graphql'; +import 'json-bigint-patch'; import { loadGraphQLSchemaFromOpenAPI } from '../src/loadGraphQLSchemaFromOpenAPI'; import { startServer, stopServer } from '../../../handlers/openapi/test/example_api_server'; -import { join } from 'path'; import { fetch } from '@whatwg-node/fetch'; import { printSchemaWithDirectives } from '@graphql-tools/utils'; +import { OpenAPILoaderOptions } from '../src'; let createdSchema: GraphQLSchema; const PORT = 3002; const baseUrl = `http://localhost:${PORT}/api`; +jest.setTimeout(15000); + describe('example_api', () => { beforeAll(async () => { createdSchema = await loadGraphQLSchemaFromOpenAPI('test', { fetch, baseUrl, - oasFilePath: join(__dirname, '../../../handlers/openapi/test/fixtures/example_oas.json'), + oasFilePath: '../../../handlers/openapi/test/fixtures/example_oas.json', + cwd: __dirname, }); await startServer(PORT); }); afterAll(() => stopServer()); + it('should generate the schema correctly', () => { + expect(printSchemaWithDirectives(createdSchema)).toMatchSnapshot(); + }); + it('should get descriptions', async () => { // Get all the descriptions of the fields on the GraphQL object type car const carType = createdSchema.getType('car') as GraphQLObjectType; @@ -52,6 +60,25 @@ describe('example_api', () => { }); }); + it('Get resource 2', async () => { + const query = /* GraphQL */ ` + { + getCompanyById(id: "binsol") { + legalForm + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { getCompanyById: { legalForm: 'public' } }, + }); + }); + // OAS allows you to define response objects with HTTP code with the XX wildcard syntax it('should get resource with status code: 2XX', async () => { const query = /* GraphQL */ ` @@ -529,7 +556,1509 @@ describe('example_api', () => { }, }); }); - it('should generate the schema correctly', () => { - expect(printSchemaWithDirectives(createdSchema)).toMatchSnapshot(); + + // Links can be defined with some parameters as constants or variables + it('Link parameters as constants and variables', async () => { + const query = /* GraphQL */ ` + { + getScanner(input: { query: "hello" }) { + body + basicLink { + body + } + variableLink { + body + } + constantLink { + body + } + everythingLink { + body + } + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + getScanner: { + body: 'hello', + basicLink: { + body: 'hello', + }, + variableLink: { + body: '_hello_hellohelloabchello123', + }, + constantLink: { + body: '123', + }, + everythingLink: { + body: 'http://localhost:3002/api/scanner_GET_200_hello_application/json_keep-alive', + }, + }, + }, + }); + }); + + it('Nested links with constants and variables', async () => { + const query = /* GraphQL */ ` + { + getScanner(input: { query: "val" }) { + body + basicLink { + body + basicLink { + body + basicLink { + body + } + } + } + variableLink { + body + constantLink { + body + everythingLink { + body + everythingLink { + body + } + } + } + } + constantLink { + body + } + everythingLink { + body + } + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + getScanner: { + body: 'val', + basicLink: { + body: 'val', + basicLink: { + body: 'val', + basicLink: { + body: 'val', + }, + }, + }, + variableLink: { + body: '_val_valvalabcval123', + constantLink: { + body: '123', + everythingLink: { + body: 'http://localhost:3002/api/copier_GET_200_123_application/json_keep-alive', + everythingLink: { + body: 'http://localhost:3002/api/copier_GET_200_http://localhost:3002/api/copier_GET_200_123_application/json_keep-alive_application/json_keep-alive', + }, + }, + }, + }, + constantLink: { + body: '123', + }, + everythingLink: { + body: 'http://localhost:3002/api/scanner_GET_200_val_application/json_keep-alive', + }, + }, + }, + }); + }); + + it('Link parameters as constants and variables with request payload', async () => { + const query = /* GraphQL */ ` + mutation { + postScanner(query: "query", path: "path", input: "body") { + body + everythingLink2 { + body + } + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + postScanner: { + body: 'req.body: body, req.query.query: query, req.path.path: path', + everythingLink2: { + body: 'http://localhost:3002/api/scanner/path_POST_200_body_query_path_application/json_req.body: body, req.query.query: query, req.path.path: path_query_path_keep-alive', + }, + }, + }, + }); + }); + + it('Get response for users with providing correct parameter', async () => { + const query = /* GraphQL */ ` + { + getUsers(input: { limit: 2 }) { + name + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + getUsers: [{ name: 'Arlene L McMahon' }, { name: 'William B Ropp' }], + }, + }); + }); + + it('Get response with providing parameter with falsy value', async () => { + const query = /* GraphQL */ ` + { + getUsers(input: { limit: 0 }) { + name + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + getUsers: [], + }, + }); + }); + + it('Get response without providing parameter with default value', async () => { + // NOTE: product_tag was missing in the original handler, but here it fails without it. is it a bug? + const query = /* GraphQL */ ` + { + getProductReviews(id: "100", input: { product_tag: "" }) { + text + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + getProductReviews: [{ text: 'Great product' }, { text: 'I love it' }], + }, + }); + }); + + it('Get response with header parameters', async () => { + const query = /* GraphQL */ ` + { + getSnack(snack_type: "CHIPS", snack_size: "SMALL") + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + getSnack: 'Here is a SMALL CHIPS', + }, + }); + }); + + /** + * Content-type and accept headers should not change because they are + * linked to GraphQL object types with static schemas + */ + it('Get JSON response even with non-JSON accept header', async () => { + const query = /* GraphQL */ ` + { + getOffice(id: 2) { + employerId + room_number + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + getOffice: { + employerId: 'binsol', + room_number: 102, + }, + }, + }); + }); + + it('Get response with cookies', async () => { + const query = /* GraphQL */ ` + { + getCookie(cookie_type: "CHOCOLATE_CHIP", cookie_size: "MEGA_SIZED") + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + getCookie: 'Thanks for your cookie preferences: "cookie_type=CHOCOLATE_CHIP; cookie_size=MEGA_SIZED;"', + }, + }); + }); + + /** + * GraphQL (input) object type also consider the preferred name when generating + * a name + */ + it('Ensure good naming for operations with duplicated schemas', async () => { + const query = /* GraphQL */ ` + query { + getNumberOfCleanDesks + getNumberOfDirtyDesks + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + getNumberOfCleanDesks: '5 clean desks', + getNumberOfDirtyDesks: '5 dirty desks', + }, + }); + }); + + /** + * CASE: 64 bit int - return number instead of integer, leading to use of + * GraphQLFloat, which can support 64 bits: + */ + it('Get response containing 64-bit integer (using GraphQLBigInt)', async () => { + const query = /* GraphQL */ ` + { + getProductReviews(id: "100", input: { product_tag: "blah" }) { + timestamp + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + getProductReviews: [{ timestamp: BigInt(1502787600000000) }, { timestamp: BigInt(1502787400000000) }], + }, + }); + }); + + it('Get array of strings', async () => { + const query = /* GraphQL */ ` + { + getUserByUsername(username: "arlene") { + hobbies + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + getUserByUsername: { + hobbies: ['tap dancing', 'bowling'], + }, + }, + }); + }); + + it('Get array of objects', async () => { + const query = /* GraphQL */ ` + { + getCompanyById(id: "binsol") { + offices { + street + } + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + getCompanyById: { + offices: [ + { + street: '122 Elk Rd Little', + }, + { + street: '124 Elk Rd Little', + }, + ], + }, + }, + }); + }); + + it('Get single resource', async () => { + const query = /* GraphQL */ ` + { + getUserByUsername(username: "arlene") { + name + address { + street + } + address2 { + city + } + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + getUserByUsername: { + name: 'Arlene L McMahon', + address: { + street: '4656 Cherry Camp Road', + }, + address2: { + city: 'Macomb', + }, + }, + }, + }); + }); + + it('Post resource', async () => { + const query = /* GraphQL */ ` + mutation { + postUser( + input: { + name: "Mr. New Guy" + address: { street: "Home streeet 1", city: "Hamburg" } + employerId: "binsol" + hobbies: "soccer" + } + ) { + name + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + postUser: { + name: 'Mr. New Guy', + }, + }, + }); + }); + + it('Post resource and get nested resource back', async () => { + const query = /* GraphQL */ ` + mutation { + postUser( + input: { + name: "Mr. New Guy" + address: { street: "Home streeet 1", city: "Hamburg" } + employerId: "binsol" + hobbies: "soccer" + } + ) { + name + employerCompany { + ceoUser { + name + } + } + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + postUser: { + name: 'Mr. New Guy', + employerCompany: { + ceoUser: { + name: 'John C Barnes', + }, + }, + }, + }, + }); + }); + + it('Post resource with non-application/json content-type request and response bodies', async () => { + const query = /* GraphQL */ ` + mutation { + postPaper(input: "happy") + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + postPaper: 'You sent the paper idea: happy', + }, + }); + }); + + it( + 'Operation id is correctly sanitized, schema names and fields are ' + + 'correctly sanitized, path and query parameters are correctly sanitized, ' + + 'received data is correctly sanitized', + async () => { + const query = /* GraphQL */ ` + { + get_product_with_id(product_id: "this-path", input: { product_tag: "And a tag" }) { + product_id + product_tag + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + get_product_with_id: { + product_id: 'this-path', + product_tag: 'And a tag', + }, + }, + }); + } + ); + + it('Request data is correctly de-sanitized to be sent', async () => { + const query = /* GraphQL */ ` + mutation { + post_product_with_id(input: { product_name: "Soccer ball", product_id: "ball123", product_tag: "sports" }) { + product_name + product_id + product_tag + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + post_product_with_id: { + product_name: 'Soccer ball', + product_id: 'ball123', + product_tag: 'sports', + }, + }, + }); + }); + + it('Fields with arbitrary JSON (e.g., maps) can be returned', async () => { + // Testing additionalProperties field in schemas + const query1 = /* GraphQL */ ` + { + getAllCars { + tags + } + } + `; + + // Testing empty properties field + const query2 = /* GraphQL */ ` + { + getAllCars { + features + } + } + `; + + const [result1, result2] = await Promise.all( + [query1, query2].map(query => + execute({ + schema: createdSchema, + document: parse(query), + }) + ) + ); + + expect(result1).toEqual({ + data: { + getAllCars: [ + { + tags: null, + }, + { + tags: { + speed: 'extreme', + }, + }, + { + tags: { + impression: 'decadent', + condition: 'slightly beat-up', + }, + }, + { + tags: { + impression: 'decadent', + }, + }, + ], + }, + }); + + expect(result2).toEqual({ + data: { + getAllCars: [ + { + features: { + color: 'banana yellow to be specific', + }, + }, + { + features: null, + }, + { + features: null, + }, + { + features: null, + }, + ], + }, + }); + }); + + it('Capitalized enum values can be returned', async () => { + const query = /* GraphQL */ ` + { + getUserCar(username: "arlene") { + kind + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + getUserCar: { + kind: 'SEDAN', + }, + }, + }); + }); + + it('Define header and query options', async () => { + const options: OpenAPILoaderOptions = { + baseUrl, + oasFilePath: '../../../handlers/openapi/test/fixtures/example_oas.json', + cwd: __dirname, + fetch, + operationHeaders: { + exampleHeader: 'some-value', + }, + queryParams: { + limit: '30', + }, + }; + + const schema = await loadGraphQLSchemaFromOpenAPI('test', options); + + const query = /* GraphQL */ ` + { + get_Status(input: { globalquery: "test" }) + } + `; + + // validate that 'limit' parameter is covered by options: + const ast = parse(query); + const errors = validate(schema, ast); + expect(errors).toEqual([]); + + const result = await graphql({ schema, source: query }); + expect(result).toEqual({ + data: { + get_Status: 'Ok', + }, + }); + }); + + it('Resolve simple allOf', async () => { + const query = /* GraphQL */ ` + { + getUserByUsername(username: "arlene") { + name + nomenclature { + genus + species + } + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + getUserByUsername: { + name: 'Arlene L McMahon', + nomenclature: { + genus: 'Homo', + species: 'sapiens', + }, + }, + }, + }); + }); + + // The $ref is contained in the suborder field + it('Resolve ref in allOf', async () => { + const query = /* GraphQL */ ` + { + getUserByUsername(username: "arlene") { + name + nomenclature { + suborder + genus + species + } + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + getUserByUsername: { + name: 'Arlene L McMahon', + nomenclature: { + suborder: 'Haplorhini', + genus: 'Homo', + species: 'sapiens', + }, + }, + }, + }); + }); + + // The nested allOf is contained in the family field + it('Resolve nested allOf', async () => { + const query = /* GraphQL */ ` + { + getUserByUsername(username: "arlene") { + name + nomenclature { + family + genus + species + } + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + getUserByUsername: { + name: 'Arlene L McMahon', + nomenclature: { + family: 'Hominidae', + genus: 'Homo', + species: 'sapiens', + }, + }, + }, + }); + }); + + // The circular nested allOf is contained in the familyCircular field + it('Resolve circular allOf', async () => { + const query = /* GraphQL */ ` + { + __type(name: "familyObject") { + fields { + name + type { + name + } + } + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect( + (result.data.__type as any).fields.find((field: { name: string }) => { + return field.name === 'familyCircular'; + }) + ).toEqual({ + name: 'familyCircular', + type: { + name: 'familyObject', + }, + }); + }); + + it('Resolve oneOf, which becomes a union type', async () => { + const query = /* GraphQL */ ` + { + __type(name: "query_getAllAssets_items") { + kind + possibleTypes { + name + description + } + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + type carType = { + name: string; + description: string; + }; + + // Sort result because the order of the possibleTypes can change depending on Node version + const possibleTypes = (result.data.__type as any).possibleTypes as carType[]; + possibleTypes.sort((a, b) => { + return a.name.localeCompare(b.name); + }); + + expect(result).toEqual({ + data: { + __type: { + kind: 'UNION', + possibleTypes: [ + { + name: 'car', + description: 'A car', + }, + { + name: 'trashcan', + description: null, + }, + { + name: 'user', + description: 'A user represents a natural person', + }, + ], + }, + }, + }); + }); + + it('Union type', async () => { + const query = /* GraphQL */ ` + { + getAllAssets(companyId: "binsol") { + ... on user { + name + address { + city + } + } + ... on trashcan { + contents + } + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + getAllAssets: [ + { + name: 'Arlene L McMahon', + address: { + city: 'Elk Grove Village', + }, + }, + {}, + { + contents: [ + { + type: 'apple', + message: 'Half-eaten', + }, + { + type: 'sock', + message: 'Lost one', + }, + ], + }, + { + name: 'William B Ropp', + address: { + city: 'Macomb', + }, + }, + {}, + { + contents: [ + { + type: 'sock', + message: 'Lost one', + }, + ], + }, + { + name: 'John C Barnes', + address: { + city: 'Tucson', + }, + }, + {}, + { + contents: [], + }, + ], + }, + }); + }); + + // Extensions provide more information about failed API calls + it('Error contains extension', async () => { + const query = /* GraphQL */ ` + query { + getUserByUsername(username: "abcdef") { + name + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + const extensions = result.errors[0].extensions; + expect(extensions).toBeDefined(); + + // Remove headers because it contains fields that may change from run to run + delete extensions.responseHeaders; + expect(extensions).toEqual({ + method: 'GET', + url: 'http://localhost:3002/api/users/abcdef', + statusCode: 404, + statusText: 'Not Found', + responseBody: { + message: 'Wrong username', + }, + }); + }); + + it('Content property in parameter object', async () => { + const query = /* GraphQL */ ` + { + getNearestCoffeeMachine(input: { lat: 3, long: 5 }) { + lat + long + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + getNearestCoffeeMachine: { + lat: 8, + long: 10, + }, + }, + }); + }); + + it('Handle objects without defined properties with arbitrary GraphQL JSON type', async () => { + const query = /* GraphQL */ ` + { + getOfficeTrashCan(username: "arlene") { + contents + } + getAllTrashCans { + contents + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + getOfficeTrashCan: { + contents: [ + { + type: 'apple', + message: 'Half-eaten', + }, + { + type: 'sock', + message: 'Lost one', + }, + ], + }, + getAllTrashCans: [ + { + contents: [ + { + type: 'apple', + message: 'Half-eaten', + }, + { + type: 'sock', + message: 'Lost one', + }, + ], + }, + { + contents: [ + { + type: 'sock', + message: 'Lost one', + }, + ], + }, + { + contents: [], + }, + { + contents: [ + { + type: 'tissue', + message: 'Used', + }, + ], + }, + ], + }, + }); + }); + + it('Throw on unparsable strings value for GraphQL JSON type objects', async () => { + const query = /* GraphQL */ ` + { + getOfficeTrashCan(username: "arlene") { + brand + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + const errorMessage = result.errors[0].message; + expect(errorMessage).toEqual("'Garbage Emporium' is not valid!"); + }); + + it('Handle input objects without defined properties with arbitrary GraphQL JSON type', async () => { + const query = /* GraphQL */ ` + mutation { + postOfficeTrashCan(input: { type: "sandwich", message: "moldy", tasteRating: 0 }, username: "arlene") { + # brand + contents + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect(result).toEqual({ + data: { + postOfficeTrashCan: { + contents: [ + { + type: 'apple', + message: 'Half-eaten', + }, + { + type: 'sock', + message: 'Lost one', + }, + { + type: 'sandwich', + message: 'moldy', + tasteRating: 0, + }, + ], + }, + }, + }); + }); + + it('Throw on unparsable strings value for GraphQL JSON type input', async () => { + const query = /* GraphQL */ ` + mutation { + postOfficeTrashCan(input: { type: "sandwich", message: "moldy", tasteRating: 0 }, username: "arlene") { + brand + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + const errorMessage = result.errors[0].message; + expect(errorMessage).toBeDefined(); + }); + + it('UUID format becomes GraphQL UUID type', async () => { + const query = /* GraphQL */ ` + { + __type(name: "company") { + fields { + name + type { + name + kind + } + } + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect( + (result.data.__type as any).fields.find((field: { name: string }) => { + return field.name === 'id'; + }) + ).toEqual({ + name: 'id', + type: { + name: 'UUID', + kind: 'SCALAR', + }, + }); + }); + + // it('Option idFormats', async () => { + // // NOTE: This test requires feature currently missing in this handler + // const query = /* GraphQL */ `{ + // __type(name: "patent_with_id") { + // fields { + // name + // type { + // kind + // ofType { + // name + // kind + // } + // } + // } + // } + // }`; + + // const ast = parse(query); + // const errors = validate(createdSchema, ast); + // expect(errors).toEqual([]); + + // const result = await execute({ + // schema: createdSchema, + // document: parse(query), + // }); + + // expect( + // (result.data.__type as any).fields.find((field: { name: string }) => { + // return field.name === 'patent_id'; + // }) + // ).toEqual({ + // name: 'patent_id', + // type: { + // kind: 'NON_NULL', + // ofType: { + // name: 'UUID', + // kind: 'SCALAR', + // }, + // }, + // }); + // }); + + it('Required properties for input object types', async () => { + const userInputType = createdSchema.getType('user_Input') as GraphQLInputObjectType; + + // The exclamation mark shows that it is a required (non-nullable) property + expect(userInputType.toConfig().fields.address.type.toString()).toEqual('address_Input!'); + expect(userInputType.toConfig().fields.address2.type.toString()).toEqual('address_Input'); + }); + + it('Option selectQueryOrMutationField', async () => { + const query = /* GraphQL */ ` + { + __schema { + queryType { + fields { + name + description + } + } + mutationType { + fields { + name + description + } + } + } + } + `; + + // The users field should exist as a Query field + const promise1 = execute({ + schema: createdSchema, + document: parse(query), + }); + + // The users (now named getUserByUsername) field should exist as a Mutation field + const options: OpenAPILoaderOptions = { + baseUrl, + oasFilePath: '../../../handlers/openapi/test/fixtures/example_oas.json', + cwd: __dirname, + fetch, + selectQueryOrMutationField: [ + { + fieldName: 'getUserByUsername', + type: 'mutation', + }, + ], + }; + + const promise2 = loadGraphQLSchemaFromOpenAPI('test', options).then(schema => { + const ast = parse(query); + const errors = validate(schema, ast); + expect(errors).toEqual([]); + return execute({ + schema, + document: parse(query), + }); + }); + + const [result1, result2] = await Promise.all([promise1, promise2]); + + expect( + (result1.data.__schema as any).queryType.fields.find((field: { name: string }) => { + return field.name === 'getUserByUsername'; + }) + ).toEqual({ + name: 'getUserByUsername', + description: 'Returns a user from the system.', + }); + + expect( + (result1.data.__schema as any).mutationType.fields.find((field: { name: string }) => { + return field.name === 'getUserByUsername'; + }) + ).toEqual(undefined); + + expect( + (result2.data.__schema as any).queryType.fields.find((field: { name: string }) => { + return field.name === 'getUserByUsername'; + }) + ).toEqual(undefined); + + expect( + (result2.data.__schema as any).mutationType.fields.find((field: { name: string }) => { + return field.name === 'getUserByUsername'; + }) + ).toEqual({ + name: 'getUserByUsername', + description: 'Returns a user from the system.', + }); + }); + + it('Non-nullable properties for object types', async () => { + const coordinates = createdSchema.getType('coordinates') as GraphQLObjectType; + + // The exclamation mark shows that it is a required (non-nullable) property + expect(coordinates.toConfig().fields.lat.type.toString()).toEqual('Float!'); + expect(coordinates.toConfig().fields.long.type.toString()).toEqual('Float!'); + }); + + it('Non-nullable properties from nested allOf', async () => { + // Check query/mutation field descriptions + const query = /* GraphQL */ ` + { + __type(name: "query_getUsers_items_nomenclature") { + fields { + name + type { + kind + ofType { + name + kind + } + } + } + } + } + `; + + const result = await execute({ + schema: createdSchema, + document: parse(query), + }); + + expect( + (result.data.__type as any).fields.find((field: { name: string }) => { + return field.name === 'family'; + }) + ).toEqual({ + name: 'family', + type: { + kind: 'NON_NULL', + ofType: { + name: 'String', + kind: 'SCALAR', + }, + }, + }); + }); + + describe('Mixing input arguments and options variables', () => { + it('Query string arguments become nullable when provided through queryParams option', async () => { + const options: OpenAPILoaderOptions = { + baseUrl, + oasFilePath: '../../../handlers/openapi/test/fixtures/example_oas.json', + cwd: __dirname, + fetch, + queryParams: { + limit: '1', + }, + }; + const schema = await loadGraphQLSchemaFromOpenAPI('test', options); + const query = /* GraphQL */ ` + { + getUsers { + name + } + } + `; + const result = await execute({ + schema, + document: parse(query), + }); + expect(result).toEqual({ + data: { + getUsers: [ + { + name: 'Arlene L McMahon', + }, + ], + }, + }); + }); + + it('Query string arguments override the values provided through queryParams option', async () => { + const options: OpenAPILoaderOptions = { + baseUrl, + oasFilePath: '../../../handlers/openapi/test/fixtures/example_oas.json', + cwd: __dirname, + fetch, + queryParams: { + limit: '1', + }, + }; + const schema = await loadGraphQLSchemaFromOpenAPI('test', options); + const query = /* GraphQL */ ` + { + getUsers(input: { limit: 2 }) { + name + } + } + `; + const result = await execute({ + schema, + document: parse(query), + }); + expect(result).toEqual({ + data: { + getUsers: [ + { + name: 'Arlene L McMahon', + }, + { + name: 'William B Ropp', + }, + ], + }, + }); + }); + + it('Header arguments become nullable when provided through headers option', async () => { + const options: OpenAPILoaderOptions = { + baseUrl, + oasFilePath: '../../../handlers/openapi/test/fixtures/example_oas.json', + cwd: __dirname, + fetch, + operationHeaders: { + snack_type: 'chips', + snack_size: 'large', + }, + }; + + const schema = await loadGraphQLSchemaFromOpenAPI('test', options); + + const query = /* GraphQL */ ` + { + getSnack + } + `; + const result = await execute({ + schema, + document: parse(query), + }); + expect(result).toEqual({ + data: { + getSnack: 'Here is a large chips', + }, + }); + }); + + it('Header arguments override the values provided through operationHeaders option', async () => { + const options: OpenAPILoaderOptions = { + baseUrl, + oasFilePath: '../../../handlers/openapi/test/fixtures/example_oas.json', + cwd: __dirname, + fetch, + operationHeaders: { + snack_type: 'chips', + snack_size: 'large', + }, + }; + + const schema = await loadGraphQLSchemaFromOpenAPI('test', options); + + const query = /* GraphQL */ ` + { + getSnack(snack_type: "soda") + } + `; + const result = await execute({ + schema, + document: parse(query), + }); + expect(result).toEqual({ + data: { + getSnack: 'Here is a large soda', + }, + }); + }); }); });