Skip to content

Commit

Permalink
Few incremental improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRefactoring committed Feb 8, 2025
1 parent 6f0b0a1 commit 31c721e
Show file tree
Hide file tree
Showing 19 changed files with 97 additions and 219 deletions.
24 changes: 12 additions & 12 deletions src/version2/issueSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ export class IssueSearch {
* Searches for issues using [JQL](https://confluence.atlassian.com/x/egORLQ). Recent updates might not be immediately
* visible in the returned search results.
*
* If you need [read-after-write](https://developer.atlassian.com/cloud/jira/platform/search-and-reconcile/) consistency,
* you can utilize the `reconcileIssues` parameter to ensure stronger consistency assurances.
* If you need [read-after-write](https://developer.atlassian.com/cloud/jira/platform/search-and-reconcile/)
* consistency, you can utilize the `reconcileIssues` parameter to ensure stronger consistency assurances.
*
* If the JQL query expression is too large to be encoded as a query parameter, use the
* [POST](#searchforissuesusingjqlenhancedsearchpost) version of this resource.
Expand All @@ -260,8 +260,8 @@ export class IssueSearch {
* Searches for issues using [JQL](https://confluence.atlassian.com/x/egORLQ). Recent updates might not be immediately
* visible in the returned search results.
*
* If you need [read-after-write](https://developer.atlassian.com/cloud/jira/platform/search-and-reconcile/) consistency,
* you can utilize the `reconcileIssues` parameter to ensure stronger consistency assurances.
* If you need [read-after-write](https://developer.atlassian.com/cloud/jira/platform/search-and-reconcile/)
* consistency, you can utilize the `reconcileIssues` parameter to ensure stronger consistency assurances.
*
* If the JQL query expression is too large to be encoded as a query parameter, use the
* [POST](#searchforissuesusingjqlenhancedsearchpost) version of this resource.
Expand Down Expand Up @@ -306,11 +306,11 @@ export class IssueSearch {
/**
* Searches for issues using [JQL](https://confluence.atlassian.com/x/egORLQ).
*
* If you need [read-after-write](https://developer.atlassian.com/cloud/jira/platform/search-and-reconcile/) consistency,
* you can utilize the `reconcileIssues` parameter to ensure stronger consistency assurances.
* If you need [read-after-write](https://developer.atlassian.com/cloud/jira/platform/search-and-reconcile/)
* consistency, you can utilize the `reconcileIssues` parameter to ensure stronger consistency assurances.
*
* There is a [GET](#searchforissuesusingjqlenhancedsearch) version of this resource that can be used for smaller JQL query
* expressions.
* There is a [GET](#searchforissuesusingjqlenhancedsearch) version of this resource that can be used for smaller JQL
* query expressions.
*
* This operation can be accessed anonymously.
*
Expand All @@ -329,11 +329,11 @@ export class IssueSearch {
/**
* Searches for issues using [JQL](https://confluence.atlassian.com/x/egORLQ).
*
* If you need [read-after-write](https://developer.atlassian.com/cloud/jira/platform/search-and-reconcile/) consistency,
* you can utilize the `reconcileIssues` parameter to ensure stronger consistency assurances.
* If you need [read-after-write](https://developer.atlassian.com/cloud/jira/platform/search-and-reconcile/)
* consistency, you can utilize the `reconcileIssues` parameter to ensure stronger consistency assurances.
*
* There is a [GET](#searchforissuesusingjqlenhancedsearch) version of this resource that can be used for smaller JQL query
* expressions.
* There is a [GET](#searchforissuesusingjqlenhancedsearch) version of this resource that can be used for smaller JQL
* query expressions.
*
* This operation can be accessed anonymously.
*
Expand Down
20 changes: 10 additions & 10 deletions src/version2/jiraExpressions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ export class JiraExpressions {
/**
* Evaluates a Jira expression and returns its value. The difference between this and `eval` is that this endpoint
* uses the enhanced search API when evaluating JQL queries. This API is eventually consistent, unlike the strongly
* consistent `eval` API. This allows for better performance and scalability. In addition, this API's response for
* JQL evaluation is based on a scrolling view (backed by a `nextPageToken`) instead of a paginated view
* (backed by `startAt` and `totalCount`).
* consistent `eval` API. This allows for better performance and scalability. In addition, this API's response for JQL
* evaluation is based on a scrolling view (backed by a `nextPageToken`) instead of a paginated view (backed by
* `startAt` and `totalCount`).
*
* This resource can be used to test Jira expressions that you plan to use elsewhere, or to fetch data in a flexible
* way. Consult the [Jira expressions
Expand Down Expand Up @@ -233,8 +233,8 @@ export class JiraExpressions {
* The current customer request. Available only when the customer request is provided in the request context
* object.
*
* In addition, you can pass custom context variables along with their types. You can then access them from
* the Jira expression by key. You can use the following variables in a custom context:
* In addition, you can pass custom context variables along with their types. You can then access them from the Jira
* expression by key. You can use the following variables in a custom context:
*
* - `user`: A [user](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#user)
* specified as an Atlassian account ID.
Expand All @@ -257,9 +257,9 @@ export class JiraExpressions {
/**
* Evaluates a Jira expression and returns its value. The difference between this and `eval` is that this endpoint
* uses the enhanced search API when evaluating JQL queries. This API is eventually consistent, unlike the strongly
* consistent `eval` API. This allows for better performance and scalability. In addition, this API's response for
* JQL evaluation is based on a scrolling view (backed by a `nextPageToken`) instead of a paginated view
* (backed by `startAt` and `totalCount`).
* consistent `eval` API. This allows for better performance and scalability. In addition, this API's response for JQL
* evaluation is based on a scrolling view (backed by a `nextPageToken`) instead of a paginated view (backed by
* `startAt` and `totalCount`).
*
* This resource can be used to test Jira expressions that you plan to use elsewhere, or to fetch data in a flexible
* way. Consult the [Jira expressions
Expand Down Expand Up @@ -296,8 +296,8 @@ export class JiraExpressions {
* The current customer request. Available only when the customer request is provided in the request context
* object.
*
* In addition, you can pass custom context variables along with their types. You can then access them from
* the Jira expression by key. You can use the following variables in a custom context:
* In addition, you can pass custom context variables along with their types. You can then access them from the Jira
* expression by key. You can use the following variables in a custom context:
*
* - `user`: A [user](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#user)
* specified as an Atlassian account ID.
Expand Down
19 changes: 9 additions & 10 deletions src/version2/models/enhancedSearchRequest.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
export interface EnhancedSearchRequest {
/**
* The [JQL](https://confluence.atlassian.com/x/egORLQ) expression.
* For performance reasons, this parameter requires a bounded query. A bounded query is a query with a search restriction.
* The [JQL](https://confluence.atlassian.com/x/egORLQ) expression. For performance reasons, this parameter requires a
* bounded query. A bounded query is a query with a search restriction.
*
* - Example of an unbounded query: `order by key desc`.
* - Example of a bounded query: `assignee = currentUser() order by key`.
*
* Additionally, `orderBy` clause can contain a maximum of 7 fields.
*/
jql?: string;
/**
* The token for a page to fetch that is not the first page. The first page has a `nextPageToken` of `null`.
* Use the `nextPageToken` to fetch the next page of issues.
* The token for a page to fetch that is not the first page. The first page has a `nextPageToken` of `null`. Use the
* `nextPageToken` to fetch the next page of issues.
*/
nextPageToken?: string;
/**
Expand Down Expand Up @@ -44,8 +45,8 @@ export interface EnhancedSearchRequest {
*
* Multiple `fields` parameters can be included in a request.
*
* Note: By default, this resource returns IDs only. This differs from
* [GET issue](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-issueidorkey-get)
* Note: By default, this resource returns IDs only. This differs from [GET
* issue](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-issueidorkey-get)
* where the default is all fields.
*/
fields?: string[];
Expand All @@ -62,7 +63,7 @@ export interface EnhancedSearchRequest {
* - `editmeta` Returns information about how each field can be edited.
* - `changelog` Returns a list of recent updates to an issue, sorted by date, starting from the most recent.
* - `versionedRepresentations` Instead of `fields`, returns `versionedRepresentations` a JSON array containing each
* version of a field's value, with the highest numbered item representing the most recent version.
* version of a field's value, with the highest numbered item representing the most recent version.
*
* Examples: `names,changelog` Returns the display name of each field as well as a list of recent updates to an issue.
*/
Expand All @@ -87,9 +88,7 @@ export interface EnhancedSearchRequest {
)[]
| string
| string[];
/**
* A list of up to 5 issue properties to include in the results. This parameter accepts a comma-separated list.
*/
/** A list of up to 5 issue properties to include in the results. This parameter accepts a comma-separated list. */
properties?: string[];
/** Reference fields by their key (rather than ID). The default is `false`. */
fieldsByKeys?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions src/version2/models/jExpEvaluateIssuesMeta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { JExpEvaluateIssuesJqlMetaData } from './jExpEvaluateIssuesJqlMetaData';
/** Meta data describing the `issues` context variable. */
export interface JExpEvaluateIssuesMeta {
/**
* The description of the page of issues loaded by the provided JQL query.
* This bean will be replacing IssuesJqlMetaDataBean bean as part of new `evaluate` endpoint
* The description of the page of issues loaded by the provided JQL query. This bean will be replacing
* IssuesJqlMetaDataBean bean as part of new `evaluate` endpoint
*/
jql?: JExpEvaluateIssuesJqlMetaData;
}
8 changes: 4 additions & 4 deletions src/version2/models/jExpEvaluateMetaData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { JiraExpressionsComplexity } from './jiraExpressionsComplexity';

export interface JExpEvaluateMetaData {
/**
* Contains information about the expression complexity. For example, the number of steps it took to
* evaluate the expression.
* Contains information about the expression complexity. For example, the number of steps it took to evaluate the
* expression.
*/
complexity?: JiraExpressionsComplexity;
/**
* Contains information about the `issues` variable in the context. For example, is the issues were loaded
* with JQL, information about the page will be included here.
* Contains information about the `issues` variable in the context. For example, is the issues were loaded with JQL,
* information about the page will be included here.
*/
issues?: JExpEvaluateIssuesMeta;
}
8 changes: 3 additions & 5 deletions src/version2/models/jexpEvaluateCtxJqlIssues.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
/**
* The JQL query that specifies the set of issues available in the Jira expression.
*/
/** The JQL query that specifies the set of issues available in the Jira expression. */
export interface JexpEvaluateCtxJqlIssues {
/**
* The maximum number of issues to return from the JQL query. Inspect `meta.issues.jql.maxResults` in the response to
* ensure the maximum value has not been exceeded.
*/
maxResults?: number;
/**
* The token for a page to fetch that is not the first page. The first page has a `nextPageToken` of `null`.
* Use the `nextPageToken` to fetch the next page of issues.
* The token for a page to fetch that is not the first page. The first page has a `nextPageToken` of `null`. Use the
* `nextPageToken` to fetch the next page of issues.
*/
nextPageToken?: string;
/** The JQL query, required to be bounded. Additionally, `orderBy` clause can contain a maximum of 7 fields */
Expand Down
6 changes: 1 addition & 5 deletions src/version2/models/jiraExpressionEvaluateContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,5 @@ export interface JiraExpressionEvaluateContext {
* or key. All the fields of the issue object are available in the Jira expression. `json`: A JSON object containing
* custom content. `list`: A JSON list of `user`, `issue`, or `json` variable types.
*/
custom?: (
| UserContextVariable
| IssueContextVariable
| JsonContextVariable
)[];
custom?: (UserContextVariable | IssueContextVariable | JsonContextVariable)[];
}
5 changes: 2 additions & 3 deletions src/version2/models/searchAndReconcileResults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ export interface SearchAndReconcileResults {
/** The ID and name of each field in the search results. */
names?: {};
/**
* Continuation token to fetch the next page.
* If this result represents the last or the only page this token will be null.
* This token will expire in 7 days.
* Continuation token to fetch the next page. If this result represents the last or the only page this token will be
* null. This token will expire in 7 days.
*/
nextPageToken?: string;
/** The schema describing the field types in the search results. */
Expand Down
19 changes: 9 additions & 10 deletions src/version2/parameters/searchForIssuesUsingJqlEnhancedSearch.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
export interface SearchForIssuesUsingJqlEnhancedSearch {
/**
* The [JQL](https://confluence.atlassian.com/x/egORLQ) expression.
* For performance reasons, this parameter requires a bounded query. A bounded query is a query with a search restriction.
* The [JQL](https://confluence.atlassian.com/x/egORLQ) expression. For performance reasons, this parameter requires a
* bounded query. A bounded query is a query with a search restriction.
*
* - Example of an unbounded query: `order by key desc`.
* - Example of a bounded query: `assignee = currentUser() order by key`.
*
* Additionally, `orderBy` clause can contain a maximum of 7 fields.
*/
jql: string;
/**
* The token for a page to fetch that is not the first page. The first page has a `nextPageToken` of `null`.
* Use the `nextPageToken` to fetch the next page of issues.
* The token for a page to fetch that is not the first page. The first page has a `nextPageToken` of `null`. Use the
* `nextPageToken` to fetch the next page of issues.
*/
nextPageToken?: string;
/**
Expand Down Expand Up @@ -44,8 +45,8 @@ export interface SearchForIssuesUsingJqlEnhancedSearch {
*
* Multiple `fields` parameters can be included in a request.
*
* Note: By default, this resource returns IDs only. This differs from
* [GET issue](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-issueidorkey-get)
* Note: By default, this resource returns IDs only. This differs from [GET
* issue](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-issueidorkey-get)
* where the default is all fields.
*/
fields?: string[];
Expand All @@ -62,14 +63,12 @@ export interface SearchForIssuesUsingJqlEnhancedSearch {
* - `editmeta` Returns information about how each field can be edited.
* - `changelog` Returns a list of recent updates to an issue, sorted by date, starting from the most recent.
* - `versionedRepresentations` Instead of `fields`, returns `versionedRepresentations` a JSON array containing each
* version of a field's value, with the highest numbered item representing the most recent version.
* version of a field's value, with the highest numbered item representing the most recent version.
*
* Examples: `names,changelog` Returns the display name of each field as well as a list of recent updates to an issue.
*/
expand?: string;
/**
* A list of up to 5 issue properties to include in the results. This parameter accepts a comma-separated list.
*/
/** A list of up to 5 issue properties to include in the results. This parameter accepts a comma-separated list. */
properties?: string[];
/** Reference fields by their key (rather than ID). The default is `false`. */
fieldsByKeys?: boolean;
Expand Down
24 changes: 12 additions & 12 deletions src/version3/issueSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,8 @@ export class IssueSearch {
* Searches for issues using [JQL](https://confluence.atlassian.com/x/egORLQ). Recent updates might not be immediately
* visible in the returned search results.
*
* If you need [read-after-write](https://developer.atlassian.com/cloud/jira/platform/search-and-reconcile/) consistency,
* you can utilize the `reconcileIssues` parameter to ensure stronger consistency assurances.
* If you need [read-after-write](https://developer.atlassian.com/cloud/jira/platform/search-and-reconcile/)
* consistency, you can utilize the `reconcileIssues` parameter to ensure stronger consistency assurances.
*
* If the JQL query expression is too large to be encoded as a query parameter, use the
* [POST](#searchforissuesusingjqlenhancedsearchpost) version of this resource.
Expand All @@ -364,8 +364,8 @@ export class IssueSearch {
* Searches for issues using [JQL](https://confluence.atlassian.com/x/egORLQ). Recent updates might not be immediately
* visible in the returned search results.
*
* If you need [read-after-write](https://developer.atlassian.com/cloud/jira/platform/search-and-reconcile/) consistency,
* you can utilize the `reconcileIssues` parameter to ensure stronger consistency assurances.
* If you need [read-after-write](https://developer.atlassian.com/cloud/jira/platform/search-and-reconcile/)
* consistency, you can utilize the `reconcileIssues` parameter to ensure stronger consistency assurances.
*
* If the JQL query expression is too large to be encoded as a query parameter, use the
* [POST](#searchforissuesusingjqlenhancedsearchpost) version of this resource.
Expand Down Expand Up @@ -410,11 +410,11 @@ export class IssueSearch {
/**
* Searches for issues using [JQL](https://confluence.atlassian.com/x/egORLQ).
*
* If you need [read-after-write](https://developer.atlassian.com/cloud/jira/platform/search-and-reconcile/) consistency,
* you can utilize the `reconcileIssues` parameter to ensure stronger consistency assurances.
* If you need [read-after-write](https://developer.atlassian.com/cloud/jira/platform/search-and-reconcile/)
* consistency, you can utilize the `reconcileIssues` parameter to ensure stronger consistency assurances.
*
* There is a [GET](#searchforissuesusingjqlenhancedsearch) version of this resource that can be used for smaller JQL query
* expressions.
* There is a [GET](#searchforissuesusingjqlenhancedsearch) version of this resource that can be used for smaller JQL
* query expressions.
*
* This operation can be accessed anonymously.
*
Expand All @@ -433,11 +433,11 @@ export class IssueSearch {
/**
* Searches for issues using [JQL](https://confluence.atlassian.com/x/egORLQ).
*
* If you need [read-after-write](https://developer.atlassian.com/cloud/jira/platform/search-and-reconcile/) consistency,
* you can utilize the `reconcileIssues` parameter to ensure stronger consistency assurances.
* If you need [read-after-write](https://developer.atlassian.com/cloud/jira/platform/search-and-reconcile/)
* consistency, you can utilize the `reconcileIssues` parameter to ensure stronger consistency assurances.
*
* There is a [GET](#searchforissuesusingjqlenhancedsearch) version of this resource that can be used for smaller JQL query
* expressions.
* There is a [GET](#searchforissuesusingjqlenhancedsearch) version of this resource that can be used for smaller JQL
* query expressions.
*
* This operation can be accessed anonymously.
*
Expand Down
Loading

0 comments on commit 31c721e

Please sign in to comment.