diff --git a/.eslintrc.yml b/.eslintrc.yml deleted file mode 100644 index e5ba51a3b2..0000000000 --- a/.eslintrc.yml +++ /dev/null @@ -1,90 +0,0 @@ -parser: "@typescript-eslint/parser" -extends: - - airbnb-base -parserOptions: - ecmaVersion: 2018 - project: ./tsconfig.lint.json -plugins: - - import -env: - node: true - browser: true -rules: - "@typescript-eslint/lines-between-class-members": off - arrow-parens: - - error - - as-needed - class-methods-use-this: off - eol-last: error - import/extensions: off - import/no-cycle: off - import/no-unresolved: off - import/prefer-default-export: off - linebreak-style: - - error - - unix - lines-between-class-members: off - max-len: off - no-trailing-spaces: error - no-underscore-dangle: off - no-dupe-class-members: off - no-unused-vars: off - no-useless-constructor: off - no-empty-function: off - no-param-reassign: off - no-shadow: off - no-redeclare: off - padding-line-between-statements: - - error - - blankLine: always - prev: "*" - next: - - block - - block-like - - cjs-export - - class - - const - - export - - import - - let - - var - - blankLine: always - prev: - - block - - block-like - - cjs-export - - class - - const - - export - - import - - let - - var - next: "*" - - blankLine: any - prev: - - const - - let - - var - next: - - const - - let - - var - - blankLine: never - prev: - - import - next: - - import - - blankLine: always - prev: - - import - next: - - export - - blankLine: any - prev: - - export - next: - - export -settings: - import/parsers: - "@typescript-eslint/parser": - - .ts diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e238ef589a..5eaecc1264 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,13 +5,16 @@ on: repository_dispatch: types: [ pr-approved ] +env: + PNPM_VERSION: '10' + jobs: build: name: Build runs-on: ubuntu-latest strategy: matrix: - node-version: [18.x, 20.x] + node-version: [20.x, 22.x] steps: - name: Checkout sources uses: actions/checkout@v4 @@ -19,10 +22,14 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: ${{ env.PNPM_VERSION }} - name: Installing dependencies - run: npm ci + run: pnpm install --frozen-lockfile - name: Building sources - run: npm run build + run: pnpm run build lint: name: Lint Code @@ -30,7 +37,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [18.x, 20.x] + node-version: [20.x, 22.x] steps: - name: Checkout sources uses: actions/checkout@v4 @@ -38,10 +45,14 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: ${{ env.PNPM_VERSION }} - name: Installing dependencies - run: npm ci + run: pnpm install --frozen-lockfile - name: Linting - run: npm run lint + run: pnpm run lint env: CI: true @@ -51,7 +62,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [18.x, 20.x] + node-version: [20.x, 22.x] steps: - name: Checkout sources uses: actions/checkout@v4 @@ -59,10 +70,14 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: ${{ env.PNPM_VERSION }} - name: Installing dependencies - run: npm ci + run: pnpm install --frozen-lockfile - name: Running unit tests - run: npm run test:unit + run: pnpm run test:unit test_integration: name: Integration Tests @@ -73,7 +88,7 @@ jobs: strategy: max-parallel: 1 matrix: - node-version: [18.x, 20.x] + node-version: [20.x, 22.x] steps: - name: Checkout sources uses: actions/checkout@v4 @@ -81,8 +96,12 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: ${{ env.PNPM_VERSION }} - name: Installing dependencies - run: npm ci + run: pnpm install --frozen-lockfile - name: Creating `.env` file run: | touch .env @@ -90,4 +109,4 @@ jobs: echo EMAIL=${{ secrets.EMAIL }} >> .env echo API_TOKEN=${{ secrets.API_TOKEN }} >> .env - name: Running integration tests - run: npm run test:integration + run: pnpm run test:integration diff --git a/.github/workflows/publish-dev.yml b/.github/workflows/publish-dev.yml new file mode 100644 index 0000000000..6888bea535 --- /dev/null +++ b/.github/workflows/publish-dev.yml @@ -0,0 +1,46 @@ +name: Publish to NPM Dev Channel + +on: + workflow_dispatch + +permissions: + contents: read + + +jobs: + build-and-publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: https://registry.npmjs.org/ + + - name: Install dependencies + run: npm install + + - name: Build project + run: npm run build + + - name: Update package version + id: update-version + run: | + CURRENT_VERSION=$(node -p "require('./package.json').version") + TIMESTAMP=$(date -u +"%Y%m%d%H%M%S") + NEW_VERSION="${CURRENT_VERSION}-dev${TIMESTAMP}" + npm version --no-git-tag-version $NEW_VERSION + echo "New version: $NEW_VERSION" + echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV + + - name: Update package-lock.json + run: npm install + + - name: Publish to NPM Dev Channel + run: npm publish --tag dev + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 86821c01e6..2a3d44fb0d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,189 +1,149 @@ -name: NPM publish -on: workflow_dispatch +name: CI/CD Pipeline +on: + push: + tags: + - 'v*.*.*' + +env: + NODE_VERSION: '20.x' + PNPM_VERSION: '10' + +permissions: + contents: read jobs: - build: - name: Build + build-and-test: + name: Build and Test runs-on: ubuntu-latest steps: - - name: Checkout sources + - name: Checkout repository uses: actions/checkout@v4 - - name: Use Node.js 18.x.x - uses: actions/setup-node@v4 with: - node-version: 18 - - name: Installing dependencies - run: npm ci - - name: Building sources - run: npm run build - - lint: - name: Lint Code - needs: build - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - name: Use Node.js 18.x.x + fetch-depth: 0 + + - name: Setup Node.js ${{ env.NODE_VERSION }} uses: actions/setup-node@v4 with: - node-version: 18 - - name: Installing dependencies - run: npm ci - - name: Linting - run: npm run lint + node-version: ${{ env.NODE_VERSION }} + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: ${{ env.PNPM_VERSION }} + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Run build + run: pnpm run build + + - name: Run lint + run: pnpm run lint env: CI: true - test_unit: - name: Unit Tests - needs: build - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - name: Use Node.js 18.x.x - uses: actions/setup-node@v4 - with: - node-version: 18 - - name: Installing dependencies - run: npm ci - - name: Running unit tests - run: npm run test:unit - - test_integration: - name: Integration Tests - needs: - - lint - - test_unit + - name: Run unit tests + run: pnpm run test:unit + + - name: Run integration tests + run: pnpm run test:integration + env: + HOST: ${{ secrets.HOST }} + EMAIL: ${{ secrets.EMAIL }} + API_TOKEN: ${{ secrets.API_TOKEN }} + + publish-package: + name: Publish Package + needs: build-and-test runs-on: ubuntu-latest + permissions: + contents: write steps: - - name: Checkout sources + - name: Checkout repository uses: actions/checkout@v4 - - name: Use Node.js 18.x.x - uses: actions/setup-node@v4 with: - node-version: 18 - - name: Installing dependencies - run: npm ci - - name: Creating `.env` file - run: | - touch .env - echo HOST=${{ secrets.HOST }} >> .env - echo EMAIL=${{ secrets.EMAIL }} >> .env - echo API_TOKEN=${{ secrets.API_TOKEN }} >> .env - - name: Running integration tests - run: npm run test:integration - - publish: - name: Package publish - needs: - - test_integration - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - name: Use Node.js 18.x.x + fetch-depth: 0 + + - name: Setup Node.js ${{ env.NODE_VERSION }} uses: actions/setup-node@v4 with: - node-version: 18 + node-version: ${{ env.NODE_VERSION }} registry-url: 'https://registry.npmjs.org' - - name: Installing dependencies - run: npm ci - - name: Building sources - run: npm run build - - name: Publishing - run: npm publish + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: ${{ env.PNPM_VERSION }} + + - name: Get and validate version + id: version + run: | + if [[ $GITHUB_REF == refs/tags/v* ]]; then + TAG_VERSION=${GITHUB_REF#refs/tags/v} + echo "Using version from tag: $TAG_VERSION" + CURRENT_VERSION=$(node -p "require('./package.json').version") + + if [ "$TAG_VERSION" != "$CURRENT_VERSION" ]; then + echo "Updating package version to match tag..." + npm version $TAG_VERSION --no-git-tag-version + pnpm install + git config user.name "GitHub Actions" + git config user.email "actions@github.com" + git add package.json pnpm-lock.yaml + git commit -m "Update version to $TAG_VERSION [skip ci]" + git push + fi + else + TAG_VERSION=$(node -p "require('./package.json').version") + echo "Using version from package.json: $TAG_VERSION" + fi + + echo "version=$TAG_VERSION" >> $GITHUB_OUTPUT + echo "VERSION=$TAG_VERSION" >> $GITHUB_ENV + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build package + run: pnpm run build + + - name: Publish to NPM + run: pnpm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - publish-docs: - name: Docs publish - needs: - - publish + deploy-documentation: + name: Deploy Documentation + needs: publish-package runs-on: ubuntu-latest steps: - - name: Checkout code + - name: Checkout repository uses: actions/checkout@v4 with: ref: master - - name: Use Node.js 18.x.x - uses: actions/setup-node@v4 - with: - node-version: 18 - - name: Installing dependencies - run: npm ci - - name: Generate docs - run: npm run doc - - name: Extract version - id: pkg - run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV - - name: Checkout docs branch - uses: actions/checkout@v4 - with: - ref: docs - clean: false - - name: Copy docs to root - run: | - cp -r docs/* . - - name: Commit and push docs - run: | - git config user.name "GitHub Actions" - git config user.email "actions@github.com" - git add . - git commit -m "Update documentation for version v${{ env.VERSION }}" - git push - - creating-git-tag: - name: Create Git Tag - needs: - - publish - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - name: Use Node.js 18.x.x - uses: actions/setup-node@v4 - with: - node-version: 18 - - name: Extract version from package.json - run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_ENV - - name: Create and Push Git Tag - run: | - git config user.name "GitHub Actions" - git config user.email "actions@github.com" - TAG="v${{ env.version }}" - git tag $TAG - git push origin $TAG - - creating-github-release: - name: Create GitHub Release - needs: - - creating-git-tag - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - name: Use Node.js 18.x.x + + - name: Setup Node.js ${{ env.NODE_VERSION }} uses: actions/setup-node@v4 with: - node-version: 18 - - name: Extract version from package.json - run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_ENV - - name: Extract Changelog Entry - id: changelog - uses: juliangruber/read-file-action@v1 + node-version: ${{ env.NODE_VERSION }} + + - name: Install pnpm + uses: pnpm/action-setup@v4 with: - path: ./CHANGELOG.md - - name: Parse Changelog Entry - run: | - CHANGELOG_CONTENT=$(awk '/^### [0-9]+\.[0-9]+\.[0-9]+/ {if (p) exit; p=1} p' CHANGELOG.md) - # Sanitize changelog content - CHANGELOG_CONTENT=$(echo "$CHANGELOG_CONTENT" | sed ':a;N;$!ba;s/\r//g; s/\n/\\n/g') - echo "CHANGELOG=$CHANGELOG_CONTENT" >> $GITHUB_ENV - - name: Create GitHub Release - uses: softprops/action-gh-release@v1 + version: ${{ env.PNPM_VERSION }} + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Generate documentation + run: pnpm run doc + + - name: Deploy to docs branch + uses: JamesIves/github-pages-deploy-action@v4 with: - tag_name: v${{ env.version }} - name: Release v${{ env.version }} - body: ${{ env.CHANGELOG }} + branch: docs + folder: docs + clean: true + commit-message: "docs: Update documentation for v${{ needs.publish-package.outputs.version }} [skip ci]" diff --git a/.gitignore b/.gitignore index c68ba2715b..4e3c836361 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ .idea/ .vscode/ node_modules/ -out/ +dist/ docs/ coverage/ diff --git a/.npmignore b/.npmignore index bb3d8011d1..f3e42a2920 100644 --- a/.npmignore +++ b/.npmignore @@ -6,9 +6,12 @@ coverage .idea examples -.eslintrc +eslint.config.js .editorconfig .DS_Store +pnpm-lock.yaml +pnpm-workspace.yaml +package-lock.json yarn.lock yarn-error.log tsconfig.lint.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 852d155d4b..3a01a0094b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,196 @@ # Jira.js changelog +## 5.0.0 + +- Added ESM (ECMAScript Modules) support +- Fixed comment generation logic in `IssueWorklogs.addWorklog` method +- Removed all telemetry-related code and references + +### 4.1.3 + +- **Fix:** Fixed failed `issueBulkOperations.getAvailableTransitions` method call (problem from jira side with headers). Thanks to Michael "Mike" Ferris ([Cellule](https://github.com/Cellule)) for reporting this issue ([#374](https://github.com/MrRefactoring/jira.js/issues/374)) and fix ([#375](https://github.com/MrRefactoring/jira.js/pull/375)) + +### 4.1.2 + +- **Fix:** Fixed compilation issues for projects using the `Plans.updatePlan` method in `Version3Client`. Thanks to Jakub Gladykowski ([gladykov](https://github.com/gladykov)) for reporting this issue ([#370](https://github.com/MrRefactoring/jira.js/issues/370)). +- **Improvement:** Added `string` type support for the `projectId` property in the `Version` model for `Version3Client`. Thanks to Carl Fürstenberg ([azatoth](https://github.com/azatoth)) for suggesting this improvement ([#371](https://github.com/MrRefactoring/jira.js/issues/371)). + +### 4.1.0 + +- **General Improvements:** Enhanced JSDoc documentation across the project for better clarity and developer experience. + +- **Deprecation:** Marked the `InstanceInformation.getLicense` method as deprecated. +- **Deprecation:** Marked the `Issues.getCreateIssueMeta` method as deprecated. +- **Deprecation:** Marked the `PageBeanFieldConfigurationDetails` class as deprecated. Use `Paginated` instead. +- **Deprecation:** Marked the `WorkflowUpdateResponse` and `WorkflowCreateResponse` classes as deprecated. + +- **New APIs:** Added the following classes to support additional Jira APIs: + - **`AppDataPolicies`**: Manage app access rule data policies, allowing developers to set and retrieve rules controlling app access ([documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-app-data-policies/#api-group-app-data-policies)). + - **`ClassificationLevels`**: Define and manage classification levels for sensitive information in Jira ([documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-classification-levels/#api-group-classification-levels)). + - **`IssueBulkOperations`**: Perform bulk operations on issues, such as moving multiple issues between projects or updating multiple fields in one request. For additional guidance, refer to [Bulk operation APIs: additional examples and FAQ](https://developer.atlassian.com/cloud/jira/platform/bulk-operation-additional-examples-and-faqs/) ([documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-bulk-operations/#api-group-issue-bulk-operations)). + - **`Plans`**: Manage advanced roadmaps plans, including creating, duplicating, updating, archiving, and trashing plans ([documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-plans/#api-group-plans)). + - **`PrioritySchemes`**: Create, retrieve, update, and delete issue priority schemes to standardize prioritization across projects ([documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-priority-schemes/#api-group-priority-schemes)). + - **`ProjectClassificationLevels`**: View and manage classification levels within individual projects to ensure compliance with organizational standards ([documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-classification-levels/#api-group-project-classification-levels)). + - **`ServiceRegistry`**: Access and manage attributes related to Jira Service Management’s service registry, which helps organize and maintain services ([documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-service-registry/#api-group-service-registry)). + - **`TeamsInPlan`**: Configure settings for Atlassian and custom teams within advanced roadmaps plans, including creating, updating, and deleting team configurations ([documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-teams-in-plan/#api-group-teams-in-plan)). + +- **Improvement:** Changed the return type of `ProjectKeyAndNameValidation.getValidProjectKey` and `ProjectKeyAndNameValidation.getValidProjectName` from `unknown` to `string` for improved type safety and usability. +- **Improvement:** Added the `approximateLastUsed` parameter to the `Filters.createFilter` method. +- **Improvement:** Added the `isSubstringMatch` parameter to the `Filters.getFiltersPaginated` method. +- **Improvement:** Updated the `IssueComments.updateComment` method to allow passing a plain string for the comment instead of requiring a specific object format. +- **Improvement:** Added the `parentId` parameter to the `IssueComments.deleteComment` method. +- **Improvement:** Added the `releasedProjectKeys` property to the `Projects.updateProject` method. +- **Improvement:** Added the `avatarId` parameter to the `IssuePriorities.createPriority` method. This parameter will replace `iconUrl` starting **March 16, 2025**. The `iconUrl` parameter is now marked as deprecated. +- **Improvement:** Added the `priorityName` and `expand` properties to the `IssuePriorities.searchPriorities` method. +- **Improvement:** Added the `avatarId` parameter to the `IssuePriorities.updatePriority` method. This parameter will replace `iconUrl` starting **March 16, 2025**. The `iconUrl` parameter is now marked as deprecated. +- **Improvement:** Added the `issueId` property to the `UserSearch.findAssignableUsers` method. +- **Improvement:** Added the optional `skipNotFoundPrecomputations` property to the `JqlFunctionsApps.updatePrecomputations` method. +- **Improvement:** Added the `failFast` parameter to the `Issues.getIssue` method. +- **Improvement:** Added the `failFast` parameter to the `IssueSearch.searchForIssuesUsingJql` method. +- **Improvement:** Added the `ari` and `metadata` parameters to the `ProjectComponents.createComponent` method. +- **Improvement:** Added the optional `componentSource` parameter to the `ProjectComponents.getProjectComponentsPaginated` method. +- **Improvement:** Added the optional `componentSource` parameter to the `ProjectComponents.getProjectComponents` method. +- **Improvement:** Added the `approvers` and `driver` parameters to the `ProjectVersions.createVersion` and `ProjectVersions.updateVersion` methods. +- **Improvement:** Replaced the `maxResults` property with `maxResult` in the `UserSearch.findUserKeysByQuery` method. +- **Improvement:** Added the `extendAdminPermissions` parameter to the following methods in the `Dashboard` class: + - `Dashboard.createDashboard` + - `Dashboard.updateDashboard` + - `Dashboard.copyDashboard` + +- **New Method:** Added the `getCustomFieldsConfigurations` method to the `IssueCustomFieldConfigurationApps` class. +- **New Method:** Added the `replaceCustomFieldOption` method to the `IssueCustomFieldOptions` class. +- **New Methods:** Added the following methods to the `WorkflowSchemes` class: + - `readWorkflowSchemes`: Retrieve workflow schemes. + - `updateSchemes`: Update workflow schemes. + - `updateWorkflowSchemeMappings`: Update workflow scheme mappings. +- **New Method:** Added the `getNotificationSchemeForProject` method to the `Projects` class. +- **New Method:** Added the `getBulkScreenTabs` method to the `ScreenTabs` class. +- **New Method:** Added the `deletePriority` method to the `IssuePriorities` class. +- **New Method:** Added the `getPrecomputationsByID` method to the `JqlFunctionsApps` class. +- **New Methods:** Added the following methods to the `Workflows` class: + - `readWorkflows`: Retrieve workflows. + - `workflowCapabilities`: Get workflow capabilities. + - `createWorkflows`: Create new workflows. + - `validateCreateWorkflows`: Validate workflow creation. + - `updateWorkflows`: Update existing workflows. + - `validateUpdateWorkflows`: Validate workflow updates. +- **New Methods:** Added the following methods to the `Issues` class: + - `getBulkChangelogs`: Retrieve changelogs for multiple issues in bulk. + - `bulkFetchIssues`: Fetch multiple issues in bulk. + - `getCreateIssueMetaIssueTypes`: Retrieve metadata for issue types when creating issues. + - `getCreateIssueMetaIssueTypeId`: Retrieve metadata for a specific issue type by ID when creating issues. + - `getIssueLimitReport`: Retrieve a report on issue limits. +- **New Methods:** Added the following methods to the `IssueSearch` class: + - `countIssues`: Count issues matching a query. + - `searchForIssuesIds`: Search for issue IDs using a query. + - `searchForIssuesUsingJqlEnhancedSearch`: Search and reconcile issues using JQL. + - `searchForIssuesUsingJqlEnhancedSearchPost`: Search and reconcile issues using JQL via POST request. +- **New Methods:** Added the following methods to the `IssueWorklogs` class: + - `bulkDeleteWorklogs`: Delete multiple worklogs in bulk. + - `bulkMoveWorklogs`: Move multiple worklogs in bulk. +- **New Method:** Added the `evaluateJiraExpressionUsingEnhancedSearch` method to the `JiraExpressions` class. +- **New Method:** Added the `findComponentsForProjects` method to the `ProjectComponents` class. +- **New Methods:** Added the following methods to the `ProjectVersions` class: + - `deleteRelatedWork`: Delete related work for a version. + - `updateRelatedWork`: Update related work for a version. + - `createRelatedWork`: Create related work for a version. + - `getRelatedWork`: Retrieve related work for a version. +- **New Method:** Added the `getProjectUsagesForWorkflowScheme` method to the `WorkflowSchemes` class. +- **New Method:** Added the `getWorkflowProjectIssueTypeUsages` method to the `Workflows` class. +- **New Methods:** Added the following methods to the `Status` class: + - `getProjectIssueTypeUsagesForStatus` + - `getProjectUsagesForStatus` + - `getWorkflowUsagesForStatus` + +- **Fix:** Updated the following methods in `Version2Client` and `Version3Client` to make the `parameters` argument mandatory (as it should have been initially): + - `IssueFieldConfigurations.createFieldConfiguration` + - `IssueFieldConfigurations.createFieldConfigurationScheme` + - `IssueLinks.linkIssues` + - `IssueTypeSchemes.createIssueTypeScheme` + - `IssueTypeSchemes.assignIssueTypeSchemeToProject` + - `IssueTypeScreenSchemes.createIssueTypeScreenScheme` + - `JQL.parseJqlQueries` + - `TimeTracking.setSharedTimeTrackingConfiguration` + - `WorkflowSchemeProjectAssociations.assignSchemeToProject` + - `IssueTypes.createIssueType` + - `IssueSearch.matchIssues` + - `IssueSearch.searchForIssuesUsingJql` + - `JiraExpressions.evaluateJiraExpression` + - `Users.setUserColumns` + - `Users.getUser` +- **Fix:** Improved the `Avatars.storeAvatar` method: + - Added the `mimeType` parameter to specify the type of the uploaded avatar. + - Updated the type of the `avatar` parameter from `any` to `Buffer | ArrayBuffer | Uint8Array | any` for better type safety. + - Set the default value of the `size` parameter to `0`. +- **Fix:** Improved the `IssueTypes.createIssueTypeAvatar` method: + - Added the `mimeType` parameter to specify the type of the uploaded avatar. + - Added the `avatar` parameter with the type `Buffer | ArrayBuffer | Uint8Array`. + - Set the default value of the `size` parameter to `0`. +- **Fix:** Improved the `ProjectAvatars.createProjectAvatar` method: + - Added the `mimeType` parameter to specify the type of the uploaded avatar. + - Updated the type of the `avatar` parameter from `any` to `Buffer | ArrayBuffer | Uint8Array | any`. + - Set the default value of the `size` parameter to `0`. + +- **Change:** Removed the `filter` parameter from the `JqlFunctionsApps.getPrecomputations` method (experimental method, not a breaking change). +- **Change:** Renamed `JiraExpressionEvaluateContextBean` to `JiraExpressionEvaluateContext`. + +- **Improvement:** Added type `string` for properties `projectId` in parameters and models: + - Model `Version` + - Parameter `GetFieldConfigurationSchemeProjectMapping` + - Parameter `GetHierarchy` + - Parameter `GetIssueTypeSchemeForProjects` + - Parameter `GetIssueTypeScreenSchemeProjectAssociations` + - Parameter `GetIssueTypesForProject` + - Parameter `GetProjectEmail` + - Parameter `GetWorkflowSchemeProjectAssociations` + - Parameter `UpdateProjectEmail` +- **Improvement:** Added type `number` for properties `projectIdOrKey` in parameters and models: + - Parameter `AddActorUsers` + - Parameter `ArchiveProject` + - Parameter `CreateProjectAvatar` + - Parameter `DeleteActor` + - Parameter `DeleteProject` + - Parameter `DeleteProjectAsynchronously` + - Parameter `DeleteProjectAvatar` + - Parameter `DeleteProjectProperty` + - Parameter `GetAllProjectAvatars` + - Parameter `GetAllStatuses` + - Parameter `GetFeaturesForProject` + - Parameter `GetProjectComponents` + - Parameter `GetProjectComponentsPaginated` + - Parameter `GetProjectProperty` + - Parameter `GetProjectPropertyKeys` + - Parameter `GetProjectRole` + - Parameter `GetProjectRoleDetails` + - Parameter `GetProjectRoles` + - Parameter `GetProjectVersions` + - Parameter `GetProjectVersionsPaginated` + - Parameter `Restore` + - Parameter `SetActors` + - Parameter `SetProjectProperty` + - Parameter `ToggleFeatureForProject` + - Parameter `UpdateProject` + - Parameter `UpdateProjectAvatar` + +--- + +- **Special thanks to Ness Li ([nessgor](https://github.com/nessgor)) for implementing the changes above. PR: [#356](https://github.com/MrRefactoring/jira.js/pull/356).** +- **Thanks to Niklas Correnz ([uncaught](https://github.com/uncaught)) for reporting the issue: [#352](https://github.com/MrRefactoring/jira.js/issues/352).** + +--- + +### 4.0.6 + +- **#347:** Fixed an issue with adding attachments of type `Readable` or `ReadableStream` (e.g., `fs.createReadStream`). Thanks to [Lunatic174](https://github.com/Lunatic174) for [reporting the issue](https://github.com/MrRefactoring/jira.js/issues/347). + +--- + ### 4.0.5 - **#344:** Replaced the `mime-types` library with `mime` to ensure browser compatibility, as `mime-types` relies on the `path` module from Node.js. Thanks to [kang](https://github.com/kang8) for [reporting the issue](https://github.com/MrRefactoring/jira.js/issues/344) and proposing the fix. +--- + ### 4.0.4 - **#320:** Resolved a tree-shaking issue where importing a single client would still include all clients in the output bundle when using bundlers. Now, only the required client code is included. Thanks to [Nao Yonashiro](https://github.com/orisano) for [reporting the issue](https://github.com/MrRefactoring/jira.js/issues/320) and proposing a fix. @@ -46,12 +233,16 @@ console.log(attachment[0].mimeType); // Will be 'application/typescript' ``` +--- + ### 4.0.3 - **Bug Fix:** Fixed an issue with the `Users.createUser` method by adding the required `products` property. Thanks to [Appelberg-s](https://github.com/Appelberg-s) for the [fix](https://github.com/MrRefactoring/jira.js/commit/362918093c20036049db334743e2a0f5f41cbcd4#diff-6960050bc2a3d9ffad9eb5e307145969dc4a38eb5434eebf39da545fd18e01b7R12). - **Documentation Update:** Corrected an error in `README.md`. Thanks to [Maurice de Bruyn](https://github.com/ueberBrot) for the [contribution](https://github.com/MrRefactoring/jira.js/commit/fb6151e1a0c7953b9447aaaf99caea5c2f93bb96). - **Dependencies:** Updated all dependencies to their latest versions. +--- + ### 4.0.2 - `getAllProjects` in README and examples replaced to `searchProjects`. Thanks to [Alexander Pivovarov](https://github.com/bladerunner2020) for reporting [the issue](https://github.com/MrRefactoring/jira.js/issues/323). diff --git a/README.md b/README.md index 70f71e2644..aeebc4048a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@
- Jira.js logo + Jira.js logo NPM version NPM downloads per month @@ -21,9 +21,8 @@ Usability, consistency, and performance are key focuses of jira.js, and it also - [Documentation](#documentation) - [Usage](#usage) - [Authentication](#authentication) - - [Basic](#basic-authentication) + - [Email and ApiToken](#email-and-api-token) - [OAuth 2.0](#oauth-20) - - [Personal access token](#personal-access-token) - [Error handling](#error-handling) - [Example and using algorithm](#example-and-using-algorithm) - [Decreasing Webpack bundle size](#decreasing-webpack-bundle-size) @@ -32,7 +31,7 @@ Usability, consistency, and performance are key focuses of jira.js, and it also ## Installation -**Node.js 18.0.0 or newer is required.** +**Node.js 20.0.0 or newer is required.** Install with the npm: @@ -56,27 +55,11 @@ You can find the documentation [here](https://mrrefactoring.github.io/jira.js/). There are several types of authentication to gain access to the Jira API. Let's take a look at a few of them below: -##### [Basic authentication](https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/) +##### Email and API Token -Basic authentication allows you to log in with credentials. You can use username and password, but this login method is not supported in the online version and most standalone versions, so it's better to release API Token. Read how to do it [here](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/) and use it together with email. +To create an API Token, use this link: [https://id.atlassian.com/manage-profile/security/api-tokens](https://id.atlassian.com/manage-profile/security/api-tokens) -Username and password example: - -```typescript -import { Version3Client } from 'jira.js'; - -const client = new Version3Client({ - host: 'https://your-domain.atlassian.net', - authentication: { - basic: { - username: 'YOUR_USERNAME', - password: 'YOUR_PASSWORD', - }, - }, -}); -``` - -Email and API Token example: +Example of usage ```typescript import { Version3Client } from 'jira.js'; @@ -111,20 +94,6 @@ const client = new Version3Client({ }); ``` -##### [Personal access token](https://id.atlassian.com/manage-profile/security/api-tokens) - -To create a personal access token, use this link: [https://id.atlassian.com/manage-profile/security/api-tokens](https://id.atlassian.com/manage-profile/security/api-tokens) - -```typescript -import { Version3Client } from 'jira.js'; - -const client = new Version3Client({ - host: 'https://your-domain.atlassian.net', - authentication: { - personalAccessToken: 'secrectPAT', - }, -}); -``` #### Error handling Starting from version 4.0.0, the library has a new error handling system. @@ -152,7 +121,7 @@ try { console.log(error); } } -```` +``` #### Example and using algorithm @@ -244,10 +213,12 @@ Available groups: Version 2 Cloud REST API group - [announcementBanner](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-announcement-banner/#api-group-announcement-banner) + - [appDataPolicies](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-app-data-policies/#api-group-app-data-policies) - [applicationRoles](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-application-roles/#api-group-application-roles) - [appMigration](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-app-migration/#api-group-app-migration) - [auditRecords](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-audit-records/#api-group-audit-records) - [avatars](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-avatars/#api-group-avatars) + - [classificationLevels](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-classification-levels/#api-group-classification-levels) - [dashboards](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-dashboards/#api-group-dashboards) - [filters](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-filters/#api-group-filters) - [filterSharing](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-filter-sharing/#api-group-filter-sharing) @@ -292,9 +263,12 @@ Available groups: - [myself](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-myself/#api-group-myself) - [permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-permissions/#api-group-permissions) - [permissionSchemes](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-permission-schemes/#api-group-permission-schemes) + - [plans](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-plans/#api-group-plans) + - [prioritySchemes](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-priority-schemes/#api-group-priority-schemes) - [projects](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-projects/#api-group-projects) - [projectAvatars](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-avatars/#api-group-project-avatars) - [projectCategories](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-categories/#api-group-project-categories) + - [projectClassificationLevels](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-classification-levels/#api-group-project-classification-levels) - [projectComponents](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-components/#api-group-project-components) - [projectEmail](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-email/#api-group-project-email) - [projectFeatures](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-features/#api-group-project-features) @@ -310,8 +284,10 @@ Available groups: - [screenTabFields](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-screen-tab-fields/#api-group-screen-tab-fields) - [screenSchemes](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-screen-schemes/#api-group-screen-schemes) - [serverInfo](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-server-info/#api-group-server-info) + - [serviceRegistry](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-service-registry/#api-group-service-registry) - [status](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-status/#api-group-status) - [tasks](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-tasks/#api-group-tasks) + - [teamsInPlan](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-teams-in-plan/#api-group-teams-in-plan) - [timeTracking](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-time-tracking/#api-group-time-tracking) - [uiModificationsApps](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-ui-modifications--apps-/#api-group-ui-modifications--apps-) - [users](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-users/#api-group-users) @@ -333,10 +309,12 @@ Available groups: Version 3 Cloud REST API group - [announcementBanner](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-announcement-banner/#api-group-announcement-banner) + - [appDataPolicy](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-app-data-policies/#api-group-app-data-policies) - [applicationRoles](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-application-roles/#api-group-application-roles) - [appMigration](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-app-migration/#api-group-app-migration) - [auditRecords](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-audit-records/#api-group-audit-records) - [avatars](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-avatars/#api-group-avatars) + - [classificationLevels](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-classification-levels/#api-group-classification-levels) - [dashboards](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-dashboards/#api-group-dashboards) - [filters](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-filters/#api-group-filters) - [filterSharing](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-filter-sharing/#api-group-filter-sharing) @@ -345,6 +323,7 @@ Available groups: - [instanceInformation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-instance-information/#api-group-instance-information) - [issues](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-group-issues) - [issueAttachments](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/#api-group-issue-attachments) + - [issueBulkOperations](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-bulk-operations/#api-group-issue-bulk-operations) - [issueComments](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/#api-group-issue-comments) - [issueCustomFieldConfigurationApps](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-configuration--apps-/#api-group-issue-custom-field-configuration--apps-) - [issueCommentProperties](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comment-properties/#api-group-issue-comment-properties) @@ -382,9 +361,12 @@ Available groups: - [myself](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-myself/#api-group-myself) - [permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-permissions/#api-group-permissions) - [permissionSchemes](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-permission-schemes/#api-group-permission-schemes) + - [plans](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-plans/#api-group-plans) + - [prioritySchemes](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-priority-schemes/#api-group-priority-schemes) - [projects](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/#api-group-projects) - [projectAvatars](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-avatars/#api-group-project-avatars) - [projectCategories](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-categories/#api-group-project-categories) + - [projectClassificationLevels](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-classification-levels/#api-group-project-classification-levels) - [projectComponents](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-components/#api-group-project-components) - [projectEmail](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-email/#api-group-project-email) - [projectFeatures](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-features/#api-group-project-features) @@ -400,8 +382,10 @@ Available groups: - [screenTabFields](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-screen-tab-fields/#api-group-screen-tab-fields) - [screenSchemes](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-screen-schemes/#api-group-screen-schemes) - [serverInfo](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-server-info/#api-group-server-info) + - [serviceRegistry](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-service-registry/#api-group-service-registry) - [status](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-status/#api-group-status) - [tasks](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/#api-group-tasks) + - [teamsInPlan](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-teams-in-plan/#api-group-teams-in-plan) - [timeTracking](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-time-tracking/#api-group-time-tracking) - [uiModificationsApps](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-ui-modifications--apps-/#api-group-ui-modifications--apps-) - [users](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-group-users) diff --git a/assets/favicon.svg b/assets/favicon.svg deleted file mode 100644 index af89306cbb..0000000000 --- a/assets/favicon.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - diff --git a/assets/logo.svg b/assets/logo.svg deleted file mode 100644 index 3ed9e7b8ea..0000000000 --- a/assets/logo.svg +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000000..2a524ed7fb --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,24 @@ +import js from "@eslint/js"; +import globals from "globals"; +import tseslint from "typescript-eslint"; +import { defineConfig } from "eslint/config"; +import stylisticJs from '@stylistic/eslint-plugin-js'; +import stylisticTs from '@stylistic/eslint-plugin-ts'; + +export default defineConfig([ + { files: ["**/*.{js,mjs,cjs,ts}"], plugins: { js }, extends: ["js/recommended"] }, + { files: ["**/*.{js,mjs,cjs,ts}"], languageOptions: { globals: {...globals.browser, ...globals.node} } }, + tseslint.configs.recommended, + { + plugins: { + '@stylistic/js': stylisticJs, + '@stylistic/ts': stylisticTs, + }, + rules: { + '@stylistic/ts/indent': ['error', 2], + '@stylistic/js/no-trailing-spaces': 'error', + '@stylistic/ts/quotes': ['error', 'single'], + '@typescript-eslint/no-empty-object-type': 'off', // todo fix it + } + } +]); diff --git a/examples/.gitignore b/examples/.gitignore index a44f6f588b..490df5cea1 100644 --- a/examples/.gitignore +++ b/examples/.gitignore @@ -1,4 +1,5 @@ .idea/ node_modules/ +src/credentials.ts .DS_Store diff --git a/examples/src/addFixVersion.ts b/examples/src/addFixVersion.ts index 67ba38f60d..2803ade7f2 100644 --- a/examples/src/addFixVersion.ts +++ b/examples/src/addFixVersion.ts @@ -15,7 +15,6 @@ async function addFixVersion() { const fix = await client.issueProperties.setIssueProperty({ issueIdOrKey, propertyKey: 'fixVersion', - // @ts-ignore propertyValue: 'N/a', }); diff --git a/examples/src/credentials.ts b/examples/src/credentials.ts index cfb10bf39b..64b7a7a9bd 100644 --- a/examples/src/credentials.ts +++ b/examples/src/credentials.ts @@ -1,6 +1,6 @@ -export const host = 'https://jira-js.atlassian.net/'; -export const email = 'mrrefactoring@yandex.ru'; -export const apiToken = 'ATATT3xFfGF0CQo3Ed8gqWxZmT2nlOEinQZJkp7hVY-ynttVtAsRwGF5JYD1vBcSu0i3RNfilR_RbksRFBxU33tsWTi7R5ontSouy0mwNqPhTazoZiVm5ah3_Emcy9g7-KB0rW7XTm5uLHeCdUW9X-Fv1jqWUHjtrOgCr4pXtcV6DmJPyBLa3Jg=582DE538'; +export const host = ''; +export const email = ''; +export const apiToken = ''; if (!host) { throw new Error('Please specify host'); diff --git a/examples/src/getAllWorklogs.ts b/examples/src/getAllWorklogs.ts index 2fa9fa6304..04d4bc49d8 100644 --- a/examples/src/getAllWorklogs.ts +++ b/examples/src/getAllWorklogs.ts @@ -25,7 +25,6 @@ async function getAllWorklogs() { let total = 0; do { - // eslint-disable-next-line no-await-in-loop const worklogsPaginated = await client.issueWorklogs.getIssueWorklog({ issueIdOrKey: issue.key, startAt: offset }); offset += worklogsPaginated.worklogs.length; diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 185c7ba660..0000000000 --- a/package-lock.json +++ /dev/null @@ -1,6206 +0,0 @@ -{ - "name": "jira.js", - "version": "4.0.5", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "jira.js", - "version": "4.0.5", - "license": "MIT", - "dependencies": { - "axios": "^1.7.9", - "formdata-node": "^6.0.3", - "mime": "^4.0.6", - "tslib": "^2.8.1" - }, - "devDependencies": { - "@types/node": "^18.19.70", - "@types/sinon": "^17.0.3", - "@typescript-eslint/eslint-plugin": "^8.19.0", - "@typescript-eslint/parser": "^8.19.0", - "dotenv": "^16.4.7", - "eslint": "^8.57.1", - "eslint-config-airbnb-base": "^15.0.0", - "eslint-import-resolver-typescript": "^3.7.0", - "eslint-plugin-import": "^2.31.0", - "prettier": "^3.4.2", - "prettier-plugin-jsdoc": "^1.3.2", - "sinon": "^18.0.1", - "typedoc": "^0.27.6", - "typescript": "^5.7.2", - "vite-tsconfig-paths": "^5.1.4", - "vitest": "^2.1.8" - } - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", - "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", - "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", - "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", - "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", - "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", - "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", - "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", - "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", - "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", - "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", - "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", - "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", - "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", - "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", - "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", - "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", - "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", - "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", - "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", - "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", - "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", - "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", - "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", - "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", - "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@eslint/eslintrc/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@gerrit0/mini-shiki": { - "version": "1.26.1", - "resolved": "https://registry.npmjs.org/@gerrit0/mini-shiki/-/mini-shiki-1.26.1.tgz", - "integrity": "sha512-gHFUvv9f1fU2Piou/5Y7Sx5moYxcERbC7CXc6rkDLQTUBg5Dgg9L4u29/nHqfoQ3Y9R0h0BcOhd14uOEZIBP7Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@shikijs/engine-oniguruma": "^1.26.1", - "@shikijs/types": "^1.26.1", - "@shikijs/vscode-textmate": "^10.0.1" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", - "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", - "deprecated": "Use @eslint/config-array instead", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.3", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nolyfill/is-core-module": { - "version": "1.0.39", - "resolved": "https://registry.npmjs.org/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz", - "integrity": "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.4.0" - } - }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.30.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.30.0.tgz", - "integrity": "sha512-qFcFto9figFLz2g25DxJ1WWL9+c91fTxnGuwhToCl8BaqDsDYMl/kOnBXAyAqkkzAWimYMSWNPWEjt+ADAHuoQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.30.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.30.0.tgz", - "integrity": "sha512-vqrQdusvVl7dthqNjWCL043qelBK+gv9v3ZiqdxgaJvmZyIAAXMjeGVSqZynKq69T7062T5VrVTuikKSAAVP6A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.30.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.30.0.tgz", - "integrity": "sha512-617pd92LhdA9+wpixnzsyhVft3szYiN16aNUMzVkf2N+yAk8UXY226Bfp36LvxYTUt7MO/ycqGFjQgJ0wlMaWQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.30.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.30.0.tgz", - "integrity": "sha512-Y3b4oDoaEhCypg8ajPqigKDcpi5ZZovemQl9Edpem0uNv6UUjXv7iySBpGIUTSs2ovWOzYpfw9EbFJXF/fJHWw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.30.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.30.0.tgz", - "integrity": "sha512-3REQJ4f90sFIBfa0BUokiCdrV/E4uIjhkWe1bMgCkhFXbf4D8YN6C4zwJL881GM818qVYE9BO3dGwjKhpo2ABA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.30.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.30.0.tgz", - "integrity": "sha512-ZtY3Y8icbe3Cc+uQicsXG5L+CRGUfLZjW6j2gn5ikpltt3Whqjfo5mkyZ86UiuHF9Q3ZsaQeW7YswlHnN+lAcg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.30.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.30.0.tgz", - "integrity": "sha512-bsPGGzfiHXMhQGuFGpmo2PyTwcrh2otL6ycSZAFTESviUoBOuxF7iBbAL5IJXc/69peXl5rAtbewBFeASZ9O0g==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.30.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.30.0.tgz", - "integrity": "sha512-kvyIECEhs2DrrdfQf++maCWJIQ974EI4txlz1nNSBaCdtf7i5Xf1AQCEJWOC5rEBisdaMFFnOWNLYt7KpFqy5A==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.30.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.30.0.tgz", - "integrity": "sha512-CFE7zDNrokaotXu+shwIrmWrFxllg79vciH4E/zeK7NitVuWEaXRzS0mFfFvyhZfn8WfVOG/1E9u8/DFEgK7WQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.30.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.30.0.tgz", - "integrity": "sha512-MctNTBlvMcIBP0t8lV/NXiUwFg9oK5F79CxLU+a3xgrdJjfBLVIEHSAjQ9+ipofN2GKaMLnFFXLltg1HEEPaGQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.30.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.30.0.tgz", - "integrity": "sha512-fBpoYwLEPivL3q368+gwn4qnYnr7GVwM6NnMo8rJ4wb0p/Y5lg88vQRRP077gf+tc25akuqd+1Sxbn9meODhwA==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.30.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.30.0.tgz", - "integrity": "sha512-1hiHPV6dUaqIMXrIjN+vgJqtfkLpqHS1Xsg0oUfUVD98xGp1wX89PIXgDF2DWra1nxAd8dfE0Dk59MyeKaBVAw==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.30.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.30.0.tgz", - "integrity": "sha512-U0xcC80SMpEbvvLw92emHrNjlS3OXjAM0aVzlWfar6PR0ODWCTQtKeeB+tlAPGfZQXicv1SpWwRz9Hyzq3Jx3g==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.30.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.30.0.tgz", - "integrity": "sha512-VU/P/IODrNPasgZDLIFJmMiLGez+BN11DQWfTVlViJVabyF3JaeaJkP6teI8760f18BMGCQOW9gOmuzFaI1pUw==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.30.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.30.0.tgz", - "integrity": "sha512-laQVRvdbKmjXuFA3ZiZj7+U24FcmoPlXEi2OyLfbpY2MW1oxLt9Au8q9eHd0x6Pw/Kw4oe9gwVXWwIf2PVqblg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.30.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.30.0.tgz", - "integrity": "sha512-3wzKzduS7jzxqcOvy/ocU/gMR3/QrHEFLge5CD7Si9fyHuoXcidyYZ6jyx8OPYmCcGm3uKTUl+9jUSAY74Ln5A==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.30.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.30.0.tgz", - "integrity": "sha512-jROwnI1+wPyuv696rAFHp5+6RFhXGGwgmgSfzE8e4xfit6oLRg7GyMArVUoM3ChS045OwWr9aTnU+2c1UdBMyw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.30.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.30.0.tgz", - "integrity": "sha512-duzweyup5WELhcXx5H1jokpr13i3BV9b48FMiikYAwk/MT1LrMYYk2TzenBd0jj4ivQIt58JWSxc19y4SvLP4g==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.30.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.30.0.tgz", - "integrity": "sha512-DYvxS0M07PvgvavMIybCOBYheyrqlui6ZQBHJs6GqduVzHSZ06TPPvlfvnYstjODHQ8UUXFwt5YE+h0jFI8kwg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rtsao/scc": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", - "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", - "dev": true, - "license": "MIT" - }, - "node_modules/@shikijs/engine-oniguruma": { - "version": "1.26.1", - "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.26.1.tgz", - "integrity": "sha512-F5XuxN1HljLuvfXv7d+mlTkV7XukC1cawdtOo+7pKgPD83CAB1Sf8uHqP3PK0u7njFH0ZhoXE1r+0JzEgAQ+kg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@shikijs/types": "1.26.1", - "@shikijs/vscode-textmate": "^10.0.1" - } - }, - "node_modules/@shikijs/types": { - "version": "1.26.1", - "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.26.1.tgz", - "integrity": "sha512-d4B00TKKAMaHuFYgRf3L0gwtvqpW4hVdVwKcZYbBfAAQXspgkbWqnFfuFl3MDH6gLbsubOcr+prcnsqah3ny7Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@shikijs/vscode-textmate": "^10.0.1", - "@types/hast": "^3.0.4" - } - }, - "node_modules/@shikijs/vscode-textmate": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.1.tgz", - "integrity": "sha512-fTIQwLF+Qhuws31iw7Ncl1R3HUDtGwIipiJ9iU+UsDUwMhegFcQKQHd51nZjb7CArq0MvON8rbgCGQYWHUKAdg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@sinonjs/commons": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", - "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "11.2.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-11.2.2.tgz", - "integrity": "sha512-G2piCSxQ7oWOxwGSAyFHfPIsyeJGXYtc6mFbnFA+kRXkiEnTl8c/8jul2S329iFBnDI9HGoeWWAZvuvOkZccgw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^3.0.0" - } - }, - "node_modules/@sinonjs/samsam": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.2.tgz", - "integrity": "sha512-v46t/fwnhejRSFTGqbpn9u+LQ9xJDse10gNnPgAcxgdoCDMXj/G2asWAC/8Qs+BAZDicX+MNZouXT1A7c83kVw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^3.0.1", - "lodash.get": "^4.4.2", - "type-detect": "^4.1.0" - } - }, - "node_modules/@sinonjs/samsam/node_modules/type-detect": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", - "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/@sinonjs/text-encoding": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.3.tgz", - "integrity": "sha512-DE427ROAphMQzU4ENbliGYrBSYPXF+TtLg9S8vzeA+OF4ZKzoDdzfL8sxuMUGS/lgRhM6j1URSk9ghf7Xo1tyA==", - "dev": true, - "license": "(Unlicense OR Apache-2.0)" - }, - "node_modules/@types/debug": { - "version": "4.1.12", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", - "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/ms": "*" - } - }, - "node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/hast": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", - "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/@types/ms": { - "version": "0.7.34", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", - "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "18.19.70", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.70.tgz", - "integrity": "sha512-RE+K0+KZoEpDUbGGctnGdkrLFwi1eYKTlIHNl2Um98mUkGsm1u2Ff6Ltd0e8DktTtC98uy7rSj+hO8t/QuLoVQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/@types/sinon": { - "version": "17.0.3", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.3.tgz", - "integrity": "sha512-j3uovdn8ewky9kRBG19bOwaZbexJu/XjtkHyjvUgt4xfPFz18dcORIMqnYh66Fx3Powhcr85NT5+er3+oViapw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/sinonjs__fake-timers": "*" - } - }, - "node_modules/@types/sinonjs__fake-timers": { - "version": "8.1.5", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.5.tgz", - "integrity": "sha512-mQkU2jY8jJEF7YHjHvsQO8+3ughTL1mcnn96igfhONmR+fUPSKIkefQYpSe8bsly2Ep7oQbn/6VG5/9/0qcArQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/unist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", - "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.19.0.tgz", - "integrity": "sha512-NggSaEZCdSrFddbctrVjkVZvFC6KGfKfNK0CU7mNK/iKHGKbzT4Wmgm08dKpcZECBu9f5FypndoMyRHkdqfT1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.19.0", - "@typescript-eslint/type-utils": "8.19.0", - "@typescript-eslint/utils": "8.19.0", - "@typescript-eslint/visitor-keys": "8.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.3.1", - "natural-compare": "^1.4.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "8.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.19.0.tgz", - "integrity": "sha512-6M8taKyOETY1TKHp0x8ndycipTVgmp4xtg5QpEZzXxDhNvvHOJi5rLRkLr8SK3jTgD5l4fTlvBiRdfsuWydxBw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/scope-manager": "8.19.0", - "@typescript-eslint/types": "8.19.0", - "@typescript-eslint/typescript-estree": "8.19.0", - "@typescript-eslint/visitor-keys": "8.19.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "8.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.19.0.tgz", - "integrity": "sha512-hkoJiKQS3GQ13TSMEiuNmSCvhz7ujyqD1x3ShbaETATHrck+9RaDdUbt+osXaUuns9OFwrDTTrjtwsU8gJyyRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.19.0", - "@typescript-eslint/visitor-keys": "8.19.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "8.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.19.0.tgz", - "integrity": "sha512-TZs0I0OSbd5Aza4qAMpp1cdCYVnER94IziudE3JU328YUHgWu9gwiwhag+fuLeJ2LkWLXI+F/182TbG+JaBdTg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "8.19.0", - "@typescript-eslint/utils": "8.19.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "8.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.19.0.tgz", - "integrity": "sha512-8XQ4Ss7G9WX8oaYvD4OOLCjIQYgRQxO+qCiR2V2s2GxI9AUpo7riNwo6jDhKtTcaJjT8PY54j2Yb33kWtSJsmA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.19.0.tgz", - "integrity": "sha512-WW9PpDaLIFW9LCbucMSdYUuGeFUz1OkWYS/5fwZwTA+l2RwlWFdJvReQqMUMBw4yJWJOfqd7An9uwut2Oj8sLw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.19.0", - "@typescript-eslint/visitor-keys": "8.19.0", - "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "8.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.19.0.tgz", - "integrity": "sha512-PTBG+0oEMPH9jCZlfg07LCB2nYI0I317yyvXGfxnvGvw4SHIOuRnQ3kadyyXY6tGdChusIHIbM5zfIbp4M6tCg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.19.0", - "@typescript-eslint/types": "8.19.0", - "@typescript-eslint/typescript-estree": "8.19.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.19.0.tgz", - "integrity": "sha512-mCFtBbFBJDCNCWUl5y6sZSCHXw1DEFEk3c/M3nRK2a4XUB8StGFtmcEMizdjKuBzB6e/smJAAWYug3VrdLMr1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.19.0", - "eslint-visitor-keys": "^4.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.1.tgz", - "integrity": "sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA==", - "dev": true, - "license": "ISC" - }, - "node_modules/@vitest/expect": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.8.tgz", - "integrity": "sha512-8ytZ/fFHq2g4PJVAtDX57mayemKgDR6X3Oa2Foro+EygiOJHUXhCqBAAKQYYajZpFoIfvBCF1j6R6IYRSIUFuw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/spy": "2.1.8", - "@vitest/utils": "2.1.8", - "chai": "^5.1.2", - "tinyrainbow": "^1.2.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/mocker": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.8.tgz", - "integrity": "sha512-7guJ/47I6uqfttp33mgo6ga5Gr1VnL58rcqYKyShoRK9ebu8T5Rs6HN3s1NABiBeVTdWNrwUMcHH54uXZBN4zA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/spy": "2.1.8", - "estree-walker": "^3.0.3", - "magic-string": "^0.30.12" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "msw": "^2.4.9", - "vite": "^5.0.0" - }, - "peerDependenciesMeta": { - "msw": { - "optional": true - }, - "vite": { - "optional": true - } - } - }, - "node_modules/@vitest/pretty-format": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.8.tgz", - "integrity": "sha512-9HiSZ9zpqNLKlbIDRWOnAWqgcA7xu+8YxXSekhr0Ykab7PAYFkhkwoqVArPOtJhPmYeE2YHgKZlj3CP36z2AJQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "tinyrainbow": "^1.2.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/runner": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.8.tgz", - "integrity": "sha512-17ub8vQstRnRlIU5k50bG+QOMLHRhYPAna5tw8tYbj+jzjcspnwnwtPtiOlkuKC4+ixDPTuLZiqiWWQ2PSXHVg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/utils": "2.1.8", - "pathe": "^1.1.2" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/snapshot": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.8.tgz", - "integrity": "sha512-20T7xRFbmnkfcmgVEz+z3AU/3b0cEzZOt/zmnvZEctg64/QZbSDJEVm9fLnnlSi74KibmRsO9/Qabi+t0vCRPg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/pretty-format": "2.1.8", - "magic-string": "^0.30.12", - "pathe": "^1.1.2" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/spy": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.8.tgz", - "integrity": "sha512-5swjf2q95gXeYPevtW0BLk6H8+bPlMb4Vw/9Em4hFxDcaOxS+e0LOX4yqNxoHzMR2akEB2xfpnWUzkZokmgWDg==", - "dev": true, - "license": "MIT", - "dependencies": { - "tinyspy": "^3.0.2" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/utils": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.8.tgz", - "integrity": "sha512-dwSoui6djdwbfFmIgbIjX2ZhIoG7Ex/+xpxyiEgIGzjliY8xGkcpITKTlp6B4MgtGkF2ilvm97cPM96XZaAgcA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/pretty-format": "2.1.8", - "loupe": "^3.1.2", - "tinyrainbow": "^1.2.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/acorn": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", - "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", - "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "is-array-buffer": "^3.0.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-includes": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", - "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.4", - "is-string": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.findlastindex": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", - "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flat": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", - "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flatmap": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", - "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", - "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "is-array-buffer": "^3.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/assertion-error": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", - "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "license": "MIT" - }, - "node_modules/available-typed-arrays": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/axios": { - "version": "1.7.9", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", - "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", - "license": "MIT", - "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/binary-searching": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/binary-searching/-/binary-searching-2.0.5.tgz", - "integrity": "sha512-v4N2l3RxL+m4zDxyxz3Ne2aTmiPn8ZUpKFpdPtO+ItW1NcTCXA7JeHG5GMBSvoKSkQZ9ycS+EouDVxYB9ufKWA==", - "dev": true, - "license": "MIT" - }, - "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cac": { - "version": "6.7.14", - "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", - "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/call-bind": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", - "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.0", - "es-define-property": "^1.0.0", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", - "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/call-bound": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", - "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/chai": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.2.tgz", - "integrity": "sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==", - "dev": true, - "license": "MIT", - "dependencies": { - "assertion-error": "^2.0.1", - "check-error": "^2.1.1", - "deep-eql": "^5.0.1", - "loupe": "^3.1.0", - "pathval": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/character-entities": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", - "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/check-error": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", - "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 16" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "license": "MIT" - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "license": "MIT", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/comment-parser": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", - "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, - "node_modules/confusing-browser-globals": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", - "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", - "dev": true, - "license": "MIT" - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/data-view-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", - "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/data-view-byte-length": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", - "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/inspect-js" - } - }, - "node_modules/data-view-byte-offset": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", - "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decode-named-character-reference": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz", - "integrity": "sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==", - "dev": true, - "license": "MIT", - "dependencies": { - "character-entities": "^2.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/deep-eql": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", - "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/dequal": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", - "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/devlop": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", - "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", - "dev": true, - "license": "MIT", - "dependencies": { - "dequal": "^2.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/dotenv": { - "version": "16.4.7", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", - "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" - } - }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/enhanced-resolve": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.0.tgz", - "integrity": "sha512-0/r0MySGYG8YqlayBZ6MuCfECmHFdJ5qyPh8s8wa5Hnm6SaFLSK1VYCbj+NKp090Nm1caZhD+QTnmxO7esYGyQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/es-abstract": { - "version": "1.23.9", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.9.tgz", - "integrity": "sha512-py07lI0wjxAC/DcfK1S6G7iANonniZwTISvdPzk9hzeH0IZIshbuuFxLIU96OyF89Yb9hiqWn8M/bY83KY5vzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.2", - "arraybuffer.prototype.slice": "^1.0.4", - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "data-view-buffer": "^1.0.2", - "data-view-byte-length": "^1.0.2", - "data-view-byte-offset": "^1.0.1", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-set-tostringtag": "^2.1.0", - "es-to-primitive": "^1.3.0", - "function.prototype.name": "^1.1.8", - "get-intrinsic": "^1.2.7", - "get-proto": "^1.0.0", - "get-symbol-description": "^1.1.0", - "globalthis": "^1.0.4", - "gopd": "^1.2.0", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "internal-slot": "^1.1.0", - "is-array-buffer": "^3.0.5", - "is-callable": "^1.2.7", - "is-data-view": "^1.0.2", - "is-regex": "^1.2.1", - "is-shared-array-buffer": "^1.0.4", - "is-string": "^1.1.1", - "is-typed-array": "^1.1.15", - "is-weakref": "^1.1.0", - "math-intrinsics": "^1.1.0", - "object-inspect": "^1.13.3", - "object-keys": "^1.1.1", - "object.assign": "^4.1.7", - "own-keys": "^1.0.1", - "regexp.prototype.flags": "^1.5.3", - "safe-array-concat": "^1.1.3", - "safe-push-apply": "^1.0.0", - "safe-regex-test": "^1.1.0", - "set-proto": "^1.0.0", - "string.prototype.trim": "^1.2.10", - "string.prototype.trimend": "^1.0.9", - "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.3", - "typed-array-byte-length": "^1.0.3", - "typed-array-byte-offset": "^1.0.4", - "typed-array-length": "^1.0.7", - "unbox-primitive": "^1.1.0", - "which-typed-array": "^1.1.18" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-module-lexer": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.6.0.tgz", - "integrity": "sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/es-object-atoms": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", - "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", - "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-shim-unscopables": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", - "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.0" - } - }, - "node_modules/es-to-primitive": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", - "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.2.7", - "is-date-object": "^1.0.5", - "is-symbol": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/esbuild": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", - "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.21.5", - "@esbuild/android-arm": "0.21.5", - "@esbuild/android-arm64": "0.21.5", - "@esbuild/android-x64": "0.21.5", - "@esbuild/darwin-arm64": "0.21.5", - "@esbuild/darwin-x64": "0.21.5", - "@esbuild/freebsd-arm64": "0.21.5", - "@esbuild/freebsd-x64": "0.21.5", - "@esbuild/linux-arm": "0.21.5", - "@esbuild/linux-arm64": "0.21.5", - "@esbuild/linux-ia32": "0.21.5", - "@esbuild/linux-loong64": "0.21.5", - "@esbuild/linux-mips64el": "0.21.5", - "@esbuild/linux-ppc64": "0.21.5", - "@esbuild/linux-riscv64": "0.21.5", - "@esbuild/linux-s390x": "0.21.5", - "@esbuild/linux-x64": "0.21.5", - "@esbuild/netbsd-x64": "0.21.5", - "@esbuild/openbsd-x64": "0.21.5", - "@esbuild/sunos-x64": "0.21.5", - "@esbuild/win32-arm64": "0.21.5", - "@esbuild/win32-ia32": "0.21.5", - "@esbuild/win32-x64": "0.21.5" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", - "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", - "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.1", - "@humanwhocodes/config-array": "^0.13.0", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-config-airbnb-base": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", - "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", - "dev": true, - "license": "MIT", - "dependencies": { - "confusing-browser-globals": "^1.0.10", - "object.assign": "^4.1.2", - "object.entries": "^1.1.5", - "semver": "^6.3.0" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "peerDependencies": { - "eslint": "^7.32.0 || ^8.2.0", - "eslint-plugin-import": "^2.25.2" - } - }, - "node_modules/eslint-config-airbnb-base/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-import-resolver-node": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", - "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7", - "is-core-module": "^2.13.0", - "resolve": "^1.22.4" - } - }, - "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-import-resolver-typescript": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.7.0.tgz", - "integrity": "sha512-Vrwyi8HHxY97K5ebydMtffsWAn1SCR9eol49eCd5fJS4O1WV7PaAjbcjmbfJJSMz/t4Mal212Uz/fQZrOB8mow==", - "dev": true, - "license": "ISC", - "dependencies": { - "@nolyfill/is-core-module": "1.0.39", - "debug": "^4.3.7", - "enhanced-resolve": "^5.15.0", - "fast-glob": "^3.3.2", - "get-tsconfig": "^4.7.5", - "is-bun-module": "^1.0.2", - "is-glob": "^4.0.3", - "stable-hash": "^0.0.4" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/unts/projects/eslint-import-resolver-ts" - }, - "peerDependencies": { - "eslint": "*", - "eslint-plugin-import": "*", - "eslint-plugin-import-x": "*" - }, - "peerDependenciesMeta": { - "eslint-plugin-import": { - "optional": true - }, - "eslint-plugin-import-x": { - "optional": true - } - } - }, - "node_modules/eslint-module-utils": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz", - "integrity": "sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7" - }, - "engines": { - "node": ">=4" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import": { - "version": "2.31.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", - "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rtsao/scc": "^1.1.0", - "array-includes": "^3.1.8", - "array.prototype.findlastindex": "^1.2.5", - "array.prototype.flat": "^1.3.2", - "array.prototype.flatmap": "^1.3.2", - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.12.0", - "hasown": "^2.0.2", - "is-core-module": "^2.15.1", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.8", - "object.groupby": "^1.0.3", - "object.values": "^1.2.0", - "semver": "^6.3.1", - "string.prototype.trimend": "^1.0.8", - "tsconfig-paths": "^3.15.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" - } - }, - "node_modules/eslint-plugin-import/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-plugin-import/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/eslint-plugin-import/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estree-walker": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expect-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.1.0.tgz", - "integrity": "sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fastq": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.18.0.tgz", - "integrity": "sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", - "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", - "dev": true, - "license": "ISC" - }, - "node_modules/follow-redirects": { - "version": "1.15.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", - "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "license": "MIT", - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.1.3" - } - }, - "node_modules/form-data": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", - "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/formdata-node": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-6.0.3.tgz", - "integrity": "sha512-8e1++BCiTzUno9v5IZ2J6bv4RU+3UKDmqWUQD0MIMVCd9AdhWkO1gw57oo1mNEX1dMq2EGI+FbWz4B92pscSQg==", - "license": "MIT", - "engines": { - "node": ">= 18" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "license": "ISC" - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/function.prototype.name": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", - "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "functions-have-names": "^1.2.3", - "hasown": "^2.0.2", - "is-callable": "^1.2.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-intrinsic": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", - "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "function-bind": "^1.1.2", - "get-proto": "^1.0.0", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/get-symbol-description": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", - "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-tsconfig": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", - "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globalthis": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", - "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-properties": "^1.2.1", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/globrex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", - "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", - "dev": true, - "license": "MIT" - }, - "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true, - "license": "MIT" - }, - "node_modules/has-bigints": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", - "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", - "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/internal-slot": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", - "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "hasown": "^2.0.2", - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/is-array-buffer": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", - "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-async-function": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.0.tgz", - "integrity": "sha512-GExz9MtyhlZyXYLxzlJRj5WUCE661zhDa1Yna52CN57AJsymh+DvXXjyveSioqSRdxvUrdKdvqB1b5cVKsNpWQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "get-proto": "^1.0.1", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-bigint": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", - "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-bigints": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-boolean-object": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.1.tgz", - "integrity": "sha512-l9qO6eFlUETHtuihLcYOaLKByJ1f+N4kthcU9YjHy3N+B3hWv0y/2Nd0mu/7lTFnRQHTrSdXF50HQ3bl5fEnng==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-bun-module": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-1.3.0.tgz", - "integrity": "sha512-DgXeu5UWI0IsMQundYb5UAOzm6G2eVnarJ0byP6Tm55iZNKceD59LNPA2L4VvsScTtHcw0yEkVwSf7PC+QoLSA==", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.6.3" - } - }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-core-module": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", - "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-data-view": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", - "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-date-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", - "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-finalizationregistry": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", - "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-generator-function": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", - "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "get-proto": "^1.0.0", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", - "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-number-object": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", - "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-regex": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", - "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-set": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", - "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", - "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-string": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", - "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-symbol": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", - "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "has-symbols": "^1.1.0", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", - "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "which-typed-array": "^1.1.16" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakmap": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", - "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakref": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.0.tgz", - "integrity": "sha512-SXM8Nwyys6nT5WP6pltOwKytLV7FqQ4UiibxVmW+EIosHcmCqkkjViTb5SNssDlkCiEYRP1/pdWUKVvZBmsR2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakset": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", - "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "license": "MIT" - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/just-extend": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-6.2.0.tgz", - "integrity": "sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw==", - "dev": true, - "license": "MIT" - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/linkify-it": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", - "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "uc.micro": "^2.0.0" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/loupe": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.2.tgz", - "integrity": "sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==", - "dev": true, - "license": "MIT" - }, - "node_modules/lunr": { - "version": "2.3.9", - "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", - "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", - "dev": true, - "license": "MIT" - }, - "node_modules/magic-string": { - "version": "0.30.17", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", - "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0" - } - }, - "node_modules/markdown-it": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", - "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1", - "entities": "^4.4.0", - "linkify-it": "^5.0.0", - "mdurl": "^2.0.0", - "punycode.js": "^2.3.1", - "uc.micro": "^2.1.0" - }, - "bin": { - "markdown-it": "bin/markdown-it.mjs" - } - }, - "node_modules/math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/mdast-util-from-markdown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.2.tgz", - "integrity": "sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/mdast": "^4.0.0", - "@types/unist": "^3.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "mdast-util-to-string": "^4.0.0", - "micromark": "^4.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-decode-string": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0", - "unist-util-stringify-position": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdast-util-to-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz", - "integrity": "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/mdast": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdurl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", - "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", - "dev": true, - "license": "MIT" - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromark": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.1.tgz", - "integrity": "sha512-eBPdkcoCNvYcxQOAKAlceo5SNdzZWfF+FcSupREAzdAh9rRmE239CEQAiTwIgblwnoM8zzj35sZ5ZwvSEOF6Kw==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "@types/debug": "^4.0.0", - "debug": "^4.0.0", - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "micromark-core-commonmark": "^2.0.0", - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-chunked": "^2.0.0", - "micromark-util-combine-extensions": "^2.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-encode": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-resolve-all": "^2.0.0", - "micromark-util-sanitize-uri": "^2.0.0", - "micromark-util-subtokenize": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-core-commonmark": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.2.tgz", - "integrity": "sha512-FKjQKbxd1cibWMM1P9N+H8TwlgGgSkWZMmfuVucLCHaYqeSvJ0hFeHsIa65pA2nYbes0f8LDHPMrd9X7Ujxg9w==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "decode-named-character-reference": "^1.0.0", - "devlop": "^1.0.0", - "micromark-factory-destination": "^2.0.0", - "micromark-factory-label": "^2.0.0", - "micromark-factory-space": "^2.0.0", - "micromark-factory-title": "^2.0.0", - "micromark-factory-whitespace": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-chunked": "^2.0.0", - "micromark-util-classify-character": "^2.0.0", - "micromark-util-html-tag-name": "^2.0.0", - "micromark-util-normalize-identifier": "^2.0.0", - "micromark-util-resolve-all": "^2.0.0", - "micromark-util-subtokenize": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-factory-destination": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.1.tgz", - "integrity": "sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-factory-label": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-2.0.1.tgz", - "integrity": "sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "devlop": "^1.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-factory-space": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz", - "integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-factory-title": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-2.0.1.tgz", - "integrity": "sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-factory-whitespace": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.1.tgz", - "integrity": "sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-factory-space": "^2.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-util-character": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", - "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-util-chunked": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-2.0.1.tgz", - "integrity": "sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^2.0.0" - } - }, - "node_modules/micromark-util-classify-character": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-2.0.1.tgz", - "integrity": "sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-util-combine-extensions": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.1.tgz", - "integrity": "sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-chunked": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-util-decode-numeric-character-reference": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.2.tgz", - "integrity": "sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^2.0.0" - } - }, - "node_modules/micromark-util-decode-string": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-2.0.1.tgz", - "integrity": "sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "decode-named-character-reference": "^1.0.0", - "micromark-util-character": "^2.0.0", - "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-symbol": "^2.0.0" - } - }, - "node_modules/micromark-util-encode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz", - "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-util-html-tag-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.1.tgz", - "integrity": "sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-util-normalize-identifier": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.1.tgz", - "integrity": "sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^2.0.0" - } - }, - "node_modules/micromark-util-resolve-all": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.1.tgz", - "integrity": "sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-util-sanitize-uri": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz", - "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-encode": "^2.0.0", - "micromark-util-symbol": "^2.0.0" - } - }, - "node_modules/micromark-util-subtokenize": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-2.0.3.tgz", - "integrity": "sha512-VXJJuNxYWSoYL6AJ6OQECCFGhIU2GGHMw8tahogePBrjkG8aCCas3ibkp7RnVOSTClg2is05/R7maAhF1XyQMg==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "devlop": "^1.0.0", - "micromark-util-chunked": "^2.0.0", - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-util-symbol": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", - "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-util-types": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.1.tgz", - "integrity": "sha512-534m2WhVTddrcKVepwmVEVnUAmtrx9bfIjNoQHRqfnvdaHQiFytEhJoTgpWJvDEXCO5gLTQh3wYC1PgOJA4NSQ==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/mime/-/mime-4.0.6.tgz", - "integrity": "sha512-4rGt7rvQHBbaSOF9POGkk1ocRP16Md1x36Xma8sz8h8/vfCUI2OtEIeCqe4Ofes853x4xDoPiFLIT47J5fI/7A==", - "funding": [ - "https://github.com/sponsors/broofa" - ], - "license": "MIT", - "bin": { - "mime": "bin/cli.js" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/nanoid": { - "version": "3.3.8", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", - "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT" - }, - "node_modules/nise": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/nise/-/nise-6.1.1.tgz", - "integrity": "sha512-aMSAzLVY7LyeM60gvBS423nBmIPP+Wy7St7hsb+8/fc1HmeoHJfLO8CKse4u3BtOZvQLJghYPI2i/1WZrEj5/g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^3.0.1", - "@sinonjs/fake-timers": "^13.0.1", - "@sinonjs/text-encoding": "^0.7.3", - "just-extend": "^6.2.0", - "path-to-regexp": "^8.1.0" - } - }, - "node_modules/nise/node_modules/@sinonjs/fake-timers": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-13.0.5.tgz", - "integrity": "sha512-36/hTbH2uaWuGVERyC6da9YwGWnzUZXuPro/F2LfsdOsLnCojz/iSH8MxUt/FD2S5XBSVPhmArFUXcpCQ2Hkiw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^3.0.1" - } - }, - "node_modules/object-inspect": { - "version": "1.13.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", - "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.7", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", - "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0", - "has-symbols": "^1.1.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.entries": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.8.tgz", - "integrity": "sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.fromentries": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", - "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.groupby": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", - "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.values": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", - "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/own-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", - "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.6", - "object-keys": "^1.1.1", - "safe-push-apply": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, - "license": "MIT" - }, - "node_modules/path-to-regexp": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.2.0.tgz", - "integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - } - }, - "node_modules/pathe": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", - "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/pathval": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz", - "integrity": "sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14.16" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/possible-typed-array-names": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", - "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/postcss": { - "version": "8.4.49", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", - "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "nanoid": "^3.3.7", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", - "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/prettier-plugin-jsdoc": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/prettier-plugin-jsdoc/-/prettier-plugin-jsdoc-1.3.2.tgz", - "integrity": "sha512-LNi9eq0TjyZn/PUNf/SYQxxUvGg5FLK4alEbi3i/S+2JbMyTu790c/puFueXzx09KP44oWCJ+TaHRyM/a0rKJQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-searching": "^2.0.5", - "comment-parser": "^1.4.0", - "mdast-util-from-markdown": "^2.0.0" - }, - "engines": { - "node": ">=14.13.1 || >=16.0.0" - }, - "peerDependencies": { - "prettier": "^3.0.0" - } - }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "license": "MIT" - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/punycode.js": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", - "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/reflect.getprototypeof": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", - "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.9", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.7", - "get-proto": "^1.0.1", - "which-builtin-type": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", - "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "set-function-name": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve": { - "version": "1.22.10", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", - "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.16.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rollup": { - "version": "4.30.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.30.0.tgz", - "integrity": "sha512-sDnr1pcjTgUT69qBksNF1N1anwfbyYG6TBQ22b03bII8EdiUQ7J0TlozVaTMjT/eEJAO49e1ndV7t+UZfL1+vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "1.0.6" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.30.0", - "@rollup/rollup-android-arm64": "4.30.0", - "@rollup/rollup-darwin-arm64": "4.30.0", - "@rollup/rollup-darwin-x64": "4.30.0", - "@rollup/rollup-freebsd-arm64": "4.30.0", - "@rollup/rollup-freebsd-x64": "4.30.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.30.0", - "@rollup/rollup-linux-arm-musleabihf": "4.30.0", - "@rollup/rollup-linux-arm64-gnu": "4.30.0", - "@rollup/rollup-linux-arm64-musl": "4.30.0", - "@rollup/rollup-linux-loongarch64-gnu": "4.30.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.30.0", - "@rollup/rollup-linux-riscv64-gnu": "4.30.0", - "@rollup/rollup-linux-s390x-gnu": "4.30.0", - "@rollup/rollup-linux-x64-gnu": "4.30.0", - "@rollup/rollup-linux-x64-musl": "4.30.0", - "@rollup/rollup-win32-arm64-msvc": "4.30.0", - "@rollup/rollup-win32-ia32-msvc": "4.30.0", - "@rollup/rollup-win32-x64-msvc": "4.30.0", - "fsevents": "~2.3.2" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-array-concat": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", - "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "has-symbols": "^1.1.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-push-apply": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", - "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-regex-test": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", - "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-regex": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-function-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", - "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-proto": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", - "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/side-channel": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", - "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3", - "side-channel-list": "^1.0.0", - "side-channel-map": "^1.0.1", - "side-channel-weakmap": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-list": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", - "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", - "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-weakmap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", - "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3", - "side-channel-map": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/siginfo": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", - "dev": true, - "license": "ISC" - }, - "node_modules/sinon": { - "version": "18.0.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-18.0.1.tgz", - "integrity": "sha512-a2N2TDY1uGviajJ6r4D1CyRAkzE9NNVlYOV1wX5xQDuAk0ONgzgRl0EjCQuRCPxOwp13ghsMwt9Gdldujs39qw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^3.0.1", - "@sinonjs/fake-timers": "11.2.2", - "@sinonjs/samsam": "^8.0.0", - "diff": "^5.2.0", - "nise": "^6.0.0", - "supports-color": "^7" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/sinon" - } - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/stable-hash": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.4.tgz", - "integrity": "sha512-LjdcbuBeLcdETCrPn9i8AYAZ1eCtu4ECAWtP7UleOiZ9LzVxRzzUZEoZ8zB24nhkQnDWyET0I+3sWokSDS3E7g==", - "dev": true, - "license": "MIT" - }, - "node_modules/stackback": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", - "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", - "dev": true, - "license": "MIT" - }, - "node_modules/std-env": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.0.tgz", - "integrity": "sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==", - "dev": true, - "license": "MIT" - }, - "node_modules/string.prototype.trim": { - "version": "1.2.10", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", - "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "define-data-property": "^1.1.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-object-atoms": "^1.0.0", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", - "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", - "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "license": "MIT" - }, - "node_modules/tinybench": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", - "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", - "dev": true, - "license": "MIT" - }, - "node_modules/tinyexec": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", - "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", - "dev": true, - "license": "MIT" - }, - "node_modules/tinypool": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.2.tgz", - "integrity": "sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.0.0 || >=20.0.0" - } - }, - "node_modules/tinyrainbow": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-1.2.0.tgz", - "integrity": "sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/tinyspy": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.2.tgz", - "integrity": "sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/ts-api-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", - "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "typescript": ">=4.2.0" - } - }, - "node_modules/tsconfck": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-3.1.4.tgz", - "integrity": "sha512-kdqWFGVJqe+KGYvlSO9NIaWn9jT1Ny4oKVzAJsKii5eoE9snzTJzL4+MMVOMn+fikWGFmKEylcXL710V/kIPJQ==", - "dev": true, - "license": "MIT", - "bin": { - "tsconfck": "bin/tsconfck.js" - }, - "engines": { - "node": "^18 || >=20" - }, - "peerDependencies": { - "typescript": "^5.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/tsconfig-paths": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", - "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - } - }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typed-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", - "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/typed-array-byte-length": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", - "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-byte-offset": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", - "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.15", - "reflect.getprototypeof": "^1.0.9" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-length": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz", - "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "is-typed-array": "^1.1.13", - "possible-typed-array-names": "^1.0.0", - "reflect.getprototypeof": "^1.0.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typedoc": { - "version": "0.27.6", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.27.6.tgz", - "integrity": "sha512-oBFRoh2Px6jFx366db0lLlihcalq/JzyCVp7Vaq1yphL/tbgx2e+bkpkCgJPunaPvPwoTOXSwasfklWHm7GfAw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@gerrit0/mini-shiki": "^1.24.0", - "lunr": "^2.3.9", - "markdown-it": "^14.1.0", - "minimatch": "^9.0.5", - "yaml": "^2.6.1" - }, - "bin": { - "typedoc": "bin/typedoc" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x" - } - }, - "node_modules/typescript": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", - "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/uc.micro": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", - "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", - "dev": true, - "license": "MIT" - }, - "node_modules/unbox-primitive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", - "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-bigints": "^1.0.2", - "has-symbols": "^1.1.0", - "which-boxed-primitive": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true, - "license": "MIT" - }, - "node_modules/unist-util-stringify-position": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", - "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/vite": { - "version": "5.4.11", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", - "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "^0.21.3", - "postcss": "^8.4.43", - "rollup": "^4.20.0" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^18.0.0 || >=20.0.0", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "sass-embedded": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - } - } - }, - "node_modules/vite-node": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.8.tgz", - "integrity": "sha512-uPAwSr57kYjAUux+8E2j0q0Fxpn8M9VoyfGiRI8Kfktz9NcYMCenwY5RnZxnF1WTu3TGiYipirIzacLL3VVGFg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cac": "^6.7.14", - "debug": "^4.3.7", - "es-module-lexer": "^1.5.4", - "pathe": "^1.1.2", - "vite": "^5.0.0" - }, - "bin": { - "vite-node": "vite-node.mjs" - }, - "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/vite-tsconfig-paths": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-5.1.4.tgz", - "integrity": "sha512-cYj0LRuLV2c2sMqhqhGpaO3LretdtMn/BVX4cPLanIZuwwrkVl+lK84E/miEXkCHWXuq65rhNN4rXsBcOB3S4w==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.1.1", - "globrex": "^0.1.2", - "tsconfck": "^3.0.3" - }, - "peerDependencies": { - "vite": "*" - }, - "peerDependenciesMeta": { - "vite": { - "optional": true - } - } - }, - "node_modules/vitest": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.8.tgz", - "integrity": "sha512-1vBKTZskHw/aosXqQUlVWWlGUxSJR8YtiyZDJAFeW2kPAeX6S3Sool0mjspO+kXLuxVWlEDDowBAeqeAQefqLQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/expect": "2.1.8", - "@vitest/mocker": "2.1.8", - "@vitest/pretty-format": "^2.1.8", - "@vitest/runner": "2.1.8", - "@vitest/snapshot": "2.1.8", - "@vitest/spy": "2.1.8", - "@vitest/utils": "2.1.8", - "chai": "^5.1.2", - "debug": "^4.3.7", - "expect-type": "^1.1.0", - "magic-string": "^0.30.12", - "pathe": "^1.1.2", - "std-env": "^3.8.0", - "tinybench": "^2.9.0", - "tinyexec": "^0.3.1", - "tinypool": "^1.0.1", - "tinyrainbow": "^1.2.0", - "vite": "^5.0.0", - "vite-node": "2.1.8", - "why-is-node-running": "^2.3.0" - }, - "bin": { - "vitest": "vitest.mjs" - }, - "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "@edge-runtime/vm": "*", - "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "2.1.8", - "@vitest/ui": "2.1.8", - "happy-dom": "*", - "jsdom": "*" - }, - "peerDependenciesMeta": { - "@edge-runtime/vm": { - "optional": true - }, - "@types/node": { - "optional": true - }, - "@vitest/browser": { - "optional": true - }, - "@vitest/ui": { - "optional": true - }, - "happy-dom": { - "optional": true - }, - "jsdom": { - "optional": true - } - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/which-boxed-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", - "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-bigint": "^1.1.0", - "is-boolean-object": "^1.2.1", - "is-number-object": "^1.1.1", - "is-string": "^1.1.1", - "is-symbol": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-builtin-type": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", - "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "function.prototype.name": "^1.1.6", - "has-tostringtag": "^1.0.2", - "is-async-function": "^2.0.0", - "is-date-object": "^1.1.0", - "is-finalizationregistry": "^1.1.0", - "is-generator-function": "^1.0.10", - "is-regex": "^1.2.1", - "is-weakref": "^1.0.2", - "isarray": "^2.0.5", - "which-boxed-primitive": "^1.1.0", - "which-collection": "^1.0.2", - "which-typed-array": "^1.1.16" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-collection": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", - "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-map": "^2.0.3", - "is-set": "^2.0.3", - "is-weakmap": "^2.0.2", - "is-weakset": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.18.tgz", - "integrity": "sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==", - "dev": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/why-is-node-running": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", - "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "siginfo": "^2.0.0", - "stackback": "0.0.2" - }, - "bin": { - "why-is-node-running": "cli.js" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/yaml": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", - "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", - "dev": true, - "license": "ISC", - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - } -} diff --git a/package.json b/package.json index 70b30e9424..584564535a 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { "name": "jira.js", - "version": "4.0.5", + "version": "5.0.0", "description": "A comprehensive JavaScript/TypeScript library designed for both Node.JS and browsers, facilitating seamless interaction with the Atlassian Jira API.", - "main": "out/index.js", - "types": "out/index.d.ts", "repository": "https://github.com/MrRefactoring/jira.js.git", + "homepage": "https://mrrefactoring.github.io/jira.js", "author": "Vladislav Tupikin ", "license": "MIT", + "type": "module", "keywords": [ "jira", "javascript", @@ -16,28 +16,54 @@ "atlassian", "api", "client", - "library" + "library", + "jira-api", + "jira-cloud", + "jira-rest", + "jira-client", + "jira-integration", + "jira-sdk", + "api-client", + "rest-client", + "http-client", + "esm", + "cjs", + "axios" ], + "engines": { + "node": ">=20.0.0" + }, + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.esm.js", + "require": "./dist/index.cjs.js" + } + }, "scripts": { - "build": "tsc", + "build": "pnpm run build:src && pnpm run build:tests", + "build:src": "rollup -c rollup.config.ts --configPlugin typescript", + "build:tests": "tsc --project tests/tsconfig.json", "prettier": "prettier --write src", - "lint": "npm run lint:tests && npm run lint:examples && npm run lint:src:agile && npm run lint:src:clients && npm run lint:src:services && npm run lint:src:version2 && npm run lint:src:version3 && npm run lint:src:files", - "lint:tests": "npm run lint:base -- tests", - "lint:examples": "npm run lint:base -- examples", - "lint:src:agile": "npm run lint:base -- src/agile", - "lint:src:clients": "npm run lint:base -- src/clients", - "lint:src:services": "npm run lint:base -- src/services", - "lint:src:version2": "npm run lint:base -- src/version2", - "lint:src:version3": "npm run lint:base -- src/version3", - "lint:src:serviceDesk": "npm run lint:base -- src/serviceDesk", - "lint:src:files": "npm run lint:base -- src/*.ts", + "lint": "pnpm run lint:tests && pnpm run lint:examples && pnpm run lint:src:agile && pnpm run lint:src:clients && pnpm run lint:src:services && pnpm run lint:src:version2 && pnpm run lint:src:version3 && pnpm run lint:src:files", + "lint:tests": "pnpm run lint:base tests", + "lint:examples": "pnpm run lint:base examples", + "lint:src:agile": "pnpm run lint:base src/agile", + "lint:src:clients": "pnpm run lint:base src/clients", + "lint:src:services": "pnpm run lint:base src/services", + "lint:src:version2": "pnpm run lint:base src/version2", + "lint:src:version3": "pnpm run lint:base src/version3", + "lint:src:serviceDesk": "pnpm run lint:base src/serviceDesk", + "lint:src:files": "pnpm run lint:base src/*.ts", "lint:base": "eslint --ext .ts", - "lint:fix": "npm run lint:tests -- --fix && npm run lint:examples -- --fix && npm run lint:src:agile -- --fix && npm run lint:src:clients -- --fix && npm run lint:src:services -- --fix && npm run lint:src:version2 -- --fix && npm run lint:src:version3 -- --fix && npm run lint:src:serviceDesk -- --fix && npm run lint:src:files -- --fix", - "doc": "typedoc --name \"Jira.js - Jira Cloud API library\" --out docs ./src/index.ts --favicon ./assets/favicon.svg", - "test": "npm run test:unit && npm run test:integration", - "test:unit": "vitest run tests/unit --maxWorkers=8 --sequence.concurrent", + "lint:fix": "pnpm run lint:tests --fix && pnpm run lint:examples --fix && pnpm run lint:src:agile --fix && pnpm run lint:src:clients --fix && pnpm run lint:src:services --fix && pnpm run lint:src:version2 --fix && pnpm run lint:src:version3 --fix && pnpm run lint:src:serviceDesk --fix && pnpm run lint:src:files --fix", + "doc": "typedoc --name \"Jira.js - Jira Cloud API library\" --out docs ./src/index.ts --favicon https://bad37fb3-cb50-4e0b-9035-a3e09e8afb3b.selstorage.ru/jira.js%2Ffavicon.svg", + "test": "pnpm run build:tests && pnpm run test:unit && pnpm run test:integration", + "test:unit": "vitest run tests/unit --minWorkers=1 --maxWorkers=8 --sequence.concurrent", "test:integration": "vitest run tests/integration --bail=1 --no-file-parallelism --max-concurrency 1 -c vitest.config.mts --hookTimeout 100000 --testTimeout 100000", - "replace:all": "npm run replace:permissions:version2 && npm run replace:permissions:version3 && npm run replace:pagination:version2 && npm run replace:pagination:version3 && npm run replace:async:version2 && npm run replace:async:version3 && npm run replace:expansion:version2 && npm run replace:expansion:version3 && npm run replace:ordering:version2 && npm run replace:ordering:version3 && npm run replace:groupMember:version2 && npm run replace:workflowPaginated:version2", + "replace:all": "pnpm run replace:permissions:version2 && pnpm run replace:permissions:version3 && pnpm run replace:pagination:version2 && pnpm run replace:pagination:version3 && pnpm run replace:async:version2 && pnpm run replace:async:version3 && pnpm run replace:expansion:version2 && pnpm run replace:expansion:version3 && pnpm run replace:ordering:version2 && pnpm run replace:ordering:version3 && pnpm run replace:groupMember:version2 && pnpm run replace:workflowPaginated:version2 && pnpm run replace:attachment:serviceDesk && pnpm run replace:priority:version3 && pnpm run replace:projectAvatar:version3 && pnpm run replace:issueType:version3", "replace:permissions:version2": "grep -rl \"(#permissions)\" ./src/version2 | xargs sed -i '' 's/(#permissions)/(https:\\/\\/developer.atlassian.com\\/cloud\\/jira\\/platform\\/rest\\/v2\\/intro\\/#permissions)/g'", "replace:permissions:version3": "grep -rl \"(#permissions)\" ./src/version3 | xargs sed -i '' 's/(#permissions)/(https:\\/\\/developer.atlassian.com\\/cloud\\/jira\\/platform\\/rest\\/v3\\/intro\\/#permissions)/g'", "replace:pagination:version2": "grep -rl \"(#pagination)\" ./src/version2 | xargs sed -i '' 's/(#pagination)/(https:\\/\\/developer.atlassian.com\\/cloud\\/jira\\/platform\\/rest\\/v2\\/intro\\/#pagination)/g'", @@ -50,30 +76,37 @@ "replace:ordering:version3": "grep -rl \"(#ordering)\" ./src/version3 | xargs sed -i '' 's/(#ordering)/(https:\\/\\/developer.atlassian.com\\/cloud\\/jira\\/platform\\/rest\\/v3\\/intro\\/#ordering)/g'", "replace:groupMember:version2": "grep -rl \"(#api-rest-api-2-group-member-get)\" ./src/version2 | xargs sed -i '' 's/(#api-rest-api-2-group-member-get)/(https:\\/\\/developer.atlassian.com\\/cloud\\/jira\\/platform\\/rest\\/v2\\/api-group-groups\\/#api-rest-api-2-group-member-get)/g'", "replace:workflowPaginated:version2": "grep -rl \"(#api-rest-api-2-workflow-search-get)\" ./src/version2 | xargs sed -i '' 's/(#api-rest-api-2-workflow-search-get)/(https:\\/\\/developer.atlassian.com\\/cloud\\/jira\\/platform\\/rest\\/v2\\/api-group-workflows\\/#api-rest-api-2-workflow-search-get)/g'", - "code:formatting": "npm run replace:all && npm run prettier && npm run lint:fix" + "replace:attachment:serviceDesk": "grep -rl \"(#api-request-issueIdOrKey-attachment-post)\" ./src/serviceDesk | xargs sed -i '' 's/(#api-request-issueIdOrKey-attachment-post)/(https:\\/\\/developer.atlassian.com\\/cloud\\/jira\\/service-desk\\/rest\\/api-group-servicedesk\\/#api-rest-servicedeskapi-servicedesk-servicedeskid-attachtemporaryfile-post)/g'", + "replace:priority:version3": "grep -rl \"(#api-rest-api-3-priority-id-put)\" ./src/version3 | xargs sed -i '' 's/(#api-rest-api-3-priority-id-put)/(https:\\/\\/developer.atlassian.com\\/cloud\\/jira\\/platform\\/rest\\/v3\\/api-group-issue-priorities\\/#api-rest-api-3-priority-id-put)/g'", + "replace:projectAvatar:version3": "grep -rl \"(#api-rest-api-3-project-projectIdOrKey-avatar-put)\" ./src/version3 | xargs sed -i '' 's/(#api-rest-api-3-project-projectIdOrKey-avatar-put)/(https:\\/\\/developer.atlassian.com\\/cloud\\/jira\\/platform\\/rest\\/v3\\/api-group-project-avatars\\/#api-rest-api-3-project-projectidorkey-avatar-put)/g'", + "replace:issueType:version3": "grep -rl \"(#api-rest-api-3-issuetype-id-put)\" ./src/version3 | xargs sed -i '' 's/(#api-rest-api-3-issuetype-id-put)/(https:\\/\\/developer.atlassian.com\\/cloud\\/jira\\/platform\\/rest\\/v3\\/api-group-issue-types\\/#api-rest-api-3-issuetype-id-put)/g'", + "code:formatting": "pnpm run replace:all && pnpm run prettier && pnpm run lint:fix" + }, + "dependencies": { + "axios": "^1.9.0", + "mime": "^4.0.7", + "zod": "^3.24.3" }, "devDependencies": { - "@types/node": "^18.19.70", - "@types/sinon": "^17.0.3", - "@typescript-eslint/eslint-plugin": "^8.19.0", - "@typescript-eslint/parser": "^8.19.0", - "dotenv": "^16.4.7", - "eslint": "^8.57.1", - "eslint-config-airbnb-base": "^15.0.0", - "eslint-import-resolver-typescript": "^3.7.0", - "eslint-plugin-import": "^2.31.0", - "prettier": "^3.4.2", + "@eslint/js": "^9.25.1", + "@rollup/plugin-commonjs": "^28.0.3", + "@rollup/plugin-node-resolve": "^16.0.1", + "@rollup/plugin-typescript": "^12.1.2", + "@stylistic/eslint-plugin-js": "^4.2.0", + "@stylistic/eslint-plugin-ts": "^4.2.0", + "@types/node": "^20.17.32", + "@types/sinon": "^17.0.4", + "dotenv": "^16.5.0", + "eslint": "^9.25.1", + "globals": "^16.0.0", + "prettier": "^3.5.3", "prettier-plugin-jsdoc": "^1.3.2", - "sinon": "^18.0.1", - "typedoc": "^0.27.6", - "typescript": "^5.7.2", - "vite-tsconfig-paths": "^5.1.4", - "vitest": "^2.1.8" - }, - "dependencies": { - "axios": "^1.7.9", - "formdata-node": "^6.0.3", - "mime": "^4.0.6", - "tslib": "^2.8.1" + "rollup": "^4.40.1", + "sinon": "^20.0.0", + "tslib": "^2.8.1", + "typedoc": "^0.28.3", + "typescript": "^5.8.3", + "typescript-eslint": "^8.31.1", + "vitest": "^3.1.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000000..3358055b37 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,2875 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + axios: + specifier: ^1.9.0 + version: 1.9.0 + mime: + specifier: ^4.0.7 + version: 4.0.7 + zod: + specifier: ^3.24.3 + version: 3.24.3 + devDependencies: + '@eslint/js': + specifier: ^9.25.1 + version: 9.25.1 + '@rollup/plugin-commonjs': + specifier: ^28.0.3 + version: 28.0.3(rollup@4.40.1) + '@rollup/plugin-node-resolve': + specifier: ^16.0.1 + version: 16.0.1(rollup@4.40.1) + '@rollup/plugin-typescript': + specifier: ^12.1.2 + version: 12.1.2(rollup@4.40.1)(tslib@2.8.1)(typescript@5.8.3) + '@stylistic/eslint-plugin-js': + specifier: ^4.2.0 + version: 4.2.0(eslint@9.25.1) + '@stylistic/eslint-plugin-ts': + specifier: ^4.2.0 + version: 4.2.0(eslint@9.25.1)(typescript@5.8.3) + '@types/node': + specifier: ^20.17.32 + version: 20.17.32 + '@types/sinon': + specifier: ^17.0.4 + version: 17.0.4 + dotenv: + specifier: ^16.5.0 + version: 16.5.0 + eslint: + specifier: ^9.25.1 + version: 9.25.1 + globals: + specifier: ^16.0.0 + version: 16.0.0 + prettier: + specifier: ^3.5.3 + version: 3.5.3 + prettier-plugin-jsdoc: + specifier: ^1.3.2 + version: 1.3.2(prettier@3.5.3) + rollup: + specifier: ^4.40.1 + version: 4.40.1 + sinon: + specifier: ^20.0.0 + version: 20.0.0 + tslib: + specifier: ^2.8.1 + version: 2.8.1 + typedoc: + specifier: ^0.28.3 + version: 0.28.3(typescript@5.8.3) + typescript: + specifier: ^5.8.3 + version: 5.8.3 + typescript-eslint: + specifier: ^8.31.1 + version: 8.31.1(eslint@9.25.1)(typescript@5.8.3) + vitest: + specifier: ^3.1.2 + version: 3.1.2(@types/debug@4.1.12)(@types/node@20.17.32)(yaml@2.7.1) + +packages: + + '@esbuild/aix-ppc64@0.25.3': + resolution: {integrity: sha512-W8bFfPA8DowP8l//sxjJLSLkD8iEjMc7cBVyP+u4cEv9sM7mdUCkgsj+t0n/BWPFtv7WWCN5Yzj0N6FJNUUqBQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.25.3': + resolution: {integrity: sha512-XelR6MzjlZuBM4f5z2IQHK6LkK34Cvv6Rj2EntER3lwCBFdg6h2lKbtRjpTTsdEjD/WSe1q8UyPBXP1x3i/wYQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.25.3': + resolution: {integrity: sha512-PuwVXbnP87Tcff5I9ngV0lmiSu40xw1At6i3GsU77U7cjDDB4s0X2cyFuBiDa1SBk9DnvWwnGvVaGBqoFWPb7A==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.25.3': + resolution: {integrity: sha512-ogtTpYHT/g1GWS/zKM0cc/tIebFjm1F9Aw1boQ2Y0eUQ+J89d0jFY//s9ei9jVIlkYi8AfOjiixcLJSGNSOAdQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.25.3': + resolution: {integrity: sha512-eESK5yfPNTqpAmDfFWNsOhmIOaQA59tAcF/EfYvo5/QWQCzXn5iUSOnqt3ra3UdzBv073ykTtmeLJZGt3HhA+w==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.25.3': + resolution: {integrity: sha512-Kd8glo7sIZtwOLcPbW0yLpKmBNWMANZhrC1r6K++uDR2zyzb6AeOYtI6udbtabmQpFaxJ8uduXMAo1gs5ozz8A==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.25.3': + resolution: {integrity: sha512-EJiyS70BYybOBpJth3M0KLOus0n+RRMKTYzhYhFeMwp7e/RaajXvP+BWlmEXNk6uk+KAu46j/kaQzr6au+JcIw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.25.3': + resolution: {integrity: sha512-Q+wSjaLpGxYf7zC0kL0nDlhsfuFkoN+EXrx2KSB33RhinWzejOd6AvgmP5JbkgXKmjhmpfgKZq24pneodYqE8Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.25.3': + resolution: {integrity: sha512-xCUgnNYhRD5bb1C1nqrDV1PfkwgbswTTBRbAd8aH5PhYzikdf/ddtsYyMXFfGSsb/6t6QaPSzxtbfAZr9uox4A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.25.3': + resolution: {integrity: sha512-dUOVmAUzuHy2ZOKIHIKHCm58HKzFqd+puLaS424h6I85GlSDRZIA5ycBixb3mFgM0Jdh+ZOSB6KptX30DD8YOQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.25.3': + resolution: {integrity: sha512-yplPOpczHOO4jTYKmuYuANI3WhvIPSVANGcNUeMlxH4twz/TeXuzEP41tGKNGWJjuMhotpGabeFYGAOU2ummBw==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.25.3': + resolution: {integrity: sha512-P4BLP5/fjyihmXCELRGrLd793q/lBtKMQl8ARGpDxgzgIKJDRJ/u4r1A/HgpBpKpKZelGct2PGI4T+axcedf6g==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.25.3': + resolution: {integrity: sha512-eRAOV2ODpu6P5divMEMa26RRqb2yUoYsuQQOuFUexUoQndm4MdpXXDBbUoKIc0iPa4aCO7gIhtnYomkn2x+bag==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.25.3': + resolution: {integrity: sha512-ZC4jV2p7VbzTlnl8nZKLcBkfzIf4Yad1SJM4ZMKYnJqZFD4rTI+pBG65u8ev4jk3/MPwY9DvGn50wi3uhdaghg==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.25.3': + resolution: {integrity: sha512-LDDODcFzNtECTrUUbVCs6j9/bDVqy7DDRsuIXJg6so+mFksgwG7ZVnTruYi5V+z3eE5y+BJZw7VvUadkbfg7QA==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.25.3': + resolution: {integrity: sha512-s+w/NOY2k0yC2p9SLen+ymflgcpRkvwwa02fqmAwhBRI3SC12uiS10edHHXlVWwfAagYSY5UpmT/zISXPMW3tQ==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.25.3': + resolution: {integrity: sha512-nQHDz4pXjSDC6UfOE1Fw9Q8d6GCAd9KdvMZpfVGWSJztYCarRgSDfOVBY5xwhQXseiyxapkiSJi/5/ja8mRFFA==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-arm64@0.25.3': + resolution: {integrity: sha512-1QaLtOWq0mzK6tzzp0jRN3eccmN3hezey7mhLnzC6oNlJoUJz4nym5ZD7mDnS/LZQgkrhEbEiTn515lPeLpgWA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.25.3': + resolution: {integrity: sha512-i5Hm68HXHdgv8wkrt+10Bc50zM0/eonPb/a/OFVfB6Qvpiirco5gBA5bz7S2SHuU+Y4LWn/zehzNX14Sp4r27g==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.25.3': + resolution: {integrity: sha512-zGAVApJEYTbOC6H/3QBr2mq3upG/LBEXr85/pTtKiv2IXcgKV0RT0QA/hSXZqSvLEpXeIxah7LczB4lkiYhTAQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.25.3': + resolution: {integrity: sha512-fpqctI45NnCIDKBH5AXQBsD0NDPbEFczK98hk/aa6HJxbl+UtLkJV2+Bvy5hLSLk3LHmqt0NTkKNso1A9y1a4w==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/sunos-x64@0.25.3': + resolution: {integrity: sha512-ROJhm7d8bk9dMCUZjkS8fgzsPAZEjtRJqCAmVgB0gMrvG7hfmPmz9k1rwO4jSiblFjYmNvbECL9uhaPzONMfgA==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.25.3': + resolution: {integrity: sha512-YWcow8peiHpNBiIXHwaswPnAXLsLVygFwCB3A7Bh5jRkIBFWHGmNQ48AlX4xDvQNoMZlPYzjVOQDYEzWCqufMQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.25.3': + resolution: {integrity: sha512-qspTZOIGoXVS4DpNqUYUs9UxVb04khS1Degaw/MnfMe7goQ3lTfQ13Vw4qY/Nj0979BGvMRpAYbs/BAxEvU8ew==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.25.3': + resolution: {integrity: sha512-ICgUR+kPimx0vvRzf+N/7L7tVSQeE3BYY+NhHRHXS1kBuPO7z2+7ea2HbhDyZdTephgvNvKrlDDKUexuCVBVvg==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@eslint-community/eslint-utils@4.6.1': + resolution: {integrity: sha512-KTsJMmobmbrFLe3LDh0PC2FXpcSYJt/MLjlkh/9LEnmKYLSYmT/0EW9JWANjeoemiuZrmogti0tW5Ch+qNUYDw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.12.1': + resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/config-array@0.20.0': + resolution: {integrity: sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/config-helpers@0.2.1': + resolution: {integrity: sha512-RI17tsD2frtDu/3dmI7QRrD4bedNKPM08ziRYaC5AhkGrzIAJelm9kJU1TznK+apx6V+cqRz8tfpEeG3oIyjxw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/core@0.13.0': + resolution: {integrity: sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/eslintrc@3.3.1': + resolution: {integrity: sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/js@9.25.1': + resolution: {integrity: sha512-dEIwmjntEx8u3Uvv+kr3PDeeArL8Hw07H9kyYxCjnM9pBjfEhk6uLXSchxxzgiwtRhhzVzqmUSDFBOi1TuZ7qg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/object-schema@2.1.6': + resolution: {integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/plugin-kit@0.2.8': + resolution: {integrity: sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@gerrit0/mini-shiki@3.3.0': + resolution: {integrity: sha512-frvArO0+s5Viq68uSod5SieLPVM2cLpXoQ1e07lURwgADXpL/MOypM7jPz9otks0g2DIe2YedDAeVrDyYJZRxA==} + + '@humanfs/core@0.19.1': + resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} + engines: {node: '>=18.18.0'} + + '@humanfs/node@0.16.6': + resolution: {integrity: sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==} + engines: {node: '>=18.18.0'} + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/retry@0.3.1': + resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} + engines: {node: '>=18.18'} + + '@humanwhocodes/retry@0.4.2': + resolution: {integrity: sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==} + engines: {node: '>=18.18'} + + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + + '@nodelib/fs.scandir@2.1.5': + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + + '@nodelib/fs.stat@2.0.5': + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + + '@nodelib/fs.walk@1.2.8': + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + + '@rollup/plugin-commonjs@28.0.3': + resolution: {integrity: sha512-pyltgilam1QPdn+Zd9gaCfOLcnjMEJ9gV+bTw6/r73INdvzf1ah9zLIJBm+kW7R6IUFIQ1YO+VqZtYxZNWFPEQ==} + engines: {node: '>=16.0.0 || 14 >= 14.17'} + peerDependencies: + rollup: ^2.68.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/plugin-node-resolve@16.0.1': + resolution: {integrity: sha512-tk5YCxJWIG81umIvNkSod2qK5KyQW19qcBF/B78n1bjtOON6gzKoVeSzAE8yHCZEDmqkHKkxplExA8KzdJLJpA==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.78.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/plugin-typescript@12.1.2': + resolution: {integrity: sha512-cdtSp154H5sv637uMr1a8OTWB0L1SWDSm1rDGiyfcGcvQ6cuTs4MDk2BVEBGysUWago4OJN4EQZqOTl/QY3Jgg==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.14.0||^3.0.0||^4.0.0 + tslib: '*' + typescript: '>=3.7.0' + peerDependenciesMeta: + rollup: + optional: true + tslib: + optional: true + + '@rollup/pluginutils@5.1.4': + resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/rollup-android-arm-eabi@4.40.1': + resolution: {integrity: sha512-kxz0YeeCrRUHz3zyqvd7n+TVRlNyTifBsmnmNPtk3hQURUyG9eAB+usz6DAwagMusjx/zb3AjvDUvhFGDAexGw==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.40.1': + resolution: {integrity: sha512-PPkxTOisoNC6TpnDKatjKkjRMsdaWIhyuMkA4UsBXT9WEZY4uHezBTjs6Vl4PbqQQeu6oION1w2voYZv9yquCw==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.40.1': + resolution: {integrity: sha512-VWXGISWFY18v/0JyNUy4A46KCFCb9NVsH+1100XP31lud+TzlezBbz24CYzbnA4x6w4hx+NYCXDfnvDVO6lcAA==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.40.1': + resolution: {integrity: sha512-nIwkXafAI1/QCS7pxSpv/ZtFW6TXcNUEHAIA9EIyw5OzxJZQ1YDrX+CL6JAIQgZ33CInl1R6mHet9Y/UZTg2Bw==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-arm64@4.40.1': + resolution: {integrity: sha512-BdrLJ2mHTrIYdaS2I99mriyJfGGenSaP+UwGi1kB9BLOCu9SR8ZpbkmmalKIALnRw24kM7qCN0IOm6L0S44iWw==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.40.1': + resolution: {integrity: sha512-VXeo/puqvCG8JBPNZXZf5Dqq7BzElNJzHRRw3vjBE27WujdzuOPecDPc/+1DcdcTptNBep3861jNq0mYkT8Z6Q==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.40.1': + resolution: {integrity: sha512-ehSKrewwsESPt1TgSE/na9nIhWCosfGSFqv7vwEtjyAqZcvbGIg4JAcV7ZEh2tfj/IlfBeZjgOXm35iOOjadcg==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.40.1': + resolution: {integrity: sha512-m39iO/aaurh5FVIu/F4/Zsl8xppd76S4qoID8E+dSRQvTyZTOI2gVk3T4oqzfq1PtcvOfAVlwLMK3KRQMaR8lg==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.40.1': + resolution: {integrity: sha512-Y+GHnGaku4aVLSgrT0uWe2o2Rq8te9hi+MwqGF9r9ORgXhmHK5Q71N757u0F8yU1OIwUIFy6YiJtKjtyktk5hg==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-musl@4.40.1': + resolution: {integrity: sha512-jEwjn3jCA+tQGswK3aEWcD09/7M5wGwc6+flhva7dsQNRZZTe30vkalgIzV4tjkopsTS9Jd7Y1Bsj6a4lzz8gQ==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-loongarch64-gnu@4.40.1': + resolution: {integrity: sha512-ySyWikVhNzv+BV/IDCsrraOAZ3UaC8SZB67FZlqVwXwnFhPihOso9rPOxzZbjp81suB1O2Topw+6Ug3JNegejQ==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-powerpc64le-gnu@4.40.1': + resolution: {integrity: sha512-BvvA64QxZlh7WZWqDPPdt0GH4bznuL6uOO1pmgPnnv86rpUpc8ZxgZwcEgXvo02GRIZX1hQ0j0pAnhwkhwPqWg==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.40.1': + resolution: {integrity: sha512-EQSP+8+1VuSulm9RKSMKitTav89fKbHymTf25n5+Yr6gAPZxYWpj3DzAsQqoaHAk9YX2lwEyAf9S4W8F4l3VBQ==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-riscv64-musl@4.40.1': + resolution: {integrity: sha512-n/vQ4xRZXKuIpqukkMXZt9RWdl+2zgGNx7Uda8NtmLJ06NL8jiHxUawbwC+hdSq1rrw/9CghCpEONor+l1e2gA==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-s390x-gnu@4.40.1': + resolution: {integrity: sha512-h8d28xzYb98fMQKUz0w2fMc1XuGzLLjdyxVIbhbil4ELfk5/orZlSTpF/xdI9C8K0I8lCkq+1En2RJsawZekkg==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.40.1': + resolution: {integrity: sha512-XiK5z70PEFEFqcNj3/zRSz/qX4bp4QIraTy9QjwJAb/Z8GM7kVUsD0Uk8maIPeTyPCP03ChdI+VVmJriKYbRHQ==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-linux-x64-musl@4.40.1': + resolution: {integrity: sha512-2BRORitq5rQ4Da9blVovzNCMaUlyKrzMSvkVR0D4qPuOy/+pMCrh1d7o01RATwVy+6Fa1WBw+da7QPeLWU/1mQ==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-win32-arm64-msvc@4.40.1': + resolution: {integrity: sha512-b2bcNm9Kbde03H+q+Jjw9tSfhYkzrDUf2d5MAd1bOJuVplXvFhWz7tRtWvD8/ORZi7qSCy0idW6tf2HgxSXQSg==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.40.1': + resolution: {integrity: sha512-DfcogW8N7Zg7llVEfpqWMZcaErKfsj9VvmfSyRjCyo4BI3wPEfrzTtJkZG6gKP/Z92wFm6rz2aDO7/JfiR/whA==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.40.1': + resolution: {integrity: sha512-ECyOuDeH3C1I8jH2MK1RtBJW+YPMvSfT0a5NN0nHfQYnDSJ6tUiZH3gzwVP5/Kfh/+Tt7tpWVF9LXNTnhTJ3kA==} + cpu: [x64] + os: [win32] + + '@shikijs/engine-oniguruma@3.3.0': + resolution: {integrity: sha512-l0vIw+GxeNU7uGnsu6B+Crpeqf+WTQ2Va71cHb5ZYWEVEPdfYwY5kXwYqRJwHrxz9WH+pjSpXQz+TJgAsrkA5A==} + + '@shikijs/langs@3.3.0': + resolution: {integrity: sha512-zt6Kf/7XpBQKSI9eqku+arLkAcDQ3NHJO6zFjiChI8w0Oz6Jjjay7pToottjQGjSDCFk++R85643WbyINcuL+g==} + + '@shikijs/themes@3.3.0': + resolution: {integrity: sha512-tXeCvLXBnqq34B0YZUEaAD1lD4lmN6TOHAhnHacj4Owh7Ptb/rf5XCDeROZt2rEOk5yuka3OOW2zLqClV7/SOg==} + + '@shikijs/types@3.3.0': + resolution: {integrity: sha512-KPCGnHG6k06QG/2pnYGbFtFvpVJmC3uIpXrAiPrawETifujPBv0Se2oUxm5qYgjCvGJS9InKvjytOdN+bGuX+Q==} + + '@shikijs/vscode-textmate@10.0.2': + resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} + + '@sinonjs/commons@3.0.1': + resolution: {integrity: sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==} + + '@sinonjs/fake-timers@13.0.5': + resolution: {integrity: sha512-36/hTbH2uaWuGVERyC6da9YwGWnzUZXuPro/F2LfsdOsLnCojz/iSH8MxUt/FD2S5XBSVPhmArFUXcpCQ2Hkiw==} + + '@sinonjs/samsam@8.0.2': + resolution: {integrity: sha512-v46t/fwnhejRSFTGqbpn9u+LQ9xJDse10gNnPgAcxgdoCDMXj/G2asWAC/8Qs+BAZDicX+MNZouXT1A7c83kVw==} + + '@stylistic/eslint-plugin-js@4.2.0': + resolution: {integrity: sha512-MiJr6wvyzMYl/wElmj8Jns8zH7Q1w8XoVtm+WM6yDaTrfxryMyb8n0CMxt82fo42RoLIfxAEtM6tmQVxqhk0/A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: '>=9.0.0' + + '@stylistic/eslint-plugin-ts@4.2.0': + resolution: {integrity: sha512-j2o2GvOx9v66x8hmp/HJ+0T+nOppiO5ycGsCkifh7JPGgjxEhpkGmIGx3RWsoxpWbad3VCX8e8/T8n3+7ze1Zg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: '>=9.0.0' + + '@types/debug@4.1.12': + resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} + + '@types/estree@1.0.7': + resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==} + + '@types/hast@3.0.4': + resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} + + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + + '@types/mdast@4.0.4': + resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} + + '@types/ms@2.1.0': + resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} + + '@types/node@20.17.32': + resolution: {integrity: sha512-zeMXFn8zQ+UkjK4ws0RiOC9EWByyW1CcVmLe+2rQocXRsGEDxUCwPEIVgpsGcLHS/P8JkT0oa3839BRABS0oPw==} + + '@types/resolve@1.20.2': + resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} + + '@types/sinon@17.0.4': + resolution: {integrity: sha512-RHnIrhfPO3+tJT0s7cFaXGZvsL4bbR3/k7z3P312qMS4JaS2Tk+KiwiLx1S0rQ56ERj00u1/BtdyVd0FY+Pdew==} + + '@types/sinonjs__fake-timers@8.1.5': + resolution: {integrity: sha512-mQkU2jY8jJEF7YHjHvsQO8+3ughTL1mcnn96igfhONmR+fUPSKIkefQYpSe8bsly2Ep7oQbn/6VG5/9/0qcArQ==} + + '@types/unist@3.0.3': + resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} + + '@typescript-eslint/eslint-plugin@8.31.1': + resolution: {integrity: sha512-oUlH4h1ABavI4F0Xnl8/fOtML/eu8nI2A1nYd+f+55XI0BLu+RIqKoCiZKNo6DtqZBEQm5aNKA20G3Z5w3R6GQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' + + '@typescript-eslint/parser@8.31.1': + resolution: {integrity: sha512-oU/OtYVydhXnumd0BobL9rkJg7wFJ9bFFPmSmB/bf/XWN85hlViji59ko6bSKBXyseT9V8l+CN1nwmlbiN0G7Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' + + '@typescript-eslint/scope-manager@8.31.0': + resolution: {integrity: sha512-knO8UyF78Nt8O/B64i7TlGXod69ko7z6vJD9uhSlm0qkAbGeRUSudcm0+K/4CrRjrpiHfBCjMWlc08Vav1xwcw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/scope-manager@8.31.1': + resolution: {integrity: sha512-BMNLOElPxrtNQMIsFHE+3P0Yf1z0dJqV9zLdDxN/xLlWMlXK/ApEsVEKzpizg9oal8bAT5Sc7+ocal7AC1HCVw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/type-utils@8.31.1': + resolution: {integrity: sha512-fNaT/m9n0+dpSp8G/iOQ05GoHYXbxw81x+yvr7TArTuZuCA6VVKbqWYVZrV5dVagpDTtj/O8k5HBEE/p/HM5LA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' + + '@typescript-eslint/types@8.31.0': + resolution: {integrity: sha512-Ch8oSjVyYyJxPQk8pMiP2FFGYatqXQfQIaMp+TpuuLlDachRWpUAeEu1u9B/v/8LToehUIWyiKcA/w5hUFRKuQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/types@8.31.1': + resolution: {integrity: sha512-SfepaEFUDQYRoA70DD9GtytljBePSj17qPxFHA/h3eg6lPTqGJ5mWOtbXCk1YrVU1cTJRd14nhaXWFu0l2troQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/typescript-estree@8.31.0': + resolution: {integrity: sha512-xLmgn4Yl46xi6aDSZ9KkyfhhtnYI15/CvHbpOy/eR5NWhK/BK8wc709KKwhAR0m4ZKRP7h07bm4BWUYOCuRpQQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <5.9.0' + + '@typescript-eslint/typescript-estree@8.31.1': + resolution: {integrity: sha512-kaA0ueLe2v7KunYOyWYtlf/QhhZb7+qh4Yw6Ni5kgukMIG+iP773tjgBiLWIXYumWCwEq3nLW+TUywEp8uEeag==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <5.9.0' + + '@typescript-eslint/utils@8.31.0': + resolution: {integrity: sha512-qi6uPLt9cjTFxAb1zGNgTob4x9ur7xC6mHQJ8GwEzGMGE9tYniublmJaowOJ9V2jUzxrltTPfdG2nKlWsq0+Ww==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' + + '@typescript-eslint/utils@8.31.1': + resolution: {integrity: sha512-2DSI4SNfF5T4oRveQ4nUrSjUqjMND0nLq9rEkz0gfGr3tg0S5KB6DhwR+WZPCjzkZl3cH+4x2ce3EsL50FubjQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' + + '@typescript-eslint/visitor-keys@8.31.0': + resolution: {integrity: sha512-QcGHmlRHWOl93o64ZUMNewCdwKGU6WItOU52H0djgNmn1EOrhVudrDzXz4OycCRSCPwFCDrE2iIt5vmuUdHxuQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/visitor-keys@8.31.1': + resolution: {integrity: sha512-I+/rgqOVBn6f0o7NDTmAPWWC6NuqhV174lfYvAm9fUaWeiefLdux9/YI3/nLugEn9L8fcSi0XmpKi/r5u0nmpw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@vitest/expect@3.1.2': + resolution: {integrity: sha512-O8hJgr+zREopCAqWl3uCVaOdqJwZ9qaDwUP7vy3Xigad0phZe9APxKhPcDNqYYi0rX5oMvwJMSCAXY2afqeTSA==} + + '@vitest/mocker@3.1.2': + resolution: {integrity: sha512-kOtd6K2lc7SQ0mBqYv/wdGedlqPdM/B38paPY+OwJ1XiNi44w3Fpog82UfOibmHaV9Wod18A09I9SCKLyDMqgw==} + peerDependencies: + msw: ^2.4.9 + vite: ^5.0.0 || ^6.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/pretty-format@3.1.2': + resolution: {integrity: sha512-R0xAiHuWeDjTSB3kQ3OQpT8Rx3yhdOAIm/JM4axXxnG7Q/fS8XUwggv/A4xzbQA+drYRjzkMnpYnOGAc4oeq8w==} + + '@vitest/runner@3.1.2': + resolution: {integrity: sha512-bhLib9l4xb4sUMPXnThbnhX2Yi8OutBMA8Yahxa7yavQsFDtwY/jrUZwpKp2XH9DhRFJIeytlyGpXCqZ65nR+g==} + + '@vitest/snapshot@3.1.2': + resolution: {integrity: sha512-Q1qkpazSF/p4ApZg1vfZSQ5Yw6OCQxVMVrLjslbLFA1hMDrT2uxtqMaw8Tc/jy5DLka1sNs1Y7rBcftMiaSH/Q==} + + '@vitest/spy@3.1.2': + resolution: {integrity: sha512-OEc5fSXMws6sHVe4kOFyDSj/+4MSwst0ib4un0DlcYgQvRuYQ0+M2HyqGaauUMnjq87tmUaMNDxKQx7wNfVqPA==} + + '@vitest/utils@3.1.2': + resolution: {integrity: sha512-5GGd0ytZ7BH3H6JTj9Kw7Prn1Nbg0wZVrIvou+UWxm54d+WoXXgAgjFJ8wn3LdagWLFSEfpPeyYrByZaGEZHLg==} + + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + + acorn@8.14.1: + resolution: {integrity: sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==} + engines: {node: '>=0.4.0'} + hasBin: true + + ajv@6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + + asynckit@0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + + axios@1.9.0: + resolution: {integrity: sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + binary-searching@2.0.5: + resolution: {integrity: sha512-v4N2l3RxL+m4zDxyxz3Ne2aTmiPn8ZUpKFpdPtO+ItW1NcTCXA7JeHG5GMBSvoKSkQZ9ycS+EouDVxYB9ufKWA==} + + brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + + brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + + cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + + call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} + engines: {node: '>= 0.4'} + + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + + chai@5.2.0: + resolution: {integrity: sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==} + engines: {node: '>=12'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + character-entities@2.0.2: + resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==} + + check-error@2.1.1: + resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} + engines: {node: '>= 16'} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + combined-stream@1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + + comment-parser@1.4.1: + resolution: {integrity: sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==} + engines: {node: '>= 12.0.0'} + + commondir@1.0.1: + resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} + + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + debug@4.4.0: + resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decode-named-character-reference@1.1.0: + resolution: {integrity: sha512-Wy+JTSbFThEOXQIR2L6mxJvEs+veIzpmqD7ynWxMXGpnk3smkHQOp6forLdHsKpAMW9iJpaBBIxz285t1n1C3w==} + + deep-eql@5.0.2: + resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} + engines: {node: '>=6'} + + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + + deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} + + delayed-stream@1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + + dequal@2.0.3: + resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} + engines: {node: '>=6'} + + devlop@1.1.0: + resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} + + diff@7.0.0: + resolution: {integrity: sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==} + engines: {node: '>=0.3.1'} + + dotenv@16.5.0: + resolution: {integrity: sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==} + engines: {node: '>=12'} + + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + + entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + es-module-lexer@1.7.0: + resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} + + es-object-atoms@1.1.1: + resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} + engines: {node: '>= 0.4'} + + es-set-tostringtag@2.1.0: + resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} + engines: {node: '>= 0.4'} + + esbuild@0.25.3: + resolution: {integrity: sha512-qKA6Pvai73+M2FtftpNKRxJ78GIjmFXFxd/1DVBqGo/qNhLSfv+G12n9pNoWdytJC8U00TrViOwpjT0zgqQS8Q==} + engines: {node: '>=18'} + hasBin: true + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + eslint-scope@8.3.0: + resolution: {integrity: sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@4.2.0: + resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint@9.25.1: + resolution: {integrity: sha512-E6Mtz9oGQWDCpV12319d59n4tx9zOTXSTmc8BLVxBx+G/0RdM5MvEEJLU9c0+aleoePYYgVTOsRblx433qmhWQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true + + espree@10.3.0: + resolution: {integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + esquery@1.6.0: + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} + engines: {node: '>=0.10'} + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + + esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + + expect-type@1.2.1: + resolution: {integrity: sha512-/kP8CAwxzLVEeFrMm4kMmy4CCDlpipyA7MYLVrdJIkV0fYF0UaigQHRsxHiuY/GEea+bh4KSv3TIlgr+2UL6bw==} + engines: {node: '>=12.0.0'} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-glob@3.3.3: + resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} + engines: {node: '>=8.6.0'} + + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + + fastq@1.19.1: + resolution: {integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==} + + fdir@6.4.4: + resolution: {integrity: sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} + + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} + + flatted@3.3.3: + resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==} + + follow-redirects@1.15.9: + resolution: {integrity: sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + + form-data@4.0.2: + resolution: {integrity: sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==} + engines: {node: '>= 6'} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} + engines: {node: '>= 0.4'} + + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + + glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + + glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + + globals@16.0.0: + resolution: {integrity: sha512-iInW14XItCXET01CQFqudPOWP2jYMl7T+QRQT+UNcR/iQncN/F0UNpgd76iFkBPgNQb4+X3LV9tLJYzwh+Gl3A==} + engines: {node: '>=18'} + + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + + graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} + + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + + import-fresh@3.3.1: + resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} + engines: {node: '>=6'} + + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + + is-core-module@2.16.1: + resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==} + engines: {node: '>= 0.4'} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-module@1.0.0: + resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} + + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + is-reference@1.2.1: + resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + + linkify-it@5.0.0: + resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + lodash.get@4.4.2: + resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} + deprecated: This package is deprecated. Use the optional chaining (?.) operator instead. + + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + + loupe@3.1.3: + resolution: {integrity: sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==} + + lunr@2.3.9: + resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} + + magic-string@0.30.17: + resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} + + markdown-it@14.1.0: + resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} + hasBin: true + + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + + mdast-util-from-markdown@2.0.2: + resolution: {integrity: sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==} + + mdast-util-to-string@4.0.0: + resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==} + + mdurl@2.0.0: + resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} + + merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + + micromark-core-commonmark@2.0.3: + resolution: {integrity: sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==} + + micromark-factory-destination@2.0.1: + resolution: {integrity: sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==} + + micromark-factory-label@2.0.1: + resolution: {integrity: sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==} + + micromark-factory-space@2.0.1: + resolution: {integrity: sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==} + + micromark-factory-title@2.0.1: + resolution: {integrity: sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==} + + micromark-factory-whitespace@2.0.1: + resolution: {integrity: sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==} + + micromark-util-character@2.1.1: + resolution: {integrity: sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==} + + micromark-util-chunked@2.0.1: + resolution: {integrity: sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==} + + micromark-util-classify-character@2.0.1: + resolution: {integrity: sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==} + + micromark-util-combine-extensions@2.0.1: + resolution: {integrity: sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==} + + micromark-util-decode-numeric-character-reference@2.0.2: + resolution: {integrity: sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==} + + micromark-util-decode-string@2.0.1: + resolution: {integrity: sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==} + + micromark-util-encode@2.0.1: + resolution: {integrity: sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==} + + micromark-util-html-tag-name@2.0.1: + resolution: {integrity: sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==} + + micromark-util-normalize-identifier@2.0.1: + resolution: {integrity: sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==} + + micromark-util-resolve-all@2.0.1: + resolution: {integrity: sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==} + + micromark-util-sanitize-uri@2.0.1: + resolution: {integrity: sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==} + + micromark-util-subtokenize@2.1.0: + resolution: {integrity: sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==} + + micromark-util-symbol@2.0.1: + resolution: {integrity: sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==} + + micromark-util-types@2.0.2: + resolution: {integrity: sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==} + + micromark@4.0.2: + resolution: {integrity: sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==} + + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + + mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + + mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + + mime@4.0.7: + resolution: {integrity: sha512-2OfDPL+e03E0LrXaGYOtTFIYhiuzep94NSsuhrNULq+stylcJedcHdzHtz0atMUuGwJfFYs0YL5xeC/Ca2x0eQ==} + engines: {node: '>=16'} + hasBin: true + + minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} + engines: {node: '>=16 || 14 >=14.17'} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + nanoid@3.3.11: + resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + + pathe@2.0.3: + resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + + pathval@2.0.0: + resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} + engines: {node: '>= 14.16'} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + + picomatch@4.0.2: + resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + engines: {node: '>=12'} + + postcss@8.5.3: + resolution: {integrity: sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==} + engines: {node: ^10 || ^12 || >=14} + + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + + prettier-plugin-jsdoc@1.3.2: + resolution: {integrity: sha512-LNi9eq0TjyZn/PUNf/SYQxxUvGg5FLK4alEbi3i/S+2JbMyTu790c/puFueXzx09KP44oWCJ+TaHRyM/a0rKJQ==} + engines: {node: '>=14.13.1 || >=16.0.0'} + peerDependencies: + prettier: ^3.0.0 + + prettier@3.5.3: + resolution: {integrity: sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==} + engines: {node: '>=14'} + hasBin: true + + proxy-from-env@1.1.0: + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + + punycode.js@2.3.1: + resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} + engines: {node: '>=6'} + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + + resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + + resolve@1.22.10: + resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==} + engines: {node: '>= 0.4'} + hasBin: true + + reusify@1.1.0: + resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + + rollup@4.40.1: + resolution: {integrity: sha512-C5VvvgCCyfyotVITIAv+4efVytl5F7wt+/I2i9q9GZcEXW9BP52YYOXC58igUi+LFZVHukErIIqQSWwv/M3WRw==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + + run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + + semver@7.7.1: + resolution: {integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==} + engines: {node: '>=10'} + hasBin: true + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + + sinon@20.0.0: + resolution: {integrity: sha512-+FXOAbdnj94AQIxH0w1v8gzNxkawVvNqE3jUzRLptR71Oykeu2RrQXXl/VQjKay+Qnh73fDt/oDfMo6xMeDQbQ==} + + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + + std-env@3.9.0: + resolution: {integrity: sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + + tinyexec@0.3.2: + resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + + tinyglobby@0.2.13: + resolution: {integrity: sha512-mEwzpUgrLySlveBwEVDMKk5B57bhLPYovRfPAXD5gA/98Opn0rCDj3GtLwFvCvH5RK9uPCExUROW5NjDwvqkxw==} + engines: {node: '>=12.0.0'} + + tinypool@1.0.2: + resolution: {integrity: sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==} + engines: {node: ^18.0.0 || >=20.0.0} + + tinyrainbow@2.0.0: + resolution: {integrity: sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==} + engines: {node: '>=14.0.0'} + + tinyspy@3.0.2: + resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} + engines: {node: '>=14.0.0'} + + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + + ts-api-utils@2.1.0: + resolution: {integrity: sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + + type-detect@4.0.8: + resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} + engines: {node: '>=4'} + + type-detect@4.1.0: + resolution: {integrity: sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==} + engines: {node: '>=4'} + + typedoc@0.28.3: + resolution: {integrity: sha512-5svOCTfXvVSh6zbZKSQluZhR8yN2tKpTeHZxlmWpE6N5vc3R8k/jhg9nnD6n5tN9/ObuQTojkONrOxFdUFUG9w==} + engines: {node: '>= 18', pnpm: '>= 10'} + hasBin: true + peerDependencies: + typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x + + typescript-eslint@8.31.1: + resolution: {integrity: sha512-j6DsEotD/fH39qKzXTQRwYYWlt7D+0HmfpOK+DVhwJOFLcdmn92hq3mBb7HlKJHbjjI/gTOqEcc9d6JfpFf/VA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' + + typescript@5.8.3: + resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} + engines: {node: '>=14.17'} + hasBin: true + + uc.micro@2.1.0: + resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} + + undici-types@6.19.8: + resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + + unist-util-stringify-position@4.0.0: + resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==} + + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + + vite-node@3.1.2: + resolution: {integrity: sha512-/8iMryv46J3aK13iUXsei5G/A3CUlW4665THCPS+K8xAaqrVWiGB4RfXMQXCLjpK9P2eK//BczrVkn5JLAk6DA==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + + vite@6.3.3: + resolution: {integrity: sha512-5nXH+QsELbFKhsEfWLkHrvgRpTdGJzqOZ+utSdmPTvwHmvU6ITTm3xx+mRusihkcI8GeC7lCDyn3kDtiki9scw==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + jiti: '>=1.21.0' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitest@3.1.2: + resolution: {integrity: sha512-WaxpJe092ID1C0mr+LH9MmNrhfzi8I65EX/NRU/Ld016KqQNRgxSOlGNP1hHN+a/F8L15Mh8klwaF77zR3GeDQ==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/debug': ^4.1.12 + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + '@vitest/browser': 3.1.2 + '@vitest/ui': 3.1.2 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@types/debug': + optional: true + '@types/node': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + + yaml@2.7.1: + resolution: {integrity: sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==} + engines: {node: '>= 14'} + hasBin: true + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + + zod@3.24.3: + resolution: {integrity: sha512-HhY1oqzWCQWuUqvBFnsyrtZRhyPeR7SUGv+C4+MsisMuVfSPx8HpwWqH8tRahSlt6M3PiFAcoeFhZAqIXTxoSg==} + +snapshots: + + '@esbuild/aix-ppc64@0.25.3': + optional: true + + '@esbuild/android-arm64@0.25.3': + optional: true + + '@esbuild/android-arm@0.25.3': + optional: true + + '@esbuild/android-x64@0.25.3': + optional: true + + '@esbuild/darwin-arm64@0.25.3': + optional: true + + '@esbuild/darwin-x64@0.25.3': + optional: true + + '@esbuild/freebsd-arm64@0.25.3': + optional: true + + '@esbuild/freebsd-x64@0.25.3': + optional: true + + '@esbuild/linux-arm64@0.25.3': + optional: true + + '@esbuild/linux-arm@0.25.3': + optional: true + + '@esbuild/linux-ia32@0.25.3': + optional: true + + '@esbuild/linux-loong64@0.25.3': + optional: true + + '@esbuild/linux-mips64el@0.25.3': + optional: true + + '@esbuild/linux-ppc64@0.25.3': + optional: true + + '@esbuild/linux-riscv64@0.25.3': + optional: true + + '@esbuild/linux-s390x@0.25.3': + optional: true + + '@esbuild/linux-x64@0.25.3': + optional: true + + '@esbuild/netbsd-arm64@0.25.3': + optional: true + + '@esbuild/netbsd-x64@0.25.3': + optional: true + + '@esbuild/openbsd-arm64@0.25.3': + optional: true + + '@esbuild/openbsd-x64@0.25.3': + optional: true + + '@esbuild/sunos-x64@0.25.3': + optional: true + + '@esbuild/win32-arm64@0.25.3': + optional: true + + '@esbuild/win32-ia32@0.25.3': + optional: true + + '@esbuild/win32-x64@0.25.3': + optional: true + + '@eslint-community/eslint-utils@4.6.1(eslint@9.25.1)': + dependencies: + eslint: 9.25.1 + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.1': {} + + '@eslint/config-array@0.20.0': + dependencies: + '@eslint/object-schema': 2.1.6 + debug: 4.4.0 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + + '@eslint/config-helpers@0.2.1': {} + + '@eslint/core@0.13.0': + dependencies: + '@types/json-schema': 7.0.15 + + '@eslint/eslintrc@3.3.1': + dependencies: + ajv: 6.12.6 + debug: 4.4.0 + espree: 10.3.0 + globals: 14.0.0 + ignore: 5.3.2 + import-fresh: 3.3.1 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/js@9.25.1': {} + + '@eslint/object-schema@2.1.6': {} + + '@eslint/plugin-kit@0.2.8': + dependencies: + '@eslint/core': 0.13.0 + levn: 0.4.1 + + '@gerrit0/mini-shiki@3.3.0': + dependencies: + '@shikijs/engine-oniguruma': 3.3.0 + '@shikijs/langs': 3.3.0 + '@shikijs/themes': 3.3.0 + '@shikijs/types': 3.3.0 + '@shikijs/vscode-textmate': 10.0.2 + + '@humanfs/core@0.19.1': {} + + '@humanfs/node@0.16.6': + dependencies: + '@humanfs/core': 0.19.1 + '@humanwhocodes/retry': 0.3.1 + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/retry@0.3.1': {} + + '@humanwhocodes/retry@0.4.2': {} + + '@jridgewell/sourcemap-codec@1.5.0': {} + + '@nodelib/fs.scandir@2.1.5': + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + + '@nodelib/fs.stat@2.0.5': {} + + '@nodelib/fs.walk@1.2.8': + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.19.1 + + '@rollup/plugin-commonjs@28.0.3(rollup@4.40.1)': + dependencies: + '@rollup/pluginutils': 5.1.4(rollup@4.40.1) + commondir: 1.0.1 + estree-walker: 2.0.2 + fdir: 6.4.4(picomatch@4.0.2) + is-reference: 1.2.1 + magic-string: 0.30.17 + picomatch: 4.0.2 + optionalDependencies: + rollup: 4.40.1 + + '@rollup/plugin-node-resolve@16.0.1(rollup@4.40.1)': + dependencies: + '@rollup/pluginutils': 5.1.4(rollup@4.40.1) + '@types/resolve': 1.20.2 + deepmerge: 4.3.1 + is-module: 1.0.0 + resolve: 1.22.10 + optionalDependencies: + rollup: 4.40.1 + + '@rollup/plugin-typescript@12.1.2(rollup@4.40.1)(tslib@2.8.1)(typescript@5.8.3)': + dependencies: + '@rollup/pluginutils': 5.1.4(rollup@4.40.1) + resolve: 1.22.10 + typescript: 5.8.3 + optionalDependencies: + rollup: 4.40.1 + tslib: 2.8.1 + + '@rollup/pluginutils@5.1.4(rollup@4.40.1)': + dependencies: + '@types/estree': 1.0.7 + estree-walker: 2.0.2 + picomatch: 4.0.2 + optionalDependencies: + rollup: 4.40.1 + + '@rollup/rollup-android-arm-eabi@4.40.1': + optional: true + + '@rollup/rollup-android-arm64@4.40.1': + optional: true + + '@rollup/rollup-darwin-arm64@4.40.1': + optional: true + + '@rollup/rollup-darwin-x64@4.40.1': + optional: true + + '@rollup/rollup-freebsd-arm64@4.40.1': + optional: true + + '@rollup/rollup-freebsd-x64@4.40.1': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.40.1': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.40.1': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.40.1': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.40.1': + optional: true + + '@rollup/rollup-linux-loongarch64-gnu@4.40.1': + optional: true + + '@rollup/rollup-linux-powerpc64le-gnu@4.40.1': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.40.1': + optional: true + + '@rollup/rollup-linux-riscv64-musl@4.40.1': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.40.1': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.40.1': + optional: true + + '@rollup/rollup-linux-x64-musl@4.40.1': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.40.1': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.40.1': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.40.1': + optional: true + + '@shikijs/engine-oniguruma@3.3.0': + dependencies: + '@shikijs/types': 3.3.0 + '@shikijs/vscode-textmate': 10.0.2 + + '@shikijs/langs@3.3.0': + dependencies: + '@shikijs/types': 3.3.0 + + '@shikijs/themes@3.3.0': + dependencies: + '@shikijs/types': 3.3.0 + + '@shikijs/types@3.3.0': + dependencies: + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + + '@shikijs/vscode-textmate@10.0.2': {} + + '@sinonjs/commons@3.0.1': + dependencies: + type-detect: 4.0.8 + + '@sinonjs/fake-timers@13.0.5': + dependencies: + '@sinonjs/commons': 3.0.1 + + '@sinonjs/samsam@8.0.2': + dependencies: + '@sinonjs/commons': 3.0.1 + lodash.get: 4.4.2 + type-detect: 4.1.0 + + '@stylistic/eslint-plugin-js@4.2.0(eslint@9.25.1)': + dependencies: + eslint: 9.25.1 + eslint-visitor-keys: 4.2.0 + espree: 10.3.0 + + '@stylistic/eslint-plugin-ts@4.2.0(eslint@9.25.1)(typescript@5.8.3)': + dependencies: + '@typescript-eslint/utils': 8.31.0(eslint@9.25.1)(typescript@5.8.3) + eslint: 9.25.1 + eslint-visitor-keys: 4.2.0 + espree: 10.3.0 + transitivePeerDependencies: + - supports-color + - typescript + + '@types/debug@4.1.12': + dependencies: + '@types/ms': 2.1.0 + + '@types/estree@1.0.7': {} + + '@types/hast@3.0.4': + dependencies: + '@types/unist': 3.0.3 + + '@types/json-schema@7.0.15': {} + + '@types/mdast@4.0.4': + dependencies: + '@types/unist': 3.0.3 + + '@types/ms@2.1.0': {} + + '@types/node@20.17.32': + dependencies: + undici-types: 6.19.8 + + '@types/resolve@1.20.2': {} + + '@types/sinon@17.0.4': + dependencies: + '@types/sinonjs__fake-timers': 8.1.5 + + '@types/sinonjs__fake-timers@8.1.5': {} + + '@types/unist@3.0.3': {} + + '@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.25.1)(typescript@5.8.3))(eslint@9.25.1)(typescript@5.8.3)': + dependencies: + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 8.31.1(eslint@9.25.1)(typescript@5.8.3) + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/type-utils': 8.31.1(eslint@9.25.1)(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.1(eslint@9.25.1)(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.31.1 + eslint: 9.25.1 + graphemer: 1.4.0 + ignore: 5.3.2 + natural-compare: 1.4.0 + ts-api-utils: 2.1.0(typescript@5.8.3) + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@8.31.1(eslint@9.25.1)(typescript@5.8.3)': + dependencies: + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.31.1 + debug: 4.4.0 + eslint: 9.25.1 + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/scope-manager@8.31.0': + dependencies: + '@typescript-eslint/types': 8.31.0 + '@typescript-eslint/visitor-keys': 8.31.0 + + '@typescript-eslint/scope-manager@8.31.1': + dependencies: + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/visitor-keys': 8.31.1 + + '@typescript-eslint/type-utils@8.31.1(eslint@9.25.1)(typescript@5.8.3)': + dependencies: + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.1(eslint@9.25.1)(typescript@5.8.3) + debug: 4.4.0 + eslint: 9.25.1 + ts-api-utils: 2.1.0(typescript@5.8.3) + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/types@8.31.0': {} + + '@typescript-eslint/types@8.31.1': {} + + '@typescript-eslint/typescript-estree@8.31.0(typescript@5.8.3)': + dependencies: + '@typescript-eslint/types': 8.31.0 + '@typescript-eslint/visitor-keys': 8.31.0 + debug: 4.4.0 + fast-glob: 3.3.3 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.7.1 + ts-api-utils: 2.1.0(typescript@5.8.3) + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/typescript-estree@8.31.1(typescript@5.8.3)': + dependencies: + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/visitor-keys': 8.31.1 + debug: 4.4.0 + fast-glob: 3.3.3 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.7.1 + ts-api-utils: 2.1.0(typescript@5.8.3) + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@8.31.0(eslint@9.25.1)(typescript@5.8.3)': + dependencies: + '@eslint-community/eslint-utils': 4.6.1(eslint@9.25.1) + '@typescript-eslint/scope-manager': 8.31.0 + '@typescript-eslint/types': 8.31.0 + '@typescript-eslint/typescript-estree': 8.31.0(typescript@5.8.3) + eslint: 9.25.1 + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@8.31.1(eslint@9.25.1)(typescript@5.8.3)': + dependencies: + '@eslint-community/eslint-utils': 4.6.1(eslint@9.25.1) + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) + eslint: 9.25.1 + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/visitor-keys@8.31.0': + dependencies: + '@typescript-eslint/types': 8.31.0 + eslint-visitor-keys: 4.2.0 + + '@typescript-eslint/visitor-keys@8.31.1': + dependencies: + '@typescript-eslint/types': 8.31.1 + eslint-visitor-keys: 4.2.0 + + '@vitest/expect@3.1.2': + dependencies: + '@vitest/spy': 3.1.2 + '@vitest/utils': 3.1.2 + chai: 5.2.0 + tinyrainbow: 2.0.0 + + '@vitest/mocker@3.1.2(vite@6.3.3(@types/node@20.17.32)(yaml@2.7.1))': + dependencies: + '@vitest/spy': 3.1.2 + estree-walker: 3.0.3 + magic-string: 0.30.17 + optionalDependencies: + vite: 6.3.3(@types/node@20.17.32)(yaml@2.7.1) + + '@vitest/pretty-format@3.1.2': + dependencies: + tinyrainbow: 2.0.0 + + '@vitest/runner@3.1.2': + dependencies: + '@vitest/utils': 3.1.2 + pathe: 2.0.3 + + '@vitest/snapshot@3.1.2': + dependencies: + '@vitest/pretty-format': 3.1.2 + magic-string: 0.30.17 + pathe: 2.0.3 + + '@vitest/spy@3.1.2': + dependencies: + tinyspy: 3.0.2 + + '@vitest/utils@3.1.2': + dependencies: + '@vitest/pretty-format': 3.1.2 + loupe: 3.1.3 + tinyrainbow: 2.0.0 + + acorn-jsx@5.3.2(acorn@8.14.1): + dependencies: + acorn: 8.14.1 + + acorn@8.14.1: {} + + ajv@6.12.6: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + argparse@2.0.1: {} + + assertion-error@2.0.1: {} + + asynckit@0.4.0: {} + + axios@1.9.0: + dependencies: + follow-redirects: 1.15.9 + form-data: 4.0.2 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + + balanced-match@1.0.2: {} + + binary-searching@2.0.5: {} + + brace-expansion@1.1.11: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + + brace-expansion@2.0.1: + dependencies: + balanced-match: 1.0.2 + + braces@3.0.3: + dependencies: + fill-range: 7.1.1 + + cac@6.7.14: {} + + call-bind-apply-helpers@1.0.2: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + + callsites@3.1.0: {} + + chai@5.2.0: + dependencies: + assertion-error: 2.0.1 + check-error: 2.1.1 + deep-eql: 5.0.2 + loupe: 3.1.3 + pathval: 2.0.0 + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + character-entities@2.0.2: {} + + check-error@2.1.1: {} + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + combined-stream@1.0.8: + dependencies: + delayed-stream: 1.0.0 + + comment-parser@1.4.1: {} + + commondir@1.0.1: {} + + concat-map@0.0.1: {} + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + debug@4.4.0: + dependencies: + ms: 2.1.3 + + decode-named-character-reference@1.1.0: + dependencies: + character-entities: 2.0.2 + + deep-eql@5.0.2: {} + + deep-is@0.1.4: {} + + deepmerge@4.3.1: {} + + delayed-stream@1.0.0: {} + + dequal@2.0.3: {} + + devlop@1.1.0: + dependencies: + dequal: 2.0.3 + + diff@7.0.0: {} + + dotenv@16.5.0: {} + + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-errors: 1.3.0 + gopd: 1.2.0 + + entities@4.5.0: {} + + es-define-property@1.0.1: {} + + es-errors@1.3.0: {} + + es-module-lexer@1.7.0: {} + + es-object-atoms@1.1.1: + dependencies: + es-errors: 1.3.0 + + es-set-tostringtag@2.1.0: + dependencies: + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + has-tostringtag: 1.0.2 + hasown: 2.0.2 + + esbuild@0.25.3: + optionalDependencies: + '@esbuild/aix-ppc64': 0.25.3 + '@esbuild/android-arm': 0.25.3 + '@esbuild/android-arm64': 0.25.3 + '@esbuild/android-x64': 0.25.3 + '@esbuild/darwin-arm64': 0.25.3 + '@esbuild/darwin-x64': 0.25.3 + '@esbuild/freebsd-arm64': 0.25.3 + '@esbuild/freebsd-x64': 0.25.3 + '@esbuild/linux-arm': 0.25.3 + '@esbuild/linux-arm64': 0.25.3 + '@esbuild/linux-ia32': 0.25.3 + '@esbuild/linux-loong64': 0.25.3 + '@esbuild/linux-mips64el': 0.25.3 + '@esbuild/linux-ppc64': 0.25.3 + '@esbuild/linux-riscv64': 0.25.3 + '@esbuild/linux-s390x': 0.25.3 + '@esbuild/linux-x64': 0.25.3 + '@esbuild/netbsd-arm64': 0.25.3 + '@esbuild/netbsd-x64': 0.25.3 + '@esbuild/openbsd-arm64': 0.25.3 + '@esbuild/openbsd-x64': 0.25.3 + '@esbuild/sunos-x64': 0.25.3 + '@esbuild/win32-arm64': 0.25.3 + '@esbuild/win32-ia32': 0.25.3 + '@esbuild/win32-x64': 0.25.3 + + escape-string-regexp@4.0.0: {} + + eslint-scope@8.3.0: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-visitor-keys@3.4.3: {} + + eslint-visitor-keys@4.2.0: {} + + eslint@9.25.1: + dependencies: + '@eslint-community/eslint-utils': 4.6.1(eslint@9.25.1) + '@eslint-community/regexpp': 4.12.1 + '@eslint/config-array': 0.20.0 + '@eslint/config-helpers': 0.2.1 + '@eslint/core': 0.13.0 + '@eslint/eslintrc': 3.3.1 + '@eslint/js': 9.25.1 + '@eslint/plugin-kit': 0.2.8 + '@humanfs/node': 0.16.6 + '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.4.2 + '@types/estree': 1.0.7 + '@types/json-schema': 7.0.15 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.4.0 + escape-string-regexp: 4.0.0 + eslint-scope: 8.3.0 + eslint-visitor-keys: 4.2.0 + espree: 10.3.0 + esquery: 1.6.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 8.0.0 + find-up: 5.0.0 + glob-parent: 6.0.2 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + json-stable-stringify-without-jsonify: 1.0.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.4 + transitivePeerDependencies: + - supports-color + + espree@10.3.0: + dependencies: + acorn: 8.14.1 + acorn-jsx: 5.3.2(acorn@8.14.1) + eslint-visitor-keys: 4.2.0 + + esquery@1.6.0: + dependencies: + estraverse: 5.3.0 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@5.3.0: {} + + estree-walker@2.0.2: {} + + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.7 + + esutils@2.0.3: {} + + expect-type@1.2.1: {} + + fast-deep-equal@3.1.3: {} + + fast-glob@3.3.3: + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.8 + + fast-json-stable-stringify@2.1.0: {} + + fast-levenshtein@2.0.6: {} + + fastq@1.19.1: + dependencies: + reusify: 1.1.0 + + fdir@6.4.4(picomatch@4.0.2): + optionalDependencies: + picomatch: 4.0.2 + + file-entry-cache@8.0.0: + dependencies: + flat-cache: 4.0.1 + + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat-cache@4.0.1: + dependencies: + flatted: 3.3.3 + keyv: 4.5.4 + + flatted@3.3.3: {} + + follow-redirects@1.15.9: {} + + form-data@4.0.2: + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + es-set-tostringtag: 2.1.0 + mime-types: 2.1.35 + + fsevents@2.3.3: + optional: true + + function-bind@1.1.2: {} + + get-intrinsic@1.3.0: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.2 + math-intrinsics: 1.1.0 + + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.1 + + glob-parent@5.1.2: + dependencies: + is-glob: 4.0.3 + + glob-parent@6.0.2: + dependencies: + is-glob: 4.0.3 + + globals@14.0.0: {} + + globals@16.0.0: {} + + gopd@1.2.0: {} + + graphemer@1.4.0: {} + + has-flag@4.0.0: {} + + has-symbols@1.1.0: {} + + has-tostringtag@1.0.2: + dependencies: + has-symbols: 1.1.0 + + hasown@2.0.2: + dependencies: + function-bind: 1.1.2 + + ignore@5.3.2: {} + + import-fresh@3.3.1: + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + + imurmurhash@0.1.4: {} + + is-core-module@2.16.1: + dependencies: + hasown: 2.0.2 + + is-extglob@2.1.1: {} + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + is-module@1.0.0: {} + + is-number@7.0.0: {} + + is-reference@1.2.1: + dependencies: + '@types/estree': 1.0.7 + + isexe@2.0.0: {} + + js-yaml@4.1.0: + dependencies: + argparse: 2.0.1 + + json-buffer@3.0.1: {} + + json-schema-traverse@0.4.1: {} + + json-stable-stringify-without-jsonify@1.0.1: {} + + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + + levn@0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + + linkify-it@5.0.0: + dependencies: + uc.micro: 2.1.0 + + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + lodash.get@4.4.2: {} + + lodash.merge@4.6.2: {} + + loupe@3.1.3: {} + + lunr@2.3.9: {} + + magic-string@0.30.17: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + + markdown-it@14.1.0: + dependencies: + argparse: 2.0.1 + entities: 4.5.0 + linkify-it: 5.0.0 + mdurl: 2.0.0 + punycode.js: 2.3.1 + uc.micro: 2.1.0 + + math-intrinsics@1.1.0: {} + + mdast-util-from-markdown@2.0.2: + dependencies: + '@types/mdast': 4.0.4 + '@types/unist': 3.0.3 + decode-named-character-reference: 1.1.0 + devlop: 1.1.0 + mdast-util-to-string: 4.0.0 + micromark: 4.0.2 + micromark-util-decode-numeric-character-reference: 2.0.2 + micromark-util-decode-string: 2.0.1 + micromark-util-normalize-identifier: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + unist-util-stringify-position: 4.0.0 + transitivePeerDependencies: + - supports-color + + mdast-util-to-string@4.0.0: + dependencies: + '@types/mdast': 4.0.4 + + mdurl@2.0.0: {} + + merge2@1.4.1: {} + + micromark-core-commonmark@2.0.3: + dependencies: + decode-named-character-reference: 1.1.0 + devlop: 1.1.0 + micromark-factory-destination: 2.0.1 + micromark-factory-label: 2.0.1 + micromark-factory-space: 2.0.1 + micromark-factory-title: 2.0.1 + micromark-factory-whitespace: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-chunked: 2.0.1 + micromark-util-classify-character: 2.0.1 + micromark-util-html-tag-name: 2.0.1 + micromark-util-normalize-identifier: 2.0.1 + micromark-util-resolve-all: 2.0.1 + micromark-util-subtokenize: 2.1.0 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-factory-destination@2.0.1: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-factory-label@2.0.1: + dependencies: + devlop: 1.1.0 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-factory-space@2.0.1: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-types: 2.0.2 + + micromark-factory-title@2.0.1: + dependencies: + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-factory-whitespace@2.0.1: + dependencies: + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-util-character@2.1.1: + dependencies: + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-util-chunked@2.0.1: + dependencies: + micromark-util-symbol: 2.0.1 + + micromark-util-classify-character@2.0.1: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-util-combine-extensions@2.0.1: + dependencies: + micromark-util-chunked: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-util-decode-numeric-character-reference@2.0.2: + dependencies: + micromark-util-symbol: 2.0.1 + + micromark-util-decode-string@2.0.1: + dependencies: + decode-named-character-reference: 1.1.0 + micromark-util-character: 2.1.1 + micromark-util-decode-numeric-character-reference: 2.0.2 + micromark-util-symbol: 2.0.1 + + micromark-util-encode@2.0.1: {} + + micromark-util-html-tag-name@2.0.1: {} + + micromark-util-normalize-identifier@2.0.1: + dependencies: + micromark-util-symbol: 2.0.1 + + micromark-util-resolve-all@2.0.1: + dependencies: + micromark-util-types: 2.0.2 + + micromark-util-sanitize-uri@2.0.1: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-encode: 2.0.1 + micromark-util-symbol: 2.0.1 + + micromark-util-subtokenize@2.1.0: + dependencies: + devlop: 1.1.0 + micromark-util-chunked: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-util-symbol@2.0.1: {} + + micromark-util-types@2.0.2: {} + + micromark@4.0.2: + dependencies: + '@types/debug': 4.1.12 + debug: 4.4.0 + decode-named-character-reference: 1.1.0 + devlop: 1.1.0 + micromark-core-commonmark: 2.0.3 + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-chunked: 2.0.1 + micromark-util-combine-extensions: 2.0.1 + micromark-util-decode-numeric-character-reference: 2.0.2 + micromark-util-encode: 2.0.1 + micromark-util-normalize-identifier: 2.0.1 + micromark-util-resolve-all: 2.0.1 + micromark-util-sanitize-uri: 2.0.1 + micromark-util-subtokenize: 2.1.0 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + transitivePeerDependencies: + - supports-color + + micromatch@4.0.8: + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + + mime-db@1.52.0: {} + + mime-types@2.1.35: + dependencies: + mime-db: 1.52.0 + + mime@4.0.7: {} + + minimatch@3.1.2: + dependencies: + brace-expansion: 1.1.11 + + minimatch@9.0.5: + dependencies: + brace-expansion: 2.0.1 + + ms@2.1.3: {} + + nanoid@3.3.11: {} + + natural-compare@1.4.0: {} + + optionator@0.9.4: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + + parent-module@1.0.1: + dependencies: + callsites: 3.1.0 + + path-exists@4.0.0: {} + + path-key@3.1.1: {} + + path-parse@1.0.7: {} + + pathe@2.0.3: {} + + pathval@2.0.0: {} + + picocolors@1.1.1: {} + + picomatch@2.3.1: {} + + picomatch@4.0.2: {} + + postcss@8.5.3: + dependencies: + nanoid: 3.3.11 + picocolors: 1.1.1 + source-map-js: 1.2.1 + + prelude-ls@1.2.1: {} + + prettier-plugin-jsdoc@1.3.2(prettier@3.5.3): + dependencies: + binary-searching: 2.0.5 + comment-parser: 1.4.1 + mdast-util-from-markdown: 2.0.2 + prettier: 3.5.3 + transitivePeerDependencies: + - supports-color + + prettier@3.5.3: {} + + proxy-from-env@1.1.0: {} + + punycode.js@2.3.1: {} + + punycode@2.3.1: {} + + queue-microtask@1.2.3: {} + + resolve-from@4.0.0: {} + + resolve@1.22.10: + dependencies: + is-core-module: 2.16.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + + reusify@1.1.0: {} + + rollup@4.40.1: + dependencies: + '@types/estree': 1.0.7 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.40.1 + '@rollup/rollup-android-arm64': 4.40.1 + '@rollup/rollup-darwin-arm64': 4.40.1 + '@rollup/rollup-darwin-x64': 4.40.1 + '@rollup/rollup-freebsd-arm64': 4.40.1 + '@rollup/rollup-freebsd-x64': 4.40.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.40.1 + '@rollup/rollup-linux-arm-musleabihf': 4.40.1 + '@rollup/rollup-linux-arm64-gnu': 4.40.1 + '@rollup/rollup-linux-arm64-musl': 4.40.1 + '@rollup/rollup-linux-loongarch64-gnu': 4.40.1 + '@rollup/rollup-linux-powerpc64le-gnu': 4.40.1 + '@rollup/rollup-linux-riscv64-gnu': 4.40.1 + '@rollup/rollup-linux-riscv64-musl': 4.40.1 + '@rollup/rollup-linux-s390x-gnu': 4.40.1 + '@rollup/rollup-linux-x64-gnu': 4.40.1 + '@rollup/rollup-linux-x64-musl': 4.40.1 + '@rollup/rollup-win32-arm64-msvc': 4.40.1 + '@rollup/rollup-win32-ia32-msvc': 4.40.1 + '@rollup/rollup-win32-x64-msvc': 4.40.1 + fsevents: 2.3.3 + + run-parallel@1.2.0: + dependencies: + queue-microtask: 1.2.3 + + semver@7.7.1: {} + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + siginfo@2.0.0: {} + + sinon@20.0.0: + dependencies: + '@sinonjs/commons': 3.0.1 + '@sinonjs/fake-timers': 13.0.5 + '@sinonjs/samsam': 8.0.2 + diff: 7.0.0 + supports-color: 7.2.0 + + source-map-js@1.2.1: {} + + stackback@0.0.2: {} + + std-env@3.9.0: {} + + strip-json-comments@3.1.1: {} + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + supports-preserve-symlinks-flag@1.0.0: {} + + tinybench@2.9.0: {} + + tinyexec@0.3.2: {} + + tinyglobby@0.2.13: + dependencies: + fdir: 6.4.4(picomatch@4.0.2) + picomatch: 4.0.2 + + tinypool@1.0.2: {} + + tinyrainbow@2.0.0: {} + + tinyspy@3.0.2: {} + + to-regex-range@5.0.1: + dependencies: + is-number: 7.0.0 + + ts-api-utils@2.1.0(typescript@5.8.3): + dependencies: + typescript: 5.8.3 + + tslib@2.8.1: {} + + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 + + type-detect@4.0.8: {} + + type-detect@4.1.0: {} + + typedoc@0.28.3(typescript@5.8.3): + dependencies: + '@gerrit0/mini-shiki': 3.3.0 + lunr: 2.3.9 + markdown-it: 14.1.0 + minimatch: 9.0.5 + typescript: 5.8.3 + yaml: 2.7.1 + + typescript-eslint@8.31.1(eslint@9.25.1)(typescript@5.8.3): + dependencies: + '@typescript-eslint/eslint-plugin': 8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.25.1)(typescript@5.8.3))(eslint@9.25.1)(typescript@5.8.3) + '@typescript-eslint/parser': 8.31.1(eslint@9.25.1)(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.1(eslint@9.25.1)(typescript@5.8.3) + eslint: 9.25.1 + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + + typescript@5.8.3: {} + + uc.micro@2.1.0: {} + + undici-types@6.19.8: {} + + unist-util-stringify-position@4.0.0: + dependencies: + '@types/unist': 3.0.3 + + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + + vite-node@3.1.2(@types/node@20.17.32)(yaml@2.7.1): + dependencies: + cac: 6.7.14 + debug: 4.4.0 + es-module-lexer: 1.7.0 + pathe: 2.0.3 + vite: 6.3.3(@types/node@20.17.32)(yaml@2.7.1) + transitivePeerDependencies: + - '@types/node' + - jiti + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - tsx + - yaml + + vite@6.3.3(@types/node@20.17.32)(yaml@2.7.1): + dependencies: + esbuild: 0.25.3 + fdir: 6.4.4(picomatch@4.0.2) + picomatch: 4.0.2 + postcss: 8.5.3 + rollup: 4.40.1 + tinyglobby: 0.2.13 + optionalDependencies: + '@types/node': 20.17.32 + fsevents: 2.3.3 + yaml: 2.7.1 + + vitest@3.1.2(@types/debug@4.1.12)(@types/node@20.17.32)(yaml@2.7.1): + dependencies: + '@vitest/expect': 3.1.2 + '@vitest/mocker': 3.1.2(vite@6.3.3(@types/node@20.17.32)(yaml@2.7.1)) + '@vitest/pretty-format': 3.1.2 + '@vitest/runner': 3.1.2 + '@vitest/snapshot': 3.1.2 + '@vitest/spy': 3.1.2 + '@vitest/utils': 3.1.2 + chai: 5.2.0 + debug: 4.4.0 + expect-type: 1.2.1 + magic-string: 0.30.17 + pathe: 2.0.3 + std-env: 3.9.0 + tinybench: 2.9.0 + tinyexec: 0.3.2 + tinyglobby: 0.2.13 + tinypool: 1.0.2 + tinyrainbow: 2.0.0 + vite: 6.3.3(@types/node@20.17.32)(yaml@2.7.1) + vite-node: 3.1.2(@types/node@20.17.32)(yaml@2.7.1) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/debug': 4.1.12 + '@types/node': 20.17.32 + transitivePeerDependencies: + - jiti + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - tsx + - yaml + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + why-is-node-running@2.3.0: + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + + word-wrap@1.2.5: {} + + yaml@2.7.1: {} + + yocto-queue@0.1.0: {} + + zod@3.24.3: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000000..cb8238f2f6 --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,3 @@ +onlyBuiltDependencies: + - esbuild + - unrs-resolver diff --git a/rollup.config.ts b/rollup.config.ts new file mode 100644 index 0000000000..08cc3314ae --- /dev/null +++ b/rollup.config.ts @@ -0,0 +1,39 @@ +import { defineConfig } from 'rollup'; +import typescript from '@rollup/plugin-typescript'; +import resolve from '@rollup/plugin-node-resolve'; +import commonjs from '@rollup/plugin-commonjs'; +import { fileURLToPath } from 'node:url'; +import { dirname } from 'node:path'; +import { readFileSync } from 'node:fs'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); + +const packageJsonPath = `${__dirname}/package.json`; +const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8')); + +const dependencies = Object.keys(packageJson.dependencies || {}); +const peerDependencies = Object.keys(packageJson.peerDependencies || {}); +const external = [...dependencies, ...peerDependencies]; + +export default defineConfig({ + input: 'src/index.ts', + output: [ + { + file: 'dist/index.cjs.js', + format: 'cjs', + sourcemap: true, + }, + { + file: 'dist/index.esm.js', + format: 'esm', + sourcemap: true, + }, + ], + plugins: [ + resolve(), + commonjs(), + typescript({ tsconfig: './tsconfig.json' }), + ], + external, +}); diff --git a/src/agile/models/fields.ts b/src/agile/models/fields.ts index 28742d48ad..f8b7c69474 100644 --- a/src/agile/models/fields.ts +++ b/src/agile/models/fields.ts @@ -22,9 +22,8 @@ import { Worklog, } from '../../version2/models'; -export interface Fields { - [key: string]: any; - +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export interface Fields extends Record { aggregateprogress: Progress; aggregatetimeestimate: number | null; aggregatetimeoriginalestimate: number | null; @@ -49,6 +48,7 @@ export interface Fields { flagged: boolean; issuelinks: IssueLink[]; issuerestriction: { + // eslint-disable-next-line @typescript-eslint/no-explicit-any issuerestrictions: any; shouldDisplay: boolean; }; @@ -61,6 +61,7 @@ export interface Fields { reporter: User; resolution: Resolution | null; resolutiondate: string | null; + // eslint-disable-next-line @typescript-eslint/no-explicit-any security: any | null; sprint: Sprint; status: Status; @@ -68,6 +69,7 @@ export interface Fields { subtasks: Issue[]; summary: string; timeestimate: number | null; + // eslint-disable-next-line @typescript-eslint/no-explicit-any timeoriginalestimate: any | null; timespent: number | null; timetracking: TimeTrackingDetails; diff --git a/src/agile/models/getDeploymentByKey.ts b/src/agile/models/getDeploymentByKey.ts index 318669bbb5..72fde3b3ac 100644 --- a/src/agile/models/getDeploymentByKey.ts +++ b/src/agile/models/getDeploymentByKey.ts @@ -18,6 +18,7 @@ export interface GetDeploymentByKey { * The entities to associate the Deployment information with. It must contain at least one of IssueIdOrKeysAssociation * or ServiceIdOrKeysAssociation. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any associations: any[]; /** The human-readable name for the deployment. Will be shown in the UI. */ displayName: string; diff --git a/src/agile/models/getRemoteLinkById.ts b/src/agile/models/getRemoteLinkById.ts index 6f0e6f80d1..aa24b264fe 100644 --- a/src/agile/models/getRemoteLinkById.ts +++ b/src/agile/models/getRemoteLinkById.ts @@ -51,7 +51,7 @@ export interface GetRemoteLinkById { /** The last-updated timestamp to present to the user as a summary of when Remote Link was last updated. */ lastUpdated: string; /** The entities to associate the Remote Link information with. */ - associations?: {}[]; + associations?: unknown[]; /** The status of a Remote Link. */ status?: { /** @@ -78,5 +78,5 @@ export interface GetRemoteLinkById { * Map of key/values (string to string mapping). This is used to build the urls for actions from the templateUrl the * provider registered their available actions with. */ - attributeMap?: {}; + attributeMap?: unknown; } diff --git a/src/agile/models/getReportsForBoard.ts b/src/agile/models/getReportsForBoard.ts index adeab1a6a9..96863409de 100644 --- a/src/agile/models/getReportsForBoard.ts +++ b/src/agile/models/getReportsForBoard.ts @@ -1,3 +1,3 @@ export interface GetReportsForBoard { - reports?: {}[]; + reports?: unknown[]; } diff --git a/src/agile/models/getVulnerabilityById.ts b/src/agile/models/getVulnerabilityById.ts index 0dfcf13ab0..a0cb30e8ca 100644 --- a/src/agile/models/getVulnerabilityById.ts +++ b/src/agile/models/getVulnerabilityById.ts @@ -91,9 +91,9 @@ export interface GetVulnerabilityById { * The associations (e.g. Jira issue) to add in addition to the currently stored associations of the Security * Vulnerability. */ - addAssociations?: {}[]; + addAssociations?: unknown[]; /** The associations (e.g. Jira issue) to remove from currently stored associations of the Security Vulnerability. */ - removeAssociations?: {}[]; + removeAssociations?: unknown[]; /** * An ISO-8601 Date-time string representing the last time the provider updated associations on this entity. * diff --git a/src/agile/models/index.ts b/src/agile/models/index.ts index 2ced13b5d0..5886538bdb 100644 --- a/src/agile/models/index.ts +++ b/src/agile/models/index.ts @@ -31,8 +31,6 @@ export * from './issue'; export * from './issueTransition'; export * from './issueType'; export * from './jsonType'; -export * from './linkedSecurityWorkspaceIds'; -export * from './linkedWorkspace'; export * from './linkGroup'; export * from './operations'; export * from './scope'; @@ -55,4 +53,3 @@ export * from './submitVulnerabilities'; export * from './toggleFeatures'; export * from './user'; export * from './version'; -export * from './vulnerability'; diff --git a/src/agile/models/issue.ts b/src/agile/models/issue.ts index dbb296af89..f1ac7165c8 100644 --- a/src/agile/models/issue.ts +++ b/src/agile/models/issue.ts @@ -93,7 +93,7 @@ export interface Issue { /** The description key of the email address associated the history record. */ emailDescriptionKey?: string; /** Additional arbitrary information about the history record. */ - extraData?: {}; + extraData?: unknown; /** Details of user or system associated with a issue history metadata item. */ generator?: { /** The URL to an avatar for the user or system associated with a history record. */ @@ -141,7 +141,7 @@ export interface Issue { }; /** A list of editable field details. */ editmeta?: { - fields?: {}; + fields?: unknown; }; /** Expand options that include additional issue details in the response. */ expand?: string; @@ -156,14 +156,14 @@ export interface Issue { /** The key of the issue. */ key?: string; /** The ID and name of each field present on the issue. */ - names?: {}; + names?: unknown; operations?: Operations; /** Details of the issue properties identified in the request. */ - properties?: {}; + properties?: unknown; /** The rendered value of each field present on the issue. */ - renderedFields?: {}; + renderedFields?: unknown; /** The schema describing each field present on the issue. */ - schema?: {}; + schema?: unknown; /** The URL of the issue details. */ self?: string; /** The transitions that can be performed on the issue. */ @@ -174,7 +174,7 @@ export interface Issue { * Details of the fields associated with the issue transition screen. Use this information to populate `fields` and * `update` in a transition request. */ - fields?: {}; + fields?: unknown; /** Whether there is a screen associated with the issue transition. */ hasScreen?: boolean; /** The ID of the issue transition. Required when specifying a transition to undertake. */ @@ -212,5 +212,5 @@ export interface Issue { }; }[]; /** The versions of each field on the issue. */ - versionedRepresentations?: {}; + versionedRepresentations?: unknown; } diff --git a/src/agile/models/issueTransition.ts b/src/agile/models/issueTransition.ts index bb35bb723f..8d16fb61a1 100644 --- a/src/agile/models/issueTransition.ts +++ b/src/agile/models/issueTransition.ts @@ -8,7 +8,7 @@ export interface IssueTransition { * Details of the fields associated with the issue transition screen. Use this information to populate `fields` and * `update` in a transition request. */ - fields?: {}; + fields?: unknown; /** Whether there is a screen associated with the issue transition. */ hasScreen?: boolean; /** The ID of the issue transition. Required when specifying a transition to undertake. */ diff --git a/src/agile/models/jsonType.ts b/src/agile/models/jsonType.ts index 2ab70a13fc..0213056b2f 100644 --- a/src/agile/models/jsonType.ts +++ b/src/agile/models/jsonType.ts @@ -1,7 +1,7 @@ /** The schema of a field. */ export interface JsonType { /** If the field is a custom field, the configuration of the field. */ - configuration?: {}; + configuration?: unknown; /** If the field is a custom field, the URI of the field. */ custom?: string; /** If the field is a custom field, the custom ID of the field. */ diff --git a/src/agile/models/linkedSecurityWorkspaceIds.ts b/src/agile/models/linkedSecurityWorkspaceIds.ts deleted file mode 100644 index 12c1186adc..0000000000 --- a/src/agile/models/linkedSecurityWorkspaceIds.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** The payload of linked Security Workspace IDs. */ -export interface LinkedSecurityWorkspaceIds { - /** The IDs of Security Workspaces that are linked to this Jira site. */ - workspaceIds: string[]; -} diff --git a/src/agile/models/linkedWorkspace.ts b/src/agile/models/linkedWorkspace.ts deleted file mode 100644 index 2afd230c26..0000000000 --- a/src/agile/models/linkedWorkspace.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** The Security Workspace information stored for the given ID. */ -export interface LinkedWorkspace { - /** The Security Workspace ID */ - workspaceId: string; - /** Latest date and time that the Security Workspace was updated in Jira. */ - updatedAt: string; -} diff --git a/src/agile/models/searchResults.ts b/src/agile/models/searchResults.ts index 015ea5b3d2..f499b8e1f5 100644 --- a/src/agile/models/searchResults.ts +++ b/src/agile/models/searchResults.ts @@ -9,9 +9,9 @@ export interface SearchResults { /** The maximum number of results that could be on the page. */ maxResults: number; /** The ID and name of each field in the search results. */ - names?: {}; + names?: unknown; /** The schema describing the field types in the search results. */ - schema?: {}; + schema?: unknown; /** The index of the first item returned on the page. */ startAt: number; /** The number of results on the page. */ diff --git a/src/agile/models/storeDevelopmentInformation.ts b/src/agile/models/storeDevelopmentInformation.ts index 6e88d2ba9a..d54c4df764 100644 --- a/src/agile/models/storeDevelopmentInformation.ts +++ b/src/agile/models/storeDevelopmentInformation.ts @@ -5,13 +5,13 @@ export interface StoreDevelopmentInformation { * devinfo entity that isn't updated due to it's updateSequenceId being out of order is not considered a failed * submission. */ - acceptedDevinfoEntities?: {}; + acceptedDevinfoEntities?: unknown; /** * IDs of devinfo entities that have not been accepted for submission and caused error descriptions, usually due to a * problem with the request data. The entities (if present) will be grouped by their repository id and type. Entity * IDs are listed with errors associated with that devinfo entity that have prevented it being submitted. */ - failedDevinfoEntities?: {}; + failedDevinfoEntities?: unknown; /** * Issue keys that are not known on this Jira instance (if any). These may be invalid keys (e.g. `UTF-8` is sometimes * incorrectly identified as a Jira issue key), or they may be for projects that no longer exist. If a devinfo entity diff --git a/src/agile/models/submitComponents.ts b/src/agile/models/submitComponents.ts index 69bee0d8e4..5e906b542e 100644 --- a/src/agile/models/submitComponents.ts +++ b/src/agile/models/submitComponents.ts @@ -15,7 +15,7 @@ export interface SubmitComponents { * The object (if present) will be keyed by Component ID and include any errors associated with that Component that * have prevented it being submitted. */ - failedComponents?: {}; + failedComponents?: unknown; /** * Project keys that are not known on this Jira instance (if any). * diff --git a/src/agile/models/submitDeployments.ts b/src/agile/models/submitDeployments.ts index faa5322581..934fce13f9 100644 --- a/src/agile/models/submitDeployments.ts +++ b/src/agile/models/submitDeployments.ts @@ -67,5 +67,5 @@ export interface SubmitDeployments { * stored against those valid associations. If a deployment was only associated with the associations in this array, * it is deemed to be invalid and it won't be persisted. */ - unknownAssociations?: {}[]; + unknownAssociations?: unknown[]; } diff --git a/src/agile/models/submitEntity.ts b/src/agile/models/submitEntity.ts index 206e465f32..67b9fd9841 100644 --- a/src/agile/models/submitEntity.ts +++ b/src/agile/models/submitEntity.ts @@ -15,7 +15,7 @@ export interface SubmitEntity { * The object (if present) will be keyed by Incident ID and include any errors associated with that Incident that have * prevented it being submitted. */ - failedIncidents?: {}; + failedIncidents?: unknown; /** * Project keys that are not known on this Jira instance (if any). * diff --git a/src/agile/models/submitFeatureFlags.ts b/src/agile/models/submitFeatureFlags.ts index dc3c95b853..e2463c9a7b 100644 --- a/src/agile/models/submitFeatureFlags.ts +++ b/src/agile/models/submitFeatureFlags.ts @@ -16,7 +16,7 @@ export interface SubmitFeatureFlags { * The object (if present) will be keyed by Feature Flag ID and include any errors associated with that Feature Flag * that have prevented it being submitted. */ - failedFeatureFlags?: {}; + failedFeatureFlags?: unknown; /** * Issue keys that are not known on this Jira instance (if any). * diff --git a/src/agile/models/submitRemoteLinks.ts b/src/agile/models/submitRemoteLinks.ts index ec203f74a5..75f7f7d6ac 100644 --- a/src/agile/models/submitRemoteLinks.ts +++ b/src/agile/models/submitRemoteLinks.ts @@ -19,7 +19,7 @@ export interface SubmitRemoteLinks { * The object (if present) will be keyed by Remote Link ID and include any errors associated with that Remote Link * that have prevented it being submitted. */ - rejectedRemoteLinks?: {}; + rejectedRemoteLinks?: unknown; /** Issue keys or services IDs or keys that are not known on this Jira instance (if any). */ unknownAssociations?: string[]; } diff --git a/src/agile/models/submitVulnerabilities.ts b/src/agile/models/submitVulnerabilities.ts index 4f401d89e2..7f2b5b5240 100644 --- a/src/agile/models/submitVulnerabilities.ts +++ b/src/agile/models/submitVulnerabilities.ts @@ -16,7 +16,7 @@ export interface SubmitVulnerabilities { * The object (if present) will be keyed by Vulnerability ID and include any errors associated with that Vulnerability * that have prevented it being submitted. */ - failedVulnerabilities?: {}; + failedVulnerabilities?: unknown; /** * Associations (e.g. Service IDs) that are not known on this Jira instance (if any). * @@ -24,5 +24,5 @@ export interface SubmitVulnerabilities { * stored against those valid associations. If a Vulnerability was only associated with the associations in this * array, it is deemed to be invalid and it won't be persisted. */ - unknownAssociations?: {}[]; + unknownAssociations?: unknown[]; } diff --git a/src/agile/models/submittedVulnerabilitiesResult.ts b/src/agile/models/submittedVulnerabilitiesResult.ts deleted file mode 100644 index 2ce39bb3c9..0000000000 --- a/src/agile/models/submittedVulnerabilitiesResult.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** The result of a successful submitVulnerabilities request. */ -export interface SubmittedVulnerabilitiesResult { - /** - * The IDs of Vulnerabilities that have been accepted for submission. - * - * A Vulnerability may be rejected if it was only associated with unknown project keys. - * - * Note that a Vulnerability that isn't updated due to it's updateSequenceNumber being out of order is not considered - * a failed submission. - */ - acceptedVulnerabilities?: string[]; - /** - * Details of Vulnerabilities that have not been accepted for submission, usually due to a problem with the request - * data. - * - * The object (if present) will be keyed by Vulnerability ID and include any errors associated with that Vulnerability - * that have prevented it being submitted. - */ - failedVulnerabilities?: {}; - /** - * Associations (e.g. Issue Keys or Service IDs) that are not known on this Jira instance (if any). - * - * These may be invalid keys (e.g. `UTF-8` is sometimes incorrectly identified as a Jira issue key), or they may be - * for projects that no longer exist. - * - * If a Vulnerability has been associated with any other association other than those in this array it will still be - * stored against those valid associations. If a Vulnerability was only associated with the associations in this - * array, it is deemed to be invalid and it won't be persisted. - */ - unknownAssociations?: {}[]; -} diff --git a/src/agile/models/vulnerability.ts b/src/agile/models/vulnerability.ts deleted file mode 100644 index 73922d9e5a..0000000000 --- a/src/agile/models/vulnerability.ts +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Data related to a specific vulnerability in a specific workspace that the vulnerability is present in. Must specify - * at least one association. - */ -export interface Vulnerability { - /** - * The VulnerabilityData schema version used for this vulnerability data. - * - * Placeholder to support potential schema changes in the future. - */ - schemaVersion: string; - /** The identifier for the Vulnerability. Must be unique for a given Provider. */ - id: string; - /** - * An ID used to apply an ordering to updates for this Vulnerability in the case of out-of-order receipt of update - * requests. - * - * This can be any monotonically increasing number. A suggested implementation is to use epoch millis from the - * Provider system, but other alternatives are valid (e.g. a Provider could store a counter against each Vulnerability - * and increment that on each update to Jira). - * - * Updates for a Vulnerability that are received with an updateSqeuenceId lower than what is currently stored will be - * ignored. - */ - updateSequenceNumber: number; - /** The identifier of the Container where this Vulnerability was found. Must be unique for a given Provider. */ - containerId: string; - /** - * The human-readable name for the Vulnerability. Will be shown in the UI. - * - * If not provided, will use the ID for display. - */ - displayName: string; - /** A description of the issue in Markdown format. Will be shown in the UI and used when creating Jira Issues. */ - description: string; - /** - * A URL users can use to link to a summary view of this vulnerability, if appropriate. - * - * This could be any location that makes sense in the Provider system (e.g. if the summary information comes from a - * specific project, it might make sense to link the user to the vulnerability in that project). - */ - url: string; - /** The type of Vulnerability detected. */ - type: string; - /** - * The timestamp to present to the user that shows when the Vulnerability was introduced. - * - * Expected format is an RFC3339 formatted string. - */ - introducedDate: string; - /** - * The last-updated timestamp to present to the user the last time the Vulnerability was updated. - * - * Expected format is an RFC3339 formatted string. - */ - lastUpdated: string; - /** - * Severity information for a single Vulnerability. - * - * This is the severity information that will be presented to the user on e.g. the Jira Security screen. - */ - severity: { - /** The severity level of the Vulnerability. */ - level: string; - }; - /** The identifying information for the Vulnerability. */ - identifiers?: { - /** The display name of the Vulnerability identified. */ - displayName: string; - /** A URL users can use to link to the definition of the Vulnerability identified. */ - url: string; - }[]; - /** The current status of the Vulnerability. */ - status: string; - /** The entities to associate the Security Vulnerability information with. */ - associations?: {}[]; -} diff --git a/src/agile/parameters/deleteComponentsByProperty.ts b/src/agile/parameters/deleteComponentsByProperty.ts index e715119766..ff6e94e123 100644 --- a/src/agile/parameters/deleteComponentsByProperty.ts +++ b/src/agile/parameters/deleteComponentsByProperty.ts @@ -1,5 +1,5 @@ -export interface DeleteComponentsByProperty { +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export interface DeleteComponentsByProperty extends Record { accountId?: string; createdBy?: string; - [key: string]: any; } diff --git a/src/agile/parameters/deleteEntityByProperty.ts b/src/agile/parameters/deleteEntityByProperty.ts index dd57022b17..ad6da5bee2 100644 --- a/src/agile/parameters/deleteEntityByProperty.ts +++ b/src/agile/parameters/deleteEntityByProperty.ts @@ -1,5 +1,5 @@ -export interface DeleteEntityByProperty { +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export interface DeleteEntityByProperty extends Record { accountId?: string; createdBy?: string; - [key: string]: any; } diff --git a/src/agile/parameters/deleteRemoteLinksByProperty.ts b/src/agile/parameters/deleteRemoteLinksByProperty.ts index 1cff3c1efa..537020dec1 100644 --- a/src/agile/parameters/deleteRemoteLinksByProperty.ts +++ b/src/agile/parameters/deleteRemoteLinksByProperty.ts @@ -16,5 +16,5 @@ export interface DeleteRemoteLinksByProperty { * And now they want to delete Remote Links in bulk by that specific accountId as follows: e.g. DELETE * /bulkByProperties?accountId=account-123 */ - params?: {}; + params?: unknown; } diff --git a/src/agile/parameters/deleteVulnerabilitiesByProperty.ts b/src/agile/parameters/deleteVulnerabilitiesByProperty.ts index 5984941b7b..6ba253d6cb 100644 --- a/src/agile/parameters/deleteVulnerabilitiesByProperty.ts +++ b/src/agile/parameters/deleteVulnerabilitiesByProperty.ts @@ -1,5 +1,5 @@ -export interface DeleteVulnerabilitiesByProperty { - [key: string]: any; +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export interface DeleteVulnerabilitiesByProperty extends Record { accountId?: string; createdBy?: string; } diff --git a/src/agile/parameters/index.ts b/src/agile/parameters/index.ts index 060a110180..5c774e3678 100644 --- a/src/agile/parameters/index.ts +++ b/src/agile/parameters/index.ts @@ -67,7 +67,6 @@ export * from './partiallyUpdateSprint'; export * from './rankEpics'; export * from './rankIssues'; export * from './removeIssuesFromEpic'; -export * from './searchEpics'; export * from './setBoardProperty'; export * from './setProperty'; export * from './storeDevelopmentInformation'; diff --git a/src/agile/parameters/searchEpics.ts b/src/agile/parameters/searchEpics.ts deleted file mode 100644 index 54c7adb1d1..0000000000 --- a/src/agile/parameters/searchEpics.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface SearchEpics { - /** The maximum number of returned results. */ - maxResults?: number; - /** Flag that will exclude done epics from the results. */ - excludeDone?: boolean; - /** Text query by which the results should be filtered. */ - query?: string; - /** Key of a project by which epics will be prioritised (on the top) in the results. */ - projectKey?: string; -} diff --git a/src/agile/parameters/storeDevelopmentInformation.ts b/src/agile/parameters/storeDevelopmentInformation.ts index b2cdaf8aec..feab65678a 100644 --- a/src/agile/parameters/storeDevelopmentInformation.ts +++ b/src/agile/parameters/storeDevelopmentInformation.ts @@ -257,7 +257,7 @@ export interface StoreDevelopmentInformation { * Maximum allowed number of properties key/value pairs is 5. Properties keys cannot start with '_' character. * Properties keys cannot contain ':' character. */ - properties?: {}; + properties?: unknown; /** * Information about the provider. This is useful for auditing, logging, debugging, and other internal uses. It is not * considered private information. Hence, it may not contain personally identifiable information. diff --git a/src/agile/parameters/submitBuilds.ts b/src/agile/parameters/submitBuilds.ts index 052fe4280d..3c79bac7b1 100644 --- a/src/agile/parameters/submitBuilds.ts +++ b/src/agile/parameters/submitBuilds.ts @@ -12,7 +12,7 @@ export interface SubmitBuilds { * Properties are supplied as key/value pairs, a maximum of 5 properties can be supplied, and keys must not contain * ':' or start with '_'. */ - properties?: {}; + properties?: unknown; /** * A list of builds to submit to Jira. * diff --git a/src/agile/parameters/submitComponents.ts b/src/agile/parameters/submitComponents.ts index 0af35f6448..24f3d353ab 100644 --- a/src/agile/parameters/submitComponents.ts +++ b/src/agile/parameters/submitComponents.ts @@ -8,7 +8,7 @@ export interface SubmitComponents { * Properties are supplied as key/value pairs, and a maximum of 5 properties can be supplied, keys cannot contain ':' * or start with '_'. */ - properties?: {}; + properties?: unknown; components: { /** * The DevOpsComponentData schema version used for this devops component data. diff --git a/src/agile/parameters/submitDeployments.ts b/src/agile/parameters/submitDeployments.ts index 97ed88f596..10c9aff9cb 100644 --- a/src/agile/parameters/submitDeployments.ts +++ b/src/agile/parameters/submitDeployments.ts @@ -8,7 +8,7 @@ export interface SubmitDeployments { * Properties are supplied as key/value pairs, and a maximum of 5 properties can be supplied, keys cannot contain ':' * or start with '_'. */ - properties?: {}; + properties?: unknown; /** * A list of deployments to submit to Jira. * @@ -31,6 +31,7 @@ export interface SubmitDeployments { * The entities to associate the Deployment information with. It must contain at least one of * IssueIdOrKeysAssociation or ServiceIdOrKeysAssociation. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any associations: any[]; /** The human-readable name for the deployment. Will be shown in the UI. */ displayName: string; diff --git a/src/agile/parameters/submitEntity.ts b/src/agile/parameters/submitEntity.ts index 12ce1f2d02..149180b6dc 100644 --- a/src/agile/parameters/submitEntity.ts +++ b/src/agile/parameters/submitEntity.ts @@ -1,4 +1,5 @@ -export interface SubmitEntity { +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export interface SubmitEntity extends Record { /** * Properties assigned to incidents/components/review data that can then be used for delete / query operations. * @@ -8,7 +9,7 @@ export interface SubmitEntity { * Properties are supplied as key/value pairs, and a maximum of 5 properties can be supplied, keys cannot contain ':' * or start with '_'. */ - properties?: {}; + properties?: unknown; /** * Information about the provider. This is useful for auditing, logging, debugging, and other internal uses. It is not * considered private information. Hence, it may not contain personally identifiable information. @@ -17,5 +18,4 @@ export interface SubmitEntity { /** An optional name of the source of the incidents. */ product?: string; }; - [key: string]: any; } diff --git a/src/agile/parameters/submitFeatureFlags.ts b/src/agile/parameters/submitFeatureFlags.ts index 5cf1f9a00a..ebc319e9fd 100644 --- a/src/agile/parameters/submitFeatureFlags.ts +++ b/src/agile/parameters/submitFeatureFlags.ts @@ -12,7 +12,7 @@ export interface SubmitFeatureFlags { * Properties are supplied as key/value pairs, a maximum of 5 properties can be supplied, and keys must not contain * ':' or start with '_'. */ - properties?: {}; + properties?: unknown; /** * A list of Feature Flags to submit to Jira. * diff --git a/src/agile/parameters/submitRemoteLinks.ts b/src/agile/parameters/submitRemoteLinks.ts index c96378b19e..15562ab9fb 100644 --- a/src/agile/parameters/submitRemoteLinks.ts +++ b/src/agile/parameters/submitRemoteLinks.ts @@ -8,7 +8,7 @@ export interface SubmitRemoteLinks { * Properties are supplied as key/value pairs, a maximum of 5 properties can be supplied, and keys must not contain * ':' or start with '_'. */ - properties?: {}; + properties?: unknown; /** * A list of Remote Links to submit to Jira. * @@ -67,7 +67,7 @@ export interface SubmitRemoteLinks { /** The last-updated timestamp to present to the user as a summary of when Remote Link was last updated. */ lastUpdated: string; /** The entities to associate the Remote Link information with. */ - associations?: {}[]; + associations?: unknown[]; /** The status of a Remote Link. */ status?: { /** @@ -94,7 +94,7 @@ export interface SubmitRemoteLinks { * Map of key/values (string to string mapping). This is used to build the urls for actions from the templateUrl the * provider registered their available actions with. */ - attributeMap?: {}; + attributeMap?: unknown; }[]; /** * Information about the provider. This is useful for auditing, logging, debugging, and other internal uses. It is not diff --git a/src/agile/parameters/submitVulnerabilities.ts b/src/agile/parameters/submitVulnerabilities.ts index d7ee227193..82b9370069 100644 --- a/src/agile/parameters/submitVulnerabilities.ts +++ b/src/agile/parameters/submitVulnerabilities.ts @@ -17,7 +17,7 @@ export interface SubmitVulnerabilities { * Properties are supplied as key/value pairs, and a maximum of 5 properties can be supplied, keys cannot contain ':' * or start with '_'. */ - properties?: {}; + properties?: unknown; vulnerabilities?: { /** * The VulnerabilityData schema version used for this vulnerability data. @@ -107,7 +107,7 @@ export interface SubmitVulnerabilities { url?: string; }; /** The entities to associate the Security Vulnerability information with. */ - associations?: {}[]; + associations?: unknown[]; }[]; /** * Information about the provider. This is useful for auditing, logging, debugging, and other internal uses. diff --git a/src/callback.ts b/src/callback.ts index 9bcc05f52a..6340c33512 100644 --- a/src/callback.ts +++ b/src/callback.ts @@ -1,3 +1,3 @@ -import { Config } from './config'; +import { JiraError } from './config'; -export type Callback = (err: Config.Error | null, data?: T) => void; +export type Callback = (err: JiraError | null, data?: T) => void; diff --git a/src/clients/baseClient.ts b/src/clients/baseClient.ts index 5ade7e0b4b..5f8f97e5bc 100644 --- a/src/clients/baseClient.ts +++ b/src/clients/baseClient.ts @@ -1,10 +1,12 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ import axios, { AxiosInstance, AxiosResponse } from 'axios'; import type { Callback } from '../callback'; import type { Client } from './client'; -import type { Config } from '../config'; +import { Config, ConfigSchema, JiraError } from '../config'; import { getAuthenticationToken } from '../services/authenticationService'; import type { RequestConfig } from '../requestConfig'; import { HttpException, isObject } from './httpException'; +import { ZodError } from 'zod'; const STRICT_GDPR_FLAG = 'x-atlassian-force-account-id'; const ATLASSIAN_TOKEN_CHECK_FLAG = 'X-Atlassian-Token'; @@ -15,12 +17,13 @@ export class BaseClient implements Client { constructor(protected readonly config: Config) { try { - // eslint-disable-next-line no-new - new URL(config.host); + this.config = ConfigSchema.parse(config); } catch (e) { - throw new Error( - "Couldn't parse the host URL. Perhaps you forgot to add 'http://' or 'https://' at the beginning of the URL?", - ); + if (e instanceof ZodError && e.errors[0].message === 'Invalid url') { + throw new Error('Couldn\'t parse the host URL. Perhaps you forgot to add \'http://\' or \'https://\' at the beginning of the URL?'); + } + + throw e; } this.instance = axios.create({ @@ -44,20 +47,16 @@ export class BaseClient implements Client { } if (Array.isArray(value)) { - // eslint-disable-next-line no-param-reassign value = value.join(','); } if (value instanceof Date) { - // eslint-disable-next-line no-param-reassign value = value.toISOString(); } else if (value !== null && typeof value === 'object') { - // eslint-disable-next-line no-param-reassign value = JSON.stringify(value); } else if (value instanceof Function) { const part = value(); - // eslint-disable-next-line consistent-return return part && parts.push(part); } @@ -83,8 +82,8 @@ export class BaseClient implements Client { .reduce((accumulator, [key, value]) => ({ ...accumulator, [key]: value }), {}); } - async sendRequest(requestConfig: RequestConfig, callback: never, telemetryData?: any): Promise; - async sendRequest(requestConfig: RequestConfig, callback: Callback, telemetryData?: any): Promise; + async sendRequest(requestConfig: RequestConfig, callback: never): Promise; + async sendRequest(requestConfig: RequestConfig, callback: Callback): Promise; async sendRequest(requestConfig: RequestConfig, callback: Callback | never): Promise { try { const response = await this.sendRequestFullResponse(requestConfig); @@ -121,8 +120,8 @@ export class BaseClient implements Client { handleFailedResponse(e: unknown, callback?: Callback | never): void { const err = this.buildErrorHandlingResponse(e); - const callbackErrorHandler = callback && ((error: Config.Error) => callback(error)); - const defaultErrorHandler = (error: Config.Error) => { + const callbackErrorHandler = callback && ((error: JiraError) => callback(error)); + const defaultErrorHandler = (error: JiraError) => { throw error; }; @@ -133,15 +132,15 @@ export class BaseClient implements Client { return errorHandler(err); } - private buildErrorHandlingResponse(e: unknown): Config.Error { + private buildErrorHandlingResponse(e: unknown): JiraError { if (axios.isAxiosError(e) && e.response) { return new HttpException( { code: e.code, message: e.message, data: e.response.data, - status: e.response?.status, - statusText: e.response?.statusText, + status: e.response.status, + statusText: e.response.statusText, }, e.response.status, { cause: e }, diff --git a/src/clients/client.ts b/src/clients/client.ts index 2f697f1f6f..043e13fccf 100644 --- a/src/clients/client.ts +++ b/src/clients/client.ts @@ -3,10 +3,11 @@ import type { Callback } from '../callback'; import type { RequestConfig } from '../requestConfig'; export interface Client { - sendRequest(requestConfig: RequestConfig, callback?: never, telemetryData?: any): Promise; - sendRequest(requestConfig: RequestConfig, callback?: Callback, telemetryData?: any): Promise; + sendRequest(requestConfig: RequestConfig, callback?: never): Promise; + sendRequest(requestConfig: RequestConfig, callback?: Callback): Promise; sendRequestFullResponse(requestConfig: RequestConfig): Promise>; + // eslint-disable-next-line @typescript-eslint/no-explicit-any handleSuccessResponse(response: any, callback?: Callback | undefined | never): T | void; handleFailedResponse(e: Error, callback?: Callback | never): void; } diff --git a/src/clients/httpException.ts b/src/clients/httpException.ts index 0e71522f8c..ad4b1f736d 100644 --- a/src/clients/httpException.ts +++ b/src/clients/httpException.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ export const isUndefined = (obj: any): obj is undefined => typeof obj === 'undefined'; export const isNil = (val: any): val is null | undefined => isUndefined(val) || val === null; diff --git a/src/config.ts b/src/config.ts index 5d661c62dc..c17ffa4b81 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,75 +1,53 @@ +import { z } from 'zod'; import { AxiosError } from 'axios'; -import { RequestConfig } from './requestConfig'; -import { UtilityTypes } from './utilityTypes'; import { HttpException } from './clients'; -export interface Config { - host: string; - strictGDPR?: boolean; - /** Adds `'X-Atlassian-Token': 'no-check'` to each request header */ - noCheckAtlassianToken?: boolean; - baseRequestConfig?: Config.BaseRequestConfig; - authentication?: Config.Authentication; - middlewares?: Config.Middlewares; -} - -export namespace Config { - export type BaseRequestConfig = RequestConfig; - export type Error = AxiosError | HttpException; - - export type Authentication = UtilityTypes.XOR3< - { - personalAccessToken: Authentication.PersonalAccessToken; - }, - { - basic: Authentication.Basic; - }, - { - oauth2: Authentication.OAuth2; - } - >; - - export interface Middlewares { - onError?: Config.Middlewares.OnErrorHandler; - onResponse?: Config.Middlewares.OnResponseHandler; - } - - export namespace Middlewares { - export type OnErrorHandler = (error: Config.Error) => void; - export type OnResponseHandler = (data: any) => void; - } - - export namespace Authentication { - export type JWT = { - /** The key from the app descriptor. */ - issuer: string; - /** The sharedsecret key received during the app installation handshake */ - secret: string; - /** Token expiry time (default 3 minutes after issuing) */ - expiryTimeSeconds?: number; - }; - - export type Basic = UtilityTypes.XOR< - { - email: string; - apiToken: string; - }, - { - username: string; - password: string; - } - >; - - export interface OAuth { - consumerKey: string; - consumerSecret: string; - accessToken: string; - tokenSecret: string; - } - - export type OAuth2 = { - accessToken: string; - }; - export type PersonalAccessToken = string; - } -} +// Authentication schemas +// const JWTSchema = z.object({ +// issuer: z.string(), +// secret: z.string(), +// expiryTimeSeconds: z.number().optional() +// }); + +export const BasicAuthSchema = z + .object({ + email: z.string(), + apiToken: z.string(), + }) + .strict(); + +export type BasicAuth = z.infer; + +export const OAuth2Schema = z + .object({ + accessToken: z.string(), + }) + .strict(); + +export type OAuth2 = z.infer; + +// Middlewares schemas +export const MiddlewaresSchema = z + .object({ + onError: z.function().args(z.any()).returns(z.void()).optional(), + onResponse: z.function().args(z.any()).returns(z.void()).optional(), + }) + .strict(); + +export type Middlewares = z.infer; + +export const ConfigSchema = z + .object({ + host: z.string().url(), + strictGDPR: z.boolean().optional(), + /** Adds `'X-Atlassian-Token': 'no-check'` to each request header */ + noCheckAtlassianToken: z.boolean().optional(), + baseRequestConfig: z.any().optional(), + authentication: z.union([z.object({ basic: BasicAuthSchema }), z.object({ oauth2: OAuth2Schema })]).optional(), + middlewares: MiddlewaresSchema.optional(), + }) + .strict(); + +export type Config = z.infer; + +export type JiraError = AxiosError | HttpException; diff --git a/src/createClient.ts b/src/createClient.ts index a71bb7b408..5528675077 100644 --- a/src/createClient.ts +++ b/src/createClient.ts @@ -15,6 +15,7 @@ export enum ClientType { export function createClient(clientType: ClientType.Agile, config: Config): AgileClient; export function createClient(clientType: ClientType.Version2, config: Config): Version2Client; export function createClient(clientType: ClientType.Version3, config: Config): Version3Client; +export function createClient(clientType: ClientType.ServiceDesk, config: Config): ServiceDeskClient; export function createClient(clientType: ClientType, config: Config): BaseClient { switch (clientType) { case ClientType.Agile: diff --git a/src/index.ts b/src/index.ts index 0ece6d8aaf..36726e0d98 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,5 @@ export * from './createClient'; export * from './clients'; -export * from './utilityTypes'; export * from './config'; export * from './callback'; export * from './paginated'; diff --git a/src/paginated.ts b/src/paginated.ts index 27855a381e..b1ab943a8d 100644 --- a/src/paginated.ts +++ b/src/paginated.ts @@ -1,7 +1,12 @@ export type Paginated = { + /** The maximum number of items that could be returned. */ maxResults: number; + /** The index of the first item returned. */ startAt: number; + /** The number of items returned. */ total: number; + /** Whether this is the last page. */ isLast: boolean; + /** The list of items. */ values: T[]; }; diff --git a/src/serviceDesk/models/customerRequestFieldValue.ts b/src/serviceDesk/models/customerRequestFieldValue.ts index 549801225f..173f78f30b 100644 --- a/src/serviceDesk/models/customerRequestFieldValue.ts +++ b/src/serviceDesk/models/customerRequestFieldValue.ts @@ -4,7 +4,7 @@ export interface CustomerRequestFieldValue { /** Text label for the field. */ label?: string; /** Value of the field. */ - value?: {}; + value?: unknown; /** Value of the field rendered in the UI. */ - renderedValue?: {}; + renderedValue?: unknown; } diff --git a/src/serviceDesk/models/entityProperty.ts b/src/serviceDesk/models/entityProperty.ts index 93913c5bf9..f462be1cb1 100644 --- a/src/serviceDesk/models/entityProperty.ts +++ b/src/serviceDesk/models/entityProperty.ts @@ -6,5 +6,5 @@ export interface EntityProperty { /** The key of the property. Required on create and update. */ key?: string; /** The value of the property. Required on create and update. */ - value?: {}; + value?: unknown; } diff --git a/src/serviceDesk/models/issueTransition.ts b/src/serviceDesk/models/issueTransition.ts index dc7f8afd37..fac0406880 100644 --- a/src/serviceDesk/models/issueTransition.ts +++ b/src/serviceDesk/models/issueTransition.ts @@ -21,7 +21,7 @@ export interface IssueTransition { * Details of the fields associated with the issue transition screen. Use this information to populate `fields` and * `update` in a transition request. */ - fields?: {}; + fields?: unknown; /** Expand options that include additional transition details in the response. */ expand?: string; looped?: boolean; diff --git a/src/serviceDesk/models/jsonType.ts b/src/serviceDesk/models/jsonType.ts index 2b50ec5e12..53b80738db 100644 --- a/src/serviceDesk/models/jsonType.ts +++ b/src/serviceDesk/models/jsonType.ts @@ -11,5 +11,5 @@ export interface JsonType { /** If the field is a custom field, the custom ID of the field. */ customId?: number; /** If the field is a custom field, the configuration of the field. */ - configuration?: {}; + configuration?: unknown; } diff --git a/src/serviceDesk/models/requestCreate.ts b/src/serviceDesk/models/requestCreate.ts index 010c6b3f5b..da9db845c9 100644 --- a/src/serviceDesk/models/requestCreate.ts +++ b/src/serviceDesk/models/requestCreate.ts @@ -4,7 +4,7 @@ export interface RequestCreate { /** ID of the request type for the request. */ requestTypeId?: string; /** JSON map of Jira field IDs and their values representing the content of the request. */ - requestFieldValues?: {}; + requestFieldValues?: unknown; /** List of customers to participate in the request, as a list of `accountId` values. */ requestParticipants?: string[]; /** The `accountId` of the customer that the request is being raised on behalf of. */ diff --git a/src/serviceDesk/models/requestTypeIconLink.ts b/src/serviceDesk/models/requestTypeIconLink.ts index 14743f9c1d..213bf3493a 100644 --- a/src/serviceDesk/models/requestTypeIconLink.ts +++ b/src/serviceDesk/models/requestTypeIconLink.ts @@ -1,4 +1,4 @@ export interface RequestTypeIconLink { /** URLs for the request type icons. */ - iconUrls?: {}; + iconUrls?: unknown; } diff --git a/src/serviceDesk/parameters/attachTemporaryFile.ts b/src/serviceDesk/parameters/attachTemporaryFile.ts index e9d0d7a7cc..d68513d969 100644 --- a/src/serviceDesk/parameters/attachTemporaryFile.ts +++ b/src/serviceDesk/parameters/attachTemporaryFile.ts @@ -1,3 +1,5 @@ +import type { Readable } from 'node:stream'; + /** * Represents an attachment to be temporarily attached to a Service Desk. * @@ -35,7 +37,7 @@ export interface Attachment { * const fileContent = Buffer.from('Example content here'); * ``` */ - file: Buffer | ReadableStream | string | Blob | File; + file: Buffer | ReadableStream | Readable | string | Blob | File; /** * Optional MIME type of the attachment. Example values include: diff --git a/src/serviceDesk/serviceDesk.ts b/src/serviceDesk/serviceDesk.ts index f7ec53e7a3..c4df7446bc 100644 --- a/src/serviceDesk/serviceDesk.ts +++ b/src/serviceDesk/serviceDesk.ts @@ -1,4 +1,4 @@ -import { FormData, File } from 'formdata-node'; +import mime, { Mime } from 'mime'; import * as Models from './models'; import * as Parameters from './parameters'; import { Callback } from '../callback'; @@ -85,7 +85,7 @@ export class ServiceDesk { /** * This method adds one or more temporary attachments to a service desk, which can then be permanently attached to a * customer request using - * [servicedeskapi/request/{issueIdOrKey}/attachment](#api-request-issueIdOrKey-attachment-post). + * [servicedeskapi/request/{issueIdOrKey}/attachment](https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk/#api-rest-servicedeskapi-servicedesk-servicedeskid-attachtemporaryfile-post). * * **Note**: It is possible for a service desk administrator to turn off the ability to add attachments to a service * desk. @@ -100,7 +100,7 @@ export class ServiceDesk { /** * This method adds one or more temporary attachments to a service desk, which can then be permanently attached to a * customer request using - * [servicedeskapi/request/{issueIdOrKey}/attachment](#api-request-issueIdOrKey-attachment-post). + * [servicedeskapi/request/{issueIdOrKey}/attachment](https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk/#api-rest-servicedeskapi-servicedesk-servicedeskid-attachtemporaryfile-post). * * **Note**: It is possible for a service desk administrator to turn off the ability to add attachments to a service * desk. @@ -116,16 +116,23 @@ export class ServiceDesk { const formData = new FormData(); const attachments = Array.isArray(parameters.attachment) ? parameters.attachment : [parameters.attachment]; - const { default: mime } = await import('mime'); + let Readable: typeof import('stream').Readable | undefined; - attachments.forEach(attachment => { - const mimeType = attachment.mimeType ?? (mime.getType(attachment.filename) || undefined); - const file = Buffer.isBuffer(attachment.file) - ? new File([attachment.file], attachment.filename, { type: mimeType }) - : attachment.file; + if (typeof window === 'undefined') { + const { Readable: NodeReadable } = await import('stream'); + + Readable = NodeReadable; + } + + for await (const attachment of attachments) { + const file = await this._convertToFile(attachment, mime, Readable); + + if (!(file instanceof File || file instanceof Blob)) { + throw new Error(`Unsupported file type for attachment: ${typeof file}`); + } formData.append('file', file, attachment.filename); - }); + } const config: RequestConfig = { url: `/rest/servicedeskapi/servicedesk/${parameters.serviceDeskId}/attachTemporaryFile`, @@ -808,4 +815,74 @@ export class ServiceDesk { return this.client.sendRequest(config, callback); } + + private async _convertToFile( + attachment: Parameters.Attachment, + mime: Mime, + Readable?: typeof import('stream').Readable, + ): Promise { + const mimeType = attachment.mimeType ?? (mime.getType(attachment.filename) || undefined); + + if (attachment.file instanceof Blob || attachment.file instanceof File) { + return attachment.file; + } + + if (typeof attachment.file === 'string') { + return new File([attachment.file], attachment.filename, { type: mimeType }); + } + + if (Readable && attachment.file instanceof Readable) { + return this._streamToBlob(attachment.file, attachment.filename, mimeType); + } + + if (attachment.file instanceof ReadableStream) { + return this._streamToBlob(attachment.file, attachment.filename, mimeType); + } + + if (ArrayBuffer.isView(attachment.file) || attachment.file instanceof ArrayBuffer) { + return new File([attachment.file], attachment.filename, { type: mimeType }); + } + + throw new Error('Unsupported attachment file type.'); + } + + private async _streamToBlob( + stream: import('stream').Readable | ReadableStream, + filename: string, + mimeType?: string, + ): Promise { + if (typeof window === 'undefined' && stream instanceof (await import('stream')).Readable) { + return new Promise((resolve, reject) => { + const chunks: Uint8Array[] = []; + + stream.on('data', chunk => chunks.push(chunk)); + stream.on('end', () => { + const blob = new Blob(chunks, { type: mimeType }); + + resolve(new File([blob], filename, { type: mimeType })); + }); + stream.on('error', reject); + }); + } + + if (stream instanceof ReadableStream) { + const reader = stream.getReader(); + const chunks: Uint8Array[] = []; + + let done = false; + + while (!done) { + const { value, done: streamDone } = await reader.read(); + + if (value) chunks.push(value); + done = streamDone; + } + + const blob = new Blob(chunks, { type: mimeType }); + + return new File([blob], filename, { type: mimeType }); + } + + throw new Error('Unsupported stream type.'); + } } diff --git a/src/services/authenticationService/authentications/createBasicAuthenticationToken.ts b/src/services/authenticationService/authentications/createBasicAuthenticationToken.ts index cdfc71804d..d711e136dd 100644 --- a/src/services/authenticationService/authentications/createBasicAuthenticationToken.ts +++ b/src/services/authenticationService/authentications/createBasicAuthenticationToken.ts @@ -1,19 +1,11 @@ -import { Base64Encoder } from '../base64Encoder'; -import { Config } from '../../../config'; +import { encode } from '../base64Encoder'; +import { BasicAuth } from '../../../config'; -export function createBasicAuthenticationToken(authenticationData: Config.Authentication.Basic) { - let login; - let secret; +export function createBasicAuthenticationToken(authenticationData: BasicAuth) { + const login = authenticationData.email; + const secret = authenticationData.apiToken; - if ('username' in authenticationData) { - login = authenticationData.username; - secret = authenticationData.password; - } else { - login = authenticationData.email; - secret = authenticationData.apiToken; - } - - const token = Base64Encoder.encode(`${login}:${secret}`); + const token = encode(`${login}:${secret}`); return `Basic ${token}`; } diff --git a/src/services/authenticationService/authentications/createOAuth2AuthenticationToken.ts b/src/services/authenticationService/authentications/createOAuth2AuthenticationToken.ts index 4ebec8526f..e6e24acb5c 100644 --- a/src/services/authenticationService/authentications/createOAuth2AuthenticationToken.ts +++ b/src/services/authenticationService/authentications/createOAuth2AuthenticationToken.ts @@ -1,5 +1,5 @@ -import { Config } from '../../../config'; +import { OAuth2 } from '../../../config'; -export function createOAuth2AuthenticationToken(authenticationData: Config.Authentication.OAuth2) { +export function createOAuth2AuthenticationToken(authenticationData: OAuth2) { return `Bearer ${authenticationData.accessToken}`; } diff --git a/src/services/authenticationService/authentications/createPATAuthentication.ts b/src/services/authenticationService/authentications/createPATAuthentication.ts deleted file mode 100644 index cde9effb54..0000000000 --- a/src/services/authenticationService/authentications/createPATAuthentication.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Config } from '../../../config'; - -export function createPATAuthentication(pat: Config.Authentication.PersonalAccessToken) { - return `Bearer ${pat}`; -} diff --git a/src/services/authenticationService/authentications/index.ts b/src/services/authenticationService/authentications/index.ts index 0ae8863d09..1eb79feb16 100644 --- a/src/services/authenticationService/authentications/index.ts +++ b/src/services/authenticationService/authentications/index.ts @@ -1,3 +1,2 @@ export * from './createBasicAuthenticationToken'; export * from './createOAuth2AuthenticationToken'; -export * from './createPATAuthentication'; diff --git a/src/services/authenticationService/base64Encoder.ts b/src/services/authenticationService/base64Encoder.ts index f20d74e9b8..0ff7907ef9 100644 --- a/src/services/authenticationService/base64Encoder.ts +++ b/src/services/authenticationService/base64Encoder.ts @@ -1,69 +1,66 @@ -/* eslint-disable */ /** @copyright The code was taken from the portal http://www.webtoolkit.info/javascript-base64.html */ -export namespace Base64Encoder { - const base64Sequence = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; +const base64Sequence = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; - const utf8Encode = (value: string) => { - value = value.replace(/\r\n/g, '\n'); +const utf8Encode = (value: string) => { + value = value.replace(/\r\n/g, '\n'); - let utftext = ''; + let utftext = ''; - for (let n = 0; n < value.length; n++) { - const c = value.charCodeAt(n); + for (let n = 0; n < value.length; n++) { + const c = value.charCodeAt(n); - if (c < 128) { - utftext += String.fromCharCode(c); - } else if (c > 127 && c < 2048) { - utftext += String.fromCharCode((c >> 6) | 192); + if (c < 128) { + utftext += String.fromCharCode(c); + } else if (c > 127 && c < 2048) { + utftext += String.fromCharCode((c >> 6) | 192); - utftext += String.fromCharCode((c & 63) | 128); - } else { - utftext += String.fromCharCode((c >> 12) | 224); + utftext += String.fromCharCode((c & 63) | 128); + } else { + utftext += String.fromCharCode((c >> 12) | 224); - utftext += String.fromCharCode(((c >> 6) & 63) | 128); + utftext += String.fromCharCode(((c >> 6) & 63) | 128); - utftext += String.fromCharCode((c & 63) | 128); - } + utftext += String.fromCharCode((c & 63) | 128); } - - return utftext; - }; - - export const encode = (input: string) => { - let output = ''; - let chr1; - let chr2; - let chr3; - let enc1; - let enc2; - let enc3; - let enc4; - let i = 0; - - input = utf8Encode(input); - - while (i < input.length) { - chr1 = input.charCodeAt(i++); - chr2 = input.charCodeAt(i++); - chr3 = input.charCodeAt(i++); - - enc1 = chr1 >> 2; - enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); - enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); - enc4 = chr3 & 63; - - if (isNaN(chr2)) { - enc3 = enc4 = 64; - } else if (isNaN(chr3)) { - enc4 = 64; - } - - output += `${base64Sequence.charAt(enc1)}${base64Sequence.charAt(enc2)}${base64Sequence.charAt( - enc3, - )}${base64Sequence.charAt(enc4)}`; + } + + return utftext; +}; + +export const encode = (input: string) => { + let output = ''; + let chr1; + let chr2; + let chr3; + let enc1; + let enc2; + let enc3; + let enc4; + let i = 0; + + input = utf8Encode(input); + + while (i < input.length) { + chr1 = input.charCodeAt(i++); + chr2 = input.charCodeAt(i++); + chr3 = input.charCodeAt(i++); + + enc1 = chr1 >> 2; + enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); + enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); + enc4 = chr3 & 63; + + if (isNaN(chr2)) { + enc3 = enc4 = 64; + } else if (isNaN(chr3)) { + enc4 = 64; } - return output; - }; -} + output += `${base64Sequence.charAt(enc1)}${base64Sequence.charAt(enc2)}${base64Sequence.charAt( + enc3, + )}${base64Sequence.charAt(enc4)}`; + } + + return output; +}; diff --git a/src/services/authenticationService/getAuthenticationToken.ts b/src/services/authenticationService/getAuthenticationToken.ts index 85e0ef8ddb..f8a8d3097c 100644 --- a/src/services/authenticationService/getAuthenticationToken.ts +++ b/src/services/authenticationService/getAuthenticationToken.ts @@ -1,18 +1,14 @@ import { Config } from '../../config'; -import { - createBasicAuthenticationToken, - createOAuth2AuthenticationToken, - createPATAuthentication, -} from './authentications'; +import { createBasicAuthenticationToken, createOAuth2AuthenticationToken } from './authentications'; export async function getAuthenticationToken( - authentication: Config.Authentication | undefined, + authentication: Config['authentication'] | undefined, ): Promise { if (!authentication) { return undefined; } - if (authentication.basic) { + if ('basic' in authentication) { return createBasicAuthenticationToken(authentication.basic); } @@ -20,9 +16,5 @@ export async function getAuthenticationToken( return createOAuth2AuthenticationToken(authentication.oauth2); } - if (authentication.personalAccessToken) { - return createPATAuthentication(authentication.personalAccessToken); - } - return undefined; } diff --git a/src/utilityTypes.ts b/src/utilityTypes.ts deleted file mode 100644 index 55915460e0..0000000000 --- a/src/utilityTypes.ts +++ /dev/null @@ -1,10 +0,0 @@ -export namespace UtilityTypes { - /** Mark some properties which only the former including as optional and set the value to never */ - export type Without = { [P in Exclude]?: never }; - - /** Get the XOR type which could make 2 types exclude each other */ - export type XOR = T | U extends object ? (Without & U) | (Without & T) : T | U; - - /** Get the XOR type for 3 types */ - export type XOR3 = XOR, V>; -} diff --git a/src/version2/announcementBanner.ts b/src/version2/announcementBanner.ts index ee04cbf709..61cf4586b3 100644 --- a/src/version2/announcementBanner.ts +++ b/src/version2/announcementBanner.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class AnnouncementBanner { diff --git a/src/version2/appDataPolicies.ts b/src/version2/appDataPolicies.ts new file mode 100644 index 0000000000..4fe49eb9cc --- /dev/null +++ b/src/version2/appDataPolicies.ts @@ -0,0 +1,42 @@ +import * as Models from './models'; +import * as Parameters from './parameters'; +import { Client } from '../clients'; +import { Callback } from '../callback'; +import { RequestConfig } from '../requestConfig'; + +export class AppDataPolicies { + constructor(private client: Client) {} + /** Returns data policy for the workspace. */ + async getPolicy(callback: Callback): Promise; + /** Returns data policy for the workspace. */ + async getPolicy(callback?: never): Promise; + async getPolicy(callback?: Callback): Promise { + const config: RequestConfig = { + url: '/rest/api/2/data-policy', + method: 'GET', + }; + + return this.client.sendRequest(config, callback); + } + /** Returns data policies for the projects specified in the request. */ + async getPolicies( + parameters: Parameters.GetPolicies | undefined, + callback: Callback, + ): Promise; + /** Returns data policies for the projects specified in the request. */ + async getPolicies(parameters?: Parameters.GetPolicies, callback?: never): Promise; + async getPolicies( + parameters?: Parameters.GetPolicies, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/data-policy/project', + method: 'GET', + params: { + ids: parameters?.ids, + }, + }; + + return this.client.sendRequest(config, callback); + } +} diff --git a/src/version2/appMigration.ts b/src/version2/appMigration.ts index d199d8bd9c..4d894ad020 100644 --- a/src/version2/appMigration.ts +++ b/src/version2/appMigration.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class AppMigration { @@ -12,7 +12,7 @@ export class AppMigration { * fields can be updated. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only - * Connect apps can make this request. + * Connect apps can make this request */ async updateIssueFields(parameters: Parameters.UpdateIssueFields, callback: Callback): Promise; /** @@ -20,7 +20,7 @@ export class AppMigration { * fields can be updated. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only - * Connect apps can make this request. + * Connect apps can make this request */ async updateIssueFields(parameters: Parameters.UpdateIssueFields, callback?: never): Promise; async updateIssueFields( diff --git a/src/version2/appProperties.ts b/src/version2/appProperties.ts index 75471109a2..5f1b26e071 100644 --- a/src/version2/appProperties.ts +++ b/src/version2/appProperties.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class AppProperties { @@ -11,9 +11,8 @@ export class AppProperties { * Gets all the properties of an app. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only a - * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps published on the - * Marketplace can access properties of Connect apps they were [migrated - * from](https://developer.atlassian.com/platform/forge/build-a-connect-on-forge-app/). + * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app + * properties (stored against the same `app.connect.key`). */ async getAddonProperties( parameters: Parameters.GetAddonProperties | string, @@ -23,9 +22,8 @@ export class AppProperties { * Gets all the properties of an app. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only a - * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps published on the - * Marketplace can access properties of Connect apps they were [migrated - * from](https://developer.atlassian.com/platform/forge/build-a-connect-on-forge-app/). + * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app + * properties (stored against the same `app.connect.key`). */ async getAddonProperties( parameters: Parameters.GetAddonProperties | string, @@ -49,9 +47,8 @@ export class AppProperties { * Returns the key and value of an app's property. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only a - * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps published on the - * Marketplace can access properties of Connect apps they were [migrated - * from](https://developer.atlassian.com/platform/forge/build-a-connect-on-forge-app/). + * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app + * properties (stored against the same `app.connect.key`). */ async getAddonProperty( parameters: Parameters.GetAddonProperty, @@ -61,9 +58,8 @@ export class AppProperties { * Returns the key and value of an app's property. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only a - * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps published on the - * Marketplace can access properties of Connect apps they were [migrated - * from](https://developer.atlassian.com/platform/forge/build-a-connect-on-forge-app/). + * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app + * properties (stored against the same `app.connect.key`). */ async getAddonProperty( parameters: Parameters.GetAddonProperty, @@ -88,7 +84,8 @@ export class AppProperties { * maximum length is 32768 characters. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only a - * Connect app whose key matches `addonKey` can make this request. + * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app + * properties (stored against the same `app.connect.key`). */ async putAddonProperty( parameters: Parameters.PutAddonProperty, @@ -101,7 +98,8 @@ export class AppProperties { * maximum length is 32768 characters. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only a - * Connect app whose key matches `addonKey` can make this request. + * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app + * properties (stored against the same `app.connect.key`). */ async putAddonProperty( parameters: Parameters.PutAddonProperty, @@ -124,14 +122,16 @@ export class AppProperties { * Deletes an app's property. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only a - * Connect app whose key matches `addonKey` can make this request. + * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app + * properties (stored against the same `app.connect.key`). */ async deleteAddonProperty(parameters: Parameters.DeleteAddonProperty, callback: Callback): Promise; /** * Deletes an app's property. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only a - * Connect app whose key matches `addonKey` can make this request. + * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app + * properties (stored against the same `app.connect.key`). */ async deleteAddonProperty(parameters: Parameters.DeleteAddonProperty, callback?: never): Promise; async deleteAddonProperty( @@ -149,7 +149,9 @@ export class AppProperties { /** * Sets the value of a Forge app's property. These values can be retrieved in [Jira * expressions](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/) through the `app` [context - * variable](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/#context-variables). + * variable](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/#context-variables). They are also + * available in [entity property display + * conditions](/platform/forge/manifest-reference/display-conditions/entity-property-conditions/). * * For other use cases, use the [Storage * API](https://developer.atlassian.com/platform/forge/runtime-reference/storage-api/). @@ -159,6 +161,9 @@ export class AppProperties { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only * Forge apps can make this request. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async putAppProperty( parameters: Parameters.PutAppProperty, @@ -167,7 +172,9 @@ export class AppProperties { /** * Sets the value of a Forge app's property. These values can be retrieved in [Jira * expressions](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/) through the `app` [context - * variable](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/#context-variables). + * variable](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/#context-variables). They are also + * available in [entity property display + * conditions](/platform/forge/manifest-reference/display-conditions/entity-property-conditions/). * * For other use cases, use the [Storage * API](https://developer.atlassian.com/platform/forge/runtime-reference/storage-api/). @@ -177,6 +184,9 @@ export class AppProperties { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only * Forge apps can make this request. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async putAppProperty( parameters: Parameters.PutAppProperty, @@ -186,7 +196,6 @@ export class AppProperties { parameters: Parameters.PutAppProperty, callback?: Callback, ): Promise { - // todo const config: RequestConfig = { url: `/rest/forge/1/app/properties/${parameters.propertyKey}`, method: 'PUT', @@ -201,6 +210,9 @@ export class AppProperties { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only * Forge apps can make this request. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async deleteAppProperty(parameters: Parameters.DeleteAppProperty, callback: Callback): Promise; /** @@ -208,6 +220,9 @@ export class AppProperties { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only * Forge apps can make this request. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async deleteAppProperty(parameters: Parameters.DeleteAppProperty, callback?: never): Promise; async deleteAppProperty( diff --git a/src/version2/applicationRoles.ts b/src/version2/applicationRoles.ts index 7ca79fcf85..e2b9487da8 100644 --- a/src/version2/applicationRoles.ts +++ b/src/version2/applicationRoles.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ApplicationRoles { diff --git a/src/version2/auditRecords.ts b/src/version2/auditRecords.ts index 63a15b6768..105e06daab 100644 --- a/src/version2/auditRecords.ts +++ b/src/version2/auditRecords.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class AuditRecords { diff --git a/src/version2/avatars.ts b/src/version2/avatars.ts index 799b5fbd64..d2d6b42018 100644 --- a/src/version2/avatars.ts +++ b/src/version2/avatars.ts @@ -1,14 +1,15 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Avatars { constructor(private client: Client) {} /** - * Returns a list of system avatar details by owner type, where the owner types are issue type, project, or user. + * Returns a list of system avatar details by owner type, where the owner types are issue type, project, user or + * priority. * * This operation can be accessed anonymously. * @@ -19,7 +20,8 @@ export class Avatars { callback: Callback, ): Promise; /** - * Returns a list of system avatar details by owner type, where the owner types are issue type, project, or user. + * Returns a list of system avatar details by owner type, where the owner types are issue type, project, user or + * priority. * * This operation can be accessed anonymously. * @@ -42,9 +44,8 @@ export class Avatars { return this.client.sendRequest(config, callback); } - /** - * Returns the system and custom avatars for a project or issue type. + * Returns the system and custom avatars for a project, issue type or priority. * * This operation can be accessed anonymously. * @@ -55,10 +56,11 @@ export class Avatars { * - For custom issue type avatars, _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) * for at least one project the issue type is used in. * - For system avatars, none. + * - For priority avatars, none. */ async getAvatars(parameters: Parameters.GetAvatars, callback: Callback): Promise; /** - * Returns the system and custom avatars for a project or issue type. + * Returns the system and custom avatars for a project, issue type or priority. * * This operation can be accessed anonymously. * @@ -69,6 +71,7 @@ export class Avatars { * - For custom issue type avatars, _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) * for at least one project the issue type is used in. * - For system avatars, none. + * - For priority avatars, none. */ async getAvatars(parameters: Parameters.GetAvatars, callback?: never): Promise; async getAvatars(parameters: Parameters.GetAvatars, callback?: Callback): Promise { @@ -81,13 +84,7 @@ export class Avatars { } /** - * Loads a custom avatar for a project or issue type. - * - * Specify the avatar's local file location in the body of the request. Also, include the following headers: - * - * - `X-Atlassian-Token: no-check` To prevent XSRF protection blocking the request, for more information see [Special - * Headers](#special-request-headers). - * - `Content-Type: image/image type` Valid image types are JPEG, GIF, or PNG. + * Loads a custom avatar for a project, issue type or priority. * * The 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. @@ -99,19 +96,14 @@ export class Avatars { * - [Update issue type](#api-rest-api-2-issuetype-id-put) to set it as the issue type's displayed avatar. * - [Set project avatar](#api-rest-api-2-project-projectIdOrKey-avatar-put) to set it as the project's displayed * avatar. + * - [Update priority](#api-rest-api-2-priority-id-put) to set it as the priority's displayed avatar. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async storeAvatar(parameters: Parameters.StoreAvatar, callback: Callback): Promise; /** - * Loads a custom avatar for a project or issue type. - * - * Specify the avatar's local file location in the body of the request. Also, include the following headers: - * - * - `X-Atlassian-Token: no-check` To prevent XSRF protection blocking the request, for more information see [Special - * Headers](#special-request-headers). - * - `Content-Type: image/image type` Valid image types are JPEG, GIF, or PNG. + * Loads a custom avatar for a project, issue type or priority. * * The 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. @@ -123,6 +115,7 @@ export class Avatars { * - [Update issue type](#api-rest-api-2-issuetype-id-put) to set it as the issue type's displayed avatar. * - [Set project avatar](#api-rest-api-2-project-projectIdOrKey-avatar-put) to set it as the project's displayed * avatar. + * - [Update priority](#api-rest-api-2-priority-id-put) to set it as the priority's displayed avatar. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). @@ -132,10 +125,14 @@ export class Avatars { const config: RequestConfig = { url: `/rest/api/2/universal_avatar/type/${parameters.type}/owner/${parameters.entityId}`, method: 'POST', + headers: { + 'X-Atlassian-Token': 'no-check', + 'Content-Type': parameters.mimeType, + }, params: { x: parameters.x, y: parameters.y, - size: parameters.size, + size: parameters.size ?? 0, }, data: parameters.avatar, }; @@ -144,14 +141,14 @@ export class Avatars { } /** - * Deletes an avatar from a project or issue type. + * Deletes an avatar from a project, issue type or priority. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async deleteAvatar(parameters: Parameters.DeleteAvatar, callback: Callback): Promise; /** - * Deletes an avatar from a project or issue type. + * Deletes an avatar from a project, issue type or priority. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). @@ -167,7 +164,7 @@ export class Avatars { } /** - * Returns the default project or issue type avatar image. + * Returns the default project, issue type or priority avatar image. * * This operation can be accessed anonymously. * @@ -178,7 +175,7 @@ export class Avatars { callback: Callback, ): Promise; /** - * Returns the default project or issue type avatar image. + * Returns the default project, issue type or priority avatar image. * * This operation can be accessed anonymously. * @@ -199,8 +196,8 @@ export class Avatars { method: 'GET', responseType: 'arraybuffer', params: { - size: typeof parameters !== 'string' && parameters.size, - format: typeof parameters !== 'string' && parameters.format, + size: typeof parameters !== 'string' ? parameters.size : undefined, + format: typeof parameters !== 'string' ? parameters.format : undefined, }, }; @@ -215,7 +212,7 @@ export class Avatars { } /** - * Returns a project or issue type avatar image by ID. + * Returns a project, issue type or priority avatar image by ID. * * This operation can be accessed anonymously. * @@ -226,13 +223,14 @@ export class Avatars { * the project the avatar belongs to. * - For custom issue type avatars, _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) * for at least one project the issue type is used in. + * - For priority avatars, none. */ async getAvatarImageByID( parameters: Parameters.GetAvatarImageByID, callback: Callback, ): Promise; /** - * Returns a project or issue type avatar image by ID. + * Returns a project, issue type or priority avatar image by ID. * * This operation can be accessed anonymously. * @@ -243,6 +241,7 @@ export class Avatars { * the project the avatar belongs to. * - For custom issue type avatars, _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) * for at least one project the issue type is used in. + * - For priority avatars, none. */ async getAvatarImageByID( parameters: Parameters.GetAvatarImageByID, @@ -273,7 +272,7 @@ export class Avatars { } /** - * Returns the avatar image for a project or issue type. + * Returns the avatar image for a project, issue type or priority. * * This operation can be accessed anonymously. * @@ -284,13 +283,14 @@ export class Avatars { * the project the avatar belongs to. * - For custom issue type avatars, _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) * for at least one project the issue type is used in. + * - For priority avatars, none. */ async getAvatarImageByOwner( parameters: Parameters.GetAvatarImageByOwner, callback: Callback, ): Promise; /** - * Returns the avatar image for a project or issue type. + * Returns the avatar image for a project, issue type or priority. * * This operation can be accessed anonymously. * @@ -301,6 +301,7 @@ export class Avatars { * the project the avatar belongs to. * - For custom issue type avatars, _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) * for at least one project the issue type is used in. + * - For priority avatars, none. */ async getAvatarImageByOwner( parameters: Parameters.GetAvatarImageByOwner, diff --git a/src/version2/classificationLevels.ts b/src/version2/classificationLevels.ts new file mode 100644 index 0000000000..7e53a93441 --- /dev/null +++ b/src/version2/classificationLevels.ts @@ -0,0 +1,43 @@ +import * as Models from './models'; +import * as Parameters from './parameters'; +import { Client } from '../clients'; +import { Callback } from '../callback'; +import { RequestConfig } from '../requestConfig'; + +export class ClassificationLevels { + constructor(private client: Client) {} + + /** + * Returns all classification levels. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. + */ + async getAllUserDataClassificationLevels( + parameters: Parameters.GetAllUserDataClassificationLevels | undefined, + callback: Callback, + ): Promise; + /** + * Returns all classification levels. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. + */ + async getAllUserDataClassificationLevels( + parameters?: Parameters.GetAllUserDataClassificationLevels, + callback?: never, + ): Promise; + async getAllUserDataClassificationLevels( + parameters?: Parameters.GetAllUserDataClassificationLevels, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/classification-levels', + method: 'GET', + params: { + status: parameters?.status, + orderBy: parameters?.orderBy, + }, + }; + + return this.client.sendRequest(config, callback); + } +} diff --git a/src/version2/client/version2Client.ts b/src/version2/client/version2Client.ts index a7413e6940..0934c399c4 100644 --- a/src/version2/client/version2Client.ts +++ b/src/version2/client/version2Client.ts @@ -1,10 +1,12 @@ import { BaseClient } from '../../clients/baseClient'; import { AnnouncementBanner } from '../announcementBanner'; +import { AppDataPolicies } from '../appDataPolicies'; import { ApplicationRoles } from '../applicationRoles'; import { AppMigration } from '../appMigration'; import { AppProperties } from '../appProperties'; import { AuditRecords } from '../auditRecords'; import { Avatars } from '../avatars'; +import { ClassificationLevels } from '../classificationLevels'; import { Dashboards } from '../dashboards'; import { DynamicModules } from '../dynamicModules'; import { Filters } from '../filters'; @@ -50,8 +52,11 @@ import { LicenseMetrics } from '../licenseMetrics'; import { Myself } from '../myself'; import { Permissions } from '../permissions'; import { PermissionSchemes } from '../permissionSchemes'; +import { Plans } from '../plans'; +import { PrioritySchemes } from '../prioritySchemes'; import { ProjectAvatars } from '../projectAvatars'; import { ProjectCategories } from '../projectCategories'; +import { ProjectClassificationLevels } from '../projectClassificationLevels'; import { ProjectComponents } from '../projectComponents'; import { ProjectEmail } from '../projectEmail'; import { ProjectFeatures } from '../projectFeatures'; @@ -68,8 +73,10 @@ import { ScreenSchemes } from '../screenSchemes'; import { ScreenTabFields } from '../screenTabFields'; import { ScreenTabs } from '../screenTabs'; import { ServerInfo } from '../serverInfo'; +import { ServiceRegistry } from '../serviceRegistry'; import { Status } from '../status'; import { Tasks } from '../tasks'; +import { TeamsInPlan } from '../teamsInPlan'; import { TimeTracking } from '../timeTracking'; import { UIModificationsApps } from '../uIModificationsApps'; import { UserProperties } from '../userProperties'; @@ -87,11 +94,13 @@ import { WorkflowTransitionRules } from '../workflowTransitionRules'; export class Version2Client extends BaseClient { announcementBanner = new AnnouncementBanner(this); + appDataPolicies = new AppDataPolicies(this); applicationRoles = new ApplicationRoles(this); appMigration = new AppMigration(this); appProperties = new AppProperties(this); auditRecords = new AuditRecords(this); avatars = new Avatars(this); + classificationLevels = new ClassificationLevels(this); dashboards = new Dashboards(this); dynamicModules = new DynamicModules(this); filters = new Filters(this); @@ -137,8 +146,11 @@ export class Version2Client extends BaseClient { myself = new Myself(this); permissions = new Permissions(this); permissionSchemes = new PermissionSchemes(this); + plans = new Plans(this); + prioritySchemes = new PrioritySchemes(this); projectAvatars = new ProjectAvatars(this); projectCategories = new ProjectCategories(this); + projectClassificationLevels = new ProjectClassificationLevels(this); projectComponents = new ProjectComponents(this); projectEmail = new ProjectEmail(this); projectFeatures = new ProjectFeatures(this); @@ -155,8 +167,10 @@ export class Version2Client extends BaseClient { screenTabFields = new ScreenTabFields(this); screenTabs = new ScreenTabs(this); serverInfo = new ServerInfo(this); + serviceRegistry = new ServiceRegistry(this); status = new Status(this); tasks = new Tasks(this); + teamsInPlan = new TeamsInPlan(this); timeTracking = new TimeTracking(this); uiModificationsApps = new UIModificationsApps(this); userProperties = new UserProperties(this); diff --git a/src/version2/dashboards.ts b/src/version2/dashboards.ts index 965ae75baf..2aa8a89593 100644 --- a/src/version2/dashboards.ts +++ b/src/version2/dashboards.ts @@ -1,9 +1,9 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; -import { paramSerializer } from '../paramSerializer'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; +import { paramSerializer } from '../paramSerializer'; export class Dashboards { constructor(private client: Client) {} @@ -71,6 +71,9 @@ export class Dashboards { const config: RequestConfig = { url: '/rest/api/2/dashboard', method: 'POST', + params: { + extendAdminPermissions: parameters.extendAdminPermissions, + }, data: { description: parameters.description, editPermissions: parameters.editPermissions, @@ -229,7 +232,7 @@ export class Dashboards { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ async getAllGadgets( - parameters: Parameters.GetAllGadgets, + parameters: Parameters.GetAllGadgets | string, callback: Callback, ): Promise; /** @@ -247,20 +250,22 @@ export class Dashboards { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ async getAllGadgets( - parameters: Parameters.GetAllGadgets, + parameters: Parameters.GetAllGadgets | string, callback?: never, ): Promise; async getAllGadgets( - parameters: Parameters.GetAllGadgets, + parameters: Parameters.GetAllGadgets | string, callback?: Callback, ): Promise { + const dashboardId = typeof parameters === 'string' ? parameters : parameters.dashboardId; + const config: RequestConfig = { - url: `/rest/api/2/dashboard/${parameters.dashboardId}/gadget`, + url: `/rest/api/2/dashboard/${dashboardId}/gadget`, method: 'GET', params: { - moduleKey: paramSerializer('moduleKey', parameters.moduleKey), - uri: parameters.uri, - gadgetId: paramSerializer('gadgetId', parameters.gadgetId), + moduleKey: typeof parameters !== 'string' && paramSerializer('moduleKey', parameters.moduleKey), + uri: typeof parameters !== 'string' && parameters.uri, + gadgetId: typeof parameters !== 'string' && paramSerializer('gadgetId', parameters.gadgetId), }, }; @@ -647,6 +652,9 @@ export class Dashboards { const config: RequestConfig = { url: `/rest/api/2/dashboard/${parameters.id}`, method: 'PUT', + params: { + extendAdminPermissions: parameters.extendAdminPermissions, + }, data: { description: parameters.description, editPermissions: parameters.editPermissions, @@ -714,6 +722,9 @@ export class Dashboards { const config: RequestConfig = { url: `/rest/api/2/dashboard/${parameters.id}/copy`, method: 'POST', + params: { + extendAdminPermissions: parameters.extendAdminPermissions, + }, data: { description: parameters.description, editPermissions: parameters.editPermissions, diff --git a/src/version2/dynamicModules.ts b/src/version2/dynamicModules.ts index 516e6e05bd..f5467d964c 100644 --- a/src/version2/dynamicModules.ts +++ b/src/version2/dynamicModules.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class DynamicModules { diff --git a/src/version2/filterSharing.ts b/src/version2/filterSharing.ts index 04f8ad9cc5..b20d2754e9 100644 --- a/src/version2/filterSharing.ts +++ b/src/version2/filterSharing.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class FilterSharing { diff --git a/src/version2/filters.ts b/src/version2/filters.ts index 65e0895154..755996ef56 100644 --- a/src/version2/filters.ts +++ b/src/version2/filters.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Filters { @@ -31,10 +31,11 @@ export class Filters { url: '/rest/api/2/filter', method: 'POST', params: { - expand: parameters?.expand, - overrideSharePermissions: parameters?.overrideSharePermissions, + expand: parameters.expand, + overrideSharePermissions: parameters.overrideSharePermissions, }, data: { + approximateLastUsed: parameters.approximateLastUsed, description: parameters.description, editPermissions: parameters.editPermissions, favourite: parameters.favourite, @@ -236,6 +237,7 @@ export class Filters { maxResults: parameters?.maxResults, expand: parameters?.expand, overrideSharePermissions: parameters?.overrideSharePermissions, + isSubstringMatch: parameters?.isSubstringMatch, }, }; @@ -475,7 +477,7 @@ export class Filters { * - Filters shared with a public project. * - Filters shared with the public. */ - async resetColumns(parameters: Parameters.ResetColumns, callback: Callback): Promise; + async resetColumns(parameters: Parameters.ResetColumns | string, callback: Callback): Promise; /** * Reset the user's column configuration for the filter to the default. * @@ -489,10 +491,15 @@ export class Filters { * - Filters shared with a public project. * - Filters shared with the public. */ - async resetColumns(parameters: Parameters.ResetColumns, callback?: never): Promise; - async resetColumns(parameters: Parameters.ResetColumns, callback?: Callback): Promise { + async resetColumns(parameters: Parameters.ResetColumns | string, callback?: never): Promise; + async resetColumns( + parameters: Parameters.ResetColumns | string, + callback?: Callback, + ): Promise { + const id = typeof parameters === 'string' ? parameters : parameters.id; + const config: RequestConfig = { - url: `/rest/api/2/filter/${parameters.id}/columns`, + url: `/rest/api/2/filter/${id}/columns`, method: 'DELETE', }; diff --git a/src/version2/groupAndUserPicker.ts b/src/version2/groupAndUserPicker.ts index 0f3f7a0968..c9bc008f1e 100644 --- a/src/version2/groupAndUserPicker.ts +++ b/src/version2/groupAndUserPicker.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class GroupAndUserPicker { diff --git a/src/version2/groups.ts b/src/version2/groups.ts index 2aeba04980..ceaea29ebc 100644 --- a/src/version2/groups.ts +++ b/src/version2/groups.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Groups { @@ -50,10 +50,10 @@ export class Groups { url: '/rest/api/2/group', method: 'DELETE', params: { - groupname: parameters?.groupname, - groupId: parameters?.groupId, - swapGroup: parameters?.swapGroup, - swapGroupId: parameters?.swapGroupId, + groupname: parameters.groupname, + groupId: parameters.groupId, + swapGroup: parameters.swapGroup, + swapGroupId: parameters.swapGroupId, }, }; @@ -106,8 +106,11 @@ export class Groups { * Note that users are ordered by username, however the username is not returned in the results due to privacy * reasons. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** either + * of: + * + * - _Browse users and groups_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async getUsersFromGroup( parameters: Parameters.GetUsersFromGroup, @@ -120,8 +123,11 @@ export class Groups { * Note that users are ordered by username, however the username is not returned in the results due to privacy * reasons. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** either + * of: + * + * - _Browse users and groups_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async getUsersFromGroup( parameters: Parameters.GetUsersFromGroup, @@ -172,8 +178,8 @@ export class Groups { groupId: parameters.groupId, }, data: { - name: parameters.name, accountId: parameters.accountId, + name: parameters.name, }, }; diff --git a/src/version2/index.ts b/src/version2/index.ts index f44c40620e..d177fc664a 100644 --- a/src/version2/index.ts +++ b/src/version2/index.ts @@ -1,13 +1,15 @@ export * from './announcementBanner'; -export * from './applicationRoles'; +export * from './appDataPolicies'; export * from './appMigration'; export * from './appProperties'; +export * from './applicationRoles'; export * from './auditRecords'; export * from './avatars'; +export * from './classificationLevels'; export * from './dashboards'; export * from './dynamicModules'; -export * from './filters'; export * from './filterSharing'; +export * from './filters'; export * from './groupAndUserPicker'; export * from './groups'; export * from './issueAttachments'; @@ -20,26 +22,26 @@ export * from './issueCustomFieldOptionsApps'; export * from './issueCustomFieldValuesApps'; export * from './issueFieldConfigurations'; export * from './issueFields'; -export * from './issueLinks'; export * from './issueLinkTypes'; +export * from './issueLinks'; export * from './issueNavigatorSettings'; export * from './issueNotificationSchemes'; export * from './issuePriorities'; export * from './issueProperties'; export * from './issueRemoteLinks'; export * from './issueResolutions'; -export * from './issues'; export * from './issueSearch'; export * from './issueSecurityLevel'; export * from './issueSecuritySchemes'; export * from './issueTypeProperties'; -export * from './issueTypes'; export * from './issueTypeSchemes'; export * from './issueTypeScreenSchemes'; +export * from './issueTypes'; export * from './issueVotes'; export * from './issueWatchers'; export * from './issueWorklogProperties'; export * from './issueWorklogs'; +export * from './issues'; export * from './jiraExpressions'; export * from './jiraSettings'; export * from './jQL'; @@ -47,10 +49,13 @@ export * from './jqlFunctionsApps'; export * from './labels'; export * from './licenseMetrics'; export * from './myself'; -export * from './permissions'; export * from './permissionSchemes'; +export * from './permissions'; +export * from './plans'; +export * from './prioritySchemes'; export * from './projectAvatars'; export * from './projectCategories'; +export * from './projectClassificationLevels'; export * from './projectComponents'; export * from './projectEmail'; export * from './projectFeatures'; @@ -59,23 +64,24 @@ export * from './projectPermissionSchemes'; export * from './projectProperties'; export * from './projectRoleActors'; export * from './projectRoles'; -export * from './projects'; export * from './projectTypes'; export * from './projectVersions'; -export * from './screens'; +export * from './projects'; export * from './screenSchemes'; export * from './screenTabFields'; export * from './screenTabs'; +export * from './screens'; export * from './serverInfo'; +export * from './serviceRegistry'; export * from './status'; export * from './tasks'; +export * from './teamsInPlan'; export * from './timeTracking'; export * from './uIModificationsApps'; export * from './userProperties'; -export * from './users'; export * from './userSearch'; +export * from './users'; export * from './webhooks'; -export * from './workflows'; export * from './workflowSchemeDrafts'; export * from './workflowSchemeProjectAssociations'; export * from './workflowSchemes'; @@ -83,7 +89,8 @@ export * from './workflowStatusCategories'; export * from './workflowStatuses'; export * from './workflowTransitionProperties'; export * from './workflowTransitionRules'; +export * from './workflows'; +export * from './client'; export * as Version2Models from './models'; export * as Version2Parameters from './parameters'; -export * from './client'; diff --git a/src/version2/issueAttachments.ts b/src/version2/issueAttachments.ts index c2dbd40526..8d4bb7c0bc 100644 --- a/src/version2/issueAttachments.ts +++ b/src/version2/issueAttachments.ts @@ -1,8 +1,8 @@ -import { FormData, File } from 'formdata-node'; +import mime, { Mime } from 'mime'; import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueAttachments { @@ -379,12 +379,6 @@ export class IssueAttachments { * Adds one or more attachments to an issue. Attachments are posted as multipart/form-data ([RFC * 1867](https://www.ietf.org/rfc/rfc1867.txt)). * - * Note that: - * - * - 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. - * - The name of the multipart/form-data parameter that contains the attachments must be `file`. - * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** @@ -402,12 +396,6 @@ export class IssueAttachments { * Adds one or more attachments to an issue. Attachments are posted as multipart/form-data ([RFC * 1867](https://www.ietf.org/rfc/rfc1867.txt)). * - * Note that: - * - * - 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. - * - The name of the multipart/form-data parameter that contains the attachments must be `file`. - * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** @@ -425,16 +413,23 @@ export class IssueAttachments { const formData = new FormData(); const attachments = Array.isArray(parameters.attachment) ? parameters.attachment : [parameters.attachment]; - const { default: mime } = await import('mime'); + let Readable: typeof import('stream').Readable | undefined; + + if (typeof window === 'undefined') { + const { Readable: NodeReadable } = await import('stream'); - attachments.forEach(attachment => { - const mimeType = attachment.mimeType ?? (mime.getType(attachment.filename) || undefined); - const file = Buffer.isBuffer(attachment.file) - ? new File([attachment.file], attachment.filename, { type: mimeType }) - : attachment.file; + Readable = NodeReadable; + } + + for await (const attachment of attachments) { + const file = await this._convertToFile(attachment, mime, Readable); + + if (!(file instanceof File || file instanceof Blob)) { + throw new Error(`Unsupported file type for attachment: ${typeof file}`); + } formData.append('file', file, attachment.filename); - }); + } const config: RequestConfig = { url: `/rest/api/2/issue/${parameters.issueIdOrKey}/attachments`, @@ -450,4 +445,74 @@ export class IssueAttachments { return this.client.sendRequest(config, callback); } + + private async _convertToFile( + attachment: Parameters.Attachment, + mime: Mime, + Readable?: typeof import('stream').Readable, + ): Promise { + const mimeType = attachment.mimeType ?? (mime.getType(attachment.filename) || undefined); + + if (attachment.file instanceof Blob || attachment.file instanceof File) { + return attachment.file; + } + + if (typeof attachment.file === 'string') { + return new File([attachment.file], attachment.filename, { type: mimeType }); + } + + if (Readable && attachment.file instanceof Readable) { + return this._streamToBlob(attachment.file, attachment.filename, mimeType); + } + + if (attachment.file instanceof ReadableStream) { + return this._streamToBlob(attachment.file, attachment.filename, mimeType); + } + + if (ArrayBuffer.isView(attachment.file) || attachment.file instanceof ArrayBuffer) { + return new File([attachment.file], attachment.filename, { type: mimeType }); + } + + throw new Error('Unsupported attachment file type.'); + } + + private async _streamToBlob( + stream: import('stream').Readable | ReadableStream, + filename: string, + mimeType?: string, + ): Promise { + if (typeof window === 'undefined' && stream instanceof (await import('stream')).Readable) { + return new Promise((resolve, reject) => { + const chunks: Uint8Array[] = []; + + stream.on('data', chunk => chunks.push(chunk)); + stream.on('end', () => { + const blob = new Blob(chunks, { type: mimeType }); + + resolve(new File([blob], filename, { type: mimeType })); + }); + stream.on('error', reject); + }); + } + + if (stream instanceof ReadableStream) { + const reader = stream.getReader(); + const chunks: Uint8Array[] = []; + + let done = false; + + while (!done) { + const { value, done: streamDone } = await reader.read(); + + if (value) chunks.push(value); + done = streamDone; + } + + const blob = new Blob(chunks, { type: mimeType }); + + return new File([blob], filename, { type: mimeType }); + } + + throw new Error('Unsupported stream type.'); + } } diff --git a/src/version2/issueCommentProperties.ts b/src/version2/issueCommentProperties.ts index c122e8bcc9..22fb732ed9 100644 --- a/src/version2/issueCommentProperties.ts +++ b/src/version2/issueCommentProperties.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueCommentProperties { diff --git a/src/version2/issueComments.ts b/src/version2/issueComments.ts index 8f45ac0ae6..f2d69e36ca 100644 --- a/src/version2/issueComments.ts +++ b/src/version2/issueComments.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueComments { @@ -302,6 +302,9 @@ export class IssueComments { const config: RequestConfig = { url: `/rest/api/2/issue/${parameters.issueIdOrKey}/comment/${parameters.id}`, method: 'DELETE', + params: { + parentId: parameters.parentId, + }, }; return this.client.sendRequest(config, callback); diff --git a/src/version2/issueCustomFieldConfigurationApps.ts b/src/version2/issueCustomFieldConfigurationApps.ts index 9fd1d66810..3fa8cf8445 100644 --- a/src/version2/issueCustomFieldConfigurationApps.ts +++ b/src/version2/issueCustomFieldConfigurationApps.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueCustomFieldConfigurationApps { @@ -9,7 +9,79 @@ export class IssueCustomFieldConfigurationApps { /** * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of - * configurations for a custom field created by a [Forge app](https://developer.atlassian.com/platform/forge/). + * configurations for list of custom fields of a + * [type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) created + * by a [Forge app](https://developer.atlassian.com/platform/forge/). + * + * The result can be filtered by one of these criteria: + * + * - `id`. + * - `fieldContextId`. + * - `issueId`. + * - `projectKeyOrId` and `issueTypeId`. + * + * Otherwise, all configurations for the provided list of custom fields are returned. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required + * for the Forge app that provided the custom field type. + */ + async getCustomFieldsConfigurations( + parameters: Parameters.GetCustomFieldsConfigurations | undefined, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * configurations for list of custom fields of a + * [type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) created + * by a [Forge app](https://developer.atlassian.com/platform/forge/). + * + * The result can be filtered by one of these criteria: + * + * - `id`. + * - `fieldContextId`. + * - `issueId`. + * - `projectKeyOrId` and `issueTypeId`. + * + * Otherwise, all configurations for the provided list of custom fields are returned. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required + * for the Forge app that provided the custom field type. + */ + async getCustomFieldsConfigurations( + parameters?: Parameters.GetCustomFieldsConfigurations, + callback?: never, + ): Promise; + async getCustomFieldsConfigurations( + parameters?: Parameters.GetCustomFieldsConfigurations, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/app/field/context/configuration/list', + method: 'POST', + params: { + id: parameters?.id, + fieldContextId: parameters?.fieldContextId, + issueId: parameters?.issueId, + projectKeyOrId: parameters?.projectKeyOrId, + issueTypeId: parameters?.issueTypeId, + startAt: parameters?.startAt, + maxResults: parameters?.maxResults, + }, + data: { + fieldIdsOrKeys: parameters?.fieldIdsOrKeys, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * configurations for a custom field of a + * [type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) created + * by a [Forge app](https://developer.atlassian.com/platform/forge/). * * The result can be filtered by one of these criteria: * @@ -22,7 +94,7 @@ export class IssueCustomFieldConfigurationApps { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#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. + * for the Forge app that provided the custom field type. */ async getCustomFieldConfiguration( parameters: Parameters.GetCustomFieldConfiguration, @@ -30,7 +102,9 @@ export class IssueCustomFieldConfigurationApps { ): Promise; /** * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of - * configurations for a custom field created by a [Forge app](https://developer.atlassian.com/platform/forge/). + * configurations for a custom field of a + * [type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) created + * by a [Forge app](https://developer.atlassian.com/platform/forge/). * * The result can be filtered by one of these criteria: * @@ -43,7 +117,7 @@ export class IssueCustomFieldConfigurationApps { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#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. + * for the Forge app that provided the custom field type. */ async getCustomFieldConfiguration( parameters: Parameters.GetCustomFieldConfiguration, @@ -71,24 +145,26 @@ export class IssueCustomFieldConfigurationApps { } /** - * Update the configuration for contexts of a custom field created by a [Forge - * app](https://developer.atlassian.com/platform/forge/). + * Update the configuration for contexts of a custom field of a + * [type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) created + * by a [Forge app](https://developer.atlassian.com/platform/forge/). * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#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. + * for the Forge app that created the custom field type. */ async updateCustomFieldConfiguration( parameters: Parameters.UpdateCustomFieldConfiguration, callback: Callback, ): Promise; /** - * Update the configuration for contexts of a custom field created by a [Forge - * app](https://developer.atlassian.com/platform/forge/). + * Update the configuration for contexts of a custom field of a + * [type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) created + * by a [Forge app](https://developer.atlassian.com/platform/forge/). * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#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. + * for the Forge app that created the custom field type. */ async updateCustomFieldConfiguration( parameters: Parameters.UpdateCustomFieldConfiguration, diff --git a/src/version2/issueCustomFieldContexts.ts b/src/version2/issueCustomFieldContexts.ts index 21a0d25b21..2df4c199d4 100644 --- a/src/version2/issueCustomFieldContexts.ts +++ b/src/version2/issueCustomFieldContexts.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueCustomFieldContexts { diff --git a/src/version2/issueCustomFieldOptions.ts b/src/version2/issueCustomFieldOptions.ts index 4f7cb8ff63..6b6c38b604 100644 --- a/src/version2/issueCustomFieldOptions.ts +++ b/src/version2/issueCustomFieldOptions.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueCustomFieldOptions { @@ -249,8 +249,8 @@ export class IssueCustomFieldOptions { url: `/rest/api/2/field/${parameters.fieldId}/context/${parameters.contextId}/option/move`, method: 'PUT', data: { - customFieldOptionIds: parameters.customFieldOptionIds, after: parameters.after, + customFieldOptionIds: parameters.customFieldOptionIds, position: parameters.position, }, }; @@ -298,4 +298,48 @@ export class IssueCustomFieldOptions { return this.client.sendRequest(config, callback); } + + /** + * Replaces the options of a custom field. + * + * Note that this operation **only works for issue field select list options created in Jira or using operations from + * the [Issue custom field options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue + * field select list options created by Connect or Forge apps. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async replaceCustomFieldOption( + parameters: Parameters.ReplaceCustomFieldOption, + callback: Callback, + ): Promise; + /** + * Replaces the options of a custom field. + * + * Note that this operation **only works for issue field select list options created in Jira or using operations from + * the [Issue custom field options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue + * field select list options created by Connect or Forge apps. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async replaceCustomFieldOption( + parameters: Parameters.ReplaceCustomFieldOption, + callback?: never, + ): Promise; + async replaceCustomFieldOption( + parameters: Parameters.ReplaceCustomFieldOption, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/field/${parameters.fieldId}/context/${parameters.contextId}/option/${parameters.optionId}/issue`, + method: 'DELETE', + params: { + replaceWith: parameters.replaceWith, + jql: parameters.jql, + }, + }; + + return this.client.sendRequest(config, callback); + } } diff --git a/src/version2/issueCustomFieldOptionsApps.ts b/src/version2/issueCustomFieldOptionsApps.ts index 60b342455e..709a5c8044 100644 --- a/src/version2/issueCustomFieldOptionsApps.ts +++ b/src/version2/issueCustomFieldOptionsApps.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueCustomFieldOptionsApps { @@ -68,6 +68,8 @@ export class IssueCustomFieldOptionsApps { * 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. * + * Each field can have a maximum of 10000 options, and each option can have a maximum of 10000 scopes. + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required * for the app providing the field. @@ -83,6 +85,8 @@ export class IssueCustomFieldOptionsApps { * 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. * + * Each field can have a maximum of 10000 options, and each option can have a maximum of 10000 scopes. + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required * for the app providing the field. @@ -99,9 +103,9 @@ export class IssueCustomFieldOptionsApps { url: `/rest/api/2/field/${parameters.fieldKey}/option`, method: 'POST', data: { - value: parameters.value, - properties: parameters.properties, config: parameters.config, + properties: parameters.properties, + value: parameters.value, }, }; @@ -290,10 +294,10 @@ export class IssueCustomFieldOptionsApps { url: `/rest/api/2/field/${parameters.fieldKey}/option/${parameters.optionId}`, method: 'PUT', data: { + config: parameters.config, id: parameters.id, - value: parameters.value, properties: parameters.properties, - config: parameters.config, + value: parameters.value, }, }; @@ -359,7 +363,7 @@ export class IssueCustomFieldOptionsApps { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required * for the app providing the field. */ - async replaceIssueFieldOption( + async replaceIssueFieldOption( parameters: Parameters.ReplaceIssueFieldOption, callback: Callback, ): Promise; @@ -383,11 +387,11 @@ export class IssueCustomFieldOptionsApps { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required * for the app providing the field. */ - async replaceIssueFieldOption( + async replaceIssueFieldOption( parameters: Parameters.ReplaceIssueFieldOption, callback?: never, ): Promise; - async replaceIssueFieldOption( + async replaceIssueFieldOption( parameters: Parameters.ReplaceIssueFieldOption, callback?: Callback, ): Promise { diff --git a/src/version2/issueCustomFieldValuesApps.ts b/src/version2/issueCustomFieldValuesApps.ts index 5413f7d241..1692ce3215 100644 --- a/src/version2/issueCustomFieldValuesApps.ts +++ b/src/version2/issueCustomFieldValuesApps.ts @@ -1,6 +1,6 @@ import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueCustomFieldValuesApps { @@ -8,10 +8,18 @@ export class IssueCustomFieldValuesApps { /** * 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. + * be unique within the request. + * + * Apps can only perform this operation on [custom + * fields](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field/) and [custom + * field types](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) + * declared in their own manifests. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only - * the app that created the custom field can update its values with this operation. + * the app that owns the custom field or custom field type can update its values with this operation. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async updateMultipleCustomFieldValues( parameters: Parameters.UpdateMultipleCustomFieldValues, @@ -19,10 +27,18 @@ export class IssueCustomFieldValuesApps { ): Promise; /** * 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. + * be unique within the request. + * + * Apps can only perform this operation on [custom + * fields](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field/) and [custom + * field types](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) + * declared in their own manifests. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only - * the app that created the custom field can update its values with this operation. + * the app that owns the custom field or custom field type can update its values with this operation. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async updateMultipleCustomFieldValues( parameters: Parameters.UpdateMultipleCustomFieldValues, @@ -47,22 +63,36 @@ export class IssueCustomFieldValuesApps { } /** - * 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. + * Updates the value of a custom field on one or more issues. + * + * Apps can only perform this operation on [custom + * fields](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field/) and [custom + * field types](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) + * declared in their own manifests. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only - * the app that created the custom field can update its values with this operation. + * the app that owns the custom field or custom field type can update its values with this operation. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async updateCustomFieldValue( parameters: Parameters.UpdateCustomFieldValue, callback: Callback, ): Promise; /** - * 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. + * Updates the value of a custom field on one or more issues. + * + * Apps can only perform this operation on [custom + * fields](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field/) and [custom + * field types](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) + * declared in their own manifests. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only - * the app that created the custom field can update its values with this operation. + * the app that owns the custom field or custom field type can update its values with this operation. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async updateCustomFieldValue(parameters: Parameters.UpdateCustomFieldValue, callback?: never): Promise; async updateCustomFieldValue( diff --git a/src/version2/issueFieldConfigurations.ts b/src/version2/issueFieldConfigurations.ts index 5ebf33d4e3..1883a46b2f 100644 --- a/src/version2/issueFieldConfigurations.ts +++ b/src/version2/issueFieldConfigurations.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueFieldConfigurations { @@ -72,7 +72,7 @@ export class IssueFieldConfigurations { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createFieldConfiguration( - parameters: Parameters.CreateFieldConfiguration | undefined, + parameters: Parameters.CreateFieldConfiguration, callback: Callback, ): Promise; /** @@ -85,19 +85,19 @@ export class IssueFieldConfigurations { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createFieldConfiguration( - parameters?: Parameters.CreateFieldConfiguration, + parameters: Parameters.CreateFieldConfiguration, callback?: never, ): Promise; async createFieldConfiguration( - parameters?: Parameters.CreateFieldConfiguration, + parameters: Parameters.CreateFieldConfiguration, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/2/fieldconfiguration', method: 'POST', data: { - name: parameters?.name, - description: parameters?.description, + name: parameters.name, + description: parameters.description, }, }; @@ -327,7 +327,7 @@ export class IssueFieldConfigurations { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createFieldConfigurationScheme( - parameters: Parameters.CreateFieldConfigurationScheme | undefined, + parameters: Parameters.CreateFieldConfigurationScheme, callback: Callback, ): Promise; /** @@ -339,19 +339,19 @@ export class IssueFieldConfigurations { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createFieldConfigurationScheme( - parameters?: Parameters.CreateFieldConfigurationScheme, + parameters: Parameters.CreateFieldConfigurationScheme, callback?: never, ): Promise; async createFieldConfigurationScheme( - parameters?: Parameters.CreateFieldConfigurationScheme, + parameters: Parameters.CreateFieldConfigurationScheme, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/2/fieldconfigurationscheme', method: 'POST', data: { - name: parameters?.name, - description: parameters?.description, + name: parameters.name, + description: parameters.description, }, }; diff --git a/src/version2/issueFields.ts b/src/version2/issueFields.ts index 4873583e65..6793140698 100644 --- a/src/version2/issueFields.ts +++ b/src/version2/issueFields.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueFields { @@ -76,10 +76,10 @@ export class IssueFields { url: '/rest/api/2/field', method: 'POST', data: { - name: parameters?.name, description: parameters?.description, - type: parameters?.type, + name: parameters?.name, searcherKey: parameters?.searcherKey, + type: parameters?.type, }, }; @@ -95,7 +95,7 @@ export class IssueFields { * - Fields that contain a string in the field name or description, by defining `query` * - Specific fields that contain a string in the field name or description, by defining `id` and `query` * - * Only custom fields can be queried, `type` must be set to `custom`. + * Use `type` must be set to `custom` to show custom fields only. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). @@ -113,7 +113,7 @@ export class IssueFields { * - Fields that contain a string in the field name or description, by defining `query` * - Specific fields that contain a string in the field name or description, by defining `id` and `query` * - * Only custom fields can be queried, `type` must be set to `custom`. + * Use `type` must be set to `custom` to show custom fields only. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). @@ -211,8 +211,8 @@ export class IssueFields { url: `/rest/api/2/field/${parameters.fieldId}`, method: 'PUT', data: { - name: parameters.name, description: parameters.description, + name: parameters.name, searcherKey: parameters.searcherKey, }, }; diff --git a/src/version2/issueLinkTypes.ts b/src/version2/issueLinkTypes.ts index f9fc02a695..4293b63cff 100644 --- a/src/version2/issueLinkTypes.ts +++ b/src/version2/issueLinkTypes.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueLinkTypes { diff --git a/src/version2/issueLinks.ts b/src/version2/issueLinks.ts index 651ba80273..77aae6feb0 100644 --- a/src/version2/issueLinks.ts +++ b/src/version2/issueLinks.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueLinks { diff --git a/src/version2/issueNavigatorSettings.ts b/src/version2/issueNavigatorSettings.ts index 97c86cdef6..61b7e0d709 100644 --- a/src/version2/issueNavigatorSettings.ts +++ b/src/version2/issueNavigatorSettings.ts @@ -1,6 +1,6 @@ import * as Models from './models'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueNavigatorSettings { diff --git a/src/version2/issueNotificationSchemes.ts b/src/version2/issueNotificationSchemes.ts index 9c75917276..e4384385dd 100644 --- a/src/version2/issueNotificationSchemes.ts +++ b/src/version2/issueNotificationSchemes.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueNotificationSchemes { @@ -215,6 +215,38 @@ export class IssueNotificationSchemes { return this.client.sendRequest(config, callback); } + /** + * Adds notifications to a notification scheme. You can add up to 1000 notifications per request. + * + * _Deprecated: The notification type `EmailAddress` is no longer supported in Cloud. Refer to the + * [changelog](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-1031) for more details._ + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async addNotifications(parameters: Parameters.AddNotifications, callback: Callback): Promise; + /** + * Adds notifications to a notification scheme. You can add up to 1000 notifications per request. + * + * _Deprecated: The notification type `EmailAddress` is no longer supported in Cloud. Refer to the + * [changelog](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-1031) for more details._ + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async addNotifications(parameters: Parameters.AddNotifications, callback?: never): Promise; + async addNotifications(parameters: Parameters.AddNotifications, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/2/notificationscheme/${parameters.id}/notification`, + method: 'PUT', + data: { + notificationSchemeEvents: parameters.notificationSchemeEvents, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Deletes a notification scheme. * diff --git a/src/version2/issuePriorities.ts b/src/version2/issuePriorities.ts index 04f82b2efa..49a6ffb802 100644 --- a/src/version2/issuePriorities.ts +++ b/src/version2/issuePriorities.ts @@ -1,9 +1,9 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; -import { paramSerializer } from '../paramSerializer'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; +import { paramSerializer } from '../paramSerializer'; export class IssuePriorities { constructor(private client: Client) {} @@ -34,6 +34,9 @@ export class IssuePriorities { /** * Creates an issue priority. * + * Deprecation applies to iconUrl param in request body which will be sunset on 16th Mar 2025. For more details refer + * to [changelog](https://developer.atlassian.com/changelog/#CHANGE-1525). + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -44,6 +47,9 @@ export class IssuePriorities { /** * Creates an issue priority. * + * Deprecation applies to iconUrl param in request body which will be sunset on 16th Mar 2025. For more details refer + * to [changelog](https://developer.atlassian.com/changelog/#CHANGE-1525). + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -56,6 +62,7 @@ export class IssuePriorities { url: '/rest/api/2/priority', method: 'POST', data: { + avatarId: parameters.avatarId, description: parameters.description, iconUrl: parameters.iconUrl, name: parameters.name, @@ -117,8 +124,8 @@ export class IssuePriorities { url: '/rest/api/2/priority/move', method: 'PUT', data: { - ids: parameters.ids, after: parameters.after, + ids: parameters.ids, position: parameters.position, }, }; @@ -172,7 +179,9 @@ export class IssuePriorities { maxResults: parameters?.maxResults, id: parameters?.id, projectId: paramSerializer('projectId', parameters?.projectId), + priorityName: parameters?.priorityName, onlyDefault: parameters?.onlyDefault, + expand: parameters?.expand, }, }; @@ -213,6 +222,11 @@ export class IssuePriorities { /** * Updates an issue priority. * + * At least one request body parameter must be defined. + * + * Deprecation applies to iconUrl param in request body which will be sunset on 16th Mar 2025. For more details refer + * to [changelog](https://developer.atlassian.com/changelog/#CHANGE-1525). + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -220,6 +234,11 @@ export class IssuePriorities { /** * Updates an issue priority. * + * At least one request body parameter must be defined. + * + * Deprecation applies to iconUrl param in request body which will be sunset on 16th Mar 2025. For more details refer + * to [changelog](https://developer.atlassian.com/changelog/#CHANGE-1525). + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -229,6 +248,7 @@ export class IssuePriorities { url: `/rest/api/2/priority/${parameters.id}`, method: 'PUT', data: { + avatarId: parameters.avatarId, description: parameters.description, iconUrl: parameters.iconUrl, name: parameters.name, @@ -238,4 +258,37 @@ export class IssuePriorities { return this.client.sendRequest(config, callback); } + + /** + * Deletes an issue priority. + * + * This operation is + * [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). Follow the + * `location` link in the response to determine the status of the task and use [Get + * task](#api-rest-api-2-task-taskId-get) to obtain subsequent updates. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async deletePriority(parameters: Parameters.DeletePriority, callback: Callback): Promise; + /** + * Deletes an issue priority. + * + * This operation is + * [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). Follow the + * `location` link in the response to determine the status of the task and use [Get + * task](#api-rest-api-2-task-taskId-get) to obtain subsequent updates. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async deletePriority(parameters: Parameters.DeletePriority, callback?: never): Promise; + async deletePriority(parameters: Parameters.DeletePriority, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/2/priority/${parameters.id}`, + method: 'DELETE', + }; + + return this.client.sendRequest(config, callback); + } } diff --git a/src/version2/issueProperties.ts b/src/version2/issueProperties.ts index 322a7ec9ef..6420625bb5 100644 --- a/src/version2/issueProperties.ts +++ b/src/version2/issueProperties.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueProperties { diff --git a/src/version2/issueRemoteLinks.ts b/src/version2/issueRemoteLinks.ts index 12943c64cd..907c06971f 100644 --- a/src/version2/issueRemoteLinks.ts +++ b/src/version2/issueRemoteLinks.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueRemoteLinks { diff --git a/src/version2/issueResolutions.ts b/src/version2/issueResolutions.ts index 10922ceae9..7aacebfd5b 100644 --- a/src/version2/issueResolutions.ts +++ b/src/version2/issueResolutions.ts @@ -1,12 +1,35 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueResolutions { constructor(private client: Client) {} + /** + * Returns a list of all issue resolution values. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async getResolutions(callback: Callback): Promise; + /** + * Returns a list of all issue resolution values. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async getResolutions(callback?: never): Promise; + async getResolutions(callback?: Callback): Promise { + const config: RequestConfig = { + url: '/rest/api/2/resolution', + method: 'GET', + }; + + return this.client.sendRequest(config, callback); + } + /** * Creates an issue resolution. * @@ -91,8 +114,8 @@ export class IssueResolutions { url: '/rest/api/2/resolution/move', method: 'PUT', data: { - ids: parameters.ids, after: parameters.after, + ids: parameters.ids, position: parameters.position, }, }; @@ -148,6 +171,35 @@ export class IssueResolutions { return this.client.sendRequest(config, callback); } + /** + * Returns an issue resolution value. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async getResolution( + parameters: Parameters.GetResolution, + callback: Callback, + ): Promise; + /** + * Returns an issue resolution value. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async getResolution(parameters: Parameters.GetResolution, callback?: never): Promise; + async getResolution( + parameters: Parameters.GetResolution, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/resolution/${parameters.id}`, + method: 'GET', + }; + + return this.client.sendRequest(config, callback); + } + /** * Updates an issue resolution. * @@ -169,7 +221,6 @@ export class IssueResolutions { data: { ...parameters, name: parameters.name, - description: parameters.description, id: undefined, }, }; @@ -188,10 +239,7 @@ export class IssueResolutions { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async deleteResolution( - parameters: Parameters.DeleteResolution, - callback: Callback, - ): Promise; + async deleteResolution(parameters: Parameters.DeleteResolution, callback: Callback): Promise; /** * Deletes an issue resolution. * @@ -203,11 +251,8 @@ export class IssueResolutions { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async deleteResolution( - parameters: Parameters.DeleteResolution, - callback?: never, - ): Promise; - async deleteResolution( + async deleteResolution(parameters: Parameters.DeleteResolution, callback?: never): Promise; + async deleteResolution( parameters: Parameters.DeleteResolution, callback?: Callback, ): Promise { diff --git a/src/version2/issueSearch.ts b/src/version2/issueSearch.ts index 0d6414ec3c..3a84e9cce5 100644 --- a/src/version2/issueSearch.ts +++ b/src/version2/issueSearch.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueSearch { @@ -76,10 +76,7 @@ export class IssueSearch { * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission * to view the issue. */ - async matchIssues( - parameters: Parameters.MatchIssues | undefined, - callback: Callback, - ): Promise; + async matchIssues(parameters: Parameters.MatchIssues, callback: Callback): Promise; /** * Checks whether one or more issues would be returned by one or more JQL queries. * @@ -91,17 +88,17 @@ export class IssueSearch { * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission * to view the issue. */ - async matchIssues(parameters?: Parameters.MatchIssues, callback?: never): Promise; + async matchIssues(parameters: Parameters.MatchIssues, callback?: never): Promise; async matchIssues( - parameters?: Parameters.MatchIssues, + parameters: Parameters.MatchIssues, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/2/jql/match', method: 'POST', data: { - jqls: parameters?.jqls, - issueIds: parameters?.issueIds, + issueIds: parameters.issueIds, + jqls: parameters.jqls, }, }; @@ -125,7 +122,7 @@ export class IssueSearch { * to view the issue. */ async searchForIssuesUsingJql( - parameters: Parameters.SearchForIssuesUsingJql | undefined, + parameters: Parameters.SearchForIssuesUsingJql, callback: Callback, ): Promise; /** @@ -145,25 +142,26 @@ export class IssueSearch { * to view the issue. */ async searchForIssuesUsingJql( - parameters?: Parameters.SearchForIssuesUsingJql, + parameters: Parameters.SearchForIssuesUsingJql, callback?: never, ): Promise; async searchForIssuesUsingJql( - parameters?: Parameters.SearchForIssuesUsingJql, + parameters: Parameters.SearchForIssuesUsingJql, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/2/search', method: 'GET', params: { - jql: parameters?.jql, - startAt: parameters?.startAt, - maxResults: parameters?.maxResults, - validateQuery: parameters?.validateQuery, - fields: parameters?.fields, - expand: parameters?.expand, - properties: parameters?.properties, - fieldsByKeys: parameters?.fieldsByKeys, + jql: parameters.jql, + startAt: parameters.startAt, + maxResults: parameters.maxResults, + validateQuery: parameters.validateQuery, + fields: parameters.fields, + expand: parameters.expand, + properties: parameters.properties, + fieldsByKeys: parameters.fieldsByKeys, + failFast: parameters.failFast, }, }; @@ -218,14 +216,248 @@ export class IssueSearch { url: '/rest/api/2/search', method: 'POST', data: { + expand: parameters?.expand, + fields: parameters?.fields, + fieldsByKeys: parameters?.fieldsByKeys, jql: parameters?.jql, - startAt: parameters?.startAt, maxResults: parameters?.maxResults, - fields: parameters?.fields, - validateQuery: parameters?.validateQuery, - expand: parameters?.expand, properties: parameters?.properties, - fieldsByKeys: parameters?.fieldsByKeys, + startAt: parameters?.startAt, + validateQuery: parameters?.validateQuery, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Provide an estimated count of the issues that match the [JQL](https://confluence.atlassian.com/x/egORLQ). Recent + * updates might not be immediately visible in the returned output. This endpoint requires JQL to be bounded. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async countIssues(parameters: Parameters.CountIssues, callback: Callback): Promise; + /** + * Provide an estimated count of the issues that match the [JQL](https://confluence.atlassian.com/x/egORLQ). Recent + * updates might not be immediately visible in the returned output. This endpoint requires JQL to be bounded. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async countIssues(parameters: Parameters.CountIssues, callback?: never): Promise; + async countIssues( + parameters: Parameters.CountIssues, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/search/approximate-count', + method: 'POST', + data: { + jql: parameters.jql, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Searches for IDs of issues using [JQL](https://confluence.atlassian.com/x/egORLQ). + * + * Use the [Search](#api-rest-api-2-search-post) endpoint if you need to fetch more than just issue IDs. The Search + * endpoint returns more information, but may take much longer to respond to requests. This is because it uses a + * different mechanism for ordering results than this endpoint and doesn't provide the total number of results for + * your query. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async searchForIssuesIds( + parameters: Parameters.SearchForIssuesIds, + callback: Callback, + ): Promise; + /** + * Searches for IDs of issues using [JQL](https://confluence.atlassian.com/x/egORLQ). + * + * Use the [Search](#api-rest-api-2-search-post) endpoint if you need to fetch more than just issue IDs. The Search + * endpoint returns more information, but may take much longer to respond to requests. This is because it uses a + * different mechanism for ordering results than this endpoint and doesn't provide the total number of results for + * your query. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async searchForIssuesIds( + parameters: Parameters.SearchForIssuesIds, + callback?: never, + ): Promise; + async searchForIssuesIds( + parameters: Parameters.SearchForIssuesIds, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/search/id', + method: 'POST', + data: { + jql: parameters.jql, + maxResults: parameters.maxResults, + nextPageToken: parameters.nextPageToken, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * 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. This operation can be accessed + * anonymously. + * + * If the JQL query expression is too large to be encoded as a query parameter, use the + * [POST](#api-rest-api-2-search-post) version of this resource. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async searchForIssuesUsingJqlEnhancedSearch( + parameters: Parameters.SearchForIssuesUsingJqlEnhancedSearch, + callback: Callback, + ): Promise; + /** + * 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. This operation can be accessed + * anonymously. + * + * If the JQL query expression is too large to be encoded as a query parameter, use the + * [POST](#api-rest-api-2-search-post) version of this resource. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async searchForIssuesUsingJqlEnhancedSearch( + parameters: Parameters.SearchForIssuesUsingJqlEnhancedSearch, + callback?: never, + ): Promise; + async searchForIssuesUsingJqlEnhancedSearch( + parameters: Parameters.SearchForIssuesUsingJqlEnhancedSearch, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/search/jql', + method: 'GET', + params: { + jql: parameters.jql, + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + fields: parameters.fields, + expand: parameters.expand, + properties: parameters.properties, + fieldsByKeys: parameters.fieldsByKeys, + failFast: parameters.failFast, + reconcileIssues: parameters.reconcileIssues, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * 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. This operation can be accessed + * anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async searchForIssuesUsingJqlEnhancedSearchPost( + parameters: Parameters.SearchForIssuesUsingJqlEnhancedSearchPost, + callback: Callback, + ): Promise; + /** + * 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. This operation can be accessed + * anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async searchForIssuesUsingJqlEnhancedSearchPost( + parameters: Parameters.SearchForIssuesUsingJqlEnhancedSearchPost, + callback?: never, + ): Promise; + async searchForIssuesUsingJqlEnhancedSearchPost( + parameters: Parameters.SearchForIssuesUsingJqlEnhancedSearchPost, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/search/jql', + method: 'POST', + data: { + jql: parameters.jql, + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + fields: parameters.fields, + expand: parameters.expand, + properties: parameters.properties, + fieldsByKeys: parameters.fieldsByKeys, + failFast: parameters.failFast, + reconcileIssues: parameters.reconcileIssues, }, }; diff --git a/src/version2/issueSecurityLevel.ts b/src/version2/issueSecurityLevel.ts index 5a665fbd60..07187c1368 100644 --- a/src/version2/issueSecurityLevel.ts +++ b/src/version2/issueSecurityLevel.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueSecurityLevel { diff --git a/src/version2/issueSecuritySchemes.ts b/src/version2/issueSecuritySchemes.ts index 60c089ea24..50c7f3ae3b 100644 --- a/src/version2/issueSecuritySchemes.ts +++ b/src/version2/issueSecuritySchemes.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { paramSerializer } from '../paramSerializer'; import { RequestConfig } from '../requestConfig'; diff --git a/src/version2/issueTypeProperties.ts b/src/version2/issueTypeProperties.ts index cb3dd26eb3..478bcbd18c 100644 --- a/src/version2/issueTypeProperties.ts +++ b/src/version2/issueTypeProperties.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueTypeProperties { diff --git a/src/version2/issueTypeSchemes.ts b/src/version2/issueTypeSchemes.ts index 1f9e7cfe95..2f47421e72 100644 --- a/src/version2/issueTypeSchemes.ts +++ b/src/version2/issueTypeSchemes.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueTypeSchemes { @@ -60,7 +60,7 @@ export class IssueTypeSchemes { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createIssueTypeScheme( - parameters: Parameters.CreateIssueTypeScheme | undefined, + parameters: Parameters.CreateIssueTypeScheme, callback: Callback, ): Promise; /** @@ -70,21 +70,21 @@ export class IssueTypeSchemes { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createIssueTypeScheme( - parameters?: Parameters.CreateIssueTypeScheme, + parameters: Parameters.CreateIssueTypeScheme, callback?: never, ): Promise; async createIssueTypeScheme( - parameters?: Parameters.CreateIssueTypeScheme, + parameters: Parameters.CreateIssueTypeScheme, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/2/issuetypescheme', method: 'POST', data: { - name: parameters?.name, - description: parameters?.description, - defaultIssueTypeId: parameters?.defaultIssueTypeId, - issueTypeIds: parameters?.issueTypeIds, + name: parameters.name, + description: parameters.description, + defaultIssueTypeId: parameters.defaultIssueTypeId, + issueTypeIds: parameters.issueTypeIds, }, }; @@ -189,7 +189,7 @@ export class IssueTypeSchemes { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async assignIssueTypeSchemeToProject( - parameters: Parameters.AssignIssueTypeSchemeToProject | undefined, + parameters: Parameters.AssignIssueTypeSchemeToProject, callback: Callback, ): Promise; /** @@ -204,19 +204,19 @@ export class IssueTypeSchemes { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async assignIssueTypeSchemeToProject( - parameters?: Parameters.AssignIssueTypeSchemeToProject, + parameters: Parameters.AssignIssueTypeSchemeToProject, callback?: never, ): Promise; async assignIssueTypeSchemeToProject( - parameters?: Parameters.AssignIssueTypeSchemeToProject, + parameters: Parameters.AssignIssueTypeSchemeToProject, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/2/issuetypescheme/project', method: 'PUT', data: { - issueTypeSchemeId: parameters?.issueTypeSchemeId, - projectId: parameters?.projectId, + issueTypeSchemeId: parameters.issueTypeSchemeId, + projectId: parameters.projectId, }, }; diff --git a/src/version2/issueTypeScreenSchemes.ts b/src/version2/issueTypeScreenSchemes.ts index 34dacadc5f..22bdb1a124 100644 --- a/src/version2/issueTypeScreenSchemes.ts +++ b/src/version2/issueTypeScreenSchemes.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueTypeScreenSchemes { @@ -60,7 +60,7 @@ export class IssueTypeScreenSchemes { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createIssueTypeScreenScheme( - parameters: Parameters.CreateIssueTypeScreenScheme | undefined, + parameters: Parameters.CreateIssueTypeScreenScheme, callback: Callback, ): Promise; /** @@ -70,20 +70,20 @@ export class IssueTypeScreenSchemes { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createIssueTypeScreenScheme( - parameters?: Parameters.CreateIssueTypeScreenScheme, + parameters: Parameters.CreateIssueTypeScreenScheme, callback?: never, ): Promise; async createIssueTypeScreenScheme( - parameters?: Parameters.CreateIssueTypeScreenScheme, + parameters: Parameters.CreateIssueTypeScreenScheme, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/2/issuetypescreenscheme', method: 'POST', data: { - name: parameters?.name, - description: parameters?.description, - issueTypeMappings: parameters?.issueTypeMappings, + name: parameters.name, + description: parameters.description, + issueTypeMappings: parameters.issueTypeMappings, }, }; diff --git a/src/version2/issueTypes.ts b/src/version2/issueTypes.ts index 84721d580e..8ec2cb6f28 100644 --- a/src/version2/issueTypes.ts +++ b/src/version2/issueTypes.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueTypes { @@ -51,7 +51,7 @@ export class IssueTypes { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createIssueType( - parameters: Parameters.CreateIssueType | undefined, + parameters: Parameters.CreateIssueType, callback: Callback, ): Promise; /** @@ -61,20 +61,20 @@ export class IssueTypes { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createIssueType( - parameters?: Parameters.CreateIssueType, + parameters: Parameters.CreateIssueType, callback?: never, ): Promise; async createIssueType( - parameters?: Parameters.CreateIssueType, + parameters: Parameters.CreateIssueType, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/2/issuetype', method: 'POST', data: { - name: parameters?.name, - description: parameters?.description, - hierarchyLevel: parameters?.hierarchyLevel, + description: parameters.description, + hierarchyLevel: parameters.hierarchyLevel, + name: parameters.name, }, }; @@ -191,9 +191,9 @@ export class IssueTypes { url: `/rest/api/2/issuetype/${parameters.id}`, method: 'PUT', data: { - name: parameters.name, - description: parameters.description, avatarId: parameters.avatarId, + description: parameters.description, + name: parameters.name, }, }; @@ -231,7 +231,7 @@ export class IssueTypes { url: `/rest/api/2/issuetype/${id}`, method: 'DELETE', params: { - alternativeIssueTypeId: typeof parameters !== 'string' && parameters.alternativeIssueTypeId, + alternativeIssueTypeId: typeof parameters !== 'string' ? parameters.alternativeIssueTypeId : undefined, }, }; @@ -279,16 +279,6 @@ export class IssueTypes { /** * Loads an avatar for the issue type. * - * Specify the avatar's local file location in the body of the request. Also, include the following headers: - * - * - `X-Atlassian-Token: no-check` To prevent XSRF protection blocking the request, for more information see [Special - * Headers](#special-request-headers). - * - `Content-Type: image/image type` Valid image types are JPEG, GIF, or PNG. - * - * For example: `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/2/issuetype/{issueTypeId}'This` - * * The 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. * @@ -307,16 +297,6 @@ export class IssueTypes { /** * Loads an avatar for the issue type. * - * Specify the avatar's local file location in the body of the request. Also, include the following headers: - * - * - `X-Atlassian-Token: no-check` To prevent XSRF protection blocking the request, for more information see [Special - * Headers](#special-request-headers). - * - `Content-Type: image/image type` Valid image types are JPEG, GIF, or PNG. - * - * For example: `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/2/issuetype/{issueTypeId}'This` - * * The 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. * @@ -339,11 +319,16 @@ export class IssueTypes { const config: RequestConfig = { url: `/rest/api/2/issuetype/${parameters.id}/avatar2`, method: 'POST', + headers: { + 'X-Atlassian-Token': 'no-check', + 'Content-Type': parameters.mimeType, + }, params: { x: parameters.x, y: parameters.y, - size: parameters.size, + size: parameters.size ?? 0, }, + data: parameters.avatar, }; return this.client.sendRequest(config, callback); diff --git a/src/version2/issueVotes.ts b/src/version2/issueVotes.ts index 913436f674..469a423e7b 100644 --- a/src/version2/issueVotes.ts +++ b/src/version2/issueVotes.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueVotes { diff --git a/src/version2/issueWatchers.ts b/src/version2/issueWatchers.ts index 43144b8aba..fca09eaceb 100644 --- a/src/version2/issueWatchers.ts +++ b/src/version2/issueWatchers.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueWatchers { diff --git a/src/version2/issueWorklogProperties.ts b/src/version2/issueWorklogProperties.ts index 8cac5e88da..d9ec0af85f 100644 --- a/src/version2/issueWorklogProperties.ts +++ b/src/version2/issueWorklogProperties.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueWorklogProperties { diff --git a/src/version2/issueWorklogs.ts b/src/version2/issueWorklogs.ts index 31482bb4df..b709eefd9b 100644 --- a/src/version2/issueWorklogs.ts +++ b/src/version2/issueWorklogs.ts @@ -1,15 +1,15 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueWorklogs { constructor(private client: Client) {} /** - * Returns worklogs for an issue, starting from the oldest worklog or from the worklog started on or after a date and - * time. + * Returns worklogs for an issue (ordered by created time), starting from the oldest worklog or from the worklog + * started on or after a date and time. * * Time 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). @@ -30,8 +30,8 @@ export class IssueWorklogs { callback: Callback, ): Promise; /** - * Returns worklogs for an issue, starting from the oldest worklog or from the worklog started on or after a date and - * time. + * Returns worklogs for an issue (ordered by created time), starting from the oldest worklog or from the worklog + * started on or after a date and time. * * Time 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). @@ -61,11 +61,11 @@ export class IssueWorklogs { url: `/rest/api/2/issue/${issueIdOrKey}/worklog`, method: 'GET', params: { - startAt: typeof parameters !== 'string' && parameters.startAt, - maxResults: typeof parameters !== 'string' && parameters.maxResults, - startedAfter: typeof parameters !== 'string' && parameters.startedAfter, - startedBefore: typeof parameters !== 'string' && parameters.startedBefore, - expand: typeof parameters !== 'string' && parameters.expand, + startAt: typeof parameters !== 'string' ? parameters.startAt : undefined, + maxResults: typeof parameters !== 'string' ? parameters.maxResults : undefined, + startedAfter: typeof parameters !== 'string' ? parameters.startedAfter : undefined, + startedBefore: typeof parameters !== 'string' ? parameters.startedBefore : undefined, + expand: typeof parameters !== 'string' ? parameters.expand : undefined, }, }; @@ -117,20 +117,139 @@ export class IssueWorklogs { overrideEditableFlag: parameters.overrideEditableFlag, }, data: { - self: parameters.self, author: parameters.author, - updateAuthor: parameters.updateAuthor, comment: parameters.comment, created: parameters.created, - updated: parameters.updated, - visibility: parameters.visibility, - started: parameters.started, - timeSpent: parameters.timeSpent, - timeSpentSeconds: parameters.timeSpentSeconds, id: parameters.id, issueId: parameters.issueId, properties: parameters.properties, + self: parameters.self, + started: parameters.started, + timeSpent: parameters.timeSpent, + timeSpentSeconds: parameters.timeSpentSeconds, + updateAuthor: parameters.updateAuthor, + updated: parameters.updated, + visibility: parameters.visibility, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Deletes a list of worklogs from an issue. This is an experimental API with limitations: + * + * - You can't delete more than 5000 worklogs at once. + * - No notifications will be sent for deleted worklogs. + * + * Time 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). + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + * - _Delete all worklogs_[ project permission](https://confluence.atlassian.com/x/yodKLg) to delete any worklog. + * - If any worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to. + */ + async bulkDeleteWorklogs(parameters: Parameters.BulkDeleteWorklogs, callback: Callback): Promise; + /** + * Deletes a list of worklogs from an issue. This is an experimental API with limitations: + * + * - You can't delete more than 5000 worklogs at once. + * - No notifications will be sent for deleted worklogs. + * + * Time 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). + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + * - _Delete all worklogs_[ project permission](https://confluence.atlassian.com/x/yodKLg) to delete any worklog. + * - If any worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to. + */ + async bulkDeleteWorklogs(parameters: Parameters.BulkDeleteWorklogs, callback?: never): Promise; + async bulkDeleteWorklogs( + parameters: Parameters.BulkDeleteWorklogs, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/issue/${parameters.issueIdOrKey}/worklog`, + method: 'DELETE', + params: { + adjustEstimate: parameters.adjustEstimate, + overrideEditableFlag: parameters.overrideEditableFlag, + }, + data: { + ids: parameters.ids, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Moves a list of worklogs from one issue to another. This is an experimental API with several limitations: + * + * - You can't move more than 5000 worklogs at once. + * - You can't move worklogs containing an attachment. + * - You can't move worklogs restricted by project roles. + * - No notifications will be sent for moved worklogs. + * - No webhooks or events will be sent for moved worklogs. + * - No issue history will be recorded for moved worklogs. + * + * Time 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). + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the projects containing the + * source and destination issues. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + * - _Delete all worklogs_[ and _Edit all worklogs_](https://confluence.atlassian.com/x/yodKLg)[project + * permission](https://confluence.atlassian.com/x/yodKLg) + * - If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to. + */ + async bulkMoveWorklogs(parameters: Parameters.BulkMoveWorklogs, callback: Callback): Promise; + /** + * Moves a list of worklogs from one issue to another. This is an experimental API with several limitations: + * + * - You can't move more than 5000 worklogs at once. + * - You can't move worklogs containing an attachment. + * - You can't move worklogs restricted by project roles. + * - No notifications will be sent for moved worklogs. + * - No webhooks or events will be sent for moved worklogs. + * - No issue history will be recorded for moved worklogs. + * + * Time 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). + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the projects containing the + * source and destination issues. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + * - _Delete all worklogs_[ and _Edit all worklogs_](https://confluence.atlassian.com/x/yodKLg)[project + * permission](https://confluence.atlassian.com/x/yodKLg) + * - If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to. + */ + async bulkMoveWorklogs(parameters: Parameters.BulkMoveWorklogs, callback?: never): Promise; + async bulkMoveWorklogs(parameters: Parameters.BulkMoveWorklogs, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/2/issue/${parameters.issueIdOrKey}/worklog/move`, + method: 'POST', + params: { + adjustEstimate: parameters.adjustEstimate, + overrideEditableFlag: parameters.overrideEditableFlag, }, + data: parameters.worklogs, }; return this.client.sendRequest(config, callback); diff --git a/src/version2/issues.ts b/src/version2/issues.ts index 2c00ffa2c5..d06fb26551 100644 --- a/src/version2/issues.ts +++ b/src/version2/issues.ts @@ -1,12 +1,70 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Issues { constructor(private client: Client) {} + /** + * Bulk fetch changelogs for multiple issues and filter by fields + * + * Returns a paginated list of all changelogs for given issues sorted by changelog date and issue IDs, starting from + * the oldest changelog and smallest issue ID. + * + * Issues are identified by their ID or key, and optionally changelogs can be filtered by their field IDs. You can + * request the changelogs of up to 1000 issues and can filter them by up to 10 field IDs. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the projects that the issues + * are in. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issues. + */ + async getBulkChangelogs( + parameters: Parameters.GetBulkChangelogs, + callback: Callback, + ): Promise; + /** + * Bulk fetch changelogs for multiple issues and filter by fields + * + * Returns a paginated list of all changelogs for given issues sorted by changelog date and issue IDs, starting from + * the oldest changelog and smallest issue ID. + * + * Issues are identified by their ID or key, and optionally changelogs can be filtered by their field IDs. You can + * request the changelogs of up to 1000 issues and can filter them by up to 10 field IDs. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the projects that the issues + * are in. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issues. + */ + async getBulkChangelogs( + parameters: Parameters.GetBulkChangelogs, + callback?: never, + ): Promise; + async getBulkChangelogs( + parameters: Parameters.GetBulkChangelogs, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/changelog/bulkfetch', + method: 'POST', + data: { + fieldIds: parameters.fieldIds, + issueIdsOrKeys: parameters.issueIdsOrKeys, + maxResults: parameters.maxResults, + nextPageToken: parameters.nextPageToken, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Returns all issue events. * @@ -97,9 +155,9 @@ export class Issues { * of the submitted request. * * You can use the [get - * task](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/#api-rest-api-3-task-taskid-get) + * task](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-tasks/#api-rest-api-2-task-taskid-get) * and [cancel - * task](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/#api-rest-api-3-task-taskid-cancel-post) + * task](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-tasks/#api-rest-api-2-task-taskid-cancel-post) * APIs to manage the request. * * **Note that:** @@ -114,20 +172,17 @@ export class Issues { * * **Signed-in users only:** This API can't be accessed anonymously. * - * **Rate limiting:** Only a single request per user can be active at any given time. + * **Rate limiting:** Only a single request per jira instance can be active at any given time. */ - async archiveIssuesAsync( - parameters: Parameters.ArchiveIssuesAsync, - callback: Callback, - ): Promise; + async archiveIssuesAsync(parameters: Parameters.ArchiveIssuesAsync, callback: Callback): Promise; /** * Enables admins to archive up to 100,000 issues in a single request using JQL, returning the URL to check the status * of the submitted request. * * You can use the [get - * task](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/#api-rest-api-3-task-taskid-get) + * task](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-tasks/#api-rest-api-2-task-taskid-get) * and [cancel - * task](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/#api-rest-api-3-task-taskid-cancel-post) + * task](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-tasks/#api-rest-api-2-task-taskid-cancel-post) * APIs to manage the request. * * **Note that:** @@ -142,10 +197,10 @@ export class Issues { * * **Signed-in users only:** This API can't be accessed anonymously. * - * **Rate limiting:** Only a single request per user can be active at any given time. + * **Rate limiting:** Only a single request per jira instance can be active at any given time. */ - async archiveIssuesAsync(parameters: Parameters.ArchiveIssuesAsync, callback?: never): Promise; - async archiveIssuesAsync( + async archiveIssuesAsync(parameters: Parameters.ArchiveIssuesAsync, callback?: never): Promise; + async archiveIssuesAsync( parameters: Parameters.ArchiveIssuesAsync, callback?: Callback, ): Promise { @@ -271,36 +326,106 @@ export class Issues { } /** - * Returns details of projects, issue types within projects, and, when requested, the create screen fields for each - * issue type for the user. Use the information to populate the requests in [ Create - * issue](#api-rest-api-2-issue-post) and [Create issues](#api-rest-api-2-issue-bulk-post). + * Returns the details for a set of requested issues. You can request up to 100 issues. + * + * Each issue is identified by its ID or key, however, if the identifier doesn't match an issue, a case-insensitive + * search and check for moved issues is performed. If a matching issue is found its details are returned, a 302 or + * other redirect is **not** returned. * - * The request can be restricted to specific projects or issue types using the query parameters. The response will - * contain information for the valid projects, issue types, or project and issue type combinations requested. Note - * that invalid project, issue type, or project and issue type combinations do not generate errors. + * Issues will be returned in ascending `id` order. If there are errors, Jira will return a list of issues which + * couldn't be fetched along with error messages. * * This operation can be accessed anonymously. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Create - * issues_ [project permission](https://confluence.atlassian.com/x/yodKLg) in the requested projects. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is + * in. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async bulkFetchIssues( + parameters: Parameters.BulkFetchIssues, + callback: Callback, + ): Promise; + /** + * Returns the details for a set of requested issues. You can request up to 100 issues. + * + * Each issue is identified by its ID or key, however, if the identifier doesn't match an issue, a case-insensitive + * search and check for moved issues is performed. If a matching issue is found its details are returned, a 302 or + * other redirect is **not** returned. + * + * Issues will be returned in ascending `id` order. If there are errors, Jira will return a list of issues which + * couldn't be fetched along with error messages. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is + * in. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async bulkFetchIssues(parameters: Parameters.BulkFetchIssues, callback?: never): Promise; + async bulkFetchIssues( + parameters: Parameters.BulkFetchIssues, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/issue/bulkfetch', + method: 'POST', + data: { + expand: parameters.expand, + fields: parameters.fields, + fieldsByKeys: parameters.fieldsByKeys, + issueIdsOrKeys: parameters.issueIdsOrKeys, + properties: parameters.properties, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * @deprecated Returns details of projects, issue types within projects, and, when requested, the create screen fields + * for each issue type for the user. Use the information to populate the requests in [ Create + * issue](#api-rest-api-2-issue-post) and [Create issues](#api-rest-api-2-issue-bulk-post). + * + * Deprecated, see [Create Issue Meta Endpoint Deprecation + * Notice](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-1304). + * + * The request can be restricted to specific projects or issue types using the query parameters. The response will + * contain information for the valid projects, issue types, or project and issue type combinations requested. Note + * that invalid project, issue type, or project and issue type combinations do not generate errors. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Create + * issues_ [project permission](https://confluence.atlassian.com/x/yodKLg) in the requested projects. */ async getCreateIssueMeta( parameters: Parameters.GetCreateIssueMeta | undefined, callback: Callback, ): Promise; /** - * Returns details of projects, issue types within projects, and, when requested, the create screen fields for each - * issue type for the user. Use the information to populate the requests in [ Create - * issue](#api-rest-api-2-issue-post) and [Create issues](#api-rest-api-2-issue-bulk-post). + * @deprecated Returns details of projects, issue types within projects, and, when requested, the create screen fields + * for each issue type for the user. Use the information to populate the requests in [ Create + * issue](#api-rest-api-2-issue-post) and [Create issues](#api-rest-api-2-issue-bulk-post). * - * The request can be restricted to specific projects or issue types using the query parameters. The response will - * contain information for the valid projects, issue types, or project and issue type combinations requested. Note - * that invalid project, issue type, or project and issue type combinations do not generate errors. + * Deprecated, see [Create Issue Meta Endpoint Deprecation + * Notice](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-1304). * - * This operation can be accessed anonymously. + * The request can be restricted to specific projects or issue types using the query parameters. The response will + * contain information for the valid projects, issue types, or project and issue type combinations requested. Note + * that invalid project, issue type, or project and issue type combinations do not generate errors. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Create - * issues_ [project permission](https://confluence.atlassian.com/x/yodKLg) in the requested projects. + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Create + * issues_ [project permission](https://confluence.atlassian.com/x/yodKLg) in the requested projects. */ async getCreateIssueMeta( parameters?: Parameters.GetCreateIssueMeta, @@ -325,6 +450,134 @@ export class Issues { return this.client.sendRequest(config, callback); } + /** + * Returns a page of issue type metadata for a specified project. Use the information to populate the requests in [ + * Create issue](#api-rest-api-2-issue-post) and [Create issues](#api-rest-api-2-issue-bulk-post). + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Create + * issues_ [project permission](https://confluence.atlassian.com/x/yodKLg) in the requested projects. + */ + async getCreateIssueMetaIssueTypes( + parameters: Parameters.GetCreateIssueMetaIssueTypes, + callback: Callback, + ): Promise; + /** + * Returns a page of issue type metadata for a specified project. Use the information to populate the requests in [ + * Create issue](#api-rest-api-2-issue-post) and [Create issues](#api-rest-api-2-issue-bulk-post). + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Create + * issues_ [project permission](https://confluence.atlassian.com/x/yodKLg) in the requested projects. + */ + async getCreateIssueMetaIssueTypes( + parameters: Parameters.GetCreateIssueMetaIssueTypes, + callback?: never, + ): Promise; + async getCreateIssueMetaIssueTypes( + parameters: Parameters.GetCreateIssueMetaIssueTypes, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/issue/createmeta/${parameters.projectIdOrKey}/issuetypes`, + method: 'GET', + params: { + startAt: parameters.startAt, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a page of field metadata for a specified project and issuetype id. Use the information to populate the + * requests in [ Create issue](#api-rest-api-2-issue-post) and [Create issues](#api-rest-api-2-issue-bulk-post). + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Create + * issues_ [project permission](https://confluence.atlassian.com/x/yodKLg) in the requested projects. + */ + async getCreateIssueMetaIssueTypeId( + parameters: Parameters.GetCreateIssueMetaIssueTypeId, + callback: Callback, + ): Promise; + /** + * Returns a page of field metadata for a specified project and issuetype id. Use the information to populate the + * requests in [ Create issue](#api-rest-api-2-issue-post) and [Create issues](#api-rest-api-2-issue-bulk-post). + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Create + * issues_ [project permission](https://confluence.atlassian.com/x/yodKLg) in the requested projects. + */ + async getCreateIssueMetaIssueTypeId( + parameters: Parameters.GetCreateIssueMetaIssueTypeId, + callback?: never, + ): Promise; + async getCreateIssueMetaIssueTypeId( + parameters: Parameters.GetCreateIssueMetaIssueTypeId, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/issue/createmeta/${parameters.projectIdOrKey}/issuetypes/${parameters.issueTypeId}`, + method: 'GET', + params: { + startAt: parameters.startAt, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns all issues breaching and approaching per-issue limits. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) is required for the project the + * issues are in. Results may be incomplete otherwise + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getIssueLimitReport( + parameters: Parameters.GetIssueLimitReport | undefined, + callback: Callback, + ): Promise; + /** + * Returns all issues breaching and approaching per-issue limits. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) is required for the project the + * issues are in. Results may be incomplete otherwise + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getIssueLimitReport( + parameters?: Parameters.GetIssueLimitReport, + callback?: never, + ): Promise; + async getIssueLimitReport( + parameters?: Parameters.GetIssueLimitReport, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/issue/limit/report', + method: 'GET', + params: { + isReturningKeys: parameters?.isReturningKeys, + }, + data: { + issuesApproachingLimitParams: parameters?.issuesApproachingLimitParams, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Enables admins to unarchive up to 1000 issues in a single request using issue ID/key, returning details of the * issue(s) unarchived in the process and the errors encountered, if any. @@ -424,11 +677,11 @@ export class Issues { url: `/rest/api/2/issue/${issueIdOrKey}`, method: 'GET', params: { - fields: typeof parameters !== 'string' && parameters.fields, - fieldsByKeys: typeof parameters !== 'string' && parameters.fieldsByKeys, - expand: typeof parameters !== 'string' && parameters.expand, - properties: typeof parameters !== 'string' && parameters.properties, - updateHistory: typeof parameters !== 'string' && parameters.updateHistory, + fields: typeof parameters !== 'string' ? parameters.fields : undefined, + fieldsByKeys: typeof parameters !== 'string' ? parameters.fieldsByKeys : undefined, + expand: typeof parameters !== 'string' ? parameters.expand : undefined, + properties: typeof parameters !== 'string' ? parameters.properties : undefined, + updateHistory: typeof parameters !== 'string' ? parameters.updateHistory : undefined, }, }; @@ -436,7 +689,9 @@ export class Issues { } /** - * Edits an issue. A transition may be applied and issue properties updated as part of the edit. + * Edits an issue. Issue properties may be updated as part of the edit. Please note that issue transition is not + * supported and is ignored here. To transition an issue, please use [Transition + * issue](#api-rest-api-2-issue-issueIdOrKey-transitions-post). * * The 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-2-issue-issueIdOrKey-editmeta-get). @@ -460,7 +715,9 @@ export class Issues { */ async editIssue(parameters: Parameters.EditIssue, callback: Callback): Promise; /** - * Edits an issue. A transition may be applied and issue properties updated as part of the edit. + * Edits an issue. Issue properties may be updated as part of the edit. Please note that issue transition is not + * supported and is ignored here. To transition an issue, please use [Transition + * issue](#api-rest-api-2-issue-issueIdOrKey-transitions-post). * * The 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-2-issue-issueIdOrKey-editmeta-get). @@ -545,7 +802,7 @@ export class Issues { url: `/rest/api/2/issue/${issueIdOrKey}`, method: 'DELETE', params: { - deleteSubtasks: typeof parameters !== 'string' && parameters.deleteSubtasks, + deleteSubtasks: typeof parameters !== 'string' ? parameters.deleteSubtasks : undefined, }, }; @@ -659,8 +916,8 @@ export class Issues { url: `/rest/api/2/issue/${issueIdOrKey}/changelog`, method: 'GET', params: { - startAt: typeof parameters !== 'string' && parameters.startAt, - maxResults: typeof parameters !== 'string' && parameters.maxResults, + startAt: typeof parameters !== 'string' ? parameters.startAt : undefined, + maxResults: typeof parameters !== 'string' ? parameters.maxResults : undefined, }, }; @@ -836,8 +1093,8 @@ export class Issues { url: `/rest/api/2/issue/${issueIdOrKey}/editmeta`, method: 'GET', params: { - overrideScreenSecurity: typeof parameters !== 'string' && parameters.overrideScreenSecurity, - overrideEditableFlag: typeof parameters !== 'string' && parameters.overrideEditableFlag, + overrideScreenSecurity: typeof parameters !== 'string' ? parameters.overrideScreenSecurity : undefined, + overrideEditableFlag: typeof parameters !== 'string' ? parameters.overrideEditableFlag : undefined, }, }; @@ -940,11 +1197,12 @@ export class Issues { url: `/rest/api/2/issue/${issueIdOrKey}/transitions`, method: 'GET', params: { - expand: typeof parameters !== 'string' && parameters.expand, - transitionId: typeof parameters !== 'string' && parameters.transitionId, - skipRemoteOnlyCondition: typeof parameters !== 'string' && parameters.skipRemoteOnlyCondition, - includeUnavailableTransitions: typeof parameters !== 'string' && parameters.includeUnavailableTransitions, - sortByOpsBarAndStatus: typeof parameters !== 'string' && parameters.sortByOpsBarAndStatus, + expand: typeof parameters !== 'string' ? parameters.expand : undefined, + transitionId: typeof parameters !== 'string' ? parameters.transitionId : undefined, + skipRemoteOnlyCondition: typeof parameters !== 'string' ? parameters.skipRemoteOnlyCondition : undefined, + includeUnavailableTransitions: + typeof parameters !== 'string' ? parameters.includeUnavailableTransitions : undefined, + sortByOpsBarAndStatus: typeof parameters !== 'string' ? parameters.sortByOpsBarAndStatus : undefined, }, }; diff --git a/src/version2/jQL.ts b/src/version2/jQL.ts index a5dd54bb97..54f434391e 100644 --- a/src/version2/jQL.ts +++ b/src/version2/jQL.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class JQL { @@ -170,7 +170,7 @@ export class JQL { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ async parseJqlQueries( - parameters: Parameters.ParseJqlQueries | undefined, + parameters: Parameters.ParseJqlQueries, callback: Callback, ): Promise; /** @@ -183,21 +183,21 @@ export class JQL { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ async parseJqlQueries( - parameters?: Parameters.ParseJqlQueries, + parameters: Parameters.ParseJqlQueries, callback?: never, ): Promise; async parseJqlQueries( - parameters?: Parameters.ParseJqlQueries, + parameters: Parameters.ParseJqlQueries, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/2/jql/parse', method: 'POST', params: { - validation: parameters?.validation, + validation: parameters.validation, }, data: { - queries: parameters?.queries, + queries: parameters.queries, }, }; @@ -261,7 +261,7 @@ export class JQL { * Note 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). + * queries](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-jql/#api-rest-api-2-jql-sanitize-post). * * Before sanitization each JQL query is parsed. The queries are returned in the same order that they were passed. * @@ -284,7 +284,7 @@ export class JQL { * Note 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). + * queries](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-jql/#api-rest-api-2-jql-sanitize-post). * * Before sanitization each JQL query is parsed. The queries are returned in the same order that they were passed. * diff --git a/src/version2/jiraExpressions.ts b/src/version2/jiraExpressions.ts index 4138ae15ef..e34c2b88ca 100644 --- a/src/version2/jiraExpressions.ts +++ b/src/version2/jiraExpressions.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class JiraExpressions { @@ -46,8 +46,8 @@ export class JiraExpressions { check: parameters?.check, }, data: { - expressions: parameters?.expressions, contextVariables: parameters?.contextVariables, + expressions: parameters?.expressions, }, }; @@ -106,11 +106,12 @@ export class JiraExpressions { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required**: None. * However, an expression may return different results for different users depending on their permissions. For - * example, different users may see different comments on the same issue. Permission to access Jira Software is - * required to access Jira Software context variables (`board` and `sprint`) or fields (for example, `issue.sprint`). + * example, different users may see different comments on the same issue.\ + * Permission to access Jira Software is required to access Jira Software context variables (`board` and `sprint`) or + * fields (for example, `issue.sprint`). */ async evaluateJiraExpression( - parameters: Parameters.EvaluateJiraExpression | undefined, + parameters: Parameters.EvaluateJiraExpression, callback: Callback, ): Promise; /** @@ -165,26 +166,174 @@ export class JiraExpressions { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required**: None. * However, an expression may return different results for different users depending on their permissions. For - * example, different users may see different comments on the same issue. Permission to access Jira Software is - * required to access Jira Software context variables (`board` and `sprint`) or fields (for example, `issue.sprint`). + * example, different users may see different comments on the same issue.\ + * Permission to access Jira Software is required to access Jira Software context variables (`board` and `sprint`) or + * fields (for example, `issue.sprint`). */ async evaluateJiraExpression( - parameters?: Parameters.EvaluateJiraExpression, + parameters: Parameters.EvaluateJiraExpression, callback?: never, ): Promise; async evaluateJiraExpression( - parameters?: Parameters.EvaluateJiraExpression, + parameters: Parameters.EvaluateJiraExpression, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/2/expression/eval', method: 'POST', params: { - expand: parameters?.expand, + expand: parameters.expand, + }, + data: { + context: parameters.context, + expression: parameters.expression, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * 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`). + * + * 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 + * documentation](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/) for more details. + * + * #### Context variables + * + * The following context variables are available to Jira expressions evaluated by this resource. Their presence + * depends on various factors; usually you need to manually request them in the context object sent in the payload, + * but some of them are added automatically under certain conditions. + * + * - `user` ([User](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#user)): The + * current user. Always available and equal to `null` if the request is anonymous. + * - `app` ([App](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#app)): The + * [Connect app](https://developer.atlassian.com/cloud/jira/platform/index/#connect-apps) that made the request. + * Available only for authenticated requests made by Connect apps (read more here: [Authentication for Connect + * apps](https://developer.atlassian.com/cloud/jira/platform/security-for-connect-apps/)). + * - `issue` ([Issue](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#issue)): The + * current issue. Available only when the issue is provided in the request context object. + * - `issues` ([List](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#list) of + * [Issues](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#issue)): A + * collection of issues matching a JQL query. Available only when JQL is provided in the request context object. + * - `project` ([Project](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#project)): + * The current project. Available only when the project is provided in the request context object. + * - `sprint` ([Sprint](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#sprint)): + * The current sprint. Available only when the sprint is provided in the request context object. + * - `board` ([Board](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#board)): The + * current board. Available only when the board is provided in the request context object. + * - `serviceDesk` + * ([ServiceDesk](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#servicedesk)): + * The current service desk. Available only when the service desk is provided in the request context object. + * - `customerRequest` + * ([CustomerRequest](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#customerrequest)): + * 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: + * + * - `user`: A [user](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#user) + * specified as an Atlassian account ID. + * - `issue`: An [issue](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#issue) + * specified by ID 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. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required**: None. + * However, an expression may return different results for different users depending on their permissions. For + * example, different users may see different comments on the same issue.\ + * Permission to access Jira Software is required to access Jira Software context variables (`board` and `sprint`) or + * fields (for example, `issue.sprint`). + */ + async evaluateJiraExpressionUsingEnhancedSearch( + parameters: Parameters.EvaluateJiraExpressionUsingEnhancedSearch, + callback: Callback, + ): Promise; + /** + * 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`). + * + * 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 + * documentation](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/) for more details. + * + * #### Context variables + * + * The following context variables are available to Jira expressions evaluated by this resource. Their presence + * depends on various factors; usually you need to manually request them in the context object sent in the payload, + * but some of them are added automatically under certain conditions. + * + * - `user` ([User](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#user)): The + * current user. Always available and equal to `null` if the request is anonymous. + * - `app` ([App](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#app)): The + * [Connect app](https://developer.atlassian.com/cloud/jira/platform/index/#connect-apps) that made the request. + * Available only for authenticated requests made by Connect apps (read more here: [Authentication for Connect + * apps](https://developer.atlassian.com/cloud/jira/platform/security-for-connect-apps/)). + * - `issue` ([Issue](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#issue)): The + * current issue. Available only when the issue is provided in the request context object. + * - `issues` ([List](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#list) of + * [Issues](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#issue)): A + * collection of issues matching a JQL query. Available only when JQL is provided in the request context object. + * - `project` ([Project](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#project)): + * The current project. Available only when the project is provided in the request context object. + * - `sprint` ([Sprint](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#sprint)): + * The current sprint. Available only when the sprint is provided in the request context object. + * - `board` ([Board](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#board)): The + * current board. Available only when the board is provided in the request context object. + * - `serviceDesk` + * ([ServiceDesk](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#servicedesk)): + * The current service desk. Available only when the service desk is provided in the request context object. + * - `customerRequest` + * ([CustomerRequest](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#customerrequest)): + * 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: + * + * - `user`: A [user](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#user) + * specified as an Atlassian account ID. + * - `issue`: An [issue](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#issue) + * specified by ID 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. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required**: None. + * However, an expression may return different results for different users depending on their permissions. For + * example, different users may see different comments on the same issue.\ + * Permission to access Jira Software is required to access Jira Software context variables (`board` and `sprint`) or + * fields (for example, `issue.sprint`). + */ + async evaluateJiraExpressionUsingEnhancedSearch( + parameters: Parameters.EvaluateJiraExpressionUsingEnhancedSearch, + callback?: never, + ): Promise; + async evaluateJiraExpressionUsingEnhancedSearch( + parameters: Parameters.EvaluateJiraExpressionUsingEnhancedSearch, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/expression/evaluate', + method: 'POST', + params: { + expand: parameters.expand, }, data: { - expression: parameters?.expression, - context: parameters?.context, + expression: parameters.expression, + context: parameters.context, }, }; diff --git a/src/version2/jiraSettings.ts b/src/version2/jiraSettings.ts index 1ac57eaa79..03a13fef0e 100644 --- a/src/version2/jiraSettings.ts +++ b/src/version2/jiraSettings.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class JiraSettings { @@ -88,18 +88,17 @@ export class JiraSettings { * * The advanced settings below are also accessible in [Jira](https://confluence.atlassian.com/x/vYXKM). * - * | Key | Description | Default value | - * | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | - * | `jira.clone.prefix` | The string of text prefixed to the title of a cloned issue. | `CLONE -` | - * | `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` | - * | `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` | - * | `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` | - * | `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` | - * | `jira.issue.actions.order` | The default order of actions (such as _Comments_ or _Change history_) displayed on the issue view. | `asc` | - * | `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` | - * | `jira.view.issue.links.sort.order` | The sort order of the list of issue links on the issue view. | `type, status, priority` | - * | `jira.comment.collapsing.minimum.hidden` | The minimum number of comments required for comment collapsing to occur. A value of `0` disables comment collapsing. | `4` | - * | `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` | + * | Key | Description | Default value | + * | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | + * | `jira.clone.prefix` | The string of text prefixed to the title of a cloned issue. | `CLONE -` | + * | `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` | + * | `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` | + * | `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` | + * | `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` | + * | `jira.issue.actions.order` | The default order of actions (such as _Comments_ or _Change history_) displayed on the issue view. | `asc` | + * | `jira.view.issue.links.sort.order` | The sort order of the list of issue links on the issue view. | `type, status, priority` | + * | `jira.comment.collapsing.minimum.hidden` | The minimum number of comments required for comment collapsing to occur. A value of `0` disables comment collapsing. | `4` | + * | `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` | * * #### Look and feel * @@ -148,18 +147,17 @@ export class JiraSettings { * * The advanced settings below are also accessible in [Jira](https://confluence.atlassian.com/x/vYXKM). * - * | Key | Description | Default value | - * | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | - * | `jira.clone.prefix` | The string of text prefixed to the title of a cloned issue. | `CLONE -` | - * | `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` | - * | `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` | - * | `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` | - * | `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` | - * | `jira.issue.actions.order` | The default order of actions (such as _Comments_ or _Change history_) displayed on the issue view. | `asc` | - * | `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` | - * | `jira.view.issue.links.sort.order` | The sort order of the list of issue links on the issue view. | `type, status, priority` | - * | `jira.comment.collapsing.minimum.hidden` | The minimum number of comments required for comment collapsing to occur. A value of `0` disables comment collapsing. | `4` | - * | `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` | + * | Key | Description | Default value | + * | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | + * | `jira.clone.prefix` | The string of text prefixed to the title of a cloned issue. | `CLONE -` | + * | `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` | + * | `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` | + * | `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` | + * | `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` | + * | `jira.issue.actions.order` | The default order of actions (such as _Comments_ or _Change history_) displayed on the issue view. | `asc` | + * | `jira.view.issue.links.sort.order` | The sort order of the list of issue links on the issue view. | `type, status, priority` | + * | `jira.comment.collapsing.minimum.hidden` | The minimum number of comments required for comment collapsing to occur. A value of `0` disables comment collapsing. | `4` | + * | `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` | * * #### Look and feel * diff --git a/src/version2/jqlFunctionsApps.ts b/src/version2/jqlFunctionsApps.ts index ac95c558e5..59c779ae0e 100644 --- a/src/version2/jqlFunctionsApps.ts +++ b/src/version2/jqlFunctionsApps.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class JqlFunctionsApps { @@ -13,6 +13,9 @@ export class JqlFunctionsApps { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** This * API is only accessible to apps and apps can only inspect their own functions. + * + * The new `read:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async getPrecomputations( parameters: Parameters.GetPrecomputations | undefined, @@ -24,6 +27,9 @@ export class JqlFunctionsApps { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** This * API is only accessible to apps and apps can only inspect their own functions. + * + * The new `read:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async getPrecomputations( parameters?: Parameters.GetPrecomputations, @@ -53,9 +59,12 @@ export class JqlFunctionsApps { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** An API * for apps to update their own precomputations. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async updatePrecomputations( - parameters: Parameters.UpdatePrecomputations | undefined, + parameters: Parameters.UpdatePrecomputations, callback: Callback, ): Promise; /** @@ -63,17 +72,69 @@ export class JqlFunctionsApps { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** An API * for apps to update their own precomputations. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ - async updatePrecomputations(parameters?: Parameters.UpdatePrecomputations, callback?: never): Promise; + async updatePrecomputations(parameters: Parameters.UpdatePrecomputations, callback?: never): Promise; async updatePrecomputations( - parameters?: Parameters.UpdatePrecomputations, + parameters: Parameters.UpdatePrecomputations, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/2/jql/function/computation', method: 'POST', + params: { + skipNotFoundPrecomputations: parameters.skipNotFoundPrecomputations, + }, + data: { + values: parameters.values, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns function precomputations by IDs, along with information about when they were created, updated, and last + * used. Each precomputation has a `value` - the JQL fragment to replace the custom function clause with. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** This + * API is only accessible to apps and apps can only inspect their own functions. + * + * The new `read:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. + */ + async getPrecomputationsByID( + parameters: Parameters.GetPrecomputationsByID, + callback: Callback, + ): Promise; + /** + * Returns function precomputations by IDs, along with information about when they were created, updated, and last + * used. Each precomputation has a `value` - the JQL fragment to replace the custom function clause with. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** This + * API is only accessible to apps and apps can only inspect their own functions. + * + * The new `read:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. + */ + async getPrecomputationsByID( + parameters: Parameters.GetPrecomputationsByID, + callback?: never, + ): Promise; + async getPrecomputationsByID( + parameters: Parameters.GetPrecomputationsByID, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/jql/function/computation/search', + method: 'POST', + params: { + orderBy: parameters.orderBy, + }, data: { - values: parameters?.values, + precomputationIDs: parameters.precomputationIDs, }, }; diff --git a/src/version2/labels.ts b/src/version2/labels.ts index 9a8bc62248..25c32078f5 100644 --- a/src/version2/labels.ts +++ b/src/version2/labels.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Labels { diff --git a/src/version2/licenseMetrics.ts b/src/version2/licenseMetrics.ts index bf12582bf8..ad8e1121b2 100644 --- a/src/version2/licenseMetrics.ts +++ b/src/version2/licenseMetrics.ts @@ -1,6 +1,6 @@ import * as Models from './models'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class LicenseMetrics { diff --git a/src/version2/models/addAtlassianTeamRequest.ts b/src/version2/models/addAtlassianTeamRequest.ts new file mode 100644 index 0000000000..61b43a6018 --- /dev/null +++ b/src/version2/models/addAtlassianTeamRequest.ts @@ -0,0 +1,12 @@ +export interface AddAtlassianTeamRequest { + /** The capacity for the Atlassian team. */ + capacity?: number; + /** The Atlassian team ID. */ + id: string; + /** The ID of the issue source for the Atlassian team. */ + issueSourceId?: number; + /** The planning style for the Atlassian team. This must be "Scrum" or "Kanban". */ + planningStyle: 'Scrum' | 'Kanban' | string; + /** The sprint length for the Atlassian team. */ + sprintLength?: number; +} diff --git a/src/version2/models/addNotificationsDetails.ts b/src/version2/models/addNotificationsDetails.ts new file mode 100644 index 0000000000..388d257615 --- /dev/null +++ b/src/version2/models/addNotificationsDetails.ts @@ -0,0 +1,7 @@ +import { NotificationSchemeEventDetails } from './notificationSchemeEventDetails'; + +/** Details of notifications which should be added to the notification scheme. */ +export interface AddNotificationsDetails { + /** The list of notifications which should be added to the notification scheme. */ + notificationSchemeEvents: NotificationSchemeEventDetails[]; +} diff --git a/src/version2/models/attachmentMetadata.ts b/src/version2/models/attachmentMetadata.ts index 9a252e607f..6b67fc2651 100644 --- a/src/version2/models/attachmentMetadata.ts +++ b/src/version2/models/attachmentMetadata.ts @@ -16,7 +16,7 @@ export interface AttachmentMetadata { /** The MIME type of the attachment. */ mimeType?: string; /** Additional properties of the attachment. */ - properties?: {}; + properties?: unknown; /** The URL of the attachment. */ content?: string; /** The URL of a thumbnail representing the attachment. */ diff --git a/src/version2/models/avatar.ts b/src/version2/models/avatar.ts index 59626a2763..eae07991d1 100644 --- a/src/version2/models/avatar.ts +++ b/src/version2/models/avatar.ts @@ -1,3 +1,5 @@ +import { AvatarUrls } from './avatarUrls'; + /** Details of an avatar. */ export interface Avatar { /** The file name of the avatar icon. Returned for system avatars. */ @@ -5,16 +7,16 @@ export interface Avatar { /** The ID of the avatar. */ id: string; /** Whether the avatar can be deleted. */ - isDeletable?: boolean; + isDeletable: boolean; /** Whether the avatar is used in Jira. For example, shown as a project's avatar. */ - isSelected?: boolean; + isSelected: boolean; /** Whether the avatar is a system avatar. */ - isSystemAvatar?: boolean; + isSystemAvatar: boolean; /** * The owner of the avatar. For a system avatar the owner is null (and nothing is returned). For non-system avatars * this is the appropriate identifier, such as the ID for a project or the account ID for a user. */ owner?: string; /** The list of avatar icon URLs. */ - urls?: {}; + urls: AvatarUrls; } diff --git a/src/version2/models/avatarWithDetails.ts b/src/version2/models/avatarWithDetails.ts index 15f5f99071..f0c47200c6 100644 --- a/src/version2/models/avatarWithDetails.ts +++ b/src/version2/models/avatarWithDetails.ts @@ -2,5 +2,5 @@ export interface AvatarWithDetails { /** The content type of the avatar. Expected values include 'image/png', 'image/svg+xml', or any other valid MIME type. */ contentType: 'image/png' | 'image/svg+xml' | string; /** The binary representation of the avatar image. */ - avatar: ArrayBuffer; + avatar: Uint8Array; } diff --git a/src/version2/models/avatars.ts b/src/version2/models/avatars.ts index df93aa3ca5..bec166433b 100644 --- a/src/version2/models/avatars.ts +++ b/src/version2/models/avatars.ts @@ -3,7 +3,7 @@ import { Avatar } from './avatar'; /** Details about system and custom avatars. */ export interface Avatars { /** Custom avatars list. */ - custom?: Avatar[]; + custom: Avatar[]; /** System avatars list. */ - system?: Avatar[]; + system: Avatar[]; } diff --git a/src/version2/models/bulkChangelog.ts b/src/version2/models/bulkChangelog.ts new file mode 100644 index 0000000000..55644ab007 --- /dev/null +++ b/src/version2/models/bulkChangelog.ts @@ -0,0 +1,12 @@ +import { IssueChangeLog } from './issueChangeLog'; + +/** A page of changelogs which is designed to handle multiple issues */ +export interface BulkChangelog { + /** The list of issues changelogs. */ + issueChangeLogs?: IssueChangeLog[]; + /** + * Continuation token to fetch the next page. If this result represents the last or the only page, this token will be + * null. + */ + nextPageToken?: string; +} diff --git a/src/version2/models/bulkChangelogRequest.ts b/src/version2/models/bulkChangelogRequest.ts new file mode 100644 index 0000000000..b6162735ac --- /dev/null +++ b/src/version2/models/bulkChangelogRequest.ts @@ -0,0 +1,11 @@ +/** Request bean for bulk changelog retrieval */ +export interface BulkChangelogRequest { + /** List of field IDs to filter changelogs */ + fieldIds?: string[]; + /** List of issue IDs/keys to fetch changelogs for */ + issueIdsOrKeys: string[]; + /** The maximum number of items to return per page */ + maxResults?: number; + /** The cursor for pagination */ + nextPageToken?: string; +} diff --git a/src/version2/models/bulkContextualConfiguration.ts b/src/version2/models/bulkContextualConfiguration.ts new file mode 100644 index 0000000000..db48337038 --- /dev/null +++ b/src/version2/models/bulkContextualConfiguration.ts @@ -0,0 +1,13 @@ +/** Details of the contextual configuration for a custom field. */ +export interface BulkContextualConfiguration { + /** The field configuration. */ + configuration?: unknown; + /** The ID of the custom field. */ + customFieldId: string; + /** The ID of the field context the configuration is associated with. */ + fieldContextId: string; + /** The ID of the configuration. */ + id: string; + /** The field value schema. */ + schema?: unknown; +} diff --git a/src/version2/models/bulkEditShareableEntity.ts b/src/version2/models/bulkEditShareableEntity.ts index b34aebb907..787b6c3d82 100644 --- a/src/version2/models/bulkEditShareableEntity.ts +++ b/src/version2/models/bulkEditShareableEntity.ts @@ -3,5 +3,5 @@ export interface BulkEditShareableEntity { /** Allowed action for bulk edit shareable entity */ action: string; /** The mapping dashboard id to errors if any. */ - entityErrors?: {}; + entityErrors?: unknown; } diff --git a/src/version2/models/bulkIssue.ts b/src/version2/models/bulkIssue.ts new file mode 100644 index 0000000000..8134e65eb7 --- /dev/null +++ b/src/version2/models/bulkIssue.ts @@ -0,0 +1,14 @@ +import { IssueError } from './issueError'; +import { Issue } from './issue'; + +/** The list of requested issues & fields. */ +export interface BulkIssue { + /** + * When Jira can't return an issue enumerated in a request due to a retriable error or payload constraint, we'll + * return the respective issue ID with a corresponding error message. This list is empty when there are no errors + * Issues which aren't found or that the user doesn't have permission to view won't be returned in this list. + */ + issueErrors?: IssueError[]; + /** The list of issues. */ + issues?: Issue[]; +} diff --git a/src/version2/models/bulkIssueIsWatching.ts b/src/version2/models/bulkIssueIsWatching.ts index 8f83bdb7f9..8f44798854 100644 --- a/src/version2/models/bulkIssueIsWatching.ts +++ b/src/version2/models/bulkIssueIsWatching.ts @@ -1,5 +1,5 @@ /** A container for the watch status of a list of issues. */ export interface BulkIssueIsWatching { /** The map of issue ID to boolean watch status. */ - issuesIsWatching?: {}; + issuesIsWatching?: unknown; } diff --git a/src/version2/models/bulkIssuePropertyUpdateRequest.ts b/src/version2/models/bulkIssuePropertyUpdateRequest.ts index 8162a61c86..fb39596af7 100644 --- a/src/version2/models/bulkIssuePropertyUpdateRequest.ts +++ b/src/version2/models/bulkIssuePropertyUpdateRequest.ts @@ -14,5 +14,6 @@ export interface BulkIssuePropertyUpdateRequest { * 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. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any value?: any; } diff --git a/src/version2/models/component.ts b/src/version2/models/component.ts new file mode 100644 index 0000000000..9caaab2d89 --- /dev/null +++ b/src/version2/models/component.ts @@ -0,0 +1,8 @@ +export interface Component { + ari?: string; + description?: string; + id?: string; + metadata?: unknown; + name?: string; + self?: string; +} diff --git a/src/version2/models/configurationsListParameters.ts b/src/version2/models/configurationsListParameters.ts new file mode 100644 index 0000000000..0ded35d16e --- /dev/null +++ b/src/version2/models/configurationsListParameters.ts @@ -0,0 +1,5 @@ +/** List of custom fields identifiers which will be used to filter configurations */ +export interface ConfigurationsListParameters { + /** List of IDs or keys of the custom fields. It can be a mix of IDs and keys in the same query. */ + fieldIdsOrKeys: string[]; +} diff --git a/src/version2/models/contextualConfiguration.ts b/src/version2/models/contextualConfiguration.ts index c0ddb38796..1a1aa79f84 100644 --- a/src/version2/models/contextualConfiguration.ts +++ b/src/version2/models/contextualConfiguration.ts @@ -5,7 +5,7 @@ export interface ContextualConfiguration { /** The ID of the field context the configuration is associated with. */ fieldContextId: string; /** The field configuration. */ - configuration?: {}; + configuration?: unknown; /** The field value schema. */ - schema?: {}; + schema?: unknown; } diff --git a/src/version2/models/createCrossProjectReleaseRequest.ts b/src/version2/models/createCrossProjectReleaseRequest.ts new file mode 100644 index 0000000000..ad86f7182f --- /dev/null +++ b/src/version2/models/createCrossProjectReleaseRequest.ts @@ -0,0 +1,6 @@ +export interface CreateCrossProjectReleaseRequest { + /** The cross-project release name. */ + name: string; + /** The IDs of the releases to include in the cross-project release. */ + releaseIds?: number[]; +} diff --git a/src/version2/models/createCustomFieldRequest.ts b/src/version2/models/createCustomFieldRequest.ts new file mode 100644 index 0000000000..08f438709f --- /dev/null +++ b/src/version2/models/createCustomFieldRequest.ts @@ -0,0 +1,6 @@ +export interface CreateCustomFieldRequest { + /** The custom field ID. */ + customFieldId: number; + /** Allows filtering issues based on their values for the custom field. */ + filter?: boolean; +} diff --git a/src/version2/models/createDateFieldRequest.ts b/src/version2/models/createDateFieldRequest.ts new file mode 100644 index 0000000000..8c70d94eb2 --- /dev/null +++ b/src/version2/models/createDateFieldRequest.ts @@ -0,0 +1,6 @@ +export interface CreateDateFieldRequest { + /** A date custom field ID. This is required if the type is "DateCustomField". */ + dateCustomFieldId?: number; + /** The date field type. This must be "DueDate", "TargetStartDate", "TargetEndDate" or "DateCustomField". */ + type: 'DueDate' | 'TargetStartDate' | 'TargetEndDate' | 'DateCustomField' | string; +} diff --git a/src/version2/models/createExclusionRulesRequest.ts b/src/version2/models/createExclusionRulesRequest.ts new file mode 100644 index 0000000000..88a7aca6eb --- /dev/null +++ b/src/version2/models/createExclusionRulesRequest.ts @@ -0,0 +1,14 @@ +export interface CreateExclusionRulesRequest { + /** The IDs of the issues to exclude from the plan. */ + issueIds?: number[]; + /** The IDs of the issue types to exclude from the plan. */ + issueTypeIds?: number[]; + /** Issues completed this number of days ago will be excluded from the plan. */ + numberOfDaysToShowCompletedIssues?: number; + /** The IDs of the releases to exclude from the plan. */ + releaseIds?: number[]; + /** The IDs of the work status categories to exclude from the plan. */ + workStatusCategoryIds?: number[]; + /** The IDs of the work statuses to exclude from the plan. */ + workStatusIds?: number[]; +} diff --git a/src/version2/models/createIssueSourceRequest.ts b/src/version2/models/createIssueSourceRequest.ts new file mode 100644 index 0000000000..87f7d3c1f3 --- /dev/null +++ b/src/version2/models/createIssueSourceRequest.ts @@ -0,0 +1,9 @@ +export interface CreateIssueSourceRequest { + /** The issue source type. This must be "Board", "Project" or "Filter". */ + type: 'Board' | 'Project' | 'Filter' | string; + /** + * The issue source value. This must be a board ID if the type is "Board", a project ID if the type is "Project" or a + * filter ID if the type is "Filter". + */ + value: number; +} diff --git a/src/version2/models/createPermissionHolderRequest.ts b/src/version2/models/createPermissionHolderRequest.ts new file mode 100644 index 0000000000..1e0ab09af0 --- /dev/null +++ b/src/version2/models/createPermissionHolderRequest.ts @@ -0,0 +1,9 @@ +export interface CreatePermissionHolderRequest { + /** The permission holder type. This must be "Group" or "AccountId". */ + type: 'Group' | 'AccountId' | string; + /** + * The permission holder value. This must be a group name if the type is "Group" or an account ID if the type is + * "AccountId". + */ + value: string; +} diff --git a/src/version2/models/createPermissionRequest.ts b/src/version2/models/createPermissionRequest.ts new file mode 100644 index 0000000000..0ce59481d7 --- /dev/null +++ b/src/version2/models/createPermissionRequest.ts @@ -0,0 +1,7 @@ +import { CreatePermissionHolderRequest } from './createPermissionHolderRequest'; + +export interface CreatePermissionRequest { + holder?: CreatePermissionHolderRequest; + /** The permission type. This must be "View" or "Edit". */ + type: 'View' | 'Edit' | string; +} diff --git a/src/version2/models/createPlanOnlyTeamRequest.ts b/src/version2/models/createPlanOnlyTeamRequest.ts new file mode 100644 index 0000000000..f53a44b781 --- /dev/null +++ b/src/version2/models/createPlanOnlyTeamRequest.ts @@ -0,0 +1,14 @@ +export interface CreatePlanOnlyTeamRequest { + /** The capacity for the plan-only team. */ + capacity?: number; + /** The ID of the issue source for the plan-only team. */ + issueSourceId?: number; + /** The account IDs of the plan-only team members. */ + memberAccountIds?: string[]; + /** The plan-only team name. */ + name: string; + /** The planning style for the plan-only team. This must be "Scrum" or "Kanban". */ + planningStyle: 'Scrum' | 'Kanban' | string; + /** The sprint length for the plan-only team. */ + sprintLength?: number; +} diff --git a/src/version2/models/createPlanRequest.ts b/src/version2/models/createPlanRequest.ts new file mode 100644 index 0000000000..c567101c93 --- /dev/null +++ b/src/version2/models/createPlanRequest.ts @@ -0,0 +1,23 @@ +import { CreateCrossProjectReleaseRequest } from './createCrossProjectReleaseRequest'; +import { CreateCustomFieldRequest } from './createCustomFieldRequest'; +import { CreateExclusionRulesRequest } from './createExclusionRulesRequest'; +import { CreateIssueSourceRequest } from './createIssueSourceRequest'; +import { CreatePermissionRequest } from './createPermissionRequest'; +import { CreateSchedulingRequest } from './createSchedulingRequest'; + +export interface CreatePlanRequest { + /** The cross-project releases to include in the plan. */ + crossProjectReleases?: CreateCrossProjectReleaseRequest[]; + /** The custom fields for the plan. */ + customFields?: CreateCustomFieldRequest[]; + exclusionRules?: CreateExclusionRulesRequest; + /** The issue sources to include in the plan. */ + issueSources: CreateIssueSourceRequest[]; + /** The account ID of the plan lead. */ + leadAccountId?: string; + /** The plan name. */ + name: string; + /** The permissions for the plan. */ + permissions?: CreatePermissionRequest[]; + scheduling?: CreateSchedulingRequest; +} diff --git a/src/version2/models/createPriorityDetails.ts b/src/version2/models/createPriorityDetails.ts index 363c7a2759..934f9993bf 100644 --- a/src/version2/models/createPriorityDetails.ts +++ b/src/version2/models/createPriorityDetails.ts @@ -1,9 +1,40 @@ /** Details of an issue priority. */ export interface CreatePriorityDetails { + /** + * The ID for the avatar for the priority. Either the iconUrl or avatarId must be defined, but not both. This + * parameter is nullable and will become mandatory once the iconUrl parameter is deprecated. + */ + avatarId?: number; /** The description of the priority. */ description?: string; - /** The URL of an icon for the priority. Accepted protocols are HTTP and HTTPS. Built in icons can also be used. */ - iconUrl?: string; + /** + * The URL of an icon for the priority. Accepted protocols are HTTP and HTTPS. Built in icons can also be used. Either + * the iconUrl or avatarId must be defined, but not both. + * + * @deprecated This property is deprecated and will be removed in a future version. Use `avatarId` instead. + */ + iconUrl?: + | '/images/icons/priorities/blocker.png' + | '/images/icons/priorities/critical.png' + | '/images/icons/priorities/high.png' + | '/images/icons/priorities/highest.png' + | '/images/icons/priorities/low.png' + | '/images/icons/priorities/lowest.png' + | '/images/icons/priorities/major.png' + | '/images/icons/priorities/medium.png' + | '/images/icons/priorities/minor.png' + | '/images/icons/priorities/trivial.png' + | '/images/icons/priorities/blocker_new.png' + | '/images/icons/priorities/critical_new.png' + | '/images/icons/priorities/high_new.png' + | '/images/icons/priorities/highest_new.png' + | '/images/icons/priorities/low_new.png' + | '/images/icons/priorities/lowest_new.png' + | '/images/icons/priorities/major_new.png' + | '/images/icons/priorities/medium_new.png' + | '/images/icons/priorities/minor_new.png' + | '/images/icons/priorities/trivial_new.png' + | string; /** The name of the priority. Must be unique. */ name: string; /** The status color of the priority in 3-digit or 6-digit hexadecimal format. */ diff --git a/src/version2/models/createPrioritySchemeDetails.ts b/src/version2/models/createPrioritySchemeDetails.ts new file mode 100644 index 0000000000..48059e0c6c --- /dev/null +++ b/src/version2/models/createPrioritySchemeDetails.ts @@ -0,0 +1,16 @@ +import { PriorityMapping } from './priorityMapping'; + +/** Details of a new priority scheme */ +export interface CreatePrioritySchemeDetails { + /** The ID of the default priority for the priority scheme. */ + defaultPriorityId: number; + /** The description of the priority scheme. */ + description?: string; + mappings?: PriorityMapping; + /** The name of the priority scheme. Must be unique. */ + name: string; + /** The IDs of priorities in the scheme. */ + priorityIds: number[]; + /** The IDs of projects that will use the priority scheme. */ + projectIds?: number[]; +} diff --git a/src/version2/models/createSchedulingRequest.ts b/src/version2/models/createSchedulingRequest.ts new file mode 100644 index 0000000000..400b3c9e1f --- /dev/null +++ b/src/version2/models/createSchedulingRequest.ts @@ -0,0 +1,12 @@ +import { CreateDateFieldRequest } from './createDateFieldRequest'; + +export interface CreateSchedulingRequest { + /** The dependencies for the plan. This must be "Sequential" or "Concurrent". */ + dependencies?: 'Sequential' | 'Concurrent' | string; + endDate?: CreateDateFieldRequest; + /** The estimation unit for the plan. This must be "StoryPoints", "Days" or "Hours". */ + estimation: 'StoryPoints' | 'Days' | 'Hours' | string; + /** The inferred dates for the plan. This must be "None", "SprintDates" or "ReleaseDates". */ + inferredDates?: 'None' | 'SprintDates' | 'ReleaseDates' | string; + startDate?: CreateDateFieldRequest; +} diff --git a/src/version2/models/createWorkflowCondition.ts b/src/version2/models/createWorkflowCondition.ts index 2cb993c5ad..af45b411d9 100644 --- a/src/version2/models/createWorkflowCondition.ts +++ b/src/version2/models/createWorkflowCondition.ts @@ -3,7 +3,7 @@ export interface CreateWorkflowCondition { /** The list of workflow conditions. */ conditions?: CreateWorkflowCondition[]; /** EXPERIMENTAL. The configuration of the transition rule. */ - configuration?: {}; + configuration?: unknown; /** The compound condition operator. */ operator?: string; /** The type of the transition rule. */ diff --git a/src/version2/models/createWorkflowStatusDetails.ts b/src/version2/models/createWorkflowStatusDetails.ts index 8e227e5cd0..5e0fed8f4d 100644 --- a/src/version2/models/createWorkflowStatusDetails.ts +++ b/src/version2/models/createWorkflowStatusDetails.ts @@ -3,5 +3,5 @@ export interface CreateWorkflowStatusDetails { /** The ID of the status. */ id: string; /** The properties of the status. */ - properties?: {}; + properties?: unknown; } diff --git a/src/version2/models/createWorkflowTransitionDetails.ts b/src/version2/models/createWorkflowTransitionDetails.ts index 7e948429e5..bf071e123d 100644 --- a/src/version2/models/createWorkflowTransitionDetails.ts +++ b/src/version2/models/createWorkflowTransitionDetails.ts @@ -10,7 +10,7 @@ export interface CreateWorkflowTransitionDetails { /** The name of the transition. The maximum length is 60 characters. */ name: string; /** The properties of the transition. */ - properties?: {}; + properties?: unknown; rules?: CreateWorkflowTransitionRulesDetails; screen?: CreateWorkflowTransitionScreenDetails; /** The status the transition goes to. */ diff --git a/src/version2/models/createWorkflowTransitionRule.ts b/src/version2/models/createWorkflowTransitionRule.ts index 3c4f2765a8..ae2223f18c 100644 --- a/src/version2/models/createWorkflowTransitionRule.ts +++ b/src/version2/models/createWorkflowTransitionRule.ts @@ -1,7 +1,7 @@ /** A workflow transition rule. */ export interface CreateWorkflowTransitionRule { /** EXPERIMENTAL. The configuration of the transition rule. */ - configuration?: {}; + configuration?: unknown; /** The type of the transition rule. */ type: string; } diff --git a/src/version2/models/customFieldValueUpdate.ts b/src/version2/models/customFieldValueUpdate.ts index 0b63c3e2e9..1bbe8a0ef0 100644 --- a/src/version2/models/customFieldValueUpdate.ts +++ b/src/version2/models/customFieldValueUpdate.ts @@ -17,5 +17,6 @@ export interface CustomFieldValueUpdate { * A 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). */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any value: any; } diff --git a/src/version2/models/dataClassificationLevels.ts b/src/version2/models/dataClassificationLevels.ts new file mode 100644 index 0000000000..8358ceb249 --- /dev/null +++ b/src/version2/models/dataClassificationLevels.ts @@ -0,0 +1,7 @@ +import { DataClassificationTag } from './dataClassificationTag'; + +/** The data classification. */ +export interface DataClassificationLevels { + /** The data classifications. */ + classifications?: DataClassificationTag[]; +} diff --git a/src/version2/models/dataClassificationTag.ts b/src/version2/models/dataClassificationTag.ts new file mode 100644 index 0000000000..672de56a1c --- /dev/null +++ b/src/version2/models/dataClassificationTag.ts @@ -0,0 +1,17 @@ +/** The data classification. */ +export interface DataClassificationTag { + /** The color of the data classification object. */ + color?: string; + /** The description of the data classification object. */ + description?: string; + /** The guideline of the data classification object. */ + guideline?: string; + /** The ID of the data classification object. */ + id: string; + /** The name of the data classification object. */ + name?: string; + /** The rank of the data classification object. */ + rank?: number; + /** The status of the data classification object. */ + status: string; +} diff --git a/src/version2/models/duplicatePlanRequest.ts b/src/version2/models/duplicatePlanRequest.ts new file mode 100644 index 0000000000..3d5c98beaf --- /dev/null +++ b/src/version2/models/duplicatePlanRequest.ts @@ -0,0 +1,4 @@ +export interface DuplicatePlanRequest { + /** The plan name. */ + name: string; +} diff --git a/src/version2/models/enhancedSearchRequest.ts b/src/version2/models/enhancedSearchRequest.ts new file mode 100644 index 0000000000..063e9754a3 --- /dev/null +++ b/src/version2/models/enhancedSearchRequest.ts @@ -0,0 +1,99 @@ +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. + * + * - 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. + */ + nextPageToken?: string; + /** + * The maximum number of items to return per page. To manage page size, API may return fewer items per page where a + * large number of fields are requested. The greatest number of items returned per page is achieved when requesting + * `id` or `key` only. + * + * It returns max 5000 issues. + * + * Default: `50` + * + * Format: `int32` + */ + maxResults?: number; + /** + * A list of fields to return for each issue, use it to retrieve a subset of fields. This parameter accepts a + * comma-separated list. Expand options include: + * + * - `*all` Returns all fields. + * - `*navigable` Returns navigable fields. + * - `id` Returns only issue IDs. + * - Any issue field, prefixed with a minus to exclude. + * + * The default is `id`. + * + * Examples: + * + * - `summary,comment` Returns only the summary and comments fields. + * - `-description` Returns all navigable (default) fields except description. + * - `*all,-comment` Returns all fields except comments. + * + * 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) + * where the default is all fields. + */ + fields?: string[]; + /** + * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#expansion) to include additional + * information about issues in the response. Note that, unlike the majority of instances where `expand` is specified, + * `expand` is defined as a comma-delimited string of values. The expand options are: + * + * - `renderedFields` Returns field values rendered in HTML format. + * - `names` Returns the display name of each field. + * - `schema` Returns the schema describing a field type. + * - `transitions` Returns all possible transitions for the issue. + * - `operations` Returns all possible operations for the issue. + * - `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. + * + * Examples: `names,changelog` Returns the display name of each field as well as a list of recent updates to an issue. + */ + expand?: + | 'renderedFields' + | 'names' + | 'schema' + | 'transitions' + | 'operations' + | 'editmeta' + | 'changelog' + | 'versionedRepresentations' + | ( + | 'renderedFields' + | 'names' + | 'schema' + | 'transitions' + | 'operations' + | 'editmeta' + | 'changelog' + | 'versionedRepresentations' + )[] + | string + | string[]; + /** 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; + /** Fail this request early if we can't retrieve all field data. The default is `false`. */ + failFast?: boolean; + /** Strong consistency issue ids to be reconciled with search results. Accepts max 50 ids. All issues must exist. */ + reconcileIssues?: number[]; +} diff --git a/src/version2/models/entityProperty.ts b/src/version2/models/entityProperty.ts index af8e3ac889..f00da59752 100644 --- a/src/version2/models/entityProperty.ts +++ b/src/version2/models/entityProperty.ts @@ -6,5 +6,6 @@ export interface EntityProperty { /** The key of the property. Required on create and update. */ key?: string; /** The value of the property. Required on create and update. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any value?: any; } diff --git a/src/version2/models/errorCollection.ts b/src/version2/models/errorCollection.ts index f7e87fa1fe..d020c8c401 100644 --- a/src/version2/models/errorCollection.ts +++ b/src/version2/models/errorCollection.ts @@ -6,6 +6,6 @@ export interface ErrorCollection { * 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?: {}; + errors?: unknown; status?: number; } diff --git a/src/version2/models/evaluatedJiraExpression.ts b/src/version2/models/evaluatedJiraExpression.ts new file mode 100644 index 0000000000..c3ae27a35e --- /dev/null +++ b/src/version2/models/evaluatedJiraExpression.ts @@ -0,0 +1,16 @@ +import { JExpEvaluateMetaData } from './jExpEvaluateMetaData'; + +/** + * The result of evaluating a Jira expression.This bean will be replacing `JiraExpressionResultBean` bean as part of new + * evaluate endpoint + */ +export interface EvaluatedJiraExpression { + meta?: JExpEvaluateMetaData; + /** + * 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: unknown; +} diff --git a/src/version2/models/fieldCreateMetadata.ts b/src/version2/models/fieldCreateMetadata.ts new file mode 100644 index 0000000000..b2067a9e98 --- /dev/null +++ b/src/version2/models/fieldCreateMetadata.ts @@ -0,0 +1,26 @@ +import { JsonType } from './jsonType'; + +/** The metadata describing an issue field for createmeta. */ +export interface FieldCreateMetadata { + /** The list of values allowed in the field. */ + allowedValues?: unknown[]; + /** The URL that can be used to automatically complete the field. */ + autoCompleteUrl?: string; + /** The configuration properties. */ + configuration?: unknown; + /** The default value of the field. */ + defaultValue?: unknown; + /** The field id. */ + fieldId: string; + /** Whether the field has a default value. */ + hasDefaultValue?: boolean; + /** The key of the field. */ + key: string; + /** The name of the field. */ + name: string; + /** The list of operations that can be performed on the field. */ + operations: string[]; + /** Whether the field is required. */ + required: boolean; + schema?: JsonType; +} diff --git a/src/version2/models/fieldMetadata.ts b/src/version2/models/fieldMetadata.ts index 255d970adc..7b083476f7 100644 --- a/src/version2/models/fieldMetadata.ts +++ b/src/version2/models/fieldMetadata.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ import { JsonType } from './jsonType'; /** The metadata describing an issue field. */ diff --git a/src/version2/models/fields.ts b/src/version2/models/fields.ts index 820f27c009..a84f43086c 100644 --- a/src/version2/models/fields.ts +++ b/src/version2/models/fields.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ import { Attachment } from './attachment'; import { Comment } from './comment'; import { FixVersion } from './fixVersion'; @@ -17,7 +18,7 @@ import { Watchers } from './watchers'; import { Worklog } from './worklog'; /** Key fields from the linked issue. */ -export interface Fields { +export interface Fields extends Record { /** The estimate of how much longer working on the issue will take, in seconds. */ aggregatetimespent: number | null; /** The assignee of the linked issue. */ @@ -93,6 +94,4 @@ export interface Fields { worklogs: Worklog[]; }; workratio: number; - - [key: string]: any; } diff --git a/src/version2/models/filter.ts b/src/version2/models/filter.ts index ac37b1db24..84c57805b2 100644 --- a/src/version2/models/filter.ts +++ b/src/version2/models/filter.ts @@ -5,6 +5,12 @@ import { UserList } from './userList'; /** Details about a filter. */ export interface Filter { + /** + * @experimental [Experimental] Approximate last used time. Returns the date and time when the filter was last used. Returns `null` + * if the filter hasn't been used after tracking was enabled. For performance reasons, timestamps aren't updated in + * real time and therefore may not be exactly accurate. + */ + approximateLastUsed?: string; /** A description of the filter. */ description?: string; /** The groups and projects that can edit the filter. */ diff --git a/src/version2/models/filterDetails.ts b/src/version2/models/filterDetails.ts index d4b8b3d624..a44d9ea59b 100644 --- a/src/version2/models/filterDetails.ts +++ b/src/version2/models/filterDetails.ts @@ -4,6 +4,12 @@ import { User } from './user'; /** Details of a filter. */ export interface FilterDetails { + /** + * @experimental [Experimental] Approximate last used time. Returns the date and time when the filter was last used. Returns `null` + * if the filter hasn't been used after tracking was enabled. For performance reasons, timestamps aren't updated in + * real time and therefore may not be exactly accurate. + */ + approximateLastUsed?: string; /** The description of the filter. */ description?: string; /** diff --git a/src/version2/models/getAtlassianTeamResponse.ts b/src/version2/models/getAtlassianTeamResponse.ts new file mode 100644 index 0000000000..ad60480d52 --- /dev/null +++ b/src/version2/models/getAtlassianTeamResponse.ts @@ -0,0 +1,12 @@ +export interface GetAtlassianTeamResponse { + /** The capacity for the Atlassian team. */ + capacity?: number; + /** The Atlassian team ID. */ + id: string; + /** The ID of the issue source for the Atlassian team. */ + issueSourceId?: number; + /** The planning style for the Atlassian team. This is "Scrum" or "Kanban". */ + planningStyle: 'Scrum' | 'Kanban' | string; + /** The sprint length for the Atlassian team. */ + sprintLength?: number; +} diff --git a/src/version2/models/getCrossProjectReleaseResponse.ts b/src/version2/models/getCrossProjectReleaseResponse.ts new file mode 100644 index 0000000000..4e41368cc5 --- /dev/null +++ b/src/version2/models/getCrossProjectReleaseResponse.ts @@ -0,0 +1,6 @@ +export interface GetCrossProjectReleaseResponse { + /** The cross-project release name. */ + name?: string; + /** The IDs of the releases included in the cross-project release. */ + releaseIds?: number[]; +} diff --git a/src/version2/models/getCustomFieldResponse.ts b/src/version2/models/getCustomFieldResponse.ts new file mode 100644 index 0000000000..8ac304ff9b --- /dev/null +++ b/src/version2/models/getCustomFieldResponse.ts @@ -0,0 +1,6 @@ +export interface GetCustomFieldResponse { + /** The custom field ID. */ + customFieldId: number; + /** Allows filtering issues based on their values for the custom field. */ + filter?: boolean; +} diff --git a/src/version2/models/getDateFieldResponse.ts b/src/version2/models/getDateFieldResponse.ts new file mode 100644 index 0000000000..d2293240a8 --- /dev/null +++ b/src/version2/models/getDateFieldResponse.ts @@ -0,0 +1,6 @@ +export interface GetDateFieldResponse { + /** A date custom field ID. This is returned if the type is "DateCustomField". */ + dateCustomFieldId?: number; + /** The date field type. This is "DueDate", "TargetStartDate", "TargetEndDate" or "DateCustomField". */ + type: 'DueDate' | 'TargetStartDate' | 'TargetEndDate' | 'DateCustomField' | string; +} diff --git a/src/version2/models/getExclusionRulesResponse.ts b/src/version2/models/getExclusionRulesResponse.ts new file mode 100644 index 0000000000..c2852ef738 --- /dev/null +++ b/src/version2/models/getExclusionRulesResponse.ts @@ -0,0 +1,14 @@ +export interface GetExclusionRulesResponse { + /** The IDs of the issues excluded from the plan. */ + issueIds?: number[]; + /** The IDs of the issue types excluded from the plan. */ + issueTypeIds?: number[]; + /** Issues completed this number of days ago are excluded from the plan. */ + numberOfDaysToShowCompletedIssues: number; + /** The IDs of the releases excluded from the plan. */ + releaseIds?: number[]; + /** The IDs of the work status categories excluded from the plan. */ + workStatusCategoryIds?: number[]; + /** The IDs of the work statuses excluded from the plan. */ + workStatusIds?: number[]; +} diff --git a/src/version2/models/getIssueSourceResponse.ts b/src/version2/models/getIssueSourceResponse.ts new file mode 100644 index 0000000000..fd864bf6ad --- /dev/null +++ b/src/version2/models/getIssueSourceResponse.ts @@ -0,0 +1,9 @@ +export interface GetIssueSourceResponse { + /** The issue source type. This is "Board", "Project" or "Filter". */ + type: 'Board' | 'Project' | 'Filter' | 'Custom' | string; + /** + * The issue source value. This is a board ID if the type is "Board", a project ID if the type is "Project" or a + * filter ID if the type is "Filter". + */ + value: number; +} diff --git a/src/version2/models/getPermissionHolderResponse.ts b/src/version2/models/getPermissionHolderResponse.ts new file mode 100644 index 0000000000..4d44c9cb87 --- /dev/null +++ b/src/version2/models/getPermissionHolderResponse.ts @@ -0,0 +1,9 @@ +export interface GetPermissionHolderResponse { + /** The permission holder type. This is "Group" or "AccountId". */ + type: 'Group' | 'AccountId' | string; + /** + * The permission holder value. This is a group name if the type is "Group" or an account ID if the type is + * "AccountId". + */ + value: string; +} diff --git a/src/version2/models/getPermissionResponse.ts b/src/version2/models/getPermissionResponse.ts new file mode 100644 index 0000000000..c778b582bc --- /dev/null +++ b/src/version2/models/getPermissionResponse.ts @@ -0,0 +1,7 @@ +import { GetPermissionHolderResponse } from './getPermissionHolderResponse'; + +export interface GetPermissionResponse { + holder?: GetPermissionHolderResponse; + /** The permission type. This is "View" or "Edit". */ + type: 'View' | 'Edit' | string; +} diff --git a/src/version2/models/getPlanOnlyTeamResponse.ts b/src/version2/models/getPlanOnlyTeamResponse.ts new file mode 100644 index 0000000000..5dd4cf00e0 --- /dev/null +++ b/src/version2/models/getPlanOnlyTeamResponse.ts @@ -0,0 +1,16 @@ +export interface GetPlanOnlyTeamResponse { + /** The capacity for the plan-only team. */ + capacity?: number; + /** The plan-only team ID. */ + id: number; + /** The ID of the issue source for the plan-only team. */ + issueSourceId?: number; + /** The account IDs of the plan-only team members. */ + memberAccountIds?: string[]; + /** The plan-only team name. */ + name: string; + /** The planning style for the plan-only team. This is "Scrum" or "Kanban". */ + planningStyle: 'Scrum' | 'Kanban' | string; + /** The sprint length for the plan-only team. */ + sprintLength?: number; +} diff --git a/src/version2/models/getPlanResponseForPage.ts b/src/version2/models/getPlanResponseForPage.ts new file mode 100644 index 0000000000..63a774a14f --- /dev/null +++ b/src/version2/models/getPlanResponseForPage.ts @@ -0,0 +1,12 @@ +import { GetIssueSourceResponse } from './getIssueSourceResponse'; + +export interface GetPlanResponseForPage { + /** The plan ID. */ + id: string; + /** The issue sources included in the plan. */ + issueSources?: GetIssueSourceResponse[]; + /** The plan name. */ + name: string; + /** The plan status. This is "Active", "Trashed" or "Archived". */ + status: 'Active' | 'Trashed' | 'Archived' | string; +} diff --git a/src/version2/models/getSchedulingResponse.ts b/src/version2/models/getSchedulingResponse.ts new file mode 100644 index 0000000000..8a284167f7 --- /dev/null +++ b/src/version2/models/getSchedulingResponse.ts @@ -0,0 +1,12 @@ +import { GetDateFieldResponse } from './getDateFieldResponse'; + +export interface GetSchedulingResponse { + /** The dependencies for the plan. This is "Sequential" or "Concurrent". */ + dependencies: 'Sequential' | 'Concurrent' | string; + endDate?: GetDateFieldResponse; + /** The estimation unit for the plan. This is "StoryPoints", "Days" or "Hours". */ + estimation: 'StoryPoints' | 'Days' | 'Hours' | string; + /** The inferred dates for the plan. This is "None", "SprintDates" or "ReleaseDates". */ + inferredDates: 'None' | 'SprintDates' | 'ReleaseDates' | string; + startDate?: GetDateFieldResponse; +} diff --git a/src/version2/models/getTeamResponseForPage.ts b/src/version2/models/getTeamResponseForPage.ts new file mode 100644 index 0000000000..6d49ebff03 --- /dev/null +++ b/src/version2/models/getTeamResponseForPage.ts @@ -0,0 +1,8 @@ +export interface GetTeamResponseForPage { + /** The team ID. */ + id: string; + /** The team name. This is returned if the type is "PlanOnly". */ + name?: string; + /** The team type. This is "PlanOnly" or "Atlassian". */ + type: 'PlanOnly' | 'Atlassian' | string; +} diff --git a/src/version2/models/historyMetadata.ts b/src/version2/models/historyMetadata.ts index 28f94003e3..cb42caea36 100644 --- a/src/version2/models/historyMetadata.ts +++ b/src/version2/models/historyMetadata.ts @@ -17,7 +17,7 @@ export interface HistoryMetadata { /** The description key of the email address associated the history record. */ emailDescriptionKey?: string; /** Additional arbitrary information about the history record. */ - extraData?: {}; + extraData?: unknown; generator?: HistoryMetadataParticipant; /** The type of the history record. */ type?: string; diff --git a/src/version2/models/idSearchRequest.ts b/src/version2/models/idSearchRequest.ts new file mode 100644 index 0000000000..4f15da0140 --- /dev/null +++ b/src/version2/models/idSearchRequest.ts @@ -0,0 +1,8 @@ +export interface IdSearchRequest { + /** A [JQL](https://confluence.atlassian.com/x/egORLQ) expression. Order by clauses are not allowed. */ + jql?: string; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** The continuation token to fetch the next page. This token is provided by the response of this endpoint. */ + nextPageToken?: string; +} diff --git a/src/version2/models/idSearchResults.ts b/src/version2/models/idSearchResults.ts new file mode 100644 index 0000000000..596045fb5c --- /dev/null +++ b/src/version2/models/idSearchResults.ts @@ -0,0 +1,10 @@ +/** Result of your JQL search. Returns a list of issue IDs and a token to fetch the next page if one exists. */ +export interface IdSearchResults { + /** The list of issue IDs found by the search. */ + issueIds?: number[]; + /** + * Continuation token to fetch the next page. If this result represents the last or the only page this token will be + * null. + */ + nextPageToken?: string; +} diff --git a/src/version2/models/index.ts b/src/version2/models/index.ts index 63f87a2208..be27640158 100644 --- a/src/version2/models/index.ts +++ b/src/version2/models/index.ts @@ -1,7 +1,9 @@ export * from './actorInput'; export * from './actorsMap'; +export * from './addAtlassianTeamRequest'; export * from './addField'; export * from './addGroup'; +export * from './addNotificationsDetails'; export * from './addSecuritySchemeLevelsRequest'; export * from './announcementBannerConfiguration'; export * from './announcementBannerConfigurationUpdate'; @@ -32,10 +34,14 @@ export * from './avatar'; export * from './avatars'; export * from './avatarUrls'; export * from './avatarWithDetails'; +export * from './bulkChangelog'; +export * from './bulkChangelogRequest'; export * from './bulkChangeOwnerDetails'; +export * from './bulkContextualConfiguration'; export * from './bulkCustomFieldOptionCreateRequest'; export * from './bulkCustomFieldOptionUpdateRequest'; export * from './bulkEditShareableEntity'; +export * from './bulkIssue'; export * from './bulkIssueIsWatching'; export * from './bulkIssuePropertyUpdateRequest'; export * from './bulkOperationErrorResult'; @@ -50,11 +56,13 @@ export * from './changedWorklogs'; export * from './changelog'; export * from './columnItem'; export * from './comment'; +export * from './component'; export * from './componentIssuesCount'; export * from './componentWithIssueCount'; export * from './conditionGroupConfiguration'; export * from './conditionGroupUpdate'; export * from './configuration'; +export * from './configurationsListParameters'; export * from './connectCustomFieldValue'; export * from './connectCustomFieldValues'; export * from './connectModule'; @@ -67,14 +75,25 @@ export * from './containerOfWorkflowSchemeAssociations'; export * from './contextForProjectAndIssueType'; export * from './contextualConfiguration'; export * from './convertedJQLQueries'; +export * from './createCrossProjectReleaseRequest'; export * from './createCustomFieldContext'; +export * from './createCustomFieldRequest'; +export * from './createDateFieldRequest'; export * from './createdIssue'; export * from './createdIssues'; +export * from './createExclusionRulesRequest'; export * from './createIssueSecuritySchemeDetails'; +export * from './createIssueSourceRequest'; export * from './createNotificationSchemeDetails'; +export * from './createPermissionHolderRequest'; +export * from './createPermissionRequest'; +export * from './createPlanOnlyTeamRequest'; +export * from './createPlanRequest'; export * from './createPriorityDetails'; +export * from './createPrioritySchemeDetails'; export * from './createProjectDetails'; export * from './createResolutionDetails'; +export * from './createSchedulingRequest'; export * from './createUiModificationDetails'; export * from './createUpdateRoleRequest'; export * from './createWorkflowCondition'; @@ -109,18 +128,24 @@ export * from './dashboardGadgetResponse'; export * from './dashboardGadgetSettings'; export * from './dashboardGadgetUpdateRequest'; export * from './dashboardUser'; +export * from './dataClassificationLevels'; +export * from './dataClassificationTag'; export * from './dateRangeFilter'; export * from './defaultLevelValue'; export * from './defaultShareScope'; export * from './defaultWorkflow'; export * from './documentVersion'; +export * from './duplicatePlanRequest'; +export * from './enhancedSearchRequest'; export * from './entityProperty'; export * from './entityPropertyDetails'; export * from './error'; export * from './errorCollection'; export * from './errors'; +export * from './evaluatedJiraExpression'; export * from './eventNotification'; export * from './exportArchivedIssuesTaskProgress'; +export * from './exportArchivedIssuesTaskProgress'; export * from './failedWebhook'; export * from './failedWebhooks'; export * from './field'; @@ -133,6 +158,7 @@ export * from './fieldConfigurationScheme'; export * from './fieldConfigurationSchemeProjectAssociation'; export * from './fieldConfigurationSchemeProjects'; export * from './fieldConfigurationToIssueTypeMapping'; +export * from './fieldCreateMetadata'; export * from './fieldDetails'; export * from './fieldLastUsed'; export * from './fieldMetadata'; @@ -148,6 +174,18 @@ export * from './foundGroups'; export * from './foundUsers'; export * from './foundUsersAndGroups'; export * from './functionReferenceData'; +export * from './getAtlassianTeamResponse'; +export * from './getCrossProjectReleaseResponse'; +export * from './getCustomFieldResponse'; +export * from './getDateFieldResponse'; +export * from './getExclusionRulesResponse'; +export * from './getIssueSourceResponse'; +export * from './getPermissionHolderResponse'; +export * from './getPermissionResponse'; +export * from './getPlanOnlyTeamResponse'; +export * from './getPlanResponseForPage'; +export * from './getSchedulingResponse'; +export * from './getTeamResponseForPage'; export * from './globalScope'; export * from './group'; export * from './groupDetails'; @@ -160,14 +198,19 @@ export * from './historyMetadataParticipant'; export * from './icon'; export * from './id'; export * from './idOrKey'; +export * from './idSearchRequest'; +export * from './idSearchResults'; export * from './includedFields'; export * from './issue'; export * from './issueArchivalSync'; +export * from './issueChangeLog'; export * from './issueChangelogIds'; export * from './issueCommentListRequest'; +export * from './issueContextVariable'; export * from './issueCreateMetadata'; export * from './issueEntityProperties'; export * from './issueEntityPropertiesForMultiUpdate'; +export * from './issueError'; export * from './issueEvent'; export * from './issueFieldOption'; export * from './issueFieldOptionConfiguration'; @@ -175,6 +218,8 @@ export * from './issueFieldOptionCreate'; export * from './issueFieldOptionScope'; export * from './issueFilterForBulkPropertyDelete'; export * from './issueFilterForBulkPropertySet'; +export * from './issueLimitReport'; +export * from './issueLimitReportRequest'; export * from './issueLink'; export * from './issueLinkType'; export * from './issueLinkTypes'; @@ -219,13 +264,20 @@ export * from './issueTypeWithStatus'; export * from './issueTypeWorkflowMapping'; export * from './issueUpdateDetails'; export * from './issueUpdateMetadata'; +export * from './jexpEvaluateCtxIssues'; +export * from './jexpEvaluateCtxJqlIssues'; +export * from './jExpEvaluateIssuesJqlMetaData'; +export * from './jExpEvaluateIssuesMeta'; +export * from './jExpEvaluateMetaData'; export * from './jexpIssues'; export * from './jexpJqlIssues'; export * from './jiraExpressionAnalysis'; export * from './jiraExpressionComplexity'; export * from './jiraExpressionEvalContext'; export * from './jiraExpressionEvalRequest'; +export * from './jiraExpressionEvaluateContext'; export * from './jiraExpressionEvaluationMetaData'; +export * from './jiraExpressionEvalUsingEnhancedSearchRequest'; export * from './jiraExpressionForAnalysis'; export * from './jiraExpressionResult'; export * from './jiraExpressionsAnalysis'; @@ -235,7 +287,11 @@ export * from './jiraExpressionValidationError'; export * from './jiraStatus'; export * from './jiraWorkflow'; export * from './jiraWorkflowStatus'; +export * from './jQLCount'; +export * from './jQLCountRequest'; export * from './jqlFunctionPrecomputation'; +export * from './jqlFunctionPrecomputationGetByIdRequest'; +export * from './jqlFunctionPrecomputationGetByIdResponse'; export * from './jqlFunctionPrecomputationUpdate'; export * from './jqlFunctionPrecomputationUpdateRequest'; export * from './jQLPersonalDataMigrationRequest'; @@ -250,6 +306,8 @@ export * from './jqlQueryOrderByClauseElement'; export * from './jqlQueryToSanitize'; export * from './jQLQueryWithUnknownUsers'; export * from './jQLReferenceData'; +export * from './jsonContextVariable'; +export * from './jsonNode'; export * from './jsonType'; export * from './license'; export * from './licensedApplication'; @@ -260,6 +318,8 @@ export * from './linkIssueRequestJson'; export * from './listWrapperCallbackApplicationRole'; export * from './listWrapperCallbackGroupName'; export * from './locale'; +export * from './mappingsByIssueTypeOverride'; +export * from './mappingsByWorkflow'; export * from './moveField'; export * from './multiIssueEntityProperties'; export * from './multipleCustomFieldValuesUpdate'; @@ -283,6 +343,7 @@ export * from './operationMessage'; export * from './operations'; export * from './orderOfCustomFieldOptions'; export * from './orderOfIssueTypes'; +export * from './pageBulkContextualConfiguration'; export * from './pageChangelog'; export * from './pageComment'; export * from './pageComponentWithIssueCount'; @@ -316,6 +377,8 @@ export * from './pageJqlFunctionPrecomputation'; export * from './pageNotificationScheme'; export * from './pageOfChangelogs'; export * from './pageOfComments'; +export * from './pageOfCreateMetaIssueTypes'; +export * from './pageOfCreateMetaIssueTypeWithField'; export * from './pageOfDashboards'; export * from './pageOfStatuses'; export * from './pageOfWorklogs'; @@ -336,6 +399,8 @@ export * from './pageUserDetails'; export * from './pageUserKey'; export * from './pageVersion'; export * from './pageWebhook'; +export * from './pageWithCursorGetPlanResponseForPage'; +export * from './pageWithCursorGetTeamResponseForPage'; export * from './pageWorkflow'; export * from './pageWorkflowScheme'; export * from './pageWorkflowTransitionRules'; @@ -350,13 +415,21 @@ export * from './permissionScheme'; export * from './permissionSchemes'; export * from './permissionsKeys'; export * from './permittedProjects'; +export * from './plan'; export * from './priority'; export * from './priorityId'; +export * from './priorityMapping'; +export * from './prioritySchemeChangesWithoutMappings'; +export * from './prioritySchemeId'; +export * from './prioritySchemeWithPaginatedPrioritiesAndProjects'; +export * from './priorityWithSequence'; export * from './project'; export * from './projectAndIssueTypePair'; export * from './projectAvatars'; export * from './projectCategory'; export * from './projectComponent'; +export * from './projectDataPolicies'; +export * from './projectDataPolicy'; export * from './projectDetails'; export * from './projectEmailAddress'; export * from './projectFeature'; @@ -382,6 +455,9 @@ export * from './projectRoleGroup'; export * from './projectRoleUser'; export * from './projectScope'; export * from './projectType'; +export * from './projectUsage'; +export * from './projectUsagePage'; +export * from './projectWithDataPolicy'; export * from './propertyKey'; export * from './propertyKeys'; export * from './publishedWorkflowId'; @@ -390,8 +466,11 @@ export * from './remoteIssueLink'; export * from './remoteIssueLinkIdentifies'; export * from './remoteIssueLinkRequest'; export * from './remoteObject'; +export * from './removeOptionFromIssuesResult'; export * from './reorderIssuePriorities'; export * from './reorderIssueResolutionsRequest'; +export * from './requiredMappingByIssueType'; +export * from './requiredMappingByWorkflows'; export * from './resolution'; export * from './resolutionId'; export * from './restrictedPermission'; @@ -410,6 +489,7 @@ export * from './screenSchemeDetails'; export * from './screenSchemeId'; export * from './screenTypes'; export * from './screenWithTab'; +export * from './searchAndReconcileResults'; export * from './searchAutoComplete'; export * from './searchRequest'; export * from './searchResults'; @@ -423,32 +503,52 @@ export * from './securitySchemeMembersRequest'; export * from './securitySchemes'; export * from './securitySchemeWithProjects'; export * from './serverInformation'; +export * from './serviceRegistry'; +export * from './serviceRegistryTier'; export * from './setDefaultLevelsRequest'; export * from './setDefaultPriorityRequest'; export * from './setDefaultResolutionRequest'; export * from './sharePermission'; export * from './sharePermissionInput'; export * from './simpleApplicationProperty'; +export * from './simpleErrorCollection'; export * from './simpleLink'; export * from './simpleListWrapperApplicationRole'; export * from './simpleListWrapperGroupName'; +export * from './simpleUsage'; export * from './status'; export * from './statusCategory'; export * from './statusCreate'; export * from './statusCreateRequest'; export * from './statusDetails'; +export * from './statusesPerWorkflow'; export * from './statusLayoutUpdate'; export * from './statusMapping'; export * from './statusMappingDTO'; +export * from './statusMetadata'; export * from './statusMigration'; +export * from './statusProjectIssueTypeUsage'; +export * from './statusProjectIssueTypeUsageDTO'; +export * from './statusProjectIssueTypeUsagePage'; +export * from './statusProjectUsage'; +export * from './statusProjectUsageDTO'; +export * from './statusProjectUsagePage'; export * from './statusReferenceAndPort'; export * from './statusScope'; export * from './statusUpdate'; export * from './statusUpdateRequest'; +export * from './statusWorkflowUsageDTO'; +export * from './statusWorkflowUsagePage'; +export * from './statusWorkflowUsageWorkflow'; export * from './suggestedIssue'; +export * from './suggestedMappingsForPrioritiesRequestBean'; +export * from './suggestedMappingsForProjectsRequestBean'; +export * from './suggestedMappingsRequest'; export * from './systemAvatars'; export * from './tabMetadata'; +export * from './taskProgressNode'; export * from './taskProgressObject'; +export * from './taskProgressRemoveOptionFromIssuesResult'; export * from './timeTrackingConfiguration'; export * from './timeTrackingDetails'; export * from './timeTrackingProvider'; @@ -461,13 +561,18 @@ export * from './uiModificationDetails'; export * from './uiModificationIdentifiers'; export * from './unrestrictedUserEmail'; export * from './updateCustomFieldDetails'; +export * from './updateDefaultProjectClassification'; export * from './updatedProjectCategory'; export * from './updateFieldConfigurationSchemeDetails'; export * from './updateIssueSecurityLevelDetails'; export * from './updateIssueSecuritySchemeRequest'; export * from './updateNotificationSchemeDetails'; +export * from './updatePrioritiesInSchemeRequest'; export * from './updatePriorityDetails'; +export * from './updatePrioritySchemeRequest'; +export * from './updatePrioritySchemeResponse'; export * from './updateProjectDetails'; +export * from './updateProjectsInSchemeRequest'; export * from './updateResolutionDetails'; export * from './updateScreenDetails'; export * from './updateScreenSchemeDetails'; @@ -476,6 +581,7 @@ export * from './updateUiModificationDetails'; export * from './updateUserToGroup'; export * from './user'; export * from './userAvatarUrls'; +export * from './userContextVariable'; export * from './userDetails'; export * from './userKey'; export * from './userList'; @@ -484,9 +590,11 @@ export * from './userPickerUser'; export * from './validationOptionsForCreate'; export * from './validationOptionsForUpdate'; export * from './version'; +export * from './versionApprover'; export * from './versionIssueCounts'; export * from './versionIssuesStatus'; export * from './versionMove'; +export * from './versionRelatedWork'; export * from './versionUnresolvedIssuesCount'; export * from './versionUsageInCustomField'; export * from './visibility'; @@ -498,15 +606,21 @@ export * from './webhookDetails'; export * from './webhookRegistrationDetails'; export * from './webhooksExpirationDate'; export * from './workflow'; +export * from './workflowAssociationStatusMapping'; export * from './workflowCapabilities'; export * from './workflowCondition'; export * from './workflowCreate'; export * from './workflowCreateRequest'; -export * from './workflowCreateResponse'; export * from './workflowElementReference'; export * from './workflowId'; export * from './workflowLayout'; +export * from './workflowMetadataAndIssueTypeRestModel'; +export * from './workflowMetadataRestModel'; export * from './workflowOperations'; +export * from './workflowProjectIssueTypeUsage'; +export * from './workflowProjectIssueTypeUsageDTO'; +export * from './workflowProjectIssueTypeUsagePage'; +export * from './workflowProjectUsageDTO'; export * from './workflowRead'; export * from './workflowReferenceStatus'; export * from './workflowRuleConfiguration'; @@ -514,10 +628,21 @@ export * from './workflowRules'; export * from './workflowRulesSearch'; export * from './workflowRulesSearchDetails'; export * from './workflowScheme'; +export * from './workflowSchemeAssociation'; export * from './workflowSchemeAssociations'; export * from './workflowSchemeIdName'; export * from './workflowSchemeProjectAssociation'; +export * from './workflowSchemeProjectUsage'; +export * from './workflowSchemeReadRequest'; +export * from './workflowSchemeReadResponse'; +export * from './workflowSchemeUpdateRequest'; +export * from './workflowSchemeUpdateRequiredMappingsRequest'; +export * from './workflowSchemeUpdateRequiredMappingsResponse'; +export * from './workflowSchemeUsage'; +export * from './workflowSchemeUsageDTO'; +export * from './workflowSchemeUsagePage'; export * from './workflowScope'; +export * from './workflowSearchResponse'; export * from './workflowStatus'; export * from './workflowStatusAndPort'; export * from './workflowStatusLayout'; @@ -536,8 +661,9 @@ export * from './workflowTransitions'; export * from './workflowTrigger'; export * from './workflowUpdate'; export * from './workflowUpdateRequest'; -export * from './workflowUpdateResponse'; export * from './workflowValidationError'; export * from './workflowValidationErrorList'; export * from './worklog'; export * from './worklogIdsRequest'; +export * from './worklogsMoveRequest'; +export * from './workspaceDataPolicy'; diff --git a/src/version2/models/issue.ts b/src/version2/models/issue.ts index 0841e19347..c5f68187d0 100644 --- a/src/version2/models/issue.ts +++ b/src/version2/models/issue.ts @@ -18,18 +18,18 @@ export interface Issue { /** The rendered value of each field present on the issue. */ renderedFields?: Fields; /** Details of the issue properties identified in the request. */ - properties?: {}; + properties?: unknown; /** The ID and name of each field present on the issue. */ names?: Record; /** The schema describing each field present on the issue. */ - schema?: {}; + schema?: unknown; /** The transitions that can be performed on the issue. */ transitions?: IssueTransition[]; operations?: Operations; editmeta?: IssueUpdateMetadata; changelog?: PageOfChangelogs; /** The versions of each field on the issue. */ - versionedRepresentations?: {}; + versionedRepresentations?: unknown; fieldsToInclude?: IncludedFields; fields: Fields; } diff --git a/src/version2/models/issueChangeLog.ts b/src/version2/models/issueChangeLog.ts new file mode 100644 index 0000000000..cab78f577e --- /dev/null +++ b/src/version2/models/issueChangeLog.ts @@ -0,0 +1,9 @@ +import { Changelog } from './changelog'; + +/** List of changelogs that belong to single issue */ +export interface IssueChangeLog { + /** List of changelogs that belongs to given issueId. */ + changeHistories?: Changelog[]; + /** The ID of the issue. */ + issueId?: string; +} diff --git a/src/version2/models/issueContextVariable.ts b/src/version2/models/issueContextVariable.ts new file mode 100644 index 0000000000..5307834f70 --- /dev/null +++ b/src/version2/models/issueContextVariable.ts @@ -0,0 +1,8 @@ +export interface IssueContextVariable { + /** The issue ID. */ + id?: number; + /** The issue key. */ + key?: string; + /** Type of custom context variable. */ + type: string; +} diff --git a/src/version2/models/issueEntityProperties.ts b/src/version2/models/issueEntityProperties.ts index e47d748bad..4c5b4e9b80 100644 --- a/src/version2/models/issueEntityProperties.ts +++ b/src/version2/models/issueEntityProperties.ts @@ -6,5 +6,5 @@ export interface IssueEntityProperties { /** A list of entity property IDs. */ entitiesIds?: number[]; /** A list of entity property keys and values. */ - properties?: {}; + properties?: unknown; } diff --git a/src/version2/models/issueEntityPropertiesForMultiUpdate.ts b/src/version2/models/issueEntityPropertiesForMultiUpdate.ts index 6d2ef7121d..470792d02a 100644 --- a/src/version2/models/issueEntityPropertiesForMultiUpdate.ts +++ b/src/version2/models/issueEntityPropertiesForMultiUpdate.ts @@ -6,5 +6,5 @@ export interface IssueEntityPropertiesForMultiUpdate { /** The ID of the issue. */ issueID?: number; /** Entity properties to set on the issue. The maximum length of an issue property value is 32768 characters. */ - properties?: {}; + properties?: unknown; } diff --git a/src/version2/models/issueError.ts b/src/version2/models/issueError.ts new file mode 100644 index 0000000000..e48a85799f --- /dev/null +++ b/src/version2/models/issueError.ts @@ -0,0 +1,7 @@ +/** Describes the error that occurred when retrieving data for a particular issue. */ +export interface IssueError { + /** The error that occurred when fetching this issue. */ + errorMessage?: string; + /** The ID of the issue. */ + id?: string; +} diff --git a/src/version2/models/issueFieldOption.ts b/src/version2/models/issueFieldOption.ts index 1e84f48560..8fce99e910 100644 --- a/src/version2/models/issueFieldOption.ts +++ b/src/version2/models/issueFieldOption.ts @@ -11,6 +11,7 @@ export interface IssueFieldOption { * Index](https://developer.atlassian.com/cloud/jira/platform/modules/issue-field-option-property-index/)) are defined * in the descriptor for the issue field module. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any properties?: Record; /** The option's name, which is displayed in Jira. */ value: string; diff --git a/src/version2/models/issueFieldOptionCreate.ts b/src/version2/models/issueFieldOptionCreate.ts index 3bbcfb9f90..6db4c62f31 100644 --- a/src/version2/models/issueFieldOptionCreate.ts +++ b/src/version2/models/issueFieldOptionCreate.ts @@ -7,7 +7,7 @@ export interface IssueFieldOptionCreate { * extractions (see https://developer.atlassian.com/cloud/jira/platform/modules/issue-field-option-property-index/) * are defined in the descriptor for the issue field module. */ - properties?: {}; + properties?: unknown; /** The option's name, which is displayed in Jira. */ value: string; } diff --git a/src/version2/models/issueFilterForBulkPropertyDelete.ts b/src/version2/models/issueFilterForBulkPropertyDelete.ts index d7762321df..dcc7abca91 100644 --- a/src/version2/models/issueFilterForBulkPropertyDelete.ts +++ b/src/version2/models/issueFilterForBulkPropertyDelete.ts @@ -1,6 +1,7 @@ /** Bulk operation filter details. */ export interface IssueFilterForBulkPropertyDelete { /** The value of properties to perform the bulk operation on. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any currentValue?: any; /** List of issues to perform the bulk delete operation on. */ entityIds?: number[]; diff --git a/src/version2/models/issueFilterForBulkPropertySet.ts b/src/version2/models/issueFilterForBulkPropertySet.ts index b052a43642..17fda9aa83 100644 --- a/src/version2/models/issueFilterForBulkPropertySet.ts +++ b/src/version2/models/issueFilterForBulkPropertySet.ts @@ -1,6 +1,7 @@ /** Bulk operation filter details. */ export interface IssueFilterForBulkPropertySet { /** The value of properties to perform the bulk operation on. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any currentValue?: any; /** List of issues to perform the bulk operation on. */ entityIds?: number[]; diff --git a/src/version2/models/issueLimitReport.ts b/src/version2/models/issueLimitReport.ts new file mode 100644 index 0000000000..9a9068630b --- /dev/null +++ b/src/version2/models/issueLimitReport.ts @@ -0,0 +1,8 @@ +export interface IssueLimitReport { + /** A list of ids of issues approaching the limit and their field count */ + issuesApproachingLimit?: unknown; + /** A list of ids of issues breaching the limit and their field count */ + issuesBreachingLimit?: unknown; + /** The fields and their defined limits */ + limits?: unknown; +} diff --git a/src/version2/models/issueLimitReportRequest.ts b/src/version2/models/issueLimitReportRequest.ts new file mode 100644 index 0000000000..0f3201b454 --- /dev/null +++ b/src/version2/models/issueLimitReportRequest.ts @@ -0,0 +1,9 @@ +export interface IssueLimitReportRequest { + /** + * A list of fields and their respective approaching limit threshold. Required for querying issues approaching limits. + * Optional for querying issues breaching limits. Accepted fields are: `comment`, `worklog`, `attachment`, + * `remoteIssueLinks`, and `issuelinks`. Example: `{"issuesApproachingLimitParams": {"comment": 4500, "attachment": + * 1800}}` + */ + issuesApproachingLimitParams?: unknown; +} diff --git a/src/version2/models/issueTransition.ts b/src/version2/models/issueTransition.ts index ae99f4a4b8..abd2f2a47a 100644 --- a/src/version2/models/issueTransition.ts +++ b/src/version2/models/issueTransition.ts @@ -22,7 +22,7 @@ export interface IssueTransition { * Details of the fields associated with the issue transition screen. Use this information to populate `fields` and * `update` in a transition request. */ - fields?: {}; + fields?: unknown; /** Details of the tabs associated with the issue transition screen and the fields within these tabs. */ tabs?: TabMetadata[]; /** Expand options that include additional transition details in the response. */ diff --git a/src/version2/models/issueTypeIssueCreateMetadata.ts b/src/version2/models/issueTypeIssueCreateMetadata.ts index 6cd2a7c84e..6e6fdcc38f 100644 --- a/src/version2/models/issueTypeIssueCreateMetadata.ts +++ b/src/version2/models/issueTypeIssueCreateMetadata.ts @@ -11,7 +11,7 @@ export interface IssueTypeIssueCreateMetadata { /** Expand options that include additional issue type metadata details in the response. */ expand?: string; /** List of the fields available when creating an issue for the issue type. */ - fields?: {}; + fields?: unknown; /** Hierarchy level of the issue type. */ hierarchyLevel?: number; /** The URL of the issue type's avatar. */ diff --git a/src/version2/models/issueUpdateDetails.ts b/src/version2/models/issueUpdateDetails.ts index 516cccab9c..687c0dfa6e 100644 --- a/src/version2/models/issueUpdateDetails.ts +++ b/src/version2/models/issueUpdateDetails.ts @@ -10,6 +10,7 @@ export interface IssueUpdateDetails { * provides a straightforward option when setting a sub-field. When multiple sub-fields or other operations are * required, use `update`. Fields included in here cannot be included in `update`. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any fields?: Partial | any; historyMetadata?: HistoryMetadata; /** Details of issue properties to be added or update. */ @@ -19,5 +20,5 @@ export interface IssueUpdateDetails { * A Map containing the field name and a list of operations to perform on the issue screen field. Note that fields * included in here cannot be included in `fields`. */ - update?: {}; + update?: unknown; } diff --git a/src/version2/models/jExpEvaluateIssuesJqlMetaData.ts b/src/version2/models/jExpEvaluateIssuesJqlMetaData.ts new file mode 100644 index 0000000000..c97480a3e2 --- /dev/null +++ b/src/version2/models/jExpEvaluateIssuesJqlMetaData.ts @@ -0,0 +1,5 @@ +/** The description of the page of issues loaded by the provided JQL query. */ +export interface JExpEvaluateIssuesJqlMetaData { + /** Next Page token for the next page of issues. */ + nextPageToken?: string; +} diff --git a/src/version2/models/jExpEvaluateIssuesMeta.ts b/src/version2/models/jExpEvaluateIssuesMeta.ts new file mode 100644 index 0000000000..383f8138b4 --- /dev/null +++ b/src/version2/models/jExpEvaluateIssuesMeta.ts @@ -0,0 +1,10 @@ +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 + */ + jql?: JExpEvaluateIssuesJqlMetaData; +} diff --git a/src/version2/models/jExpEvaluateMetaData.ts b/src/version2/models/jExpEvaluateMetaData.ts new file mode 100644 index 0000000000..0ac32411da --- /dev/null +++ b/src/version2/models/jExpEvaluateMetaData.ts @@ -0,0 +1,15 @@ +import { JExpEvaluateIssuesMeta } from './jExpEvaluateIssuesMeta'; +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. + */ + 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. + */ + issues?: JExpEvaluateIssuesMeta; +} diff --git a/src/version2/models/jQLCount.ts b/src/version2/models/jQLCount.ts new file mode 100644 index 0000000000..a3270ef92a --- /dev/null +++ b/src/version2/models/jQLCount.ts @@ -0,0 +1,4 @@ +export interface JQLCount { + /** Number of issues matching JQL query. */ + count?: number; +} diff --git a/src/version2/models/jQLCountRequest.ts b/src/version2/models/jQLCountRequest.ts new file mode 100644 index 0000000000..3eb6cce3be --- /dev/null +++ b/src/version2/models/jQLCountRequest.ts @@ -0,0 +1,7 @@ +export interface JQLCountRequest { + /** + * A [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. + */ + jql?: string; +} diff --git a/src/version2/models/jexpEvaluateCtxIssues.ts b/src/version2/models/jexpEvaluateCtxIssues.ts new file mode 100644 index 0000000000..9c5d3b449b --- /dev/null +++ b/src/version2/models/jexpEvaluateCtxIssues.ts @@ -0,0 +1,6 @@ +import { JexpEvaluateCtxJqlIssues } from './jexpEvaluateCtxJqlIssues'; + +/** The JQL specifying the issues available in the evaluated Jira expression under the `issues` context variable. */ +export interface JexpEvaluateCtxIssues { + jql?: JexpEvaluateCtxJqlIssues; +} diff --git a/src/version2/models/jexpEvaluateCtxJqlIssues.ts b/src/version2/models/jexpEvaluateCtxJqlIssues.ts new file mode 100644 index 0000000000..4fc211b9d9 --- /dev/null +++ b/src/version2/models/jexpEvaluateCtxJqlIssues.ts @@ -0,0 +1,15 @@ +/** 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. + */ + nextPageToken?: string; + /** The JQL query, required to be bounded. Additionally, `orderBy` clause can contain a maximum of 7 fields */ + query?: string; +} diff --git a/src/version2/models/jiraExpressionComplexity.ts b/src/version2/models/jiraExpressionComplexity.ts index 04bcdd0505..b65d7b9cad 100644 --- a/src/version2/models/jiraExpressionComplexity.ts +++ b/src/version2/models/jiraExpressionComplexity.ts @@ -11,5 +11,5 @@ export interface JiraExpressionComplexity { */ expensiveOperations: string; /** Variables used in the formula, mapped to the parts of the expression they refer to. */ - variables?: {}; + variables?: unknown; } diff --git a/src/version2/models/jiraExpressionEvalUsingEnhancedSearchRequest.ts b/src/version2/models/jiraExpressionEvalUsingEnhancedSearchRequest.ts new file mode 100644 index 0000000000..f8a07cffb2 --- /dev/null +++ b/src/version2/models/jiraExpressionEvalUsingEnhancedSearchRequest.ts @@ -0,0 +1,8 @@ +import { JiraExpressionEvaluateContext } from './jiraExpressionEvaluateContext'; + +export interface JiraExpressionEvalUsingEnhancedSearchRequest { + /** The Jira expression to evaluate. */ + expression: string; + /** The context in which the Jira expression is evaluated. */ + context?: JiraExpressionEvaluateContext; +} diff --git a/src/version2/models/jiraExpressionEvaluateContext.ts b/src/version2/models/jiraExpressionEvaluateContext.ts new file mode 100644 index 0000000000..78464888ad --- /dev/null +++ b/src/version2/models/jiraExpressionEvaluateContext.ts @@ -0,0 +1,33 @@ +import { IssueContextVariable } from './issueContextVariable'; +import { JsonContextVariable } from './jsonContextVariable'; +import { UserContextVariable } from './userContextVariable'; +import { IdOrKey } from './idOrKey'; +import { JexpEvaluateCtxIssues } from './jexpEvaluateCtxIssues'; + +export interface JiraExpressionEvaluateContext { + issue?: IdOrKey; + issues?: JexpEvaluateCtxIssues; + project?: IdOrKey; + /** The ID of the sprint that is available under the `sprint` variable when evaluating the expression. */ + sprint?: number; + /** The ID of the board that is available under the `board` variable when evaluating the expression. */ + board?: number; + /** The ID of the service desk that is available under the `serviceDesk` variable when evaluating the expression. */ + serviceDesk?: number; + /** + * The ID of the customer request that is available under the `customerRequest` variable when evaluating the + * expression. This is the same as the ID of the underlying Jira issue, but the customer request context variable will + * have a different type. + */ + customerRequest?: number; + /** + * Custom context variables and their types. These variable types are available for use 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. `issue`: An + * [issue](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#issue) specified by ID + * 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)[]; +} diff --git a/src/version2/models/jiraExpressionForAnalysis.ts b/src/version2/models/jiraExpressionForAnalysis.ts index 20f9a20b23..959019bd32 100644 --- a/src/version2/models/jiraExpressionForAnalysis.ts +++ b/src/version2/models/jiraExpressionForAnalysis.ts @@ -6,7 +6,7 @@ export interface JiraExpressionForAnalysis { * `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?: {}; + contextVariables?: unknown; /** The list of Jira expressions to analyse. */ expressions: string[]; } diff --git a/src/version2/models/jiraExpressionResult.ts b/src/version2/models/jiraExpressionResult.ts index f3010d988a..dae1b894d7 100644 --- a/src/version2/models/jiraExpressionResult.ts +++ b/src/version2/models/jiraExpressionResult.ts @@ -9,5 +9,6 @@ export interface JiraExpressionResult { * that's the case a simple string representation is returned. These string representations should not be relied upon * and may change without notice.) */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any value: any; } diff --git a/src/version2/models/jqlFunctionPrecomputationGetByIdRequest.ts b/src/version2/models/jqlFunctionPrecomputationGetByIdRequest.ts new file mode 100644 index 0000000000..f9afb489d9 --- /dev/null +++ b/src/version2/models/jqlFunctionPrecomputationGetByIdRequest.ts @@ -0,0 +1,4 @@ +/** Request to fetch precomputations by ID. */ +export interface JqlFunctionPrecomputationGetByIdRequest { + precomputationIDs?: string[]; +} diff --git a/src/version2/models/jqlFunctionPrecomputationGetByIdResponse.ts b/src/version2/models/jqlFunctionPrecomputationGetByIdResponse.ts new file mode 100644 index 0000000000..391c1f8663 --- /dev/null +++ b/src/version2/models/jqlFunctionPrecomputationGetByIdResponse.ts @@ -0,0 +1,9 @@ +import { JqlFunctionPrecomputation } from './jqlFunctionPrecomputation'; + +/** Get precomputations by ID response. */ +export interface JqlFunctionPrecomputationGetByIdResponse { + /** List of precomputations that were not found. */ + notFoundPrecomputationIDs?: string[]; + /** The list of precomputations. */ + precomputations?: JqlFunctionPrecomputation[]; +} diff --git a/src/version2/models/jsonContextVariable.ts b/src/version2/models/jsonContextVariable.ts new file mode 100644 index 0000000000..aba02aa1d7 --- /dev/null +++ b/src/version2/models/jsonContextVariable.ts @@ -0,0 +1,7 @@ +export interface JsonContextVariable { + /** Type of custom context variable. */ + type: string; + /** A JSON object containing custom content. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + value?: any; +} diff --git a/src/version2/models/jsonNode.ts b/src/version2/models/jsonNode.ts new file mode 100644 index 0000000000..b5a835d326 --- /dev/null +++ b/src/version2/models/jsonNode.ts @@ -0,0 +1,38 @@ +export interface JsonNode { + array?: boolean; + bigDecimal?: boolean; + bigInteger?: boolean; + bigIntegerValue?: number; + binary?: boolean; + binaryValue?: string[]; + boolean?: boolean; + booleanValue?: boolean; + containerNode?: boolean; + decimalValue?: number; + double?: boolean; + doubleValue?: number; + elements?: unknown; + fieldNames?: unknown; + fields?: unknown; + floatingPointNumber?: boolean; + int?: boolean; + intValue?: number; + integralNumber?: boolean; + long?: boolean; + longValue?: number; + missingNode?: boolean; + null?: boolean; + number?: boolean; + numberType?: 'INT' | 'LONG' | 'BIG_INTEGER' | 'FLOAT' | 'DOUBLE' | 'BIG_DECIMAL' | string; + numberValue?: number; + object?: boolean; + pojo?: boolean; + textValue?: string; + textual?: boolean; + valueAsBoolean?: boolean; + valueAsDouble?: number; + valueAsInt?: number; + valueAsLong?: number; + valueAsText?: string; + valueNode?: boolean; +} diff --git a/src/version2/models/jsonType.ts b/src/version2/models/jsonType.ts index 2ab70a13fc..0213056b2f 100644 --- a/src/version2/models/jsonType.ts +++ b/src/version2/models/jsonType.ts @@ -1,7 +1,7 @@ /** The schema of a field. */ export interface JsonType { /** If the field is a custom field, the configuration of the field. */ - configuration?: {}; + configuration?: unknown; /** If the field is a custom field, the URI of the field. */ custom?: string; /** If the field is a custom field, the custom ID of the field. */ diff --git a/src/version2/models/mappingsByIssueTypeOverride.ts b/src/version2/models/mappingsByIssueTypeOverride.ts new file mode 100644 index 0000000000..570d8dfde5 --- /dev/null +++ b/src/version2/models/mappingsByIssueTypeOverride.ts @@ -0,0 +1,13 @@ +import { WorkflowAssociationStatusMapping } from './workflowAssociationStatusMapping'; + +/** + * Overrides, for the selected issue types, any status mappings provided in `statusMappingsByWorkflows`. Status mappings + * are required when the new workflow for an issue type doesn't contain all statuses that the old workflow has. Status + * mappings can be provided by a combination of `statusMappingsByWorkflows` and `statusMappingsByIssueTypeOverride`. + */ +export interface MappingsByIssueTypeOverride { + /** The ID of the issue type for this mapping. */ + issueTypeId: string; + /** The list of status mappings. */ + statusMappings: WorkflowAssociationStatusMapping[]; +} diff --git a/src/version2/models/mappingsByWorkflow.ts b/src/version2/models/mappingsByWorkflow.ts new file mode 100644 index 0000000000..484dcec961 --- /dev/null +++ b/src/version2/models/mappingsByWorkflow.ts @@ -0,0 +1,15 @@ +import { WorkflowAssociationStatusMapping } from './workflowAssociationStatusMapping'; + +/** + * The status mappings by workflows. Status mappings are required when the new workflow for an issue type doesn't + * contain all statuses that the old workflow has. Status mappings can be provided by a combination of + * `statusMappingsByWorkflows` and `statusMappingsByIssueTypeOverride`. + */ +export interface MappingsByWorkflow { + /** The ID of the new workflow. */ + newWorkflowId: string; + /** The ID of the old workflow. */ + oldWorkflowId: string; + /** The list of status mappings. */ + statusMappings: WorkflowAssociationStatusMapping[]; +} diff --git a/src/version2/models/multipleCustomFieldValuesUpdate.ts b/src/version2/models/multipleCustomFieldValuesUpdate.ts index ec02922d14..9aed54825e 100644 --- a/src/version2/models/multipleCustomFieldValuesUpdate.ts +++ b/src/version2/models/multipleCustomFieldValuesUpdate.ts @@ -18,5 +18,5 @@ export interface MultipleCustomFieldValuesUpdate { * A 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: {}; + value: unknown; } diff --git a/src/version3/models/pageBeanFieldConfigurationDetails.ts b/src/version2/models/pageBulkContextualConfiguration.ts similarity index 73% rename from src/version3/models/pageBeanFieldConfigurationDetails.ts rename to src/version2/models/pageBulkContextualConfiguration.ts index 37b3f277a9..3c931a1436 100644 --- a/src/version3/models/pageBeanFieldConfigurationDetails.ts +++ b/src/version2/models/pageBulkContextualConfiguration.ts @@ -1,19 +1,19 @@ -import { FieldConfigurationDetails } from './fieldConfigurationDetails'; +import { BulkContextualConfiguration } from './bulkContextualConfiguration'; /** A page of items. */ -export interface PageBeanFieldConfigurationDetails { - /** The URL of the page. */ - self?: string; - /** If there is another page of results, the URL of the next page. */ - nextPage?: string; +export interface PageBulkContextualConfiguration { + /** Whether this is the last page. */ + isLast?: boolean; /** The maximum number of items that could be returned. */ maxResults?: number; + /** If there is another page of results, the URL of the next page. */ + nextPage?: string; + /** The URL of the page. */ + self?: string; /** The index of the first item returned. */ startAt?: number; /** The number of items returned. */ total?: number; - /** Whether this is the last page. */ - isLast?: boolean; /** The list of items. */ - values?: FieldConfigurationDetails[]; + values?: BulkContextualConfiguration[]; } diff --git a/src/version2/models/pageOfCreateMetaIssueTypeWithField.ts b/src/version2/models/pageOfCreateMetaIssueTypeWithField.ts new file mode 100644 index 0000000000..3e5ce43d55 --- /dev/null +++ b/src/version2/models/pageOfCreateMetaIssueTypeWithField.ts @@ -0,0 +1,14 @@ +import { FieldCreateMetadata } from './fieldCreateMetadata'; + +/** A page of CreateMetaIssueType with Field. */ +export interface PageOfCreateMetaIssueTypeWithField { + /** The collection of FieldCreateMetaBeans. */ + fields?: FieldCreateMetadata[]; + /** The maximum number of items to return per page. */ + maxResults?: number; + results?: FieldCreateMetadata[]; + /** The index of the first item returned. */ + startAt?: number; + /** The total number of items in all pages. */ + total?: number; +} diff --git a/src/version2/models/pageOfCreateMetaIssueTypes.ts b/src/version2/models/pageOfCreateMetaIssueTypes.ts new file mode 100644 index 0000000000..42b514a7ed --- /dev/null +++ b/src/version2/models/pageOfCreateMetaIssueTypes.ts @@ -0,0 +1,14 @@ +import { IssueTypeIssueCreateMetadata } from './issueTypeIssueCreateMetadata'; + +/** A page of CreateMetaIssueTypes. */ +export interface PageOfCreateMetaIssueTypes { + createMetaIssueType?: IssueTypeIssueCreateMetadata[]; + /** The list of CreateMetaIssueType. */ + issueTypes?: IssueTypeIssueCreateMetadata[]; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** The index of the first item returned. */ + startAt?: number; + /** The total number of items in all pages. */ + total?: number; +} diff --git a/src/version2/models/pageWithCursorGetPlanResponseForPage.ts b/src/version2/models/pageWithCursorGetPlanResponseForPage.ts new file mode 100644 index 0000000000..7b6c103ded --- /dev/null +++ b/src/version2/models/pageWithCursorGetPlanResponseForPage.ts @@ -0,0 +1,10 @@ +import { GetPlanResponseForPage } from './getPlanResponseForPage'; + +export interface PageWithCursorGetPlanResponseForPage { + cursor?: string; + last?: boolean; + nextPageCursor?: string; + size?: number; + total?: number; + values?: GetPlanResponseForPage[]; +} diff --git a/src/version2/models/pageWithCursorGetTeamResponseForPage.ts b/src/version2/models/pageWithCursorGetTeamResponseForPage.ts new file mode 100644 index 0000000000..015c2316bd --- /dev/null +++ b/src/version2/models/pageWithCursorGetTeamResponseForPage.ts @@ -0,0 +1,10 @@ +import { GetTeamResponseForPage } from './getTeamResponseForPage'; + +export interface PageWithCursorGetTeamResponseForPage { + cursor?: string; + last?: boolean; + nextPageCursor?: string; + size?: number; + total?: number; + values?: GetTeamResponseForPage[]; +} diff --git a/src/version2/models/permissions.ts b/src/version2/models/permissions.ts index fa2d4fbec3..e68ab30abc 100644 --- a/src/version2/models/permissions.ts +++ b/src/version2/models/permissions.ts @@ -1,5 +1,5 @@ /** Details about permissions. */ export interface Permissions { /** List of permissions. */ - permissions?: {}; + permissions?: unknown; } diff --git a/src/version2/models/plan.ts b/src/version2/models/plan.ts new file mode 100644 index 0000000000..2b42c63d0c --- /dev/null +++ b/src/version2/models/plan.ts @@ -0,0 +1,29 @@ +import { GetCrossProjectReleaseResponse } from './getCrossProjectReleaseResponse'; +import { GetCustomFieldResponse } from './getCustomFieldResponse'; +import { GetExclusionRulesResponse } from './getExclusionRulesResponse'; +import { GetIssueSourceResponse } from './getIssueSourceResponse'; +import { GetPermissionResponse } from './getPermissionResponse'; +import { GetSchedulingResponse } from './getSchedulingResponse'; + +export interface Plan { + /** The cross-project releases included in the plan. */ + crossProjectReleases?: GetCrossProjectReleaseResponse[]; + /** The custom fields for the plan. */ + customFields?: GetCustomFieldResponse[]; + exclusionRules?: GetExclusionRulesResponse; + /** The plan ID. */ + id: number; + /** The issue sources included in the plan. */ + issueSources?: GetIssueSourceResponse[]; + /** The date when the plan was last saved in UTC. */ + lastSaved?: string; + /** The account ID of the plan lead. */ + leadAccountId?: string; + /** The plan name. */ + name?: string; + /** The permissions for the plan. */ + permissions?: GetPermissionResponse[]; + scheduling?: GetSchedulingResponse; + /** The plan status. This is "Active", "Trashed" or "Archived". */ + status: 'Active' | 'Trashed' | 'Archived' | string; +} diff --git a/src/version2/models/priorityMapping.ts b/src/version2/models/priorityMapping.ts new file mode 100644 index 0000000000..cbe0a2654e --- /dev/null +++ b/src/version2/models/priorityMapping.ts @@ -0,0 +1,18 @@ +/** Mapping of issue priorities for changes in priority schemes. */ +export interface PriorityMapping { + /** + * The mapping of priorities for issues being migrated **into** this priority scheme. Key is the old priority ID, + * value is the new priority ID (must exist in this priority scheme). + * + * E.g. The current priority scheme has priority ID `10001`. Issues with priority ID `10000` are being migrated into this priority scheme will need mapping to new priorities. The `in` mapping would be `{"10000": 10001}`. + */ + in?: unknown; + /** + * The mapping of priorities for issues being migrated **out of** this priority scheme. Key is the old priority ID + * (must exist in this priority scheme), value is the new priority ID (must exist in the default priority scheme). + * Required for updating an existing priority scheme. Not used when creating a new priority scheme. + * + * E.g. The current priority scheme has priority ID `10001`. Issues with priority ID `10001` are being migrated out of this priority scheme will need mapping to new priorities. The `out` mapping would be `{"10001": 10000}`. + */ + out?: unknown; +} diff --git a/src/version2/models/prioritySchemeChangesWithoutMappings.ts b/src/version2/models/prioritySchemeChangesWithoutMappings.ts new file mode 100644 index 0000000000..51c1ea7e02 --- /dev/null +++ b/src/version2/models/prioritySchemeChangesWithoutMappings.ts @@ -0,0 +1,4 @@ +export interface PrioritySchemeChangesWithoutMappings { + /** Affected entity ids. */ + ids: number[]; +} diff --git a/src/version2/models/prioritySchemeId.ts b/src/version2/models/prioritySchemeId.ts new file mode 100644 index 0000000000..7e349f2e21 --- /dev/null +++ b/src/version2/models/prioritySchemeId.ts @@ -0,0 +1,8 @@ +import { TaskProgressNode } from './taskProgressNode'; + +/** The ID of a priority scheme. */ +export interface PrioritySchemeId { + /** The ID of the priority scheme. */ + id?: string; + task?: TaskProgressNode; +} diff --git a/src/version2/models/prioritySchemeWithPaginatedPrioritiesAndProjects.ts b/src/version2/models/prioritySchemeWithPaginatedPrioritiesAndProjects.ts new file mode 100644 index 0000000000..9dc5ed1bc5 --- /dev/null +++ b/src/version2/models/prioritySchemeWithPaginatedPrioritiesAndProjects.ts @@ -0,0 +1,21 @@ +import { Paginated } from '../../paginated'; +import { ProjectDetails } from './projectDetails'; +import { PriorityWithSequence } from './priorityWithSequence'; + +/** A priority scheme with paginated priorities and projects. */ +export interface PrioritySchemeWithPaginatedPrioritiesAndProjects { + default?: boolean; + /** The ID of the default issue priority. */ + defaultPriorityId?: string; + /** The description of the priority scheme */ + description?: string; + /** The ID of the priority scheme. */ + id: string; + isDefault?: boolean; + /** The name of the priority scheme */ + name: string; + priorities?: Paginated; + projects?: Paginated; + /** The URL of the priority scheme. */ + self?: string; +} diff --git a/src/version2/models/priorityWithSequence.ts b/src/version2/models/priorityWithSequence.ts new file mode 100644 index 0000000000..8012f612ad --- /dev/null +++ b/src/version2/models/priorityWithSequence.ts @@ -0,0 +1,19 @@ +/** An issue priority with sequence information. */ +export interface PriorityWithSequence { + /** The description of the issue priority. */ + description?: string; + /** The URL of the icon for the issue priority. */ + iconUrl?: string; + /** The ID of the issue priority. */ + id?: string; + /** Whether this priority is the default. */ + isDefault?: boolean; + /** The name of the issue priority. */ + name?: string; + /** The URL of the issue priority. */ + self?: string; + /** The sequence of the issue priority. */ + sequence?: string; + /** The color used to indicate the issue priority. */ + statusColor?: string; +} diff --git a/src/version2/models/project.ts b/src/version2/models/project.ts index 474abbf236..3642f1930a 100644 --- a/src/version2/models/project.ts +++ b/src/version2/models/project.ts @@ -57,14 +57,14 @@ export interface Project { */ projectTypeKey?: string; /** Map of project properties */ - properties?: {}; + properties?: unknown; /** The date when the project is deleted permanently. */ retentionTillDate?: string; /** * The name and self URL for each role defined in the project. For more information, see [Create project * role](#api-rest-api-2-role-post). */ - roles?: {}; + roles?: unknown; /** The URL of the project details. */ self?: string; /** Whether the project is simplified. */ diff --git a/src/version2/models/projectComponent.ts b/src/version2/models/projectComponent.ts index 6703ca07d0..457ae4102a 100644 --- a/src/version2/models/projectComponent.ts +++ b/src/version2/models/projectComponent.ts @@ -2,6 +2,8 @@ import { User } from './user'; /** Details about a project component. */ export interface ProjectComponent { + /** Compass component's ID. Can't be updated. Not required for creating a Project Component. */ + ari?: string; assignee?: User; /** * The nominal user type used to determine the assignee for issues created with this component. See `realAssigneeType` @@ -39,6 +41,8 @@ export interface ProjectComponent { * for details. */ leadUserName?: string; + /** Compass component's metadata. Can't be updated. Not required for creating a Project Component. */ + metadata?: unknown; /** * The unique name for the component in the project. Required when creating a component. Optional when updating a * component. The maximum length is 255 characters. diff --git a/src/version2/models/projectDataPolicies.ts b/src/version2/models/projectDataPolicies.ts new file mode 100644 index 0000000000..22bbb2d14e --- /dev/null +++ b/src/version2/models/projectDataPolicies.ts @@ -0,0 +1,7 @@ +import { ProjectWithDataPolicy } from './projectWithDataPolicy'; + +/** Details about data policies for a list of projects. */ +export interface ProjectDataPolicies { + /** List of projects with data policies. */ + projectDataPolicies?: ProjectWithDataPolicy[]; +} diff --git a/src/version2/models/projectDataPolicy.ts b/src/version2/models/projectDataPolicy.ts new file mode 100644 index 0000000000..4a8b013ea6 --- /dev/null +++ b/src/version2/models/projectDataPolicy.ts @@ -0,0 +1,5 @@ +/** Details about data policy. */ +export interface ProjectDataPolicy { + /** Whether the project contains any content inaccessible to the requesting application. */ + anyContentBlocked?: boolean; +} diff --git a/src/version2/models/projectLandingPageInfo.ts b/src/version2/models/projectLandingPageInfo.ts index 4e306970b2..4e4bfff307 100644 --- a/src/version2/models/projectLandingPageInfo.ts +++ b/src/version2/models/projectLandingPageInfo.ts @@ -1,5 +1,5 @@ export interface ProjectLandingPageInfo { - attributes?: {}; + attributes?: unknown; boardId?: number; boardName?: string; projectKey?: string; diff --git a/src/version2/models/projectRoleActorsUpdate.ts b/src/version2/models/projectRoleActorsUpdate.ts index 5e3b9ca632..3e5054b323 100644 --- a/src/version2/models/projectRoleActorsUpdate.ts +++ b/src/version2/models/projectRoleActorsUpdate.ts @@ -17,5 +17,5 @@ export interface ProjectRoleActorsUpdate { * Add 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?: {}; + categorisedActors?: unknown; } diff --git a/src/version2/models/projectUsage.ts b/src/version2/models/projectUsage.ts new file mode 100644 index 0000000000..2cc468d44c --- /dev/null +++ b/src/version2/models/projectUsage.ts @@ -0,0 +1,5 @@ +/** The project. */ +export interface ProjectUsage { + /** The project ID. */ + id?: string; +} diff --git a/src/version2/models/projectUsagePage.ts b/src/version2/models/projectUsagePage.ts new file mode 100644 index 0000000000..f018c8e7b1 --- /dev/null +++ b/src/version2/models/projectUsagePage.ts @@ -0,0 +1,9 @@ +import { ProjectUsage } from './projectUsage'; + +/** A page of projects. */ +export interface ProjectUsagePage { + /** Page token for the next page of project usages. */ + nextPageToken?: string; + /** The list of projects. */ + values?: ProjectUsage[]; +} diff --git a/src/version2/models/projectWithDataPolicy.ts b/src/version2/models/projectWithDataPolicy.ts new file mode 100644 index 0000000000..99830d5726 --- /dev/null +++ b/src/version2/models/projectWithDataPolicy.ts @@ -0,0 +1,8 @@ +import { ProjectDataPolicy } from './projectDataPolicy'; + +/** Details about data policies for a project. */ +export interface ProjectWithDataPolicy { + dataPolicy?: ProjectDataPolicy; + /** The project ID. */ + id?: number; +} diff --git a/src/version2/models/removeOptionFromIssuesResult.ts b/src/version2/models/removeOptionFromIssuesResult.ts new file mode 100644 index 0000000000..cf18ad7c2f --- /dev/null +++ b/src/version2/models/removeOptionFromIssuesResult.ts @@ -0,0 +1,9 @@ +import { SimpleErrorCollection } from './simpleErrorCollection'; + +export interface RemoveOptionFromIssuesResult { + errors?: SimpleErrorCollection; + /** The IDs of the modified issues. */ + modifiedIssues?: number[]; + /** The IDs of the unchanged issues, those issues where errors prevent modification. */ + unmodifiedIssues?: number[]; +} diff --git a/src/version2/models/requiredMappingByIssueType.ts b/src/version2/models/requiredMappingByIssueType.ts new file mode 100644 index 0000000000..3d85f836c5 --- /dev/null +++ b/src/version2/models/requiredMappingByIssueType.ts @@ -0,0 +1,7 @@ +/** The list of required status mappings by issue type. */ +export interface RequiredMappingByIssueType { + /** The ID of the issue type. */ + issueTypeId?: string; + /** The status IDs requiring mapping. */ + statusIds?: string[]; +} diff --git a/src/version2/models/requiredMappingByWorkflows.ts b/src/version2/models/requiredMappingByWorkflows.ts new file mode 100644 index 0000000000..b30e14666e --- /dev/null +++ b/src/version2/models/requiredMappingByWorkflows.ts @@ -0,0 +1,9 @@ +/** The list of required status mappings by workflow. */ +export interface RequiredMappingByWorkflows { + /** The ID of the source workflow. */ + sourceWorkflowId?: string; + /** The status IDs requiring mapping. */ + statusIds?: string[]; + /** The ID of the target workflow. */ + targetWorkflowId?: string; +} diff --git a/src/version2/models/ruleConfiguration.ts b/src/version2/models/ruleConfiguration.ts index bcd3aefc4c..4acde27293 100644 --- a/src/version2/models/ruleConfiguration.ts +++ b/src/version2/models/ruleConfiguration.ts @@ -4,7 +4,7 @@ export interface RuleConfiguration { disabled?: boolean; /** * EXPERIMENTAL: A tag used to filter rules in [Get workflow transition rule - * configurations](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflow-transition-rules/#api-rest-api-3-workflow-rule-config-get). + * configurations](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-workflow-transition-rules/#api-rest-api-2-workflow-rule-config-get). */ tag?: string; /** Configuration of the rule, as it is stored by the Connect or the Forge app on the rule configuration page. */ diff --git a/src/version2/models/searchAndReconcileResults.ts b/src/version2/models/searchAndReconcileResults.ts new file mode 100644 index 0000000000..b7160c5379 --- /dev/null +++ b/src/version2/models/searchAndReconcileResults.ts @@ -0,0 +1,16 @@ +import { Issue } from './issue'; + +/** The result of a JQL search. */ +export interface SearchAndReconcileResults { + /** The list of issues found by the search or reconsiliation. */ + issues?: Issue[]; + /** The ID and name of each field in the search results. */ + names?: unknown; + /** + * 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. */ + schema?: unknown; +} diff --git a/src/version2/models/searchRequest.ts b/src/version2/models/searchRequest.ts index 59057b364e..5fb30a9ccc 100644 --- a/src/version2/models/searchRequest.ts +++ b/src/version2/models/searchRequest.ts @@ -70,7 +70,7 @@ export interface SearchRequest { | 'editmeta' | 'changelog' | 'versionedRepresentations' - )[] + )[] | string | string[]; /** A list of up to 5 issue properties to include in the results. This parameter accepts a comma-separated list. */ diff --git a/src/version2/models/searchResults.ts b/src/version2/models/searchResults.ts index 295b48280a..1b64b2cb5f 100644 --- a/src/version2/models/searchResults.ts +++ b/src/version2/models/searchResults.ts @@ -9,9 +9,9 @@ export interface SearchResults { /** The maximum number of results that could be on the page. */ maxResults?: number; /** The ID and name of each field in the search results. */ - names?: {}; + names?: unknown; /** The schema describing the field types in the search results. */ - schema?: {}; + schema?: unknown; /** The index of the first item returned on the page. */ startAt?: number; /** The number of results on the page. */ diff --git a/src/version2/models/serviceRegistry.ts b/src/version2/models/serviceRegistry.ts new file mode 100644 index 0000000000..d46bfa2b86 --- /dev/null +++ b/src/version2/models/serviceRegistry.ts @@ -0,0 +1,15 @@ +import { ServiceRegistryTier } from './serviceRegistryTier'; + +export interface ServiceRegistry { + /** Service description */ + description?: string; + /** Service ID */ + id?: string; + /** Service name */ + name?: string; + /** Organization ID */ + organizationId?: string; + /** Service revision */ + revision?: string; + serviceTier?: ServiceRegistryTier; +} diff --git a/src/version2/models/serviceRegistryTier.ts b/src/version2/models/serviceRegistryTier.ts new file mode 100644 index 0000000000..b9f2ff9ca8 --- /dev/null +++ b/src/version2/models/serviceRegistryTier.ts @@ -0,0 +1,12 @@ +export interface ServiceRegistryTier { + /** Tier description */ + description?: string; + /** Tier ID */ + id?: string; + /** Tier level */ + level?: number; + /** Tier name */ + name?: string; + /** Name key of the tier */ + nameKey?: string; +} diff --git a/src/version2/models/simpleErrorCollection.ts b/src/version2/models/simpleErrorCollection.ts new file mode 100644 index 0000000000..6a88cb5392 --- /dev/null +++ b/src/version2/models/simpleErrorCollection.ts @@ -0,0 +1,10 @@ +export interface SimpleErrorCollection { + /** The list of error messages produced by this operation. For example, "input parameter 'key' must be provided" */ + errorMessages?: string[]; + /** + * 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?: unknown; + httpStatusCode?: number; +} diff --git a/src/version2/models/simpleUsage.ts b/src/version2/models/simpleUsage.ts new file mode 100644 index 0000000000..b1ddd95231 --- /dev/null +++ b/src/version2/models/simpleUsage.ts @@ -0,0 +1,7 @@ +/** Represents a usage of an entity by a project ID and related issue type IDs. */ +export interface SimpleUsage { + /** The issue type IDs for the usage. */ + issueTypeIds: string[]; + /** The project ID for the usage. */ + projectId: string; +} diff --git a/src/version2/models/statusLayoutUpdate.ts b/src/version2/models/statusLayoutUpdate.ts index ea1130ee59..9dd91d5e26 100644 --- a/src/version2/models/statusLayoutUpdate.ts +++ b/src/version2/models/statusLayoutUpdate.ts @@ -4,7 +4,7 @@ import { WorkflowLayout } from './workflowLayout'; export interface StatusLayoutUpdate { layout?: WorkflowLayout; /** The properties for this status layout. */ - properties: {}; + properties: unknown; /** A unique ID which the status will use to refer to this layout configuration. */ statusReference: string; } diff --git a/src/version2/models/statusMetadata.ts b/src/version2/models/statusMetadata.ts new file mode 100644 index 0000000000..f6eaa22aaf --- /dev/null +++ b/src/version2/models/statusMetadata.ts @@ -0,0 +1,9 @@ +/** The details of the statuses in the associated workflows. */ +export interface StatusMetadata { + /** The category of the status. */ + category?: 'TODO' | 'IN_PROGRESS' | 'DONE' | string; + /** The ID of the status. */ + id?: string; + /** The name of the status. */ + name?: string; +} diff --git a/src/version2/models/statusProjectIssueTypeUsage.ts b/src/version2/models/statusProjectIssueTypeUsage.ts new file mode 100644 index 0000000000..3141919ee9 --- /dev/null +++ b/src/version2/models/statusProjectIssueTypeUsage.ts @@ -0,0 +1,5 @@ +/** The list of issue types. */ +export interface StatusProjectIssueTypeUsage { + /** The issue type ID. */ + id?: string; +} diff --git a/src/version2/models/statusProjectIssueTypeUsageDTO.ts b/src/version2/models/statusProjectIssueTypeUsageDTO.ts new file mode 100644 index 0000000000..73397025c5 --- /dev/null +++ b/src/version2/models/statusProjectIssueTypeUsageDTO.ts @@ -0,0 +1,10 @@ +import { StatusProjectIssueTypeUsagePage } from './statusProjectIssueTypeUsagePage'; + +/** The issue types using this status in a project. */ +export interface StatusProjectIssueTypeUsageDTO { + issueTypes?: StatusProjectIssueTypeUsagePage; + /** The project ID. */ + projectId?: string; + /** The status ID. */ + statusId?: string; +} diff --git a/src/version2/models/statusProjectIssueTypeUsagePage.ts b/src/version2/models/statusProjectIssueTypeUsagePage.ts new file mode 100644 index 0000000000..b273c4e6c2 --- /dev/null +++ b/src/version2/models/statusProjectIssueTypeUsagePage.ts @@ -0,0 +1,9 @@ +import { StatusProjectIssueTypeUsage } from './statusProjectIssueTypeUsage'; + +/** A page of issue types. */ +export interface StatusProjectIssueTypeUsagePage { + /** Page token for the next page of issue type usages. */ + nextPageToken?: string; + /** The list of issue types. */ + values?: StatusProjectIssueTypeUsage[]; +} diff --git a/src/version2/models/statusProjectUsage.ts b/src/version2/models/statusProjectUsage.ts new file mode 100644 index 0000000000..10f8b53619 --- /dev/null +++ b/src/version2/models/statusProjectUsage.ts @@ -0,0 +1,5 @@ +/** The project. */ +export interface StatusProjectUsage { + /** The project ID. */ + id?: string; +} diff --git a/src/version2/models/statusProjectUsageDTO.ts b/src/version2/models/statusProjectUsageDTO.ts new file mode 100644 index 0000000000..315a9377ed --- /dev/null +++ b/src/version2/models/statusProjectUsageDTO.ts @@ -0,0 +1,8 @@ +import { StatusProjectUsagePage } from './statusProjectUsagePage'; + +/** The projects using this status. */ +export interface StatusProjectUsageDTO { + projects?: StatusProjectUsagePage; + /** The status ID. */ + statusId?: string; +} diff --git a/src/version2/models/statusProjectUsagePage.ts b/src/version2/models/statusProjectUsagePage.ts new file mode 100644 index 0000000000..5a9583f815 --- /dev/null +++ b/src/version2/models/statusProjectUsagePage.ts @@ -0,0 +1,9 @@ +import { StatusProjectUsage } from './statusProjectUsage'; + +/** A page of projects. */ +export interface StatusProjectUsagePage { + /** Page token for the next page of issue type usages. */ + nextPageToken?: string; + /** The list of projects. */ + values?: StatusProjectUsage[]; +} diff --git a/src/version2/models/statusWorkflowUsageDTO.ts b/src/version2/models/statusWorkflowUsageDTO.ts new file mode 100644 index 0000000000..bad0f5011d --- /dev/null +++ b/src/version2/models/statusWorkflowUsageDTO.ts @@ -0,0 +1,8 @@ +import { StatusWorkflowUsagePage } from './statusWorkflowUsagePage'; + +/** Workflows using the status. */ +export interface StatusWorkflowUsageDTO { + /** The status ID. */ + statusId?: string; + workflows?: StatusWorkflowUsagePage; +} diff --git a/src/version2/models/statusWorkflowUsagePage.ts b/src/version2/models/statusWorkflowUsagePage.ts new file mode 100644 index 0000000000..6d358d8517 --- /dev/null +++ b/src/version2/models/statusWorkflowUsagePage.ts @@ -0,0 +1,9 @@ +import { StatusWorkflowUsageWorkflow } from './statusWorkflowUsageWorkflow'; + +/** A page of workflows. */ +export interface StatusWorkflowUsagePage { + /** Page token for the next page of issue type usages. */ + nextPageToken?: string; + /** The list of statuses. */ + values?: StatusWorkflowUsageWorkflow[]; +} diff --git a/src/version2/models/statusWorkflowUsageWorkflow.ts b/src/version2/models/statusWorkflowUsageWorkflow.ts new file mode 100644 index 0000000000..3e860725b5 --- /dev/null +++ b/src/version2/models/statusWorkflowUsageWorkflow.ts @@ -0,0 +1,5 @@ +/** The worflow. */ +export interface StatusWorkflowUsageWorkflow { + /** The workflow ID. */ + id?: string; +} diff --git a/src/version2/models/statusesPerWorkflow.ts b/src/version2/models/statusesPerWorkflow.ts new file mode 100644 index 0000000000..d4b31c1b71 --- /dev/null +++ b/src/version2/models/statusesPerWorkflow.ts @@ -0,0 +1,9 @@ +/** The statuses associated with each workflow. */ +export interface StatusesPerWorkflow { + /** The ID of the initial status for the workflow. */ + initialStatusId?: string; + /** The status IDs associated with the workflow. */ + statuses?: string[]; + /** The ID of the workflow. */ + workflowId?: string; +} diff --git a/src/version2/models/suggestedMappingsForPrioritiesRequestBean.ts b/src/version2/models/suggestedMappingsForPrioritiesRequestBean.ts new file mode 100644 index 0000000000..9102196ab0 --- /dev/null +++ b/src/version2/models/suggestedMappingsForPrioritiesRequestBean.ts @@ -0,0 +1,7 @@ +/** Details of changes to a priority scheme's priorities that require suggested priority mappings. */ +export interface SuggestedMappingsForPrioritiesRequestBean { + /** The ids of priorities being removed from the scheme. */ + add?: number[]; + /** The ids of priorities being removed from the scheme. */ + remove?: number[]; +} diff --git a/src/version2/models/suggestedMappingsForProjectsRequestBean.ts b/src/version2/models/suggestedMappingsForProjectsRequestBean.ts new file mode 100644 index 0000000000..50b3d45b90 --- /dev/null +++ b/src/version2/models/suggestedMappingsForProjectsRequestBean.ts @@ -0,0 +1,5 @@ +/** Details of changes to a priority scheme's projects that require suggested priority mappings. */ +export interface SuggestedMappingsForProjectsRequestBean { + /** The ids of projects being added to the scheme. */ + add?: number[]; +} diff --git a/src/version2/models/suggestedMappingsRequest.ts b/src/version2/models/suggestedMappingsRequest.ts new file mode 100644 index 0000000000..4606cbcddb --- /dev/null +++ b/src/version2/models/suggestedMappingsRequest.ts @@ -0,0 +1,14 @@ +import { SuggestedMappingsForPrioritiesRequestBean } from './suggestedMappingsForPrioritiesRequestBean'; +import { SuggestedMappingsForProjectsRequestBean } from './suggestedMappingsForProjectsRequestBean'; + +/** Details of changes to a priority scheme that require suggested priority mappings. */ +export interface SuggestedMappingsRequest { + /** The maximum number of results that could be on the page. */ + maxResults?: number; + priorities?: SuggestedMappingsForPrioritiesRequestBean; + projects?: SuggestedMappingsForProjectsRequestBean; + /** The id of the priority scheme. */ + schemeId?: number; + /** The index of the first item returned on the page. */ + startAt?: number; +} diff --git a/src/version2/models/systemAvatars.ts b/src/version2/models/systemAvatars.ts index b7a72d47f9..bb60531b88 100644 --- a/src/version2/models/systemAvatars.ts +++ b/src/version2/models/systemAvatars.ts @@ -3,5 +3,5 @@ import { Avatar } from './avatar'; /** List of system avatars. */ export interface SystemAvatars { /** A list of avatar details. */ - system?: Avatar[]; + system: Omit[]; } diff --git a/src/version2/models/taskProgressNode.ts b/src/version2/models/taskProgressNode.ts new file mode 100644 index 0000000000..d49fa81446 --- /dev/null +++ b/src/version2/models/taskProgressNode.ts @@ -0,0 +1,30 @@ +import { JsonNode } from './jsonNode'; + +/** Details about a task. */ +export interface TaskProgressNode { + /** The description of the task. */ + description?: string; + /** The execution time of the task, in milliseconds. */ + elapsedRuntime: number; + /** A timestamp recording when the task was finished. */ + finished?: number; + /** The ID of the task. */ + id: string; + /** A timestamp recording when the task progress was last updated. */ + lastUpdate: number; + /** Information about the progress of the task. */ + message?: string; + /** The progress of the task, as a percentage complete. */ + progress: number; + result?: JsonNode; + /** The URL of the task. */ + self: string; + /** A timestamp recording when the task was started. */ + started?: number; + /** The status of the task. */ + status: 'ENQUEUED' | 'RUNNING' | 'COMPLETE' | 'FAILED' | 'CANCEL_REQUESTED' | 'CANCELLED' | 'DEAD' | string; + /** A timestamp recording when the task was submitted. */ + submitted: number; + /** The ID of the user who submitted the task. */ + submittedBy: number; +} diff --git a/src/version2/models/taskProgressObject.ts b/src/version2/models/taskProgressObject.ts index 944caffe8d..5d52fa5338 100644 --- a/src/version2/models/taskProgressObject.ts +++ b/src/version2/models/taskProgressObject.ts @@ -15,6 +15,7 @@ export interface TaskProgressObject { /** The progress of the task, as a percentage complete. */ progress: number; /** The result of the task execution. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any result?: any; /** The URL of the task. */ self: string; diff --git a/src/version2/models/taskProgressRemoveOptionFromIssuesResult.ts b/src/version2/models/taskProgressRemoveOptionFromIssuesResult.ts new file mode 100644 index 0000000000..4d8a7b38b4 --- /dev/null +++ b/src/version2/models/taskProgressRemoveOptionFromIssuesResult.ts @@ -0,0 +1,30 @@ +import { RemoveOptionFromIssuesResult } from './removeOptionFromIssuesResult'; + +/** Details about a task. */ +export interface TaskProgressRemoveOptionFromIssuesResult { + /** The description of the task. */ + description?: string; + /** The execution time of the task, in milliseconds. */ + elapsedRuntime: number; + /** A timestamp recording when the task was finished. */ + finished?: number; + /** The ID of the task. */ + id: string; + /** A timestamp recording when the task progress was last updated. */ + lastUpdate: number; + /** Information about the progress of the task. */ + message?: string; + /** The progress of the task, as a percentage complete. */ + progress: number; + result?: RemoveOptionFromIssuesResult; + /** The URL of the task. */ + self: string; + /** A timestamp recording when the task was started. */ + started?: number; + /** The status of the task. */ + status: 'ENQUEUED' | 'RUNNING' | 'COMPLETE' | 'FAILED' | 'CANCEL_REQUESTED' | 'CANCELLED' | 'DEAD' | string; + /** A timestamp recording when the task was submitted. */ + submitted: number; + /** The ID of the user who submitted the task. */ + submittedBy: number; +} diff --git a/src/version2/models/transition.ts b/src/version2/models/transition.ts index f32828e74c..d27b20ca2b 100644 --- a/src/version2/models/transition.ts +++ b/src/version2/models/transition.ts @@ -12,7 +12,7 @@ export interface Transition { /** The name of the transition. */ name: string; /** The properties of the transition. */ - properties?: {}; + properties?: unknown; rules?: WorkflowRules; screen?: TransitionScreenDetails; /** The status the transition goes to. */ diff --git a/src/version2/models/transitionUpdateDTO.ts b/src/version2/models/transitionUpdateDTO.ts index d98aec9f58..b625802c08 100644 --- a/src/version2/models/transitionUpdateDTO.ts +++ b/src/version2/models/transitionUpdateDTO.ts @@ -19,7 +19,7 @@ export interface TransitionUpdateDTO { /** The name of the transition. */ name: string; /** The properties of the transition. */ - properties?: {}; + properties?: unknown; to?: StatusReferenceAndPort; transitionScreen?: WorkflowRuleConfiguration; /** The triggers of the transition. */ diff --git a/src/version2/models/updateDefaultProjectClassification.ts b/src/version2/models/updateDefaultProjectClassification.ts new file mode 100644 index 0000000000..70ce9a4184 --- /dev/null +++ b/src/version2/models/updateDefaultProjectClassification.ts @@ -0,0 +1,5 @@ +/** The request for updating the default project classification level. */ +export interface UpdateDefaultProjectClassification { + /** The ID of the project classification. */ + id: string; +} diff --git a/src/version2/models/updatePrioritiesInSchemeRequest.ts b/src/version2/models/updatePrioritiesInSchemeRequest.ts new file mode 100644 index 0000000000..43fcd0e551 --- /dev/null +++ b/src/version2/models/updatePrioritiesInSchemeRequest.ts @@ -0,0 +1,7 @@ +import { PrioritySchemeChangesWithoutMappings } from './prioritySchemeChangesWithoutMappings'; + +/** Update priorities in a scheme */ +export interface UpdatePrioritiesInSchemeRequest { + add?: PrioritySchemeChangesWithoutMappings; + remove?: PrioritySchemeChangesWithoutMappings; +} diff --git a/src/version2/models/updatePriorityDetails.ts b/src/version2/models/updatePriorityDetails.ts index ab3ed530a2..5d61df8da2 100644 --- a/src/version2/models/updatePriorityDetails.ts +++ b/src/version2/models/updatePriorityDetails.ts @@ -1,9 +1,37 @@ /** Details of an issue priority. */ export interface UpdatePriorityDetails { + /** The ID for the avatar for the priority. This parameter is nullable and both iconUrl and avatarId cannot be defined. */ + avatarId?: number; /** The description of the priority. */ description?: string; - /** The URL of an icon for the priority. Accepted protocols are HTTP and HTTPS. Built in icons can also be used. */ - iconUrl?: string; + /** + * The URL of an icon for the priority. Accepted protocols are HTTP and HTTPS. Built in icons can also be used. Both + * iconUrl and avatarId cannot be defined. + * + * @deprecated This property is deprecated and will be removed in a future version. Use `avatarId` instead. + */ + iconUrl?: + | '/images/icons/priorities/blocker.png' + | '/images/icons/priorities/critical.png' + | '/images/icons/priorities/high.png' + | '/images/icons/priorities/highest.png' + | '/images/icons/priorities/low.png' + | '/images/icons/priorities/lowest.png' + | '/images/icons/priorities/major.png' + | '/images/icons/priorities/medium.png' + | '/images/icons/priorities/minor.png' + | '/images/icons/priorities/trivial.png' + | '/images/icons/priorities/blocker_new.png' + | '/images/icons/priorities/critical_new.png' + | '/images/icons/priorities/high_new.png' + | '/images/icons/priorities/highest_new.png' + | '/images/icons/priorities/low_new.png' + | '/images/icons/priorities/lowest_new.png' + | '/images/icons/priorities/major_new.png' + | '/images/icons/priorities/medium_new.png' + | '/images/icons/priorities/minor_new.png' + | '/images/icons/priorities/trivial_new.png' + | string; /** The name of the priority. Must be unique. */ name?: string; /** The status color of the priority in 3-digit or 6-digit hexadecimal format. */ diff --git a/src/version2/models/updatePrioritySchemeRequest.ts b/src/version2/models/updatePrioritySchemeRequest.ts new file mode 100644 index 0000000000..95ecc0e93a --- /dev/null +++ b/src/version2/models/updatePrioritySchemeRequest.ts @@ -0,0 +1,16 @@ +import { PriorityMapping } from './priorityMapping'; +import { UpdatePrioritiesInSchemeRequest } from './updatePrioritiesInSchemeRequest'; +import { UpdateProjectsInSchemeRequest } from './updateProjectsInSchemeRequest'; + +/** Details of a priority scheme. */ +export interface UpdatePrioritySchemeRequest { + /** The default priority of the scheme. */ + defaultPriorityId?: number; + /** The description of the priority scheme. */ + description?: string; + mappings?: PriorityMapping; + /** The name of the priority scheme. Must be unique. */ + name?: string; + priorities?: UpdatePrioritiesInSchemeRequest; + projects?: UpdateProjectsInSchemeRequest; +} diff --git a/src/version2/models/updatePrioritySchemeResponse.ts b/src/version2/models/updatePrioritySchemeResponse.ts new file mode 100644 index 0000000000..236481e5b3 --- /dev/null +++ b/src/version2/models/updatePrioritySchemeResponse.ts @@ -0,0 +1,8 @@ +import { PrioritySchemeWithPaginatedPrioritiesAndProjects } from './prioritySchemeWithPaginatedPrioritiesAndProjects'; +import { TaskProgressNode } from './taskProgressNode'; + +/** Details of the updated priority scheme. */ +export interface UpdatePrioritySchemeResponse { + priorityScheme?: PrioritySchemeWithPaginatedPrioritiesAndProjects; + task?: TaskProgressNode; +} diff --git a/src/version2/models/updateProjectDetails.ts b/src/version2/models/updateProjectDetails.ts index c042c8d57a..6fc4a51306 100644 --- a/src/version2/models/updateProjectDetails.ts +++ b/src/version2/models/updateProjectDetails.ts @@ -1,17 +1,22 @@ /** Details about the project. */ export interface UpdateProjectDetails { - /** The default assignee when creating issues for this project. */ - assigneeType?: string; - /** An integer value for the project's avatar. */ - avatarId?: number; /** - * The ID of the project's category. A complete list of category IDs is found using the [Get all project - * categories](#api-rest-api-2-projectCategory-get) operation. To remove the project category from the project, set - * the value to `-1.` + * Project keys must be unique and start with an uppercase letter followed by one or more uppercase alphanumeric + * characters. The maximum length is 10 characters. */ - categoryId?: number; + key?: string; + /** The name of the project. */ + name?: string; /** A brief description of the project. */ description?: string; + /** The account ID of the project lead. Cannot be provided with `lead`. */ + leadAccountId: string; + /** A link to information about this project, such as project documentation */ + url?: string; + /** The default assignee when creating issues for this project. */ + assigneeType?: string; + /** An integer value for the project's avatar. */ + avatarId?: number; /** * The ID of the issue security scheme for the project, which enables you to control who can and cannot view issues. * Use the [Get issue security schemes](#api-rest-api-2-issuesecurityschemes-get) resource to get all issue security @@ -19,24 +24,24 @@ export interface UpdateProjectDetails { */ issueSecurityScheme?: number; /** - * Project keys must be unique and start with an uppercase letter followed by one or more uppercase alphanumeric - * characters. The maximum length is 10 characters. + * The ID of the permission scheme for the project. Use the [Get all permission + * schemes](#api-rest-api-2-permissionscheme-get) resource to see a list of all permission scheme IDs. */ - key?: string; - /** The account ID of the project lead. Cannot be provided with `lead`. */ - leadAccountId: string; - /** The name of the project. */ - name?: string; + permissionScheme?: number; /** * The ID of the notification scheme for the project. Use the [Get notification * schemes](#api-rest-api-2-notificationscheme-get) resource to get a list of notification scheme IDs. */ notificationScheme?: number; /** - * The ID of the permission scheme for the project. Use the [Get all permission - * schemes](#api-rest-api-2-permissionscheme-get) resource to see a list of all permission scheme IDs. + * The ID of the project's category. A complete list of category IDs is found using the [Get all project + * categories](#api-rest-api-2-projectCategory-get) operation. To remove the project category from the project, set + * the value to `-1.` */ - permissionScheme?: number; - /** A link to information about this project, such as project documentation */ - url?: string; + categoryId?: number; + /** + * Previous project keys to be released from the current project. Released keys must belong to the current project and + * not contain the current project key + */ + releasedProjectKeys?: string[]; } diff --git a/src/version2/models/updateProjectsInSchemeRequest.ts b/src/version2/models/updateProjectsInSchemeRequest.ts new file mode 100644 index 0000000000..2269174ee8 --- /dev/null +++ b/src/version2/models/updateProjectsInSchemeRequest.ts @@ -0,0 +1,7 @@ +import { PrioritySchemeChangesWithoutMappings } from './prioritySchemeChangesWithoutMappings'; + +/** Update projects in a scheme */ +export interface UpdateProjectsInSchemeRequest { + add?: PrioritySchemeChangesWithoutMappings; + remove?: PrioritySchemeChangesWithoutMappings; +} diff --git a/src/version2/models/userContextVariable.ts b/src/version2/models/userContextVariable.ts new file mode 100644 index 0000000000..3db08c9615 --- /dev/null +++ b/src/version2/models/userContextVariable.ts @@ -0,0 +1,6 @@ +export interface UserContextVariable { + /** The account ID of the user. */ + accountId: string; + /** Type of custom context variable. */ + type: string; +} diff --git a/src/version2/models/version.ts b/src/version2/models/version.ts index 5c2cd84911..9be11f4e2b 100644 --- a/src/version2/models/version.ts +++ b/src/version2/models/version.ts @@ -1,8 +1,17 @@ -import { SimpleLink } from './simpleLink'; +import { VersionApprover } from './versionApprover'; import { VersionIssuesStatus } from './versionIssuesStatus'; +import { SimpleLink } from './simpleLink'; /** Details about a project version. */ export interface Version { + /** If the expand option `approvers` is used, returns a list containing the approvers for this version. */ + approvers?: VersionApprover[]; + /** Indicates that the version is archived. Optional when creating or updating a version. */ + archived?: boolean; + /** The description of the version. Optional when creating or updating a version. The maximum size is 16,384 bytes. */ + description?: string; + /** If the expand option `driver` is used, returns the Atlassian account ID of the driver. */ + driver?: string; /** * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#expansion) to include additional * information about version in the response. This parameter accepts a comma-separated list. Expand options include: @@ -19,15 +28,11 @@ export interface Version { self?: string; /** The ID of the version. */ id?: string; - /** The description of the version. Optional when creating or updating a version. */ - description?: string; /** * The unique name of the version. Required when creating a version. Optional when updating a version. The maximum * length is 255 characters. */ name?: string; - /** Indicates that the version is archived. Optional when creating or updating a version. */ - archived?: boolean; /** * Indicates that the version is released. If the version is released a request to release again is ignored. Not * applicable when creating a version. Optional when updating a version. @@ -59,7 +64,7 @@ export interface Version { * The ID of the project to which this version is attached. Required when creating a version. Not applicable when * updating a version. */ - projectId: number; + projectId: string | number; /** * The URL of the self link to the version to which all unfixed issues are moved when a version is released. Not * applicable when creating a version. Optional when updating a version. diff --git a/src/version2/models/versionApprover.ts b/src/version2/models/versionApprover.ts new file mode 100644 index 0000000000..2a4b447c5a --- /dev/null +++ b/src/version2/models/versionApprover.ts @@ -0,0 +1,11 @@ +/** Contains details about a version approver. */ +export interface VersionApprover { + /** The Atlassian account ID of the approver. */ + accountId?: string; + /** A description of why the user is declining the approval. */ + declineReason?: string; + /** A description of what the user is approving within the specified version. */ + description?: string; + /** The status of the approval, which can be _PENDING_, _APPROVED_, or _DECLINED_ */ + status?: string; +} diff --git a/src/version2/models/versionRelatedWork.ts b/src/version2/models/versionRelatedWork.ts new file mode 100644 index 0000000000..d8e8e88a06 --- /dev/null +++ b/src/version2/models/versionRelatedWork.ts @@ -0,0 +1,16 @@ +/** Associated related work to a version */ +export interface VersionRelatedWork { + /** The category of the related work */ + category: string; + /** The ID of the issue associated with the related work (if there is one). Cannot be updated via the Rest API. */ + issueId?: number; + /** + * The id of the related work. For the native release note related work item, this will be null, and Rest API does not + * support updating it. + */ + relatedWorkId?: string; + /** The title of the related work */ + title?: string; + /** The URL of the related work. Will be null for the native release note related work item, but is otherwise required. */ + url?: string; +} diff --git a/src/version2/models/webhook.ts b/src/version2/models/webhook.ts index 7886ad7274..e9e804f184 100644 --- a/src/version2/models/webhook.ts +++ b/src/version2/models/webhook.ts @@ -4,7 +4,7 @@ export interface Webhook { events: string[]; /** * The date after which the webhook is no longer sent. Use [Extend webhook - * life](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-webhooks/#api-rest-api-3-webhook-refresh-put) + * life](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-webhooks/#api-rest-api-2-webhook-refresh-put) * to extend the date. */ expirationDate?: number; diff --git a/src/version2/models/workflowAssociationStatusMapping.ts b/src/version2/models/workflowAssociationStatusMapping.ts new file mode 100644 index 0000000000..17d5e22fe6 --- /dev/null +++ b/src/version2/models/workflowAssociationStatusMapping.ts @@ -0,0 +1,7 @@ +/** The list of status mappings. */ +export interface WorkflowAssociationStatusMapping { + /** The ID of the status in the new workflow. */ + newStatusId: string; + /** The ID of the status in the old workflow that isn't present in the new workflow. */ + oldStatusId: string; +} diff --git a/src/version2/models/workflowMetadataAndIssueTypeRestModel.ts b/src/version2/models/workflowMetadataAndIssueTypeRestModel.ts new file mode 100644 index 0000000000..b418fdf196 --- /dev/null +++ b/src/version2/models/workflowMetadataAndIssueTypeRestModel.ts @@ -0,0 +1,8 @@ +import { WorkflowMetadataRestModel } from './workflowMetadataRestModel'; + +/** The workflow metadata and issue type IDs which use this workflow. */ +export interface WorkflowMetadataAndIssueTypeRestModel { + /** The list of issue type IDs for the mapping. */ + issueTypeIds: string[]; + workflow: WorkflowMetadataRestModel; +} diff --git a/src/version2/models/workflowMetadataRestModel.ts b/src/version2/models/workflowMetadataRestModel.ts new file mode 100644 index 0000000000..480f13505f --- /dev/null +++ b/src/version2/models/workflowMetadataRestModel.ts @@ -0,0 +1,20 @@ +import { SimpleUsage } from './simpleUsage'; +import { DocumentVersion } from './documentVersion'; + +/** Workflow metadata and usage detail. */ +export interface WorkflowMetadataRestModel { + /** The description of the workflow. */ + description: string; + /** The ID of the workflow. */ + id: string; + /** The name of the workflow. */ + name: string; + /** + * Deprecated. See the [deprecation + * notice](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-2298) for details. + * + * Use the optional `workflows.usages` expand to get additional information about the projects and issue types associated with the workflows in the workflow scheme. + */ + usage: SimpleUsage[]; + version: DocumentVersion; +} diff --git a/src/version2/models/workflowProjectIssueTypeUsage.ts b/src/version2/models/workflowProjectIssueTypeUsage.ts new file mode 100644 index 0000000000..9e5e7f3ec1 --- /dev/null +++ b/src/version2/models/workflowProjectIssueTypeUsage.ts @@ -0,0 +1,5 @@ +/** The issue type. */ +export interface WorkflowProjectIssueTypeUsage { + /** The ID of the issue type. */ + id?: string; +} diff --git a/src/version2/models/workflowProjectIssueTypeUsageDTO.ts b/src/version2/models/workflowProjectIssueTypeUsageDTO.ts new file mode 100644 index 0000000000..fa23a7595e --- /dev/null +++ b/src/version2/models/workflowProjectIssueTypeUsageDTO.ts @@ -0,0 +1,10 @@ +import { WorkflowProjectIssueTypeUsagePage } from './workflowProjectIssueTypeUsagePage'; + +/** Issue types associated with the workflow for a project. */ +export interface WorkflowProjectIssueTypeUsageDTO { + issueTypes?: WorkflowProjectIssueTypeUsagePage; + /** The ID of the project. */ + projectId?: string; + /** The ID of the workflow. */ + workflowId?: string; +} diff --git a/src/version2/models/workflowProjectIssueTypeUsagePage.ts b/src/version2/models/workflowProjectIssueTypeUsagePage.ts new file mode 100644 index 0000000000..33efc451d8 --- /dev/null +++ b/src/version2/models/workflowProjectIssueTypeUsagePage.ts @@ -0,0 +1,9 @@ +import { WorkflowProjectIssueTypeUsage } from './workflowProjectIssueTypeUsage'; + +/** A page of issue types. */ +export interface WorkflowProjectIssueTypeUsagePage { + /** Token for the next page of issue type usages. */ + nextPageToken?: string; + /** The list of issue types. */ + values?: WorkflowProjectIssueTypeUsage[]; +} diff --git a/src/version2/models/workflowProjectUsageDTO.ts b/src/version2/models/workflowProjectUsageDTO.ts new file mode 100644 index 0000000000..1d3d2b1d13 --- /dev/null +++ b/src/version2/models/workflowProjectUsageDTO.ts @@ -0,0 +1,8 @@ +import { ProjectUsagePage } from './projectUsagePage'; + +/** Projects using the workflow. */ +export interface WorkflowProjectUsageDTO { + projects?: ProjectUsagePage; + /** The workflow ID. */ + workflowId?: string; +} diff --git a/src/version2/models/workflowReferenceStatus.ts b/src/version2/models/workflowReferenceStatus.ts index b60f99d504..c465f4ded2 100644 --- a/src/version2/models/workflowReferenceStatus.ts +++ b/src/version2/models/workflowReferenceStatus.ts @@ -6,7 +6,7 @@ export interface WorkflowReferenceStatus { deprecated?: boolean; layout?: WorkflowStatusLayout; /** The properties associated with the status. */ - properties?: {}; + properties?: unknown; /** The reference of the status. */ statusReference?: string; } diff --git a/src/version2/models/workflowRuleConfiguration.ts b/src/version2/models/workflowRuleConfiguration.ts index 1df368717b..3a4160aca8 100644 --- a/src/version2/models/workflowRuleConfiguration.ts +++ b/src/version2/models/workflowRuleConfiguration.ts @@ -3,7 +3,7 @@ export interface WorkflowRuleConfiguration { /** The ID of the rule. */ id?: string; /** The parameters related to the rule. */ - parameters?: {}; + parameters?: unknown; /** The rule key of the rule. */ ruleKey: string; } diff --git a/src/version2/models/workflowScheme.ts b/src/version2/models/workflowScheme.ts index 7940c321cd..7c28b6d27b 100644 --- a/src/version2/models/workflowScheme.ts +++ b/src/version2/models/workflowScheme.ts @@ -18,9 +18,9 @@ export interface WorkflowScheme { * 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?: {}; + issueTypeMappings?: unknown; /** The issue types available in Jira. */ - issueTypes?: {}; + issueTypes?: unknown; /** * The date-time that the draft workflow scheme was last modified. A modification is a change to the issue * type-project mappings only. This property does not apply to non-draft workflows. @@ -42,7 +42,7 @@ export interface WorkflowScheme { * 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?: {}; + originalIssueTypeMappings?: unknown; self?: string; /** * Whether to create or update a draft workflow scheme when updating an active workflow scheme. An active workflow diff --git a/src/version2/models/workflowSchemeAssociation.ts b/src/version2/models/workflowSchemeAssociation.ts new file mode 100644 index 0000000000..9e119c9edb --- /dev/null +++ b/src/version2/models/workflowSchemeAssociation.ts @@ -0,0 +1,7 @@ +/** The explicit association between issue types and a workflow in a workflow scheme. */ +export interface WorkflowSchemeAssociation { + /** The issue types assigned to the workflow. */ + issueTypeIds: string[]; + /** The ID of the workflow. */ + workflowId: string; +} diff --git a/src/version2/models/workflowSchemeProjectUsage.ts b/src/version2/models/workflowSchemeProjectUsage.ts new file mode 100644 index 0000000000..525818ea3b --- /dev/null +++ b/src/version2/models/workflowSchemeProjectUsage.ts @@ -0,0 +1,8 @@ +import { ProjectUsagePage } from './projectUsagePage'; + +/** Projects using the workflow scheme. */ +export interface WorkflowSchemeProjectUsage { + projects?: ProjectUsagePage; + /** The workflow scheme ID. */ + workflowSchemeId?: string; +} diff --git a/src/version2/models/workflowSchemeReadRequest.ts b/src/version2/models/workflowSchemeReadRequest.ts new file mode 100644 index 0000000000..448fe7361e --- /dev/null +++ b/src/version2/models/workflowSchemeReadRequest.ts @@ -0,0 +1,7 @@ +/** The workflow scheme read request body. */ +export interface WorkflowSchemeReadRequest { + /** The list of project IDs to query. */ + projectIds?: string[]; + /** The list of workflow scheme IDs to query. */ + workflowSchemeIds?: string[]; +} diff --git a/src/version2/models/workflowSchemeReadResponse.ts b/src/version2/models/workflowSchemeReadResponse.ts new file mode 100644 index 0000000000..55fef69680 --- /dev/null +++ b/src/version2/models/workflowSchemeReadResponse.ts @@ -0,0 +1,27 @@ +import { WorkflowMetadataRestModel } from './workflowMetadataRestModel'; +import { WorkflowScope } from './workflowScope'; +import { DocumentVersion } from './documentVersion'; +import { WorkflowMetadataAndIssueTypeRestModel } from './workflowMetadataAndIssueTypeRestModel'; + +export interface WorkflowSchemeReadResponse { + defaultWorkflow?: WorkflowMetadataRestModel; + /** The description of the workflow scheme. */ + description?: string; + /** The ID of the workflow scheme. */ + id: string; + /** The name of the workflow scheme. */ + name: string; + /** + * Deprecated. See the [deprecation + * notice](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-2298) for details. + * + * The IDs of projects using the workflow scheme. + */ + projectIdsUsingScheme?: string[]; + scope: WorkflowScope; + /** Indicates if there's an [asynchronous task](#async-operations) for this workflow scheme. */ + taskId?: string; + version: DocumentVersion; + /** Mappings from workflows to issue types. */ + workflowsForIssueTypes: WorkflowMetadataAndIssueTypeRestModel[]; +} diff --git a/src/version2/models/workflowSchemeUpdateRequest.ts b/src/version2/models/workflowSchemeUpdateRequest.ts new file mode 100644 index 0000000000..fc2a9816c2 --- /dev/null +++ b/src/version2/models/workflowSchemeUpdateRequest.ts @@ -0,0 +1,35 @@ +import { MappingsByIssueTypeOverride } from './mappingsByIssueTypeOverride'; +import { MappingsByWorkflow } from './mappingsByWorkflow'; +import { DocumentVersion } from './documentVersion'; +import { WorkflowSchemeAssociation } from './workflowSchemeAssociation'; + +/** The update workflow scheme payload. */ +export interface WorkflowSchemeUpdateRequest { + /** + * The ID of the workflow for issue types without having a mapping defined in this workflow scheme. Only used in + * global-scoped workflow schemes. If the `defaultWorkflowId` isn't specified, this is set to _Jira Workflow (jira)_. + */ + defaultWorkflowId?: string; + /** The new description for this workflow scheme. */ + description: string; + /** The ID of this workflow scheme. */ + id: string; + /** The new name for this workflow scheme. */ + name: string; + /** + * Overrides, for the selected issue types, any status mappings provided in `statusMappingsByWorkflows`. Status + * mappings are required when the new workflow for an issue type doesn't contain all statuses that the old workflow + * has. Status mappings can be provided by a combination of `statusMappingsByWorkflows` and + * `statusMappingsByIssueTypeOverride`. + */ + statusMappingsByIssueTypeOverride?: MappingsByIssueTypeOverride[]; + /** + * The status mappings by workflows. Status mappings are required when the new workflow for an issue type doesn't + * contain all statuses that the old workflow has. Status mappings can be provided by a combination of + * `statusMappingsByWorkflows` and `statusMappingsByIssueTypeOverride`. + */ + statusMappingsByWorkflows?: MappingsByWorkflow[]; + version: DocumentVersion; + /** Mappings from workflows to issue types. */ + workflowsForIssueTypes?: WorkflowSchemeAssociation[]; +} diff --git a/src/version2/models/workflowSchemeUpdateRequiredMappingsRequest.ts b/src/version2/models/workflowSchemeUpdateRequiredMappingsRequest.ts new file mode 100644 index 0000000000..ccde824efa --- /dev/null +++ b/src/version2/models/workflowSchemeUpdateRequiredMappingsRequest.ts @@ -0,0 +1,14 @@ +import { WorkflowSchemeAssociation } from './workflowSchemeAssociation'; + +/** The request payload to get the required mappings for updating a workflow scheme. */ +export interface WorkflowSchemeUpdateRequiredMappingsRequest { + /** + * The ID of the new default workflow for this workflow scheme. Only used in global-scoped workflow schemes. If it + * isn't specified, is set to _Jira Workflow (jira)_. + */ + defaultWorkflowId?: string; + /** The ID of the workflow scheme. */ + id: string; + /** The new workflow to issue type mappings for this workflow scheme. */ + workflowsForIssueTypes: WorkflowSchemeAssociation[]; +} diff --git a/src/version2/models/workflowSchemeUpdateRequiredMappingsResponse.ts b/src/version2/models/workflowSchemeUpdateRequiredMappingsResponse.ts new file mode 100644 index 0000000000..c0ca2ff563 --- /dev/null +++ b/src/version2/models/workflowSchemeUpdateRequiredMappingsResponse.ts @@ -0,0 +1,15 @@ +import { RequiredMappingByIssueType } from './requiredMappingByIssueType'; +import { RequiredMappingByWorkflows } from './requiredMappingByWorkflows'; +import { StatusMetadata } from './statusMetadata'; +import { StatusesPerWorkflow } from './statusesPerWorkflow'; + +export interface WorkflowSchemeUpdateRequiredMappingsResponse { + /** The list of required status mappings by issue type. */ + statusMappingsByIssueTypes?: RequiredMappingByIssueType[]; + /** The list of required status mappings by workflow. */ + statusMappingsByWorkflows?: RequiredMappingByWorkflows[]; + /** The details of the statuses in the associated workflows. */ + statuses?: StatusMetadata[]; + /** The statuses associated with each workflow. */ + statusesPerWorkflow?: StatusesPerWorkflow[]; +} diff --git a/src/version2/models/workflowSchemeUsage.ts b/src/version2/models/workflowSchemeUsage.ts new file mode 100644 index 0000000000..a6b0fe9530 --- /dev/null +++ b/src/version2/models/workflowSchemeUsage.ts @@ -0,0 +1,5 @@ +/** The worflow scheme. */ +export interface WorkflowSchemeUsage { + /** The workflow scheme ID. */ + id?: string; +} diff --git a/src/version2/models/workflowSchemeUsageDTO.ts b/src/version2/models/workflowSchemeUsageDTO.ts new file mode 100644 index 0000000000..9d660e5b61 --- /dev/null +++ b/src/version2/models/workflowSchemeUsageDTO.ts @@ -0,0 +1,8 @@ +import { WorkflowSchemeUsagePage } from './workflowSchemeUsagePage'; + +/** Workflow schemes using the workflow. */ +export interface WorkflowSchemeUsageDTO { + /** The workflow ID. */ + workflowId?: string; + workflowSchemes?: WorkflowSchemeUsagePage; +} diff --git a/src/version2/models/workflowSchemeUsagePage.ts b/src/version2/models/workflowSchemeUsagePage.ts new file mode 100644 index 0000000000..5b883978f6 --- /dev/null +++ b/src/version2/models/workflowSchemeUsagePage.ts @@ -0,0 +1,9 @@ +import { WorkflowSchemeUsage } from './workflowSchemeUsage'; + +/** A page of workflow schemes. */ +export interface WorkflowSchemeUsagePage { + /** Token for the next page of issue type usages. */ + nextPageToken?: string; + /** The list of workflow schemes. */ + values?: WorkflowSchemeUsage[]; +} diff --git a/src/version2/models/workflowSearchResponse.ts b/src/version2/models/workflowSearchResponse.ts new file mode 100644 index 0000000000..966016a32a --- /dev/null +++ b/src/version2/models/workflowSearchResponse.ts @@ -0,0 +1,22 @@ +import { JiraWorkflowStatus } from './jiraWorkflowStatus'; +import { JiraWorkflow } from './jiraWorkflow'; + +/** Page of items, including workflows and related statuses. */ +export interface WorkflowSearchResponse { + /** Whether this is the last page. */ + isLast?: boolean; + /** The maximum number of items that could be returned. */ + maxResults?: number; + /** If there is another page of results, the URL of the next page. */ + nextPage?: string; + /** The URL of the page. */ + self?: string; + /** The index of the first item returned. */ + startAt?: number; + /** List of statuses. */ + statuses?: JiraWorkflowStatus[]; + /** The number of items returned. */ + total?: number; + /** List of workflows. */ + values?: JiraWorkflow[]; +} diff --git a/src/version2/models/workflowTransitionRule.ts b/src/version2/models/workflowTransitionRule.ts index 71acbd7ce0..a29324738e 100644 --- a/src/version2/models/workflowTransitionRule.ts +++ b/src/version2/models/workflowTransitionRule.ts @@ -1,6 +1,7 @@ /** A workflow transition rule. */ export interface WorkflowTransitionRule { /** EXPERIMENTAL. The configuration of the transition rule. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any configuration?: any; /** The type of the transition rule. */ type: string; diff --git a/src/version2/models/workflowTransitionRulesUpdateErrorDetails.ts b/src/version2/models/workflowTransitionRulesUpdateErrorDetails.ts index 1163412b28..af40c34052 100644 --- a/src/version2/models/workflowTransitionRulesUpdateErrorDetails.ts +++ b/src/version2/models/workflowTransitionRulesUpdateErrorDetails.ts @@ -6,7 +6,7 @@ export interface WorkflowTransitionRulesUpdateErrorDetails { * A list of transition rule update errors, indexed by the transition rule ID. Any transition rule that appears here * wasn't updated. */ - ruleUpdateErrors: {}; + ruleUpdateErrors: unknown; /** * The list of errors that specify why the workflow update failed. The workflow was not updated if the list contains * any entries. diff --git a/src/version2/models/workflowTransitions.ts b/src/version2/models/workflowTransitions.ts index dc89268156..56b5c5c279 100644 --- a/src/version2/models/workflowTransitions.ts +++ b/src/version2/models/workflowTransitions.ts @@ -19,7 +19,7 @@ export interface WorkflowTransitions { /** The name of the transition. */ name?: string; /** The properties of the transition. */ - properties?: {}; + properties?: unknown; to?: WorkflowStatusAndPort; transitionScreen?: WorkflowRuleConfiguration; /** The triggers of the transition. */ diff --git a/src/version2/models/workflowTrigger.ts b/src/version2/models/workflowTrigger.ts index 410c0ada8b..6a01b17784 100644 --- a/src/version2/models/workflowTrigger.ts +++ b/src/version2/models/workflowTrigger.ts @@ -3,7 +3,7 @@ export interface WorkflowTrigger { /** The ID of the trigger. */ id?: string; /** The parameters of the trigger. */ - parameters: {}; + parameters: unknown; /** The rule key of the trigger. */ ruleKey: string; } diff --git a/src/version2/models/worklogsMoveRequest.ts b/src/version2/models/worklogsMoveRequest.ts new file mode 100644 index 0000000000..212d9419a7 --- /dev/null +++ b/src/version2/models/worklogsMoveRequest.ts @@ -0,0 +1,6 @@ +export interface WorklogsMoveRequest { + /** A list of worklog IDs. */ + ids?: number[]; + /** The issue id or key of the destination issue */ + issueIdOrKey?: string; +} diff --git a/src/version2/models/workspaceDataPolicy.ts b/src/version2/models/workspaceDataPolicy.ts new file mode 100644 index 0000000000..cc0f7bcebb --- /dev/null +++ b/src/version2/models/workspaceDataPolicy.ts @@ -0,0 +1,5 @@ +/** Details about data policy. */ +export interface WorkspaceDataPolicy { + /** Whether the workspace contains any content inaccessible to the requesting application. */ + anyContentBlocked?: boolean; +} diff --git a/src/version2/myself.ts b/src/version2/myself.ts index 2930c9de48..be975fd2ec 100644 --- a/src/version2/myself.ts +++ b/src/version2/myself.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Myself { @@ -17,6 +17,14 @@ export class Myself { * - _jira.user.timezone_ The time zone of the user. By default this is not set and the user takes the timezone of the * instance. * + * These system preferences keys will be deprecated by 15/07/2024. You can still retrieve these keys, but it will not + * have any impact on Notification behaviour. + * + * - _user.notifications.watcher_ Whether the user gets notified when they are watcher. + * - _user.notifications.assignee_ Whether the user gets notified when they are assignee. + * - _user.notifications.reporter_ Whether the user gets notified when they are reporter. + * - _user.notifications.mentions_ Whether the user gets notified when they are mentions. + * * 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 to manage timezone and locale instead. @@ -35,6 +43,14 @@ export class Myself { * - _jira.user.timezone_ The time zone of the user. By default this is not set and the user takes the timezone of the * instance. * + * These system preferences keys will be deprecated by 15/07/2024. You can still retrieve these keys, but it will not + * have any impact on Notification behaviour. + * + * - _user.notifications.watcher_ Whether the user gets notified when they are watcher. + * - _user.notifications.assignee_ Whether the user gets notified when they are assignee. + * - _user.notifications.reporter_ Whether the user gets notified when they are reporter. + * - _user.notifications.mentions_ Whether the user gets notified when they are mentions. + * * 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 to manage timezone and locale instead. @@ -61,18 +77,26 @@ export class Myself { * following keys define system preferences that can be set or created: * * - _user.notifications.mimetype_ The mime type used in notifications sent to the user. Defaults to `html`. - * - _user.notify.own.changes_ Whether the user gets notified of their own changes. Defaults to `false`. * - _user.default.share.private_ Whether new [ filters](https://confluence.atlassian.com/x/eQiiLQ) are set to private. * Defaults to `true`. * - _user.keyboard.shortcuts.disabled_ Whether keyboard shortcuts are disabled. Defaults to `false`. * - _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. + * - _user.notifiy.own.changes_ Whether the user gets notified of their own changes. * * Note that these keys are deprecated: * * - _jira.user.locale_ The locale of the user. By default, not set. The user takes the instance locale. * - _jira.user.timezone_ The time zone of the user. By default, not set. The user takes the instance timezone. * + * These system preferences keys will be deprecated by 15/07/2024. You can still use these keys to create arbitrary + * preferences, but it will not have any impact on Notification behaviour. + * + * - _user.notifications.watcher_ Whether the user gets notified when they are watcher. + * - _user.notifications.assignee_ Whether the user gets notified when they are assignee. + * - _user.notifications.reporter_ Whether the user gets notified when they are reporter. + * - _user.notifications.mentions_ Whether the user gets notified when they are mentions. + * * 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 to manage timezone and locale instead. @@ -87,18 +111,26 @@ export class Myself { * following keys define system preferences that can be set or created: * * - _user.notifications.mimetype_ The mime type used in notifications sent to the user. Defaults to `html`. - * - _user.notify.own.changes_ Whether the user gets notified of their own changes. Defaults to `false`. * - _user.default.share.private_ Whether new [ filters](https://confluence.atlassian.com/x/eQiiLQ) are set to private. * Defaults to `true`. * - _user.keyboard.shortcuts.disabled_ Whether keyboard shortcuts are disabled. Defaults to `false`. * - _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. + * - _user.notifiy.own.changes_ Whether the user gets notified of their own changes. * * Note that these keys are deprecated: * * - _jira.user.locale_ The locale of the user. By default, not set. The user takes the instance locale. * - _jira.user.timezone_ The time zone of the user. By default, not set. The user takes the instance timezone. * + * These system preferences keys will be deprecated by 15/07/2024. You can still use these keys to create arbitrary + * preferences, but it will not have any impact on Notification behaviour. + * + * - _user.notifications.watcher_ Whether the user gets notified when they are watcher. + * - _user.notifications.assignee_ Whether the user gets notified when they are assignee. + * - _user.notifications.reporter_ Whether the user gets notified when they are reporter. + * - _user.notifications.mentions_ Whether the user gets notified when they are mentions. + * * 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 to manage timezone and locale instead. diff --git a/src/version2/parameters/addActorUsers.ts b/src/version2/parameters/addActorUsers.ts index 1451229935..6068b4dace 100644 --- a/src/version2/parameters/addActorUsers.ts +++ b/src/version2/parameters/addActorUsers.ts @@ -2,7 +2,7 @@ import { ActorsMap } from '../models'; export interface AddActorUsers extends ActorsMap { /** The project ID or project key (case-sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** * The ID of the project role. Use [Get all project roles](#api-rest-api-2-role-get) to get a list of project role * IDs. diff --git a/src/version2/parameters/addAtlassianTeam.ts b/src/version2/parameters/addAtlassianTeam.ts new file mode 100644 index 0000000000..6563e62556 --- /dev/null +++ b/src/version2/parameters/addAtlassianTeam.ts @@ -0,0 +1,6 @@ +import { AddAtlassianTeamRequest } from '../models'; + +export interface AddAtlassianTeam extends AddAtlassianTeamRequest { + /** The ID of the plan. */ + planId: number; +} diff --git a/src/version2/parameters/addAttachment.ts b/src/version2/parameters/addAttachment.ts index 5caab857b6..7a0682f58b 100644 --- a/src/version2/parameters/addAttachment.ts +++ b/src/version2/parameters/addAttachment.ts @@ -1,3 +1,5 @@ +import type { Readable } from 'node:stream'; + /** * Represents an attachment to be added to an issue. * @@ -35,7 +37,7 @@ export interface Attachment { * const fileContent = fs.readFileSync('./document.pdf'); * ``` */ - file: Buffer | ReadableStream | string | Blob | File; + file: Buffer | ReadableStream | Readable | string | Blob | File; /** * Optional MIME type of the attachment. Example values include: diff --git a/src/version2/parameters/addNotifications.ts b/src/version2/parameters/addNotifications.ts new file mode 100644 index 0000000000..2678cd06c1 --- /dev/null +++ b/src/version2/parameters/addNotifications.ts @@ -0,0 +1,6 @@ +import { AddNotificationsDetails } from '../models'; + +export interface AddNotifications extends AddNotificationsDetails { + /** The ID of the notification scheme. */ + id: string; +} diff --git a/src/version2/parameters/archivePlan.ts b/src/version2/parameters/archivePlan.ts new file mode 100644 index 0000000000..250cc9759f --- /dev/null +++ b/src/version2/parameters/archivePlan.ts @@ -0,0 +1,4 @@ +export interface ArchivePlan { + /** The ID of the plan. */ + planId: number; +} diff --git a/src/version2/parameters/archiveProject.ts b/src/version2/parameters/archiveProject.ts index 6030877bc8..21f2d1c389 100644 --- a/src/version2/parameters/archiveProject.ts +++ b/src/version2/parameters/archiveProject.ts @@ -1,4 +1,4 @@ export interface ArchiveProject { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; } diff --git a/src/version2/parameters/bulkDeleteWorklogs.ts b/src/version2/parameters/bulkDeleteWorklogs.ts new file mode 100644 index 0000000000..65e9d6883d --- /dev/null +++ b/src/version2/parameters/bulkDeleteWorklogs.ts @@ -0,0 +1,19 @@ +import { WorklogIdsRequest } from '../models'; + +export interface BulkDeleteWorklogs extends WorklogIdsRequest { + /** The ID or key of the issue. */ + issueIdOrKey: string; + /** + * Defines how to update the issue's time estimate, the options are: + * + * `leave` Leaves the estimate unchanged. `auto` Reduces the estimate by the aggregate value of `timeSpent` across all + * worklogs being deleted. + */ + adjustEstimate?: 'leave' | 'auto' | string; + /** + * Whether the work log entries should be removed to the issue even if the issue is not editable, because + * jira.issue.editable set to false or missing. For example, the issue is closed. Connect and Forge app users with + * admin permission can use this flag. + */ + overrideEditableFlag?: boolean; +} diff --git a/src/version2/parameters/bulkFetchIssues.ts b/src/version2/parameters/bulkFetchIssues.ts new file mode 100644 index 0000000000..124f62b0e5 --- /dev/null +++ b/src/version2/parameters/bulkFetchIssues.ts @@ -0,0 +1,66 @@ +export interface BulkFetchIssues { + /** + * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#expansion) to include additional + * information about issues in the response. Note that, unlike the majority of instances where `expand` is specified, + * `expand` is defined as a list of values. The expand options are: + * + * - `renderedFields` Returns field values rendered in HTML format. + * - `names` Returns the display name of each field. + * - `schema` Returns the schema describing a field type. + * - `transitions` Returns all possible transitions for the issue. + * - `operations` Returns all possible operations for the issue. + * - `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. + */ + expand?: + | 'renderedFields' + | 'names' + | 'schema' + | 'transitions' + | 'operations' + | 'editmeta' + | 'changelog' + | 'versionedRepresentations' + | string + | ( + | 'renderedFields' + | 'names' + | 'schema' + | 'transitions' + | 'operations' + | 'editmeta' + | 'changelog' + | 'versionedRepresentations' + | string + )[]; + /** + * A list of fields to return for each issue, use it to retrieve a subset of fields. This parameter accepts a + * comma-separated list. Expand options include: + * + * `*all` Returns all fields. `*navigable` Returns navigable fields. Any issue field, prefixed with a minus to + * exclude. + * + * The default is `*navigable`. + * + * Examples: + * + * `summary,comment` Returns the summary and comments fields only. `-description` Returns all navigable (default) + * fields except description. `*all,-comment` Returns all fields except comments. + * + * Multiple `fields` parameters can be included in a request. + * + * Note: All navigable fields are returned by default. This differs from [GET issue](#api-rest-api-2-issue-issueIdOrKey-get) where the default is all fields. + */ + fields?: string[]; + /** Reference fields by their key (rather than ID). The default is `false`. */ + fieldsByKeys?: boolean; + /** An array of issue IDs or issue keys to fetch. You can mix issue IDs and keys in the same query. */ + issueIdsOrKeys: string[]; + /** + * A list of issue property keys of issue properties to be included in the results. A maximum of 5 issue property keys + * can be specified. + */ + properties?: string[]; +} diff --git a/src/version2/parameters/bulkMoveWorklogs.ts b/src/version2/parameters/bulkMoveWorklogs.ts new file mode 100644 index 0000000000..6e87b7d393 --- /dev/null +++ b/src/version2/parameters/bulkMoveWorklogs.ts @@ -0,0 +1,20 @@ +import { WorklogsMoveRequest } from '../models'; + +export interface BulkMoveWorklogs { + issueIdOrKey: string; + /** + * Defines how to update the issues' time estimate, the options are: + * + * - `leave` Leaves the estimate unchanged. + * - `auto` Reduces the estimate by the aggregate value of `timeSpent` across all worklogs being moved in the source + * issue, and increases it in the destination issue. + */ + adjustEstimate?: 'leave' | 'auto' | string; + /** + * Whether the work log entry should be moved to and from the issues even if the issues are not editable, because + * jira.issue.editable set to false or missing. For example, the issue is closed. Connect and Forge app users with + * admin permission can use this flag. + */ + overrideEditableFlag?: boolean; + worklogs: WorklogsMoveRequest; +} diff --git a/src/version2/parameters/copyDashboard.ts b/src/version2/parameters/copyDashboard.ts index 1e157d012e..905415da28 100644 --- a/src/version2/parameters/copyDashboard.ts +++ b/src/version2/parameters/copyDashboard.ts @@ -2,4 +2,9 @@ import { DashboardDetails } from '../models'; export interface CopyDashboard extends DashboardDetails { id: string; + /** + * Whether admin level permissions are used. It should only be true if the user has _Administer Jira_ [global + * permission](https://confluence.atlassian.com/x/x4dKLg) + */ + extendAdminPermissions?: boolean; } diff --git a/src/version2/parameters/countIssues.ts b/src/version2/parameters/countIssues.ts new file mode 100644 index 0000000000..527120f2a4 --- /dev/null +++ b/src/version2/parameters/countIssues.ts @@ -0,0 +1,3 @@ +import { JQLCountRequest } from '../models'; + +export interface CountIssues extends JQLCountRequest {} diff --git a/src/version2/parameters/createDashboard.ts b/src/version2/parameters/createDashboard.ts index eb78135c41..372243bbac 100644 --- a/src/version2/parameters/createDashboard.ts +++ b/src/version2/parameters/createDashboard.ts @@ -3,4 +3,9 @@ import { DashboardDetails, SharePermission } from '../models'; export interface CreateDashboard extends Omit { /** The edit permissions for the dashboard. */ editPermissions?: SharePermission[]; + /** + * Whether admin level permissions are used. It should only be true if the user has _Administer Jira_ [global + * permission](https://confluence.atlassian.com/x/x4dKLg) + */ + extendAdminPermissions?: boolean; } diff --git a/src/version2/parameters/createGroup.ts b/src/version2/parameters/createGroup.ts index 15c93233fd..f2d3dc8d71 100644 --- a/src/version2/parameters/createGroup.ts +++ b/src/version2/parameters/createGroup.ts @@ -1,5 +1,4 @@ import { AddGroup } from '../models'; -export interface CreateGroup extends AddGroup { - [key: string]: any; -} +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export type CreateGroup = AddGroup & Record; diff --git a/src/version2/parameters/createIssue.ts b/src/version2/parameters/createIssue.ts index 83b5949c2f..0ba73b1a36 100644 --- a/src/version2/parameters/createIssue.ts +++ b/src/version2/parameters/createIssue.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ import { IssueUpdateDetails, Project, TimeTrackingDetails } from '../models'; export interface CreateIssue extends Omit { diff --git a/src/version2/parameters/createIssueTypeAvatar.ts b/src/version2/parameters/createIssueTypeAvatar.ts index ba645723db..b463b3f791 100644 --- a/src/version2/parameters/createIssueTypeAvatar.ts +++ b/src/version2/parameters/createIssueTypeAvatar.ts @@ -5,6 +5,12 @@ export interface CreateIssueTypeAvatar { x?: number; /** The Y coordinate of the top-left corner of the crop region. */ y?: number; - /** The length of each side of the crop region. */ - size: number; + /** + * The length of each side of the crop region. + * + * @default 0 + */ + size?: number; + mimeType: string; + avatar: Buffer | ArrayBuffer | Uint8Array; } diff --git a/src/version2/parameters/createPlan.ts b/src/version2/parameters/createPlan.ts new file mode 100644 index 0000000000..bd032ad93d --- /dev/null +++ b/src/version2/parameters/createPlan.ts @@ -0,0 +1,6 @@ +import { CreatePlanRequest } from '../models'; + +export interface CreatePlan extends CreatePlanRequest { + /** Whether to accept group IDs instead of group names. Group names are deprecated. */ + useGroupId?: boolean; +} diff --git a/src/version2/parameters/createPlanOnlyTeam.ts b/src/version2/parameters/createPlanOnlyTeam.ts new file mode 100644 index 0000000000..29915aabce --- /dev/null +++ b/src/version2/parameters/createPlanOnlyTeam.ts @@ -0,0 +1,6 @@ +import { CreatePlanOnlyTeamRequest } from '../models'; + +export interface CreatePlanOnlyTeam extends CreatePlanOnlyTeamRequest { + /** The ID of the plan. */ + planId: number; +} diff --git a/src/version2/parameters/createPriorityScheme.ts b/src/version2/parameters/createPriorityScheme.ts new file mode 100644 index 0000000000..0b4d135d0e --- /dev/null +++ b/src/version2/parameters/createPriorityScheme.ts @@ -0,0 +1,3 @@ +import { CreatePrioritySchemeDetails } from '../models'; + +export interface CreatePriorityScheme extends CreatePrioritySchemeDetails {} diff --git a/src/version2/parameters/createProjectAvatar.ts b/src/version2/parameters/createProjectAvatar.ts index cbc3eebfe5..db9f3f45a8 100644 --- a/src/version2/parameters/createProjectAvatar.ts +++ b/src/version2/parameters/createProjectAvatar.ts @@ -1,11 +1,16 @@ export interface CreateProjectAvatar { /** The ID or (case-sensitive) key of the project. */ - projectIdOrKey: string; - avatar: any; + projectIdOrKey: string | number; /** The X coordinate of the top-left corner of the crop region. */ x?: number; /** The Y coordinate of the top-left corner of the crop region. */ y?: number; - /** The length of each side of the crop region. */ + /** + * The length of each side of the crop region. + * + * @default 0 + */ size?: number; + mimeType: string; + avatar: Buffer | ArrayBuffer | Uint8Array; } diff --git a/src/version2/parameters/createRelatedWork.ts b/src/version2/parameters/createRelatedWork.ts new file mode 100644 index 0000000000..e3c0616741 --- /dev/null +++ b/src/version2/parameters/createRelatedWork.ts @@ -0,0 +1,5 @@ +import { VersionRelatedWork } from '../models'; + +export interface CreateRelatedWork extends VersionRelatedWork { + id: string; +} diff --git a/src/version2/parameters/createResolution.ts b/src/version2/parameters/createResolution.ts index 05bb71a11a..b57c766069 100644 --- a/src/version2/parameters/createResolution.ts +++ b/src/version2/parameters/createResolution.ts @@ -1,5 +1,4 @@ import { CreateResolutionDetails } from '../models'; -export interface CreateResolution extends CreateResolutionDetails { - [key: string]: any; -} +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export type CreateResolution = CreateResolutionDetails & Record; diff --git a/src/version2/parameters/deleteActor.ts b/src/version2/parameters/deleteActor.ts index 0fe12c7572..d2afd2b430 100644 --- a/src/version2/parameters/deleteActor.ts +++ b/src/version2/parameters/deleteActor.ts @@ -1,6 +1,6 @@ export interface DeleteActor { /** The project ID or project key (case-sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** * The ID of the project role. Use [Get all project roles](#api-rest-api-2-role-get) to get a list of project role * IDs. diff --git a/src/version2/parameters/deleteComment.ts b/src/version2/parameters/deleteComment.ts index a06ad01e85..5050950ed1 100644 --- a/src/version2/parameters/deleteComment.ts +++ b/src/version2/parameters/deleteComment.ts @@ -3,4 +3,5 @@ export interface DeleteComment { issueIdOrKey: string; /** The ID of the comment. */ id: string; + parentId?: string; } diff --git a/src/version2/parameters/deletePlanOnlyTeam.ts b/src/version2/parameters/deletePlanOnlyTeam.ts new file mode 100644 index 0000000000..d87ea6bd4b --- /dev/null +++ b/src/version2/parameters/deletePlanOnlyTeam.ts @@ -0,0 +1,6 @@ +export interface DeletePlanOnlyTeam { + /** The ID of the plan. */ + planId: number; + /** The ID of the plan-only team. */ + planOnlyTeamId: number; +} diff --git a/src/version2/parameters/deletePriority.ts b/src/version2/parameters/deletePriority.ts new file mode 100644 index 0000000000..224cd5fc3d --- /dev/null +++ b/src/version2/parameters/deletePriority.ts @@ -0,0 +1,4 @@ +export interface DeletePriority { + /** The ID of the issue priority. */ + id: string; +} diff --git a/src/version2/parameters/deletePriorityScheme.ts b/src/version2/parameters/deletePriorityScheme.ts new file mode 100644 index 0000000000..3ac3ff970c --- /dev/null +++ b/src/version2/parameters/deletePriorityScheme.ts @@ -0,0 +1,4 @@ +export interface DeletePriorityScheme { + /** The priority scheme ID. */ + schemeId: number; +} diff --git a/src/version2/parameters/deleteProject.ts b/src/version2/parameters/deleteProject.ts index 618778ed43..41bb57bb4c 100644 --- a/src/version2/parameters/deleteProject.ts +++ b/src/version2/parameters/deleteProject.ts @@ -1,6 +1,6 @@ export interface DeleteProject { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** Whether this project is placed in the Jira recycle bin where it will be available for restoration. */ enableUndo?: boolean; } diff --git a/src/version2/parameters/deleteProjectAsynchronously.ts b/src/version2/parameters/deleteProjectAsynchronously.ts index 0c86e1e714..713570ef41 100644 --- a/src/version2/parameters/deleteProjectAsynchronously.ts +++ b/src/version2/parameters/deleteProjectAsynchronously.ts @@ -1,4 +1,4 @@ export interface DeleteProjectAsynchronously { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; } diff --git a/src/version2/parameters/deleteProjectAvatar.ts b/src/version2/parameters/deleteProjectAvatar.ts index db737d25af..78d2ed7859 100644 --- a/src/version2/parameters/deleteProjectAvatar.ts +++ b/src/version2/parameters/deleteProjectAvatar.ts @@ -1,6 +1,6 @@ export interface DeleteProjectAvatar { /** The project ID or (case-sensitive) key. */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** The ID of the avatar. */ id: number; } diff --git a/src/version2/parameters/deleteProjectProperty.ts b/src/version2/parameters/deleteProjectProperty.ts index 737828fb3c..981906bfc3 100644 --- a/src/version2/parameters/deleteProjectProperty.ts +++ b/src/version2/parameters/deleteProjectProperty.ts @@ -1,6 +1,6 @@ export interface DeleteProjectProperty { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** * The project property key. Use [Get project property keys](#api-rest-api-2-project-projectIdOrKey-properties-get) to * get a list of all project property keys. diff --git a/src/version2/parameters/deleteRelatedWork.ts b/src/version2/parameters/deleteRelatedWork.ts new file mode 100644 index 0000000000..2980e8f2e5 --- /dev/null +++ b/src/version2/parameters/deleteRelatedWork.ts @@ -0,0 +1,6 @@ +export interface DeleteRelatedWork { + /** The ID of the version that the target related work belongs to. */ + versionId: string; + /** The ID of the related work to delete. */ + relatedWorkId: string; +} diff --git a/src/version2/parameters/duplicatePlan.ts b/src/version2/parameters/duplicatePlan.ts new file mode 100644 index 0000000000..10a25d70f8 --- /dev/null +++ b/src/version2/parameters/duplicatePlan.ts @@ -0,0 +1,6 @@ +import { DuplicatePlanRequest } from '../models'; + +export interface DuplicatePlan extends DuplicatePlanRequest { + /** The ID of the plan. */ + planId: number; +} diff --git a/src/version2/parameters/editIssue.ts b/src/version2/parameters/editIssue.ts index 1be9cc59a8..f5ad5596df 100644 --- a/src/version2/parameters/editIssue.ts +++ b/src/version2/parameters/editIssue.ts @@ -23,7 +23,7 @@ export interface EditIssue extends IssueUpdateDetails { overrideEditableFlag?: boolean; /** * Whether the response should contain the issue with fields edited in this request. The returned issue will have the - * same format as in the [Get issue API](#api-rest-api-3-issue-issueidorkey-get). + * same format as in the [Get issue API](#api-rest-api-2-issue-issueidorkey-get). */ returnIssue?: boolean; /** The Get issue API expand parameter to use in the response if the `returnIssue` parameter is `true`. */ diff --git a/src/version2/parameters/evaluateJiraExpressionUsingEnhancedSearch.ts b/src/version2/parameters/evaluateJiraExpressionUsingEnhancedSearch.ts new file mode 100644 index 0000000000..299ff4d949 --- /dev/null +++ b/src/version2/parameters/evaluateJiraExpressionUsingEnhancedSearch.ts @@ -0,0 +1,13 @@ +import { JiraExpressionEvalUsingEnhancedSearchRequest } from '../models'; + +export interface EvaluateJiraExpressionUsingEnhancedSearch extends JiraExpressionEvalUsingEnhancedSearchRequest { + /** + * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#expansion) to include additional + * information in the response. This parameter accepts `meta.complexity` that returns information about the expression + * complexity. For example, the number of expensive operations used by the expression and how close the expression is + * to reaching the [complexity + * limit](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/#restrictions). Useful when designing + * and debugging your expressions. + */ + expand?: string; +} diff --git a/src/version2/parameters/findAssignableUsers.ts b/src/version2/parameters/findAssignableUsers.ts index 54f9e3a09f..78bb7397f6 100644 --- a/src/version2/parameters/findAssignableUsers.ts +++ b/src/version2/parameters/findAssignableUsers.ts @@ -20,6 +20,8 @@ export interface FindAssignableUsers { project?: string; /** The key of the issue. Required, unless `project` is specified. */ issueKey?: string; + /** The ID of the issue. Required, unless `issueKey` or `project` is specified. */ + issueId?: string; /** The index of the first item to return in a page of results (page offset). */ startAt?: number; /** diff --git a/src/version2/parameters/findComponentsForProjects.ts b/src/version2/parameters/findComponentsForProjects.ts new file mode 100644 index 0000000000..018417db88 --- /dev/null +++ b/src/version2/parameters/findComponentsForProjects.ts @@ -0,0 +1,19 @@ +export interface FindComponentsForProjects { + /** The project IDs and/or project keys (case sensitive). */ + projectIdsOrKeys?: string[]; + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** + * [Order](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#ordering) the results by a field: + * + * `description` Sorts by the component description. `name` Sorts by component name. + */ + orderBy?: 'description' | '-description' | '+description' | 'name' | '-name' | '+name' | string; + /** + * Filter the results using a literal string. Components with a matching `name` or `description` are returned (case + * insensitive). + */ + query?: string; +} diff --git a/src/version2/parameters/findUserKeysByQuery.ts b/src/version2/parameters/findUserKeysByQuery.ts index 14b12d1fd0..b6c92aef83 100644 --- a/src/version2/parameters/findUserKeysByQuery.ts +++ b/src/version2/parameters/findUserKeysByQuery.ts @@ -3,6 +3,12 @@ export interface FindUserKeysByQuery { query: string; /** The index of the first item to return in a page of results (page offset). */ startAt?: number; - /** The maximum number of items to return per page. */ + /** + * The maximum number of items to return per page. + * + * @deprecated Use `maxResult` instead. + */ maxResults?: number; + /** The maximum number of items to return per page. */ + maxResult?: number; } diff --git a/src/version2/parameters/getAllProjectAvatars.ts b/src/version2/parameters/getAllProjectAvatars.ts index ba78677a9f..ed47d2ffff 100644 --- a/src/version2/parameters/getAllProjectAvatars.ts +++ b/src/version2/parameters/getAllProjectAvatars.ts @@ -1,4 +1,4 @@ export interface GetAllProjectAvatars { /** The ID or (case-sensitive) key of the project. */ - projectIdOrKey: string; + projectIdOrKey: string | number; } diff --git a/src/version2/parameters/getAllStatuses.ts b/src/version2/parameters/getAllStatuses.ts index c82be96267..c10d765625 100644 --- a/src/version2/parameters/getAllStatuses.ts +++ b/src/version2/parameters/getAllStatuses.ts @@ -1,4 +1,4 @@ export interface GetAllStatuses { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; } diff --git a/src/version2/parameters/getAllUserDataClassificationLevels.ts b/src/version2/parameters/getAllUserDataClassificationLevels.ts new file mode 100644 index 0000000000..eb477fbdde --- /dev/null +++ b/src/version2/parameters/getAllUserDataClassificationLevels.ts @@ -0,0 +1,6 @@ +export interface GetAllUserDataClassificationLevels { + /** Optional set of statuses to filter by. */ + status?: ('PUBLISHED' | 'ARCHIVED' | 'DRAFT' | string)[]; + /** Ordering of the results by a given field. If not provided, values will not be sorted. */ + orderBy?: 'rank' | '-rank' | '+rank' | string; +} diff --git a/src/version2/parameters/getAtlassianTeam.ts b/src/version2/parameters/getAtlassianTeam.ts new file mode 100644 index 0000000000..b3bc42a2b5 --- /dev/null +++ b/src/version2/parameters/getAtlassianTeam.ts @@ -0,0 +1,6 @@ +export interface GetAtlassianTeam { + /** The ID of the plan. */ + planId: number; + /** The ID of the Atlassian team. */ + atlassianTeamId: string; +} diff --git a/src/version2/parameters/getAvailablePrioritiesByPriorityScheme.ts b/src/version2/parameters/getAvailablePrioritiesByPriorityScheme.ts new file mode 100644 index 0000000000..da7ba318f6 --- /dev/null +++ b/src/version2/parameters/getAvailablePrioritiesByPriorityScheme.ts @@ -0,0 +1,12 @@ +export interface GetAvailablePrioritiesByPriorityScheme { + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** The string to query priorities on by name. */ + query?: string; + /** The priority scheme ID. */ + schemeId: string; + /** A list of priority IDs to exclude from the results. */ + exclude?: string[]; +} diff --git a/src/version2/parameters/getAvatars.ts b/src/version2/parameters/getAvatars.ts index 94f9acecf2..aa4d2b86be 100644 --- a/src/version2/parameters/getAvatars.ts +++ b/src/version2/parameters/getAvatars.ts @@ -2,5 +2,5 @@ export interface GetAvatars { /** The avatar type. */ type: 'project' | 'issuetype' | string; /** The ID of the item the avatar is associated with. */ - entityId: string; + entityId: number | string; } diff --git a/src/version2/parameters/getBulkChangelogs.ts b/src/version2/parameters/getBulkChangelogs.ts new file mode 100644 index 0000000000..fefc8eb77f --- /dev/null +++ b/src/version2/parameters/getBulkChangelogs.ts @@ -0,0 +1,3 @@ +import { BulkChangelogRequest } from '../models'; + +export interface GetBulkChangelogs extends BulkChangelogRequest {} diff --git a/src/version2/parameters/getBulkScreenTabs.ts b/src/version2/parameters/getBulkScreenTabs.ts new file mode 100644 index 0000000000..6f8227f85a --- /dev/null +++ b/src/version2/parameters/getBulkScreenTabs.ts @@ -0,0 +1,16 @@ +export interface GetBulkScreenTabs { + /** + * The list of screen IDs. To include multiple screen IDs, provide an ampersand-separated list. For example, + * `screenId=10000&screenId=10001`. + */ + screenId?: number[]; + /** + * The list of tab IDs. To include multiple tab IDs, provide an ampersand-separated list. For example, + * `tabId=10000&tabId=10001`. + */ + tabId?: number[]; + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. The maximum number is 100, */ + maxResult?: number; +} diff --git a/src/version2/parameters/getCreateIssueMetaIssueTypeId.ts b/src/version2/parameters/getCreateIssueMetaIssueTypeId.ts new file mode 100644 index 0000000000..6195fc1f49 --- /dev/null +++ b/src/version2/parameters/getCreateIssueMetaIssueTypeId.ts @@ -0,0 +1,10 @@ +export interface GetCreateIssueMetaIssueTypeId { + /** The ID or key of the project. */ + projectIdOrKey: string; + /** The issuetype ID. */ + issueTypeId: string; + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; +} diff --git a/src/version2/parameters/getCreateIssueMetaIssueTypes.ts b/src/version2/parameters/getCreateIssueMetaIssueTypes.ts new file mode 100644 index 0000000000..dc20e141b5 --- /dev/null +++ b/src/version2/parameters/getCreateIssueMetaIssueTypes.ts @@ -0,0 +1,8 @@ +export interface GetCreateIssueMetaIssueTypes { + /** The ID or key of the project. */ + projectIdOrKey: string; + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; +} diff --git a/src/version2/parameters/getCustomFieldsConfigurations.ts b/src/version2/parameters/getCustomFieldsConfigurations.ts new file mode 100644 index 0000000000..7039e4b8ba --- /dev/null +++ b/src/version2/parameters/getCustomFieldsConfigurations.ts @@ -0,0 +1,34 @@ +import { ConfigurationsListParameters } from '../models'; + +export interface GetCustomFieldsConfigurations extends ConfigurationsListParameters { + /** + * The list of configuration IDs. To include multiple configurations, separate IDs with an ampersand: + * `id=10000&id=10001`. Can't be provided with `fieldContextId`, `issueId`, `projectKeyOrId`, or `issueTypeId`. + */ + id?: number[]; + /** + * The list of field context IDs. To include multiple field contexts, separate IDs with an ampersand: + * `fieldContextId=10000&fieldContextId=10001`. Can't be provided with `id`, `issueId`, `projectKeyOrId`, or + * `issueTypeId`. + */ + fieldContextId?: number[]; + /** + * The ID of the issue to filter results by. If the issue doesn't exist, an empty list is returned. Can't be provided + * with `projectKeyOrId`, or `issueTypeId`. + */ + issueId?: number; + /** + * The ID or key of the project to filter results by. Must be provided with `issueTypeId`. Can't be provided with + * `issueId`. + */ + projectKeyOrId?: string; + /** + * The ID of the issue type to filter results by. Must be provided with `projectKeyOrId`. Can't be provided with + * `issueId`. + */ + issueTypeId?: string; + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; +} diff --git a/src/version2/parameters/getDashboardsPaginated.ts b/src/version2/parameters/getDashboardsPaginated.ts index 9e3aaa7854..513a57ec80 100644 --- a/src/version2/parameters/getDashboardsPaginated.ts +++ b/src/version2/parameters/getDashboardsPaginated.ts @@ -88,7 +88,7 @@ export interface GetDashboardsPaginated { | 'sharePermissions' | 'editPermissions' | 'isWritable' - )[] + )[] | string | string[]; } diff --git a/src/version2/parameters/getDefaultProjectClassification.ts b/src/version2/parameters/getDefaultProjectClassification.ts new file mode 100644 index 0000000000..cf8683da7a --- /dev/null +++ b/src/version2/parameters/getDefaultProjectClassification.ts @@ -0,0 +1,4 @@ +export interface GetDefaultProjectClassification { + /** The project ID or project key (case-sensitive). */ + projectIdOrKey: string; +} diff --git a/src/version2/parameters/getFeaturesForProject.ts b/src/version2/parameters/getFeaturesForProject.ts index 81902eb044..0e1567cd84 100644 --- a/src/version2/parameters/getFeaturesForProject.ts +++ b/src/version2/parameters/getFeaturesForProject.ts @@ -1,4 +1,4 @@ export interface GetFeaturesForProject { /** The ID or (case-sensitive) key of the project. */ - projectIdOrKey: string; + projectIdOrKey: string | number; } diff --git a/src/version2/parameters/getFieldConfigurationSchemeProjectMapping.ts b/src/version2/parameters/getFieldConfigurationSchemeProjectMapping.ts index fc16570b25..2bbc23e7ab 100644 --- a/src/version2/parameters/getFieldConfigurationSchemeProjectMapping.ts +++ b/src/version2/parameters/getFieldConfigurationSchemeProjectMapping.ts @@ -7,5 +7,5 @@ export interface GetFieldConfigurationSchemeProjectMapping { * The list of project IDs. To include multiple projects, separate IDs with ampersand: * `projectId=10000&projectId=10001`. */ - projectId: number[]; + projectId: (string | number)[]; } diff --git a/src/version2/parameters/getFiltersPaginated.ts b/src/version2/parameters/getFiltersPaginated.ts index 8dbaac430c..32808b1488 100644 --- a/src/version2/parameters/getFiltersPaginated.ts +++ b/src/version2/parameters/getFiltersPaginated.ts @@ -103,7 +103,7 @@ export interface GetFiltersPaginated { | 'isWritable' | 'subscriptions' | 'viewUrl' - )[] + )[] | string | string[]; @@ -112,4 +112,10 @@ export interface GetFiltersPaginated { * Available to users with _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ overrideSharePermissions?: boolean; + /** + * When `true` this will perform a case-insensitive substring match for the provided `filterName`. When `false` the + * filter name will be searched using [full text search + * syntax](https://support.atlassian.com/jira-software-cloud/docs/search-for-issues-using-the-text-field/). + */ + isSubstringMatch?: boolean; } diff --git a/src/version2/parameters/getHierarchy.ts b/src/version2/parameters/getHierarchy.ts index 2ea2e76b1e..ee2ae8c627 100644 --- a/src/version2/parameters/getHierarchy.ts +++ b/src/version2/parameters/getHierarchy.ts @@ -1,4 +1,4 @@ export interface GetHierarchy { /** The ID of the project. */ - projectId: number; + projectId: string | number; } diff --git a/src/version2/parameters/getIssue.ts b/src/version2/parameters/getIssue.ts index 683b429396..5fb6802390 100644 --- a/src/version2/parameters/getIssue.ts +++ b/src/version2/parameters/getIssue.ts @@ -67,4 +67,10 @@ export interface GetIssue { * field. */ updateHistory?: boolean; + /** + * Whether to fail the request quickly in case of an error while loading fields for an issue. For `failFast=true`, if + * one field fails, the entire operation fails. For `failFast=false`, the operation will continue even if a field + * fails. It will return a valid response, but without values for the failed field(s). + */ + failFast?: boolean; } diff --git a/src/version2/parameters/getIssueLimitReport.ts b/src/version2/parameters/getIssueLimitReport.ts new file mode 100644 index 0000000000..288f038e99 --- /dev/null +++ b/src/version2/parameters/getIssueLimitReport.ts @@ -0,0 +1,10 @@ +import { IssueLimitReportRequest } from '../models'; + +export interface GetIssueLimitReport extends IssueLimitReportRequest { + /** + * Return issue keys instead of issue ids in the response. + * + * Usage: Add `?isReturningKeys=true` to the end of the path to request issue keys. + */ + isReturningKeys?: boolean; +} diff --git a/src/version2/parameters/getIssueTypeSchemeForProjects.ts b/src/version2/parameters/getIssueTypeSchemeForProjects.ts index 80a6339149..aaf455ca82 100644 --- a/src/version2/parameters/getIssueTypeSchemeForProjects.ts +++ b/src/version2/parameters/getIssueTypeSchemeForProjects.ts @@ -7,5 +7,5 @@ export interface GetIssueTypeSchemeForProjects { * The list of project IDs. To include multiple project IDs, provide an ampersand-separated list. For example, * `projectId=10000&projectId=10001`. */ - projectId: number[]; + projectId: (string | number)[]; } diff --git a/src/version2/parameters/getIssueTypeScreenSchemeProjectAssociations.ts b/src/version2/parameters/getIssueTypeScreenSchemeProjectAssociations.ts index 401790f9d7..82ac3fabdc 100644 --- a/src/version2/parameters/getIssueTypeScreenSchemeProjectAssociations.ts +++ b/src/version2/parameters/getIssueTypeScreenSchemeProjectAssociations.ts @@ -7,5 +7,5 @@ export interface GetIssueTypeScreenSchemeProjectAssociations { * The list of project IDs. To include multiple projects, separate IDs with ampersand: * `projectId=10000&projectId=10001`. */ - projectId: number[]; + projectId: (string | number)[]; } diff --git a/src/version2/parameters/getIssueTypesForProject.ts b/src/version2/parameters/getIssueTypesForProject.ts index 11d1f2e25a..b06312da99 100644 --- a/src/version2/parameters/getIssueTypesForProject.ts +++ b/src/version2/parameters/getIssueTypesForProject.ts @@ -1,6 +1,6 @@ export interface GetIssueTypesForProject { /** The ID of the project. */ - projectId: number; + projectId: string | number; /** * The level of the issue type to filter by. Use: * diff --git a/src/version2/parameters/getNotificationSchemeToProjectMappings.ts b/src/version2/parameters/getNotificationSchemeToProjectMappings.ts index 34cfec0e7b..bfb504e6e2 100644 --- a/src/version2/parameters/getNotificationSchemeToProjectMappings.ts +++ b/src/version2/parameters/getNotificationSchemeToProjectMappings.ts @@ -1,8 +1,8 @@ export interface GetNotificationSchemeToProjectMappings { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** The list of notifications scheme IDs to be filtered out */ notificationSchemeId?: string[]; /** The list of project IDs to be filtered out */ diff --git a/src/version2/parameters/getPlan.ts b/src/version2/parameters/getPlan.ts new file mode 100644 index 0000000000..9ed1b0df18 --- /dev/null +++ b/src/version2/parameters/getPlan.ts @@ -0,0 +1,6 @@ +export interface GetPlan { + /** The ID of the plan. */ + planId: number; + /** Whether to return group IDs instead of group names. Group names are deprecated. */ + useGroupId?: boolean; +} diff --git a/src/version2/parameters/getPlanOnlyTeam.ts b/src/version2/parameters/getPlanOnlyTeam.ts new file mode 100644 index 0000000000..f48b73a426 --- /dev/null +++ b/src/version2/parameters/getPlanOnlyTeam.ts @@ -0,0 +1,6 @@ +export interface GetPlanOnlyTeam { + /** The ID of the plan. */ + planId: number; + /** The ID of the plan-only team. */ + planOnlyTeamId: number; +} diff --git a/src/version2/parameters/getPlans.ts b/src/version2/parameters/getPlans.ts new file mode 100644 index 0000000000..2633d4c9e8 --- /dev/null +++ b/src/version2/parameters/getPlans.ts @@ -0,0 +1,10 @@ +export interface GetPlans { + /** Whether to include trashed plans in the results. */ + includeTrashed?: boolean; + /** Whether to include archived plans in the results. */ + includeArchived?: boolean; + /** The cursor to start from. If not provided, the first page will be returned. */ + cursor?: string; + /** The maximum number of plans to return per page. The maximum value is 50. The default value is 50. */ + maxResults?: number; +} diff --git a/src/version2/parameters/getPolicies.ts b/src/version2/parameters/getPolicies.ts new file mode 100644 index 0000000000..afba75fdec --- /dev/null +++ b/src/version2/parameters/getPolicies.ts @@ -0,0 +1,4 @@ +export interface GetPolicies { + /** A list of project identifiers. This parameter accepts a comma-separated list. */ + ids?: string; +} diff --git a/src/version2/parameters/getPrecomputations.ts b/src/version2/parameters/getPrecomputations.ts index 69e5f90059..bc668412fe 100644 --- a/src/version2/parameters/getPrecomputations.ts +++ b/src/version2/parameters/getPrecomputations.ts @@ -11,12 +11,13 @@ export interface GetPrecomputations { /** The maximum number of items to return per page. */ maxResults?: number; /** - * [Order](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#ordering) the results by a field: + * @deprecated [Order](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#ordering) the results by a + * field: * - * - `functionKey` Sorts by the functionKey. - * - `used` Sorts by the used timestamp. - * - `created` Sorts by the created timestamp. - * - `updated` Sorts by the updated timestamp. + * - `functionKey` Sorts by the functionKey. + * - `used` Sorts by the used timestamp. + * - `created` Sorts by the created timestamp. + * - `updated` Sorts by the updated timestamp. */ filter?: string; orderBy?: diff --git a/src/version2/parameters/getPrecomputationsByID.ts b/src/version2/parameters/getPrecomputationsByID.ts new file mode 100644 index 0000000000..e0edd4b2df --- /dev/null +++ b/src/version2/parameters/getPrecomputationsByID.ts @@ -0,0 +1,11 @@ +import { JqlFunctionPrecomputationGetByIdRequest } from '../models'; + +export interface GetPrecomputationsByID extends JqlFunctionPrecomputationGetByIdRequest { + /** + * [Order](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#ordering) the results by a field: + * + * `functionKey` Sorts by the functionKey. `used` Sorts by the used timestamp. `created` Sorts by the created + * timestamp. `updated` Sorts by the updated timestamp. + */ + orderBy?: string; +} diff --git a/src/version2/parameters/getPrioritiesByPriorityScheme.ts b/src/version2/parameters/getPrioritiesByPriorityScheme.ts new file mode 100644 index 0000000000..6cd7fcedac --- /dev/null +++ b/src/version2/parameters/getPrioritiesByPriorityScheme.ts @@ -0,0 +1,8 @@ +export interface GetPrioritiesByPriorityScheme { + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** The priority scheme ID. */ + schemeId: string; +} diff --git a/src/version2/parameters/getPrioritySchemes.ts b/src/version2/parameters/getPrioritySchemes.ts new file mode 100644 index 0000000000..b5917ef600 --- /dev/null +++ b/src/version2/parameters/getPrioritySchemes.ts @@ -0,0 +1,28 @@ +export interface GetPrioritySchemes { + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** + * A set of priority IDs to filter by. To include multiple IDs, provide an ampersand-separated list. For example, + * `priorityId=10000&priorityId=10001`. + */ + priorityId?: number[]; + /** + * A set of priority scheme IDs. To include multiple IDs, provide an ampersand-separated list. For example, + * `schemeId=10000&schemeId=10001`. + */ + schemeId?: number[]; + /** The name of scheme to search for. */ + schemeName?: string; + /** Whether only the default priority is returned. */ + onlyDefault?: boolean; + /** The ordering to return the priority schemes by. */ + orderBy?: 'name' | '+name' | '-name' | string; + /** + * A comma separated list of additional information to return. "priorities" will return priorities associated with the + * priority scheme. "projects" will return projects associated with the priority scheme. + * `expand=priorities,projects`. + */ + expand?: string; +} diff --git a/src/version2/parameters/getProjectComponents.ts b/src/version2/parameters/getProjectComponents.ts index 4bdde93bb0..5c47fd94d6 100644 --- a/src/version2/parameters/getProjectComponents.ts +++ b/src/version2/parameters/getProjectComponents.ts @@ -1,4 +1,12 @@ export interface GetProjectComponents { /** The project ID or project key (case sensitive). */ projectIdOrKey: string; + /** + * The source of the components to return. Can be `jira` (default), `compass` or `auto`. When `auto` is specified, the + * API will return connected Compass components if the project is opted into Compass, otherwise it will return Jira + * components. Defaults to `jira`. + * + * @default jira + */ + componentSource?: 'jira' | 'compass' | 'auto' | string; } diff --git a/src/version2/parameters/getProjectComponentsPaginated.ts b/src/version2/parameters/getProjectComponentsPaginated.ts index 5625e9ee39..f861052bd0 100644 --- a/src/version2/parameters/getProjectComponentsPaginated.ts +++ b/src/version2/parameters/getProjectComponentsPaginated.ts @@ -1,6 +1,6 @@ export interface GetProjectComponentsPaginated { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** The index of the first item to return in a page of results (page offset). */ startAt?: number; /** The maximum number of items to return per page. */ @@ -32,4 +32,12 @@ export interface GetProjectComponentsPaginated { * insensitive). */ query?: string; + /** + * The source of the components to return. Can be `jira` (default), `compass` or `auto`. When `auto` is specified, the + * API will return connected Compass components if the project is opted into Compass, otherwise it will return Jira + * components. Defaults to `jira`. + * + * @default jira + */ + componentSource?: 'jira' | 'compass' | 'auto' | string; } diff --git a/src/version2/parameters/getProjectEmail.ts b/src/version2/parameters/getProjectEmail.ts index e12df4811b..5a8b7e0ab5 100644 --- a/src/version2/parameters/getProjectEmail.ts +++ b/src/version2/parameters/getProjectEmail.ts @@ -1,4 +1,4 @@ export interface GetProjectEmail { /** The project ID. */ - projectId: number; + projectId: string | number; } diff --git a/src/version2/parameters/getProjectIssueTypeUsagesForStatus.ts b/src/version2/parameters/getProjectIssueTypeUsagesForStatus.ts new file mode 100644 index 0000000000..80deab4e9d --- /dev/null +++ b/src/version2/parameters/getProjectIssueTypeUsagesForStatus.ts @@ -0,0 +1,10 @@ +export interface GetProjectIssueTypeUsagesForStatus { + /** The statusId to fetch issue type usages for */ + statusId: string; + /** The projectId to fetch issue type usages for */ + projectId: string; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version2/parameters/getProjectProperty.ts b/src/version2/parameters/getProjectProperty.ts index 6391195772..bbccb2a75e 100644 --- a/src/version2/parameters/getProjectProperty.ts +++ b/src/version2/parameters/getProjectProperty.ts @@ -1,6 +1,6 @@ export interface GetProjectProperty { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** * The project property key. Use [Get project property keys](#api-rest-api-2-project-projectIdOrKey-properties-get) to * get a list of all project property keys. diff --git a/src/version2/parameters/getProjectPropertyKeys.ts b/src/version2/parameters/getProjectPropertyKeys.ts index 0774dabd91..ed63fb62bb 100644 --- a/src/version2/parameters/getProjectPropertyKeys.ts +++ b/src/version2/parameters/getProjectPropertyKeys.ts @@ -1,4 +1,4 @@ export interface GetProjectPropertyKeys { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; } diff --git a/src/version2/parameters/getProjectRole.ts b/src/version2/parameters/getProjectRole.ts index 4744a48b91..9e20884faf 100644 --- a/src/version2/parameters/getProjectRole.ts +++ b/src/version2/parameters/getProjectRole.ts @@ -1,6 +1,6 @@ export interface GetProjectRole { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** * The ID of the project role. Use [Get all project roles](#api-rest-api-2-role-get) to get a list of project role * IDs. diff --git a/src/version2/parameters/getProjectRoleDetails.ts b/src/version2/parameters/getProjectRoleDetails.ts index 4ec30420fc..4330c48a78 100644 --- a/src/version2/parameters/getProjectRoleDetails.ts +++ b/src/version2/parameters/getProjectRoleDetails.ts @@ -1,6 +1,6 @@ export interface GetProjectRoleDetails { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** Whether the roles should be filtered to include only those the user is assigned to. */ currentMember?: boolean; excludeConnectAddons?: boolean; diff --git a/src/version2/parameters/getProjectRoles.ts b/src/version2/parameters/getProjectRoles.ts index 6de9e0b486..3f5792c849 100644 --- a/src/version2/parameters/getProjectRoles.ts +++ b/src/version2/parameters/getProjectRoles.ts @@ -1,4 +1,4 @@ export interface GetProjectRoles { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; } diff --git a/src/version2/parameters/getProjectUsagesForStatus.ts b/src/version2/parameters/getProjectUsagesForStatus.ts new file mode 100644 index 0000000000..0e8913c901 --- /dev/null +++ b/src/version2/parameters/getProjectUsagesForStatus.ts @@ -0,0 +1,8 @@ +export interface GetProjectUsagesForStatus { + /** The statusId to fetch project usages for */ + statusId: string; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version2/parameters/getProjectUsagesForWorkflow.ts b/src/version2/parameters/getProjectUsagesForWorkflow.ts new file mode 100644 index 0000000000..e70544f1f4 --- /dev/null +++ b/src/version2/parameters/getProjectUsagesForWorkflow.ts @@ -0,0 +1,8 @@ +export interface GetProjectUsagesForWorkflow { + /** The workflow ID */ + workflowId: string; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version2/parameters/getProjectUsagesForWorkflowScheme.ts b/src/version2/parameters/getProjectUsagesForWorkflowScheme.ts new file mode 100644 index 0000000000..0266959608 --- /dev/null +++ b/src/version2/parameters/getProjectUsagesForWorkflowScheme.ts @@ -0,0 +1,8 @@ +export interface GetProjectUsagesForWorkflowScheme { + /** The workflow scheme ID */ + workflowSchemeId: string; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version2/parameters/getProjectVersions.ts b/src/version2/parameters/getProjectVersions.ts index e717caade7..27c96b0c7c 100644 --- a/src/version2/parameters/getProjectVersions.ts +++ b/src/version2/parameters/getProjectVersions.ts @@ -1,6 +1,6 @@ export interface GetProjectVersions { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#expansion) to include additional * information in the response. This parameter accepts `operations`, which returns actions that can be performed on diff --git a/src/version2/parameters/getProjectVersionsPaginated.ts b/src/version2/parameters/getProjectVersionsPaginated.ts index ed3176eda9..46df6f405d 100644 --- a/src/version2/parameters/getProjectVersionsPaginated.ts +++ b/src/version2/parameters/getProjectVersionsPaginated.ts @@ -1,6 +1,6 @@ export interface GetProjectVersionsPaginated { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** The index of the first item to return in a page of results (page offset). */ startAt?: number; /** The maximum number of items to return per page. */ diff --git a/src/version2/parameters/getProjectsByPriorityScheme.ts b/src/version2/parameters/getProjectsByPriorityScheme.ts new file mode 100644 index 0000000000..607505f6d4 --- /dev/null +++ b/src/version2/parameters/getProjectsByPriorityScheme.ts @@ -0,0 +1,12 @@ +export interface GetProjectsByPriorityScheme { + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** The project IDs to filter by. For example, `projectId=10000&projectId=10001`. */ + projectId?: number[]; + /** The priority scheme ID. */ + schemeId: string; + /** The string to query projects on by name. */ + query?: string; +} diff --git a/src/version2/parameters/getRelatedWork.ts b/src/version2/parameters/getRelatedWork.ts new file mode 100644 index 0000000000..b6388182d0 --- /dev/null +++ b/src/version2/parameters/getRelatedWork.ts @@ -0,0 +1,4 @@ +export interface GetRelatedWork { + /** The ID of the version. */ + id: string; +} diff --git a/src/version2/parameters/getResolution.ts b/src/version2/parameters/getResolution.ts new file mode 100644 index 0000000000..13eba23264 --- /dev/null +++ b/src/version2/parameters/getResolution.ts @@ -0,0 +1,4 @@ +export interface GetResolution { + /** The ID of the issue resolution value. */ + id: string; +} diff --git a/src/version2/parameters/getSecurityLevelMembers.ts b/src/version2/parameters/getSecurityLevelMembers.ts index 1c16a7eaad..ceb2e31ef6 100644 --- a/src/version2/parameters/getSecurityLevelMembers.ts +++ b/src/version2/parameters/getSecurityLevelMembers.ts @@ -1,8 +1,8 @@ export interface GetSecurityLevelMembers { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** * The list of issue security level member IDs. To include multiple issue security level members separate IDs with an * ampersand: `id=10000&id=10001`. diff --git a/src/version2/parameters/getSecurityLevels.ts b/src/version2/parameters/getSecurityLevels.ts index 7b2fccad02..cd8503604b 100644 --- a/src/version2/parameters/getSecurityLevels.ts +++ b/src/version2/parameters/getSecurityLevels.ts @@ -1,8 +1,8 @@ export interface GetSecurityLevels { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** * The list of issue security scheme level IDs. To include multiple issue security levels, separate IDs with an * ampersand: `id=10000&id=10001`. diff --git a/src/version2/parameters/getStatusesById.ts b/src/version2/parameters/getStatusesById.ts index 2e1fd4d629..6fcf7cea09 100644 --- a/src/version2/parameters/getStatusesById.ts +++ b/src/version2/parameters/getStatusesById.ts @@ -1,10 +1,13 @@ export interface GetStatusesById { /** - * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#expansion) to include additional - * information in the response. This parameter accepts a comma-separated list. Expand options include: + * @deprecated See the [deprecation + * notice](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-2298) for details. * - * - `usages` Returns the project and issue types that use the status in their workflow. - * - `workflowUsages` Returns the workflows that use the status. + * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#expansion) to include additional + * information in the response. This parameter accepts a comma-separated list. Expand options include: + * + * - `usages` Returns the project and issue types that use the status in their workflow. + * - `workflowUsages` Returns the workflows that use the status. */ expand?: 'usages' | 'workflowUsages' | ('usages' | 'workflowUsages')[] | string | string[]; /** diff --git a/src/version2/parameters/getTeams.ts b/src/version2/parameters/getTeams.ts new file mode 100644 index 0000000000..289f646714 --- /dev/null +++ b/src/version2/parameters/getTeams.ts @@ -0,0 +1,8 @@ +export interface GetTeams { + /** The ID of the plan. */ + planId: number; + /** The cursor to start from. If not provided, the first page will be returned. */ + cursor?: string; + /** The maximum number of plan teams to return per page. The maximum value is 50. The default value is 50. */ + maxResults?: number; +} diff --git a/src/version2/parameters/getWorkflowProjectIssueTypeUsages.ts b/src/version2/parameters/getWorkflowProjectIssueTypeUsages.ts new file mode 100644 index 0000000000..42ce81e475 --- /dev/null +++ b/src/version2/parameters/getWorkflowProjectIssueTypeUsages.ts @@ -0,0 +1,10 @@ +export interface GetWorkflowProjectIssueTypeUsages { + /** The workflow ID */ + workflowId: string; + /** The project ID */ + projectId: number; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version2/parameters/getWorkflowSchemeProjectAssociations.ts b/src/version2/parameters/getWorkflowSchemeProjectAssociations.ts index 5aa19373fd..e39ce06f95 100644 --- a/src/version2/parameters/getWorkflowSchemeProjectAssociations.ts +++ b/src/version2/parameters/getWorkflowSchemeProjectAssociations.ts @@ -3,5 +3,5 @@ export interface GetWorkflowSchemeProjectAssociations { * 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: number[]; + projectId: (string | number)[]; } diff --git a/src/version2/parameters/getWorkflowSchemeUsagesForWorkflow.ts b/src/version2/parameters/getWorkflowSchemeUsagesForWorkflow.ts new file mode 100644 index 0000000000..dae488d332 --- /dev/null +++ b/src/version2/parameters/getWorkflowSchemeUsagesForWorkflow.ts @@ -0,0 +1,8 @@ +export interface GetWorkflowSchemeUsagesForWorkflow { + /** The workflow ID */ + workflowId: string; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version2/parameters/getWorkflowUsagesForStatus.ts b/src/version2/parameters/getWorkflowUsagesForStatus.ts new file mode 100644 index 0000000000..cdfb21d971 --- /dev/null +++ b/src/version2/parameters/getWorkflowUsagesForStatus.ts @@ -0,0 +1,8 @@ +export interface GetWorkflowUsagesForStatus { + /** The statusId to fetch workflow usages for */ + statusId: string; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version2/parameters/getWorkflowsPaginated.ts b/src/version2/parameters/getWorkflowsPaginated.ts index da3e1a2cfa..e11a018a58 100644 --- a/src/version2/parameters/getWorkflowsPaginated.ts +++ b/src/version2/parameters/getWorkflowsPaginated.ts @@ -49,7 +49,7 @@ export interface GetWorkflowsPaginated { | 'projects' | 'hasDraftWorkflow' | 'operations' - )[] + )[] | string | string[]; /** String used to perform a case-insensitive partial match with workflow name. */ diff --git a/src/version2/parameters/index.ts b/src/version2/parameters/index.ts index a008d2208b..44d7d693f6 100644 --- a/src/version2/parameters/index.ts +++ b/src/version2/parameters/index.ts @@ -1,10 +1,12 @@ export * from './addActorUsers'; +export * from './addAtlassianTeam'; export * from './addAttachment'; export * from './addComment'; export * from './addFieldToDefaultScreen'; export * from './addGadget'; export * from './addIssueTypesToContext'; export * from './addIssueTypesToIssueTypeScheme'; +export * from './addNotifications'; export * from './addProjectRoleActorsToRole'; export * from './addScreenTab'; export * from './addScreenTabField'; @@ -19,6 +21,7 @@ export * from './analyseExpression'; export * from './appendMappingsForIssueTypeScreenScheme'; export * from './archiveIssues'; export * from './archiveIssuesAsync'; +export * from './archivePlan'; export * from './archiveProject'; export * from './assignFieldConfigurationSchemeToProject'; export * from './assignIssue'; @@ -29,16 +32,20 @@ export * from './assignProjectsToCustomFieldContext'; export * from './assignSchemeToProject'; export * from './associateSchemesToProjects'; export * from './bulkDeleteIssueProperty'; +export * from './bulkDeleteWorklogs'; export * from './bulkEditDashboards'; +export * from './bulkFetchIssues'; export * from './bulkGetGroups'; export * from './bulkGetUsers'; export * from './bulkGetUsersMigration'; +export * from './bulkMoveWorklogs'; export * from './bulkSetIssuePropertiesByIssue'; export * from './bulkSetIssueProperty'; export * from './bulkSetIssuesProperties'; export * from './cancelTask'; export * from './changeFilterOwner'; export * from './copyDashboard'; +export * from './countIssues'; export * from './createComponent'; export * from './createCustomField'; export * from './createCustomFieldContext'; @@ -61,11 +68,15 @@ export * from './createNotificationScheme'; export * from './createOrUpdateRemoteIssueLink'; export * from './createPermissionGrant'; export * from './createPermissionScheme'; +export * from './createPlan'; +export * from './createPlanOnlyTeam'; export * from './createPriority'; +export * from './createPriorityScheme'; export * from './createProject'; export * from './createProjectAvatar'; export * from './createProjectCategory'; export * from './createProjectRole'; +export * from './createRelatedWork'; export * from './createResolution'; export * from './createScreen'; export * from './createScreenScheme'; @@ -111,12 +122,16 @@ export * from './deleteIssueTypeScreenScheme'; export * from './deleteNotificationScheme'; export * from './deletePermissionScheme'; export * from './deletePermissionSchemeEntity'; +export * from './deletePlanOnlyTeam'; +export * from './deletePriority'; +export * from './deletePriorityScheme'; export * from './deleteProject'; export * from './deleteProjectAsynchronously'; export * from './deleteProjectAvatar'; export * from './deleteProjectProperty'; export * from './deleteProjectRole'; export * from './deleteProjectRoleActorsFromRole'; +export * from './deleteRelatedWork'; export * from './deleteRemoteIssueLinkByGlobalId'; export * from './deleteRemoteIssueLinkById'; export * from './deleteResolution'; @@ -139,13 +154,16 @@ export * from './deleteWorkflowTransitionRuleConfigurations'; export * from './deleteWorklog'; export * from './deleteWorklogProperty'; export * from './doTransition'; +export * from './duplicatePlan'; export * from './editIssue'; export * from './evaluateJiraExpression'; +export * from './evaluateJiraExpressionUsingEnhancedSearch'; export * from './expandAttachmentForHumans'; export * from './expandAttachmentForMachines'; export * from './exportArchivedIssues'; export * from './findAssignableUsers'; export * from './findBulkAssignableUsers'; +export * from './findComponentsForProjects'; export * from './findGroups'; export * from './findUserKeysByQuery'; export * from './findUsers'; @@ -171,6 +189,7 @@ export * from './getAllScreenTabFields'; export * from './getAllScreenTabs'; export * from './getAllStatuses'; export * from './getAllSystemAvatars'; +export * from './getAllUserDataClassificationLevels'; export * from './getAllUsers'; export * from './getAllUsersDefault'; export * from './getAllWorkflowSchemes'; @@ -178,17 +197,21 @@ export * from './getAlternativeIssueTypes'; export * from './getApplicationProperty'; export * from './getApplicationRole'; export * from './getAssignedPermissionScheme'; +export * from './getAtlassianTeam'; export * from './getAttachment'; export * from './getAttachmentContent'; export * from './getAttachmentThumbnail'; export * from './getAuditRecords'; export * from './getAutoCompletePost'; +export * from './getAvailablePrioritiesByPriorityScheme'; export * from './getAvailableScreenFields'; export * from './getAvatarImageByID'; export * from './getAvatarImageByOwner'; export * from './getAvatarImageByType'; export * from './getAvatars'; +export * from './getBulkChangelogs'; export * from './getBulkPermissions'; +export * from './getBulkScreenTabs'; export * from './getChangeLogs'; export * from './getChangeLogsByIds'; export * from './getColumns'; @@ -201,14 +224,18 @@ export * from './getComponent'; export * from './getComponentRelatedIssues'; export * from './getContextsForField'; export * from './getCreateIssueMeta'; +export * from './getCreateIssueMetaIssueTypeId'; +export * from './getCreateIssueMetaIssueTypes'; export * from './getCurrentUser'; export * from './getCustomFieldConfiguration'; export * from './getCustomFieldContextsForProjectsAndIssueTypes'; export * from './getCustomFieldOption'; +export * from './getCustomFieldsConfigurations'; export * from './getDashboard'; export * from './getDashboardItemProperty'; export * from './getDashboardItemPropertyKeys'; export * from './getDashboardsPaginated'; +export * from './getDefaultProjectClassification'; export * from './getDefaultValues'; export * from './getDefaultWorkflow'; export * from './getDraftDefaultWorkflow'; @@ -230,6 +257,7 @@ export * from './getIdsOfWorklogsDeletedSince'; export * from './getIdsOfWorklogsModifiedSince'; export * from './getIssue'; export * from './getIssueFieldOption'; +export * from './getIssueLimitReport'; export * from './getIssueLink'; export * from './getIssueLinkType'; export * from './getIssuePickerResource'; @@ -262,9 +290,16 @@ export * from './getPermissionScheme'; export * from './getPermissionSchemeGrant'; export * from './getPermissionSchemeGrants'; export * from './getPermittedProjects'; +export * from './getPlan'; +export * from './getPlanOnlyTeam'; +export * from './getPlans'; +export * from './getPolicies'; export * from './getPrecomputations'; +export * from './getPrecomputationsByID'; export * from './getPreference'; +export * from './getPrioritiesByPriorityScheme'; export * from './getPriority'; +export * from './getPrioritySchemes'; export * from './getProject'; export * from './getProjectCategoryById'; export * from './getProjectComponents'; @@ -272,6 +307,7 @@ export * from './getProjectComponentsPaginated'; export * from './getProjectContextMapping'; export * from './getProjectEmail'; export * from './getProjectIssueSecurityScheme'; +export * from './getProjectIssueTypeUsagesForStatus'; export * from './getProjectProperty'; export * from './getProjectPropertyKeys'; export * from './getProjectRole'; @@ -279,13 +315,19 @@ export * from './getProjectRoleActorsForRole'; export * from './getProjectRoleById'; export * from './getProjectRoleDetails'; export * from './getProjectRoles'; +export * from './getProjectsByPriorityScheme'; export * from './getProjectsForIssueTypeScreenScheme'; export * from './getProjectTypeByKey'; +export * from './getProjectUsagesForStatus'; +export * from './getProjectUsagesForWorkflow'; +export * from './getProjectUsagesForWorkflowScheme'; export * from './getProjectVersions'; export * from './getProjectVersionsPaginated'; export * from './getRecent'; +export * from './getRelatedWork'; export * from './getRemoteIssueLinkById'; export * from './getRemoteIssueLinks'; +export * from './getResolution'; export * from './getScreens'; export * from './getScreenSchemes'; export * from './getScreensForField'; @@ -299,6 +341,7 @@ export * from './getStatus'; export * from './getStatusCategory'; export * from './getStatusesById'; export * from './getTask'; +export * from './getTeams'; export * from './getTransitions'; export * from './getTrashedFieldsPaginated'; export * from './getUiModifications'; @@ -318,14 +361,17 @@ export * from './getVersionUnresolvedIssues'; export * from './getVisibleIssueFieldOptions'; export * from './getVotes'; export * from './getWorkflow'; +export * from './getWorkflowProjectIssueTypeUsages'; export * from './getWorkflowScheme'; export * from './getWorkflowSchemeDraft'; export * from './getWorkflowSchemeDraftIssueType'; export * from './getWorkflowSchemeIssueType'; export * from './getWorkflowSchemeProjectAssociations'; +export * from './getWorkflowSchemeUsagesForWorkflow'; export * from './getWorkflowsPaginated'; export * from './getWorkflowTransitionProperties'; export * from './getWorkflowTransitionRuleConfigurations'; +export * from './getWorkflowUsagesForStatus'; export * from './getWorklog'; export * from './getWorklogProperty'; export * from './getWorklogPropertyKeys'; @@ -346,11 +392,14 @@ export * from './publishDraftWorkflowScheme'; export * from './putAddonProperty'; export * from './putAppProperty'; export * from './readWorkflows'; +export * from './readWorkflowSchemes'; export * from './refreshWebhooks'; export * from './registerDynamicWebhooks'; export * from './registerModules'; +export * from './removeAtlassianTeam'; export * from './removeAttachment'; export * from './removeCustomFieldContextFromProjects'; +export * from './removeDefaultProjectClassification'; export * from './removeGadget'; export * from './removeGroup'; export * from './removeIssueTypeFromIssueTypeScheme'; @@ -371,6 +420,7 @@ export * from './removeWatcher'; export * from './renameScreenTab'; export * from './reorderCustomFieldOptions'; export * from './reorderIssueTypesInIssueTypeScheme'; +export * from './replaceCustomFieldOption'; export * from './replaceIssueFieldOption'; export * from './resetColumns'; export * from './resetUserColumns'; @@ -378,14 +428,19 @@ export * from './restore'; export * from './restoreCustomField'; export * from './sanitiseJqlQueries'; export * from './search'; +export * from './searchForIssuesIds'; export * from './searchForIssuesUsingJql'; +export * from './searchForIssuesUsingJqlEnhancedSearch'; +export * from './searchForIssuesUsingJqlEnhancedSearchPost'; export * from './searchForIssuesUsingJqlPost'; export * from './searchPriorities'; export * from './searchProjects'; export * from './searchProjectsUsingSecuritySchemes'; export * from './searchResolutions'; export * from './searchSecuritySchemes'; +export * from './searchWorkflows'; export * from './selectTimeTrackingImplementation'; +export * from './services'; export * from './setActors'; export * from './setApplicationProperty'; export * from './setBanner'; @@ -410,9 +465,12 @@ export * from './setWorkflowSchemeDraftIssueType'; export * from './setWorkflowSchemeIssueType'; export * from './setWorklogProperty'; export * from './storeAvatar'; +export * from './suggestedPrioritiesForMappings'; export * from './toggleFeatureForProject'; export * from './trashCustomField'; +export * from './trashPlan'; export * from './unarchiveIssues'; +export * from './updateAtlassianTeam'; export * from './updateComment'; export * from './updateComponent'; export * from './updateCustomField'; @@ -421,6 +479,7 @@ export * from './updateCustomFieldContext'; export * from './updateCustomFieldOption'; export * from './updateCustomFieldValue'; export * from './updateDashboard'; +export * from './updateDefaultProjectClassification'; export * from './updateDefaultScreenScheme'; export * from './updateDefaultWorkflow'; export * from './updateDraftDefaultWorkflow'; @@ -441,14 +500,19 @@ export * from './updateIssueTypeScreenScheme'; export * from './updateMultipleCustomFieldValues'; export * from './updateNotificationScheme'; export * from './updatePermissionScheme'; +export * from './updatePlan'; +export * from './updatePlanOnlyTeam'; export * from './updatePrecomputations'; export * from './updatePriority'; +export * from './updatePriorityScheme'; export * from './updateProject'; export * from './updateProjectAvatar'; export * from './updateProjectCategory'; export * from './updateProjectEmail'; +export * from './updateRelatedWork'; export * from './updateRemoteIssueLink'; export * from './updateResolution'; +export * from './updateSchemes'; export * from './updateScreen'; export * from './updateScreenScheme'; export * from './updateSecurityLevel'; @@ -459,6 +523,7 @@ export * from './updateWorkflowMapping'; export * from './updateWorkflows'; export * from './updateWorkflowScheme'; export * from './updateWorkflowSchemeDraft'; +export * from './updateWorkflowSchemeMappings'; export * from './updateWorkflowTransitionProperty'; export * from './updateWorkflowTransitionRuleConfigurations'; export * from './updateWorklog'; diff --git a/src/version2/parameters/putAddonProperty.ts b/src/version2/parameters/putAddonProperty.ts index f1be24ac61..b9c56822bb 100644 --- a/src/version2/parameters/putAddonProperty.ts +++ b/src/version2/parameters/putAddonProperty.ts @@ -3,5 +3,6 @@ export interface PutAddonProperty { addonKey: string; /** The key of the property. */ propertyKey: string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any propertyValue: any; } diff --git a/src/version2/parameters/putAppProperty.ts b/src/version2/parameters/putAppProperty.ts index 38672db96f..a5707ed36a 100644 --- a/src/version2/parameters/putAppProperty.ts +++ b/src/version2/parameters/putAppProperty.ts @@ -1,5 +1,6 @@ export interface PutAppProperty { /** The key of the property. */ propertyKey: string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any propertyValue: any; } diff --git a/src/version2/parameters/readWorkflowSchemes.ts b/src/version2/parameters/readWorkflowSchemes.ts new file mode 100644 index 0000000000..85984b43fe --- /dev/null +++ b/src/version2/parameters/readWorkflowSchemes.ts @@ -0,0 +1,14 @@ +import { WorkflowSchemeReadRequest } from '../models'; + +export interface ReadWorkflowSchemes extends WorkflowSchemeReadRequest { + /** + * Deprecated. See the [deprecation + * notice](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-2298) for details. + * + * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Expand options include: + * + * `workflows.usages` Returns the project and issue types that each workflow in the workflow scheme is associated + * with. + */ + expand?: string; +} diff --git a/src/version2/parameters/readWorkflows.ts b/src/version2/parameters/readWorkflows.ts index c1248108f5..cc844a5386 100644 --- a/src/version2/parameters/readWorkflows.ts +++ b/src/version2/parameters/readWorkflows.ts @@ -1,18 +1,20 @@ import { ProjectAndIssueTypePair } from '../models'; export interface ReadWorkflows { + /** + * Return the new fields (`toStatusReference`/`links`) instead of the deprecated fields (`to`/`from`) for workflow + * transition port mappings. + */ + useTransitionLinksFormat?: boolean; + /** + * Return the new field `approvalConfiguration` instead of the deprecated status properties for approval + * configuration. + */ + useApprovalConfiguration?: boolean; /** The list of projects and issue types to query. */ projectAndIssueTypes?: ProjectAndIssueTypePair[]; /** The list of workflow IDs to query. */ workflowIds?: string[]; /** The list of workflow names to query. */ workflowNames?: string[]; - /** - * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#expansion) to include additional - * information in the response. This parameter accepts a comma-separated list. Expand options include: - * - * `workflows.usages` Returns the project and issue types that each workflow is associated with. `statuses.usages` - * Returns the project and issue types that each status is associated with. - */ - expand?: string; } diff --git a/src/version2/parameters/removeAtlassianTeam.ts b/src/version2/parameters/removeAtlassianTeam.ts new file mode 100644 index 0000000000..02650c1553 --- /dev/null +++ b/src/version2/parameters/removeAtlassianTeam.ts @@ -0,0 +1,6 @@ +export interface RemoveAtlassianTeam { + /** The ID of the plan. */ + planId: number; + /** The ID of the Atlassian team. */ + atlassianTeamId: string; +} diff --git a/src/version2/parameters/removeDefaultProjectClassification.ts b/src/version2/parameters/removeDefaultProjectClassification.ts new file mode 100644 index 0000000000..103f00b406 --- /dev/null +++ b/src/version2/parameters/removeDefaultProjectClassification.ts @@ -0,0 +1,4 @@ +export interface RemoveDefaultProjectClassification { + /** The project ID or project key (case-sensitive). */ + projectIdOrKey: string; +} diff --git a/src/version2/parameters/replaceCustomFieldOption.ts b/src/version2/parameters/replaceCustomFieldOption.ts new file mode 100644 index 0000000000..aa7b88be53 --- /dev/null +++ b/src/version2/parameters/replaceCustomFieldOption.ts @@ -0,0 +1,12 @@ +export interface ReplaceCustomFieldOption { + /** The ID of the option that will replace the currently selected option. */ + replaceWith?: number; + /** A JQL query that specifies the issues to be updated. For example, _project=10000_. */ + jql?: string; + /** The ID of the custom field. */ + fieldId: string; + /** The ID of the option to be deselected. */ + optionId: number; + /** The ID of the context. */ + contextId: number; +} diff --git a/src/version2/parameters/restore.ts b/src/version2/parameters/restore.ts index 07853edc20..c8fd6ca5ef 100644 --- a/src/version2/parameters/restore.ts +++ b/src/version2/parameters/restore.ts @@ -1,4 +1,4 @@ export interface Restore { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; } diff --git a/src/version2/parameters/searchForIssuesIds.ts b/src/version2/parameters/searchForIssuesIds.ts new file mode 100644 index 0000000000..3c6179bc0b --- /dev/null +++ b/src/version2/parameters/searchForIssuesIds.ts @@ -0,0 +1,3 @@ +import { IdSearchRequest } from '../models'; + +export interface SearchForIssuesIds extends IdSearchRequest {} diff --git a/src/version2/parameters/searchForIssuesUsingJql.ts b/src/version2/parameters/searchForIssuesUsingJql.ts index bb85f45aeb..8e1a025a00 100644 --- a/src/version2/parameters/searchForIssuesUsingJql.ts +++ b/src/version2/parameters/searchForIssuesUsingJql.ts @@ -76,4 +76,10 @@ export interface SearchForIssuesUsingJql { properties?: string[]; /** Reference fields by their key (rather than ID). */ fieldsByKeys?: boolean; + /** + * Whether to fail the request quickly in case of an error while loading fields for an issue. For `failFast=true`, if + * one field fails, the entire operation fails. For `failFast=false`, the operation will continue even if a field + * fails. It will return a valid response, but without values for the failed field(s). + */ + failFast?: boolean; } diff --git a/src/version2/parameters/searchForIssuesUsingJqlEnhancedSearch.ts b/src/version2/parameters/searchForIssuesUsingJqlEnhancedSearch.ts new file mode 100644 index 0000000000..d40a56810d --- /dev/null +++ b/src/version2/parameters/searchForIssuesUsingJqlEnhancedSearch.ts @@ -0,0 +1,79 @@ +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. + * + * - 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. + */ + nextPageToken?: string; + /** + * The maximum number of items to return per page. To manage page size, API may return fewer items per page where a + * large number of fields are requested. The greatest number of items returned per page is achieved when requesting + * `id` or `key` only. + * + * It returns max 5000 issues. + * + * Default: `50` + * + * Format: `int32` + */ + maxResults?: number; + /** + * A list of fields to return for each issue, use it to retrieve a subset of fields. This parameter accepts a + * comma-separated list. Expand options include: + * + * - `*all` Returns all fields. + * - `*navigable` Returns navigable fields. + * - `id` Returns only issue IDs. + * - Any issue field, prefixed with a minus to exclude. + * + * The default is `id`. + * + * Examples: + * + * - `summary,comment` Returns only the summary and comments fields. + * - `-description` Returns all navigable (default) fields except description. + * - `*all,-comment` Returns all fields except comments. + * + * 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) + * where the default is all fields. + */ + fields?: string[]; + /** + * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#expansion) to include additional + * information about issues in the response. Note that, unlike the majority of instances where `expand` is specified, + * `expand` is defined as a comma-delimited string of values. The expand options are: + * + * - `renderedFields` Returns field values rendered in HTML format. + * - `names` Returns the display name of each field. + * - `schema` Returns the schema describing a field type. + * - `transitions` Returns all possible transitions for the issue. + * - `operations` Returns all possible operations for the issue. + * - `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. + * + * 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. */ + properties?: string[]; + /** Reference fields by their key (rather than ID). The default is `false`. */ + fieldsByKeys?: boolean; + /** Fail this request early if we can't retrieve all field data. The default is `false`. */ + failFast?: boolean; + /** Strong consistency issue ids to be reconciled with search results. Accepts max 50 ids. All issues must exist. */ + reconcileIssues?: number[]; +} diff --git a/src/version2/parameters/searchForIssuesUsingJqlEnhancedSearchPost.ts b/src/version2/parameters/searchForIssuesUsingJqlEnhancedSearchPost.ts new file mode 100644 index 0000000000..f00326bc86 --- /dev/null +++ b/src/version2/parameters/searchForIssuesUsingJqlEnhancedSearchPost.ts @@ -0,0 +1,3 @@ +import { EnhancedSearchRequest } from '../models'; + +export interface SearchForIssuesUsingJqlEnhancedSearchPost extends EnhancedSearchRequest {} diff --git a/src/version2/parameters/searchPriorities.ts b/src/version2/parameters/searchPriorities.ts index 8e1dae180c..7ad7be9707 100644 --- a/src/version2/parameters/searchPriorities.ts +++ b/src/version2/parameters/searchPriorities.ts @@ -10,6 +10,13 @@ export interface SearchPriorities { * `projectId=10010&projectId=10111`. */ projectId?: string[]; + /** The name of priority to search for. */ + priorityName?: string; /** Whether only the default priority is returned. */ onlyDefault?: boolean; + /** + * Use `schemes` to return the associated priority schemes for each priority. Limited to returning first 15 priority + * schemes per priority. + */ + expand?: 'schemes' | string; } diff --git a/src/version2/parameters/searchProjectsUsingSecuritySchemes.ts b/src/version2/parameters/searchProjectsUsingSecuritySchemes.ts index 6e2ee07020..ba08b5778f 100644 --- a/src/version2/parameters/searchProjectsUsingSecuritySchemes.ts +++ b/src/version2/parameters/searchProjectsUsingSecuritySchemes.ts @@ -1,8 +1,8 @@ export interface SearchProjectsUsingSecuritySchemes { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** The list of security scheme IDs to be filtered out. */ issueSecuritySchemeId?: string[]; /** The list of project IDs to be filtered out. */ diff --git a/src/version2/parameters/searchSecuritySchemes.ts b/src/version2/parameters/searchSecuritySchemes.ts index 21e4af570f..150e06463d 100644 --- a/src/version2/parameters/searchSecuritySchemes.ts +++ b/src/version2/parameters/searchSecuritySchemes.ts @@ -1,8 +1,8 @@ export interface SearchSecuritySchemes { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** * The list of issue security scheme IDs. To include multiple issue security scheme IDs, separate IDs with an * ampersand: `id=10000&id=10001`. diff --git a/src/version2/parameters/searchWorkflows.ts b/src/version2/parameters/searchWorkflows.ts new file mode 100644 index 0000000000..b0c6e94475 --- /dev/null +++ b/src/version2/parameters/searchWorkflows.ts @@ -0,0 +1,25 @@ +export interface SearchWorkflows { + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** + * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#expansion) to include additional + * information in the response. This parameter accepts a comma-separated list. Expand options include: + * + * `values.transitions` Returns the transitions that each workflow is associated with. + */ + expand?: string; + /** String used to perform a case-insensitive partial match with workflow name. */ + queryString?: string; + /** + * [Order](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#ordering) the results by a field: + * + * `name` Sorts by workflow name. `created` Sorts by create time. `updated` Sorts by update time. + */ + orderBy?: string; + /** The scope of the workflow. Global for company-managed projects and Project for team-managed projects. */ + scope?: string; + /** Filters active and inactive workflows. */ + isActive?: boolean; +} diff --git a/src/version2/parameters/services.ts b/src/version2/parameters/services.ts new file mode 100644 index 0000000000..296a9d0439 --- /dev/null +++ b/src/version2/parameters/services.ts @@ -0,0 +1,4 @@ +export interface Services { + /** The ID of the services (the strings starting with "b:" need to be decoded in Base64). */ + serviceIds: string[]; +} diff --git a/src/version2/parameters/setActors.ts b/src/version2/parameters/setActors.ts index 9fe40f868e..eb3a8f16be 100644 --- a/src/version2/parameters/setActors.ts +++ b/src/version2/parameters/setActors.ts @@ -2,7 +2,7 @@ import { ProjectRoleActorsUpdate } from '../models'; export interface SetActors extends ProjectRoleActorsUpdate { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** * The ID of the project role. Use [Get all project roles](#api-rest-api-2-role-get) to get a list of project role * IDs. diff --git a/src/version2/parameters/setCommentProperty.ts b/src/version2/parameters/setCommentProperty.ts index 1ae0fddcdb..e99af93039 100644 --- a/src/version2/parameters/setCommentProperty.ts +++ b/src/version2/parameters/setCommentProperty.ts @@ -3,5 +3,6 @@ export interface SetCommentProperty { commentId: string; /** The key of the property. The maximum length is 255 characters. */ propertyKey: string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any property: any; } diff --git a/src/version2/parameters/setDashboardItemProperty.ts b/src/version2/parameters/setDashboardItemProperty.ts index 74623a28f4..0326f4f325 100644 --- a/src/version2/parameters/setDashboardItemProperty.ts +++ b/src/version2/parameters/setDashboardItemProperty.ts @@ -9,5 +9,6 @@ export interface SetDashboardItemProperty { * object with all keys and values as strings. */ propertyKey: string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any propertyValue: any; } diff --git a/src/version2/parameters/setIssueProperty.ts b/src/version2/parameters/setIssueProperty.ts index 37fe0211f4..2784d73305 100644 --- a/src/version2/parameters/setIssueProperty.ts +++ b/src/version2/parameters/setIssueProperty.ts @@ -4,5 +4,6 @@ export interface SetIssueProperty { /** The key of the issue property. The maximum length is 255 characters. */ propertyKey: string; /** The value of the issue property. Can be of any type. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any propertyValue: any; } diff --git a/src/version2/parameters/setIssueTypeProperty.ts b/src/version2/parameters/setIssueTypeProperty.ts index 23290f43a6..2916db3228 100644 --- a/src/version2/parameters/setIssueTypeProperty.ts +++ b/src/version2/parameters/setIssueTypeProperty.ts @@ -3,5 +3,6 @@ export interface SetIssueTypeProperty { issueTypeId: string; /** The key of the issue type property. The maximum length is 255 characters. */ propertyKey: string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any propertyValue: any; } diff --git a/src/version2/parameters/setPreference.ts b/src/version2/parameters/setPreference.ts index 236f2bf329..b54dd95532 100644 --- a/src/version2/parameters/setPreference.ts +++ b/src/version2/parameters/setPreference.ts @@ -1,5 +1,5 @@ export interface SetPreference { /** The key of the preference. The maximum length is 255 characters. */ key: string; - value: any | string; + value: string; } diff --git a/src/version2/parameters/setProjectProperty.ts b/src/version2/parameters/setProjectProperty.ts index 518b1d3e9e..2ff27299a2 100644 --- a/src/version2/parameters/setProjectProperty.ts +++ b/src/version2/parameters/setProjectProperty.ts @@ -1,7 +1,8 @@ export interface SetProjectProperty { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** The key of the project property. The maximum length is 255 characters. */ propertyKey: string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any propertyValue: any; } diff --git a/src/version2/parameters/setUserColumns.ts b/src/version2/parameters/setUserColumns.ts index a174d6d160..ee28a67fcb 100644 --- a/src/version2/parameters/setUserColumns.ts +++ b/src/version2/parameters/setUserColumns.ts @@ -4,5 +4,6 @@ export interface SetUserColumns { * _5b10ac8d82e05b22cc7d4ef5_. */ accountId: string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any columns: any; } diff --git a/src/version2/parameters/setUserProperty.ts b/src/version2/parameters/setUserProperty.ts index 38ad1931f4..cb41b227b2 100644 --- a/src/version2/parameters/setUserProperty.ts +++ b/src/version2/parameters/setUserProperty.ts @@ -6,5 +6,6 @@ export interface SetUserProperty { accountId?: string; /** The key of the user's property. The maximum length is 255 characters. */ propertyKey: string; + // eslint-disable-next-line propertyValue: any; } diff --git a/src/version2/parameters/storeAvatar.ts b/src/version2/parameters/storeAvatar.ts index b9f98e0b99..398a59baff 100644 --- a/src/version2/parameters/storeAvatar.ts +++ b/src/version2/parameters/storeAvatar.ts @@ -2,12 +2,17 @@ export interface StoreAvatar { /** The avatar type. */ type: 'project' | 'issuetype' | string; /** The ID of the item the avatar is associated with. */ - entityId: string; + entityId: number | string; /** The X coordinate of the top-left corner of the crop region. */ x?: number; /** The Y coordinate of the top-left corner of the crop region. */ y?: number; - /** The length of each side of the crop region. */ - size: number; - avatar: any; + /** + * The length of each side of the crop region. + * + * @default 0 + */ + size?: number; + mimeType: string; + avatar: Buffer | ArrayBuffer | Uint8Array; } diff --git a/src/version2/parameters/suggestedPrioritiesForMappings.ts b/src/version2/parameters/suggestedPrioritiesForMappings.ts new file mode 100644 index 0000000000..ed706bf989 --- /dev/null +++ b/src/version2/parameters/suggestedPrioritiesForMappings.ts @@ -0,0 +1,3 @@ +import { SuggestedMappingsRequest } from '../models'; + +export interface SuggestedPrioritiesForMappings extends SuggestedMappingsRequest {} diff --git a/src/version2/parameters/toggleFeatureForProject.ts b/src/version2/parameters/toggleFeatureForProject.ts index c5a8fde0f7..7891492f04 100644 --- a/src/version2/parameters/toggleFeatureForProject.ts +++ b/src/version2/parameters/toggleFeatureForProject.ts @@ -2,7 +2,7 @@ import { ProjectFeatureToggleRequest } from '../models'; export interface ToggleFeatureForProject extends ProjectFeatureToggleRequest { /** The ID or (case-sensitive) key of the project. */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** The key of the feature. */ featureKey: string; } diff --git a/src/version2/parameters/trashPlan.ts b/src/version2/parameters/trashPlan.ts new file mode 100644 index 0000000000..e960cc100a --- /dev/null +++ b/src/version2/parameters/trashPlan.ts @@ -0,0 +1,4 @@ +export interface TrashPlan { + /** The ID of the plan. */ + planId: number; +} diff --git a/src/version2/parameters/updateAtlassianTeam.ts b/src/version2/parameters/updateAtlassianTeam.ts new file mode 100644 index 0000000000..d5a9fb9dfe --- /dev/null +++ b/src/version2/parameters/updateAtlassianTeam.ts @@ -0,0 +1,6 @@ +export interface UpdateAtlassianTeam { + /** The ID of the plan. */ + planId: number; + /** The ID of the Atlassian team. */ + atlassianTeamId: string; +} diff --git a/src/version2/parameters/updateDashboard.ts b/src/version2/parameters/updateDashboard.ts index 3b01c0c2d9..7144648aa6 100644 --- a/src/version2/parameters/updateDashboard.ts +++ b/src/version2/parameters/updateDashboard.ts @@ -3,4 +3,9 @@ import { DashboardDetails } from '../models'; export interface UpdateDashboard extends DashboardDetails { /** The ID of the dashboard to update. */ id: string; + /** + * Whether admin level permissions are used. It should only be true if the user has _Administer Jira_ [global + * permission](https://confluence.atlassian.com/x/x4dKLg) + */ + extendAdminPermissions?: boolean; } diff --git a/src/version2/parameters/updateDefaultProjectClassification.ts b/src/version2/parameters/updateDefaultProjectClassification.ts new file mode 100644 index 0000000000..01b6cb1eb2 --- /dev/null +++ b/src/version2/parameters/updateDefaultProjectClassification.ts @@ -0,0 +1,6 @@ +import { UpdateDefaultProjectClassification as UpdateDefaultProjectClassificationModel } from '../models'; + +export interface UpdateDefaultProjectClassification extends UpdateDefaultProjectClassificationModel { + /** The project ID or project key (case-sensitive). */ + projectIdOrKey: string; +} diff --git a/src/version2/parameters/updatePlan.ts b/src/version2/parameters/updatePlan.ts new file mode 100644 index 0000000000..0f21fc0003 --- /dev/null +++ b/src/version2/parameters/updatePlan.ts @@ -0,0 +1,6 @@ +export interface UpdatePlan { + /** The ID of the plan. */ + planId: number; + /** Whether to accept group IDs instead of group names. Group names are deprecated. */ + useGroupId?: boolean; +} diff --git a/src/version2/parameters/updatePlanOnlyTeam.ts b/src/version2/parameters/updatePlanOnlyTeam.ts new file mode 100644 index 0000000000..7e4b3b5820 --- /dev/null +++ b/src/version2/parameters/updatePlanOnlyTeam.ts @@ -0,0 +1,6 @@ +export interface UpdatePlanOnlyTeam { + /** The ID of the plan. */ + planId: number; + /** The ID of the plan-only team. */ + planOnlyTeamId: number; +} diff --git a/src/version2/parameters/updatePrecomputations.ts b/src/version2/parameters/updatePrecomputations.ts index ecf83b9aaf..7371900380 100644 --- a/src/version2/parameters/updatePrecomputations.ts +++ b/src/version2/parameters/updatePrecomputations.ts @@ -1,3 +1,5 @@ import { JqlFunctionPrecomputationUpdateRequest } from '../models'; -export interface UpdatePrecomputations extends JqlFunctionPrecomputationUpdateRequest {} +export interface UpdatePrecomputations extends JqlFunctionPrecomputationUpdateRequest { + skipNotFoundPrecomputations?: boolean; +} diff --git a/src/version2/parameters/updatePriorityScheme.ts b/src/version2/parameters/updatePriorityScheme.ts new file mode 100644 index 0000000000..bbd7a2f666 --- /dev/null +++ b/src/version2/parameters/updatePriorityScheme.ts @@ -0,0 +1,6 @@ +import { UpdatePrioritySchemeRequest } from '../models'; + +export interface UpdatePriorityScheme extends UpdatePrioritySchemeRequest { + /** The ID of the priority scheme. */ + schemeId: number; +} diff --git a/src/version2/parameters/updateProject.ts b/src/version2/parameters/updateProject.ts index 8d8c4117bb..bdaf38e7ab 100644 --- a/src/version2/parameters/updateProject.ts +++ b/src/version2/parameters/updateProject.ts @@ -2,7 +2,7 @@ import { UpdateProjectDetails } from '../models'; export interface UpdateProject extends UpdateProjectDetails { /** The project ID or project key (case-sensitive). */ - projectIdOrKey: number | string; + projectIdOrKey: string | number; /** * The [project * type](https://confluence.atlassian.com/x/GwiiLQ#Jiraapplicationsoverview-Productfeaturesandprojecttypes), which diff --git a/src/version2/parameters/updateProjectAvatar.ts b/src/version2/parameters/updateProjectAvatar.ts index d31b4ca4b6..6803b3f5d8 100644 --- a/src/version2/parameters/updateProjectAvatar.ts +++ b/src/version2/parameters/updateProjectAvatar.ts @@ -2,5 +2,5 @@ import { Avatar } from '../models'; export interface UpdateProjectAvatar extends Avatar { /** The ID or (case-sensitive) key of the project. */ - projectIdOrKey: string; + projectIdOrKey: string | number; } diff --git a/src/version2/parameters/updateProjectEmail.ts b/src/version2/parameters/updateProjectEmail.ts index c3bf7237a2..e8f4ca86f7 100644 --- a/src/version2/parameters/updateProjectEmail.ts +++ b/src/version2/parameters/updateProjectEmail.ts @@ -2,5 +2,5 @@ import { ProjectEmailAddress } from '../models'; export interface UpdateProjectEmail extends ProjectEmailAddress { /** The project ID. */ - projectId: number; + projectId: string | number; } diff --git a/src/version2/parameters/updateRelatedWork.ts b/src/version2/parameters/updateRelatedWork.ts new file mode 100644 index 0000000000..4d0d5a170b --- /dev/null +++ b/src/version2/parameters/updateRelatedWork.ts @@ -0,0 +1,6 @@ +import { VersionRelatedWork } from '../models'; + +export interface UpdateRelatedWork extends VersionRelatedWork { + /** The ID of the version to update the related work on. For the related work id, pass it to the input JSON. */ + id: string; +} diff --git a/src/version2/parameters/updateSchemes.ts b/src/version2/parameters/updateSchemes.ts new file mode 100644 index 0000000000..7f9610918f --- /dev/null +++ b/src/version2/parameters/updateSchemes.ts @@ -0,0 +1,3 @@ +import { WorkflowSchemeUpdateRequest } from '../models'; + +export interface UpdateSchemes extends WorkflowSchemeUpdateRequest {} diff --git a/src/version2/parameters/updateWorkflowSchemeMappings.ts b/src/version2/parameters/updateWorkflowSchemeMappings.ts new file mode 100644 index 0000000000..de0323e16e --- /dev/null +++ b/src/version2/parameters/updateWorkflowSchemeMappings.ts @@ -0,0 +1,3 @@ +import { WorkflowSchemeUpdateRequiredMappingsRequest } from '../models'; + +export interface UpdateWorkflowSchemeMappings extends WorkflowSchemeUpdateRequiredMappingsRequest {} diff --git a/src/version2/permissionSchemes.ts b/src/version2/permissionSchemes.ts index 631207f262..42ee9e52d0 100644 --- a/src/version2/permissionSchemes.ts +++ b/src/version2/permissionSchemes.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class PermissionSchemes { @@ -20,8 +20,9 @@ export class PermissionSchemes { * The `holder` object contains information about the user or group being granted the permission. For example, the * _Administer projects_ permission is granted to a group named _Teams in space administrators_. In this case, the * type is `"type": "group"`, and the parameter is the group name, `"parameter": "Teams in space administrators"` and - * the value is group ID, `"value": "ca85fac0-d974-40ca-a615-7af99c48d24f"`. The `holder` object is defined by the - * following properties: + * the value is group ID, `"value": "ca85fac0-d974-40ca-a615-7af99c48d24f"`. + * + * The `holder` object is defined by the following properties: * * - `type` Identifies the user or group (see the list of types below). * - `parameter` As a group's name can change, use of `value` is recommended. The value of this property depends on the @@ -130,8 +131,9 @@ export class PermissionSchemes { * The `holder` object contains information about the user or group being granted the permission. For example, the * _Administer projects_ permission is granted to a group named _Teams in space administrators_. In this case, the * type is `"type": "group"`, and the parameter is the group name, `"parameter": "Teams in space administrators"` and - * the value is group ID, `"value": "ca85fac0-d974-40ca-a615-7af99c48d24f"`. The `holder` object is defined by the - * following properties: + * the value is group ID, `"value": "ca85fac0-d974-40ca-a615-7af99c48d24f"`. + * + * The `holder` object is defined by the following properties: * * - `type` Identifies the user or group (see the list of types below). * - `parameter` As a group's name can change, use of `value` is recommended. The value of this property depends on the @@ -313,7 +315,7 @@ export class PermissionSchemes { url: `/rest/api/2/permissionscheme/${schemeId}`, method: 'GET', params: { - expand: typeof parameters !== 'string' && parameters.expand, + expand: typeof parameters !== 'string' ? parameters.expand : undefined, }, }; @@ -479,10 +481,10 @@ export class PermissionSchemes { expand: parameters.expand, }, data: { - id: parameters.id, - self: parameters.self, holder: parameters.holder, + id: parameters.id, permission: parameters.permission, + self: parameters.self, }, }; diff --git a/src/version2/permissions.ts b/src/version2/permissions.ts index d99162674a..eaecef137a 100644 --- a/src/version2/permissions.ts +++ b/src/version2/permissions.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Permissions { @@ -28,6 +28,12 @@ export class Permissions { * project, because any user can be a reporter. However, if they are not the user who reported the issue queried they * would not have EDIT_ISSUES permission for that issue. * + * For [Jira Service Management project + * permissions](https://support.atlassian.com/jira-cloud-administration/docs/customize-jira-service-management-permissions/), + * this will be evaluated similarly to a user in the customer portal. For example, if the BROWSE_PROJECTS permission + * is granted to Service Project Customer - Portal Access, any users with access to the customer portal will have the + * BROWSE_PROJECTS permission. + * * Global permissions are unaffected by context. * * This operation can be accessed anonymously. @@ -59,6 +65,12 @@ export class Permissions { * project, because any user can be a reporter. However, if they are not the user who reported the issue queried they * would not have EDIT_ISSUES permission for that issue. * + * For [Jira Service Management project + * permissions](https://support.atlassian.com/jira-cloud-administration/docs/customize-jira-service-management-permissions/), + * this will be evaluated similarly to a user in the customer portal. For example, if the BROWSE_PROJECTS permission + * is granted to Service Project Customer - Portal Access, any users with access to the customer portal will have the + * BROWSE_PROJECTS permission. + * * Global permissions are unaffected by context. * * This operation can be accessed anonymously. @@ -98,8 +110,9 @@ export class Permissions { * - Project permissions. * - Global permissions added by plugins. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ async getAllPermissions(callback: Callback): Promise; /** @@ -109,8 +122,9 @@ export class Permissions { * - Project permissions. * - Global permissions added by plugins. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ async getAllPermissions(callback?: never): Promise; async getAllPermissions(callback?: Callback): Promise { @@ -139,6 +153,11 @@ export class Permissions { * `projectPermissions.issues` are ignored. * - Empty strings in `projectPermissions.permissions` are ignored. * + * **Deprecation notice:** The required OAuth 2.0 scopes will be updated on June 15, 2024. + * + * - **Classic**: `read:jira-work` + * - **Granular**: `read:permission:jira` + * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** @@ -168,6 +187,11 @@ export class Permissions { * `projectPermissions.issues` are ignored. * - Empty strings in `projectPermissions.permissions` are ignored. * + * **Deprecation notice:** The required OAuth 2.0 scopes will be updated on June 15, 2024. + * + * - **Classic**: `read:jira-work` + * - **Granular**: `read:permission:jira` + * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** @@ -188,9 +212,9 @@ export class Permissions { url: '/rest/api/2/permissions/check', method: 'POST', data: { - projectPermissions: parameters?.projectPermissions, - globalPermissions: parameters?.globalPermissions, accountId: parameters?.accountId, + globalPermissions: parameters?.globalPermissions, + projectPermissions: parameters?.projectPermissions, }, }; diff --git a/src/version2/plans.ts b/src/version2/plans.ts new file mode 100644 index 0000000000..d52910d586 --- /dev/null +++ b/src/version2/plans.ts @@ -0,0 +1,299 @@ +import * as Models from './models'; +import * as Parameters from './parameters'; +import { Client } from '../clients'; +import { Callback } from '../callback'; +import { RequestConfig } from '../requestConfig'; + +export class Plans { + constructor(private client: Client) {} + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of plans. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getPlans( + parameters: Parameters.GetPlans | undefined, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of plans. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getPlans( + parameters?: Parameters.GetPlans, + callback?: never, + ): Promise; + async getPlans( + parameters?: Parameters.GetPlans, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/plans/plan', + method: 'GET', + params: { + includeTrashed: parameters?.includeTrashed, + includeArchived: parameters?.includeArchived, + cursor: parameters?.cursor, + maxResults: parameters?.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Creates a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async createPlan(parameters: Parameters.CreatePlan, callback: Callback): Promise; + /** + * Creates a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async createPlan(parameters: Parameters.CreatePlan, callback?: never): Promise; + async createPlan(parameters: Parameters.CreatePlan, callback?: Callback): Promise { + const config: RequestConfig = { + url: '/rest/api/2/plans/plan', + method: 'POST', + params: { + useGroupId: parameters.useGroupId, + }, + data: { + crossProjectReleases: parameters.crossProjectReleases, + customFields: parameters.customFields, + exclusionRules: parameters.exclusionRules, + issueSources: parameters.issueSources, + leadAccountId: parameters.leadAccountId, + name: parameters.name, + permissions: parameters.permissions, + scheduling: parameters.scheduling, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getPlan(parameters: Parameters.GetPlan, callback: Callback): Promise; + /** + * Returns a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getPlan(parameters: Parameters.GetPlan, callback?: never): Promise; + async getPlan(parameters: Parameters.GetPlan, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}`, + method: 'GET', + params: { + useGroupId: parameters.useGroupId, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Updates any of the following details of a plan using [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902). + * + * - Name + * - LeadAccountId + * - Scheduling + * + * - Estimation with StoryPoints, Days or Hours as possible values + * - StartDate + * + * - Type with DueDate, TargetStartDate, TargetEndDate or DateCustomField as possible values + * - DateCustomFieldId + * - EndDate + * + * - Type with DueDate, TargetStartDate, TargetEndDate or DateCustomField as possible values + * - DateCustomFieldId + * - InferredDates with None, SprintDates or ReleaseDates as possible values + * - Dependencies with Sequential or Concurrent as possible values + * - IssueSources + * + * - Type with Board, Project or Filter as possible values + * - Value + * - ExclusionRules + * + * - NumberOfDaysToShowCompletedIssues + * - IssueIds + * - WorkStatusIds + * - WorkStatusCategoryIds + * - IssueTypeIds + * - ReleaseIds + * - CrossProjectReleases + * + * - Name + * - ReleaseIds + * - CustomFields + * + * - CustomFieldId + * - Filter + * - Permissions + * + * - Type with View or Edit as possible values + * - Holder + * + * - Type with Group or AccountId as possible values + * - Value + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * + * _Note that "add" operations do not respect array indexes in target locations. Call the "Get plan" endpoint to find + * out the order of array elements._ + */ + async updatePlan(parameters: Parameters.UpdatePlan, callback: Callback): Promise; + /** + * Updates any of the following details of a plan using [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902). + * + * - Name + * - LeadAccountId + * - Scheduling + * + * - Estimation with StoryPoints, Days or Hours as possible values + * - StartDate + * + * - Type with DueDate, TargetStartDate, TargetEndDate or DateCustomField as possible values + * - DateCustomFieldId + * - EndDate + * + * - Type with DueDate, TargetStartDate, TargetEndDate or DateCustomField as possible values + * - DateCustomFieldId + * - InferredDates with None, SprintDates or ReleaseDates as possible values + * - Dependencies with Sequential or Concurrent as possible values + * - IssueSources + * + * - Type with Board, Project or Filter as possible values + * - Value + * - ExclusionRules + * + * - NumberOfDaysToShowCompletedIssues + * - IssueIds + * - WorkStatusIds + * - WorkStatusCategoryIds + * - IssueTypeIds + * - ReleaseIds + * - CrossProjectReleases + * + * - Name + * - ReleaseIds + * - CustomFields + * + * - CustomFieldId + * - Filter + * - Permissions + * + * - Type with View or Edit as possible values + * - Holder + * + * - Type with Group or AccountId as possible values + * - Value + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * + * _Note that "add" operations do not respect array indexes in target locations. Call the "Get plan" endpoint to find + * out the order of array elements._ + */ + async updatePlan(parameters: Parameters.UpdatePlan, callback?: never): Promise; + async updatePlan(parameters: Parameters.UpdatePlan, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}`, + method: 'PUT', + params: { + useGroupId: parameters.useGroupId, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Archives a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async archivePlan(parameters: Parameters.ArchivePlan, callback: Callback): Promise; + /** + * Archives a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async archivePlan(parameters: Parameters.ArchivePlan, callback?: never): Promise; + async archivePlan(parameters: Parameters.ArchivePlan, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}/archive`, + method: 'PUT', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Duplicates a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async duplicatePlan(parameters: Parameters.DuplicatePlan, callback: Callback): Promise; + /** + * Duplicates a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async duplicatePlan(parameters: Parameters.DuplicatePlan, callback?: never): Promise; + async duplicatePlan(parameters: Parameters.DuplicatePlan, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}/duplicate`, + method: 'POST', + data: { + name: parameters.name, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Moves a plan to trash. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async trashPlan(parameters: Parameters.TrashPlan, callback: Callback): Promise; + /** + * Moves a plan to trash. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async trashPlan(parameters: Parameters.TrashPlan, callback?: never): Promise; + async trashPlan(parameters: Parameters.TrashPlan, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}/trash`, + method: 'PUT', + }; + + return this.client.sendRequest(config, callback); + } +} diff --git a/src/version2/prioritySchemes.ts b/src/version2/prioritySchemes.ts new file mode 100644 index 0000000000..af30279d6c --- /dev/null +++ b/src/version2/prioritySchemes.ts @@ -0,0 +1,330 @@ +import * as Models from './models'; +import * as Parameters from './parameters'; +import { Client } from '../clients'; +import { Callback } from '../callback'; +import { RequestConfig } from '../requestConfig'; +import { paramSerializer } from '../paramSerializer'; +import { Paginated } from '../paginated'; + +export class PrioritySchemes { + constructor(private client: Client) {} + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * priority schemes. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async getPrioritySchemes>( + parameters: Parameters.GetPrioritySchemes | undefined, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * priority schemes. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async getPrioritySchemes>( + parameters?: Parameters.GetPrioritySchemes, + callback?: never, + ): Promise; + async getPrioritySchemes>( + parameters?: Parameters.GetPrioritySchemes, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/priorityscheme', + method: 'GET', + params: { + startAt: parameters?.startAt, + maxResults: parameters?.maxResults, + priorityId: paramSerializer('priorityId', parameters?.priorityId), + schemeId: paramSerializer('schemeId', parameters?.schemeId), + schemeName: parameters?.schemeName, + onlyDefault: parameters?.onlyDefault, + orderBy: parameters?.orderBy, + expand: parameters?.expand, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Creates a new priority scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async createPriorityScheme( + parameters: Parameters.CreatePriorityScheme, + callback: Callback, + ): Promise; + /** + * Creates a new priority scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async createPriorityScheme( + parameters: Parameters.CreatePriorityScheme, + callback?: never, + ): Promise; + async createPriorityScheme( + parameters: Parameters.CreatePriorityScheme, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/priorityscheme', + method: 'POST', + data: { + defaultPriorityId: parameters.defaultPriorityId, + description: parameters.description, + mappings: parameters.mappings, + name: parameters.name, + priorityIds: parameters.priorityIds, + projectIds: parameters.projectIds, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * priorities that would require mapping, given a change in priorities or projects associated with a priority scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async suggestedPrioritiesForMappings>( + parameters: Parameters.SuggestedPrioritiesForMappings | undefined, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * priorities that would require mapping, given a change in priorities or projects associated with a priority scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async suggestedPrioritiesForMappings>( + parameters?: Parameters.SuggestedPrioritiesForMappings, + callback?: never, + ): Promise; + async suggestedPrioritiesForMappings>( + parameters?: Parameters.SuggestedPrioritiesForMappings, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/priorityscheme/mappings', + method: 'POST', + data: { + maxResults: parameters?.maxResults, + priorities: parameters?.priorities, + projects: parameters?.projects, + schemeId: parameters?.schemeId, + startAt: parameters?.startAt, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * priorities available for adding to a priority scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async getAvailablePrioritiesByPriorityScheme>( + parameters: Parameters.GetAvailablePrioritiesByPriorityScheme, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * priorities available for adding to a priority scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async getAvailablePrioritiesByPriorityScheme>( + parameters: Parameters.GetAvailablePrioritiesByPriorityScheme, + callback?: never, + ): Promise; + async getAvailablePrioritiesByPriorityScheme>( + parameters: Parameters.GetAvailablePrioritiesByPriorityScheme, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/priorityscheme/priorities/available', + method: 'GET', + params: { + startAt: parameters.startAt, + maxResults: parameters.maxResults, + query: parameters.query, + schemeId: parameters.schemeId, + exclude: parameters.exclude, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Updates a priority scheme. This includes its details, the lists of priorities and projects in it + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async updatePriorityScheme( + parameters: Parameters.UpdatePriorityScheme, + callback: Callback, + ): Promise; + /** + * Updates a priority scheme. This includes its details, the lists of priorities and projects in it + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async updatePriorityScheme( + parameters: Parameters.UpdatePriorityScheme, + callback?: never, + ): Promise; + async updatePriorityScheme( + parameters: Parameters.UpdatePriorityScheme, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/priorityscheme/${parameters.schemeId}`, + method: 'PUT', + data: { + defaultPriorityId: parameters.defaultPriorityId, + description: parameters.description, + mappings: parameters.mappings, + name: parameters.name, + priorities: parameters.priorities, + projects: parameters.projects, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Deletes a priority scheme. + * + * This operation is only available for priority schemes without any associated projects. Any associated projects must + * be removed from the priority scheme before this operation can be performed. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async deletePriorityScheme( + parameters: Parameters.DeletePriorityScheme, + callback: Callback, + ): Promise; + /** + * Deletes a priority scheme. + * + * This operation is only available for priority schemes without any associated projects. Any associated projects must + * be removed from the priority scheme before this operation can be performed. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async deletePriorityScheme(parameters: Parameters.DeletePriorityScheme, callback?: never): Promise; + async deletePriorityScheme( + parameters: Parameters.DeletePriorityScheme, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/priorityscheme/${parameters.schemeId}`, + method: 'DELETE', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * priorities by scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async getPrioritiesByPriorityScheme>( + parameters: Parameters.GetPrioritiesByPriorityScheme, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * priorities by scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async getPrioritiesByPriorityScheme>( + parameters: Parameters.GetPrioritiesByPriorityScheme, + callback?: never, + ): Promise; + async getPrioritiesByPriorityScheme>( + parameters: Parameters.GetPrioritiesByPriorityScheme, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/priorityscheme/${parameters.schemeId}/priorities`, + method: 'GET', + params: { + startAt: parameters.startAt, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * projects by scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async getProjectsByPriorityScheme( + parameters: Parameters.GetProjectsByPriorityScheme, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * projects by scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * Permission to access Jira. + */ + async getProjectsByPriorityScheme( + parameters: Parameters.GetProjectsByPriorityScheme, + callback?: never, + ): Promise; + async getProjectsByPriorityScheme( + parameters: Parameters.GetProjectsByPriorityScheme, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/priorityscheme/${parameters.schemeId}/projects`, + method: 'GET', + params: { + startAt: parameters.startAt, + maxResults: parameters.maxResults, + projectId: paramSerializer('projectId', parameters.projectId), + query: parameters.query, + }, + }; + + return this.client.sendRequest(config, callback); + } +} diff --git a/src/version2/projectAvatars.ts b/src/version2/projectAvatars.ts index 0fe7bb7c80..74c5b9724b 100644 --- a/src/version2/projectAvatars.ts +++ b/src/version2/projectAvatars.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ProjectAvatars { @@ -77,12 +77,6 @@ export class ProjectAvatars { /** * Loads an avatar for a project. * - * Specify the avatar's local file location in the body of the request. Also, include the following headers: - * - * - `X-Atlassian-Token: no-check` To prevent XSRF protection blocking the request, for more information see [Special - * Headers](#special-request-headers). - * - `Content-Type: image/image type` Valid image types are JPEG, GIF, or PNG. - * * The 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. * @@ -101,12 +95,6 @@ export class ProjectAvatars { /** * Loads an avatar for a project. * - * Specify the avatar's local file location in the body of the request. Also, include the following headers: - * - * - `X-Atlassian-Token: no-check` To prevent XSRF protection blocking the request, for more information see [Special - * Headers](#special-request-headers). - * - `Content-Type: image/image type` Valid image types are JPEG, GIF, or PNG. - * * The 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. * @@ -129,10 +117,14 @@ export class ProjectAvatars { const config: RequestConfig = { url: `/rest/api/2/project/${parameters.projectIdOrKey}/avatar2`, method: 'POST', + headers: { + 'X-Atlassian-Token': 'no-check', + 'Content-Type': parameters.mimeType, + }, params: { x: parameters.x, y: parameters.y, - size: parameters.size, + size: parameters.size ?? 0, }, data: parameters.avatar, }; diff --git a/src/version2/projectCategories.ts b/src/version2/projectCategories.ts index 407ac3636d..d4681ece7d 100644 --- a/src/version2/projectCategories.ts +++ b/src/version2/projectCategories.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ProjectCategories { diff --git a/src/version2/projectClassificationLevels.ts b/src/version2/projectClassificationLevels.ts new file mode 100644 index 0000000000..4fcb8ab936 --- /dev/null +++ b/src/version2/projectClassificationLevels.ts @@ -0,0 +1,121 @@ +import * as Parameters from './parameters'; +import { Client } from '../clients'; +import { Callback } from '../callback'; +import { RequestConfig } from '../requestConfig'; + +export class ProjectClassificationLevels { + constructor(private client: Client) {} + + /** + * Returns the default data classification for a project. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Browse Projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * - _Administer projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * - _Administer jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getDefaultProjectClassification( + parameters: Parameters.GetDefaultProjectClassification, + callback: Callback, + ): Promise; + /** + * Returns the default data classification for a project. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Browse Projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * - _Administer projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * - _Administer jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getDefaultProjectClassification( + parameters: Parameters.GetDefaultProjectClassification, + callback?: never, + ): Promise; + async getDefaultProjectClassification( + parameters: Parameters.GetDefaultProjectClassification, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/project/${parameters.projectIdOrKey}/classification-level/default`, + method: 'GET', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Updates the default data classification level for a project. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * - _Administer jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async updateDefaultProjectClassification( + parameters: Parameters.UpdateDefaultProjectClassification, + callback: Callback, + ): Promise; + /** + * Updates the default data classification level for a project. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * - _Administer jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async updateDefaultProjectClassification( + parameters: Parameters.UpdateDefaultProjectClassification, + callback?: never, + ): Promise; + async updateDefaultProjectClassification( + parameters: Parameters.UpdateDefaultProjectClassification, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/project/${parameters.projectIdOrKey}/classification-level/default`, + method: 'PUT', + data: { + id: parameters.id, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Remove the default data classification level for a project. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * - _Administer jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async removeDefaultProjectClassification( + parameters: Parameters.RemoveDefaultProjectClassification, + callback: Callback, + ): Promise; + /** + * Remove the default data classification level for a project. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * - _Administer jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async removeDefaultProjectClassification( + parameters: Parameters.RemoveDefaultProjectClassification, + callback?: never, + ): Promise; + async removeDefaultProjectClassification( + parameters: Parameters.RemoveDefaultProjectClassification, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/project/${parameters.projectIdOrKey}/classification-level/default`, + method: 'DELETE', + }; + + return this.client.sendRequest(config, callback); + } +} diff --git a/src/version2/projectComponents.ts b/src/version2/projectComponents.ts index e7e7cee46f..c51564cbed 100644 --- a/src/version2/projectComponents.ts +++ b/src/version2/projectComponents.ts @@ -1,14 +1,61 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; +import { Paginated } from '../paginated'; export class ProjectComponents { constructor(private client: Client) {} /** - * Creates a component. Use components to provide containers for issues within a project. + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of all + * components in a project, including global (Compass) components when applicable. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse + * Projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + */ + async findComponentsForProjects>( + parameters: Parameters.FindComponentsForProjects | undefined, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of all + * components in a project, including global (Compass) components when applicable. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse + * Projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + */ + async findComponentsForProjects>( + parameters?: Parameters.FindComponentsForProjects, + callback?: never, + ): Promise; + async findComponentsForProjects>( + parameters?: Parameters.FindComponentsForProjects, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/component', + method: 'GET', + params: { + projectIdsOrKeys: parameters?.projectIdsOrKeys, + startAt: parameters?.startAt, + maxResults: parameters?.maxResults, + orderBy: parameters?.orderBy, + query: parameters?.query, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Creates a component. Use components to provide containers for issues within a project. Use components to provide + * containers for issues within a project. * * This operation can be accessed anonymously. * @@ -21,7 +68,8 @@ export class ProjectComponents { callback: Callback, ): Promise; /** - * Creates a component. Use components to provide containers for issues within a project. + * Creates a component. Use components to provide containers for issues within a project. Use components to provide + * containers for issues within a project. * * This operation can be accessed anonymously. * @@ -41,6 +89,7 @@ export class ProjectComponents { url: '/rest/api/2/component', method: 'POST', data: { + ari: parameters.ari, assignee: parameters.assignee, assigneeType: parameters.assigneeType, description: parameters.description, @@ -49,6 +98,7 @@ export class ProjectComponents { lead: parameters.lead, leadAccountId: parameters.leadAccountId, leadUserName: parameters.leadUserName, + metadata: parameters.metadata, name: parameters.name, project: parameters.project, projectId: parameters.projectId, @@ -180,7 +230,7 @@ export class ProjectComponents { url: `/rest/api/2/component/${id}`, method: 'DELETE', params: { - moveIssuesTo: typeof parameters !== 'string' && parameters.moveIssuesTo, + moveIssuesTo: typeof parameters !== 'string' ? parameters.moveIssuesTo : undefined, }, }; @@ -192,6 +242,11 @@ export class ProjectComponents { * * This operation can be accessed anonymously. * + * **Deprecation notice:** The required OAuth 2.0 scopes will be updated on June 15, 2024. + * + * - **Classic**: `read:jira-work` + * - **Granular**: `read:field:jira`, `read:project.component:jira` + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ async getComponentRelatedIssues( @@ -203,6 +258,11 @@ export class ProjectComponents { * * This operation can be accessed anonymously. * + * **Deprecation notice:** The required OAuth 2.0 scopes will be updated on June 15, 2024. + * + * - **Classic**: `read:jira-work` + * - **Granular**: `read:field:jira`, `read:project.component:jira` + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ async getComponentRelatedIssues( @@ -228,6 +288,9 @@ export class ProjectComponents { * components in a project. See the [Get project components](#api-rest-api-2-project-projectIdOrKey-components-get) * resource if you want to get a full list of versions without pagination. * + * If your project uses Compass components, this API will return a list of Compass components that are linked to + * issues in that project. + * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse @@ -242,6 +305,9 @@ export class ProjectComponents { * components in a project. See the [Get project components](#api-rest-api-2-project-projectIdOrKey-components-get) * resource if you want to get a full list of versions without pagination. * + * If your project uses Compass components, this API will return a list of Compass components that are linked to + * issues in that project. + * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse @@ -262,6 +328,7 @@ export class ProjectComponents { startAt: parameters.startAt, maxResults: parameters.maxResults, orderBy: parameters.orderBy, + componentSource: parameters.componentSource, query: parameters.query, }, }; @@ -274,6 +341,9 @@ export class ProjectComponents { * paginated](#api-rest-api-2-project-projectIdOrKey-component-get) resource if you want to get a full list of * components with pagination. * + * If your project uses Compass components, this API will return a paginated list of Compass components that are + * linked to issues in that project. + * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse @@ -288,6 +358,9 @@ export class ProjectComponents { * paginated](#api-rest-api-2-project-projectIdOrKey-component-get) resource if you want to get a full list of * components with pagination. * + * If your project uses Compass components, this API will return a paginated list of Compass components that are + * linked to issues in that project. + * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse @@ -306,6 +379,9 @@ export class ProjectComponents { const config: RequestConfig = { url: `/rest/api/2/project/${projectIdOrKey}/components`, method: 'GET', + params: { + componentSource: typeof parameters !== 'string' ? parameters.componentSource : undefined, + }, }; return this.client.sendRequest(config, callback); diff --git a/src/version2/projectEmail.ts b/src/version2/projectEmail.ts index 3caf5917a2..19a97e99de 100644 --- a/src/version2/projectEmail.ts +++ b/src/version2/projectEmail.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ProjectEmail { @@ -46,8 +46,9 @@ export class ProjectEmail { * * If `emailAddress` is an empty string, the default email address is restored. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse - * projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Administer Projects_ [project + * permission.](https://confluence.atlassian.com/x/yodKLg) */ async updateProjectEmail(parameters: Parameters.UpdateProjectEmail, callback: Callback): Promise; /** @@ -55,8 +56,9 @@ export class ProjectEmail { * * If `emailAddress` is an empty string, the default email address is restored. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse - * projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Administer Projects_ [project + * permission.](https://confluence.atlassian.com/x/yodKLg) */ async updateProjectEmail(parameters: Parameters.UpdateProjectEmail, callback?: never): Promise; async updateProjectEmail( diff --git a/src/version2/projectFeatures.ts b/src/version2/projectFeatures.ts index 2154dbde01..986815a724 100644 --- a/src/version2/projectFeatures.ts +++ b/src/version2/projectFeatures.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ProjectFeatures { diff --git a/src/version2/projectKeyAndNameValidation.ts b/src/version2/projectKeyAndNameValidation.ts index 44de219300..6b08bb39b8 100644 --- a/src/version2/projectKeyAndNameValidation.ts +++ b/src/version2/projectKeyAndNameValidation.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ProjectKeyAndNameValidation { @@ -47,7 +47,7 @@ export class ProjectKeyAndNameValidation { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ - async getValidProjectKey( + async getValidProjectKey( parameters: Parameters.GetValidProjectKey | string | undefined, callback: Callback, ): Promise; @@ -56,11 +56,11 @@ export class ProjectKeyAndNameValidation { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. */ - async getValidProjectKey( + async getValidProjectKey( parameters?: Parameters.GetValidProjectKey | string, callback?: never, ): Promise; - async getValidProjectKey( + async getValidProjectKey( parameters?: Parameters.GetValidProjectKey | string, callback?: Callback, ): Promise { diff --git a/src/version2/projectPermissionSchemes.ts b/src/version2/projectPermissionSchemes.ts index 6bdf11bb58..d3cf9dc73c 100644 --- a/src/version2/projectPermissionSchemes.ts +++ b/src/version2/projectPermissionSchemes.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ProjectPermissionSchemes { diff --git a/src/version2/projectProperties.ts b/src/version2/projectProperties.ts index d5bba9ec15..af82640c64 100644 --- a/src/version2/projectProperties.ts +++ b/src/version2/projectProperties.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ProjectProperties { diff --git a/src/version2/projectRoleActors.ts b/src/version2/projectRoleActors.ts index 78e26df825..ddd29b22bf 100644 --- a/src/version2/projectRoleActors.ts +++ b/src/version2/projectRoleActors.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ProjectRoleActors { diff --git a/src/version2/projectRoles.ts b/src/version2/projectRoles.ts index ece418fe7f..c4df26d9a5 100644 --- a/src/version2/projectRoles.ts +++ b/src/version2/projectRoles.ts @@ -1,15 +1,16 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ProjectRoles { constructor(private client: Client) {} /** - * Returns a list of [project roles](https://confluence.atlassian.com/x/3odKLg) for the project returning the name and - * self URL for each role. + * Returns a list of [project + * roles](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/) for the project + * returning the name and self URL for each role. * * Note that all project roles are shared with all projects in Jira Cloud. See [Get all project * roles](#api-rest-api-2-role-get) for more information. @@ -25,8 +26,9 @@ export class ProjectRoles { callback: Callback, ): Promise; /** - * Returns a list of [project roles](https://confluence.atlassian.com/x/3odKLg) for the project returning the name and - * self URL for each role. + * Returns a list of [project + * roles](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/) for the project + * returning the name and self URL for each role. * * Note that all project roles are shared with all projects in Jira Cloud. See [Get all project * roles](#api-rest-api-2-role-get) for more information. @@ -104,8 +106,8 @@ export class ProjectRoles { } /** - * 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. + * Returns all [project roles](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/) and + * the details for each role. Note that the list of project roles is common to all projects. * * This operation can be accessed anonymously. * @@ -118,8 +120,8 @@ export class ProjectRoles { callback: Callback, ): Promise; /** - * 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. + * Returns all [project roles](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/) and + * the details for each role. Note that the list of project roles is common to all projects. * * This operation can be accessed anonymously. * @@ -141,8 +143,8 @@ export class ProjectRoles { url: `/rest/api/2/project/${projectIdOrKey}/roledetails`, method: 'GET', params: { - currentMember: typeof parameters !== 'string' && parameters.currentMember, - excludeConnectAddons: typeof parameters !== 'string' && parameters.excludeConnectAddons, + currentMember: typeof parameters !== 'string' ? parameters.currentMember : undefined, + excludeConnectAddons: typeof parameters !== 'string' ? parameters.excludeConnectAddons : undefined, }, }; @@ -154,10 +156,10 @@ export class ProjectRoles { * * ### About project roles * - * [Project roles](https://confluence.atlassian.com/x/3odKLg) are a flexible way to to associate users and groups with - * projects. In Jira Cloud, the list of project roles is shared globally with all projects, but each project can have - * a different set of actors associated with it (unlike groups, which have the same membership throughout all Jira - * applications). + * [Project roles](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/) are a flexible + * way to to associate users and groups with projects. In Jira Cloud, the list of project roles is shared globally + * with all projects, but each project can have a different set of actors associated with it (unlike groups, which + * have the same membership throughout all Jira applications). * * Project roles are used in [permission schemes](#api-rest-api-2-permissionscheme-get), [email notification * schemes](#api-rest-api-2-notificationscheme-get), [issue security @@ -170,7 +172,7 @@ export class ProjectRoles { * with a project role. * * Actors may be set as [default - * members](https://confluence.atlassian.com/x/3odKLg#Managingprojectroles-Specifying'defaultmembers'foraprojectrole) + * members](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/#Specifying-'default-members'-for-a-project-role) * of the project role or set at the project level: * * - Default actors: Users and groups that are assigned to the project role for all newly created projects. The default @@ -187,10 +189,10 @@ export class ProjectRoles { * * ### About project roles * - * [Project roles](https://confluence.atlassian.com/x/3odKLg) are a flexible way to to associate users and groups with - * projects. In Jira Cloud, the list of project roles is shared globally with all projects, but each project can have - * a different set of actors associated with it (unlike groups, which have the same membership throughout all Jira - * applications). + * [Project roles](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/) are a flexible + * way to to associate users and groups with projects. In Jira Cloud, the list of project roles is shared globally + * with all projects, but each project can have a different set of actors associated with it (unlike groups, which + * have the same membership throughout all Jira applications). * * Project roles are used in [permission schemes](#api-rest-api-2-permissionscheme-get), [email notification * schemes](#api-rest-api-2-notificationscheme-get), [issue security @@ -203,7 +205,7 @@ export class ProjectRoles { * with a project role. * * Actors may be set as [default - * members](https://confluence.atlassian.com/x/3odKLg#Managingprojectroles-Specifying'defaultmembers'foraprojectrole) + * members](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/#Specifying-'default-members'-for-a-project-role) * of the project role or set at the project level: * * - Default actors: Users and groups that are assigned to the project role for all newly created projects. The default @@ -262,8 +264,8 @@ export class ProjectRoles { url: '/rest/api/2/role', method: 'POST', data: { - name: parameters.name, description: parameters.description, + name: parameters.name, }, }; @@ -340,8 +342,8 @@ export class ProjectRoles { url: `/rest/api/2/role/${parameters.id}`, method: 'POST', data: { - name: parameters.name, description: parameters.description, + name: parameters.name, }, }; @@ -376,8 +378,8 @@ export class ProjectRoles { url: `/rest/api/2/role/${parameters.id}`, method: 'PUT', data: { - name: parameters.name, description: parameters.description, + name: parameters.name, }, }; @@ -413,7 +415,7 @@ export class ProjectRoles { url: `/rest/api/2/role/${id}`, method: 'DELETE', params: { - swap: typeof parameters !== 'string' && parameters.swap, + swap: typeof parameters !== 'string' ? parameters.swap : undefined, }, }; diff --git a/src/version2/projectTypes.ts b/src/version2/projectTypes.ts index 82475d06a6..ece0379b00 100644 --- a/src/version2/projectTypes.ts +++ b/src/version2/projectTypes.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ProjectTypes { diff --git a/src/version2/projectVersions.ts b/src/version2/projectVersions.ts index 4db643ba64..84a97aaf51 100644 --- a/src/version2/projectVersions.ts +++ b/src/version2/projectVersions.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ProjectVersions { @@ -45,12 +45,12 @@ export class ProjectVersions { url: `/rest/api/2/project/${projectIdOrKey}/version`, method: 'GET', params: { - startAt: typeof parameters !== 'string' && parameters.startAt, - maxResults: typeof parameters !== 'string' && parameters.maxResults, - orderBy: typeof parameters !== 'string' && parameters.orderBy, - query: typeof parameters !== 'string' && parameters.query, - status: typeof parameters !== 'string' && parameters.status, - expand: typeof parameters !== 'string' && parameters.expand, + startAt: typeof parameters !== 'string' ? parameters.startAt : undefined, + maxResults: typeof parameters !== 'string' ? parameters.maxResults : undefined, + orderBy: typeof parameters !== 'string' ? parameters.orderBy : undefined, + query: typeof parameters !== 'string' ? parameters.query : undefined, + status: typeof parameters !== 'string' ? parameters.status : undefined, + expand: typeof parameters !== 'string' ? parameters.expand : undefined, }, }; @@ -95,7 +95,7 @@ export class ProjectVersions { url: `/rest/api/2/project/${projectIdOrKey}/versions`, method: 'GET', params: { - expand: typeof parameters !== 'string' && parameters.expand, + expand: typeof parameters !== 'string' ? parameters.expand : undefined, }, }; @@ -130,22 +130,24 @@ export class ProjectVersions { url: '/rest/api/2/version', method: 'POST', data: { + approvers: parameters.approvers, + archived: parameters.archived, + description: parameters.description, + driver: parameters.driver, expand: parameters.expand, - self: parameters.self, id: parameters.id, - description: parameters.description, + issuesStatusForFixVersion: parameters.issuesStatusForFixVersion, + moveUnfixedIssuesTo: parameters.moveUnfixedIssuesTo, name: parameters.name, - archived: parameters.archived, + operations: parameters.operations, + overdue: parameters.overdue, + projectId: parameters.projectId, + releaseDate: parameters.releaseDate, released: parameters.released, + self: parameters.self, startDate: parameters.startDate, - releaseDate: parameters.releaseDate, - overdue: parameters.overdue, - userStartDate: parameters.userStartDate, userReleaseDate: parameters.userReleaseDate, - projectId: parameters.projectId, - moveUnfixedIssuesTo: parameters.moveUnfixedIssuesTo, - operations: parameters.operations, - issuesStatusForFixVersion: parameters.issuesStatusForFixVersion, + userStartDate: parameters.userStartDate, }, }; @@ -183,7 +185,7 @@ export class ProjectVersions { url: `/rest/api/2/version/${id}`, method: 'GET', params: { - expand: typeof parameters !== 'string' && parameters.expand, + expand: typeof parameters !== 'string' ? parameters.expand : undefined, }, }; @@ -218,6 +220,8 @@ export class ProjectVersions { url: `/rest/api/2/version/${parameters.id}`, method: 'PUT', data: { + approvers: parameters.approvers, + driver: parameters.driver, expand: parameters.expand, description: parameters.description, name: parameters.name, @@ -347,6 +351,140 @@ export class ProjectVersions { return this.client.sendRequest(config, callback); } + /** + * Returns related work items for the given version id. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse + * projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the version. + */ + async getRelatedWork( + parameters: Parameters.GetRelatedWork, + callback: Callback, + ): Promise; + /** + * Returns related work items for the given version id. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse + * projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the version. + */ + async getRelatedWork( + parameters: Parameters.GetRelatedWork, + callback?: never, + ): Promise; + async getRelatedWork( + parameters: Parameters.GetRelatedWork, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/version/${parameters.id}/relatedwork`, + method: 'GET', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Creates a related work for the given version. You can only create a generic link type of related works via this + * API. relatedWorkId will be auto-generated UUID, that does not need to be provided. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Resolve issues:_ and _Edit issues_ [Managing project + * permissions](https://confluence.atlassian.com/adminjiraserver/managing-project-permissions-938847145.html) for the + * project that contains the version. + */ + async createRelatedWork( + parameters: Parameters.CreateRelatedWork, + callback: Callback, + ): Promise; + /** + * Creates a related work for the given version. You can only create a generic link type of related works via this + * API. relatedWorkId will be auto-generated UUID, that does not need to be provided. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Resolve issues:_ and _Edit issues_ [Managing project + * permissions](https://confluence.atlassian.com/adminjiraserver/managing-project-permissions-938847145.html) for the + * project that contains the version. + */ + async createRelatedWork( + parameters: Parameters.CreateRelatedWork, + callback?: never, + ): Promise; + async createRelatedWork( + parameters: Parameters.CreateRelatedWork, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/version/${parameters.id}/relatedwork`, + method: 'POST', + data: { + category: parameters.category, + issueId: parameters.issueId, + relatedWorkId: parameters.relatedWorkId, + title: parameters.title, + url: parameters.url, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Updates the given related work. You can only update generic link related works via Rest APIs. Any archived version + * related works can't be edited. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Resolve issues:_ and _Edit issues_ [Managing project + * permissions](https://confluence.atlassian.com/adminjiraserver/managing-project-permissions-938847145.html) for the + * project that contains the version. + */ + async updateRelatedWork( + parameters: Parameters.UpdateRelatedWork, + callback: Callback, + ): Promise; + /** + * Updates the given related work. You can only update generic link related works via Rest APIs. Any archived version + * related works can't be edited. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Resolve issues:_ and _Edit issues_ [Managing project + * permissions](https://confluence.atlassian.com/adminjiraserver/managing-project-permissions-938847145.html) for the + * project that contains the version. + */ + async updateRelatedWork( + parameters: Parameters.UpdateRelatedWork, + callback?: never, + ): Promise; + async updateRelatedWork( + parameters: Parameters.UpdateRelatedWork, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/version/${parameters.id}/relatedwork`, + method: 'PUT', + data: { + category: parameters.category, + issueId: parameters.issueId, + relatedWorkId: parameters.relatedWorkId, + title: parameters.title, + url: parameters.url, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Deletes a project version. * @@ -390,9 +528,9 @@ export class ProjectVersions { url: `/rest/api/2/version/${parameters.id}/removeAndSwap`, method: 'POST', data: { - moveFixIssuesTo: parameters.moveFixIssuesTo, - moveAffectedIssuesTo: parameters.moveAffectedIssuesTo, customFieldReplacementList: parameters.customFieldReplacementList, + moveAffectedIssuesTo: parameters.moveAffectedIssuesTo, + moveFixIssuesTo: parameters.moveFixIssuesTo, }, }; @@ -436,4 +574,38 @@ export class ProjectVersions { return this.client.sendRequest(config, callback); } + + /** + * Deletes the given related work for the given version. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Resolve issues:_ and _Edit issues_ [Managing project + * permissions](https://confluence.atlassian.com/adminjiraserver/managing-project-permissions-938847145.html) for the + * project that contains the version. + */ + async deleteRelatedWork(parameters: Parameters.DeleteRelatedWork, callback: Callback): Promise; + /** + * Deletes the given related work for the given version. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Resolve issues:_ and _Edit issues_ [Managing project + * permissions](https://confluence.atlassian.com/adminjiraserver/managing-project-permissions-938847145.html) for the + * project that contains the version. + */ + async deleteRelatedWork(parameters: Parameters.DeleteRelatedWork, callback?: never): Promise; + async deleteRelatedWork( + parameters: Parameters.DeleteRelatedWork, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/version/${parameters.versionId}/relatedwork/${parameters.relatedWorkId}`, + method: 'DELETE', + }; + + return this.client.sendRequest(config, callback); + } } diff --git a/src/version2/projects.ts b/src/version2/projects.ts index 0ad37105c4..27b71982d9 100644 --- a/src/version2/projects.ts +++ b/src/version2/projects.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Projects { @@ -10,11 +10,11 @@ export class Projects { /** * Creates a project based on a project type template, as shown in the following table: * - * | Project Type Key | Project Template Key | - * | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `business` | `com.atlassian.jira-core-project-templates:jira-core-simplified-content-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval`, `com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking`, `com.atlassian.jira-core-project-templates:jira-core-simplified-process-control`, `com.atlassian.jira-core-project-templates:jira-core-simplified-procurement`, `com.atlassian.jira-core-project-templates:jira-core-simplified-project-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment`, `com.atlassian.jira-core-project-templates:jira-core-simplified-task-tracking` | - * | `service_desk` | `com.atlassian.servicedesk:simplified-it-service-management`, `com.atlassian.servicedesk:simplified-general-service-desk-it`, `com.atlassian.servicedesk:simplified-general-service-desk-business`, `com.atlassian.servicedesk:simplified-external-service-desk`, `com.atlassian.servicedesk:simplified-hr-service-desk`, `com.atlassian.servicedesk:simplified-facilities-service-desk`, `com.atlassian.servicedesk:simplified-legal-service-desk`, `com.atlassian.servicedesk:simplified-analytics-service-desk`, `com.atlassian.servicedesk:simplified-marketing-service-desk`, `com.atlassian.servicedesk:simplified-design-service-desk`, `com.atlassian.servicedesk:simplified-sales-service-desk`, `com.atlassian.servicedesk:simplified-finance-service-desk`, `com.atlassian.servicedesk:next-gen-it-service-desk`, `com.atlassian.servicedesk:next-gen-hr-service-desk`, `com.atlassian.servicedesk:next-gen-legal-service-desk`, `com.atlassian.servicedesk:next-gen-marketing-service-desk`, `com.atlassian.servicedesk:next-gen-facilities-service-desk`, `com.atlassian.servicedesk:next-gen-general-service-desk`, `com.atlassian.servicedesk:next-gen-general-it-service-desk`, `com.atlassian.servicedesk:next-gen-general-business-service-desk`, `com.atlassian.servicedesk:next-gen-analytics-service-desk`, `com.atlassian.servicedesk:next-gen-finance-service-desk`, `com.atlassian.servicedesk:next-gen-design-service-desk`, `com.atlassian.servicedesk:next-gen-sales-service-desk` | - * | `software` | `com.pyxis.greenhopper.jira:gh-simplified-agility-kanban`, `com.pyxis.greenhopper.jira:gh-simplified-agility-scrum`, `com.pyxis.greenhopper.jira:gh-simplified-basic`, `com.pyxis.greenhopper.jira:gh-simplified-kanban-classic`, `com.pyxis.greenhopper.jira:gh-simplified-scrum-classic` | + * | Project Type Key | Project Template Key | + * | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `business` | `com.atlassian.jira-core-project-templates:jira-core-simplified-content-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval`, `com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking`, `com.atlassian.jira-core-project-templates:jira-core-simplified-process-control`, `com.atlassian.jira-core-project-templates:jira-core-simplified-procurement`, `com.atlassian.jira-core-project-templates:jira-core-simplified-project-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment`, `com.atlassian.jira-core-project-templates:jira-core-simplified-task-tracking` | + * | `service_desk` | `com.atlassian.servicedesk:simplified-it-service-management`, `com.atlassian.servicedesk:simplified-general-service-desk-it`, `com.atlassian.servicedesk:simplified-general-service-desk-business`, `com.atlassian.servicedesk:simplified-external-service-desk`, `com.atlassian.servicedesk:simplified-hr-service-desk`, `com.atlassian.servicedesk:simplified-facilities-service-desk`, `com.atlassian.servicedesk:simplified-legal-service-desk`, `com.atlassian.servicedesk:simplified-analytics-service-desk`, `com.atlassian.servicedesk:simplified-marketing-service-desk`, `com.atlassian.servicedesk:simplified-design-service-desk`, `com.atlassian.servicedesk:simplified-sales-service-desk`, `com.atlassian.servicedesk:simplified-blank-project-business`, `com.atlassian.servicedesk:simplified-blank-project-it`, `com.atlassian.servicedesk:simplified-finance-service-desk`, `com.atlassian.servicedesk:next-gen-it-service-desk`, `com.atlassian.servicedesk:next-gen-hr-service-desk`, `com.atlassian.servicedesk:next-gen-legal-service-desk`, `com.atlassian.servicedesk:next-gen-marketing-service-desk`, `com.atlassian.servicedesk:next-gen-facilities-service-desk`, `com.atlassian.servicedesk:next-gen-general-it-service-desk`, `com.atlassian.servicedesk:next-gen-general-business-service-desk`, `com.atlassian.servicedesk:next-gen-analytics-service-desk`, `com.atlassian.servicedesk:next-gen-finance-service-desk`, `com.atlassian.servicedesk:next-gen-design-service-desk`, `com.atlassian.servicedesk:next-gen-sales-service-desk` | + * | `software` | `com.pyxis.greenhopper.jira:gh-simplified-agility-kanban`, `com.pyxis.greenhopper.jira:gh-simplified-agility-scrum`, `com.pyxis.greenhopper.jira:gh-simplified-basic`, `com.pyxis.greenhopper.jira:gh-simplified-kanban-classic`, `com.pyxis.greenhopper.jira:gh-simplified-scrum-classic` | * * The project types are available according to the installed Jira features as follows: * @@ -37,11 +37,11 @@ export class Projects { /** * Creates a project based on a project type template, as shown in the following table: * - * | Project Type Key | Project Template Key | - * | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `business` | `com.atlassian.jira-core-project-templates:jira-core-simplified-content-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval`, `com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking`, `com.atlassian.jira-core-project-templates:jira-core-simplified-process-control`, `com.atlassian.jira-core-project-templates:jira-core-simplified-procurement`, `com.atlassian.jira-core-project-templates:jira-core-simplified-project-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment`, `com.atlassian.jira-core-project-templates:jira-core-simplified-task-tracking` | - * | `service_desk` | `com.atlassian.servicedesk:simplified-it-service-management`, `com.atlassian.servicedesk:simplified-general-service-desk-it`, `com.atlassian.servicedesk:simplified-general-service-desk-business`, `com.atlassian.servicedesk:simplified-external-service-desk`, `com.atlassian.servicedesk:simplified-hr-service-desk`, `com.atlassian.servicedesk:simplified-facilities-service-desk`, `com.atlassian.servicedesk:simplified-legal-service-desk`, `com.atlassian.servicedesk:simplified-analytics-service-desk`, `com.atlassian.servicedesk:simplified-marketing-service-desk`, `com.atlassian.servicedesk:simplified-design-service-desk`, `com.atlassian.servicedesk:simplified-sales-service-desk`, `com.atlassian.servicedesk:simplified-finance-service-desk`, `com.atlassian.servicedesk:next-gen-it-service-desk`, `com.atlassian.servicedesk:next-gen-hr-service-desk`, `com.atlassian.servicedesk:next-gen-legal-service-desk`, `com.atlassian.servicedesk:next-gen-marketing-service-desk`, `com.atlassian.servicedesk:next-gen-facilities-service-desk`, `com.atlassian.servicedesk:next-gen-general-service-desk`, `com.atlassian.servicedesk:next-gen-general-it-service-desk`, `com.atlassian.servicedesk:next-gen-general-business-service-desk`, `com.atlassian.servicedesk:next-gen-analytics-service-desk`, `com.atlassian.servicedesk:next-gen-finance-service-desk`, `com.atlassian.servicedesk:next-gen-design-service-desk`, `com.atlassian.servicedesk:next-gen-sales-service-desk` | - * | `software` | `com.pyxis.greenhopper.jira:gh-simplified-agility-kanban`, `com.pyxis.greenhopper.jira:gh-simplified-agility-scrum`, `com.pyxis.greenhopper.jira:gh-simplified-basic`, `com.pyxis.greenhopper.jira:gh-simplified-kanban-classic`, `com.pyxis.greenhopper.jira:gh-simplified-scrum-classic` | + * | Project Type Key | Project Template Key | + * | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `business` | `com.atlassian.jira-core-project-templates:jira-core-simplified-content-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval`, `com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking`, `com.atlassian.jira-core-project-templates:jira-core-simplified-process-control`, `com.atlassian.jira-core-project-templates:jira-core-simplified-procurement`, `com.atlassian.jira-core-project-templates:jira-core-simplified-project-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment`, `com.atlassian.jira-core-project-templates:jira-core-simplified-task-tracking` | + * | `service_desk` | `com.atlassian.servicedesk:simplified-it-service-management`, `com.atlassian.servicedesk:simplified-general-service-desk-it`, `com.atlassian.servicedesk:simplified-general-service-desk-business`, `com.atlassian.servicedesk:simplified-external-service-desk`, `com.atlassian.servicedesk:simplified-hr-service-desk`, `com.atlassian.servicedesk:simplified-facilities-service-desk`, `com.atlassian.servicedesk:simplified-legal-service-desk`, `com.atlassian.servicedesk:simplified-analytics-service-desk`, `com.atlassian.servicedesk:simplified-marketing-service-desk`, `com.atlassian.servicedesk:simplified-design-service-desk`, `com.atlassian.servicedesk:simplified-sales-service-desk`, `com.atlassian.servicedesk:simplified-blank-project-business`, `com.atlassian.servicedesk:simplified-blank-project-it`, `com.atlassian.servicedesk:simplified-finance-service-desk`, `com.atlassian.servicedesk:next-gen-it-service-desk`, `com.atlassian.servicedesk:next-gen-hr-service-desk`, `com.atlassian.servicedesk:next-gen-legal-service-desk`, `com.atlassian.servicedesk:next-gen-marketing-service-desk`, `com.atlassian.servicedesk:next-gen-facilities-service-desk`, `com.atlassian.servicedesk:next-gen-general-it-service-desk`, `com.atlassian.servicedesk:next-gen-general-business-service-desk`, `com.atlassian.servicedesk:next-gen-analytics-service-desk`, `com.atlassian.servicedesk:next-gen-finance-service-desk`, `com.atlassian.servicedesk:next-gen-design-service-desk`, `com.atlassian.servicedesk:next-gen-sales-service-desk` | + * | `software` | `com.pyxis.greenhopper.jira:gh-simplified-agility-kanban`, `com.pyxis.greenhopper.jira:gh-simplified-agility-scrum`, `com.pyxis.greenhopper.jira:gh-simplified-basic`, `com.pyxis.greenhopper.jira:gh-simplified-kanban-classic`, `com.pyxis.greenhopper.jira:gh-simplified-scrum-classic` | * * The project types are available according to the installed Jira features as follows: * @@ -223,8 +223,8 @@ export class Projects { url: `/rest/api/2/project/${projectIdOrKey}`, method: 'GET', params: { - expand: typeof parameters !== 'string' && parameters.expand, - properties: typeof parameters !== 'string' && parameters.properties, + expand: typeof parameters !== 'string' ? parameters.expand : undefined, + properties: typeof parameters !== 'string' ? parameters.properties : undefined, }, }; @@ -278,6 +278,7 @@ export class Projects { permissionScheme: parameters.permissionScheme, projectTemplateKey: parameters.projectTemplateKey, projectTypeKey: parameters.projectTypeKey, + releasedProjectKeys: parameters.releasedProjectKeys, url: parameters.url, }, }; @@ -315,7 +316,7 @@ export class Projects { url: `/rest/api/2/project/${projectIdOrKey}`, method: 'DELETE', params: { - enableUndo: typeof parameters !== 'string' && parameters.enableUndo, + enableUndo: typeof parameters !== 'string' ? parameters.enableUndo : undefined, }, }; @@ -556,7 +557,7 @@ export class Projects { url: `/rest/api/2/project/${projectKeyOrId}/notificationscheme`, method: 'GET', params: { - expand: typeof parameters !== 'string' && parameters.expand, + expand: typeof parameters !== 'string' ? parameters.expand : undefined, }, }; diff --git a/src/version2/screenSchemes.ts b/src/version2/screenSchemes.ts index 15947007af..de31c939e5 100644 --- a/src/version2/screenSchemes.ts +++ b/src/version2/screenSchemes.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ScreenSchemes { diff --git a/src/version2/screenTabFields.ts b/src/version2/screenTabFields.ts index e92889417c..e30fa6afc3 100644 --- a/src/version2/screenTabFields.ts +++ b/src/version2/screenTabFields.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ScreenTabFields { diff --git a/src/version2/screenTabs.ts b/src/version2/screenTabs.ts index ce6364cc8e..8617cc52bf 100644 --- a/src/version2/screenTabs.ts +++ b/src/version2/screenTabs.ts @@ -1,12 +1,49 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ScreenTabs { constructor(private client: Client) {} + /** + * Returns the list of tabs for a bulk of screens. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getBulkScreenTabs( + parameters: Parameters.GetBulkScreenTabs | undefined, + callback: Callback, + ): Promise; + /** + * Returns the list of tabs for a bulk of screens. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getBulkScreenTabs(parameters?: Parameters.GetBulkScreenTabs, callback?: never): Promise; + async getBulkScreenTabs( + parameters?: Parameters.GetBulkScreenTabs, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/screens/tabs', + method: 'GET', + params: { + screenId: parameters?.screenId, + tabId: parameters?.tabId, + startAt: parameters?.startAt, + maxResult: parameters?.maxResult, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Returns the list of tabs for a screen. * diff --git a/src/version2/screens.ts b/src/version2/screens.ts index f48782532e..c3b6b9a373 100644 --- a/src/version2/screens.ts +++ b/src/version2/screens.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Screens { diff --git a/src/version2/serverInfo.ts b/src/version2/serverInfo.ts index cbf18c43ef..93bacd002f 100644 --- a/src/version2/serverInfo.ts +++ b/src/version2/serverInfo.ts @@ -1,6 +1,6 @@ import * as Models from './models'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ServerInfo { diff --git a/src/version2/serviceRegistry.ts b/src/version2/serviceRegistry.ts new file mode 100644 index 0000000000..37b9f92701 --- /dev/null +++ b/src/version2/serviceRegistry.ts @@ -0,0 +1,38 @@ +import * as Models from './models'; +import * as Parameters from './parameters'; +import { Client } from '../clients'; +import { Callback } from '../callback'; +import { RequestConfig } from '../requestConfig'; + +export class ServiceRegistry { + constructor(private client: Client) {} + + /** + * Retrieve the attributes of given service registries. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only + * Connect apps can make this request and the servicesIds belong to the tenant you are requesting + */ + async services(parameters: Parameters.Services, callback: Callback): Promise; + /** + * Retrieve the attributes of given service registries. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Only + * Connect apps can make this request and the servicesIds belong to the tenant you are requesting + */ + async services(parameters: Parameters.Services, callback?: never): Promise; + async services( + parameters: Parameters.Services, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/atlassian-connect/1/service-registry', + method: 'GET', + params: { + serviceIds: parameters.serviceIds, + }, + }; + + return this.client.sendRequest(config, callback); + } +} diff --git a/src/version2/status.ts b/src/version2/status.ts index e42ed19945..abeba72f2c 100644 --- a/src/version2/status.ts +++ b/src/version2/status.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Status { @@ -155,7 +155,7 @@ export class Status { } /** - * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of * statuses that match a search on name or project. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** @@ -168,7 +168,7 @@ export class Status { callback: Callback, ): Promise; /** - * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of * statuses that match a search on name or project. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** @@ -193,4 +193,82 @@ export class Status { return this.client.sendRequest(config, callback); } + + /** Returns a page of issue types in a project using a given status. */ + async getProjectIssueTypeUsagesForStatus( + parameters: Parameters.GetProjectIssueTypeUsagesForStatus, + callback: Callback, + ): Promise; + /** Returns a page of issue types in a project using a given status. */ + async getProjectIssueTypeUsagesForStatus( + parameters: Parameters.GetProjectIssueTypeUsagesForStatus, + callback?: never, + ): Promise; + async getProjectIssueTypeUsagesForStatus( + parameters: Parameters.GetProjectIssueTypeUsagesForStatus, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/statuses/${parameters.statusId}/project/${parameters.projectId}/issueTypeUsages`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** Returns a page of projects using a given status. */ + async getProjectUsagesForStatus( + parameters: Parameters.GetProjectUsagesForStatus, + callback: Callback, + ): Promise; + /** Returns a page of projects using a given status. */ + async getProjectUsagesForStatus( + parameters: Parameters.GetProjectUsagesForStatus, + callback?: never, + ): Promise; + async getProjectUsagesForStatus( + parameters: Parameters.GetProjectUsagesForStatus, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/statuses/${parameters.statusId}/projectUsages`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** Returns a page of workflows using a given status. */ + async getWorkflowUsagesForStatus( + parameters: Parameters.GetWorkflowUsagesForStatus, + callback: Callback, + ): Promise; + /** Returns a page of workflows using a given status. */ + async getWorkflowUsagesForStatus( + parameters: Parameters.GetWorkflowUsagesForStatus, + callback?: never, + ): Promise; + async getWorkflowUsagesForStatus( + parameters: Parameters.GetWorkflowUsagesForStatus, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/statuses/${parameters.statusId}/workflowUsages`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } } diff --git a/src/version2/tasks.ts b/src/version2/tasks.ts index a6e0a82943..4f1df0dcb3 100644 --- a/src/version2/tasks.ts +++ b/src/version2/tasks.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Tasks { @@ -15,6 +15,10 @@ export class Tasks { * operation that created the task for details. Task details are not permanently retained. As of September 2019, * details are retained for 14 days although this period may change without notice. * + * **Deprecation notice:** The required OAuth 2.0 scopes will be updated on June 15, 2024. + * + * - `read:jira-work` + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** either * of: * @@ -33,6 +37,10 @@ export class Tasks { * operation that created the task for details. Task details are not permanently retained. As of September 2019, * details are retained for 14 days although this period may change without notice. * + * **Deprecation notice:** The required OAuth 2.0 scopes will be updated on June 15, 2024. + * + * - `read:jira-work` + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** either * of: * diff --git a/src/version2/teamsInPlan.ts b/src/version2/teamsInPlan.ts new file mode 100644 index 0000000000..8939971c3f --- /dev/null +++ b/src/version2/teamsInPlan.ts @@ -0,0 +1,322 @@ +import * as Models from './models'; +import * as Parameters from './parameters'; +import { Client } from '../clients'; +import { Callback } from '../callback'; +import { RequestConfig } from '../requestConfig'; + +export class TeamsInPlan { + constructor(private client: Client) {} + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * plan-only and Atlassian teams in a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getTeams( + parameters: Parameters.GetTeams, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of + * plan-only and Atlassian teams in a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getTeams( + parameters: Parameters.GetTeams, + callback?: never, + ): Promise; + async getTeams( + parameters: Parameters.GetTeams, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}/team`, + method: 'GET', + params: { + cursor: parameters.cursor, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Adds an existing Atlassian team to a plan and configures their plannning settings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async addAtlassianTeam(parameters: Parameters.AddAtlassianTeam, callback: Callback): Promise; + /** + * Adds an existing Atlassian team to a plan and configures their plannning settings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async addAtlassianTeam(parameters: Parameters.AddAtlassianTeam, callback?: never): Promise; + async addAtlassianTeam(parameters: Parameters.AddAtlassianTeam, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}/team/atlassian`, + method: 'POST', + data: { + capacity: parameters.capacity, + id: parameters.id, + issueSourceId: parameters.issueSourceId, + planningStyle: parameters.planningStyle, + sprintLength: parameters.sprintLength, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns planning settings for an Atlassian team in a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getAtlassianTeam( + parameters: Parameters.GetAtlassianTeam, + callback: Callback, + ): Promise; + /** + * Returns planning settings for an Atlassian team in a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getAtlassianTeam( + parameters: Parameters.GetAtlassianTeam, + callback?: never, + ): Promise; + async getAtlassianTeam( + parameters: Parameters.GetAtlassianTeam, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}/team/atlassian/${parameters.atlassianTeamId}`, + method: 'GET', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Updates any of the following planning settings of an Atlassian team in a plan using [JSON + * Patch](https://datatracker.ietf.org/doc/html/rfc6902). + * + * - PlanningStyle + * - IssueSourceId + * - SprintLength + * - Capacity + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * + * _Note that "add" operations do not respect array indexes in target locations. Call the "Get Atlassian team in plan" + * endpoint to find out the order of array elements._ + */ + async updateAtlassianTeam(parameters: Parameters.UpdateAtlassianTeam, callback: Callback): Promise; + /** + * Updates any of the following planning settings of an Atlassian team in a plan using [JSON + * Patch](https://datatracker.ietf.org/doc/html/rfc6902). + * + * - PlanningStyle + * - IssueSourceId + * - SprintLength + * - Capacity + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * + * _Note that "add" operations do not respect array indexes in target locations. Call the "Get Atlassian team in plan" + * endpoint to find out the order of array elements._ + */ + async updateAtlassianTeam(parameters: Parameters.UpdateAtlassianTeam, callback?: never): Promise; + async updateAtlassianTeam( + parameters: Parameters.UpdateAtlassianTeam, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}/team/atlassian/${parameters.atlassianTeamId}`, + method: 'PUT', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Removes an Atlassian team from a plan and deletes their planning settings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async removeAtlassianTeam(parameters: Parameters.RemoveAtlassianTeam, callback: Callback): Promise; + /** + * Removes an Atlassian team from a plan and deletes their planning settings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async removeAtlassianTeam(parameters: Parameters.RemoveAtlassianTeam, callback?: never): Promise; + async removeAtlassianTeam( + parameters: Parameters.RemoveAtlassianTeam, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}/team/atlassian/${parameters.atlassianTeamId}`, + method: 'DELETE', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Creates a plan-only team and configures their planning settings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async createPlanOnlyTeam( + parameters: Parameters.CreatePlanOnlyTeam, + callback: Callback, + ): Promise; + /** + * Creates a plan-only team and configures their planning settings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async createPlanOnlyTeam(parameters: Parameters.CreatePlanOnlyTeam, callback?: never): Promise; + async createPlanOnlyTeam( + parameters: Parameters.CreatePlanOnlyTeam, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}/team/planonly`, + method: 'POST', + data: { + capacity: parameters.capacity, + issueSourceId: parameters.issueSourceId, + memberAccountIds: parameters.memberAccountIds, + name: parameters.name, + planningStyle: parameters.planningStyle, + sprintLength: parameters.sprintLength, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns planning settings for a plan-only team. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getPlanOnlyTeam( + parameters: Parameters.GetPlanOnlyTeam, + callback: Callback, + ): Promise; + /** + * Returns planning settings for a plan-only team. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getPlanOnlyTeam( + parameters: Parameters.GetPlanOnlyTeam, + callback?: never, + ): Promise; + async getPlanOnlyTeam( + parameters: Parameters.GetPlanOnlyTeam, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}/team/planonly/${parameters.planOnlyTeamId}`, + method: 'GET', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Updates any of the following planning settings of a plan-only team using [JSON + * Patch](https://datatracker.ietf.org/doc/html/rfc6902). + * + * - Name + * - PlanningStyle + * - IssueSourceId + * - SprintLength + * - Capacity + * - MemberAccountIds + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * + * _Note that "add" operations do not respect array indexes in target locations. Call the "Get plan-only team" + * endpoint to find out the order of array elements._ + */ + async updatePlanOnlyTeam(parameters: Parameters.UpdatePlanOnlyTeam, callback: Callback): Promise; + /** + * Updates any of the following planning settings of a plan-only team using [JSON + * Patch](https://datatracker.ietf.org/doc/html/rfc6902). + * + * - Name + * - PlanningStyle + * - IssueSourceId + * - SprintLength + * - Capacity + * - MemberAccountIds + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * + * _Note that "add" operations do not respect array indexes in target locations. Call the "Get plan-only team" + * endpoint to find out the order of array elements._ + */ + async updatePlanOnlyTeam(parameters: Parameters.UpdatePlanOnlyTeam, callback?: never): Promise; + async updatePlanOnlyTeam( + parameters: Parameters.UpdatePlanOnlyTeam, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}/team/planonly/${parameters.planOnlyTeamId}`, + method: 'PUT', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Deletes a plan-only team and their planning settings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async deletePlanOnlyTeam(parameters: Parameters.DeletePlanOnlyTeam, callback: Callback): Promise; + /** + * Deletes a plan-only team and their planning settings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async deletePlanOnlyTeam(parameters: Parameters.DeletePlanOnlyTeam, callback?: never): Promise; + async deletePlanOnlyTeam( + parameters: Parameters.DeletePlanOnlyTeam, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/plans/plan/${parameters.planId}/team/planonly/${parameters.planOnlyTeamId}`, + method: 'DELETE', + }; + + return this.client.sendRequest(config, callback); + } +} diff --git a/src/version2/timeTracking.ts b/src/version2/timeTracking.ts index 87358e0fd4..27096e6998 100644 --- a/src/version2/timeTracking.ts +++ b/src/version2/timeTracking.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class TimeTracking { @@ -136,7 +136,7 @@ export class TimeTracking { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async setSharedTimeTrackingConfiguration( - parameters: Parameters.SetSharedTimeTrackingConfiguration | undefined, + parameters: Parameters.SetSharedTimeTrackingConfiguration, callback: Callback, ): Promise; /** @@ -146,21 +146,21 @@ export class TimeTracking { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async setSharedTimeTrackingConfiguration( - parameters?: Parameters.SetSharedTimeTrackingConfiguration, + parameters: Parameters.SetSharedTimeTrackingConfiguration, callback?: never, ): Promise; async setSharedTimeTrackingConfiguration( - parameters?: Parameters.SetSharedTimeTrackingConfiguration, + parameters: Parameters.SetSharedTimeTrackingConfiguration, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/2/configuration/timetracking/options', method: 'PUT', data: { - workingHoursPerDay: parameters?.workingHoursPerDay, - workingDaysPerWeek: parameters?.workingDaysPerWeek, - timeFormat: parameters?.timeFormat, - defaultUnit: parameters?.defaultUnit, + workingHoursPerDay: parameters.workingHoursPerDay, + workingDaysPerWeek: parameters.workingDaysPerWeek, + timeFormat: parameters.timeFormat, + defaultUnit: parameters.defaultUnit, }, }; diff --git a/src/version2/uIModificationsApps.ts b/src/version2/uIModificationsApps.ts index c6f69acc54..ec3dd88769 100644 --- a/src/version2/uIModificationsApps.ts +++ b/src/version2/uIModificationsApps.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class UIModificationsApps { @@ -11,6 +11,9 @@ export class UIModificationsApps { * Gets UI modifications. UI modifications can only be retrieved by Forge apps. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. + * + * The new `read:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async getUiModifications( parameters: Parameters.GetUiModifications | undefined, @@ -20,6 +23,9 @@ export class UIModificationsApps { * Gets UI modifications. UI modifications can only be retrieved by Forge apps. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. + * + * The new `read:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async getUiModifications( parameters?: Parameters.GetUiModifications, @@ -45,13 +51,17 @@ export class UIModificationsApps { /** * Creates a UI modification. UI modification can only be created by Forge apps. * - * Each app can define up to 100 UI modifications. Each UI modification can define up to 1000 contexts. + * Each app can define up to 3000 UI modifications. Each UI modification can define up to 1000 contexts. The same + * context can be assigned to maximum 100 UI modifications. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * * - _None_ if the UI modification is created without contexts. * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for one or more projects, if the * UI modification is created with contexts. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async createUiModification( parameters: Parameters.CreateUiModification, @@ -60,13 +70,17 @@ export class UIModificationsApps { /** * Creates a UI modification. UI modification can only be created by Forge apps. * - * Each app can define up to 100 UI modifications. Each UI modification can define up to 1000 contexts. + * Each app can define up to 3000 UI modifications. Each UI modification can define up to 1000 contexts. The same + * context can be assigned to maximum 100 UI modifications. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * * - _None_ if the UI modification is created without contexts. * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for one or more projects, if the * UI modification is created with contexts. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async createUiModification( parameters: Parameters.CreateUiModification, @@ -93,13 +107,17 @@ export class UIModificationsApps { /** * Updates a UI modification. UI modification can only be updated by Forge apps. * - * Each UI modification can define up to 1000 contexts. + * Each UI modification can define up to 1000 contexts. The same context can be assigned to maximum 100 UI + * modifications. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * * - _None_ if the UI modification is created without contexts. * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for one or more projects, if the * UI modification is created with contexts. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async updateUiModification( parameters: Parameters.UpdateUiModification, @@ -108,13 +126,17 @@ export class UIModificationsApps { /** * Updates a UI modification. UI modification can only be updated by Forge apps. * - * Each UI modification can define up to 1000 contexts. + * Each UI modification can define up to 1000 contexts. The same context can be assigned to maximum 100 UI + * modifications. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * * - _None_ if the UI modification is created without contexts. * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for one or more projects, if the * UI modification is created with contexts. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async updateUiModification(parameters: Parameters.UpdateUiModification, callback?: never): Promise; async updateUiModification( @@ -125,10 +147,10 @@ export class UIModificationsApps { url: `/rest/api/2/uiModifications/${parameters.uiModificationId}`, method: 'PUT', data: { - name: parameters.name, - description: parameters.description, - data: parameters.data, contexts: parameters.contexts, + data: parameters.data, + description: parameters.description, + name: parameters.name, }, }; @@ -140,6 +162,9 @@ export class UIModificationsApps { * only be deleted by Forge apps. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async deleteUiModification( parameters: Parameters.DeleteUiModification | string, @@ -150,6 +175,9 @@ export class UIModificationsApps { * only be deleted by Forge apps. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async deleteUiModification( parameters: Parameters.DeleteUiModification | string, diff --git a/src/version2/userProperties.ts b/src/version2/userProperties.ts index c4a1b1f94c..48432a12ba 100644 --- a/src/version2/userProperties.ts +++ b/src/version2/userProperties.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class UserProperties { diff --git a/src/version2/userSearch.ts b/src/version2/userSearch.ts index 9d7a4ca6dc..b5c7314cbe 100644 --- a/src/version2/userSearch.ts +++ b/src/version2/userSearch.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { paramSerializer } from '../paramSerializer'; import { RequestConfig } from '../requestConfig'; @@ -75,9 +75,9 @@ export class UserSearch { * assigned to: * * - A new issue, by providing the `projectKeyOrId`. - * - An updated issue, by providing the `issueKey`. - * - To an issue during a transition (workflow action), by providing the `issueKey` and the transition id in - * `actionDescriptorId`. You can obtain the IDs of an issue's valid transitions using the `transitions` option in + * - An updated issue, by providing the `issueKey` or `issueId`. + * - To an issue during a transition (workflow action), by providing the `issueKey` or `issueId` and the transition id + * in `actionDescriptorId`. You can obtain the IDs of an issue's valid transitions using the `transitions` option in * the `expand` parameter of [ Get issue](#api-rest-api-2-issue-issueIdOrKey-get). * * In all these cases, you can pass an account ID to determine if a user can be assigned to an issue. The user is @@ -92,8 +92,9 @@ export class UserSearch { * the user's email address is hidden. See the [Profile visibility * overview](https://developer.atlassian.com/cloud/jira/platform/profile-visibility/) for more details. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** - * Permission to access Jira. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse + * users and groups_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Assign issues_ [project + * permission](https://confluence.atlassian.com/x/yodKLg) */ async findAssignableUsers( parameters: Parameters.FindAssignableUsers | undefined, @@ -104,9 +105,9 @@ export class UserSearch { * assigned to: * * - A new issue, by providing the `projectKeyOrId`. - * - An updated issue, by providing the `issueKey`. - * - To an issue during a transition (workflow action), by providing the `issueKey` and the transition id in - * `actionDescriptorId`. You can obtain the IDs of an issue's valid transitions using the `transitions` option in + * - An updated issue, by providing the `issueKey` or `issueId`. + * - To an issue during a transition (workflow action), by providing the `issueKey` or `issueId` and the transition id + * in `actionDescriptorId`. You can obtain the IDs of an issue's valid transitions using the `transitions` option in * the `expand` parameter of [ Get issue](#api-rest-api-2-issue-issueIdOrKey-get). * * In all these cases, you can pass an account ID to determine if a user can be assigned to an issue. The user is @@ -121,8 +122,9 @@ export class UserSearch { * the user's email address is hidden. See the [Profile visibility * overview](https://developer.atlassian.com/cloud/jira/platform/profile-visibility/) for more details. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** - * Permission to access Jira. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse + * users and groups_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Assign issues_ [project + * permission](https://confluence.atlassian.com/x/yodKLg) */ async findAssignableUsers( parameters?: Parameters.FindAssignableUsers, @@ -142,6 +144,7 @@ export class UserSearch { accountId: parameters?.accountId, project: parameters?.project, issueKey: parameters?.issueKey, + issueId: parameters?.issueId, startAt: parameters?.startAt, maxResults: parameters?.maxResults, actionDescriptorId: parameters?.actionDescriptorId, @@ -303,7 +306,7 @@ export class UserSearch { } /** - * Returns a list of users that match the search string and property. + * Returns a list of active users that match the search string and property. * * This operation first applies a filter to match the search string and property, and then takes the filtered users in * the range defined by `startAt` and `maxResults`, up to the thousandth user. To get all the users who match the @@ -325,7 +328,7 @@ export class UserSearch { callback: Callback, ): Promise; /** - * Returns a list of users that match the search string and property. + * Returns a list of active users that match the search string and property. * * This operation first applies a filter to match the search string and property, and then takes the filtered users in * the range defined by `startAt` and `maxResults`, up to the thousandth user. To get all the users who match the @@ -382,7 +385,9 @@ export class UserSearch { * - `is commenter of (PROJ-1, PROJ-2)` Returns users that have posted a comment on the issues _PROJ-1_ or _PROJ-2_. * - `is transitioner of (PROJ-1, PROJ-2)` Returns users that have performed a transition on issues _PROJ-1_ or * _PROJ-2_. - * - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. + * - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. For example, + * if user property `location` is set to value `{"office": {"country": "AU", "city": "Sydney"}}`, then it's possible + * to use `[location].office.city is "Sydney"` to match the user. * * The list of issues can be extended as needed, as in _(PROJ-1, PROJ-2, ... PROJ-n)_. Statements can be combined * using the `AND` and `OR` operators to form more complex queries. For example: @@ -415,7 +420,9 @@ export class UserSearch { * - `is commenter of (PROJ-1, PROJ-2)` Returns users that have posted a comment on the issues _PROJ-1_ or _PROJ-2_. * - `is transitioner of (PROJ-1, PROJ-2)` Returns users that have performed a transition on issues _PROJ-1_ or * _PROJ-2_. - * - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. + * - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. For example, + * if user property `location` is set to value `{"office": {"country": "AU", "city": "Sydney"}}`, then it's possible + * to use `[location].office.city is "Sydney"` to match the user. * * The list of issues can be extended as needed, as in _(PROJ-1, PROJ-2, ... PROJ-n)_. Statements can be combined * using the `AND` and `OR` operators to form more complex queries. For example: @@ -462,7 +469,9 @@ export class UserSearch { * - `is commenter of (PROJ-1, PROJ-2)` Returns users that have posted a comment on the issues _PROJ-1_ or _PROJ-2_. * - `is transitioner of (PROJ-1, PROJ-2)` Returns users that have performed a transition on issues _PROJ-1_ or * _PROJ-2_. - * - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. + * - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. For example, + * if user property `location` is set to value `{"office": {"country": "AU", "city": "Sydney"}}`, then it's possible + * to use `[location].office.city is "Sydney"` to match the user. * * The list of issues can be extended as needed, as in _(PROJ-1, PROJ-2, ... PROJ-n)_. Statements can be combined * using the `AND` and `OR` operators to form more complex queries. For example: @@ -495,7 +504,9 @@ export class UserSearch { * - `is commenter of (PROJ-1, PROJ-2)` Returns users that have posted a comment on the issues _PROJ-1_ or _PROJ-2_. * - `is transitioner of (PROJ-1, PROJ-2)` Returns users that have performed a transition on issues _PROJ-1_ or * _PROJ-2_. - * - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. + * - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. For example, + * if user property `location` is set to value `{"office": {"country": "AU", "city": "Sydney"}}`, then it's possible + * to use `[location].office.city is "Sydney"` to match the user. * * The list of issues can be extended as needed, as in _(PROJ-1, PROJ-2, ... PROJ-n)_. Statements can be combined * using the `AND` and `OR` operators to form more complex queries. For example: @@ -516,7 +527,7 @@ export class UserSearch { params: { query: parameters.query, startAt: parameters.startAt, - maxResults: parameters.maxResults, + maxResult: parameters.maxResult || parameters.maxResults, }, }; diff --git a/src/version2/users.ts b/src/version2/users.ts index 623d7be9b0..47e7f1647a 100644 --- a/src/version2/users.ts +++ b/src/version2/users.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { paramSerializer } from '../paramSerializer'; import { RequestConfig } from '../requestConfig'; @@ -18,7 +18,7 @@ export class Users { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse * users and groups_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getUser(parameters: Parameters.GetUser | undefined, callback: Callback): Promise; + async getUser(parameters: Parameters.GetUser, callback: Callback): Promise; /** * Returns a user. * @@ -29,14 +29,14 @@ export class Users { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** _Browse * users and groups_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getUser(parameters?: Parameters.GetUser, callback?: never): Promise; - async getUser(parameters?: Parameters.GetUser, callback?: Callback): Promise { + async getUser(parameters: Parameters.GetUser, callback?: never): Promise; + async getUser(parameters: Parameters.GetUser, callback?: Callback): Promise { const config: RequestConfig = { url: '/rest/api/2/user', method: 'GET', params: { - accountId: parameters?.accountId, - expand: parameters?.expand, + accountId: parameters.accountId, + expand: parameters.expand, }, }; @@ -234,44 +234,31 @@ export class Users { * is not passed, the calling user's default columns are set. If no column details are sent, then all default columns * are removed. * - * The parameters for this resource are expressed as HTML form data. For example, in curl: - * - * `curl -X PUT -d columns=summary -d columns=description - * https://your-domain.atlassian.net/rest/api/2/user/columns?accountId=5b10ac8d82e05b22cc7d4ef5'` - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg), to set the columns on any user. * - Permission to access Jira, to set the calling user's columns. */ - async setUserColumns( - parameters: Parameters.SetUserColumns | undefined, - callback: Callback, - ): Promise; + async setUserColumns(parameters: Parameters.SetUserColumns, callback: Callback): Promise; /** * 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. * - * The parameters for this resource are expressed as HTML form data. For example, in curl: - * - * `curl -X PUT -d columns=summary -d columns=description - * https://your-domain.atlassian.net/rest/api/2/user/columns?accountId=5b10ac8d82e05b22cc7d4ef5'` - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg), to set the columns on any user. * - Permission to access Jira, to set the calling user's columns. */ - async setUserColumns(parameters?: Parameters.SetUserColumns, callback?: never): Promise; - async setUserColumns(parameters?: Parameters.SetUserColumns, callback?: Callback): Promise { + async setUserColumns(parameters: Parameters.SetUserColumns, callback?: never): Promise; + async setUserColumns(parameters: Parameters.SetUserColumns, callback?: Callback): Promise { const config: RequestConfig = { url: '/rest/api/2/user/columns', method: 'PUT', params: { - accountId: parameters?.accountId, + accountId: parameters.accountId, }, - data: parameters?.columns, + data: parameters.columns, }; return this.client.sendRequest(config, callback); @@ -311,16 +298,20 @@ export class Users { } /** - * Returns a user's email address. This API is only available to apps approved by Atlassian, according to these + * Returns a user's email address regardless of the user's profile visibility settings. For Connect apps, this API is + * only available to apps approved by Atlassian, according to these * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603). + * For Forge apps, this API only supports access via asApp() requests. */ async getUserEmail( parameters: Parameters.GetUserEmail | string, callback: Callback, ): Promise; /** - * Returns a user's email address. This API is only available to apps approved by Atlassian, according to these + * Returns a user's email address regardless of the user's profile visibility settings. For Connect apps, this API is + * only available to apps approved by Atlassian, according to these * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603). + * For Forge apps, this API only supports access via asApp() requests. */ async getUserEmail( parameters: Parameters.GetUserEmail | string, @@ -344,16 +335,20 @@ export class Users { } /** - * Returns a user's email address. This API is only available to apps approved by Atlassian, according to these + * Returns a user's email address regardless of the user's profile visibility settings. For Connect apps, this API is + * only available to apps approved by Atlassian, according to these * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603). + * For Forge apps, this API only supports access via asApp() requests. */ async getUserEmailBulk( parameters: Parameters.GetUserEmailBulk | string, callback: Callback, ): Promise; /** - * Returns a user's email address. This API is only available to apps approved by Atlassian, according to these + * Returns a user's email address regardless of the user's profile visibility settings. For Connect apps, this API is + * only available to apps approved by Atlassian, according to these * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603). + * For Forge apps, this API only supports access via asApp() requests. */ async getUserEmailBulk( parameters: Parameters.GetUserEmailBulk | string, diff --git a/src/version2/webhooks.ts b/src/version2/webhooks.ts index 1d32412afa..2d63f321f9 100644 --- a/src/version2/webhooks.ts +++ b/src/version2/webhooks.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Webhooks { diff --git a/src/version2/workflowSchemeDrafts.ts b/src/version2/workflowSchemeDrafts.ts index 2a6a38cb1b..5482dd91b5 100644 --- a/src/version2/workflowSchemeDrafts.ts +++ b/src/version2/workflowSchemeDrafts.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class WorkflowSchemeDrafts { diff --git a/src/version2/workflowSchemeProjectAssociations.ts b/src/version2/workflowSchemeProjectAssociations.ts index cda7595756..e8a8df00e0 100644 --- a/src/version2/workflowSchemeProjectAssociations.ts +++ b/src/version2/workflowSchemeProjectAssociations.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class WorkflowSchemeProjectAssociations { @@ -61,7 +61,7 @@ export class WorkflowSchemeProjectAssociations { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async assignSchemeToProject( - parameters: Parameters.AssignSchemeToProject | undefined, + parameters: Parameters.AssignSchemeToProject, callback: Callback, ): Promise; /** @@ -72,17 +72,17 @@ export class WorkflowSchemeProjectAssociations { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async assignSchemeToProject(parameters?: Parameters.AssignSchemeToProject, callback?: never): Promise; + async assignSchemeToProject(parameters: Parameters.AssignSchemeToProject, callback?: never): Promise; async assignSchemeToProject( - parameters?: Parameters.AssignSchemeToProject, + parameters: Parameters.AssignSchemeToProject, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/2/workflowscheme/project', method: 'PUT', data: { - workflowSchemeId: parameters?.workflowSchemeId, - projectId: parameters?.projectId, + workflowSchemeId: parameters.workflowSchemeId, + projectId: parameters.projectId, }, }; diff --git a/src/version2/workflowSchemes.ts b/src/version2/workflowSchemes.ts index fa846e60fa..5f337cc9b0 100644 --- a/src/version2/workflowSchemes.ts +++ b/src/version2/workflowSchemes.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class WorkflowSchemes { @@ -92,6 +92,137 @@ export class WorkflowSchemes { return this.client.sendRequest(config, callback); } + /** + * Returns a list of workflow schemes by providing workflow scheme IDs or project IDs. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ global permission to access all, including project-scoped, workflow schemes + * - _Administer projects_ project permissions to access project-scoped workflow schemes + */ + async readWorkflowSchemes( + parameters: Parameters.ReadWorkflowSchemes, + callback: Callback, + ): Promise; + /** + * Returns a list of workflow schemes by providing workflow scheme IDs or project IDs. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ global permission to access all, including project-scoped, workflow schemes + * - _Administer projects_ project permissions to access project-scoped workflow schemes + */ + async readWorkflowSchemes( + parameters: Parameters.ReadWorkflowSchemes, + callback?: never, + ): Promise; + async readWorkflowSchemes( + parameters: Parameters.ReadWorkflowSchemes, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/workflowscheme/read', + method: 'POST', + params: { + expand: parameters.expand, + }, + data: { + projectIds: parameters.projectIds, + workflowSchemeIds: parameters.workflowSchemeIds, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Updates company-managed and team-managed project workflow schemes. This API doesn't have a concept of draft, so any + * changes made to a workflow scheme are immediately available. When changing the available statuses for issue types, + * an [asynchronous task](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations) + * migrates the issues as defined in the provided mappings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to update all, including global-scoped, workflow schemes. + * - _Administer projects_ project permission to update project-scoped workflow schemes. + */ + async updateSchemes(parameters: Parameters.UpdateSchemes, callback: Callback): Promise; + /** + * Updates company-managed and team-managed project workflow schemes. This API doesn't have a concept of draft, so any + * changes made to a workflow scheme are immediately available. When changing the available statuses for issue types, + * an [asynchronous task](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations) + * migrates the issues as defined in the provided mappings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to update all, including global-scoped, workflow schemes. + * - _Administer projects_ project permission to update project-scoped workflow schemes. + */ + async updateSchemes(parameters: Parameters.UpdateSchemes, callback?: never): Promise; + async updateSchemes(parameters: Parameters.UpdateSchemes, callback?: Callback): Promise { + const config: RequestConfig = { + url: '/rest/api/2/workflowscheme/update', + method: 'POST', + data: { + defaultWorkflowId: parameters.defaultWorkflowId, + description: parameters.description, + id: parameters.id, + name: parameters.name, + statusMappingsByIssueTypeOverride: parameters.statusMappingsByIssueTypeOverride, + statusMappingsByWorkflows: parameters.statusMappingsByWorkflows, + version: parameters.version, + workflowsForIssueTypes: parameters.workflowsForIssueTypes, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Gets the required status mappings for the desired changes to a workflow scheme. The results are provided per issue + * type and workflow. When updating a workflow scheme, status mappings can be provided per issue type, per workflow, + * or both. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ permission to update all, including global-scoped, workflow schemes. + * - _Administer projects_ project permission to update project-scoped workflow schemes. + */ + async updateWorkflowSchemeMappings( + parameters: Parameters.UpdateWorkflowSchemeMappings, + callback: Callback, + ): Promise; + /** + * Gets the required status mappings for the desired changes to a workflow scheme. The results are provided per issue + * type and workflow. When updating a workflow scheme, status mappings can be provided per issue type, per workflow, + * or both. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ permission to update all, including global-scoped, workflow schemes. + * - _Administer projects_ project permission to update project-scoped workflow schemes. + */ + async updateWorkflowSchemeMappings( + parameters: Parameters.UpdateWorkflowSchemeMappings, + callback?: never, + ): Promise; + async updateWorkflowSchemeMappings( + parameters: Parameters.UpdateWorkflowSchemeMappings, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/workflowscheme/update/mappings', + method: 'POST', + data: { + defaultWorkflowId: parameters.defaultWorkflowId, + id: parameters.id, + workflowsForIssueTypes: parameters.workflowsForIssueTypes, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Returns a workflow scheme. * @@ -593,4 +724,30 @@ export class WorkflowSchemes { return this.client.sendRequest(config, callback); } + + /** Returns a page of projects using a given workflow scheme. */ + async getProjectUsagesForWorkflowScheme( + parameters: Parameters.GetProjectUsagesForWorkflowScheme, + callback: Callback, + ): Promise; + /** Returns a page of projects using a given workflow scheme. */ + async getProjectUsagesForWorkflowScheme( + parameters: Parameters.GetProjectUsagesForWorkflowScheme, + callback?: never, + ): Promise; + async getProjectUsagesForWorkflowScheme( + parameters: Parameters.GetProjectUsagesForWorkflowScheme, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/workflowscheme/${parameters.workflowSchemeId}/projectUsages`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } } diff --git a/src/version2/workflowStatusCategories.ts b/src/version2/workflowStatusCategories.ts index 64588da218..fdc22a1797 100644 --- a/src/version2/workflowStatusCategories.ts +++ b/src/version2/workflowStatusCategories.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class WorkflowStatusCategories { diff --git a/src/version2/workflowStatuses.ts b/src/version2/workflowStatuses.ts index 32d2d469ad..2523fbe410 100644 --- a/src/version2/workflowStatuses.ts +++ b/src/version2/workflowStatuses.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class WorkflowStatuses { diff --git a/src/version2/workflowTransitionProperties.ts b/src/version2/workflowTransitionProperties.ts index 035515a9cc..cdb129cb90 100644 --- a/src/version2/workflowTransitionProperties.ts +++ b/src/version2/workflowTransitionProperties.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class WorkflowTransitionProperties { diff --git a/src/version2/workflowTransitionRules.ts b/src/version2/workflowTransitionRules.ts index ed920a1c35..85874662e6 100644 --- a/src/version2/workflowTransitionRules.ts +++ b/src/version2/workflowTransitionRules.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class WorkflowTransitionRules { @@ -92,7 +92,7 @@ export class WorkflowTransitionRules { * * - Disable a rule. * - Add a `tag`. Use this to filter rules in the [Get workflow transition rule - * configurations](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflow-transition-rules/#api-rest-api-3-workflow-rule-config-get). + * configurations](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-workflow-transition-rules/#api-rest-api-2-workflow-rule-config-get). * * Rules are enabled if the `disabled` parameter is not provided. * @@ -119,7 +119,7 @@ export class WorkflowTransitionRules { * * - Disable a rule. * - Add a `tag`. Use this to filter rules in the [Get workflow transition rule - * configurations](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflow-transition-rules/#api-rest-api-3-workflow-rule-config-get). + * configurations](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-workflow-transition-rules/#api-rest-api-2-workflow-rule-config-get). * * Rules are enabled if the `disabled` parameter is not provided. * diff --git a/src/version2/workflows.ts b/src/version2/workflows.ts index 8b2729c337..20b0c9c929 100644 --- a/src/version2/workflows.ts +++ b/src/version2/workflows.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { paramSerializer } from '../paramSerializer'; import { RequestConfig } from '../requestConfig'; @@ -9,7 +9,11 @@ export class Workflows { constructor(private client: Client) {} /** - * Creates a workflow. Workflow transitions are created with the default system transition rules. + * Creates a workflow. You can define transition rules using the shapes detailed in the following sections. If no + * transitional rules are specified the default system transition rules are used. Note: This only applies to + * company-managed scoped workflows. Use [bulk create + * workflows](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-workflows/#api-rest-api-2-workflows-create-post) + * to create both team and company-managed scoped workflows. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). @@ -19,7 +23,11 @@ export class Workflows { callback: Callback, ): Promise; /** - * Creates a workflow. Workflow transitions are created with the default system transition rules. + * Creates a workflow. You can define transition rules using the shapes detailed in the following sections. If no + * transitional rules are specified the default system transition rules are used. Note: This only applies to + * company-managed scoped workflows. Use [bulk create + * workflows](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-workflows/#api-rest-api-2-workflows-create-post) + * to create both team and company-managed scoped workflows. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). @@ -140,6 +148,84 @@ export class Workflows { return this.client.sendRequest(config, callback); } + /** Returns a page of issue types using a given workflow within a project. */ + async getWorkflowProjectIssueTypeUsages( + parameters: Parameters.GetWorkflowProjectIssueTypeUsages, + callback: Callback, + ): Promise; + /** Returns a page of issue types using a given workflow within a project. */ + async getWorkflowProjectIssueTypeUsages( + parameters: Parameters.GetWorkflowProjectIssueTypeUsages, + callback?: never, + ): Promise; + async getWorkflowProjectIssueTypeUsages( + parameters: Parameters.GetWorkflowProjectIssueTypeUsages, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/workflow/${parameters.workflowId}/project/${parameters.projectId}/issueTypeUsages`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** Returns a page of projects using a given workflow. */ + async getProjectUsagesForWorkflow( + parameters: Parameters.GetProjectUsagesForWorkflow, + callback: Callback, + ): Promise; + /** Returns a page of projects using a given workflow. */ + async getProjectUsagesForWorkflow( + parameters: Parameters.GetProjectUsagesForWorkflow, + callback?: never, + ): Promise; + async getProjectUsagesForWorkflow( + parameters: Parameters.GetProjectUsagesForWorkflow, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/workflow/${parameters.workflowId}/projectUsages`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** Returns a page of workflow schemes using a given workflow. */ + async getWorkflowSchemeUsagesForWorkflow( + parameters: Parameters.GetWorkflowSchemeUsagesForWorkflow, + callback: Callback, + ): Promise; + /** Returns a page of workflow schemes using a given workflow. */ + async getWorkflowSchemeUsagesForWorkflow( + parameters: Parameters.GetWorkflowSchemeUsagesForWorkflow, + callback?: never, + ): Promise; + async getWorkflowSchemeUsagesForWorkflow( + parameters: Parameters.GetWorkflowSchemeUsagesForWorkflow, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/2/workflow/${parameters.workflowId}/workflowSchemes`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Returns a list of workflows and related statuses by providing workflow names, workflow IDs, or project and issue * types. @@ -173,7 +259,8 @@ export class Workflows { url: '/rest/api/2/workflows', method: 'POST', params: { - expand: parameters.expand, + useTransitionLinksFormat: parameters.useTransitionLinksFormat, + useApprovalConfiguration: parameters.useApprovalConfiguration, }, data: { projectAndIssueTypes: parameters.projectAndIssueTypes, @@ -188,7 +275,7 @@ export class Workflows { /** * Get the list of workflow capabilities for a specific workflow using either the workflow ID, or the project and * issue type ID pair. The response includes the scope of the workflow, defined as global/project-based, and a list of - * project types that the workflow is scoped to. It also includes all rules organized into their broad categories + * project types that the workflow is scoped to. It also includes all rules organised into their broad categories * (conditions, validators, actions, triggers, screens) as well as the source location (Atlassian-provided, Connect, * Forge). * @@ -204,7 +291,7 @@ export class Workflows { /** * Get the list of workflow capabilities for a specific workflow using either the workflow ID, or the project and * issue type ID pair. The response includes the scope of the workflow, defined as global/project-based, and a list of - * project types that the workflow is scoped to. It also includes all rules organized into their broad categories + * project types that the workflow is scoped to. It also includes all rules organised into their broad categories * (conditions, validators, actions, triggers, screens) as well as the source location (Atlassian-provided, Connect, * Forge). * @@ -242,7 +329,7 @@ export class Workflows { * - _Administer Jira_ project permission to create all, including global-scoped, workflows * - _Administer projects_ project permissions to create project-scoped workflows */ - async createWorkflows( + async createWorkflows( parameters: Parameters.CreateWorkflows, callback: Callback, ): Promise; @@ -254,11 +341,11 @@ export class Workflows { * - _Administer Jira_ project permission to create all, including global-scoped, workflows * - _Administer projects_ project permissions to create project-scoped workflows */ - async createWorkflows( + async createWorkflows( parameters: Parameters.CreateWorkflows, callback?: never, ): Promise; - async createWorkflows( + async createWorkflows( parameters: Parameters.CreateWorkflows, callback?: Callback, ): Promise { @@ -315,6 +402,57 @@ export class Workflows { return this.client.sendRequest(config, callback); } + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of global + * and project workflows. If workflow names are specified in query string, details of those workflows are returned. + * Otherwise, all workflows are returned. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ global permission to access all, including project-scoped, workflows + * - At least one of the _Administer projects_ and _View (read-only) workflow_ project permissions to access + * project-scoped workflows + */ + async searchWorkflows( + parameters: Parameters.SearchWorkflows | undefined, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of global + * and project workflows. If workflow names are specified in query string, details of those workflows are returned. + * Otherwise, all workflows are returned. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** + * + * - _Administer Jira_ global permission to access all, including project-scoped, workflows + * - At least one of the _Administer projects_ and _View (read-only) workflow_ project permissions to access + * project-scoped workflows + */ + async searchWorkflows( + parameters?: Parameters.SearchWorkflows, + callback?: never, + ): Promise; + async searchWorkflows( + parameters?: Parameters.SearchWorkflows, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/2/workflows/search', + method: 'GET', + params: { + startAt: parameters?.startAt, + maxResults: parameters?.maxResults, + expand: parameters?.expand, + queryString: parameters?.queryString, + orderBy: parameters?.orderBy, + scope: parameters?.scope, + isActive: parameters?.isActive, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Update workflows and related statuses. * @@ -323,7 +461,7 @@ export class Workflows { * - _Administer Jira_ project permission to create all, including global-scoped, workflows * - _Administer projects_ project permissions to create project-scoped workflows */ - async updateWorkflows( + async updateWorkflows( parameters: Parameters.UpdateWorkflows, callback: Callback, ): Promise; @@ -335,11 +473,11 @@ export class Workflows { * - _Administer Jira_ project permission to create all, including global-scoped, workflows * - _Administer projects_ project permissions to create project-scoped workflows */ - async updateWorkflows( + async updateWorkflows( parameters: Parameters.UpdateWorkflows, callback?: never, ): Promise; - async updateWorkflows( + async updateWorkflows( parameters: Parameters.UpdateWorkflows, callback?: Callback, ): Promise { diff --git a/src/version3/announcementBanner.ts b/src/version3/announcementBanner.ts index e0e8ff2b27..6838dce374 100644 --- a/src/version3/announcementBanner.ts +++ b/src/version3/announcementBanner.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class AnnouncementBanner { diff --git a/src/version3/appDataPolicies.ts b/src/version3/appDataPolicies.ts new file mode 100644 index 0000000000..990fa5a11d --- /dev/null +++ b/src/version3/appDataPolicies.ts @@ -0,0 +1,44 @@ +import * as Models from './models'; +import * as Parameters from './parameters'; +import { Client } from '../clients'; +import { Callback } from '../callback'; +import { RequestConfig } from '../requestConfig'; + +export class AppDataPolicies { + constructor(private client: Client) {} + + /** Returns data policy for the workspace. */ + async getPolicy(callback: Callback): Promise; + /** Returns data policy for the workspace. */ + async getPolicy(callback?: never): Promise; + async getPolicy(callback?: Callback): Promise { + const config: RequestConfig = { + url: '/rest/api/3/data-policy', + method: 'GET', + }; + + return this.client.sendRequest(config, callback); + } + + /** Returns data policies for the projects specified in the request. */ + async getPolicies( + parameters: Parameters.GetPolicies, + callback: Callback, + ): Promise; + /** Returns data policies for the projects specified in the request. */ + async getPolicies(parameters: Parameters.GetPolicies, callback?: never): Promise; + async getPolicies( + parameters: Parameters.GetPolicies, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/data-policy/project', + method: 'GET', + params: { + ids: typeof parameters.ids === 'string' ? parameters.ids : parameters.ids.join(','), + }, + }; + + return this.client.sendRequest(config, callback); + } +} diff --git a/src/version3/appMigration.ts b/src/version3/appMigration.ts index cbea50328c..ef89f47f32 100644 --- a/src/version3/appMigration.ts +++ b/src/version3/appMigration.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class AppMigration { @@ -12,7 +12,7 @@ export class AppMigration { * fields can be updated. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only - * Connect apps can make this request. + * Connect apps can make this request */ async updateIssueFields(parameters: Parameters.UpdateIssueFields, callback: Callback): Promise; /** @@ -20,7 +20,7 @@ export class AppMigration { * fields can be updated. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only - * Connect apps can make this request. + * Connect apps can make this request */ async updateIssueFields(parameters: Parameters.UpdateIssueFields, callback?: never): Promise; async updateIssueFields( diff --git a/src/version3/appProperties.ts b/src/version3/appProperties.ts index 9dd3e5722f..0bc4f1a0ee 100644 --- a/src/version3/appProperties.ts +++ b/src/version3/appProperties.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class AppProperties { @@ -11,9 +11,8 @@ export class AppProperties { * Gets all the properties of an app. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only a - * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps published on the - * Marketplace can access properties of Connect apps they were [migrated - * from](https://developer.atlassian.com/platform/forge/build-a-connect-on-forge-app/). + * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app + * properties (stored against the same `app.connect.key`). */ async getAddonProperties( parameters: Parameters.GetAddonProperties | string, @@ -23,9 +22,8 @@ export class AppProperties { * Gets all the properties of an app. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only a - * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps published on the - * Marketplace can access properties of Connect apps they were [migrated - * from](https://developer.atlassian.com/platform/forge/build-a-connect-on-forge-app/). + * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app + * properties (stored against the same `app.connect.key`). */ async getAddonProperties( parameters: Parameters.GetAddonProperties | string, @@ -49,9 +47,8 @@ export class AppProperties { * Returns the key and value of an app's property. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only a - * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps published on the - * Marketplace can access properties of Connect apps they were [migrated - * from](https://developer.atlassian.com/platform/forge/build-a-connect-on-forge-app/). + * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app + * properties (stored against the same `app.connect.key`). */ async getAddonProperty( parameters: Parameters.GetAddonProperty, @@ -61,9 +58,8 @@ export class AppProperties { * Returns the key and value of an app's property. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only a - * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps published on the - * Marketplace can access properties of Connect apps they were [migrated - * from](https://developer.atlassian.com/platform/forge/build-a-connect-on-forge-app/). + * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app + * properties (stored against the same `app.connect.key`). */ async getAddonProperty( parameters: Parameters.GetAddonProperty, @@ -88,7 +84,8 @@ export class AppProperties { * maximum length is 32768 characters. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only a - * Connect app whose key matches `addonKey` can make this request. + * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app + * properties (stored against the same `app.connect.key`). */ async putAddonProperty( parameters: Parameters.PutAddonProperty, @@ -101,7 +98,8 @@ export class AppProperties { * maximum length is 32768 characters. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only a - * Connect app whose key matches `addonKey` can make this request. + * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app + * properties (stored against the same `app.connect.key`). */ async putAddonProperty( parameters: Parameters.PutAddonProperty, @@ -124,14 +122,16 @@ export class AppProperties { * Deletes an app's property. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only a - * Connect app whose key matches `addonKey` can make this request. + * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app + * properties (stored against the same `app.connect.key`). */ async deleteAddonProperty(parameters: Parameters.DeleteAddonProperty, callback: Callback): Promise; /** * Deletes an app's property. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only a - * Connect app whose key matches `addonKey` can make this request. + * Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app + * properties (stored against the same `app.connect.key`). */ async deleteAddonProperty(parameters: Parameters.DeleteAddonProperty, callback?: never): Promise; async deleteAddonProperty( @@ -159,6 +159,9 @@ export class AppProperties { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only * Forge apps can make this request. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async putAppProperty( parameters: Parameters.PutAppProperty, @@ -177,6 +180,9 @@ export class AppProperties { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only * Forge apps can make this request. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async putAppProperty( parameters: Parameters.PutAppProperty, @@ -200,6 +206,9 @@ export class AppProperties { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only * Forge apps can make this request. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async deleteAppProperty(parameters: Parameters.DeleteAppProperty, callback: Callback): Promise; /** @@ -207,6 +216,9 @@ export class AppProperties { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only * Forge apps can make this request. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async deleteAppProperty(parameters: Parameters.DeleteAppProperty, callback?: never): Promise; async deleteAppProperty( diff --git a/src/version3/applicationRoles.ts b/src/version3/applicationRoles.ts index 6ffd77f954..da42434b82 100644 --- a/src/version3/applicationRoles.ts +++ b/src/version3/applicationRoles.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ApplicationRoles { diff --git a/src/version3/auditRecords.ts b/src/version3/auditRecords.ts index 4dd4989a93..2d6e824134 100644 --- a/src/version3/auditRecords.ts +++ b/src/version3/auditRecords.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class AuditRecords { diff --git a/src/version3/avatars.ts b/src/version3/avatars.ts index 849e211659..f4509b2723 100644 --- a/src/version3/avatars.ts +++ b/src/version3/avatars.ts @@ -1,14 +1,15 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Avatars { constructor(private client: Client) {} /** - * Returns a list of system avatar details by owner type, where the owner types are issue type, project, or user. + * Returns a list of system avatar details by owner type, where the owner types are issue type, project, user or + * priority. * * This operation can be accessed anonymously. * @@ -19,7 +20,8 @@ export class Avatars { callback: Callback, ): Promise; /** - * Returns a list of system avatar details by owner type, where the owner types are issue type, project, or user. + * Returns a list of system avatar details by owner type, where the owner types are issue type, project, user or + * priority. * * This operation can be accessed anonymously. * @@ -44,7 +46,7 @@ export class Avatars { } /** - * Returns the system and custom avatars for a project or issue type. + * Returns the system and custom avatars for a project, issue type or priority. * * This operation can be accessed anonymously. * @@ -55,10 +57,11 @@ export class Avatars { * - For custom issue type avatars, _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) * for at least one project the issue type is used in. * - For system avatars, none. + * - For priority avatars, none. */ async getAvatars(parameters: Parameters.GetAvatars, callback: Callback): Promise; /** - * Returns the system and custom avatars for a project or issue type. + * Returns the system and custom avatars for a project, issue type or priority. * * This operation can be accessed anonymously. * @@ -69,6 +72,7 @@ export class Avatars { * - For custom issue type avatars, _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) * for at least one project the issue type is used in. * - For system avatars, none. + * - For priority avatars, none. */ async getAvatars(parameters: Parameters.GetAvatars, callback?: never): Promise; async getAvatars(parameters: Parameters.GetAvatars, callback?: Callback): Promise { @@ -81,13 +85,7 @@ export class Avatars { } /** - * Loads a custom avatar for a project or issue type. - * - * Specify the avatar's local file location in the body of the request. Also, include the following headers: - * - * - `X-Atlassian-Token: no-check` To prevent XSRF protection blocking the request, for more information see [Special - * Headers](#special-request-headers). - * - `Content-Type: image/image type` Valid image types are JPEG, GIF, or PNG. + * Loads a custom avatar for a project, issue type or priority. * * The 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. @@ -96,22 +94,22 @@ export class Avatars { * * After creating the avatar use: * - * - [Update issue type](#api-rest-api-3-issuetype-id-put) to set it as the issue type's displayed avatar. - * - [Set project avatar](#api-rest-api-3-project-projectIdOrKey-avatar-put) to set it as the project's displayed - * avatar. + * - [Update issue + * type](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-types/#api-rest-api-3-issuetype-id-put) + * to set it as the issue type's displayed avatar. + * - [Set project + * avatar](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-avatars/#api-rest-api-3-project-projectidorkey-avatar-put) + * to set it as the project's displayed avatar. + * - [Update + * priority](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-priorities/#api-rest-api-3-priority-id-put) + * to set it as the priority's displayed avatar. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async storeAvatar(parameters: Parameters.StoreAvatar, callback: Callback): Promise; /** - * Loads a custom avatar for a project or issue type. - * - * Specify the avatar's local file location in the body of the request. Also, include the following headers: - * - * - `X-Atlassian-Token: no-check` To prevent XSRF protection blocking the request, for more information see [Special - * Headers](#special-request-headers). - * - `Content-Type: image/image type` Valid image types are JPEG, GIF, or PNG. + * Loads a custom avatar for a project, issue type or priority. * * The 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. @@ -120,9 +118,15 @@ export class Avatars { * * After creating the avatar use: * - * - [Update issue type](#api-rest-api-3-issuetype-id-put) to set it as the issue type's displayed avatar. - * - [Set project avatar](#api-rest-api-3-project-projectIdOrKey-avatar-put) to set it as the project's displayed - * avatar. + * - [Update issue + * type](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-types/#api-rest-api-3-issuetype-id-put) + * to set it as the issue type's displayed avatar. + * - [Set project + * avatar](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-avatars/#api-rest-api-3-project-projectidorkey-avatar-put) + * to set it as the project's displayed avatar. + * - [Update + * priority](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-priorities/#api-rest-api-3-priority-id-put) + * to set it as the priority's displayed avatar. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). @@ -132,10 +136,14 @@ export class Avatars { const config: RequestConfig = { url: `/rest/api/3/universal_avatar/type/${parameters.type}/owner/${parameters.entityId}`, method: 'POST', + headers: { + 'X-Atlassian-Token': 'no-check', + 'Content-Type': parameters.mimeType, + }, params: { x: parameters.x, y: parameters.y, - size: parameters.size, + size: parameters.size ?? 0, }, data: parameters.avatar, }; @@ -144,14 +152,14 @@ export class Avatars { } /** - * Deletes an avatar from a project or issue type. + * Deletes an avatar from a project, issue type or priority. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async deleteAvatar(parameters: Parameters.DeleteAvatar, callback: Callback): Promise; /** - * Deletes an avatar from a project or issue type. + * Deletes an avatar from a project, issue type or priority. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). @@ -167,7 +175,7 @@ export class Avatars { } /** - * Returns the default project or issue type avatar image. + * Returns the default project, issue type or priority avatar image. * * This operation can be accessed anonymously. * @@ -178,7 +186,7 @@ export class Avatars { callback: Callback, ): Promise; /** - * Returns the default project or issue type avatar image. + * Returns the default project, issue type or priority avatar image. * * This operation can be accessed anonymously. * @@ -199,8 +207,8 @@ export class Avatars { method: 'GET', responseType: 'arraybuffer', params: { - size: typeof parameters !== 'string' && parameters.size, - format: typeof parameters !== 'string' && parameters.format, + size: typeof parameters !== 'string' ? parameters.size : undefined, + format: typeof parameters !== 'string' ? parameters.format : undefined, }, }; @@ -215,7 +223,7 @@ export class Avatars { } /** - * Returns a project or issue type avatar image by ID. + * Returns a project, issue type or priority avatar image by ID. * * This operation can be accessed anonymously. * @@ -226,13 +234,14 @@ export class Avatars { * the project the avatar belongs to. * - For custom issue type avatars, _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) * for at least one project the issue type is used in. + * - For priority avatars, none. */ async getAvatarImageByID( parameters: Parameters.GetAvatarImageByID, callback: Callback, ): Promise; /** - * Returns a project or issue type avatar image by ID. + * Returns a project, issue type or priority avatar image by ID. * * This operation can be accessed anonymously. * @@ -243,6 +252,7 @@ export class Avatars { * the project the avatar belongs to. * - For custom issue type avatars, _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) * for at least one project the issue type is used in. + * - For priority avatars, none. */ async getAvatarImageByID( parameters: Parameters.GetAvatarImageByID, @@ -273,7 +283,7 @@ export class Avatars { } /** - * Returns the avatar image for a project or issue type. + * Returns the avatar image for a project, issue type or priority. * * This operation can be accessed anonymously. * @@ -284,13 +294,14 @@ export class Avatars { * the project the avatar belongs to. * - For custom issue type avatars, _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) * for at least one project the issue type is used in. + * - For priority avatars, none. */ async getAvatarImageByOwner( parameters: Parameters.GetAvatarImageByOwner, callback: Callback, ): Promise; /** - * Returns the avatar image for a project or issue type. + * Returns the avatar image for a project, issue type or priority. * * This operation can be accessed anonymously. * @@ -301,6 +312,7 @@ export class Avatars { * the project the avatar belongs to. * - For custom issue type avatars, _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) * for at least one project the issue type is used in. + * - For priority avatars, none. */ async getAvatarImageByOwner( parameters: Parameters.GetAvatarImageByOwner, diff --git a/src/version3/classificationLevels.ts b/src/version3/classificationLevels.ts new file mode 100644 index 0000000000..5f9b3a5793 --- /dev/null +++ b/src/version3/classificationLevels.ts @@ -0,0 +1,43 @@ +import * as Models from './models'; +import * as Parameters from './parameters'; +import { Client } from '../clients'; +import { Callback } from '../callback'; +import { RequestConfig } from '../requestConfig'; + +export class ClassificationLevels { + constructor(private client: Client) {} + + /** + * Returns all classification levels. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. + */ + async getAllUserDataClassificationLevels( + parameters: Parameters.GetAllUserDataClassificationLevels | undefined, + callback: Callback, + ): Promise; + /** + * Returns all classification levels. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. + */ + async getAllUserDataClassificationLevels( + parameters?: Parameters.GetAllUserDataClassificationLevels, + callback?: never, + ): Promise; + async getAllUserDataClassificationLevels( + parameters?: Parameters.GetAllUserDataClassificationLevels, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/classification-levels', + method: 'GET', + params: { + status: parameters?.status, + orderBy: parameters?.orderBy, + }, + }; + + return this.client.sendRequest(config, callback); + } +} diff --git a/src/version3/client/version3Client.ts b/src/version3/client/version3Client.ts index 25fb690877..a6d4387a6a 100644 --- a/src/version3/client/version3Client.ts +++ b/src/version3/client/version3Client.ts @@ -1,10 +1,12 @@ import { BaseClient } from '../../clients/baseClient'; import { AnnouncementBanner } from '../announcementBanner'; +import { AppDataPolicies } from '../appDataPolicies'; import { AppMigration } from '../appMigration'; import { AppProperties } from '../appProperties'; import { ApplicationRoles } from '../applicationRoles'; import { AuditRecords } from '../auditRecords'; import { Avatars } from '../avatars'; +import { ClassificationLevels } from '../classificationLevels'; import { Dashboards } from '../dashboards'; import { DynamicModules } from '../dynamicModules'; import { FilterSharing } from '../filterSharing'; @@ -13,6 +15,7 @@ import { GroupAndUserPicker } from '../groupAndUserPicker'; import { Groups } from '../groups'; import { InstanceInformation } from '../instanceInformation'; import { IssueAttachments } from '../issueAttachments'; +import { IssueBulkOperations } from '../issueBulkOperations'; import { IssueCommentProperties } from '../issueCommentProperties'; import { IssueComments } from '../issueComments'; import { IssueCustomFieldConfigurationApps } from '../issueCustomFieldConfigurationApps'; @@ -50,9 +53,12 @@ import { Labels } from '../labels'; import { LicenseMetrics } from '../licenseMetrics'; import { Myself } from '../myself'; import { PermissionSchemes } from '../permissionSchemes'; +import { Plans } from '../plans'; +import { PrioritySchemes } from '../prioritySchemes'; import { Permissions } from '../permissions'; import { ProjectAvatars } from '../projectAvatars'; import { ProjectCategories } from '../projectCategories'; +import { ProjectClassificationLevels } from '../projectClassificationLevels'; import { ProjectComponents } from '../projectComponents'; import { ProjectEmail } from '../projectEmail'; import { ProjectFeatures } from '../projectFeatures'; @@ -69,8 +75,10 @@ import { ScreenTabFields } from '../screenTabFields'; import { ScreenTabs } from '../screenTabs'; import { Screens } from '../screens'; import { ServerInfo } from '../serverInfo'; +import { ServiceRegistry } from '../serviceRegistry'; import { Status } from '../status'; import { Tasks } from '../tasks'; +import { TeamsInPlan } from '../teamsInPlan'; import { TimeTracking } from '../timeTracking'; import { UIModificationsApps } from '../uIModificationsApps'; import { UserProperties } from '../userProperties'; @@ -88,11 +96,13 @@ import { WorkflowTransitionRules } from '../workflowTransitionRules'; export class Version3Client extends BaseClient { announcementBanner = new AnnouncementBanner(this); + appDataPolicies = new AppDataPolicies(this); applicationRoles = new ApplicationRoles(this); appMigration = new AppMigration(this); appProperties = new AppProperties(this); auditRecords = new AuditRecords(this); avatars = new Avatars(this); + classificationLevels = new ClassificationLevels(this); dashboards = new Dashboards(this); dynamicModules = new DynamicModules(this); filters = new Filters(this); @@ -101,6 +111,7 @@ export class Version3Client extends BaseClient { groups = new Groups(this); instanceInformation = new InstanceInformation(this); issueAttachments = new IssueAttachments(this); + issueBulkOperations = new IssueBulkOperations(this); issueCommentProperties = new IssueCommentProperties(this); issueComments = new IssueComments(this); issueCustomFieldConfigurationApps = new IssueCustomFieldConfigurationApps(this); @@ -139,8 +150,11 @@ export class Version3Client extends BaseClient { myself = new Myself(this); permissions = new Permissions(this); permissionSchemes = new PermissionSchemes(this); + plans = new Plans(this); + prioritySchemes = new PrioritySchemes(this); projectAvatars = new ProjectAvatars(this); projectCategories = new ProjectCategories(this); + projectClassificationLevels = new ProjectClassificationLevels(this); projectComponents = new ProjectComponents(this); projectEmail = new ProjectEmail(this); projectFeatures = new ProjectFeatures(this); @@ -157,8 +171,10 @@ export class Version3Client extends BaseClient { screenTabFields = new ScreenTabFields(this); screenTabs = new ScreenTabs(this); serverInfo = new ServerInfo(this); + serviceRegistry = new ServiceRegistry(this); status = new Status(this); tasks = new Tasks(this); + teamsInPlan = new TeamsInPlan(this); timeTracking = new TimeTracking(this); uiModificationsApps = new UIModificationsApps(this); userProperties = new UserProperties(this); diff --git a/src/version3/dashboards.ts b/src/version3/dashboards.ts index cbec827763..b81b114161 100644 --- a/src/version3/dashboards.ts +++ b/src/version3/dashboards.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Dashboards { @@ -70,6 +70,9 @@ export class Dashboards { const config: RequestConfig = { url: '/rest/api/3/dashboard', method: 'POST', + params: { + extendAdminPermissions: parameters.extendAdminPermissions, + }, data: { description: parameters.description, editPermissions: parameters.editPermissions, @@ -648,6 +651,9 @@ export class Dashboards { const config: RequestConfig = { url: `/rest/api/3/dashboard/${parameters.id}`, method: 'PUT', + params: { + extendAdminPermissions: parameters.extendAdminPermissions, + }, data: { description: parameters.description, editPermissions: parameters.editPermissions, @@ -715,6 +721,9 @@ export class Dashboards { const config: RequestConfig = { url: `/rest/api/3/dashboard/${parameters.id}/copy`, method: 'POST', + params: { + extendAdminPermissions: parameters.extendAdminPermissions, + }, data: { description: parameters.description, editPermissions: parameters.editPermissions, diff --git a/src/version3/dynamicModules.ts b/src/version3/dynamicModules.ts index 205b9af6c2..e799a499b7 100644 --- a/src/version3/dynamicModules.ts +++ b/src/version3/dynamicModules.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class DynamicModules { diff --git a/src/version3/filterSharing.ts b/src/version3/filterSharing.ts index be262344a7..715e1e98ef 100644 --- a/src/version3/filterSharing.ts +++ b/src/version3/filterSharing.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class FilterSharing { @@ -159,13 +159,13 @@ export class FilterSharing { url: `/rest/api/3/filter/${parameters.id}/permission`, method: 'POST', data: { - type: parameters.type, - projectId: parameters.projectId, + accountId: parameters.accountId, + groupId: parameters.groupId, groupname: parameters.groupname, + projectId: parameters.projectId, projectRoleId: parameters.projectRoleId, - accountId: parameters.accountId, rights: parameters.rights, - groupId: parameters.groupId, + type: parameters.type, }, }; diff --git a/src/version3/filters.ts b/src/version3/filters.ts index af84c7be04..cf55521b93 100644 --- a/src/version3/filters.ts +++ b/src/version3/filters.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Filters { @@ -31,10 +31,11 @@ export class Filters { url: '/rest/api/3/filter', method: 'POST', params: { - expand: parameters?.expand, - overrideSharePermissions: parameters?.overrideSharePermissions, + expand: parameters.expand, + overrideSharePermissions: parameters.overrideSharePermissions, }, data: { + approximateLastUsed: parameters.approximateLastUsed, description: parameters.description, editPermissions: parameters.editPermissions, favourite: parameters.favourite, @@ -236,6 +237,7 @@ export class Filters { maxResults: parameters?.maxResults, expand: parameters?.expand, overrideSharePermissions: parameters?.overrideSharePermissions, + isSubstringMatch: parameters?.isSubstringMatch, }, }; diff --git a/src/version3/groupAndUserPicker.ts b/src/version3/groupAndUserPicker.ts index c1f42bbc73..e72ef3b63f 100644 --- a/src/version3/groupAndUserPicker.ts +++ b/src/version3/groupAndUserPicker.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class GroupAndUserPicker { diff --git a/src/version3/groups.ts b/src/version3/groups.ts index 1b30b6cd9e..555647b4d3 100644 --- a/src/version3/groups.ts +++ b/src/version3/groups.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Groups { @@ -106,8 +106,11 @@ export class Groups { * Note that users are ordered by username, however the username is not returned in the results due to privacy * reasons. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** either + * of: + * + * - _Browse users and groups_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async getUsersFromGroup( parameters: Parameters.GetUsersFromGroup, @@ -120,8 +123,11 @@ export class Groups { * Note that users are ordered by username, however the username is not returned in the results due to privacy * reasons. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** either + * of: + * + * - _Browse users and groups_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async getUsersFromGroup( parameters: Parameters.GetUsersFromGroup, diff --git a/src/version3/index.ts b/src/version3/index.ts index 86cbc71d60..d9cab067ec 100644 --- a/src/version3/index.ts +++ b/src/version3/index.ts @@ -1,9 +1,14 @@ +export * as Version3Models from './models'; +export * as Version3Parameters from './parameters'; export * from './announcementBanner'; +export * from './appDataPolicies'; export * from './applicationRoles'; export * from './appMigration'; export * from './appProperties'; export * from './auditRecords'; export * from './avatars'; +export * from './classificationLevels'; +export * from './client'; export * from './dashboards'; export * from './dynamicModules'; export * from './filters'; @@ -12,6 +17,7 @@ export * from './groupAndUserPicker'; export * from './groups'; export * from './instanceInformation'; export * from './issueAttachments'; +export * from './issueBulkOperations'; export * from './issueCommentProperties'; export * from './issueComments'; export * from './issueCustomFieldConfigurationApps'; @@ -50,8 +56,11 @@ export * from './licenseMetrics'; export * from './myself'; export * from './permissions'; export * from './permissionSchemes'; +export * from './plans'; +export * from './prioritySchemes'; export * from './projectAvatars'; export * from './projectCategories'; +export * from './projectClassificationLevels'; export * from './projectComponents'; export * from './projectEmail'; export * from './projectFeatures'; @@ -68,8 +77,10 @@ export * from './screenSchemes'; export * from './screenTabFields'; export * from './screenTabs'; export * from './serverInfo'; +export * from './serviceRegistry'; export * from './status'; export * from './tasks'; +export * from './teamsInPlan'; export * from './timeTracking'; export * from './uIModificationsApps'; export * from './userProperties'; @@ -84,7 +95,3 @@ export * from './workflowStatusCategories'; export * from './workflowStatuses'; export * from './workflowTransitionProperties'; export * from './workflowTransitionRules'; - -export * from './client'; -export * as Version3Models from './models'; -export * as Version3Parameters from './parameters'; diff --git a/src/version3/instanceInformation.ts b/src/version3/instanceInformation.ts index 6bc2d59b04..30e0ef888f 100644 --- a/src/version3/instanceInformation.ts +++ b/src/version3/instanceInformation.ts @@ -10,12 +10,16 @@ export class InstanceInformation { * Returns licensing information about the Jira instance. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. + * + * @deprecated This method is deprecated and will be removed in a future version. Please use an alternative method. */ async getLicense(callback: Callback): Promise; /** * Returns licensing information about the Jira instance. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. + * + * @deprecated This method is deprecated and will be removed in a future version. Please use an alternative method. */ async getLicense(callback?: never): Promise; async getLicense(callback?: Callback): Promise { diff --git a/src/version3/issueAttachments.ts b/src/version3/issueAttachments.ts index 4c83e6fb18..43fe4f78a6 100644 --- a/src/version3/issueAttachments.ts +++ b/src/version3/issueAttachments.ts @@ -1,8 +1,8 @@ -import { FormData, File } from 'formdata-node'; +import mime, { Mime } from 'mime'; import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueAttachments { @@ -25,6 +25,7 @@ export class IssueAttachments { * in. * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission * to view the issue. + * - If attachments are added in private comments, the comment-level restriction will be applied. */ async getAttachmentContent( parameters: Parameters.GetAttachmentContent | string, @@ -47,6 +48,7 @@ export class IssueAttachments { * in. * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission * to view the issue. + * - If attachments are added in private comments, the comment-level restriction will be applied. */ async getAttachmentContent( parameters: Parameters.GetAttachmentContent | string, @@ -115,6 +117,7 @@ export class IssueAttachments { * in. * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission * to view the issue. + * - If attachments are added in private comments, the comment-level restriction will be applied. */ async getAttachmentThumbnail( parameters: Parameters.GetAttachmentThumbnail | string, @@ -134,6 +137,7 @@ export class IssueAttachments { * in. * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission * to view the issue. + * - If attachments are added in private comments, the comment-level restriction will be applied. */ async getAttachmentThumbnail( parameters: Parameters.GetAttachmentThumbnail | string, @@ -171,6 +175,7 @@ export class IssueAttachments { * in. * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission * to view the issue. + * - If attachments are added in private comments, the comment-level restriction will be applied. */ async getAttachment( parameters: Parameters.GetAttachment | string, @@ -187,6 +192,7 @@ export class IssueAttachments { * in. * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission * to view the issue. + * - If attachments are added in private comments, the comment-level restriction will be applied. */ async getAttachment( parameters: Parameters.GetAttachment | string, @@ -270,6 +276,7 @@ export class IssueAttachments { * in. * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission * to view the issue. + * - If attachments are added in private comments, the comment-level restriction will be applied. */ async expandAttachmentForHumans( parameters: Parameters.ExpandAttachmentForHumans | string, @@ -294,6 +301,7 @@ export class IssueAttachments { * in. * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission * to view the issue. + * - If attachments are added in private comments, the comment-level restriction will be applied. */ async expandAttachmentForHumans( parameters: Parameters.ExpandAttachmentForHumans | string, @@ -332,6 +340,7 @@ export class IssueAttachments { * in. * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission * to view the issue. + * - If attachments are added in private comments, the comment-level restriction will be applied. */ async expandAttachmentForMachines( parameters: Parameters.ExpandAttachmentForMachines | string, @@ -356,6 +365,7 @@ export class IssueAttachments { * in. * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission * to view the issue. + * - If attachments are added in private comments, the comment-level restriction will be applied. */ async expandAttachmentForMachines( parameters: Parameters.ExpandAttachmentForMachines | string, @@ -425,16 +435,23 @@ export class IssueAttachments { const formData = new FormData(); const attachments = Array.isArray(parameters.attachment) ? parameters.attachment : [parameters.attachment]; - const { default: mime } = await import('mime'); + let Readable: typeof import('stream').Readable | undefined; + + if (typeof window === 'undefined') { + const { Readable: NodeReadable } = await import('stream'); - attachments.forEach(attachment => { - const mimeType = attachment.mimeType ?? (mime.getType(attachment.filename) || undefined); - const file = Buffer.isBuffer(attachment.file) - ? new File([attachment.file], attachment.filename, { type: mimeType }) - : attachment.file; + Readable = NodeReadable; + } + + for await (const attachment of attachments) { + const file = await this._convertToFile(attachment, mime, Readable); + + if (!(file instanceof File || file instanceof Blob)) { + throw new Error(`Unsupported file type for attachment: ${typeof file}`); + } formData.append('file', file, attachment.filename); - }); + } const config: RequestConfig = { url: `/rest/api/3/issue/${parameters.issueIdOrKey}/attachments`, @@ -450,4 +467,74 @@ export class IssueAttachments { return this.client.sendRequest(config, callback); } + + private async _convertToFile( + attachment: Parameters.Attachment, + mime: Mime, + Readable?: typeof import('stream').Readable, + ): Promise { + const mimeType = attachment.mimeType ?? (mime.getType(attachment.filename) || undefined); + + if (attachment.file instanceof Blob || attachment.file instanceof File) { + return attachment.file; + } + + if (typeof attachment.file === 'string') { + return new File([attachment.file], attachment.filename, { type: mimeType }); + } + + if (Readable && attachment.file instanceof Readable) { + return this._streamToBlob(attachment.file, attachment.filename, mimeType); + } + + if (attachment.file instanceof ReadableStream) { + return this._streamToBlob(attachment.file, attachment.filename, mimeType); + } + + if (ArrayBuffer.isView(attachment.file) || attachment.file instanceof ArrayBuffer) { + return new File([attachment.file], attachment.filename, { type: mimeType }); + } + + throw new Error('Unsupported attachment file type.'); + } + + private async _streamToBlob( + stream: import('stream').Readable | ReadableStream, + filename: string, + mimeType?: string, + ): Promise { + if (typeof window === 'undefined' && stream instanceof (await import('stream')).Readable) { + return new Promise((resolve, reject) => { + const chunks: Uint8Array[] = []; + + stream.on('data', chunk => chunks.push(chunk)); + stream.on('end', () => { + const blob = new Blob(chunks, { type: mimeType }); + + resolve(new File([blob], filename, { type: mimeType })); + }); + stream.on('error', reject); + }); + } + + if (stream instanceof ReadableStream) { + const reader = stream.getReader(); + const chunks: Uint8Array[] = []; + + let done = false; + + while (!done) { + const { value, done: streamDone } = await reader.read(); + + if (value) chunks.push(value); + done = streamDone; + } + + const blob = new Blob(chunks, { type: mimeType }); + + return new File([blob], filename, { type: mimeType }); + } + + throw new Error('Unsupported stream type.'); + } } diff --git a/src/version3/issueBulkOperations.ts b/src/version3/issueBulkOperations.ts new file mode 100644 index 0000000000..b24d5403fb --- /dev/null +++ b/src/version3/issueBulkOperations.ts @@ -0,0 +1,523 @@ +import * as Models from './models'; +import * as Parameters from './parameters'; +import { Client } from '../clients'; +import { Callback } from '../callback'; +import { RequestConfig } from '../requestConfig'; + +export class IssueBulkOperations { + constructor(private client: Client) {} + + /** + * Use this API to submit a bulk delete request. You can delete up to 1,000 issues in a single operation. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - Global bulk change + * [permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-global-permissions/). + * - Delete [issues + * permission](https://support.atlassian.com/jira-cloud-administration/docs/permissions-for-company-managed-projects/#Delete-issues/) + * in all projects that contain the selected issues. + * - Browse [project + * permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-permissions/) in all + * projects that contain the selected issues. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async submitBulkDelete( + parameters: Parameters.SubmitBulkDelete, + callback: Callback, + ): Promise; + /** + * Use this API to submit a bulk delete request. You can delete up to 1,000 issues in a single operation. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - Global bulk change + * [permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-global-permissions/). + * - Delete [issues + * permission](https://support.atlassian.com/jira-cloud-administration/docs/permissions-for-company-managed-projects/#Delete-issues/) + * in all projects that contain the selected issues. + * - Browse [project + * permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-permissions/) in all + * projects that contain the selected issues. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async submitBulkDelete( + parameters: Parameters.SubmitBulkDelete, + callback?: never, + ): Promise; + async submitBulkDelete( + parameters: Parameters.SubmitBulkDelete, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/bulk/issues/delete', + method: 'POST', + data: { + selectedIssueIdsOrKeys: parameters.selectedIssueIdsOrKeys, + sendBulkNotification: parameters.sendBulkNotification, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Use this API to get a list of fields visible to the user to perform bulk edit operations. You can pass single or + * multiple issues in the query to get eligible editable fields. This API uses pagination to return responses, + * delivering 50 fields at a time. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - Global bulk change + * [permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-global-permissions/). + * - Browse [project + * permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-permissions/) in all + * projects that contain the selected issues. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + * - Depending on the field, any field-specific permissions required to edit it. + */ + async getBulkEditableFields( + parameters: Parameters.GetBulkEditableFields, + callback: Callback, + ): Promise; + /** + * Use this API to get a list of fields visible to the user to perform bulk edit operations. You can pass single or + * multiple issues in the query to get eligible editable fields. This API uses pagination to return responses, + * delivering 50 fields at a time. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - Global bulk change + * [permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-global-permissions/). + * - Browse [project + * permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-permissions/) in all + * projects that contain the selected issues. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + * - Depending on the field, any field-specific permissions required to edit it. + */ + async getBulkEditableFields( + parameters: Parameters.GetBulkEditableFields, + callback?: never, + ): Promise; + async getBulkEditableFields( + parameters: Parameters.GetBulkEditableFields, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/bulk/issues/fields', + method: 'GET', + params: { + issueIdsOrKeys: parameters.issueIdsOrKeys, + searchText: parameters.searchText, + endingBefore: parameters.endingBefore, + startingAfter: parameters.startingAfter, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Use this API to submit a bulk edit request and simultaneously edit multiple issues. There are limits applied to the + * number of issues and fields that can be edited. A single request can accommodate a maximum of 1000 issues + * (including subtasks) and 200 fields. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - Global bulk change + * [permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-global-permissions/). + * - Browse [project + * permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-permissions/) in all + * projects that contain the selected issues. + * - Edit [issues permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-permissions/) + * in all projects that contain the selected issues. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async submitBulkEdit( + parameters: Parameters.SubmitBulkEdit, + callback: Callback, + ): Promise; + /** + * Use this API to submit a bulk edit request and simultaneously edit multiple issues. There are limits applied to the + * number of issues and fields that can be edited. A single request can accommodate a maximum of 1000 issues + * (including subtasks) and 200 fields. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - Global bulk change + * [permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-global-permissions/). + * - Browse [project + * permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-permissions/) in all + * projects that contain the selected issues. + * - Edit [issues permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-permissions/) + * in all projects that contain the selected issues. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async submitBulkEdit( + parameters: Parameters.SubmitBulkEdit, + callback?: never, + ): Promise; + async submitBulkEdit( + parameters: Parameters.SubmitBulkEdit, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/bulk/issues/fields', + method: 'POST', + data: { + editedFieldsInput: parameters.editedFieldsInput, + selectedActions: parameters.selectedActions, + selectedIssueIdsOrKeys: parameters.selectedIssueIdsOrKeys, + sendBulkNotification: parameters.sendBulkNotification, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Use this API to submit a bulk issue move request. You can move multiple issues, but they must all be moved to and + * from a single project, issue type, and parent. You can't move more than 1000 issues (including subtasks) at once. + * + * #### Scenarios: + * + * This is an early version of the API and it doesn't have full feature parity with the Bulk Move UI experience. + * + * - Moving issue of type A to issue of type B in the same project or a different project: `SUPPORTED` + * - Moving multiple issues of type A in one project to multiple issues of type B in the same project or a different + * project: **`SUPPORTED`** + * - Moving a standard parent issue of type A with its multiple subtask issue types in one project to standard issue of + * type B and multiple subtask issue types in the same project or a different project: `SUPPORTED` + * - Moving an epic issue with its child issues to a different project without losing their relation: `NOT SUPPORTED`\ + * (Workaround: Move them individually and stitch the relationship back with the Bulk Edit API) + * + * #### Limits applied to bulk issue moves: + * + * When using the bulk move, keep in mind that there are limits on the number of issues and fields you can include. + * + * - You can move up to 1,000 issues in a single operation, including any subtasks. + * - All issues must originate from the same project and share the same issue type and parent. + * - The total combined number of fields across all issues must not exceed 1,500,000. For example, if each issue + * includes 15,000 fields, then the maximum number of issues that can be moved is 100. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - Global bulk change + * [permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-global-permissions/). + * - Move [issues permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-permissions/) + * in source projects. + * - Create [issues + * permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-permissions/) in + * destination projects. + * - Browse [project + * permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-permissions/) in + * destination projects, if moving subtasks only. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async submitBulkMove( + parameters: Parameters.SubmitBulkMove, + callback: Callback, + ): Promise; + /** + * Use this API to submit a bulk issue move request. You can move multiple issues, but they must all be moved to and + * from a single project, issue type, and parent. You can't move more than 1000 issues (including subtasks) at once. + * + * #### Scenarios: + * + * This is an early version of the API and it doesn't have full feature parity with the Bulk Move UI experience. + * + * - Moving issue of type A to issue of type B in the same project or a different project: `SUPPORTED` + * - Moving multiple issues of type A in one project to multiple issues of type B in the same project or a different + * project: **`SUPPORTED`** + * - Moving a standard parent issue of type A with its multiple subtask issue types in one project to standard issue of + * type B and multiple subtask issue types in the same project or a different project: `SUPPORTED` + * - Moving an epic issue with its child issues to a different project without losing their relation: `NOT SUPPORTED`\ + * (Workaround: Move them individually and stitch the relationship back with the Bulk Edit API) + * + * #### Limits applied to bulk issue moves: + * + * When using the bulk move, keep in mind that there are limits on the number of issues and fields you can include. + * + * - You can move up to 1,000 issues in a single operation, including any subtasks. + * - All issues must originate from the same project and share the same issue type and parent. + * - The total combined number of fields across all issues must not exceed 1,500,000. For example, if each issue + * includes 15,000 fields, then the maximum number of issues that can be moved is 100. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - Global bulk change + * [permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-global-permissions/). + * - Move [issues permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-permissions/) + * in source projects. + * - Create [issues + * permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-permissions/) in + * destination projects. + * - Browse [project + * permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-permissions/) in + * destination projects, if moving subtasks only. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async submitBulkMove( + parameters: Parameters.SubmitBulkMove, + callback?: never, + ): Promise; + async submitBulkMove( + parameters: Parameters.SubmitBulkMove, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/bulk/issues/move', + method: 'POST', + data: { + sendBulkNotification: parameters.sendBulkNotification, + targetToSourcesMapping: parameters.targetToSourcesMapping, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Use this API to retrieve a list of transitions available for the specified issues that can be used or bulk + * transition operations. You can submit either single or multiple issues in the query to obtain the available + * transitions. + * + * The response will provide the available transitions for issues, organized by their respective workflows. **Only the + * transitions that are common among the issues within that workflow and do not involve any additional field updates + * will be included.** For bulk transitions that require additional field updates, please utilise the Jira Cloud UI. + * + * You can request available transitions for up to 1,000 issues in a single operation. This API uses pagination to + * return responses, delivering 50 workflows at a time. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - Global bulk change + * [permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-global-permissions/). + * - Transition [issues + * permission](https://support.atlassian.com/jira-cloud-administration/docs/permissions-for-company-managed-projects/#Transition-issues/) + * in all projects that contain the selected issues. + * - Browse [project + * permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-permissions/) in all + * projects that contain the selected issues. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async getAvailableTransitions( + parameters: Parameters.GetAvailableTransitions, + callback: Callback, + ): Promise; + /** + * Use this API to retrieve a list of transitions available for the specified issues that can be used or bulk + * transition operations. You can submit either single or multiple issues in the query to obtain the available + * transitions. + * + * The response will provide the available transitions for issues, organized by their respective workflows. **Only the + * transitions that are common among the issues within that workflow and do not involve any additional field updates + * will be included.** For bulk transitions that require additional field updates, please utilise the Jira Cloud UI. + * + * You can request available transitions for up to 1,000 issues in a single operation. This API uses pagination to + * return responses, delivering 50 workflows at a time. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - Global bulk change + * [permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-global-permissions/). + * - Transition [issues + * permission](https://support.atlassian.com/jira-cloud-administration/docs/permissions-for-company-managed-projects/#Transition-issues/) + * in all projects that contain the selected issues. + * - Browse [project + * permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-permissions/) in all + * projects that contain the selected issues. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async getAvailableTransitions( + parameters: Parameters.GetAvailableTransitions, + callback?: never, + ): Promise; + async getAvailableTransitions( + parameters: Parameters.GetAvailableTransitions, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/bulk/issues/transition', + method: 'GET', + params: { + issueIdsOrKeys: parameters.issueIdsOrKeys, + endingBefore: parameters.endingBefore, + startingAfter: parameters.startingAfter, + }, + headers: { + 'Content-Type': 'application/json', + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Use this API to submit a bulk issue status transition request. You can transition multiple issues, alongside with + * their valid transition Ids. You can transition up to 1,000 issues in a single operation. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - Global bulk change + * [permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-global-permissions/). + * - Transition [issues + * permission](https://support.atlassian.com/jira-cloud-administration/docs/permissions-for-company-managed-projects/#Transition-issues/) + * in all projects that contain the selected issues. + * - Browse [project + * permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-permissions/) in all + * projects that contain the selected issues. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async submitBulkTransition( + parameters: Parameters.SubmitBulkTransition, + callback: Callback, + ): Promise; + /** + * Use this API to submit a bulk issue status transition request. You can transition multiple issues, alongside with + * their valid transition Ids. You can transition up to 1,000 issues in a single operation. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - Global bulk change + * [permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-global-permissions/). + * - Transition [issues + * permission](https://support.atlassian.com/jira-cloud-administration/docs/permissions-for-company-managed-projects/#Transition-issues/) + * in all projects that contain the selected issues. + * - Browse [project + * permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-permissions/) in all + * projects that contain the selected issues. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async submitBulkTransition( + parameters: Parameters.SubmitBulkTransition, + callback?: never, + ): Promise; + async submitBulkTransition( + parameters: Parameters.SubmitBulkTransition, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/bulk/issues/transition', + method: 'POST', + data: { + bulkTransitionInputs: parameters.bulkTransitionInputs, + sendBulkNotification: parameters.sendBulkNotification, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Use this to get the progress state for the specified bulk operation `taskId`. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - Global bulk change + * [permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-global-permissions/). + * - Administer Jira [global + * permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-global-permissions/), or be the + * creator of the task. + * + * If the task is running, this resource will return: + * + * { + * "taskId": "10779", + * "status": "RUNNING", + * "progressPercent": 65, + * "submittedBy": { "accountId": "5b10a2844c20165700ede21g" }, + * "created": 1690180055963, + * "started": 1690180056206, + * "updated": 169018005829 + * } + * + * If the task has completed, then this resource will return: + * + * { + * "processedAccessibleIssues": [10001, 10002], + * "created": 1709189449954, + * "progressPercent": 100, + * "started": 1709189450154, + * "status": "COMPLETE", + * "submittedBy": { "accountId": "5b10a2844c20165700ede21g" }, + * "invalidOrInaccessibleIssueCount": 0, + * "taskId": "10000", + * "totalIssueCount": 2, + * "updated": 1709189450354 + * } + * + * **Note:** You can view task progress for up to 14 days from creation. + */ + async getBulkOperationProgress( + parameters: Parameters.GetBulkOperationProgress, + callback: Callback, + ): Promise; + /** + * Use this to get the progress state for the specified bulk operation `taskId`. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - Global bulk change + * [permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-global-permissions/). + * - Administer Jira [global + * permission](https://support.atlassian.com/jira-cloud-administration/docs/manage-global-permissions/), or be the + * creator of the task. + * + * If the task is running, this resource will return: + * + * { + * "taskId": "10779", + * "status": "RUNNING", + * "progressPercent": 65, + * "submittedBy": { "accountId": "5b10a2844c20165700ede21g" }, + * "created": 1690180055963, + * "started": 1690180056206, + * "updated": 169018005829 + * } + * + * If the task has completed, then this resource will return: + * + * { + * "processedAccessibleIssues": [10001, 10002], + * "created": 1709189449954, + * "progressPercent": 100, + * "started": 1709189450154, + * "status": "COMPLETE", + * "submittedBy": { "accountId": "5b10a2844c20165700ede21g" }, + * "invalidOrInaccessibleIssueCount": 0, + * "taskId": "10000", + * "totalIssueCount": 2, + * "updated": 1709189450354 + * } + * + * **Note:** You can view task progress for up to 14 days from creation. + */ + async getBulkOperationProgress( + parameters: Parameters.GetBulkOperationProgress, + callback?: never, + ): Promise; + async getBulkOperationProgress( + parameters: Parameters.GetBulkOperationProgress, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/bulk/queue/${parameters.taskId}`, + method: 'GET', + }; + + return this.client.sendRequest(config, callback); + } +} diff --git a/src/version3/issueCommentProperties.ts b/src/version3/issueCommentProperties.ts index 2fdecdea69..db07e92cc0 100644 --- a/src/version3/issueCommentProperties.ts +++ b/src/version3/issueCommentProperties.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueCommentProperties { diff --git a/src/version3/issueComments.ts b/src/version3/issueComments.ts index 29d55a8cbf..40b1501014 100644 --- a/src/version3/issueComments.ts +++ b/src/version3/issueComments.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueComments { @@ -145,18 +145,19 @@ export class IssueComments { */ async addComment(parameters: Parameters.AddComment, callback?: never): Promise; async addComment(parameters: Parameters.AddComment, callback?: Callback): Promise { - const body = typeof parameters.comment === 'string' - ? { - type: 'doc', - version: 1, - content: [ - { - type: 'paragraph', - content: [{ type: 'text', text: parameters.comment }], - }, - ], - } - : parameters.comment; + const body = + typeof parameters.comment === 'string' + ? { + type: 'doc', + version: 1, + content: [ + { + type: 'paragraph', + content: [{ type: 'text', text: parameters.comment }], + }, + ], + } + : parameters.comment; const config: RequestConfig = { url: `/rest/api/3/issue/${parameters.issueIdOrKey}/comment`, @@ -165,18 +166,18 @@ export class IssueComments { expand: parameters.expand, }, data: { - self: parameters.self, - id: parameters.id, author: parameters.author, body, + created: parameters.created, + id: parameters.id, + jsdAuthorCanSeeRequest: parameters.jsdAuthorCanSeeRequest, + jsdPublic: parameters.jsdPublic, + properties: parameters.properties, renderedBody: parameters.renderedBody, + self: parameters.self, updateAuthor: parameters.updateAuthor, - created: parameters.created, updated: parameters.updated, visibility: parameters.visibility, - jsdPublic: parameters.jsdPublic, - jsdAuthorCanSeeRequest: parameters.jsdAuthorCanSeeRequest, - properties: parameters.properties, }, }; @@ -263,7 +264,19 @@ export class IssueComments { parameters: Parameters.UpdateComment, callback?: Callback, ): Promise { - // todo same above + const body = + typeof parameters.body === 'string' + ? { + type: 'doc', + version: 1, + content: [ + { + type: 'paragraph', + content: [{ type: 'text', text: parameters.body }], + }, + ], + } + : parameters.body; const config: RequestConfig = { url: `/rest/api/3/issue/${parameters.issueIdOrKey}/comment/${parameters.id}`, @@ -274,7 +287,7 @@ export class IssueComments { expand: parameters.expand, }, data: { - body: parameters.body, + body, visibility: parameters.visibility, properties: parameters.properties, }, @@ -317,6 +330,9 @@ export class IssueComments { const config: RequestConfig = { url: `/rest/api/3/issue/${parameters.issueIdOrKey}/comment/${parameters.id}`, method: 'DELETE', + params: { + parentId: parameters.parentId, + }, }; return this.client.sendRequest(config, callback); diff --git a/src/version3/issueCustomFieldConfigurationApps.ts b/src/version3/issueCustomFieldConfigurationApps.ts index 662e4fca60..7e8f8e61d5 100644 --- a/src/version3/issueCustomFieldConfigurationApps.ts +++ b/src/version3/issueCustomFieldConfigurationApps.ts @@ -1,7 +1,8 @@ +import { paramSerializer } from '../paramSerializer'; import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueCustomFieldConfigurationApps { @@ -9,7 +10,79 @@ export class IssueCustomFieldConfigurationApps { /** * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of - * configurations for a custom field created by a [Forge app](https://developer.atlassian.com/platform/forge/). + * configurations for list of custom fields of a + * [type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) created + * by a [Forge app](https://developer.atlassian.com/platform/forge/). + * + * The result can be filtered by one of these criteria: + * + * - `id`. + * - `fieldContextId`. + * - `issueId`. + * - `projectKeyOrId` and `issueTypeId`. + * + * Otherwise, all configurations for the provided list of custom fields are returned. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required + * for the Forge app that provided the custom field type. + */ + async getCustomFieldsConfigurations( + parameters: Parameters.GetCustomFieldsConfigurations | undefined, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of + * configurations for list of custom fields of a + * [type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) created + * by a [Forge app](https://developer.atlassian.com/platform/forge/). + * + * The result can be filtered by one of these criteria: + * + * - `id`. + * - `fieldContextId`. + * - `issueId`. + * - `projectKeyOrId` and `issueTypeId`. + * + * Otherwise, all configurations for the provided list of custom fields are returned. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required + * for the Forge app that provided the custom field type. + */ + async getCustomFieldsConfigurations( + parameters?: Parameters.GetCustomFieldsConfigurations, + callback?: never, + ): Promise; + async getCustomFieldsConfigurations( + parameters?: Parameters.GetCustomFieldsConfigurations, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/app/field/context/configuration/list', + method: 'POST', + params: { + id: parameters?.id, + fieldContextId: paramSerializer('fieldContextId', parameters?.fieldContextId), + issueId: parameters?.issueId, + projectKeyOrId: parameters?.projectKeyOrId, + issueTypeId: parameters?.issueTypeId, + startAt: parameters?.startAt, + maxResults: parameters?.maxResults, + }, + data: { + fieldIdsOrKeys: parameters?.fieldIdsOrKeys, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of + * configurations for a custom field of a + * [type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) created + * by a [Forge app](https://developer.atlassian.com/platform/forge/). * * The result can be filtered by one of these criteria: * @@ -22,7 +95,7 @@ export class IssueCustomFieldConfigurationApps { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#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. + * for the Forge app that provided the custom field type. */ async getCustomFieldConfiguration( parameters: Parameters.GetCustomFieldConfiguration | string, @@ -30,7 +103,9 @@ export class IssueCustomFieldConfigurationApps { ): Promise; /** * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of - * configurations for a custom field created by a [Forge app](https://developer.atlassian.com/platform/forge/). + * configurations for a custom field of a + * [type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) created + * by a [Forge app](https://developer.atlassian.com/platform/forge/). * * The result can be filtered by one of these criteria: * @@ -43,7 +118,7 @@ export class IssueCustomFieldConfigurationApps { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#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. + * for the Forge app that provided the custom field type. */ async getCustomFieldConfiguration( parameters: Parameters.GetCustomFieldConfiguration | string, @@ -73,24 +148,26 @@ export class IssueCustomFieldConfigurationApps { } /** - * Update the configuration for contexts of a custom field created by a [Forge - * app](https://developer.atlassian.com/platform/forge/). + * Update the configuration for contexts of a custom field of a + * [type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) created + * by a [Forge app](https://developer.atlassian.com/platform/forge/). * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#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. + * for the Forge app that created the custom field type. */ async updateCustomFieldConfiguration( parameters: Parameters.UpdateCustomFieldConfiguration, callback: Callback, ): Promise; /** - * Update the configuration for contexts of a custom field created by a [Forge - * app](https://developer.atlassian.com/platform/forge/). + * Update the configuration for contexts of a custom field of a + * [type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) created + * by a [Forge app](https://developer.atlassian.com/platform/forge/). * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#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. + * for the Forge app that created the custom field type. */ async updateCustomFieldConfiguration( parameters: Parameters.UpdateCustomFieldConfiguration, diff --git a/src/version3/issueCustomFieldContexts.ts b/src/version3/issueCustomFieldContexts.ts index c4ade17d87..20aa790f52 100644 --- a/src/version3/issueCustomFieldContexts.ts +++ b/src/version3/issueCustomFieldContexts.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueCustomFieldContexts { @@ -100,11 +100,11 @@ export class IssueCustomFieldContexts { url: `/rest/api/3/field/${parameters.fieldId}/context`, method: 'POST', data: { + description: parameters.description, id: parameters.id, + issueTypeIds: parameters.issueTypeIds, name: parameters.name, - description: parameters.description, projectIds: parameters.projectIds, - issueTypeIds: parameters.issueTypeIds, }, }; @@ -114,7 +114,8 @@ export class IssueCustomFieldContexts { /** * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of * defaults for a custom field. The results can be filtered by `contextId`, otherwise all values are returned. If no - * defaults are set for a context, nothing is returned. The returned object depends on type of the custom field: + * defaults are set for a context, nothing is returned.\ + * The returned object depends on type of the custom field: * * - `CustomFieldContextDefaultValueDate` (type `datepicker`) for date fields. * - `CustomFieldContextDefaultValueDateTime` (type `datetimepicker`) for date-time fields. @@ -164,7 +165,8 @@ export class IssueCustomFieldContexts { /** * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of * defaults for a custom field. The results can be filtered by `contextId`, otherwise all values are returned. If no - * defaults are set for a context, nothing is returned. The returned object depends on type of the custom field: + * defaults are set for a context, nothing is returned.\ + * The returned object depends on type of the custom field: * * - `CustomFieldContextDefaultValueDate` (type `datepicker`) for date fields. * - `CustomFieldContextDefaultValueDateTime` (type `datetimepicker`) for date-time fields. @@ -513,8 +515,8 @@ export class IssueCustomFieldContexts { url: `/rest/api/3/field/${parameters.fieldId}/context/${parameters.contextId}`, method: 'PUT', data: { - name: parameters.name, description: parameters.description, + name: parameters.name, }, }; diff --git a/src/version3/issueCustomFieldOptions.ts b/src/version3/issueCustomFieldOptions.ts index bddd413e0c..d59bfb7600 100644 --- a/src/version3/issueCustomFieldOptions.ts +++ b/src/version3/issueCustomFieldOptions.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueCustomFieldOptions { @@ -298,4 +298,48 @@ export class IssueCustomFieldOptions { return this.client.sendRequest(config, callback); } + + /** + * Replaces the options of a custom field. + * + * Note that this operation **only works for issue field select list options created in Jira or using operations from + * the [Issue custom field options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue + * field select list options created by Connect or Forge apps. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async replaceCustomFieldOption( + parameters: Parameters.ReplaceCustomFieldOption, + callback: Callback, + ): Promise; + /** + * Replaces the options of a custom field. + * + * Note that this operation **only works for issue field select list options created in Jira or using operations from + * the [Issue custom field options](#api-group-Issue-custom-field-options) resource**, it cannot be used with issue + * field select list options created by Connect or Forge apps. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async replaceCustomFieldOption( + parameters: Parameters.ReplaceCustomFieldOption, + callback?: never, + ): Promise; + async replaceCustomFieldOption( + parameters: Parameters.ReplaceCustomFieldOption, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/field/${parameters.fieldId}/context/${parameters.contextId}/option/${parameters.optionId}/issue`, + method: 'DELETE', + params: { + replaceWith: parameters.replaceWith, + jql: parameters.jql, + }, + }; + + return this.client.sendRequest(config, callback); + } } diff --git a/src/version3/issueCustomFieldOptionsApps.ts b/src/version3/issueCustomFieldOptionsApps.ts index 9786d24053..616ebcbe65 100644 --- a/src/version3/issueCustomFieldOptionsApps.ts +++ b/src/version3/issueCustomFieldOptionsApps.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueCustomFieldOptionsApps { @@ -68,6 +68,8 @@ export class IssueCustomFieldOptionsApps { * 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. * + * Each field can have a maximum of 10000 options, and each option can have a maximum of 10000 scopes. + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required * for the app providing the field. @@ -83,6 +85,8 @@ export class IssueCustomFieldOptionsApps { * 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. * + * Each field can have a maximum of 10000 options, and each option can have a maximum of 10000 scopes. + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required * for the app providing the field. @@ -99,9 +103,9 @@ export class IssueCustomFieldOptionsApps { url: `/rest/api/3/field/${parameters.fieldKey}/option`, method: 'POST', data: { - value: parameters.value, - properties: parameters.properties, config: parameters.config, + properties: parameters.properties, + value: parameters.value, }, }; @@ -290,10 +294,10 @@ export class IssueCustomFieldOptionsApps { url: `/rest/api/3/field/${parameters.fieldKey}/option/${parameters.optionId}`, method: 'PUT', data: { + config: parameters.config, id: parameters.id, - value: parameters.value, properties: parameters.properties, - config: parameters.config, + value: parameters.value, }, }; @@ -348,7 +352,7 @@ export class IssueCustomFieldOptionsApps { * can override the screen security configuration using `overrideScreenSecurity` and `overrideEditableFlag`. * * This is an [asynchronous - * operation](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). The response + * operation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations). The response * object contains a link to the long-running task. * * Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be @@ -372,7 +376,7 @@ export class IssueCustomFieldOptionsApps { * can override the screen security configuration using `overrideScreenSecurity` and `overrideEditableFlag`. * * This is an [asynchronous - * operation](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). The response + * operation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations). The response * object contains a link to the long-running task. * * Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be diff --git a/src/version3/issueCustomFieldValuesApps.ts b/src/version3/issueCustomFieldValuesApps.ts index 890dbb8fa9..b22d1ab2b0 100644 --- a/src/version3/issueCustomFieldValuesApps.ts +++ b/src/version3/issueCustomFieldValuesApps.ts @@ -1,6 +1,6 @@ import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueCustomFieldValuesApps { @@ -8,10 +8,18 @@ export class IssueCustomFieldValuesApps { /** * 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. + * be unique within the request. + * + * Apps can only perform this operation on [custom + * fields](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field/) and [custom + * field types](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) + * declared in their own manifests. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only - * the app that created the custom field can update its values with this operation. + * the app that owns the custom field or custom field type can update its values with this operation. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async updateMultipleCustomFieldValues( parameters: Parameters.UpdateMultipleCustomFieldValues, @@ -19,10 +27,18 @@ export class IssueCustomFieldValuesApps { ): Promise; /** * 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. + * be unique within the request. + * + * Apps can only perform this operation on [custom + * fields](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field/) and [custom + * field types](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) + * declared in their own manifests. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only - * the app that created the custom field can update its values with this operation. + * the app that owns the custom field or custom field type can update its values with this operation. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async updateMultipleCustomFieldValues( parameters: Parameters.UpdateMultipleCustomFieldValues, @@ -47,22 +63,36 @@ export class IssueCustomFieldValuesApps { } /** - * 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. + * Updates the value of a custom field on one or more issues. + * + * Apps can only perform this operation on [custom + * fields](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field/) and [custom + * field types](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) + * declared in their own manifests. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only - * the app that created the custom field can update its values with this operation. + * the app that owns the custom field or custom field type can update its values with this operation. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async updateCustomFieldValue( parameters: Parameters.UpdateCustomFieldValue, callback: Callback, ): Promise; /** - * 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. + * Updates the value of a custom field on one or more issues. + * + * Apps can only perform this operation on [custom + * fields](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field/) and [custom + * field types](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/) + * declared in their own manifests. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only - * the app that created the custom field can update its values with this operation. + * the app that owns the custom field or custom field type can update its values with this operation. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async updateCustomFieldValue(parameters: Parameters.UpdateCustomFieldValue, callback?: never): Promise; async updateCustomFieldValue( diff --git a/src/version3/issueFieldConfigurations.ts b/src/version3/issueFieldConfigurations.ts index 49b233448c..3779142bb8 100644 --- a/src/version3/issueFieldConfigurations.ts +++ b/src/version3/issueFieldConfigurations.ts @@ -1,8 +1,9 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; +import { Paginated } from '../paginated'; export class IssueFieldConfigurations { constructor(private client: Client) {} @@ -21,7 +22,7 @@ export class IssueFieldConfigurations { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAllFieldConfigurations( + async getAllFieldConfigurations>( parameters: Parameters.GetAllFieldConfigurations | undefined, callback: Callback, ): Promise; @@ -39,11 +40,11 @@ export class IssueFieldConfigurations { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getAllFieldConfigurations( + async getAllFieldConfigurations>( parameters?: Parameters.GetAllFieldConfigurations, callback?: never, ): Promise; - async getAllFieldConfigurations( + async getAllFieldConfigurations>( parameters?: Parameters.GetAllFieldConfigurations, callback?: Callback, ): Promise { @@ -72,7 +73,7 @@ export class IssueFieldConfigurations { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createFieldConfiguration( - parameters: Parameters.CreateFieldConfiguration | undefined, + parameters: Parameters.CreateFieldConfiguration, callback: Callback, ): Promise; /** @@ -85,19 +86,19 @@ export class IssueFieldConfigurations { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createFieldConfiguration( - parameters?: Parameters.CreateFieldConfiguration, + parameters: Parameters.CreateFieldConfiguration, callback?: never, ): Promise; async createFieldConfiguration( - parameters?: Parameters.CreateFieldConfiguration, + parameters: Parameters.CreateFieldConfiguration, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/3/fieldconfiguration', method: 'POST', data: { - name: parameters?.name, - description: parameters?.description, + description: parameters.description, + name: parameters.name, }, }; @@ -136,8 +137,8 @@ export class IssueFieldConfigurations { url: `/rest/api/3/fieldconfiguration/${parameters.id}`, method: 'PUT', data: { - name: parameters.name, description: parameters.description, + name: parameters.name, }, }; @@ -323,7 +324,7 @@ export class IssueFieldConfigurations { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createFieldConfigurationScheme( - parameters: Parameters.CreateFieldConfigurationScheme | undefined, + parameters: Parameters.CreateFieldConfigurationScheme, callback: Callback, ): Promise; /** @@ -335,19 +336,19 @@ export class IssueFieldConfigurations { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createFieldConfigurationScheme( - parameters?: Parameters.CreateFieldConfigurationScheme, + parameters: Parameters.CreateFieldConfigurationScheme, callback?: never, ): Promise; async createFieldConfigurationScheme( - parameters?: Parameters.CreateFieldConfigurationScheme, + parameters: Parameters.CreateFieldConfigurationScheme, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/3/fieldconfigurationscheme', method: 'POST', data: { - name: parameters?.name, - description: parameters?.description, + description: parameters.description, + name: parameters.name, }, }; @@ -520,8 +521,8 @@ export class IssueFieldConfigurations { url: `/rest/api/3/fieldconfigurationscheme/${parameters.id}`, method: 'PUT', data: { - name: parameters.name, description: parameters.description, + name: parameters.name, }, }; diff --git a/src/version3/issueFields.ts b/src/version3/issueFields.ts index b29356e6bd..737c541453 100644 --- a/src/version3/issueFields.ts +++ b/src/version3/issueFields.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueFields { @@ -95,7 +95,7 @@ export class IssueFields { * - Fields that contain a string in the field name or description, by defining `query` * - Specific fields that contain a string in the field name or description, by defining `id` and `query` * - * Only custom fields can be queried, `type` must be set to `custom`. + * Use `type` must be set to `custom` to show custom fields only. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). @@ -113,7 +113,7 @@ export class IssueFields { * - Fields that contain a string in the field name or description, by defining `query` * - Specific fields that contain a string in the field name or description, by defining `id` and `query` * - * Only custom fields can be queried, `type` must be set to `custom`. + * Use `type` must be set to `custom` to show custom fields only. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). diff --git a/src/version3/issueLinkTypes.ts b/src/version3/issueLinkTypes.ts index 06b4fc987b..3b82d6d72a 100644 --- a/src/version3/issueLinkTypes.ts +++ b/src/version3/issueLinkTypes.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueLinkTypes { diff --git a/src/version3/issueLinks.ts b/src/version3/issueLinks.ts index e89e9fcda9..f4684aa995 100644 --- a/src/version3/issueLinks.ts +++ b/src/version3/issueLinks.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueLinks { @@ -30,7 +30,7 @@ export class IssueLinks { * to view the issue. * - If the comment has visibility restrictions, belongs to the group or has the role visibility is restricted to. */ - async linkIssues(parameters: Parameters.LinkIssues | undefined, callback: Callback): Promise; + async linkIssues(parameters: Parameters.LinkIssues, callback: Callback): Promise; /** * 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 @@ -54,16 +54,16 @@ export class IssueLinks { * to view the issue. * - If the comment has visibility restrictions, belongs to the group or has the role visibility is restricted to. */ - async linkIssues(parameters?: Parameters.LinkIssues, callback?: never): Promise; - async linkIssues(parameters?: Parameters.LinkIssues, callback?: Callback): Promise { + async linkIssues(parameters: Parameters.LinkIssues, callback?: never): Promise; + async linkIssues(parameters: Parameters.LinkIssues, callback?: Callback): Promise { const config: RequestConfig = { url: '/rest/api/3/issueLink', method: 'POST', data: { - type: parameters?.type, - inwardIssue: parameters?.inwardIssue, - outwardIssue: parameters?.outwardIssue, - comment: parameters?.comment, + comment: parameters.comment, + inwardIssue: parameters.inwardIssue, + outwardIssue: parameters.outwardIssue, + type: parameters.type, }, }; diff --git a/src/version3/issueNavigatorSettings.ts b/src/version3/issueNavigatorSettings.ts index 470e0a389c..05e89df1ed 100644 --- a/src/version3/issueNavigatorSettings.ts +++ b/src/version3/issueNavigatorSettings.ts @@ -1,6 +1,6 @@ import * as Models from './models'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueNavigatorSettings { diff --git a/src/version3/issueNotificationSchemes.ts b/src/version3/issueNotificationSchemes.ts index 2392ff3b88..4c476c3ac0 100644 --- a/src/version3/issueNotificationSchemes.ts +++ b/src/version3/issueNotificationSchemes.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueNotificationSchemes { @@ -215,6 +215,38 @@ export class IssueNotificationSchemes { return this.client.sendRequest(config, callback); } + /** + * Adds notifications to a notification scheme. You can add up to 1000 notifications per request. + * + * _Deprecated: The notification type `EmailAddress` is no longer supported in Cloud. Refer to the + * [changelog](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-1031) for more details._ + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async addNotifications(parameters: Parameters.AddNotifications, callback: Callback): Promise; + /** + * Adds notifications to a notification scheme. You can add up to 1000 notifications per request. + * + * _Deprecated: The notification type `EmailAddress` is no longer supported in Cloud. Refer to the + * [changelog](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-1031) for more details._ + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async addNotifications(parameters: Parameters.AddNotifications, callback?: never): Promise; + async addNotifications(parameters: Parameters.AddNotifications, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/3/notificationscheme/${parameters.id}/notification`, + method: 'PUT', + data: { + notificationSchemeEvents: parameters.notificationSchemeEvents, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Deletes a notification scheme. * diff --git a/src/version3/issuePriorities.ts b/src/version3/issuePriorities.ts index 4df878f737..03ee8322fb 100644 --- a/src/version3/issuePriorities.ts +++ b/src/version3/issuePriorities.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { paramSerializer } from '../paramSerializer'; import { RequestConfig } from '../requestConfig'; @@ -34,6 +34,9 @@ export class IssuePriorities { /** * Creates an issue priority. * + * Deprecation applies to iconUrl param in request body which will be sunset on 16th Mar 2025. For more details refer + * to [changelog](https://developer.atlassian.com/changelog/#CHANGE-1525). + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -44,6 +47,9 @@ export class IssuePriorities { /** * Creates an issue priority. * + * Deprecation applies to iconUrl param in request body which will be sunset on 16th Mar 2025. For more details refer + * to [changelog](https://developer.atlassian.com/changelog/#CHANGE-1525). + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -56,6 +62,7 @@ export class IssuePriorities { url: '/rest/api/3/priority', method: 'POST', data: { + avatarId: parameters.avatarId, description: parameters.description, iconUrl: parameters.iconUrl, name: parameters.name, @@ -172,7 +179,9 @@ export class IssuePriorities { maxResults: parameters?.maxResults, id: parameters?.id, projectId: paramSerializer('projectId', parameters?.projectId), + priorityName: parameters?.priorityName, onlyDefault: parameters?.onlyDefault, + expand: parameters?.expand, }, }; @@ -208,6 +217,11 @@ export class IssuePriorities { /** * Updates an issue priority. * + * At least one request body parameter must be defined. + * + * Deprecation applies to iconUrl param in request body which will be sunset on 16th Mar 2025. For more details refer + * to [changelog](https://developer.atlassian.com/changelog/#CHANGE-1525). + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -215,6 +229,11 @@ export class IssuePriorities { /** * Updates an issue priority. * + * At least one request body parameter must be defined. + * + * Deprecation applies to iconUrl param in request body which will be sunset on 16th Mar 2025. For more details refer + * to [changelog](https://developer.atlassian.com/changelog/#CHANGE-1525). + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ @@ -224,6 +243,7 @@ export class IssuePriorities { url: `/rest/api/3/priority/${parameters.id}`, method: 'PUT', data: { + avatarId: parameters.avatarId, description: parameters.description, iconUrl: parameters.iconUrl, name: parameters.name, @@ -233,4 +253,37 @@ export class IssuePriorities { return this.client.sendRequest(config, callback); } + + /** + * Deletes an issue priority. + * + * This operation is + * [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations). 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. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async deletePriority(parameters: Parameters.DeletePriority, callback: Callback): Promise; + /** + * Deletes an issue priority. + * + * This operation is + * [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations). 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. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async deletePriority(parameters: Parameters.DeletePriority, callback?: never): Promise; + async deletePriority(parameters: Parameters.DeletePriority, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/3/priority/${parameters.id}`, + method: 'DELETE', + }; + + return this.client.sendRequest(config, callback); + } } diff --git a/src/version3/issueProperties.ts b/src/version3/issueProperties.ts index bd873db325..d1973c7107 100644 --- a/src/version3/issueProperties.ts +++ b/src/version3/issueProperties.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueProperties { @@ -18,7 +18,7 @@ export class IssueProperties { * * - Transactional, either all properties are updated in all eligible issues or, when errors occur, no properties are * updated. - * - [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). Follow the + * - [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations). 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. * @@ -44,7 +44,7 @@ export class IssueProperties { * * - Transactional, either all properties are updated in all eligible issues or, when errors occur, no properties are * updated. - * - [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). Follow the + * - [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations). 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. * @@ -83,7 +83,7 @@ export class IssueProperties { * * This operation is: * - * - [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). Follow the + * - [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations). 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. * - Non-transactional. Updating some entities may fail. Such information will available in the task result. @@ -107,7 +107,7 @@ export class IssueProperties { * * This operation is: * - * - [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). Follow the + * - [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations). 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. * - Non-transactional. Updating some entities may fail. Such information will available in the task result. @@ -171,7 +171,7 @@ export class IssueProperties { * This operation is: * * - Transactional, either all eligible issues are updated or, when errors occur, none are updated. - * - [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). Follow the + * - [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations). 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. * @@ -220,7 +220,7 @@ export class IssueProperties { * This operation is: * * - Transactional, either all eligible issues are updated or, when errors occur, none are updated. - * - [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). Follow the + * - [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations). 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. * @@ -241,9 +241,9 @@ export class IssueProperties { url: `/rest/api/3/issue/properties/${parameters.propertyKey}`, method: 'PUT', data: { - value: parameters.value, expression: parameters.expression, filter: parameters.filter, + value: parameters.value, }, }; @@ -268,7 +268,7 @@ export class IssueProperties { * * - Transactional, either the property is deleted from all eligible issues or, when errors occur, no properties are * deleted. - * - [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). Follow the + * - [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations). 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. * @@ -302,7 +302,7 @@ export class IssueProperties { * * - Transactional, either the property is deleted from all eligible issues or, when errors occur, no properties are * deleted. - * - [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). Follow the + * - [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations). 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. * @@ -326,8 +326,8 @@ export class IssueProperties { url: `/rest/api/3/issue/properties/${parameters.propertyKey}`, method: 'DELETE', data: { - entityIds: parameters.entityIds, currentValue: parameters.currentValue, + entityIds: parameters.entityIds, }, }; diff --git a/src/version3/issueRemoteLinks.ts b/src/version3/issueRemoteLinks.ts index 188d1f5376..ea816d56f7 100644 --- a/src/version3/issueRemoteLinks.ts +++ b/src/version3/issueRemoteLinks.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueRemoteLinks { @@ -114,10 +114,10 @@ export class IssueRemoteLinks { url: `/rest/api/3/issue/${parameters.issueIdOrKey}/remotelink`, method: 'POST', data: { - globalId: parameters.globalId, application: parameters.application, - relationship: parameters.relationship, + globalId: parameters.globalId, object: parameters.object, + relationship: parameters.relationship, }, }; @@ -272,10 +272,10 @@ export class IssueRemoteLinks { url: `/rest/api/3/issue/${parameters.issueIdOrKey}/remotelink/${parameters.linkId}`, method: 'PUT', data: { - globalId: parameters.globalId, application: parameters.application, - relationship: parameters.relationship, + globalId: parameters.globalId, object: parameters.object, + relationship: parameters.relationship, }, }; diff --git a/src/version3/issueResolutions.ts b/src/version3/issueResolutions.ts index 09298953f1..6236cbb0a9 100644 --- a/src/version3/issueResolutions.ts +++ b/src/version3/issueResolutions.ts @@ -1,12 +1,34 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueResolutions { constructor(private client: Client) {} + /** + * Returns a list of all issue resolution values. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * Permission to access Jira. + */ + async getResolutions(callback: Callback): Promise; + /** + * Returns a list of all issue resolution values. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * Permission to access Jira. + */ + async getResolutions(callback?: never): Promise; + async getResolutions(callback?: Callback): Promise { + const config: RequestConfig = { + url: '/rest/api/3/resolution', + method: 'GET', + }; + + return this.client.sendRequest(config, callback); + } /** * Creates an issue resolution. * @@ -91,8 +113,8 @@ export class IssueResolutions { url: '/rest/api/3/resolution/move', method: 'PUT', data: { - ids: parameters.ids, after: parameters.after, + ids: parameters.ids, position: parameters.position, }, }; @@ -148,6 +170,35 @@ export class IssueResolutions { return this.client.sendRequest(config, callback); } + /** + * Returns an issue resolution value. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * Permission to access Jira. + */ + async getResolution( + parameters: Parameters.GetResolution, + callback: Callback, + ): Promise; + /** + * Returns an issue resolution value. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * Permission to access Jira. + */ + async getResolution(parameters: Parameters.GetResolution, callback?: never): Promise; + async getResolution( + parameters: Parameters.GetResolution, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/resolution/${parameters.id}`, + method: 'GET', + }; + + return this.client.sendRequest(config, callback); + } + /** * Updates an issue resolution. * diff --git a/src/version3/issueSearch.ts b/src/version3/issueSearch.ts index 051a2a4091..ba485a74da 100644 --- a/src/version3/issueSearch.ts +++ b/src/version3/issueSearch.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueSearch { @@ -76,10 +76,7 @@ export class IssueSearch { * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission * to view the issue. */ - async matchIssues( - parameters: Parameters.MatchIssues | undefined, - callback: Callback, - ): Promise; + async matchIssues(parameters: Parameters.MatchIssues, callback: Callback): Promise; /** * Checks whether one or more issues would be returned by one or more JQL queries. * @@ -91,17 +88,17 @@ export class IssueSearch { * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission * to view the issue. */ - async matchIssues(parameters?: Parameters.MatchIssues, callback?: never): Promise; + async matchIssues(parameters: Parameters.MatchIssues, callback?: never): Promise; async matchIssues( - parameters?: Parameters.MatchIssues, + parameters: Parameters.MatchIssues, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/3/jql/match', method: 'POST', data: { - jqls: parameters?.jqls, - issueIds: parameters?.issueIds, + issueIds: parameters.issueIds, + jqls: parameters.jqls, }, }; @@ -125,7 +122,7 @@ export class IssueSearch { * to view the issue. */ async searchForIssuesUsingJql( - parameters: Parameters.SearchForIssuesUsingJql | undefined, + parameters: Parameters.SearchForIssuesUsingJql, callback: Callback, ): Promise; /** @@ -145,25 +142,26 @@ export class IssueSearch { * to view the issue. */ async searchForIssuesUsingJql( - parameters?: Parameters.SearchForIssuesUsingJql, + parameters: Parameters.SearchForIssuesUsingJql, callback?: never, ): Promise; async searchForIssuesUsingJql( - parameters?: Parameters.SearchForIssuesUsingJql, + parameters: Parameters.SearchForIssuesUsingJql, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/3/search', method: 'GET', params: { - jql: parameters?.jql, - startAt: parameters?.startAt, - maxResults: parameters?.maxResults, - validateQuery: parameters?.validateQuery, - fields: parameters?.fields, - expand: parameters?.expand, - properties: parameters?.properties, - fieldsByKeys: parameters?.fieldsByKeys, + jql: parameters.jql, + startAt: parameters.startAt, + maxResults: parameters.maxResults, + validateQuery: parameters.validateQuery, + fields: parameters.fields, + expand: parameters.expand, + properties: parameters.properties, + fieldsByKeys: parameters.fieldsByKeys, + failFast: parameters.failFast, }, }; @@ -218,14 +216,260 @@ export class IssueSearch { url: '/rest/api/3/search', method: 'POST', data: { + expand: parameters?.expand, + fields: parameters?.fields, + fieldsByKeys: parameters?.fieldsByKeys, jql: parameters?.jql, - startAt: parameters?.startAt, maxResults: parameters?.maxResults, - fields: parameters?.fields, - validateQuery: parameters?.validateQuery, - expand: parameters?.expand, properties: parameters?.properties, - fieldsByKeys: parameters?.fieldsByKeys, + startAt: parameters?.startAt, + validateQuery: parameters?.validateQuery, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Provide an estimated count of the issues that match the [JQL](https://confluence.atlassian.com/x/egORLQ). Recent + * updates might not be immediately visible in the returned output. This endpoint requires JQL to be bounded. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async countIssues(parameters: Parameters.CountIssues, callback: Callback): Promise; + /** + * Provide an estimated count of the issues that match the [JQL](https://confluence.atlassian.com/x/egORLQ). Recent + * updates might not be immediately visible in the returned output. This endpoint requires JQL to be bounded. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async countIssues(parameters: Parameters.CountIssues, callback?: never): Promise; + async countIssues( + parameters: Parameters.CountIssues, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/search/approximate-count', + method: 'POST', + data: { + jql: parameters.jql, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Searches for IDs of issues using [JQL](https://confluence.atlassian.com/x/egORLQ). + * + * Use the [Search](#api-rest-api-3-search-post) endpoint if you need to fetch more than just issue IDs. The Search + * endpoint returns more information, but may take much longer to respond to requests. This is because it uses a + * different mechanism for ordering results than this endpoint and doesn't provide the total number of results for + * your query. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async searchForIssuesIds( + parameters: Parameters.SearchForIssuesIds, + callback: Callback, + ): Promise; + /** + * Searches for IDs of issues using [JQL](https://confluence.atlassian.com/x/egORLQ). + * + * Use the [Search](#api-rest-api-3-search-post) endpoint if you need to fetch more than just issue IDs. The Search + * endpoint returns more information, but may take much longer to respond to requests. This is because it uses a + * different mechanism for ordering results than this endpoint and doesn't provide the total number of results for + * your query. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async searchForIssuesIds( + parameters: Parameters.SearchForIssuesIds, + callback?: never, + ): Promise; + async searchForIssuesIds( + parameters: Parameters.SearchForIssuesIds, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/search/id', + method: 'POST', + data: { + jql: parameters.jql, + maxResults: parameters.maxResults, + nextPageToken: parameters.nextPageToken, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * 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 the JQL query expression is too large to be encoded as a query parameter, use the + * [POST](#searchforissuesusingjqlenhancedsearchpost) version of this resource. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async searchForIssuesUsingJqlEnhancedSearch( + parameters: Parameters.SearchForIssuesUsingJqlEnhancedSearch, + callback: Callback, + ): Promise; + /** + * 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 the JQL query expression is too large to be encoded as a query parameter, use the + * [POST](#searchforissuesusingjqlenhancedsearchpost) version of this resource. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async searchForIssuesUsingJqlEnhancedSearch( + parameters: Parameters.SearchForIssuesUsingJqlEnhancedSearch, + callback?: never, + ): Promise; + async searchForIssuesUsingJqlEnhancedSearch( + parameters: Parameters.SearchForIssuesUsingJqlEnhancedSearch, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/search/jql', + method: 'GET', + params: { + jql: parameters.jql, + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + fields: parameters.fields, + expand: parameters.expand, + properties: parameters.properties, + fieldsByKeys: parameters.fieldsByKeys, + failFast: parameters.failFast, + reconcileIssues: parameters.reconcileIssues, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * 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. + * + * There is a [GET](#searchforissuesusingjqlenhancedsearch) version of this resource that can be used for smaller JQL + * query expressions. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async searchForIssuesUsingJqlEnhancedSearchPost( + parameters: Parameters.SearchForIssuesUsingJqlEnhancedSearchPost, + callback: Callback, + ): Promise; + /** + * 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. + * + * There is a [GET](#searchforissuesusingjqlenhancedsearch) version of this resource that can be used for smaller JQL + * query expressions. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async searchForIssuesUsingJqlEnhancedSearchPost( + parameters: Parameters.SearchForIssuesUsingJqlEnhancedSearchPost, + callback?: never, + ): Promise; + async searchForIssuesUsingJqlEnhancedSearchPost( + parameters: Parameters.SearchForIssuesUsingJqlEnhancedSearchPost, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/search', + method: 'POST', + data: { + jql: parameters.jql, + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + fields: parameters.fields, + expand: parameters.expand, + properties: parameters.properties, + fieldsByKeys: parameters.fieldsByKeys, + failFast: parameters.failFast, + reconcileIssues: parameters.reconcileIssues, }, }; diff --git a/src/version3/issueSecurityLevel.ts b/src/version3/issueSecurityLevel.ts index 1a3e866999..39a5fd8fa2 100644 --- a/src/version3/issueSecurityLevel.ts +++ b/src/version3/issueSecurityLevel.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueSecurityLevel { diff --git a/src/version3/issueSecuritySchemes.ts b/src/version3/issueSecuritySchemes.ts index 4618823f56..ebe2eddb81 100644 --- a/src/version3/issueSecuritySchemes.ts +++ b/src/version3/issueSecuritySchemes.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueSecuritySchemes { @@ -299,7 +299,8 @@ export class IssueSecuritySchemes { * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of issue * security schemes.\ * If you specify the project ID parameter, the result will contain issue security schemes and related project IDs you - * filter by. + * filter by. Use {@link IssueSecuritySchemeResource#searchProjectsUsingSecuritySchemes(String, String, Set, Set)} to + * obtain all projects related to scheme. * * Only issue security schemes in the context of classic projects are returned. * @@ -314,7 +315,8 @@ export class IssueSecuritySchemes { * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of issue * security schemes.\ * If you specify the project ID parameter, the result will contain issue security schemes and related project IDs you - * filter by. + * filter by. Use {@link IssueSecuritySchemeResource#searchProjectsUsingSecuritySchemes(String, String, Set, Set)} to + * obtain all projects related to scheme. * * Only issue security schemes in the context of classic projects are returned. * diff --git a/src/version3/issueTypeProperties.ts b/src/version3/issueTypeProperties.ts index 03c2088b67..41ff4f4da0 100644 --- a/src/version3/issueTypeProperties.ts +++ b/src/version3/issueTypeProperties.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueTypeProperties { diff --git a/src/version3/issueTypeSchemes.ts b/src/version3/issueTypeSchemes.ts index 3aec7af581..461def6959 100644 --- a/src/version3/issueTypeSchemes.ts +++ b/src/version3/issueTypeSchemes.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueTypeSchemes { @@ -60,7 +60,7 @@ export class IssueTypeSchemes { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createIssueTypeScheme( - parameters: Parameters.CreateIssueTypeScheme | undefined, + parameters: Parameters.CreateIssueTypeScheme, callback: Callback, ): Promise; /** @@ -70,21 +70,21 @@ export class IssueTypeSchemes { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createIssueTypeScheme( - parameters?: Parameters.CreateIssueTypeScheme, + parameters: Parameters.CreateIssueTypeScheme, callback?: never, ): Promise; async createIssueTypeScheme( - parameters?: Parameters.CreateIssueTypeScheme, + parameters: Parameters.CreateIssueTypeScheme, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/3/issuetypescheme', method: 'POST', data: { - name: parameters?.name, - description: parameters?.description, - defaultIssueTypeId: parameters?.defaultIssueTypeId, - issueTypeIds: parameters?.issueTypeIds, + defaultIssueTypeId: parameters.defaultIssueTypeId, + description: parameters.description, + issueTypeIds: parameters.issueTypeIds, + name: parameters.name, }, }; @@ -189,7 +189,7 @@ export class IssueTypeSchemes { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async assignIssueTypeSchemeToProject( - parameters: Parameters.AssignIssueTypeSchemeToProject | undefined, + parameters: Parameters.AssignIssueTypeSchemeToProject, callback: Callback, ): Promise; /** @@ -204,19 +204,19 @@ export class IssueTypeSchemes { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async assignIssueTypeSchemeToProject( - parameters?: Parameters.AssignIssueTypeSchemeToProject, + parameters: Parameters.AssignIssueTypeSchemeToProject, callback?: never, ): Promise; async assignIssueTypeSchemeToProject( - parameters?: Parameters.AssignIssueTypeSchemeToProject, + parameters: Parameters.AssignIssueTypeSchemeToProject, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/3/issuetypescheme/project', method: 'PUT', data: { - issueTypeSchemeId: parameters?.issueTypeSchemeId, - projectId: parameters?.projectId, + issueTypeSchemeId: parameters.issueTypeSchemeId, + projectId: parameters.projectId, }, }; @@ -248,9 +248,9 @@ export class IssueTypeSchemes { url: `/rest/api/3/issuetypescheme/${parameters.issueTypeSchemeId}`, method: 'PUT', data: { - name: parameters.name, - description: parameters.description, defaultIssueTypeId: parameters.defaultIssueTypeId, + description: parameters.description, + name: parameters.name, }, }; @@ -377,8 +377,8 @@ export class IssueTypeSchemes { url: `/rest/api/3/issuetypescheme/${parameters.issueTypeSchemeId}/issuetype/move`, method: 'PUT', data: { - issueTypeIds: parameters.issueTypeIds, after: parameters.after, + issueTypeIds: parameters.issueTypeIds, position: parameters.position, }, }; diff --git a/src/version3/issueTypeScreenSchemes.ts b/src/version3/issueTypeScreenSchemes.ts index 2b52cba239..3f6b5be5a0 100644 --- a/src/version3/issueTypeScreenSchemes.ts +++ b/src/version3/issueTypeScreenSchemes.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueTypeScreenSchemes { @@ -60,7 +60,7 @@ export class IssueTypeScreenSchemes { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createIssueTypeScreenScheme( - parameters: Parameters.CreateIssueTypeScreenScheme | undefined, + parameters: Parameters.CreateIssueTypeScreenScheme, callback: Callback, ): Promise; /** @@ -70,20 +70,20 @@ export class IssueTypeScreenSchemes { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createIssueTypeScreenScheme( - parameters?: Parameters.CreateIssueTypeScreenScheme, + parameters: Parameters.CreateIssueTypeScreenScheme, callback?: never, ): Promise; async createIssueTypeScreenScheme( - parameters?: Parameters.CreateIssueTypeScreenScheme, + parameters: Parameters.CreateIssueTypeScreenScheme, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/3/issuetypescreenscheme', method: 'POST', data: { - name: parameters?.name, - description: parameters?.description, - issueTypeMappings: parameters?.issueTypeMappings, + description: parameters.description, + issueTypeMappings: parameters.issueTypeMappings, + name: parameters.name, }, }; @@ -244,8 +244,8 @@ export class IssueTypeScreenSchemes { url: `/rest/api/3/issuetypescreenscheme/${parameters.issueTypeScreenSchemeId}`, method: 'PUT', data: { - name: parameters.name, description: parameters.description, + name: parameters.name, }, }; diff --git a/src/version3/issueTypes.ts b/src/version3/issueTypes.ts index a91e4834ec..7d629fd432 100644 --- a/src/version3/issueTypes.ts +++ b/src/version3/issueTypes.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueTypes { @@ -51,7 +51,7 @@ export class IssueTypes { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createIssueType( - parameters: Parameters.CreateIssueType | undefined, + parameters: Parameters.CreateIssueType, callback: Callback, ): Promise; /** @@ -61,20 +61,20 @@ export class IssueTypes { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async createIssueType( - parameters?: Parameters.CreateIssueType, + parameters: Parameters.CreateIssueType, callback?: never, ): Promise; async createIssueType( - parameters?: Parameters.CreateIssueType, + parameters: Parameters.CreateIssueType, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/3/issuetype', method: 'POST', data: { - name: parameters?.name, - description: parameters?.description, - hierarchyLevel: parameters?.hierarchyLevel, + description: parameters.description, + hierarchyLevel: parameters.hierarchyLevel ?? 0, + name: parameters.name, }, }; @@ -186,9 +186,9 @@ export class IssueTypes { url: `/rest/api/3/issuetype/${parameters.id}`, method: 'PUT', data: { - name: parameters.name, - description: parameters.description, avatarId: parameters.avatarId, + description: parameters.description, + name: parameters.name, }, }; @@ -264,23 +264,14 @@ export class IssueTypes { /** * Loads an avatar for the issue type. * - * Specify the avatar's local file location in the body of the request. Also, include the following headers: - * - * - `X-Atlassian-Token: no-check` To prevent XSRF protection blocking the request, for more information see [Special - * Headers](#special-request-headers). - * - `Content-Type: image/image type` Valid image types are JPEG, GIF, or PNG. - * - * For example: `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` - * * The 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. * * The cropped image is then used to create avatars of 16x16, 24x24, 32x32, and 48x48 in size. * - * After creating the avatar, use [ Update issue type](#api-rest-api-3-issuetype-id-put) to set it as the issue type's - * displayed avatar. + * After creating the avatar, use [ Update issue + * type](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-types/#api-rest-api-3-issuetype-id-put) + * to set it as the issue type's displayed avatar. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). @@ -292,23 +283,14 @@ export class IssueTypes { /** * Loads an avatar for the issue type. * - * Specify the avatar's local file location in the body of the request. Also, include the following headers: - * - * - `X-Atlassian-Token: no-check` To prevent XSRF protection blocking the request, for more information see [Special - * Headers](#special-request-headers). - * - `Content-Type: image/image type` Valid image types are JPEG, GIF, or PNG. - * - * For example: `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` - * * The 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. * * The cropped image is then used to create avatars of 16x16, 24x24, 32x32, and 48x48 in size. * - * After creating the avatar, use [ Update issue type](#api-rest-api-3-issuetype-id-put) to set it as the issue type's - * displayed avatar. + * After creating the avatar, use [ Update issue + * type](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-types/#api-rest-api-3-issuetype-id-put) + * to set it as the issue type's displayed avatar. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). @@ -324,11 +306,16 @@ export class IssueTypes { const config: RequestConfig = { url: `/rest/api/3/issuetype/${parameters.id}/avatar2`, method: 'POST', + headers: { + 'X-Atlassian-Token': 'no-check', + 'Content-Type': parameters.mimeType, + }, params: { x: parameters.x, y: parameters.y, - size: parameters.size, + size: parameters.size ?? 0, }, + data: parameters.avatar, }; return this.client.sendRequest(config, callback); diff --git a/src/version3/issueVotes.ts b/src/version3/issueVotes.ts index f115e57588..72ee3e4296 100644 --- a/src/version3/issueVotes.ts +++ b/src/version3/issueVotes.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueVotes { diff --git a/src/version3/issueWatchers.ts b/src/version3/issueWatchers.ts index 69e2c03035..efbcc65f97 100644 --- a/src/version3/issueWatchers.ts +++ b/src/version3/issueWatchers.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueWatchers { diff --git a/src/version3/issueWorklogProperties.ts b/src/version3/issueWorklogProperties.ts index 14a743ca9f..b52b7b6f5d 100644 --- a/src/version3/issueWorklogProperties.ts +++ b/src/version3/issueWorklogProperties.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueWorklogProperties { diff --git a/src/version3/issueWorklogs.ts b/src/version3/issueWorklogs.ts index 2b467b6c1e..a694ba1fb8 100644 --- a/src/version3/issueWorklogs.ts +++ b/src/version3/issueWorklogs.ts @@ -1,15 +1,15 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class IssueWorklogs { constructor(private client: Client) {} /** - * Returns worklogs for an issue, starting from the oldest worklog or from the worklog started on or after a date and - * time. + * Returns worklogs for an issue (ordered by created time), starting from the oldest worklog or from the worklog + * started on or after a date and time. * * Time 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). @@ -30,8 +30,8 @@ export class IssueWorklogs { callback: Callback, ): Promise; /** - * Returns worklogs for an issue, starting from the oldest worklog or from the worklog started on or after a date and - * time. + * Returns worklogs for an issue (ordered by created time), starting from the oldest worklog or from the worklog + * started on or after a date and time. * * Time 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). @@ -137,20 +137,139 @@ export class IssueWorklogs { overrideEditableFlag: parameters.overrideEditableFlag, }, data: { - self: parameters.self, author: parameters.author, - updateAuthor: parameters.updateAuthor, comment, created: parameters.created, - updated: parameters.updated, - visibility: parameters.visibility, - started: parameters.started, - timeSpent: parameters.timeSpent, - timeSpentSeconds: parameters.timeSpentSeconds, id: parameters.id, issueId: parameters.issueId, properties: parameters.properties, + self: parameters.self, + started: parameters.started, + timeSpent: parameters.timeSpent, + timeSpentSeconds: parameters.timeSpentSeconds, + updateAuthor: parameters.updateAuthor, + updated: parameters.updated, + visibility: parameters.visibility, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Deletes a list of worklogs from an issue. This is an experimental API with limitations: + * + * - You can't delete more than 5000 worklogs at once. + * - No notifications will be sent for deleted worklogs. + * + * Time 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). + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + * - _Delete all worklogs_[ project permission](https://confluence.atlassian.com/x/yodKLg) to delete any worklog. + * - If any worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to. + */ + async bulkDeleteWorklogs(parameters: Parameters.BulkDeleteWorklogs, callback: Callback): Promise; + /** + * Deletes a list of worklogs from an issue. This is an experimental API with limitations: + * + * - You can't delete more than 5000 worklogs at once. + * - No notifications will be sent for deleted worklogs. + * + * Time 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). + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the + * issue. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + * - _Delete all worklogs_[ project permission](https://confluence.atlassian.com/x/yodKLg) to delete any worklog. + * - If any worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to. + */ + async bulkDeleteWorklogs(parameters: Parameters.BulkDeleteWorklogs, callback?: never): Promise; + async bulkDeleteWorklogs( + parameters: Parameters.BulkDeleteWorklogs, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/issue/${parameters.issueIdOrKey}/worklog`, + method: 'DELETE', + params: { + adjustEstimate: parameters.adjustEstimate, + overrideEditableFlag: parameters.overrideEditableFlag, + }, + data: { + ids: parameters.ids, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Moves a list of worklogs from one issue to another. This is an experimental API with several limitations: + * + * - You can't move more than 5000 worklogs at once. + * - You can't move worklogs containing an attachment. + * - You can't move worklogs restricted by project roles. + * - No notifications will be sent for moved worklogs. + * - No webhooks or events will be sent for moved worklogs. + * - No issue history will be recorded for moved worklogs. + * + * Time 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). + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the projects containing the + * source and destination issues. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + * - _Delete all worklogs_[ and _Edit all worklogs_](https://confluence.atlassian.com/x/yodKLg)[project + * permission](https://confluence.atlassian.com/x/yodKLg) + * - If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to. + */ + async bulkMoveWorklogs(parameters: Parameters.BulkMoveWorklogs, callback: Callback): Promise; + /** + * Moves a list of worklogs from one issue to another. This is an experimental API with several limitations: + * + * - You can't move more than 5000 worklogs at once. + * - You can't move worklogs containing an attachment. + * - You can't move worklogs restricted by project roles. + * - No notifications will be sent for moved worklogs. + * - No webhooks or events will be sent for moved worklogs. + * - No issue history will be recorded for moved worklogs. + * + * Time 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). + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the projects containing the + * source and destination issues. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + * - _Delete all worklogs_[ and _Edit all worklogs_](https://confluence.atlassian.com/x/yodKLg)[project + * permission](https://confluence.atlassian.com/x/yodKLg) + * - If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to. + */ + async bulkMoveWorklogs(parameters: Parameters.BulkMoveWorklogs, callback?: never): Promise; + async bulkMoveWorklogs(parameters: Parameters.BulkMoveWorklogs, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/3/issue/${parameters.issueIdOrKey}/worklog/move`, + method: 'POST', + params: { + adjustEstimate: parameters.adjustEstimate, + overrideEditableFlag: parameters.overrideEditableFlag, }, + data: parameters.worklogs, }; return this.client.sendRequest(config, callback); diff --git a/src/version3/issues.ts b/src/version3/issues.ts index d7a916b21d..db679cf293 100644 --- a/src/version3/issues.ts +++ b/src/version3/issues.ts @@ -1,12 +1,70 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Issues { constructor(private client: Client) {} + /** + * Bulk fetch changelogs for multiple issues and filter by fields + * + * Returns a paginated list of all changelogs for given issues sorted by changelog date and issue IDs, starting from + * the oldest changelog and smallest issue ID. + * + * Issues are identified by their ID or key, and optionally changelogs can be filtered by their field IDs. You can + * request the changelogs of up to 1000 issues and can filter them by up to 10 field IDs. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the projects that the issues + * are in. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issues. + */ + async getBulkChangelogs( + parameters: Parameters.GetBulkChangelogs, + callback: Callback, + ): Promise; + /** + * Bulk fetch changelogs for multiple issues and filter by fields + * + * Returns a paginated list of all changelogs for given issues sorted by changelog date and issue IDs, starting from + * the oldest changelog and smallest issue ID. + * + * Issues are identified by their ID or key, and optionally changelogs can be filtered by their field IDs. You can + * request the changelogs of up to 1000 issues and can filter them by up to 10 field IDs. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the projects that the issues + * are in. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issues. + */ + async getBulkChangelogs( + parameters: Parameters.GetBulkChangelogs, + callback?: never, + ): Promise; + async getBulkChangelogs( + parameters: Parameters.GetBulkChangelogs, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/changelog/bulkfetch', + method: 'POST', + data: { + fieldIds: parameters.fieldIds, + issueIdsOrKeys: parameters.issueIdsOrKeys, + maxResults: parameters.maxResults, + nextPageToken: parameters.nextPageToken, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Returns all issue events. * @@ -84,7 +142,7 @@ export class Issues { parameters: Parameters.CreateIssue, callback?: Callback, ): Promise { - if (parameters.fields?.description && typeof parameters.fields.description === 'string') { + if (typeof parameters.fields.description === 'string') { parameters.fields.description = { type: 'doc', version: 1, @@ -142,12 +200,9 @@ export class Issues { * * **Signed-in users only:** This API can't be accessed anonymously. * - * **Rate limiting:** Only a single request per user can be active at any given time. + * **Rate limiting:** Only a single request per jira instance can be active at any given time. */ - async archiveIssuesAsync( - parameters: Parameters.ArchiveIssuesAsync, - callback: Callback, - ): Promise; + async archiveIssuesAsync(parameters: Parameters.ArchiveIssuesAsync, callback: Callback): Promise; /** * Enables admins to archive up to 100,000 issues in a single request using JQL, returning the URL to check the status * of the submitted request. @@ -170,10 +225,10 @@ export class Issues { * * **Signed-in users only:** This API can't be accessed anonymously. * - * **Rate limiting:** Only a single request per user can be active at any given time. + * **Rate limiting:** Only a single request per jira instance can be active at any given time. */ - async archiveIssuesAsync(parameters: Parameters.ArchiveIssuesAsync, callback?: never): Promise; - async archiveIssuesAsync( + async archiveIssuesAsync(parameters: Parameters.ArchiveIssuesAsync, callback?: never): Promise; + async archiveIssuesAsync( parameters: Parameters.ArchiveIssuesAsync, callback?: Callback, ): Promise { @@ -303,36 +358,110 @@ export class Issues { } /** - * Returns details of projects, issue types within projects, and, when requested, the create screen fields for each - * issue type for the user. Use the information to populate the requests in [ Create - * issue](#api-rest-api-3-issue-post) and [Create issues](#api-rest-api-3-issue-bulk-post). + * Returns the details for a set of requested issues. You can request up to 100 issues. * - * The request can be restricted to specific projects or issue types using the query parameters. The response will - * contain information for the valid projects, issue types, or project and issue type combinations requested. Note - * that invalid project, issue type, or project and issue type combinations do not generate errors. + * Each issue is identified by its ID or key, however, if the identifier doesn't match an issue, a case-insensitive + * search and check for moved issues is performed. If a matching issue is found its details are returned, a 302 or + * other redirect is **not** returned. + * + * Issues will be returned in ascending `id` order. If there are errors, Jira will return a list of issues which + * couldn't be fetched along with error messages. * * This operation can be accessed anonymously. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** _Create - * issues_ [project permission](https://confluence.atlassian.com/x/yodKLg) in the requested projects. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is + * in. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async bulkFetchIssues( + parameters: Parameters.BulkFetchIssues, + callback: Callback, + ): Promise; + /** + * Returns the details for a set of requested issues. You can request up to 100 issues. + * + * Each issue is identified by its ID or key, however, if the identifier doesn't match an issue, a case-insensitive + * search and check for moved issues is performed. If a matching issue is found its details are returned, a 302 or + * other redirect is **not** returned. + * + * Issues will be returned in ascending `id` order. If there are errors, Jira will return a list of issues which + * couldn't be fetched along with error messages. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Issues + * are included in the response where the user has: + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is + * in. + * - If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission + * to view the issue. + */ + async bulkFetchIssues(parameters: Parameters.BulkFetchIssues, callback?: never): Promise; + async bulkFetchIssues( + parameters: Parameters.BulkFetchIssues, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/issue/bulkfetch', + method: 'POST', + data: { + expand: parameters.expand, + fields: parameters.fields, + fieldsByKeys: parameters.fieldsByKeys, + issueIdsOrKeys: parameters.issueIdsOrKeys, + properties: parameters.properties, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * @deprecated + * + * Returns details of projects, issue types within projects, and, when requested, the create screen fields for each + * issue type for the user. Use the information to populate the requests in [ Create + * issue](#api-rest-api-3-issue-post) and [Create issues](#api-rest-api-3-issue-bulk-post). + * + * Deprecated, see [Create Issue Meta Endpoint Deprecation + * Notice](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-1304). + * + * The request can be restricted to specific projects or issue types using the query parameters. The response will + * contain information for the valid projects, issue types, or project and issue type combinations requested. Note + * that invalid project, issue type, or project and issue type combinations do not generate errors. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** _Create + * issues_ [project permission](https://confluence.atlassian.com/x/yodKLg) in the requested projects. */ async getCreateIssueMeta( parameters: Parameters.GetCreateIssueMeta | undefined, callback: Callback, ): Promise; /** - * Returns details of projects, issue types within projects, and, when requested, the create screen fields for each - * issue type for the user. Use the information to populate the requests in [ Create - * issue](#api-rest-api-3-issue-post) and [Create issues](#api-rest-api-3-issue-bulk-post). + * @deprecated * - * The request can be restricted to specific projects or issue types using the query parameters. The response will - * contain information for the valid projects, issue types, or project and issue type combinations requested. Note - * that invalid project, issue type, or project and issue type combinations do not generate errors. + * Returns details of projects, issue types within projects, and, when requested, the create screen fields for each + * issue type for the user. Use the information to populate the requests in [ Create + * issue](#api-rest-api-3-issue-post) and [Create issues](#api-rest-api-3-issue-bulk-post). * - * This operation can be accessed anonymously. + * Deprecated, see [Create Issue Meta Endpoint Deprecation + * Notice](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-1304). * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** _Create - * issues_ [project permission](https://confluence.atlassian.com/x/yodKLg) in the requested projects. + * The request can be restricted to specific projects or issue types using the query parameters. The response will + * contain information for the valid projects, issue types, or project and issue type combinations requested. Note + * that invalid project, issue type, or project and issue type combinations do not generate errors. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** _Create + * issues_ [project permission](https://confluence.atlassian.com/x/yodKLg) in the requested projects. */ async getCreateIssueMeta( parameters?: Parameters.GetCreateIssueMeta, @@ -357,6 +486,134 @@ export class Issues { return this.client.sendRequest(config, callback); } + /** + * Returns a page of issue type metadata for a specified project. Use the information to populate the requests in [ + * Create issue](#api-rest-api-3-issue-post) and [Create issues](#api-rest-api-3-issue-bulk-post). + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** _Create + * issues_ [project permission](https://confluence.atlassian.com/x/yodKLg) in the requested projects. + */ + async getCreateIssueMetaIssueTypes( + parameters: Parameters.GetCreateIssueMetaIssueTypes, + callback: Callback, + ): Promise; + /** + * Returns a page of issue type metadata for a specified project. Use the information to populate the requests in [ + * Create issue](#api-rest-api-3-issue-post) and [Create issues](#api-rest-api-3-issue-bulk-post). + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** _Create + * issues_ [project permission](https://confluence.atlassian.com/x/yodKLg) in the requested projects. + */ + async getCreateIssueMetaIssueTypes( + parameters: Parameters.GetCreateIssueMetaIssueTypes, + callback?: never, + ): Promise; + async getCreateIssueMetaIssueTypes( + parameters: Parameters.GetCreateIssueMetaIssueTypes, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/issue/createmeta/${parameters.projectIdOrKey}/issuetypes`, + method: 'GET', + params: { + startAt: parameters.startAt, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a page of field metadata for a specified project and issuetype id. Use the information to populate the + * requests in [ Create issue](#api-rest-api-3-issue-post) and [Create issues](#api-rest-api-3-issue-bulk-post). + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** _Create + * issues_ [project permission](https://confluence.atlassian.com/x/yodKLg) in the requested projects. + */ + async getCreateIssueMetaIssueTypeId( + parameters: Parameters.GetCreateIssueMetaIssueTypeId, + callback: Callback, + ): Promise; + /** + * Returns a page of field metadata for a specified project and issuetype id. Use the information to populate the + * requests in [ Create issue](#api-rest-api-3-issue-post) and [Create issues](#api-rest-api-3-issue-bulk-post). + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** _Create + * issues_ [project permission](https://confluence.atlassian.com/x/yodKLg) in the requested projects. + */ + async getCreateIssueMetaIssueTypeId( + parameters: Parameters.GetCreateIssueMetaIssueTypeId, + callback?: never, + ): Promise; + async getCreateIssueMetaIssueTypeId( + parameters: Parameters.GetCreateIssueMetaIssueTypeId, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/issue/createmeta/${parameters.projectIdOrKey}/issuetypes/${parameters.issueTypeId}`, + method: 'GET', + params: { + startAt: parameters.startAt, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns all issues breaching and approaching per-issue limits. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) is required for the project the + * issues are in. Results may be incomplete otherwise + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getIssueLimitReport( + parameters: Parameters.GetIssueLimitReport | undefined, + callback: Callback, + ): Promise; + /** + * Returns all issues breaching and approaching per-issue limits. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Browse projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) is required for the project the + * issues are in. Results may be incomplete otherwise + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getIssueLimitReport( + parameters?: Parameters.GetIssueLimitReport, + callback?: never, + ): Promise; + async getIssueLimitReport( + parameters?: Parameters.GetIssueLimitReport, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/issue/limit/report', + method: 'GET', + params: { + isReturningKeys: parameters?.isReturningKeys, + }, + data: { + issuesApproachingLimitParams: parameters?.issuesApproachingLimitParams, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Enables admins to unarchive up to 1000 issues in a single request using issue ID/key, returning details of the * issue(s) unarchived in the process and the errors encountered, if any. @@ -456,6 +713,7 @@ export class Issues { expand: parameters.expand, properties: parameters.properties, updateHistory: parameters.updateHistory, + failFast: parameters.failFast, }, }; @@ -463,7 +721,9 @@ export class Issues { } /** - * Edits an issue. A transition may be applied and issue properties updated as part of the edit. + * Edits an issue. Issue properties may be updated as part of the edit. Please note that issue transition is not + * supported and is ignored here. To transition an issue, please use [Transition + * issue](#api-rest-api-3-issue-issueIdOrKey-transitions-post). * * The 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). @@ -489,7 +749,9 @@ export class Issues { */ async editIssue(parameters: Parameters.EditIssue, callback: Callback): Promise; /** - * Edits an issue. A transition may be applied and issue properties updated as part of the edit. + * Edits an issue. Issue properties may be updated as part of the edit. Please note that issue transition is not + * supported and is ignored here. To transition an issue, please use [Transition + * issue](#api-rest-api-3-issue-issueIdOrKey-transitions-post). * * The 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). diff --git a/src/version3/jQL.ts b/src/version3/jQL.ts index e630da739d..2d2100ea63 100644 --- a/src/version3/jQL.ts +++ b/src/version3/jQL.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class JQL { @@ -96,8 +96,8 @@ export class JQL { url: '/rest/api/3/jql/autocompletedata', method: 'POST', data: { - projectIds: parameters?.projectIds, includeCollapsedFields: parameters?.includeCollapsedFields, + projectIds: parameters?.projectIds, }, }; @@ -170,7 +170,7 @@ export class JQL { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. */ async parseJqlQueries( - parameters: Parameters.ParseJqlQueries | undefined, + parameters: Parameters.ParseJqlQueries, callback: Callback, ): Promise; /** @@ -183,21 +183,21 @@ export class JQL { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. */ async parseJqlQueries( - parameters?: Parameters.ParseJqlQueries, + parameters: Parameters.ParseJqlQueries, callback?: never, ): Promise; async parseJqlQueries( - parameters?: Parameters.ParseJqlQueries, + parameters: Parameters.ParseJqlQueries, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/3/jql/parse', method: 'POST', params: { - validation: parameters?.validation, + validation: parameters.validation, }, data: { - queries: parameters?.queries, + queries: parameters.queries, }, }; diff --git a/src/version3/jiraExpressions.ts b/src/version3/jiraExpressions.ts index 934f92417f..484b5b02f2 100644 --- a/src/version3/jiraExpressions.ts +++ b/src/version3/jiraExpressions.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class JiraExpressions { @@ -46,8 +46,8 @@ export class JiraExpressions { check: parameters?.check, }, data: { - expressions: parameters?.expressions, contextVariables: parameters?.contextVariables, + expressions: parameters?.expressions, }, }; @@ -106,11 +106,12 @@ export class JiraExpressions { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required**: None. * However, an expression may return different results for different users depending on their permissions. For - * example, different users may see different comments on the same issue. Permission to access Jira Software is - * required to access Jira Software context variables (`board` and `sprint`) or fields (for example, `issue.sprint`). + * example, different users may see different comments on the same issue.\ + * Permission to access Jira Software is required to access Jira Software context variables (`board` and `sprint`) or + * fields (for example, `issue.sprint`). */ async evaluateJiraExpression( - parameters: Parameters.EvaluateJiraExpression | undefined, + parameters: Parameters.EvaluateJiraExpression, callback: Callback, ): Promise; /** @@ -165,26 +166,172 @@ export class JiraExpressions { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required**: None. * However, an expression may return different results for different users depending on their permissions. For - * example, different users may see different comments on the same issue. Permission to access Jira Software is - * required to access Jira Software context variables (`board` and `sprint`) or fields (for example, `issue.sprint`). + * example, different users may see different comments on the same issue.\ + * Permission to access Jira Software is required to access Jira Software context variables (`board` and `sprint`) or + * fields (for example, `issue.sprint`). */ async evaluateJiraExpression( - parameters?: Parameters.EvaluateJiraExpression, + parameters: Parameters.EvaluateJiraExpression, callback?: never, ): Promise; async evaluateJiraExpression( - parameters?: Parameters.EvaluateJiraExpression, + parameters: Parameters.EvaluateJiraExpression, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/3/expression/eval', method: 'POST', params: { - expand: parameters?.expand, + expand: parameters.expand, + }, + data: { + context: parameters.context, + expression: parameters.expression, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * 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`). + * + * 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 + * documentation](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/) for more details. + * + * #### Context variables + * + * The following context variables are available to Jira expressions evaluated by this resource. Their presence + * depends on various factors; usually you need to manually request them in the context object sent in the payload, + * but some of them are added automatically under certain conditions. + * + * - `user` ([User](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#user)): The + * current user. Always available and equal to `null` if the request is anonymous. + * - `app` ([App](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#app)): The + * [Connect app](https://developer.atlassian.com/cloud/jira/platform/index/#connect-apps) that made the request. + * Available only for authenticated requests made by Connect Apps (read more here: [Authentication for Connect + * apps](https://developer.atlassian.com/cloud/jira/platform/security-for-connect-apps/)). + * - `issue` ([Issue](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#issue)): The + * current issue. Available only when the issue is provided in the request context object. + * - `issues` ([List](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#list) of + * [Issues](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#issue)): A + * collection of issues matching a JQL query. Available only when JQL is provided in the request context object. + * - `project` ([Project](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#project)): + * The current project. Available only when the project is provided in the request context object. + * - `sprint` ([Sprint](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#sprint)): + * The current sprint. Available only when the sprint is provided in the request context object. + * - `board` ([Board](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#board)): The + * current board. Available only when the board is provided in the request context object. + * - `serviceDesk` + * ([ServiceDesk](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#servicedesk)): + * The current service desk. Available only when the service desk is provided in the request context object. + * - `customerRequest` + * ([CustomerRequest](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#customerrequest)): + * 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: + * + * - `user`: A [user](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#user) + * specified as an Atlassian account ID. + * - `issue`: An [issue](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#issue) + * specified by ID 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. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required**: None. + * However, an expression may return different results for different users depending on their permissions. For + * example, different users may see different comments on the same issue. Permission to access Jira Software is + * required to access Jira Software context variables (`board` and `sprint`) or fields (for example, `issue.sprint`). + */ + async evaluateJiraExpressionUsingEnhancedSearch( + parameters: Parameters.EvaluateJiraExpressionUsingEnhancedSearch, + callback: Callback, + ): Promise; + /** + * 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`). + * + * 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 + * documentation](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/) for more details. + * + * #### Context variables + * + * The following context variables are available to Jira expressions evaluated by this resource. Their presence + * depends on various factors; usually you need to manually request them in the context object sent in the payload, + * but some of them are added automatically under certain conditions. + * + * - `user` ([User](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#user)): The + * current user. Always available and equal to `null` if the request is anonymous. + * - `app` ([App](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#app)): The + * [Connect app](https://developer.atlassian.com/cloud/jira/platform/index/#connect-apps) that made the request. + * Available only for authenticated requests made by Connect Apps (read more here: [Authentication for Connect + * apps](https://developer.atlassian.com/cloud/jira/platform/security-for-connect-apps/)). + * - `issue` ([Issue](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#issue)): The + * current issue. Available only when the issue is provided in the request context object. + * - `issues` ([List](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#list) of + * [Issues](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#issue)): A + * collection of issues matching a JQL query. Available only when JQL is provided in the request context object. + * - `project` ([Project](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#project)): + * The current project. Available only when the project is provided in the request context object. + * - `sprint` ([Sprint](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#sprint)): + * The current sprint. Available only when the sprint is provided in the request context object. + * - `board` ([Board](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#board)): The + * current board. Available only when the board is provided in the request context object. + * - `serviceDesk` + * ([ServiceDesk](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#servicedesk)): + * The current service desk. Available only when the service desk is provided in the request context object. + * - `customerRequest` + * ([CustomerRequest](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#customerrequest)): + * 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: + * + * - `user`: A [user](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#user) + * specified as an Atlassian account ID. + * - `issue`: An [issue](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#issue) + * specified by ID 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. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required**: None. + * However, an expression may return different results for different users depending on their permissions. For + * example, different users may see different comments on the same issue. Permission to access Jira Software is + * required to access Jira Software context variables (`board` and `sprint`) or fields (for example, `issue.sprint`). + */ + async evaluateJiraExpressionUsingEnhancedSearch( + parameters: Parameters.EvaluateJiraExpressionUsingEnhancedSearch, + callback?: never, + ): Promise; + async evaluateJiraExpressionUsingEnhancedSearch( + parameters: Parameters.EvaluateJiraExpressionUsingEnhancedSearch, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/expression/evaluate', + method: 'POST', + params: { + expand: parameters.expand, }, data: { - expression: parameters?.expression, - context: parameters?.context, + expression: parameters.expression, + context: parameters.context, }, }; diff --git a/src/version3/jiraSettings.ts b/src/version3/jiraSettings.ts index 530adff118..3a7e1406b4 100644 --- a/src/version3/jiraSettings.ts +++ b/src/version3/jiraSettings.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class JiraSettings { @@ -88,18 +88,17 @@ export class JiraSettings { * * The advanced settings below are also accessible in [Jira](https://confluence.atlassian.com/x/vYXKM). * - * | Key | Description | Default value | - * | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | - * | `jira.clone.prefix` | The string of text prefixed to the title of a cloned issue. | `CLONE -` | - * | `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` | - * | `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` | - * | `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` | - * | `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` | - * | `jira.issue.actions.order` | The default order of actions (such as _Comments_ or _Change history_) displayed on the issue view. | `asc` | - * | `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` | - * | `jira.view.issue.links.sort.order` | The sort order of the list of issue links on the issue view. | `type, status, priority` | - * | `jira.comment.collapsing.minimum.hidden` | The minimum number of comments required for comment collapsing to occur. A value of `0` disables comment collapsing. | `4` | - * | `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` | + * | Key | Description | Default value | + * | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | + * | `jira.clone.prefix` | The string of text prefixed to the title of a cloned issue. | `CLONE -` | + * | `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` | + * | `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` | + * | `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` | + * | `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` | + * | `jira.issue.actions.order` | The default order of actions (such as _Comments_ or _Change history_) displayed on the issue view. | `asc` | + * | `jira.view.issue.links.sort.order` | The sort order of the list of issue links on the issue view. | `type, status, priority` | + * | `jira.comment.collapsing.minimum.hidden` | The minimum number of comments required for comment collapsing to occur. A value of `0` disables comment collapsing. | `4` | + * | `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` | * * #### Look and feel * @@ -148,18 +147,17 @@ export class JiraSettings { * * The advanced settings below are also accessible in [Jira](https://confluence.atlassian.com/x/vYXKM). * - * | Key | Description | Default value | - * | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | - * | `jira.clone.prefix` | The string of text prefixed to the title of a cloned issue. | `CLONE -` | - * | `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` | - * | `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` | - * | `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` | - * | `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` | - * | `jira.issue.actions.order` | The default order of actions (such as _Comments_ or _Change history_) displayed on the issue view. | `asc` | - * | `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` | - * | `jira.view.issue.links.sort.order` | The sort order of the list of issue links on the issue view. | `type, status, priority` | - * | `jira.comment.collapsing.minimum.hidden` | The minimum number of comments required for comment collapsing to occur. A value of `0` disables comment collapsing. | `4` | - * | `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` | + * | Key | Description | Default value | + * | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | + * | `jira.clone.prefix` | The string of text prefixed to the title of a cloned issue. | `CLONE -` | + * | `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` | + * | `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` | + * | `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` | + * | `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` | + * | `jira.issue.actions.order` | The default order of actions (such as _Comments_ or _Change history_) displayed on the issue view. | `asc` | + * | `jira.view.issue.links.sort.order` | The sort order of the list of issue links on the issue view. | `type, status, priority` | + * | `jira.comment.collapsing.minimum.hidden` | The minimum number of comments required for comment collapsing to occur. A value of `0` disables comment collapsing. | `4` | + * | `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` | * * #### Look and feel * diff --git a/src/version3/jqlFunctionsApps.ts b/src/version3/jqlFunctionsApps.ts index d45dcf0020..7cfd6b2331 100644 --- a/src/version3/jqlFunctionsApps.ts +++ b/src/version3/jqlFunctionsApps.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class JqlFunctionsApps { @@ -13,6 +13,9 @@ export class JqlFunctionsApps { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** This * API is only accessible to apps and apps can only inspect their own functions. + * + * The new `read:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async getPrecomputations( parameters: Parameters.GetPrecomputations | undefined, @@ -24,6 +27,9 @@ export class JqlFunctionsApps { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** This * API is only accessible to apps and apps can only inspect their own functions. + * + * The new `read:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async getPrecomputations( parameters?: Parameters.GetPrecomputations, @@ -53,9 +59,12 @@ export class JqlFunctionsApps { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** An API * for apps to update their own precomputations. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ async updatePrecomputations( - parameters: Parameters.UpdatePrecomputations | undefined, + parameters: Parameters.UpdatePrecomputations, callback: Callback, ): Promise; /** @@ -63,17 +72,69 @@ export class JqlFunctionsApps { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** An API * for apps to update their own precomputations. + * + * The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. */ - async updatePrecomputations(parameters?: Parameters.UpdatePrecomputations, callback?: never): Promise; + async updatePrecomputations(parameters: Parameters.UpdatePrecomputations, callback?: never): Promise; async updatePrecomputations( - parameters?: Parameters.UpdatePrecomputations, + parameters: Parameters.UpdatePrecomputations, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/3/jql/function/computation', method: 'POST', + params: { + skipNotFoundPrecomputations: parameters.skipNotFoundPrecomputations, + }, + data: { + values: parameters.values, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns function precomputations by IDs, along with information about when they were created, updated, and last + * used. Each precomputation has a `value` - the JQL fragment to replace the custom function clause with. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** This + * API is only accessible to apps and apps can only inspect their own functions. + * + * The new `read:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. + */ + async getPrecomputationsByID( + parameters: Parameters.GetPrecomputationsByID, + callback: Callback, + ): Promise; + /** + * Returns function precomputations by IDs, along with information about when they were created, updated, and last + * used. Each precomputation has a `value` - the JQL fragment to replace the custom function clause with. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** This + * API is only accessible to apps and apps can only inspect their own functions. + * + * The new `read:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we + * recommend adding it to your app's scope list because we will eventually make it mandatory. + */ + async getPrecomputationsByID( + parameters: Parameters.GetPrecomputationsByID, + callback?: never, + ): Promise; + async getPrecomputationsByID( + parameters: Parameters.GetPrecomputationsByID, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/jql/function/computation/search', + method: 'POST', + params: { + orderBy: parameters.orderBy, + }, data: { - values: parameters?.values, + precomputationIDs: parameters.precomputationIDs, }, }; diff --git a/src/version3/labels.ts b/src/version3/labels.ts index d05b19261f..f2a1098be2 100644 --- a/src/version3/labels.ts +++ b/src/version3/labels.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Labels { diff --git a/src/version3/licenseMetrics.ts b/src/version3/licenseMetrics.ts index 4cd2204fac..2f17676a1c 100644 --- a/src/version3/licenseMetrics.ts +++ b/src/version3/licenseMetrics.ts @@ -1,6 +1,6 @@ import * as Models from './models'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class LicenseMetrics { diff --git a/src/version3/models/approvalConfiguration.ts b/src/version3/models/approvalConfiguration.ts new file mode 100644 index 0000000000..790f18d0a8 --- /dev/null +++ b/src/version3/models/approvalConfiguration.ts @@ -0,0 +1,29 @@ +/** The approval configuration of a status within a workflow. Applies only to Jira Service Management approvals. */ +export interface ApprovalConfiguration { + /** Whether the approval configuration is active. */ + active: 'true' | 'false' | string; + /** + * How the required approval count is calculated. It may be configured to require a specific number of approvals, or + * approval by a percentage of approvers. If the approvers source field is Approver groups, you can configure how many + * approvals per group are required for the request to be approved. The number will be the same across all groups. + */ + conditionType: 'number' | 'percent' | 'numberPerPrincipal' | string; + /** + * The number or percentage of approvals required for a request to be approved. If `conditionType` is `number`, the + * value must be 20 or less. If `conditionType` is `percent`, the value must be 100 or less. + */ + conditionValue: string; + /** A list of roles that should be excluded as possible approvers. */ + exclude?: 'assignee' | 'reporter' | string; + /** The custom field ID of the "Approvers" or "Approver Groups" field. */ + fieldId: string; + /** + * The custom field ID of the field used to pre-populate the Approver field. Only supports the "Affected Services" + * field. + */ + prePopulatedFieldId?: string; + /** The numeric ID of the transition to be executed if the request is approved. */ + transitionApproved: string; + /** The numeric ID of the transition to be executed if the request is declined. */ + transitionRejected: string; +} diff --git a/src/version3/models/attachmentMetadata.ts b/src/version3/models/attachmentMetadata.ts index 00385665ae..3b3d5b89ca 100644 --- a/src/version3/models/attachmentMetadata.ts +++ b/src/version3/models/attachmentMetadata.ts @@ -16,7 +16,7 @@ export interface AttachmentMetadata { /** The MIME type of the attachment. */ mimeType?: string; /** Additional properties of the attachment. */ - properties?: {}; + properties?: unknown; /** The URL of the attachment. */ content?: string; /** The URL of a thumbnail representing the attachment. */ diff --git a/src/version3/models/avatar.ts b/src/version3/models/avatar.ts index cab1507727..33fa3d8507 100644 --- a/src/version3/models/avatar.ts +++ b/src/version3/models/avatar.ts @@ -1,3 +1,5 @@ +import type { AvatarUrls } from './avatarUrls'; + /** Details of an avatar. */ export interface Avatar { /** The ID of the avatar. */ @@ -8,13 +10,13 @@ export interface Avatar { */ owner?: string; /** Whether the avatar is a system avatar. */ - isSystemAvatar?: boolean; + isSystemAvatar: boolean; /** Whether the avatar is used in Jira. For example, shown as a project's avatar. */ - isSelected?: boolean; + isSelected: boolean; /** Whether the avatar can be deleted. */ - isDeletable?: boolean; + isDeletable: boolean; /** The file name of the avatar icon. Returned for system avatars. */ fileName?: string; /** The list of avatar icon URLs. */ - urls?: {}; + urls: AvatarUrls; } diff --git a/src/version3/models/avatarWithDetails.ts b/src/version3/models/avatarWithDetails.ts index 15f5f99071..f0c47200c6 100644 --- a/src/version3/models/avatarWithDetails.ts +++ b/src/version3/models/avatarWithDetails.ts @@ -2,5 +2,5 @@ export interface AvatarWithDetails { /** The content type of the avatar. Expected values include 'image/png', 'image/svg+xml', or any other valid MIME type. */ contentType: 'image/png' | 'image/svg+xml' | string; /** The binary representation of the avatar image. */ - avatar: ArrayBuffer; + avatar: Uint8Array; } diff --git a/src/version3/models/avatars.ts b/src/version3/models/avatars.ts index 9954aeb966..c2b1b1684e 100644 --- a/src/version3/models/avatars.ts +++ b/src/version3/models/avatars.ts @@ -3,7 +3,7 @@ import { Avatar } from './avatar'; /** Details about system and custom avatars. */ export interface Avatars { /** System avatars list. */ - system?: Avatar[]; + system: Avatar[]; /** Custom avatars list. */ - custom?: Avatar[]; + custom: Avatar[]; } diff --git a/src/version3/models/bulkChangelog.ts b/src/version3/models/bulkChangelog.ts new file mode 100644 index 0000000000..55644ab007 --- /dev/null +++ b/src/version3/models/bulkChangelog.ts @@ -0,0 +1,12 @@ +import { IssueChangeLog } from './issueChangeLog'; + +/** A page of changelogs which is designed to handle multiple issues */ +export interface BulkChangelog { + /** The list of issues changelogs. */ + issueChangeLogs?: IssueChangeLog[]; + /** + * Continuation token to fetch the next page. If this result represents the last or the only page, this token will be + * null. + */ + nextPageToken?: string; +} diff --git a/src/version3/models/bulkChangelogRequest.ts b/src/version3/models/bulkChangelogRequest.ts new file mode 100644 index 0000000000..b6162735ac --- /dev/null +++ b/src/version3/models/bulkChangelogRequest.ts @@ -0,0 +1,11 @@ +/** Request bean for bulk changelog retrieval */ +export interface BulkChangelogRequest { + /** List of field IDs to filter changelogs */ + fieldIds?: string[]; + /** List of issue IDs/keys to fetch changelogs for */ + issueIdsOrKeys: string[]; + /** The maximum number of items to return per page */ + maxResults?: number; + /** The cursor for pagination */ + nextPageToken?: string; +} diff --git a/src/version3/models/bulkContextualConfiguration.ts b/src/version3/models/bulkContextualConfiguration.ts new file mode 100644 index 0000000000..db48337038 --- /dev/null +++ b/src/version3/models/bulkContextualConfiguration.ts @@ -0,0 +1,13 @@ +/** Details of the contextual configuration for a custom field. */ +export interface BulkContextualConfiguration { + /** The field configuration. */ + configuration?: unknown; + /** The ID of the custom field. */ + customFieldId: string; + /** The ID of the field context the configuration is associated with. */ + fieldContextId: string; + /** The ID of the configuration. */ + id: string; + /** The field value schema. */ + schema?: unknown; +} diff --git a/src/version3/models/bulkEditGetFields.ts b/src/version3/models/bulkEditGetFields.ts new file mode 100644 index 0000000000..aa79b2e628 --- /dev/null +++ b/src/version3/models/bulkEditGetFields.ts @@ -0,0 +1,11 @@ +import { IssueBulkEditField } from './issueBulkEditField'; + +/** Bulk Edit Get Fields Response. */ +export interface BulkEditGetFields { + /** The end cursor for use in pagination. */ + endingBefore?: string; + /** List of all the fields */ + fields?: IssueBulkEditField[]; + /** The start cursor for use in pagination. */ + startingAfter?: string; +} diff --git a/src/version3/models/bulkEditShareableEntity.ts b/src/version3/models/bulkEditShareableEntity.ts index 27d95ecdd0..3218d91463 100644 --- a/src/version3/models/bulkEditShareableEntity.ts +++ b/src/version3/models/bulkEditShareableEntity.ts @@ -3,5 +3,6 @@ export interface BulkEditShareableEntity { /** Allowed action for bulk edit shareable entity */ action: string; /** The mapping dashboard id to errors if any. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any entityErrors?: any; } diff --git a/src/version3/models/bulkIssue.ts b/src/version3/models/bulkIssue.ts new file mode 100644 index 0000000000..8134e65eb7 --- /dev/null +++ b/src/version3/models/bulkIssue.ts @@ -0,0 +1,14 @@ +import { IssueError } from './issueError'; +import { Issue } from './issue'; + +/** The list of requested issues & fields. */ +export interface BulkIssue { + /** + * When Jira can't return an issue enumerated in a request due to a retriable error or payload constraint, we'll + * return the respective issue ID with a corresponding error message. This list is empty when there are no errors + * Issues which aren't found or that the user doesn't have permission to view won't be returned in this list. + */ + issueErrors?: IssueError[]; + /** The list of issues. */ + issues?: Issue[]; +} diff --git a/src/version3/models/bulkIssueIsWatching.ts b/src/version3/models/bulkIssueIsWatching.ts index 8f83bdb7f9..8f44798854 100644 --- a/src/version3/models/bulkIssueIsWatching.ts +++ b/src/version3/models/bulkIssueIsWatching.ts @@ -1,5 +1,5 @@ /** A container for the watch status of a list of issues. */ export interface BulkIssueIsWatching { /** The map of issue ID to boolean watch status. */ - issuesIsWatching?: {}; + issuesIsWatching?: unknown; } diff --git a/src/version3/models/bulkIssuePropertyUpdateRequest.ts b/src/version3/models/bulkIssuePropertyUpdateRequest.ts index 2831b5b06b..cdceff8984 100644 --- a/src/version3/models/bulkIssuePropertyUpdateRequest.ts +++ b/src/version3/models/bulkIssuePropertyUpdateRequest.ts @@ -6,6 +6,7 @@ export interface BulkIssuePropertyUpdateRequest { * 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. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any value?: any; /** * EXPERIMENTAL. The Jira expression to calculate the value of the property. The value of the expression must be an diff --git a/src/version3/models/bulkOperationProgress.ts b/src/version3/models/bulkOperationProgress.ts new file mode 100644 index 0000000000..8c77c543c0 --- /dev/null +++ b/src/version3/models/bulkOperationProgress.ts @@ -0,0 +1,32 @@ +import { User } from './user'; + +export interface BulkOperationProgress { + /** A timestamp of when the task was submitted. */ + created?: string; + /** + * Map of issue IDs for which the operation failed and that the user has permission to view, to their one or more + * reasons for failure. These reasons are open-ended text descriptions of the error and are not selected from a + * predefined list of standard reasons. + */ + failedAccessibleIssues?: unknown; + /** + * The number of issues that are either invalid or issues that the user doesn't have permission to view, regardless of + * the success or failure of the operation. + */ + invalidOrInaccessibleIssueCount?: number; + /** List of issue IDs for which the operation was successful and that the user has permission to view. */ + processedAccessibleIssues?: number[]; + /** Progress of the task as a percentage. */ + progressPercent?: number; + /** A timestamp of when the task was started. */ + started?: string; + /** The status of the task. */ + status?: 'ENQUEUED' | 'RUNNING' | 'COMPLETE' | 'FAILED' | 'CANCEL_REQUESTED' | 'CANCELLED' | 'DEAD' | string; + submittedBy?: User; + /** The ID of the task. */ + taskId: string; + /** The number of issues that the bulk operation was attempted on. */ + totalIssueCount?: number; + /** A timestamp of when the task progress was last updated. */ + updated?: string; +} diff --git a/src/version3/models/bulkTransitionGetAvailableTransitions.ts b/src/version3/models/bulkTransitionGetAvailableTransitions.ts new file mode 100644 index 0000000000..04147a900d --- /dev/null +++ b/src/version3/models/bulkTransitionGetAvailableTransitions.ts @@ -0,0 +1,11 @@ +import { IssueBulkTransitionForWorkflow } from './issueBulkTransitionForWorkflow'; + +/** Bulk Transition Get Available Transitions Response. */ +export interface BulkTransitionGetAvailableTransitions { + /** List of available transitions for bulk transition operation for requested issues grouped by workflow */ + availableTransitions?: IssueBulkTransitionForWorkflow[]; + /** The end cursor for use in pagination. */ + endingBefore?: string; + /** The start cursor for use in pagination. */ + startingAfter?: string; +} diff --git a/src/version3/models/bulkTransitionSubmitInput.ts b/src/version3/models/bulkTransitionSubmitInput.ts new file mode 100644 index 0000000000..beccb9996d --- /dev/null +++ b/src/version3/models/bulkTransitionSubmitInput.ts @@ -0,0 +1,6 @@ +export interface BulkTransitionSubmitInput { + /** List of all the issue IDs or keys that are to be bulk transitioned. */ + selectedIssueIdsOrKeys: string[]; + /** The ID of the transition that is to be performed on the issues. */ + transitionId: string; +} diff --git a/src/version3/models/component.ts b/src/version3/models/component.ts new file mode 100644 index 0000000000..9caaab2d89 --- /dev/null +++ b/src/version3/models/component.ts @@ -0,0 +1,8 @@ +export interface Component { + ari?: string; + description?: string; + id?: string; + metadata?: unknown; + name?: string; + self?: string; +} diff --git a/src/version3/models/conditionGroupConfiguration.ts b/src/version3/models/conditionGroupConfiguration.ts new file mode 100644 index 0000000000..0f17defdaa --- /dev/null +++ b/src/version3/models/conditionGroupConfiguration.ts @@ -0,0 +1,15 @@ +import { WorkflowRuleConfiguration } from './workflowRuleConfiguration'; + +/** The conditions group associated with the transition. */ +export interface ConditionGroupConfiguration { + /** The nested conditions of the condition group. */ + conditionGroups?: ConditionGroupConfiguration[]; + /** The rules for this condition. */ + conditions?: WorkflowRuleConfiguration[]; + /** + * Determines how the conditions in the group are evaluated. Accepts either `ANY` or `ALL`. If `ANY` is used, at least + * one condition in the group must be true for the group to evaluate to true. If `ALL` is used, all conditions in the + * group must be true for the group to evaluate to true. + */ + operation?: 'ANY' | 'ALL' | string; +} diff --git a/src/version3/models/configurationsListParameters.ts b/src/version3/models/configurationsListParameters.ts new file mode 100644 index 0000000000..0ded35d16e --- /dev/null +++ b/src/version3/models/configurationsListParameters.ts @@ -0,0 +1,5 @@ +/** List of custom fields identifiers which will be used to filter configurations */ +export interface ConfigurationsListParameters { + /** List of IDs or keys of the custom fields. It can be a mix of IDs and keys in the same query. */ + fieldIdsOrKeys: string[]; +} diff --git a/src/version3/models/contextualConfiguration.ts b/src/version3/models/contextualConfiguration.ts index c0ddb38796..1a1aa79f84 100644 --- a/src/version3/models/contextualConfiguration.ts +++ b/src/version3/models/contextualConfiguration.ts @@ -5,7 +5,7 @@ export interface ContextualConfiguration { /** The ID of the field context the configuration is associated with. */ fieldContextId: string; /** The field configuration. */ - configuration?: {}; + configuration?: unknown; /** The field value schema. */ - schema?: {}; + schema?: unknown; } diff --git a/src/version3/models/createCrossProjectReleaseRequest.ts b/src/version3/models/createCrossProjectReleaseRequest.ts new file mode 100644 index 0000000000..ad86f7182f --- /dev/null +++ b/src/version3/models/createCrossProjectReleaseRequest.ts @@ -0,0 +1,6 @@ +export interface CreateCrossProjectReleaseRequest { + /** The cross-project release name. */ + name: string; + /** The IDs of the releases to include in the cross-project release. */ + releaseIds?: number[]; +} diff --git a/src/version3/models/createCustomFieldRequest.ts b/src/version3/models/createCustomFieldRequest.ts new file mode 100644 index 0000000000..08f438709f --- /dev/null +++ b/src/version3/models/createCustomFieldRequest.ts @@ -0,0 +1,6 @@ +export interface CreateCustomFieldRequest { + /** The custom field ID. */ + customFieldId: number; + /** Allows filtering issues based on their values for the custom field. */ + filter?: boolean; +} diff --git a/src/version3/models/createDateFieldRequest.ts b/src/version3/models/createDateFieldRequest.ts new file mode 100644 index 0000000000..8c70d94eb2 --- /dev/null +++ b/src/version3/models/createDateFieldRequest.ts @@ -0,0 +1,6 @@ +export interface CreateDateFieldRequest { + /** A date custom field ID. This is required if the type is "DateCustomField". */ + dateCustomFieldId?: number; + /** The date field type. This must be "DueDate", "TargetStartDate", "TargetEndDate" or "DateCustomField". */ + type: 'DueDate' | 'TargetStartDate' | 'TargetEndDate' | 'DateCustomField' | string; +} diff --git a/src/version3/models/createExclusionRulesRequest.ts b/src/version3/models/createExclusionRulesRequest.ts new file mode 100644 index 0000000000..88a7aca6eb --- /dev/null +++ b/src/version3/models/createExclusionRulesRequest.ts @@ -0,0 +1,14 @@ +export interface CreateExclusionRulesRequest { + /** The IDs of the issues to exclude from the plan. */ + issueIds?: number[]; + /** The IDs of the issue types to exclude from the plan. */ + issueTypeIds?: number[]; + /** Issues completed this number of days ago will be excluded from the plan. */ + numberOfDaysToShowCompletedIssues?: number; + /** The IDs of the releases to exclude from the plan. */ + releaseIds?: number[]; + /** The IDs of the work status categories to exclude from the plan. */ + workStatusCategoryIds?: number[]; + /** The IDs of the work statuses to exclude from the plan. */ + workStatusIds?: number[]; +} diff --git a/src/version3/models/createIssueSourceRequest.ts b/src/version3/models/createIssueSourceRequest.ts new file mode 100644 index 0000000000..87f7d3c1f3 --- /dev/null +++ b/src/version3/models/createIssueSourceRequest.ts @@ -0,0 +1,9 @@ +export interface CreateIssueSourceRequest { + /** The issue source type. This must be "Board", "Project" or "Filter". */ + type: 'Board' | 'Project' | 'Filter' | string; + /** + * The issue source value. This must be a board ID if the type is "Board", a project ID if the type is "Project" or a + * filter ID if the type is "Filter". + */ + value: number; +} diff --git a/src/version3/models/createPermissionHolderRequest.ts b/src/version3/models/createPermissionHolderRequest.ts new file mode 100644 index 0000000000..1e0ab09af0 --- /dev/null +++ b/src/version3/models/createPermissionHolderRequest.ts @@ -0,0 +1,9 @@ +export interface CreatePermissionHolderRequest { + /** The permission holder type. This must be "Group" or "AccountId". */ + type: 'Group' | 'AccountId' | string; + /** + * The permission holder value. This must be a group name if the type is "Group" or an account ID if the type is + * "AccountId". + */ + value: string; +} diff --git a/src/version3/models/createPermissionRequest.ts b/src/version3/models/createPermissionRequest.ts new file mode 100644 index 0000000000..0ce59481d7 --- /dev/null +++ b/src/version3/models/createPermissionRequest.ts @@ -0,0 +1,7 @@ +import { CreatePermissionHolderRequest } from './createPermissionHolderRequest'; + +export interface CreatePermissionRequest { + holder?: CreatePermissionHolderRequest; + /** The permission type. This must be "View" or "Edit". */ + type: 'View' | 'Edit' | string; +} diff --git a/src/version3/models/createPriorityDetails.ts b/src/version3/models/createPriorityDetails.ts index 6d1af928fd..934f9993bf 100644 --- a/src/version3/models/createPriorityDetails.ts +++ b/src/version3/models/createPriorityDetails.ts @@ -1,11 +1,42 @@ /** Details of an issue priority. */ export interface CreatePriorityDetails { - /** The name of the priority. Must be unique. */ - name: string; + /** + * The ID for the avatar for the priority. Either the iconUrl or avatarId must be defined, but not both. This + * parameter is nullable and will become mandatory once the iconUrl parameter is deprecated. + */ + avatarId?: number; /** The description of the priority. */ description?: string; - /** The URL of an icon for the priority. Accepted protocols are HTTP and HTTPS. Built in icons can also be used. */ - iconUrl?: string; + /** + * The URL of an icon for the priority. Accepted protocols are HTTP and HTTPS. Built in icons can also be used. Either + * the iconUrl or avatarId must be defined, but not both. + * + * @deprecated This property is deprecated and will be removed in a future version. Use `avatarId` instead. + */ + iconUrl?: + | '/images/icons/priorities/blocker.png' + | '/images/icons/priorities/critical.png' + | '/images/icons/priorities/high.png' + | '/images/icons/priorities/highest.png' + | '/images/icons/priorities/low.png' + | '/images/icons/priorities/lowest.png' + | '/images/icons/priorities/major.png' + | '/images/icons/priorities/medium.png' + | '/images/icons/priorities/minor.png' + | '/images/icons/priorities/trivial.png' + | '/images/icons/priorities/blocker_new.png' + | '/images/icons/priorities/critical_new.png' + | '/images/icons/priorities/high_new.png' + | '/images/icons/priorities/highest_new.png' + | '/images/icons/priorities/low_new.png' + | '/images/icons/priorities/lowest_new.png' + | '/images/icons/priorities/major_new.png' + | '/images/icons/priorities/medium_new.png' + | '/images/icons/priorities/minor_new.png' + | '/images/icons/priorities/trivial_new.png' + | string; + /** The name of the priority. Must be unique. */ + name: string; /** The status color of the priority in 3-digit or 6-digit hexadecimal format. */ statusColor: string; } diff --git a/src/version3/models/createProjectDetails.ts b/src/version3/models/createProjectDetails.ts index ab05664eb7..6203147f67 100644 --- a/src/version3/models/createProjectDetails.ts +++ b/src/version3/models/createProjectDetails.ts @@ -62,12 +62,30 @@ export interface CreateProjectDetails { | 'com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment' | 'com.atlassian.jira-core-project-templates:jira-core-simplified-task-tracking' | 'com.atlassian.servicedesk:simplified-it-service-management' - | 'com.atlassian.servicedesk:simplified-general-service-desk' - | 'com.atlassian.servicedesk:simplified-internal-service-desk' + | 'com.atlassian.servicedesk:simplified-general-service-desk-it' + | 'com.atlassian.servicedesk:simplified-general-service-desk-business' | 'com.atlassian.servicedesk:simplified-external-service-desk' | 'com.atlassian.servicedesk:simplified-hr-service-desk' | 'com.atlassian.servicedesk:simplified-facilities-service-desk' | 'com.atlassian.servicedesk:simplified-legal-service-desk' + | 'com.atlassian.servicedesk:simplified-analytics-service-desk' + | 'com.atlassian.servicedesk:simplified-marketing-service-desk' + | 'com.atlassian.servicedesk:simplified-design-service-desk' + | 'com.atlassian.servicedesk:simplified-sales-service-desk' + | 'com.atlassian.servicedesk:simplified-blank-project-business' + | 'com.atlassian.servicedesk:simplified-blank-project-it' + | 'com.atlassian.servicedesk:simplified-finance-service-desk' + | 'com.atlassian.servicedesk:next-gen-it-service-desk' + | 'com.atlassian.servicedesk:next-gen-hr-service-desk' + | 'com.atlassian.servicedesk:next-gen-legal-service-desk' + | 'com.atlassian.servicedesk:next-gen-marketing-service-desk' + | 'com.atlassian.servicedesk:next-gen-facilities-service-desk' + | 'com.atlassian.servicedesk:next-gen-general-it-service-desk' + | 'com.atlassian.servicedesk:next-gen-general-business-service-desk' + | 'com.atlassian.servicedesk:next-gen-analytics-service-desk' + | 'com.atlassian.servicedesk:next-gen-finance-service-desk' + | 'com.atlassian.servicedesk:next-gen-design-service-desk' + | 'com.atlassian.servicedesk:next-gen-sales-service-desk' | 'com.pyxis.greenhopper.jira:gh-simplified-agility-kanban' | 'com.pyxis.greenhopper.jira:gh-simplified-agility-scrum' | 'com.pyxis.greenhopper.jira:gh-simplified-basic' diff --git a/src/version3/models/createSchedulingRequest.ts b/src/version3/models/createSchedulingRequest.ts new file mode 100644 index 0000000000..400b3c9e1f --- /dev/null +++ b/src/version3/models/createSchedulingRequest.ts @@ -0,0 +1,12 @@ +import { CreateDateFieldRequest } from './createDateFieldRequest'; + +export interface CreateSchedulingRequest { + /** The dependencies for the plan. This must be "Sequential" or "Concurrent". */ + dependencies?: 'Sequential' | 'Concurrent' | string; + endDate?: CreateDateFieldRequest; + /** The estimation unit for the plan. This must be "StoryPoints", "Days" or "Hours". */ + estimation: 'StoryPoints' | 'Days' | 'Hours' | string; + /** The inferred dates for the plan. This must be "None", "SprintDates" or "ReleaseDates". */ + inferredDates?: 'None' | 'SprintDates' | 'ReleaseDates' | string; + startDate?: CreateDateFieldRequest; +} diff --git a/src/version3/models/createWorkflowCondition.ts b/src/version3/models/createWorkflowCondition.ts index bc89856b0f..b6ea5e6920 100644 --- a/src/version3/models/createWorkflowCondition.ts +++ b/src/version3/models/createWorkflowCondition.ts @@ -7,5 +7,5 @@ export interface CreateWorkflowCondition { /** The type of the transition rule. */ type?: string; /** EXPERIMENTAL. The configuration of the transition rule. */ - configuration?: {}; + configuration?: unknown; } diff --git a/src/version3/models/createWorkflowStatusDetails.ts b/src/version3/models/createWorkflowStatusDetails.ts index 8e227e5cd0..5e0fed8f4d 100644 --- a/src/version3/models/createWorkflowStatusDetails.ts +++ b/src/version3/models/createWorkflowStatusDetails.ts @@ -3,5 +3,5 @@ export interface CreateWorkflowStatusDetails { /** The ID of the status. */ id: string; /** The properties of the status. */ - properties?: {}; + properties?: unknown; } diff --git a/src/version3/models/createWorkflowTransitionDetails.ts b/src/version3/models/createWorkflowTransitionDetails.ts index 1f5a1e9c66..a66445c507 100644 --- a/src/version3/models/createWorkflowTransitionDetails.ts +++ b/src/version3/models/createWorkflowTransitionDetails.ts @@ -16,5 +16,5 @@ export interface CreateWorkflowTransitionDetails { rules?: CreateWorkflowTransitionRulesDetails; screen?: CreateWorkflowTransitionScreenDetails; /** The properties of the transition. */ - properties?: {}; + properties?: unknown; } diff --git a/src/version3/models/createWorkflowTransitionRule.ts b/src/version3/models/createWorkflowTransitionRule.ts index 44c68dd949..5bdec647c9 100644 --- a/src/version3/models/createWorkflowTransitionRule.ts +++ b/src/version3/models/createWorkflowTransitionRule.ts @@ -3,5 +3,5 @@ export interface CreateWorkflowTransitionRule { /** The type of the transition rule. */ type: string; /** EXPERIMENTAL. The configuration of the transition rule. */ - configuration?: {}; + configuration?: unknown; } diff --git a/src/version3/models/customFieldValueUpdate.ts b/src/version3/models/customFieldValueUpdate.ts index fe01beb2a4..e64ade6365 100644 --- a/src/version3/models/customFieldValueUpdate.ts +++ b/src/version3/models/customFieldValueUpdate.ts @@ -19,5 +19,6 @@ export interface CustomFieldValueUpdate { * A 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). */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any value: any; } diff --git a/src/version3/models/dataClassificationLevels.ts b/src/version3/models/dataClassificationLevels.ts new file mode 100644 index 0000000000..8358ceb249 --- /dev/null +++ b/src/version3/models/dataClassificationLevels.ts @@ -0,0 +1,7 @@ +import { DataClassificationTag } from './dataClassificationTag'; + +/** The data classification. */ +export interface DataClassificationLevels { + /** The data classifications. */ + classifications?: DataClassificationTag[]; +} diff --git a/src/version3/models/dataClassificationTag.ts b/src/version3/models/dataClassificationTag.ts new file mode 100644 index 0000000000..672de56a1c --- /dev/null +++ b/src/version3/models/dataClassificationTag.ts @@ -0,0 +1,17 @@ +/** The data classification. */ +export interface DataClassificationTag { + /** The color of the data classification object. */ + color?: string; + /** The description of the data classification object. */ + description?: string; + /** The guideline of the data classification object. */ + guideline?: string; + /** The ID of the data classification object. */ + id: string; + /** The name of the data classification object. */ + name?: string; + /** The rank of the data classification object. */ + rank?: number; + /** The status of the data classification object. */ + status: string; +} diff --git a/src/version3/models/document.ts b/src/version3/models/document.ts index 6797ef8e0e..a640258482 100644 --- a/src/version3/models/document.ts +++ b/src/version3/models/document.ts @@ -28,6 +28,7 @@ export interface Document { content?: Omit[]; version: number; marks?: Mark[]; + // eslint-disable-next-line @typescript-eslint/no-explicit-any attrs?: any; text?: string; } diff --git a/src/version3/models/documentVersion.ts b/src/version3/models/documentVersion.ts new file mode 100644 index 0000000000..dacc3ebb2f --- /dev/null +++ b/src/version3/models/documentVersion.ts @@ -0,0 +1,7 @@ +/** The current version details of this workflow scheme. */ +export interface DocumentVersion { + /** The version UUID. */ + id?: string; + /** The version number. */ + versionNumber?: number; +} diff --git a/src/version3/models/enhancedSearchRequest.ts b/src/version3/models/enhancedSearchRequest.ts new file mode 100644 index 0000000000..86da058df5 --- /dev/null +++ b/src/version3/models/enhancedSearchRequest.ts @@ -0,0 +1,99 @@ +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. + * + * - 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. + */ + nextPageToken?: string; + /** + * The maximum number of items to return per page. To manage page size, API may return fewer items per page where a + * large number of fields are requested. The greatest number of items returned per page is achieved when requesting + * `id` or `key` only. + * + * It returns max 5000 issues. + * + * Default: `50` + * + * Format: `int32` + */ + maxResults?: number; + /** + * A list of fields to return for each issue, use it to retrieve a subset of fields. This parameter accepts a + * comma-separated list. Expand options include: + * + * - `*all` Returns all fields. + * - `*navigable` Returns navigable fields. + * - `id` Returns only issue IDs. + * - Any issue field, prefixed with a minus to exclude. + * + * The default is `id`. + * + * Examples: + * + * - `summary,comment` Returns only the summary and comments fields. + * - `-description` Returns all navigable (default) fields except description. + * - `*all,-comment` Returns all fields except comments. + * + * 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/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-get) + * where the default is all fields. + */ + fields?: string[]; + /** + * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#expansion) to include additional + * information about issues in the response. Note that, unlike the majority of instances where `expand` is specified, + * `expand` is defined as a comma-delimited string of values. The expand options are: + * + * - `renderedFields` Returns field values rendered in HTML format. + * - `names` Returns the display name of each field. + * - `schema` Returns the schema describing a field type. + * - `transitions` Returns all possible transitions for the issue. + * - `operations` Returns all possible operations for the issue. + * - `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. + * + * Examples: `names,changelog` Returns the display name of each field as well as a list of recent updates to an issue. + */ + expand?: + | 'renderedFields' + | 'names' + | 'schema' + | 'transitions' + | 'operations' + | 'editmeta' + | 'changelog' + | 'versionedRepresentations' + | ( + | 'renderedFields' + | 'names' + | 'schema' + | 'transitions' + | 'operations' + | 'editmeta' + | 'changelog' + | 'versionedRepresentations' + )[] + | string + | string[]; + /** 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; + /** Fail this request early if we can't retrieve all field data. The default is `false`. */ + failFast?: boolean; + /** Strong consistency issue ids to be reconciled with search results. Accepts max 50 ids. All issues must exist. */ + reconcileIssues?: number[]; +} diff --git a/src/version3/models/entityProperty.ts b/src/version3/models/entityProperty.ts index af8e3ac889..f00da59752 100644 --- a/src/version3/models/entityProperty.ts +++ b/src/version3/models/entityProperty.ts @@ -6,5 +6,6 @@ export interface EntityProperty { /** The key of the property. Required on create and update. */ key?: string; /** The value of the property. Required on create and update. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any value?: any; } diff --git a/src/version3/models/errorCollection.ts b/src/version3/models/errorCollection.ts index f7e87fa1fe..d020c8c401 100644 --- a/src/version3/models/errorCollection.ts +++ b/src/version3/models/errorCollection.ts @@ -6,6 +6,6 @@ export interface ErrorCollection { * 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?: {}; + errors?: unknown; status?: number; } diff --git a/src/version3/models/evaluateMetaData.ts b/src/version3/models/evaluateMetaData.ts new file mode 100644 index 0000000000..82a8086f50 --- /dev/null +++ b/src/version3/models/evaluateMetaData.ts @@ -0,0 +1,8 @@ +import { JiraExpressionsComplexity } from './jiraExpressionsComplexity'; +import { JExpEvaluateIssuesMeta } from './jExpEvaluateIssuesMeta'; + +/** Contains information about the expression evaluation. */ +export interface EvaluateMetaData { + complexity?: JiraExpressionsComplexity; + issues?: JExpEvaluateIssuesMeta; +} diff --git a/src/version3/models/evaluatedJiraExpression.ts b/src/version3/models/evaluatedJiraExpression.ts new file mode 100644 index 0000000000..e35f612054 --- /dev/null +++ b/src/version3/models/evaluatedJiraExpression.ts @@ -0,0 +1,16 @@ +import { EvaluateMetaData } from './evaluateMetaData'; + +/** + * The result of evaluating a Jira expression.This bean will be replacing `JiraExpressionResultBean` bean as part of new + * evaluate endpoint + */ +export interface EvaluatedJiraExpression { + meta?: EvaluateMetaData; + /** + * 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: unknown; +} diff --git a/src/version3/models/fieldCreateMetadata.ts b/src/version3/models/fieldCreateMetadata.ts new file mode 100644 index 0000000000..b2067a9e98 --- /dev/null +++ b/src/version3/models/fieldCreateMetadata.ts @@ -0,0 +1,26 @@ +import { JsonType } from './jsonType'; + +/** The metadata describing an issue field for createmeta. */ +export interface FieldCreateMetadata { + /** The list of values allowed in the field. */ + allowedValues?: unknown[]; + /** The URL that can be used to automatically complete the field. */ + autoCompleteUrl?: string; + /** The configuration properties. */ + configuration?: unknown; + /** The default value of the field. */ + defaultValue?: unknown; + /** The field id. */ + fieldId: string; + /** Whether the field has a default value. */ + hasDefaultValue?: boolean; + /** The key of the field. */ + key: string; + /** The name of the field. */ + name: string; + /** The list of operations that can be performed on the field. */ + operations: string[]; + /** Whether the field is required. */ + required: boolean; + schema?: JsonType; +} diff --git a/src/version3/models/fields.ts b/src/version3/models/fields.ts index 8ae63d5a0e..7ff8e298c1 100644 --- a/src/version3/models/fields.ts +++ b/src/version3/models/fields.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ import { Attachment } from './attachment'; import { Comment } from './comment'; import { Document } from './document'; @@ -18,7 +19,7 @@ import { Watchers } from './watchers'; import { Worklog } from './worklog'; /** Key fields from the linked issue. */ -export interface Fields { +export interface Fields extends Record { /** The estimate of how much longer working on the issue will take, in seconds. */ aggregatetimespent: number | null; /** The assignee of the linked issue. */ @@ -80,6 +81,4 @@ export interface Fields { total: number; worklogs: Worklog[]; }; - - [key: string]: any; } diff --git a/src/version3/models/filter.ts b/src/version3/models/filter.ts index 11b5afeac0..02ded28470 100644 --- a/src/version3/models/filter.ts +++ b/src/version3/models/filter.ts @@ -1,40 +1,46 @@ -import { FilterSubscriptionsList } from './filterSubscriptionsList'; import { SharePermission } from './sharePermission'; import { User } from './user'; import { UserList } from './userList'; +import { FilterSubscriptionsList } from './filterSubscriptionsList'; /** Details about a filter. */ export interface Filter { - /** The URL of the filter. */ - self?: string; + /** + * @experimental [Experimental] Approximate last used time. Returns the date and time when the filter was last used. Returns `null` + * if the filter hasn't been used after tracking was enabled. For performance reasons, timestamps aren't updated in + * real time and therefore may not be exactly accurate. + */ + approximateLastUsed?: string; + /** A description of the filter. */ + description?: string; + /** The groups and projects that can edit the filter. */ + editPermissions?: SharePermission[]; + /** Whether the filter is selected as a favorite. */ + favourite?: boolean; + /** The count of how many users have selected this filter as a favorite, including the filter owner. */ + favouritedCount?: number; /** The unique identifier for the filter. */ id?: string; + /** The JQL query for the filter. For example, _project = SSP AND issuetype = Bug_. */ + jql?: string; /** The name of the filter. Must be unique. */ name: string; - /** A description of the filter. */ - description?: string; owner?: User; - /** The JQL query for the filter. For example, _project = SSP AND issuetype = Bug_. */ - jql?: string; - /** - * A URL to view the filter results in Jira, using the ID of the filter. For example, - * _https://your-domain.atlassian.net/issues/?filter=10100_. - */ - viewUrl?: string; /** * A URL to view the filter results in Jira, using the [Search for issues using * JQL](#api-rest-api-3-filter-search-get) operation with the filter's JQL string to return the filter results. For * example, _https://your-domain.atlassian.net/rest/api/3/search?jql=project+%3D+SSP+AND+issuetype+%3D+Bug_. */ searchUrl?: string; - /** Whether the filter is selected as a favorite. */ - favourite?: boolean; - /** The count of how many users have selected this filter as a favorite, including the filter owner. */ - favouritedCount?: number; + /** The URL of the filter. */ + self?: string; /** The groups and projects that the filter is shared with. */ sharePermissions?: SharePermission[]; - /** The groups and projects that can edit the filter. */ - editPermissions?: SharePermission[]; sharedUsers?: UserList; subscriptions?: FilterSubscriptionsList; + /** + * A URL to view the filter results in Jira, using the ID of the filter. For example, + * _https://your-domain.atlassian.net/issues/?filter=10100_. + */ + viewUrl?: string; } diff --git a/src/version3/models/getAtlassianTeamResponse.ts b/src/version3/models/getAtlassianTeamResponse.ts new file mode 100644 index 0000000000..ad60480d52 --- /dev/null +++ b/src/version3/models/getAtlassianTeamResponse.ts @@ -0,0 +1,12 @@ +export interface GetAtlassianTeamResponse { + /** The capacity for the Atlassian team. */ + capacity?: number; + /** The Atlassian team ID. */ + id: string; + /** The ID of the issue source for the Atlassian team. */ + issueSourceId?: number; + /** The planning style for the Atlassian team. This is "Scrum" or "Kanban". */ + planningStyle: 'Scrum' | 'Kanban' | string; + /** The sprint length for the Atlassian team. */ + sprintLength?: number; +} diff --git a/src/version3/models/getCrossProjectReleaseResponse.ts b/src/version3/models/getCrossProjectReleaseResponse.ts new file mode 100644 index 0000000000..4e41368cc5 --- /dev/null +++ b/src/version3/models/getCrossProjectReleaseResponse.ts @@ -0,0 +1,6 @@ +export interface GetCrossProjectReleaseResponse { + /** The cross-project release name. */ + name?: string; + /** The IDs of the releases included in the cross-project release. */ + releaseIds?: number[]; +} diff --git a/src/version3/models/getCustomFieldResponse.ts b/src/version3/models/getCustomFieldResponse.ts new file mode 100644 index 0000000000..8ac304ff9b --- /dev/null +++ b/src/version3/models/getCustomFieldResponse.ts @@ -0,0 +1,6 @@ +export interface GetCustomFieldResponse { + /** The custom field ID. */ + customFieldId: number; + /** Allows filtering issues based on their values for the custom field. */ + filter?: boolean; +} diff --git a/src/version3/models/getDateFieldResponse.ts b/src/version3/models/getDateFieldResponse.ts new file mode 100644 index 0000000000..d2293240a8 --- /dev/null +++ b/src/version3/models/getDateFieldResponse.ts @@ -0,0 +1,6 @@ +export interface GetDateFieldResponse { + /** A date custom field ID. This is returned if the type is "DateCustomField". */ + dateCustomFieldId?: number; + /** The date field type. This is "DueDate", "TargetStartDate", "TargetEndDate" or "DateCustomField". */ + type: 'DueDate' | 'TargetStartDate' | 'TargetEndDate' | 'DateCustomField' | string; +} diff --git a/src/version3/models/getExclusionRulesResponse.ts b/src/version3/models/getExclusionRulesResponse.ts new file mode 100644 index 0000000000..c2852ef738 --- /dev/null +++ b/src/version3/models/getExclusionRulesResponse.ts @@ -0,0 +1,14 @@ +export interface GetExclusionRulesResponse { + /** The IDs of the issues excluded from the plan. */ + issueIds?: number[]; + /** The IDs of the issue types excluded from the plan. */ + issueTypeIds?: number[]; + /** Issues completed this number of days ago are excluded from the plan. */ + numberOfDaysToShowCompletedIssues: number; + /** The IDs of the releases excluded from the plan. */ + releaseIds?: number[]; + /** The IDs of the work status categories excluded from the plan. */ + workStatusCategoryIds?: number[]; + /** The IDs of the work statuses excluded from the plan. */ + workStatusIds?: number[]; +} diff --git a/src/version3/models/getIssueSourceResponse.ts b/src/version3/models/getIssueSourceResponse.ts new file mode 100644 index 0000000000..fd864bf6ad --- /dev/null +++ b/src/version3/models/getIssueSourceResponse.ts @@ -0,0 +1,9 @@ +export interface GetIssueSourceResponse { + /** The issue source type. This is "Board", "Project" or "Filter". */ + type: 'Board' | 'Project' | 'Filter' | 'Custom' | string; + /** + * The issue source value. This is a board ID if the type is "Board", a project ID if the type is "Project" or a + * filter ID if the type is "Filter". + */ + value: number; +} diff --git a/src/version3/models/getPermissionHolderResponse.ts b/src/version3/models/getPermissionHolderResponse.ts new file mode 100644 index 0000000000..4d44c9cb87 --- /dev/null +++ b/src/version3/models/getPermissionHolderResponse.ts @@ -0,0 +1,9 @@ +export interface GetPermissionHolderResponse { + /** The permission holder type. This is "Group" or "AccountId". */ + type: 'Group' | 'AccountId' | string; + /** + * The permission holder value. This is a group name if the type is "Group" or an account ID if the type is + * "AccountId". + */ + value: string; +} diff --git a/src/version3/models/getPermissionResponse.ts b/src/version3/models/getPermissionResponse.ts new file mode 100644 index 0000000000..c778b582bc --- /dev/null +++ b/src/version3/models/getPermissionResponse.ts @@ -0,0 +1,7 @@ +import { GetPermissionHolderResponse } from './getPermissionHolderResponse'; + +export interface GetPermissionResponse { + holder?: GetPermissionHolderResponse; + /** The permission type. This is "View" or "Edit". */ + type: 'View' | 'Edit' | string; +} diff --git a/src/version3/models/getPlanOnlyTeamResponse.ts b/src/version3/models/getPlanOnlyTeamResponse.ts new file mode 100644 index 0000000000..5dd4cf00e0 --- /dev/null +++ b/src/version3/models/getPlanOnlyTeamResponse.ts @@ -0,0 +1,16 @@ +export interface GetPlanOnlyTeamResponse { + /** The capacity for the plan-only team. */ + capacity?: number; + /** The plan-only team ID. */ + id: number; + /** The ID of the issue source for the plan-only team. */ + issueSourceId?: number; + /** The account IDs of the plan-only team members. */ + memberAccountIds?: string[]; + /** The plan-only team name. */ + name: string; + /** The planning style for the plan-only team. This is "Scrum" or "Kanban". */ + planningStyle: 'Scrum' | 'Kanban' | string; + /** The sprint length for the plan-only team. */ + sprintLength?: number; +} diff --git a/src/version3/models/getPlanResponseForPage.ts b/src/version3/models/getPlanResponseForPage.ts new file mode 100644 index 0000000000..63a774a14f --- /dev/null +++ b/src/version3/models/getPlanResponseForPage.ts @@ -0,0 +1,12 @@ +import { GetIssueSourceResponse } from './getIssueSourceResponse'; + +export interface GetPlanResponseForPage { + /** The plan ID. */ + id: string; + /** The issue sources included in the plan. */ + issueSources?: GetIssueSourceResponse[]; + /** The plan name. */ + name: string; + /** The plan status. This is "Active", "Trashed" or "Archived". */ + status: 'Active' | 'Trashed' | 'Archived' | string; +} diff --git a/src/version3/models/getSchedulingResponse.ts b/src/version3/models/getSchedulingResponse.ts new file mode 100644 index 0000000000..8a284167f7 --- /dev/null +++ b/src/version3/models/getSchedulingResponse.ts @@ -0,0 +1,12 @@ +import { GetDateFieldResponse } from './getDateFieldResponse'; + +export interface GetSchedulingResponse { + /** The dependencies for the plan. This is "Sequential" or "Concurrent". */ + dependencies: 'Sequential' | 'Concurrent' | string; + endDate?: GetDateFieldResponse; + /** The estimation unit for the plan. This is "StoryPoints", "Days" or "Hours". */ + estimation: 'StoryPoints' | 'Days' | 'Hours' | string; + /** The inferred dates for the plan. This is "None", "SprintDates" or "ReleaseDates". */ + inferredDates: 'None' | 'SprintDates' | 'ReleaseDates' | string; + startDate?: GetDateFieldResponse; +} diff --git a/src/version3/models/getTeamResponseForPage.ts b/src/version3/models/getTeamResponseForPage.ts new file mode 100644 index 0000000000..6d49ebff03 --- /dev/null +++ b/src/version3/models/getTeamResponseForPage.ts @@ -0,0 +1,8 @@ +export interface GetTeamResponseForPage { + /** The team ID. */ + id: string; + /** The team name. This is returned if the type is "PlanOnly". */ + name?: string; + /** The team type. This is "PlanOnly" or "Atlassian". */ + type: 'PlanOnly' | 'Atlassian' | string; +} diff --git a/src/version3/models/historyMetadata.ts b/src/version3/models/historyMetadata.ts index ff27d2ce33..08563db789 100644 --- a/src/version3/models/historyMetadata.ts +++ b/src/version3/models/historyMetadata.ts @@ -20,5 +20,5 @@ export interface HistoryMetadata { generator?: HistoryMetadataParticipant; cause?: HistoryMetadataParticipant; /** Additional arbitrary information about the history record. */ - extraData?: {}; + extraData?: unknown; } diff --git a/src/version3/models/idSearchRequest.ts b/src/version3/models/idSearchRequest.ts new file mode 100644 index 0000000000..4f15da0140 --- /dev/null +++ b/src/version3/models/idSearchRequest.ts @@ -0,0 +1,8 @@ +export interface IdSearchRequest { + /** A [JQL](https://confluence.atlassian.com/x/egORLQ) expression. Order by clauses are not allowed. */ + jql?: string; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** The continuation token to fetch the next page. This token is provided by the response of this endpoint. */ + nextPageToken?: string; +} diff --git a/src/version3/models/idSearchResults.ts b/src/version3/models/idSearchResults.ts new file mode 100644 index 0000000000..596045fb5c --- /dev/null +++ b/src/version3/models/idSearchResults.ts @@ -0,0 +1,10 @@ +/** Result of your JQL search. Returns a list of issue IDs and a token to fetch the next page if one exists. */ +export interface IdSearchResults { + /** The list of issue IDs found by the search. */ + issueIds?: number[]; + /** + * Continuation token to fetch the next page. If this result represents the last or the only page this token will be + * null. + */ + nextPageToken?: string; +} diff --git a/src/version3/models/index.ts b/src/version3/models/index.ts index 68860e2b33..0b3a6a5980 100644 --- a/src/version3/models/index.ts +++ b/src/version3/models/index.ts @@ -8,6 +8,7 @@ export * from './announcementBannerConfigurationUpdate'; export * from './application'; export * from './applicationProperty'; export * from './applicationRole'; +export * from './approvalConfiguration'; export * from './archiveIssueAsyncRequest'; export * from './associatedItem'; export * from './associateFieldConfigurationsWithIssueTypesRequest'; @@ -28,17 +29,25 @@ export * from './avatar'; export * from './avatars'; export * from './avatarUrls'; export * from './avatarWithDetails'; +export * from './bulkChangelog'; +export * from './bulkChangelogRequest'; export * from './bulkChangeOwnerDetails'; +export * from './bulkContextualConfiguration'; export * from './bulkCustomFieldOptionCreateRequest'; export * from './bulkCustomFieldOptionUpdateRequest'; +export * from './bulkEditGetFields'; export * from './bulkEditShareableEntity'; +export * from './bulkIssue'; export * from './bulkIssueIsWatching'; export * from './bulkIssuePropertyUpdateRequest'; export * from './bulkOperationErrorResult'; +export * from './bulkOperationProgress'; export * from './bulkPermissionGrants'; export * from './bulkPermissionsRequest'; export * from './bulkProjectPermissionGrants'; export * from './bulkProjectPermissions'; +export * from './bulkTransitionGetAvailableTransitions'; +export * from './bulkTransitionSubmitInput'; export * from './changeDetails'; export * from './changedValue'; export * from './changedWorklog'; @@ -46,9 +55,12 @@ export * from './changedWorklogs'; export * from './changelog'; export * from './columnItem'; export * from './comment'; +export * from './component'; export * from './componentIssuesCount'; export * from './componentWithIssueCount'; +export * from './conditionGroupConfiguration'; export * from './configuration'; +export * from './configurationsListParameters'; export * from './connectCustomFieldValue'; export * from './connectCustomFieldValues'; export * from './connectModule'; @@ -61,14 +73,22 @@ export * from './containerOfWorkflowSchemeAssociations'; export * from './contextForProjectAndIssueType'; export * from './contextualConfiguration'; export * from './convertedJQLQueries'; +export * from './createCrossProjectReleaseRequest'; export * from './createCustomFieldContext'; +export * from './createCustomFieldRequest'; +export * from './createDateFieldRequest'; export * from './createdIssue'; export * from './createdIssues'; +export * from './createExclusionRulesRequest'; export * from './createIssueSecuritySchemeDetails'; +export * from './createIssueSourceRequest'; export * from './createNotificationSchemeDetails'; +export * from './createPermissionHolderRequest'; +export * from './createPermissionRequest'; export * from './createPriorityDetails'; export * from './createProjectDetails'; export * from './createResolutionDetails'; +export * from './createSchedulingRequest'; export * from './createUiModificationDetails'; export * from './createUpdateRoleRequest'; export * from './createWorkflowCondition'; @@ -103,17 +123,23 @@ export * from './dashboardGadgetResponse'; export * from './dashboardGadgetSettings'; export * from './dashboardGadgetUpdateRequest'; export * from './dashboardUser'; +export * from './dataClassificationLevels'; +export * from './dataClassificationTag'; export * from './dateRangeFilter'; export * from './defaultLevelValue'; export * from './defaultShareScope'; export * from './defaultWorkflow'; export * from './deleteAndReplaceVersion'; export * from './document'; +export * from './documentVersion'; +export * from './enhancedSearchRequest'; export * from './entityProperty'; export * from './entityPropertyDetails'; export * from './error'; export * from './errorCollection'; export * from './errors'; +export * from './evaluatedJiraExpression'; +export * from './evaluateMetaData'; export * from './eventNotification'; export * from './exportArchivedIssuesTaskProgress'; export * from './failedWebhook'; @@ -128,6 +154,7 @@ export * from './fieldConfigurationScheme'; export * from './fieldConfigurationSchemeProjectAssociation'; export * from './fieldConfigurationSchemeProjects'; export * from './fieldConfigurationToIssueTypeMapping'; +export * from './fieldCreateMetadata'; export * from './fieldDetails'; export * from './fieldLastUsed'; export * from './fieldReferenceData'; @@ -142,6 +169,18 @@ export * from './foundGroups'; export * from './foundUsers'; export * from './foundUsersAndGroups'; export * from './functionReferenceData'; +export * from './getAtlassianTeamResponse'; +export * from './getCrossProjectReleaseResponse'; +export * from './getCustomFieldResponse'; +export * from './getDateFieldResponse'; +export * from './getExclusionRulesResponse'; +export * from './getIssueSourceResponse'; +export * from './getPermissionHolderResponse'; +export * from './getPermissionResponse'; +export * from './getPlanOnlyTeamResponse'; +export * from './getPlanResponseForPage'; +export * from './getSchedulingResponse'; +export * from './getTeamResponseForPage'; export * from './globalScope'; export * from './group'; export * from './groupDetails'; @@ -154,15 +193,25 @@ export * from './historyMetadataParticipant'; export * from './icon'; export * from './id'; export * from './idOrKey'; +export * from './idSearchRequest'; +export * from './idSearchResults'; export * from './includedFields'; export * from './issue'; export * from './issueArchivalSync'; export * from './issueArchivalSyncRequest'; +export * from './issueBulkDeletePayload'; +export * from './issueBulkEditField'; +export * from './issueBulkEditPayload'; +export * from './issueBulkMovePayload'; +export * from './issueBulkTransitionForWorkflow'; +export * from './issueBulkTransitionPayload'; +export * from './issueChangeLog'; export * from './issueChangelogIds'; export * from './issueCommentListRequest'; export * from './issueCreateMetadata'; export * from './issueEntityProperties'; export * from './issueEntityPropertiesForMultiUpdate'; +export * from './issueError'; export * from './issueEvent'; export * from './issueFieldOption'; export * from './issueFieldOptionConfiguration'; @@ -170,6 +219,7 @@ export * from './issueFieldOptionCreate'; export * from './issueFieldOptionScope'; export * from './issueFilterForBulkPropertyDelete'; export * from './issueFilterForBulkPropertySet'; +export * from './issueLimitReport'; export * from './issueLink'; export * from './issueLinkType'; export * from './issueLinkTypes'; @@ -185,6 +235,7 @@ export * from './issuesJqlMetaData'; export * from './issuesMeta'; export * from './issuesUpdate'; export * from './issueTransition'; +export * from './issueTransitionStatus'; export * from './issueTypeCreate'; export * from './issueTypeDetails'; export * from './issueTypeIds'; @@ -214,21 +265,66 @@ export * from './issueTypeWithStatus'; export * from './issueTypeWorkflowMapping'; export * from './issueUpdateDetails'; export * from './issueUpdateMetadata'; +export * from './jexpEvaluateCtxIssues'; +export * from './jexpEvaluateCtxJqlIssues'; +export * from './jExpEvaluateIssuesJqlMetaData'; +export * from './jExpEvaluateIssuesMeta'; export * from './jexpIssues'; export * from './jexpJqlIssues'; +export * from './jiraCascadingSelectField'; +export * from './jiraColorField'; +export * from './jiraColorInput'; +export * from './jiraComponentField'; +export * from './jiraDateField'; +export * from './jiraDateInput'; +export * from './jiraDateTimeField'; +export * from './jiraDateTimeInput'; +export * from './jiraDurationField'; export * from './jiraExpressionAnalysis'; export * from './jiraExpressionComplexity'; export * from './jiraExpressionEvalContext'; export * from './jiraExpressionEvalRequest'; +export * from './jiraExpressionEvaluateContext'; export * from './jiraExpressionEvaluationMetaData'; +export * from './jiraExpressionEvalUsingEnhancedSearchRequest'; export * from './jiraExpressionForAnalysis'; export * from './jiraExpressionResult'; export * from './jiraExpressionsAnalysis'; export * from './jiraExpressionsComplexity'; export * from './jiraExpressionsComplexityValue'; export * from './jiraExpressionValidationError'; +export * from './jiraGroupInput'; +export * from './jiraIssueFields'; +export * from './jiraIssueTypeField'; +export * from './jiraLabelsField'; +export * from './jiraLabelsInput'; +export * from './jiraMultipleGroupPickerField'; +export * from './jiraMultipleSelectField'; +export * from './jiraMultipleSelectUserPickerField'; +export * from './jiraMultipleVersionPickerField'; +export * from './jiraMultiSelectComponentField'; +export * from './jiraNumberField'; +export * from './jiraPriorityField'; +export * from './jiraRichTextField'; +export * from './jiraRichTextInput'; +export * from './jiraSelectedOptionField'; +export * from './jiraSingleGroupPickerField'; +export * from './jiraSingleLineTextField'; +export * from './jiraSingleSelectField'; +export * from './jiraSingleSelectUserPickerField'; +export * from './jiraSingleVersionPickerField'; export * from './jiraStatus'; +export * from './jiraTimeTrackingField'; +export * from './jiraUrlField'; +export * from './jiraUserField'; +export * from './jiraVersionField'; +export * from './jiraWorkflow'; +export * from './jiraWorkflowStatus'; +export * from './jqlCount'; +export * from './jqlCountRequest'; export * from './jqlFunctionPrecomputation'; +export * from './jqlFunctionPrecomputationGetByIdRequest'; +export * from './jqlFunctionPrecomputationGetByIdResponse'; export * from './jqlFunctionPrecomputationUpdate'; export * from './jqlFunctionPrecomputationUpdateRequest'; export * from './jQLPersonalDataMigrationRequest'; @@ -243,6 +339,7 @@ export * from './jqlQueryOrderByClauseElement'; export * from './jqlQueryToSanitize'; export * from './jQLQueryWithUnknownUsers'; export * from './jQLReferenceData'; +export * from './jsonNode'; export * from './jsonType'; export * from './license'; export * from './licensedApplication'; @@ -253,6 +350,8 @@ export * from './linkIssueRequestJson'; export * from './listWrapperCallbackApplicationRole'; export * from './listWrapperCallbackGroupName'; export * from './locale'; +export * from './mappingsByIssueTypeOverride'; +export * from './mappingsByWorkflow'; export * from './mark'; export * from './moveField'; export * from './multiIssueEntityProperties'; @@ -277,7 +376,7 @@ export * from './operationMessage'; export * from './operations'; export * from './orderOfCustomFieldOptions'; export * from './orderOfIssueTypes'; -export * from './pageBeanFieldConfigurationDetails'; +export * from './pageBulkContextualConfiguration'; export * from './pageChangelog'; export * from './pageComment'; export * from './pageComponentWithIssueCount'; @@ -310,6 +409,8 @@ export * from './pageJqlFunctionPrecomputation'; export * from './pageNotificationScheme'; export * from './pageOfChangelogs'; export * from './pageOfComments'; +export * from './pageOfCreateMetaIssueTypes'; +export * from './pageOfCreateMetaIssueTypeWithField'; export * from './pageOfDashboards'; export * from './pageOfStatuses'; export * from './pageOfWorklogs'; @@ -330,6 +431,8 @@ export * from './pageUserDetails'; export * from './pageUserKey'; export * from './pageVersion'; export * from './pageWebhook'; +export * from './pageWithCursorGetPlanResponseForPage'; +export * from './pageWithCursorGetTeamResponseForPage'; export * from './pageWorkflow'; export * from './pageWorkflowScheme'; export * from './pageWorkflowTransitionRules'; @@ -344,12 +447,21 @@ export * from './permissionScheme'; export * from './permissionSchemes'; export * from './permissionsKeys'; export * from './permittedProjects'; +export * from './plan'; export * from './priority'; export * from './priorityId'; +export * from './priorityMapping'; +export * from './prioritySchemeChangesWithoutMappings'; +export * from './prioritySchemeId'; +export * from './prioritySchemeWithPaginatedPrioritiesAndProjects'; +export * from './priorityWithSequence'; export * from './project'; +export * from './projectAndIssueTypePair'; export * from './projectAvatars'; export * from './projectCategory'; export * from './projectComponent'; +export * from './projectDataPolicies'; +export * from './projectDataPolicy'; export * from './projectDetails'; export * from './projectEmailAddress'; export * from './projectFeature'; @@ -375,6 +487,9 @@ export * from './projectRoleGroup'; export * from './projectRoleUser'; export * from './projectScope'; export * from './projectType'; +export * from './projectUsage'; +export * from './projectUsagePage'; +export * from './projectWithDataPolicy'; export * from './propertyKey'; export * from './propertyKeys'; export * from './publishedWorkflowId'; @@ -386,6 +501,8 @@ export * from './remoteObject'; export * from './removeOptionFromIssuesResult'; export * from './reorderIssuePriorities'; export * from './reorderIssueResolutionsRequest'; +export * from './requiredMappingByIssueType'; +export * from './requiredMappingByWorkflows'; export * from './resolution'; export * from './resolutionId'; export * from './restrictedPermission'; @@ -405,6 +522,8 @@ export * from './screenSchemeDetails'; export * from './screenSchemeId'; export * from './screenTypes'; export * from './screenWithTab'; +export * from './searchAndReconcileResults'; +export * from './searchAndReconcileResults'; export * from './searchAutoCompleteFilter'; export * from './searchRequest'; export * from './searchResults'; @@ -418,6 +537,8 @@ export * from './securitySchemeMembersRequest'; export * from './securitySchemes'; export * from './securitySchemeWithProjects'; export * from './serverInformation'; +export * from './serviceRegistry'; +export * from './serviceRegistryTier'; export * from './setDefaultLevelsRequest'; export * from './setDefaultPriorityRequest'; export * from './setDefaultResolutionRequest'; @@ -428,17 +549,33 @@ export * from './simpleErrorCollection'; export * from './simpleLink'; export * from './simpleListWrapperApplicationRole'; export * from './simpleListWrapperGroupName'; +export * from './simpleUsage'; +export * from './simplifiedIssueTransition'; export * from './status'; export * from './statusCategory'; export * from './statusCreate'; export * from './statusCreateRequest'; export * from './statusDetails'; +export * from './statusesPerWorkflow'; export * from './statusMapping'; +export * from './statusMetadata'; +export * from './statusProjectIssueTypeUsage'; +export * from './statusProjectIssueTypeUsagePage'; +export * from './statusProjectUsage'; +export * from './statusProjectUsagePage'; export * from './statusScope'; export * from './statusUpdate'; export * from './statusUpdateRequest'; +export * from './statusWorkflowUsage'; +export * from './statusWorkflowUsagePage'; +export * from './statusWorkflowUsageWorkflow'; +export * from './submittedBulkOperation'; export * from './suggestedIssue'; +export * from './suggestedMappingsForPrioritiesRequest'; +export * from './suggestedMappingsForProjectsRequest'; +export * from './suggestedMappingsRequest'; export * from './systemAvatars'; +export * from './taskProgressNode'; export * from './taskProgressObject'; export * from './taskProgressRemoveOptionFromIssuesResult'; export * from './timeTrackingConfiguration'; @@ -451,13 +588,18 @@ export * from './uiModificationDetails'; export * from './uiModificationIdentifiers'; export * from './unrestrictedUserEmail'; export * from './updateCustomFieldDetails'; +export * from './updateDefaultProjectClassification'; export * from './updatedProjectCategory'; export * from './updateFieldConfigurationSchemeDetails'; export * from './updateIssueSecurityLevelDetails'; export * from './updateIssueSecuritySchemeRequest'; export * from './updateNotificationSchemeDetails'; +export * from './updatePrioritiesInSchemeRequest'; export * from './updatePriorityDetails'; +export * from './updatePrioritySchemeRequest'; +export * from './updatePrioritySchemeResponse'; export * from './updateProjectDetails'; +export * from './updateProjectsInSchemeRequest'; export * from './updateResolutionDetails'; export * from './updateScreenDetails'; export * from './updateScreenSchemeDetails'; @@ -471,10 +613,14 @@ export * from './userKey'; export * from './userList'; export * from './userMigration'; export * from './userPickerUser'; +export * from './validationOptionsForCreate'; +export * from './validationOptionsForUpdate'; export * from './version'; +export * from './versionApprover'; export * from './versionIssueCounts'; export * from './versionIssuesStatus'; export * from './versionMove'; +export * from './versionRelatedWork'; export * from './versionUnresolvedIssuesCount'; export * from './versionUsageInCustomField'; export * from './visibility'; @@ -485,20 +631,47 @@ export * from './webhookDetails'; export * from './webhookRegistrationDetails'; export * from './webhooksExpirationDate'; export * from './workflow'; +export * from './workflowAssociationStatusMapping'; +export * from './workflowCapabilities'; export * from './workflowCondition'; +export * from './workflowCreate'; +export * from './workflowCreateRequest'; +export * from './workflowElementReference'; export * from './workflowId'; +export * from './workflowLayout'; +export * from './workflowMetadataAndIssueTypeRestModel'; +export * from './workflowMetadataRestModel'; export * from './workflowOperations'; +export * from './workflowProjectIssueTypeUsage'; +export * from './workflowProjectIssueTypeUsagePage'; +export * from './workflowProjectUsage'; +export * from './workflowRead'; +export * from './workflowReferenceStatus'; +export * from './workflowRuleConfiguration'; export * from './workflowRules'; export * from './workflowRulesSearch'; export * from './workflowRulesSearchDetails'; export * from './workflowScheme'; +export * from './workflowSchemeAssociation'; export * from './workflowSchemeAssociations'; export * from './workflowSchemeIdName'; export * from './workflowSchemeProjectAssociation'; +export * from './workflowSchemeProjectUsage'; +export * from './workflowSchemeReadRequest'; +export * from './workflowSchemeReadResponse'; +export * from './workflowSchemeUpdateRequiredMappingsResponse'; +export * from './workflowSchemeUsage'; +export * from './workflowSchemeUsagePage'; +export * from './workflowScope'; +export * from './workflowSearchResponse'; export * from './workflowStatus'; +export * from './workflowStatusAndPort'; +export * from './workflowStatusLayout'; export * from './workflowStatusProperties'; +export * from './workflowStatusUpdate'; export * from './workflowsWithTransitionRulesDetails'; export * from './workflowTransition'; +export * from './workflowTransitionLinks'; export * from './workflowTransitionProperty'; export * from './workflowTransitionRule'; export * from './workflowTransitionRules'; @@ -506,5 +679,14 @@ export * from './workflowTransitionRulesDetails'; export * from './workflowTransitionRulesUpdate'; export * from './workflowTransitionRulesUpdateErrorDetails'; export * from './workflowTransitionRulesUpdateErrors'; +export * from './workflowTransitions'; +export * from './workflowTrigger'; +export * from './workflowUpdate'; +export * from './workflowUpdateRequest'; +export * from './workflowUpdateValidateRequest'; +export * from './workflowValidationError'; +export * from './workflowValidationErrorList'; export * from './worklog'; export * from './worklogIdsRequest'; +export * from './worklogsMoveRequest'; +export * from './workspaceDataPolicy'; diff --git a/src/version3/models/issue.ts b/src/version3/models/issue.ts index 16051659c7..0ac1cbc47c 100644 --- a/src/version3/models/issue.ts +++ b/src/version3/models/issue.ts @@ -16,20 +16,20 @@ export interface Issue { /** The key of the issue. */ key: string; /** The rendered value of each field present on the issue. */ - renderedFields?: {}; + renderedFields?: unknown; /** Details of the issue properties identified in the request. */ - properties?: {}; + properties?: unknown; /** The ID and name of each field present on the issue. */ - names?: {}; + names?: unknown; /** The schema describing each field present on the issue. */ - schema?: {}; + schema?: unknown; /** The transitions that can be performed on the issue. */ transitions?: IssueTransition[]; operations?: Operations; editmeta?: IssueUpdateMetadata; changelog?: PageOfChangelogs; /** The versions of each field on the issue. */ - versionedRepresentations?: {}; + versionedRepresentations?: unknown; fieldsToInclude?: IncludedFields; fields: Fields; } diff --git a/src/version3/models/issueBulkDeletePayload.ts b/src/version3/models/issueBulkDeletePayload.ts new file mode 100644 index 0000000000..100907420b --- /dev/null +++ b/src/version3/models/issueBulkDeletePayload.ts @@ -0,0 +1,14 @@ +/** Issue Bulk Delete Payload */ +export interface IssueBulkDeletePayload { + /** + * List of issue IDs or keys which are to be bulk deleted. These IDs or keys can be from different projects and issue + * types. + */ + selectedIssueIdsOrKeys: string[]; + /** + * A boolean value that indicates whether to send a bulk change notification when the issues are being deleted. + * + * If `true`, dispatches a bulk notification email to users about the updates. + */ + sendBulkNotification?: boolean; +} diff --git a/src/version3/models/issueBulkEditField.ts b/src/version3/models/issueBulkEditField.ts new file mode 100644 index 0000000000..44beac8680 --- /dev/null +++ b/src/version3/models/issueBulkEditField.ts @@ -0,0 +1,20 @@ +export interface IssueBulkEditField { + /** Description of the field. */ + description?: string; + /** A list of options related to the field, applicable in contexts where multiple selections are allowed. */ + fieldOptions?: unknown[]; + /** The unique ID of the field. */ + id?: string; + /** Indicates whether the field is mandatory for the operation. */ + isRequired?: boolean; + /** Specifies supported actions (like add, replace, remove) on multi-select fields via an enum. */ + multiSelectFieldOptions?: ('ADD' | 'REMOVE' | 'REPLACE' | 'REMOVE_ALL' | string)[]; + /** The display name of the field. */ + name?: string; + /** A URL to fetch additional data for the field */ + searchUrl?: string; + /** The type of the field. */ + type?: string; + /** A message indicating why the field is unavailable for editing. */ + unavailableMessage?: string; +} diff --git a/src/version3/models/issueBulkEditPayload.ts b/src/version3/models/issueBulkEditPayload.ts new file mode 100644 index 0000000000..c4eb8b98cf --- /dev/null +++ b/src/version3/models/issueBulkEditPayload.ts @@ -0,0 +1,23 @@ +import { JiraIssueFields } from './jiraIssueFields'; + +/** Issue Bulk Edit Payload */ +export interface IssueBulkEditPayload { + editedFieldsInput?: JiraIssueFields; + /** + * List of all the field IDs that are to be bulk edited. Each field ID in this list corresponds to a specific + * attribute of an issue that is set to be modified in the bulk edit operation. The relevant field ID can be obtained + * by calling the Bulk Edit Get Fields REST API (documentation available on this page itself). + */ + selectedActions: string[]; + /** + * List of issue IDs or keys which are to be bulk edited. These IDs or keys can be from different projects and issue + * types. + */ + selectedIssueIdsOrKeys: string[]; + /** + * A boolean value that indicates whether to send a bulk change notification when the issues are being edited. + * + * If `true`, dispatches a bulk notification email to users about the updates. + */ + sendBulkNotification?: boolean; +} diff --git a/src/version3/models/issueBulkMovePayload.ts b/src/version3/models/issueBulkMovePayload.ts new file mode 100644 index 0000000000..17fb5a6bc9 --- /dev/null +++ b/src/version3/models/issueBulkMovePayload.ts @@ -0,0 +1,24 @@ +/** Issue Bulk Move Payload */ +export interface IssueBulkMovePayload { + /** + * A boolean value that indicates whether to send a bulk change notification when the issues are being moved. + * + * If `true`, dispatches a bulk notification email to users about the updates. + */ + sendBulkNotification?: boolean; + /** + * An object representing the mapping of issues and data related to destination entities, like fields and statuses, + * that are required during a bulk move. + * + * The key is a string that is created by concatenating the following three entities in order, separated by commas. + * The format is `,,`. It should be unique across mappings provided + * in the payload. If you provide multiple mappings for the same key, only one will be processed. However, the + * operation won't fail, so the error may be hard to track down. + * + * _**Destination project**_ (Required): ID or key of the project to which the issues are being moved. _**Destination + * issueType**_ (Required): ID of the issueType to which the issues are being moved. _**Destination parent ID or + * key**_ (Optional): ID or key of the issue which will become the parent of the issues being moved. Only required + * when the destination issueType is a subtask. + */ + targetToSourcesMapping?: unknown; +} diff --git a/src/version3/models/issueBulkTransitionForWorkflow.ts b/src/version3/models/issueBulkTransitionForWorkflow.ts new file mode 100644 index 0000000000..710bf66f6a --- /dev/null +++ b/src/version3/models/issueBulkTransitionForWorkflow.ts @@ -0,0 +1,15 @@ +import { SimplifiedIssueTransition } from './simplifiedIssueTransition'; + +export interface IssueBulkTransitionForWorkflow { + /** Indicates whether all the transitions of this workflow are available in the transitions list or not. */ + isTransitionsFiltered?: boolean; + /** List of issue keys from the request which are associated with this workflow. */ + issues?: string[]; + /** + * List of transitions available for issues from the request which are associated with this workflow. + * + * _This list includes only those transitions that are common across the issues in this workflow and do not involve + * any additional field updates._* + */ + transitions?: SimplifiedIssueTransition[]; +} diff --git a/src/version3/models/issueBulkTransitionPayload.ts b/src/version3/models/issueBulkTransitionPayload.ts new file mode 100644 index 0000000000..7cd8931d97 --- /dev/null +++ b/src/version3/models/issueBulkTransitionPayload.ts @@ -0,0 +1,18 @@ +import { BulkTransitionSubmitInput } from './bulkTransitionSubmitInput'; + +/** Issue Bulk Transition Payload */ +export interface IssueBulkTransitionPayload { + /** + * List of objects and each object has two properties: + * + * Issues that will be bulk transitioned. TransitionId that corresponds to a specific transition of issues that share + * the same workflow. + */ + bulkTransitionInputs: BulkTransitionSubmitInput[]; + /** + * A boolean value that indicates whether to send a bulk change notification when the issues are being transitioned. + * + * If `true`, dispatches a bulk notification email to users about the updates. + */ + sendBulkNotification?: boolean; +} diff --git a/src/version3/models/issueChangeLog.ts b/src/version3/models/issueChangeLog.ts new file mode 100644 index 0000000000..cab78f577e --- /dev/null +++ b/src/version3/models/issueChangeLog.ts @@ -0,0 +1,9 @@ +import { Changelog } from './changelog'; + +/** List of changelogs that belong to single issue */ +export interface IssueChangeLog { + /** List of changelogs that belongs to given issueId. */ + changeHistories?: Changelog[]; + /** The ID of the issue. */ + issueId?: string; +} diff --git a/src/version3/models/issueEntityProperties.ts b/src/version3/models/issueEntityProperties.ts index e47d748bad..4c5b4e9b80 100644 --- a/src/version3/models/issueEntityProperties.ts +++ b/src/version3/models/issueEntityProperties.ts @@ -6,5 +6,5 @@ export interface IssueEntityProperties { /** A list of entity property IDs. */ entitiesIds?: number[]; /** A list of entity property keys and values. */ - properties?: {}; + properties?: unknown; } diff --git a/src/version3/models/issueEntityPropertiesForMultiUpdate.ts b/src/version3/models/issueEntityPropertiesForMultiUpdate.ts index 6d2ef7121d..470792d02a 100644 --- a/src/version3/models/issueEntityPropertiesForMultiUpdate.ts +++ b/src/version3/models/issueEntityPropertiesForMultiUpdate.ts @@ -6,5 +6,5 @@ export interface IssueEntityPropertiesForMultiUpdate { /** The ID of the issue. */ issueID?: number; /** Entity properties to set on the issue. The maximum length of an issue property value is 32768 characters. */ - properties?: {}; + properties?: unknown; } diff --git a/src/version3/models/issueError.ts b/src/version3/models/issueError.ts new file mode 100644 index 0000000000..e48a85799f --- /dev/null +++ b/src/version3/models/issueError.ts @@ -0,0 +1,7 @@ +/** Describes the error that occurred when retrieving data for a particular issue. */ +export interface IssueError { + /** The error that occurred when fetching this issue. */ + errorMessage?: string; + /** The ID of the issue. */ + id?: string; +} diff --git a/src/version3/models/issueFieldOption.ts b/src/version3/models/issueFieldOption.ts index 9c7f203657..6f673e84cc 100644 --- a/src/version3/models/issueFieldOption.ts +++ b/src/version3/models/issueFieldOption.ts @@ -12,6 +12,6 @@ export interface IssueFieldOption { * 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?: {}; + properties?: unknown; config?: IssueFieldOptionConfiguration; } diff --git a/src/version3/models/issueFieldOptionCreate.ts b/src/version3/models/issueFieldOptionCreate.ts index 7a095d6826..939703a042 100644 --- a/src/version3/models/issueFieldOptionCreate.ts +++ b/src/version3/models/issueFieldOptionCreate.ts @@ -8,6 +8,6 @@ export interface IssueFieldOptionCreate { * extractions (see https://developer.atlassian.com/cloud/jira/platform/modules/issue-field-option-property-index/) * are defined in the descriptor for the issue field module. */ - properties?: {}; + properties?: unknown; config?: IssueFieldOptionConfiguration; } diff --git a/src/version3/models/issueFilterForBulkPropertyDelete.ts b/src/version3/models/issueFilterForBulkPropertyDelete.ts index f1a384cc7f..5a9169c1ca 100644 --- a/src/version3/models/issueFilterForBulkPropertyDelete.ts +++ b/src/version3/models/issueFilterForBulkPropertyDelete.ts @@ -3,5 +3,6 @@ export interface IssueFilterForBulkPropertyDelete { /** List of issues to perform the bulk delete operation on. */ entityIds?: number[]; /** The value of properties to perform the bulk operation on. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any currentValue?: any; } diff --git a/src/version3/models/issueFilterForBulkPropertySet.ts b/src/version3/models/issueFilterForBulkPropertySet.ts index 292e29b7cb..8aea367e94 100644 --- a/src/version3/models/issueFilterForBulkPropertySet.ts +++ b/src/version3/models/issueFilterForBulkPropertySet.ts @@ -3,6 +3,7 @@ export interface IssueFilterForBulkPropertySet { /** List of issues to perform the bulk operation on. */ entityIds?: number[]; /** The value of properties to perform the bulk operation on. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any currentValue?: any; /** Whether the bulk operation occurs only when the property is present on or absent from an issue. */ hasProperty?: boolean; diff --git a/src/version3/models/issueLimitReport.ts b/src/version3/models/issueLimitReport.ts new file mode 100644 index 0000000000..9a9068630b --- /dev/null +++ b/src/version3/models/issueLimitReport.ts @@ -0,0 +1,8 @@ +export interface IssueLimitReport { + /** A list of ids of issues approaching the limit and their field count */ + issuesApproachingLimit?: unknown; + /** A list of ids of issues breaching the limit and their field count */ + issuesBreachingLimit?: unknown; + /** The fields and their defined limits */ + limits?: unknown; +} diff --git a/src/version3/models/issueTransition.ts b/src/version3/models/issueTransition.ts index dc7f8afd37..fac0406880 100644 --- a/src/version3/models/issueTransition.ts +++ b/src/version3/models/issueTransition.ts @@ -21,7 +21,7 @@ export interface IssueTransition { * Details of the fields associated with the issue transition screen. Use this information to populate `fields` and * `update` in a transition request. */ - fields?: {}; + fields?: unknown; /** Expand options that include additional transition details in the response. */ expand?: string; looped?: boolean; diff --git a/src/version3/models/issueTransitionStatus.ts b/src/version3/models/issueTransitionStatus.ts new file mode 100644 index 0000000000..09f6b49c7a --- /dev/null +++ b/src/version3/models/issueTransitionStatus.ts @@ -0,0 +1,6 @@ +export interface IssueTransitionStatus { + /** The unique ID of the status. */ + statusId?: number; + /** The name of the status. */ + statusName?: string; +} diff --git a/src/version3/models/issueTypeCreate.ts b/src/version3/models/issueTypeCreate.ts index 07a31fd581..c2a0144913 100644 --- a/src/version3/models/issueTypeCreate.ts +++ b/src/version3/models/issueTypeCreate.ts @@ -6,9 +6,10 @@ export interface IssueTypeCreate { /** * The hierarchy level of the issue type. Use: * - * `-1` for Subtask. `0` for Base. + * - `-1` for Subtask. + * - `0` for Base. * - * Defaults to `0`. + * @default 0 */ hierarchyLevel?: number; } diff --git a/src/version3/models/issueTypeIssueCreateMetadata.ts b/src/version3/models/issueTypeIssueCreateMetadata.ts index ded2c866d2..a4454b06d3 100644 --- a/src/version3/models/issueTypeIssueCreateMetadata.ts +++ b/src/version3/models/issueTypeIssueCreateMetadata.ts @@ -24,5 +24,5 @@ export interface IssueTypeIssueCreateMetadata { /** Expand options that include additional issue type metadata details in the response. */ expand?: string; /** List of the fields available when creating an issue for the issue type. */ - fields?: {}; + fields?: unknown; } diff --git a/src/version3/models/issueUpdateDetails.ts b/src/version3/models/issueUpdateDetails.ts index 220ca703e6..cf06ecc47f 100644 --- a/src/version3/models/issueUpdateDetails.ts +++ b/src/version3/models/issueUpdateDetails.ts @@ -12,12 +12,13 @@ export interface IssueUpdateDetails { * provides a straightforward option when setting a sub-field. When multiple sub-fields or other operations are * required, use `update`. Fields included in here cannot be included in `update`. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any fields?: Partial & { description: string | Document }> | any; /** * A Map containing the field field name and a list of operations to perform on the issue screen field. Note that * fields included in here cannot be included in `fields`. */ - update?: {}; + update?: unknown; historyMetadata?: HistoryMetadata; /** Details of issue properties to be add or update. */ properties?: EntityProperty[]; diff --git a/src/version3/models/issueUpdateMetadata.ts b/src/version3/models/issueUpdateMetadata.ts index 4d5c147eb1..a3afda469e 100644 --- a/src/version3/models/issueUpdateMetadata.ts +++ b/src/version3/models/issueUpdateMetadata.ts @@ -1,5 +1,5 @@ /** A list of editable field details. */ export interface IssueUpdateMetadata { /** A list of editable field details. */ - fields?: {}; + fields?: unknown; } diff --git a/src/version3/models/jExpEvaluateIssuesJqlMetaData.ts b/src/version3/models/jExpEvaluateIssuesJqlMetaData.ts new file mode 100644 index 0000000000..5d7e0135c9 --- /dev/null +++ b/src/version3/models/jExpEvaluateIssuesJqlMetaData.ts @@ -0,0 +1,8 @@ +/** + * 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 + */ +export interface JExpEvaluateIssuesJqlMetaData { + /** Next Page token for the next page of issues. */ + nextPageToken: string; +} diff --git a/src/version3/models/jExpEvaluateIssuesMeta.ts b/src/version3/models/jExpEvaluateIssuesMeta.ts new file mode 100644 index 0000000000..43af91acec --- /dev/null +++ b/src/version3/models/jExpEvaluateIssuesMeta.ts @@ -0,0 +1,9 @@ +import { JExpEvaluateIssuesJqlMetaData } from './jExpEvaluateIssuesJqlMetaData'; + +/** + * Meta data describing the `issues` context variable.This bean will be replacing IssuesMetaBean bean as part of new + * `evaluate` endpoint + */ +export interface JExpEvaluateIssuesMeta { + jql?: JExpEvaluateIssuesJqlMetaData; +} diff --git a/src/version3/models/jexpEvaluateCtxIssues.ts b/src/version3/models/jexpEvaluateCtxIssues.ts new file mode 100644 index 0000000000..88f9d7dd55 --- /dev/null +++ b/src/version3/models/jexpEvaluateCtxIssues.ts @@ -0,0 +1,9 @@ +import { JexpEvaluateCtxJqlIssues } from './jexpEvaluateCtxJqlIssues'; + +/** + * The JQL specifying the issues available in the evaluated Jira expression under the `issues` context variable. This + * bean will be replacing `JexpIssues` bean as part of new `evaluate` endpoint + */ +export interface JexpEvaluateCtxIssues { + jql?: JexpEvaluateCtxJqlIssues; +} diff --git a/src/version3/models/jexpEvaluateCtxJqlIssues.ts b/src/version3/models/jexpEvaluateCtxJqlIssues.ts new file mode 100644 index 0000000000..1cb7757c58 --- /dev/null +++ b/src/version3/models/jexpEvaluateCtxJqlIssues.ts @@ -0,0 +1,19 @@ +/** + * The JQL specifying the issues available in the evaluated Jira expression under the `issues` context variable. Not all + * issues returned by the JQL query are loaded, only those described by the `nextPageToken` and `maxResults` properties. + * This bean will be replacing JexpJqlIssues bean as part of new `evaluate` endpoint + */ +export interface JexpEvaluateCtxJqlIssues { + /** + * The maximum number of issues to return from the JQL query. max results value considered may be lower than the + * number specific here. + */ + 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. + */ + nextPageToken?: string; + /** The JQL query, required to be bounded. Additionally, `orderBy` clause can contain a maximum of 7 fields */ + query?: string; +} diff --git a/src/version3/models/jiraCascadingSelectField.ts b/src/version3/models/jiraCascadingSelectField.ts new file mode 100644 index 0000000000..5d89a9b28e --- /dev/null +++ b/src/version3/models/jiraCascadingSelectField.ts @@ -0,0 +1,7 @@ +import { JiraSelectedOptionField } from './jiraSelectedOptionField'; + +export interface JiraCascadingSelectField { + childOptionValue?: JiraSelectedOptionField; + fieldId: string; + parentOptionValue: JiraSelectedOptionField; +} diff --git a/src/version3/models/jiraColorField.ts b/src/version3/models/jiraColorField.ts new file mode 100644 index 0000000000..5abe3268af --- /dev/null +++ b/src/version3/models/jiraColorField.ts @@ -0,0 +1,6 @@ +import { JiraColorInput } from './jiraColorInput'; + +export interface JiraColorField { + color: JiraColorInput; + fieldId: string; +} diff --git a/src/version3/models/jiraColorInput.ts b/src/version3/models/jiraColorInput.ts new file mode 100644 index 0000000000..270e6da66d --- /dev/null +++ b/src/version3/models/jiraColorInput.ts @@ -0,0 +1,3 @@ +export interface JiraColorInput { + name: string; +} diff --git a/src/version3/models/jiraComponentField.ts b/src/version3/models/jiraComponentField.ts new file mode 100644 index 0000000000..810b1b089b --- /dev/null +++ b/src/version3/models/jiraComponentField.ts @@ -0,0 +1,3 @@ +export interface JiraComponentField { + componentId: number; +} diff --git a/src/version3/models/jiraDateField.ts b/src/version3/models/jiraDateField.ts new file mode 100644 index 0000000000..6d8d951234 --- /dev/null +++ b/src/version3/models/jiraDateField.ts @@ -0,0 +1,6 @@ +import { JiraDateInput } from './jiraDateInput'; + +export interface JiraDateField { + date?: JiraDateInput; + fieldId: string; +} diff --git a/src/version3/models/jiraDateInput.ts b/src/version3/models/jiraDateInput.ts new file mode 100644 index 0000000000..2a742c013e --- /dev/null +++ b/src/version3/models/jiraDateInput.ts @@ -0,0 +1,3 @@ +export interface JiraDateInput { + formattedDate: string; +} diff --git a/src/version3/models/jiraDateTimeField.ts b/src/version3/models/jiraDateTimeField.ts new file mode 100644 index 0000000000..3729898902 --- /dev/null +++ b/src/version3/models/jiraDateTimeField.ts @@ -0,0 +1,6 @@ +import { JiraDateTimeInput } from './jiraDateTimeInput'; + +export interface JiraDateTimeField { + dateTime: JiraDateTimeInput; + fieldId: string; +} diff --git a/src/version3/models/jiraDateTimeInput.ts b/src/version3/models/jiraDateTimeInput.ts new file mode 100644 index 0000000000..a316c55c68 --- /dev/null +++ b/src/version3/models/jiraDateTimeInput.ts @@ -0,0 +1,3 @@ +export interface JiraDateTimeInput { + formattedDateTime: string; +} diff --git a/src/version3/models/jiraDurationField.ts b/src/version3/models/jiraDurationField.ts new file mode 100644 index 0000000000..c7d5465c3a --- /dev/null +++ b/src/version3/models/jiraDurationField.ts @@ -0,0 +1,3 @@ +export interface JiraDurationField { + originalEstimateField: string; +} diff --git a/src/version3/models/jiraExpressionComplexity.ts b/src/version3/models/jiraExpressionComplexity.ts index 04bcdd0505..b65d7b9cad 100644 --- a/src/version3/models/jiraExpressionComplexity.ts +++ b/src/version3/models/jiraExpressionComplexity.ts @@ -11,5 +11,5 @@ export interface JiraExpressionComplexity { */ expensiveOperations: string; /** Variables used in the formula, mapped to the parts of the expression they refer to. */ - variables?: {}; + variables?: unknown; } diff --git a/src/version3/models/jiraExpressionEvalUsingEnhancedSearchRequest.ts b/src/version3/models/jiraExpressionEvalUsingEnhancedSearchRequest.ts new file mode 100644 index 0000000000..f8a07cffb2 --- /dev/null +++ b/src/version3/models/jiraExpressionEvalUsingEnhancedSearchRequest.ts @@ -0,0 +1,8 @@ +import { JiraExpressionEvaluateContext } from './jiraExpressionEvaluateContext'; + +export interface JiraExpressionEvalUsingEnhancedSearchRequest { + /** The Jira expression to evaluate. */ + expression: string; + /** The context in which the Jira expression is evaluated. */ + context?: JiraExpressionEvaluateContext; +} diff --git a/src/version3/models/jiraExpressionEvaluateContext.ts b/src/version3/models/jiraExpressionEvaluateContext.ts new file mode 100644 index 0000000000..326e85d323 --- /dev/null +++ b/src/version3/models/jiraExpressionEvaluateContext.ts @@ -0,0 +1,38 @@ +import { CustomContextVariable } from './customContextVariable'; +import { IdOrKey } from './idOrKey'; +import { JexpEvaluateCtxIssues } from './jexpEvaluateCtxIssues'; + +export interface JiraExpressionEvaluateContext { + /** The ID of the board that is available under the `board` variable when evaluating the expression. */ + board?: number; + /** + * Custom context variables and their types. These variable types are available for use 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. + * - `issue`: An [issue](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#issue) + * specified by ID 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?: CustomContextVariable[]; + /** + * The ID of the customer request that is available under the `customerRequest` variable when evaluating the + * expression. This is the same as the ID of the underlying Jira issue, but the customer request context variable will + * have a different type. + */ + customerRequest?: number; + issue?: IdOrKey; + issues?: JexpEvaluateCtxIssues; + project?: IdOrKey; + /** The ID of the service desk that is available under the `serviceDesk` variable when evaluating the expression. */ + serviceDesk?: number; + /** The ID of the sprint that is available under the `sprint` variable when evaluating the expression. */ + sprint?: number; +} + +/** + * @deprecated Use {@link JiraExpressionEvaluateContext} instead. This type is retained for backward compatibility and + * will be removed in a future version. + */ +export type JiraExpressionEvaluateContextBean = JiraExpressionEvaluateContext; diff --git a/src/version3/models/jiraExpressionForAnalysis.ts b/src/version3/models/jiraExpressionForAnalysis.ts index 5595fa80b2..156f99d030 100644 --- a/src/version3/models/jiraExpressionForAnalysis.ts +++ b/src/version3/models/jiraExpressionForAnalysis.ts @@ -8,5 +8,5 @@ export interface JiraExpressionForAnalysis { * `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?: {}; + contextVariables?: unknown; } diff --git a/src/version3/models/jiraExpressionResult.ts b/src/version3/models/jiraExpressionResult.ts index 3fd9e8a227..84911f4e9b 100644 --- a/src/version3/models/jiraExpressionResult.ts +++ b/src/version3/models/jiraExpressionResult.ts @@ -8,6 +8,7 @@ export interface JiraExpressionResult { * that's the case a simple string representation is returned. These string representations should not be relied upon * and may change without notice.) */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any value: any; meta?: JiraExpressionEvaluationMetaData; } diff --git a/src/version3/models/jiraGroupInput.ts b/src/version3/models/jiraGroupInput.ts new file mode 100644 index 0000000000..382d45f4a1 --- /dev/null +++ b/src/version3/models/jiraGroupInput.ts @@ -0,0 +1,3 @@ +export interface JiraGroupInput { + groupName: string; +} diff --git a/src/version3/models/jiraIssueFields.ts b/src/version3/models/jiraIssueFields.ts new file mode 100644 index 0000000000..e0bea9e374 --- /dev/null +++ b/src/version3/models/jiraIssueFields.ts @@ -0,0 +1,155 @@ +import { JiraCascadingSelectField } from './jiraCascadingSelectField'; +import { JiraNumberField } from './jiraNumberField'; +import { JiraColorField } from './jiraColorField'; +import { JiraDateField } from './jiraDateField'; +import { JiraDateTimeField } from './jiraDateTimeField'; +import { JiraIssueTypeField } from './jiraIssueTypeField'; +import { JiraLabelsField } from './jiraLabelsField'; +import { JiraMultipleGroupPickerField } from './jiraMultipleGroupPickerField'; +import { JiraMultipleSelectUserPickerField } from './jiraMultipleSelectUserPickerField'; +import { JiraMultipleSelectField } from './jiraMultipleSelectField'; +import { JiraMultipleVersionPickerField } from './jiraMultipleVersionPickerField'; +import { JiraMultiSelectComponentField } from './jiraMultiSelectComponentField'; +import { JiraDurationField } from './jiraDurationField'; +import { JiraPriorityField } from './jiraPriorityField'; +import { JiraRichTextField } from './jiraRichTextField'; +import { JiraSingleGroupPickerField } from './jiraSingleGroupPickerField'; +import { JiraSingleLineTextField } from './jiraSingleLineTextField'; +import { JiraSingleSelectUserPickerField } from './jiraSingleSelectUserPickerField'; +import { JiraSingleSelectField } from './jiraSingleSelectField'; +import { JiraSingleVersionPickerField } from './jiraSingleVersionPickerField'; +import { JiraTimeTrackingField } from './jiraTimeTrackingField'; +import { JiraUrlField } from './jiraUrlField'; + +export interface JiraIssueFields { + /** + * Add or clear a cascading select field: + * + * - To add, specify `optionId` for both parent and child. + * - To clear the child, set its `optionId` to null. + * - To clear both, set the parent's `optionId` to null. + */ + cascadingSelectFields?: JiraCascadingSelectField[]; + /** + * Add or clear a number field: + * + * - To add, specify a numeric `value`. + * - To clear, set `value` to `null`. + */ + clearableNumberFields?: JiraNumberField[]; + /** + * Add or clear a color field: + * + * - To add, specify the color `name`. Available colors are: `purple`, `blue`, `green`, `teal`, `yellow`, `orange`, + * `grey`, `dark purple`, `dark blue`, `dark green`, `dark teal`, `dark yellow`, `dark orange`, `dark grey`. + * - To clear, set the color `name` to an empty string. + */ + colorFields?: JiraColorField[]; + /** + * Add or clear a date picker field: + * + * - To add, specify the date in `d/mmm/yy` format or ISO format `dd-mm-yyyy`. + * - To clear, set `formattedDate` to an empty string. + */ + datePickerFields?: JiraDateField[]; + /** + * Add or clear the planned start date and time: + * + * - To add, specify the date and time in ISO format for `formattedDateTime`. + * - To clear, provide an empty string for `formattedDateTime`. + */ + dateTimePickerFields?: JiraDateTimeField[]; + issueType?: JiraIssueTypeField; + /** + * Edit a labels field: + * + * - Options include `ADD`, `REPLACE`, `REMOVE`, or `REMOVE_ALL` for bulk edits. + * - To clear labels, use the `REMOVE_ALL` option with an empty `labels` array. + */ + labelsFields?: JiraLabelsField[]; + /** + * Add or clear a multi-group picker field: + * + * - To add groups, provide an array of groups with `groupName`s. + * - To clear all groups, use an empty `groups` array. + */ + multipleGroupPickerFields?: JiraMultipleGroupPickerField[]; + /** + * Assign or unassign multiple users to/from a field: + * + * - To assign, provide an array of user `accountId`s. + * - To clear, set `users` to `null`. + */ + multipleSelectClearableUserPickerFields?: JiraMultipleSelectUserPickerField[]; + /** + * Add or clear a multi-select field: + * + * - To add, provide an array of options with `optionId`s. + * - To clear, use an empty `options` array. + */ + multipleSelectFields?: JiraMultipleSelectField[]; + /** + * Edit a multi-version picker field like Fix Versions/Affects Versions: + * + * - Options include `ADD`, `REPLACE`, `REMOVE`, or `REMOVE_ALL` for bulk edits. + * - To clear the field, use the `REMOVE_ALL` option with an empty `versions` array. + */ + multipleVersionPickerFields?: JiraMultipleVersionPickerField[]; + multiselectComponents?: JiraMultiSelectComponentField; + originalEstimateField?: JiraDurationField; + priority?: JiraPriorityField; + /** + * Add or clear a rich text field: + * + * - To add, provide `adfValue`. Note that rich text fields only support ADF values. + * - To clear, use an empty `richText` object. + * + * For ADF format details, refer to: [Atlassian Document + * Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure). + */ + richTextFields?: JiraRichTextField[]; + /** + * Add or clear a single group picker field: + * + * - To add, specify the group with `groupName`. + * - To clear, set `groupName` to an empty string. + */ + singleGroupPickerFields?: JiraSingleGroupPickerField[]; + /** + * Add or clear a single line text field: + * + * - To add, provide the `text` value. + * - To clear, set `text` to an empty string. + */ + singleLineTextFields?: JiraSingleLineTextField[]; + /** + * Edit assignment for single select user picker fields like Assignee/Reporter: + * + * - To assign an issue, specify the user's `accountId`. + * - To unassign an issue, set `user` to `null`. + * - For automatic assignment, set `accountId` to `-1`. + */ + singleSelectClearableUserPickerFields?: JiraSingleSelectUserPickerField[]; + /** + * Add or clear a single select field: + * + * - To add, specify the option with an `optionId`. + * - To clear, pass an option with `optionId` as `-1`. + */ + singleSelectFields?: JiraSingleSelectField[]; + /** + * Add or clear a single version picker field: + * + * - To add, specify the version with a `versionId`. + * - To clear, set `versionId` to `-1`. + */ + singleVersionPickerFields?: JiraSingleVersionPickerField[]; + timeTrackingField?: JiraTimeTrackingField; + /** + * Add or clear a URL field: + * + * - To add, provide the `url` with the desired URL value. + * - To clear, set `url` to an empty string. + */ + urlFields?: JiraUrlField[]; +} diff --git a/src/version3/models/jiraIssueTypeField.ts b/src/version3/models/jiraIssueTypeField.ts new file mode 100644 index 0000000000..56d8fffc0a --- /dev/null +++ b/src/version3/models/jiraIssueTypeField.ts @@ -0,0 +1,3 @@ +export interface JiraIssueTypeField { + issueTypeId: string; +} diff --git a/src/version3/models/jiraLabelsField.ts b/src/version3/models/jiraLabelsField.ts new file mode 100644 index 0000000000..ea888b9a66 --- /dev/null +++ b/src/version3/models/jiraLabelsField.ts @@ -0,0 +1,7 @@ +import { JiraLabelsInput } from './jiraLabelsInput'; + +export interface JiraLabelsField { + bulkEditMultiSelectFieldOption: 'ADD' | 'REMOVE' | 'REPLACE' | 'REMOVE_ALL' | string; + fieldId: string; + labels: JiraLabelsInput[]; +} diff --git a/src/version3/models/jiraLabelsInput.ts b/src/version3/models/jiraLabelsInput.ts new file mode 100644 index 0000000000..1ce6f97508 --- /dev/null +++ b/src/version3/models/jiraLabelsInput.ts @@ -0,0 +1,3 @@ +export interface JiraLabelsInput { + name: string; +} diff --git a/src/version3/models/jiraMultiSelectComponentField.ts b/src/version3/models/jiraMultiSelectComponentField.ts new file mode 100644 index 0000000000..e672e2ee1b --- /dev/null +++ b/src/version3/models/jiraMultiSelectComponentField.ts @@ -0,0 +1,7 @@ +import { JiraComponentField } from './jiraComponentField'; + +export interface JiraMultiSelectComponentField { + bulkEditMultiSelectFieldOption: 'ADD' | 'REMOVE' | 'REPLACE' | 'REMOVE_ALL' | string; + components: JiraComponentField[]; + fieldId: string; +} diff --git a/src/version3/models/jiraMultipleGroupPickerField.ts b/src/version3/models/jiraMultipleGroupPickerField.ts new file mode 100644 index 0000000000..9641d94a21 --- /dev/null +++ b/src/version3/models/jiraMultipleGroupPickerField.ts @@ -0,0 +1,6 @@ +import { JiraGroupInput } from './jiraGroupInput'; + +export interface JiraMultipleGroupPickerField { + fieldId: string; + groups: JiraGroupInput[]; +} diff --git a/src/version3/models/jiraMultipleSelectField.ts b/src/version3/models/jiraMultipleSelectField.ts new file mode 100644 index 0000000000..d07a01f8cc --- /dev/null +++ b/src/version3/models/jiraMultipleSelectField.ts @@ -0,0 +1,6 @@ +import { JiraSelectedOptionField } from './jiraSelectedOptionField'; + +export interface JiraMultipleSelectField { + fieldId: string; + options: JiraSelectedOptionField[]; +} diff --git a/src/version3/models/jiraMultipleSelectUserPickerField.ts b/src/version3/models/jiraMultipleSelectUserPickerField.ts new file mode 100644 index 0000000000..c1763cf2d0 --- /dev/null +++ b/src/version3/models/jiraMultipleSelectUserPickerField.ts @@ -0,0 +1,6 @@ +import { JiraUserField } from './jiraUserField'; + +export interface JiraMultipleSelectUserPickerField { + fieldId: string; + users?: JiraUserField[]; +} diff --git a/src/version3/models/jiraMultipleVersionPickerField.ts b/src/version3/models/jiraMultipleVersionPickerField.ts new file mode 100644 index 0000000000..ab51ebe690 --- /dev/null +++ b/src/version3/models/jiraMultipleVersionPickerField.ts @@ -0,0 +1,7 @@ +import { JiraVersionField } from './jiraVersionField'; + +export interface JiraMultipleVersionPickerField { + bulkEditMultiSelectFieldOption: 'ADD' | 'REMOVE' | 'REPLACE' | 'REMOVE_ALL' | string; + fieldId: string; + versions: JiraVersionField[]; +} diff --git a/src/version3/models/jiraNumberField.ts b/src/version3/models/jiraNumberField.ts new file mode 100644 index 0000000000..559a6bd90d --- /dev/null +++ b/src/version3/models/jiraNumberField.ts @@ -0,0 +1,4 @@ +export interface JiraNumberField { + fieldId: string; + value?: number; +} diff --git a/src/version3/models/jiraPriorityField.ts b/src/version3/models/jiraPriorityField.ts new file mode 100644 index 0000000000..0dfff0bcf7 --- /dev/null +++ b/src/version3/models/jiraPriorityField.ts @@ -0,0 +1,3 @@ +export interface JiraPriorityField { + priorityId: string; +} diff --git a/src/version3/models/jiraRichTextField.ts b/src/version3/models/jiraRichTextField.ts new file mode 100644 index 0000000000..2e123d034b --- /dev/null +++ b/src/version3/models/jiraRichTextField.ts @@ -0,0 +1,6 @@ +import { JiraRichTextInput } from './jiraRichTextInput'; + +export interface JiraRichTextField { + fieldId: string; + richText: JiraRichTextInput; +} diff --git a/src/version3/models/jiraRichTextInput.ts b/src/version3/models/jiraRichTextInput.ts new file mode 100644 index 0000000000..127db5291a --- /dev/null +++ b/src/version3/models/jiraRichTextInput.ts @@ -0,0 +1,3 @@ +export interface JiraRichTextInput { + adfValue?: unknown; +} diff --git a/src/version3/models/jiraSelectedOptionField.ts b/src/version3/models/jiraSelectedOptionField.ts new file mode 100644 index 0000000000..85a2b5c683 --- /dev/null +++ b/src/version3/models/jiraSelectedOptionField.ts @@ -0,0 +1,3 @@ +export interface JiraSelectedOptionField { + optionId?: number; +} diff --git a/src/version3/models/jiraSingleGroupPickerField.ts b/src/version3/models/jiraSingleGroupPickerField.ts new file mode 100644 index 0000000000..ff0de34d0b --- /dev/null +++ b/src/version3/models/jiraSingleGroupPickerField.ts @@ -0,0 +1,6 @@ +import { JiraGroupInput } from './jiraGroupInput'; + +export interface JiraSingleGroupPickerField { + fieldId: string; + group: JiraGroupInput; +} diff --git a/src/version3/models/jiraSingleLineTextField.ts b/src/version3/models/jiraSingleLineTextField.ts new file mode 100644 index 0000000000..c912cc14fd --- /dev/null +++ b/src/version3/models/jiraSingleLineTextField.ts @@ -0,0 +1,4 @@ +export interface JiraSingleLineTextField { + fieldId: string; + text: string; +} diff --git a/src/version3/models/jiraSingleSelectField.ts b/src/version3/models/jiraSingleSelectField.ts new file mode 100644 index 0000000000..028e21dab2 --- /dev/null +++ b/src/version3/models/jiraSingleSelectField.ts @@ -0,0 +1,12 @@ +import { JiraSelectedOptionField } from './jiraSelectedOptionField'; + +/** + * Add or clear a single select field:* + * + * - To add, specify the option with an `optionId`. + * - To clear, pass an option with `optionId` as `-1`. + */ +export interface JiraSingleSelectField { + fieldId: string; + option: JiraSelectedOptionField; +} diff --git a/src/version3/models/jiraSingleSelectUserPickerField.ts b/src/version3/models/jiraSingleSelectUserPickerField.ts new file mode 100644 index 0000000000..f8c6419c87 --- /dev/null +++ b/src/version3/models/jiraSingleSelectUserPickerField.ts @@ -0,0 +1,6 @@ +import { JiraUserField } from './jiraUserField'; + +export interface JiraSingleSelectUserPickerField { + fieldId: string; + user?: JiraUserField; +} diff --git a/src/version3/models/jiraSingleVersionPickerField.ts b/src/version3/models/jiraSingleVersionPickerField.ts new file mode 100644 index 0000000000..80a0d9a015 --- /dev/null +++ b/src/version3/models/jiraSingleVersionPickerField.ts @@ -0,0 +1,6 @@ +import { JiraVersionField } from './jiraVersionField'; + +export interface JiraSingleVersionPickerField { + fieldId: string; + version: JiraVersionField; +} diff --git a/src/version3/models/jiraStatus.ts b/src/version3/models/jiraStatus.ts index 2780805b6d..2e413b7428 100644 --- a/src/version3/models/jiraStatus.ts +++ b/src/version3/models/jiraStatus.ts @@ -3,15 +3,20 @@ import { StatusScope } from './statusScope'; /** Details of a status. */ export interface JiraStatus { + /** The description of the status. */ + description?: string; /** The ID of the status. */ id?: string; /** The name of the status. */ name?: string; - /** The category of the status. */ - statusCategory?: string; scope?: StatusScope; - /** The description of the status. */ - description?: string; - /** Projects and issue types where the status is used. Only available if the `usages` expand is requested. */ + /** The category of the status. */ + statusCategory?: 'TODO' | 'IN_PROGRESS' | 'DONE' | string; + /** + * @deprecated See the [deprecation + * notice](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-2298) for details. + * + * Projects and issue types where the status is used. Only available if the `usages` expand is requested. + */ usages?: ProjectIssueTypes[]; } diff --git a/src/version3/models/jiraTimeTrackingField.ts b/src/version3/models/jiraTimeTrackingField.ts new file mode 100644 index 0000000000..1f4a466203 --- /dev/null +++ b/src/version3/models/jiraTimeTrackingField.ts @@ -0,0 +1,3 @@ +export interface JiraTimeTrackingField { + timeRemaining: string; +} diff --git a/src/version3/models/jiraUrlField.ts b/src/version3/models/jiraUrlField.ts new file mode 100644 index 0000000000..0e0b743301 --- /dev/null +++ b/src/version3/models/jiraUrlField.ts @@ -0,0 +1,4 @@ +export interface JiraUrlField { + fieldId: string; + url: string; +} diff --git a/src/version3/models/jiraUserField.ts b/src/version3/models/jiraUserField.ts new file mode 100644 index 0000000000..570fa7d2a5 --- /dev/null +++ b/src/version3/models/jiraUserField.ts @@ -0,0 +1,3 @@ +export interface JiraUserField { + accountId: string; +} diff --git a/src/version3/models/jiraVersionField.ts b/src/version3/models/jiraVersionField.ts new file mode 100644 index 0000000000..43e1c54d9f --- /dev/null +++ b/src/version3/models/jiraVersionField.ts @@ -0,0 +1,3 @@ +export interface JiraVersionField { + versionId?: string; +} diff --git a/src/version3/models/jiraWorkflow.ts b/src/version3/models/jiraWorkflow.ts new file mode 100644 index 0000000000..2b53d045f1 --- /dev/null +++ b/src/version3/models/jiraWorkflow.ts @@ -0,0 +1,42 @@ +import { WorkflowScope } from './workflowScope'; +import { WorkflowLayout } from './workflowLayout'; +import { WorkflowReferenceStatus } from './workflowReferenceStatus'; +import { WorkflowTransitions } from './workflowTransitions'; +import { ProjectIssueTypes } from './projectIssueTypes'; +import { DocumentVersion } from './documentVersion'; + +/** Details of a workflow. */ +export interface JiraWorkflow { + /** The creation date of the workflow. */ + created?: string; + /** The description of the workflow. */ + description?: string; + /** The ID of the workflow. */ + id?: string; + /** Indicates if the workflow can be edited. */ + isEditable?: boolean; + /** The name of the workflow. */ + name?: string; + scope?: WorkflowScope; + startPointLayout?: WorkflowLayout; + /** The statuses referenced in this workflow. */ + statuses?: WorkflowReferenceStatus[]; + /** If there is a current [asynchronous task](#async-operations) operation for this workflow. */ + taskId?: string; + /** + * The transitions of the workflow. Note that a transition can have either the deprecated `to`/`from` fields or the + * `toStatusReference`/`links` fields, but never both nor a combination. + */ + transitions?: WorkflowTransitions[]; + /** The last edited date of the workflow. */ + updated?: string; + /** + * @deprecated See the [deprecation + * notice](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-2298) for details. + * + * Use the optional `workflows.usages` expand to get additional information about the projects and issue types + * associated with the requested workflows. + */ + usages?: ProjectIssueTypes[]; + version?: DocumentVersion; +} diff --git a/src/version3/models/jiraWorkflowStatus.ts b/src/version3/models/jiraWorkflowStatus.ts new file mode 100644 index 0000000000..8cb55335cd --- /dev/null +++ b/src/version3/models/jiraWorkflowStatus.ts @@ -0,0 +1,16 @@ +import { WorkflowScope } from './workflowScope'; + +/** Details of a status. */ +export interface JiraWorkflowStatus { + /** The description of the status. */ + description?: string; + /** The ID of the status. */ + id?: string; + /** The name of the status. */ + name?: string; + scope?: WorkflowScope; + /** The category of the status. */ + statusCategory?: 'TODO' | 'IN_PROGRESS' | 'DONE' | string; + /** The reference of the status. */ + statusReference?: string; +} diff --git a/src/version3/models/jqlCount.ts b/src/version3/models/jqlCount.ts new file mode 100644 index 0000000000..a3270ef92a --- /dev/null +++ b/src/version3/models/jqlCount.ts @@ -0,0 +1,4 @@ +export interface JQLCount { + /** Number of issues matching JQL query. */ + count?: number; +} diff --git a/src/version3/models/jqlCountRequest.ts b/src/version3/models/jqlCountRequest.ts new file mode 100644 index 0000000000..9bc8f144a3 --- /dev/null +++ b/src/version3/models/jqlCountRequest.ts @@ -0,0 +1,7 @@ +export interface JQLCountRequest { + /** + * A [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. + */ + jql: string; +} diff --git a/src/version3/models/jqlFunctionPrecomputation.ts b/src/version3/models/jqlFunctionPrecomputation.ts index 7aa38ea2c4..949ea68447 100644 --- a/src/version3/models/jqlFunctionPrecomputation.ts +++ b/src/version3/models/jqlFunctionPrecomputation.ts @@ -1,13 +1,25 @@ /** Jql function precomputation. */ export interface JqlFunctionPrecomputation { + /** The list of arguments function was invoked with. */ arguments?: string[]; + /** The timestamp of the precomputation creation. */ created?: string; + /** The error message to be displayed to the user. */ + error?: string; + /** The field the function was executed against. */ field?: string; + /** The function key. */ functionKey?: string; + /** The name of the function. */ functionName?: string; + /** The id of the precomputation. */ id?: string; + /** The operator in context of which function was executed. */ operator?: string; + /** The timestamp of the precomputation last update. */ updated?: string; + /** The timestamp of the precomputation last usage. */ used?: string; + /** The JQL fragment stored as the precomputation. */ value?: string; } diff --git a/src/version3/models/jqlFunctionPrecomputationGetByIdRequest.ts b/src/version3/models/jqlFunctionPrecomputationGetByIdRequest.ts new file mode 100644 index 0000000000..f9afb489d9 --- /dev/null +++ b/src/version3/models/jqlFunctionPrecomputationGetByIdRequest.ts @@ -0,0 +1,4 @@ +/** Request to fetch precomputations by ID. */ +export interface JqlFunctionPrecomputationGetByIdRequest { + precomputationIDs?: string[]; +} diff --git a/src/version3/models/jqlFunctionPrecomputationGetByIdResponse.ts b/src/version3/models/jqlFunctionPrecomputationGetByIdResponse.ts new file mode 100644 index 0000000000..391c1f8663 --- /dev/null +++ b/src/version3/models/jqlFunctionPrecomputationGetByIdResponse.ts @@ -0,0 +1,9 @@ +import { JqlFunctionPrecomputation } from './jqlFunctionPrecomputation'; + +/** Get precomputations by ID response. */ +export interface JqlFunctionPrecomputationGetByIdResponse { + /** List of precomputations that were not found. */ + notFoundPrecomputationIDs?: string[]; + /** The list of precomputations. */ + precomputations?: JqlFunctionPrecomputation[]; +} diff --git a/src/version3/models/jsonNode.ts b/src/version3/models/jsonNode.ts new file mode 100644 index 0000000000..b5a835d326 --- /dev/null +++ b/src/version3/models/jsonNode.ts @@ -0,0 +1,38 @@ +export interface JsonNode { + array?: boolean; + bigDecimal?: boolean; + bigInteger?: boolean; + bigIntegerValue?: number; + binary?: boolean; + binaryValue?: string[]; + boolean?: boolean; + booleanValue?: boolean; + containerNode?: boolean; + decimalValue?: number; + double?: boolean; + doubleValue?: number; + elements?: unknown; + fieldNames?: unknown; + fields?: unknown; + floatingPointNumber?: boolean; + int?: boolean; + intValue?: number; + integralNumber?: boolean; + long?: boolean; + longValue?: number; + missingNode?: boolean; + null?: boolean; + number?: boolean; + numberType?: 'INT' | 'LONG' | 'BIG_INTEGER' | 'FLOAT' | 'DOUBLE' | 'BIG_DECIMAL' | string; + numberValue?: number; + object?: boolean; + pojo?: boolean; + textValue?: string; + textual?: boolean; + valueAsBoolean?: boolean; + valueAsDouble?: number; + valueAsInt?: number; + valueAsLong?: number; + valueAsText?: string; + valueNode?: boolean; +} diff --git a/src/version3/models/jsonType.ts b/src/version3/models/jsonType.ts index 2b50ec5e12..53b80738db 100644 --- a/src/version3/models/jsonType.ts +++ b/src/version3/models/jsonType.ts @@ -11,5 +11,5 @@ export interface JsonType { /** If the field is a custom field, the custom ID of the field. */ customId?: number; /** If the field is a custom field, the configuration of the field. */ - configuration?: {}; + configuration?: unknown; } diff --git a/src/version3/models/mappingsByIssueTypeOverride.ts b/src/version3/models/mappingsByIssueTypeOverride.ts new file mode 100644 index 0000000000..570d8dfde5 --- /dev/null +++ b/src/version3/models/mappingsByIssueTypeOverride.ts @@ -0,0 +1,13 @@ +import { WorkflowAssociationStatusMapping } from './workflowAssociationStatusMapping'; + +/** + * Overrides, for the selected issue types, any status mappings provided in `statusMappingsByWorkflows`. Status mappings + * are required when the new workflow for an issue type doesn't contain all statuses that the old workflow has. Status + * mappings can be provided by a combination of `statusMappingsByWorkflows` and `statusMappingsByIssueTypeOverride`. + */ +export interface MappingsByIssueTypeOverride { + /** The ID of the issue type for this mapping. */ + issueTypeId: string; + /** The list of status mappings. */ + statusMappings: WorkflowAssociationStatusMapping[]; +} diff --git a/src/version3/models/mappingsByWorkflow.ts b/src/version3/models/mappingsByWorkflow.ts new file mode 100644 index 0000000000..484dcec961 --- /dev/null +++ b/src/version3/models/mappingsByWorkflow.ts @@ -0,0 +1,15 @@ +import { WorkflowAssociationStatusMapping } from './workflowAssociationStatusMapping'; + +/** + * The status mappings by workflows. Status mappings are required when the new workflow for an issue type doesn't + * contain all statuses that the old workflow has. Status mappings can be provided by a combination of + * `statusMappingsByWorkflows` and `statusMappingsByIssueTypeOverride`. + */ +export interface MappingsByWorkflow { + /** The ID of the new workflow. */ + newWorkflowId: string; + /** The ID of the old workflow. */ + oldWorkflowId: string; + /** The list of status mappings. */ + statusMappings: WorkflowAssociationStatusMapping[]; +} diff --git a/src/version3/models/mark.ts b/src/version3/models/mark.ts index 0d645eebe8..b72d37259c 100644 --- a/src/version3/models/mark.ts +++ b/src/version3/models/mark.ts @@ -1,4 +1,5 @@ export interface Mark { type: 'code' | 'em' | 'link' | 'strike' | 'strong' | 'subsup' | 'textColor' | 'underline' | string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any attrs?: any; } diff --git a/src/version3/models/multipleCustomFieldValuesUpdate.ts b/src/version3/models/multipleCustomFieldValuesUpdate.ts index ec02922d14..9aed54825e 100644 --- a/src/version3/models/multipleCustomFieldValuesUpdate.ts +++ b/src/version3/models/multipleCustomFieldValuesUpdate.ts @@ -18,5 +18,5 @@ export interface MultipleCustomFieldValuesUpdate { * A 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: {}; + value: unknown; } diff --git a/src/version3/models/pageBulkContextualConfiguration.ts b/src/version3/models/pageBulkContextualConfiguration.ts new file mode 100644 index 0000000000..3c931a1436 --- /dev/null +++ b/src/version3/models/pageBulkContextualConfiguration.ts @@ -0,0 +1,19 @@ +import { BulkContextualConfiguration } from './bulkContextualConfiguration'; + +/** A page of items. */ +export interface PageBulkContextualConfiguration { + /** Whether this is the last page. */ + isLast?: boolean; + /** The maximum number of items that could be returned. */ + maxResults?: number; + /** If there is another page of results, the URL of the next page. */ + nextPage?: string; + /** The URL of the page. */ + self?: string; + /** The index of the first item returned. */ + startAt?: number; + /** The number of items returned. */ + total?: number; + /** The list of items. */ + values?: BulkContextualConfiguration[]; +} diff --git a/src/version3/models/pageOfCreateMetaIssueTypeWithField.ts b/src/version3/models/pageOfCreateMetaIssueTypeWithField.ts new file mode 100644 index 0000000000..3e5ce43d55 --- /dev/null +++ b/src/version3/models/pageOfCreateMetaIssueTypeWithField.ts @@ -0,0 +1,14 @@ +import { FieldCreateMetadata } from './fieldCreateMetadata'; + +/** A page of CreateMetaIssueType with Field. */ +export interface PageOfCreateMetaIssueTypeWithField { + /** The collection of FieldCreateMetaBeans. */ + fields?: FieldCreateMetadata[]; + /** The maximum number of items to return per page. */ + maxResults?: number; + results?: FieldCreateMetadata[]; + /** The index of the first item returned. */ + startAt?: number; + /** The total number of items in all pages. */ + total?: number; +} diff --git a/src/version3/models/pageOfCreateMetaIssueTypes.ts b/src/version3/models/pageOfCreateMetaIssueTypes.ts new file mode 100644 index 0000000000..42b514a7ed --- /dev/null +++ b/src/version3/models/pageOfCreateMetaIssueTypes.ts @@ -0,0 +1,14 @@ +import { IssueTypeIssueCreateMetadata } from './issueTypeIssueCreateMetadata'; + +/** A page of CreateMetaIssueTypes. */ +export interface PageOfCreateMetaIssueTypes { + createMetaIssueType?: IssueTypeIssueCreateMetadata[]; + /** The list of CreateMetaIssueType. */ + issueTypes?: IssueTypeIssueCreateMetadata[]; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** The index of the first item returned. */ + startAt?: number; + /** The total number of items in all pages. */ + total?: number; +} diff --git a/src/version3/models/pageWithCursorGetPlanResponseForPage.ts b/src/version3/models/pageWithCursorGetPlanResponseForPage.ts new file mode 100644 index 0000000000..7b6c103ded --- /dev/null +++ b/src/version3/models/pageWithCursorGetPlanResponseForPage.ts @@ -0,0 +1,10 @@ +import { GetPlanResponseForPage } from './getPlanResponseForPage'; + +export interface PageWithCursorGetPlanResponseForPage { + cursor?: string; + last?: boolean; + nextPageCursor?: string; + size?: number; + total?: number; + values?: GetPlanResponseForPage[]; +} diff --git a/src/version3/models/pageWithCursorGetTeamResponseForPage.ts b/src/version3/models/pageWithCursorGetTeamResponseForPage.ts new file mode 100644 index 0000000000..015c2316bd --- /dev/null +++ b/src/version3/models/pageWithCursorGetTeamResponseForPage.ts @@ -0,0 +1,10 @@ +import { GetTeamResponseForPage } from './getTeamResponseForPage'; + +export interface PageWithCursorGetTeamResponseForPage { + cursor?: string; + last?: boolean; + nextPageCursor?: string; + size?: number; + total?: number; + values?: GetTeamResponseForPage[]; +} diff --git a/src/version3/models/permissions.ts b/src/version3/models/permissions.ts index fa2d4fbec3..e68ab30abc 100644 --- a/src/version3/models/permissions.ts +++ b/src/version3/models/permissions.ts @@ -1,5 +1,5 @@ /** Details about permissions. */ export interface Permissions { /** List of permissions. */ - permissions?: {}; + permissions?: unknown; } diff --git a/src/version3/models/plan.ts b/src/version3/models/plan.ts new file mode 100644 index 0000000000..2b42c63d0c --- /dev/null +++ b/src/version3/models/plan.ts @@ -0,0 +1,29 @@ +import { GetCrossProjectReleaseResponse } from './getCrossProjectReleaseResponse'; +import { GetCustomFieldResponse } from './getCustomFieldResponse'; +import { GetExclusionRulesResponse } from './getExclusionRulesResponse'; +import { GetIssueSourceResponse } from './getIssueSourceResponse'; +import { GetPermissionResponse } from './getPermissionResponse'; +import { GetSchedulingResponse } from './getSchedulingResponse'; + +export interface Plan { + /** The cross-project releases included in the plan. */ + crossProjectReleases?: GetCrossProjectReleaseResponse[]; + /** The custom fields for the plan. */ + customFields?: GetCustomFieldResponse[]; + exclusionRules?: GetExclusionRulesResponse; + /** The plan ID. */ + id: number; + /** The issue sources included in the plan. */ + issueSources?: GetIssueSourceResponse[]; + /** The date when the plan was last saved in UTC. */ + lastSaved?: string; + /** The account ID of the plan lead. */ + leadAccountId?: string; + /** The plan name. */ + name?: string; + /** The permissions for the plan. */ + permissions?: GetPermissionResponse[]; + scheduling?: GetSchedulingResponse; + /** The plan status. This is "Active", "Trashed" or "Archived". */ + status: 'Active' | 'Trashed' | 'Archived' | string; +} diff --git a/src/version3/models/priorityMapping.ts b/src/version3/models/priorityMapping.ts new file mode 100644 index 0000000000..b0d23f2b3b --- /dev/null +++ b/src/version3/models/priorityMapping.ts @@ -0,0 +1,20 @@ +/** Mapping of issue priorities for changes in priority schemes. */ +export interface PriorityMapping { + /** + * The mapping of priorities for issues being migrated **into** this priority scheme. Key is the old priority ID, + * value is the new priority ID (must exist in this priority scheme). + * + * E.g. The current priority scheme has priority ID `10001`. Issues with priority ID `10000` are being migrated into + * this priority scheme will need mapping to new priorities. The `in` mapping would be `{"10000": 10001}`. + */ + in?: unknown; + /** + * The mapping of priorities for issues being migrated **out of** this priority scheme. Key is the old priority ID + * (must exist in this priority scheme), value is the new priority ID (must exist in the default priority scheme). + * Required for updating an existing priority scheme. Not used when creating a new priority scheme. + * + * E.g. The current priority scheme has priority ID `10001`. Issues with priority ID `10001` are being migrated out of + * this priority scheme will need mapping to new priorities. The `out` mapping would be `{"10001": 10000}`. + */ + out?: unknown; +} diff --git a/src/version3/models/prioritySchemeChangesWithoutMappings.ts b/src/version3/models/prioritySchemeChangesWithoutMappings.ts new file mode 100644 index 0000000000..51c1ea7e02 --- /dev/null +++ b/src/version3/models/prioritySchemeChangesWithoutMappings.ts @@ -0,0 +1,4 @@ +export interface PrioritySchemeChangesWithoutMappings { + /** Affected entity ids. */ + ids: number[]; +} diff --git a/src/version3/models/prioritySchemeId.ts b/src/version3/models/prioritySchemeId.ts new file mode 100644 index 0000000000..7e349f2e21 --- /dev/null +++ b/src/version3/models/prioritySchemeId.ts @@ -0,0 +1,8 @@ +import { TaskProgressNode } from './taskProgressNode'; + +/** The ID of a priority scheme. */ +export interface PrioritySchemeId { + /** The ID of the priority scheme. */ + id?: string; + task?: TaskProgressNode; +} diff --git a/src/version3/models/prioritySchemeWithPaginatedPrioritiesAndProjects.ts b/src/version3/models/prioritySchemeWithPaginatedPrioritiesAndProjects.ts new file mode 100644 index 0000000000..9dc5ed1bc5 --- /dev/null +++ b/src/version3/models/prioritySchemeWithPaginatedPrioritiesAndProjects.ts @@ -0,0 +1,21 @@ +import { Paginated } from '../../paginated'; +import { ProjectDetails } from './projectDetails'; +import { PriorityWithSequence } from './priorityWithSequence'; + +/** A priority scheme with paginated priorities and projects. */ +export interface PrioritySchemeWithPaginatedPrioritiesAndProjects { + default?: boolean; + /** The ID of the default issue priority. */ + defaultPriorityId?: string; + /** The description of the priority scheme */ + description?: string; + /** The ID of the priority scheme. */ + id: string; + isDefault?: boolean; + /** The name of the priority scheme */ + name: string; + priorities?: Paginated; + projects?: Paginated; + /** The URL of the priority scheme. */ + self?: string; +} diff --git a/src/version3/models/priorityWithSequence.ts b/src/version3/models/priorityWithSequence.ts new file mode 100644 index 0000000000..8012f612ad --- /dev/null +++ b/src/version3/models/priorityWithSequence.ts @@ -0,0 +1,19 @@ +/** An issue priority with sequence information. */ +export interface PriorityWithSequence { + /** The description of the issue priority. */ + description?: string; + /** The URL of the icon for the issue priority. */ + iconUrl?: string; + /** The ID of the issue priority. */ + id?: string; + /** Whether this priority is the default. */ + isDefault?: boolean; + /** The name of the issue priority. */ + name?: string; + /** The URL of the issue priority. */ + self?: string; + /** The sequence of the issue priority. */ + sequence?: string; + /** The color used to indicate the issue priority. */ + statusColor?: string; +} diff --git a/src/version3/models/project.ts b/src/version3/models/project.ts index c851daa5b0..acbbf0b4ae 100644 --- a/src/version3/models/project.ts +++ b/src/version3/models/project.ts @@ -48,7 +48,7 @@ export interface Project { * 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?: {}; + roles?: unknown; avatarUrls?: AvatarUrls; projectCategory?: ProjectCategory; /** @@ -68,7 +68,7 @@ export interface Project { issueTypeHierarchy?: Hierarchy; permissions?: ProjectPermissions; /** Map of project properties */ - properties?: {}; + properties?: unknown; /** Unique ID for next-gen projects. */ uuid?: string; insight?: ProjectInsight; diff --git a/src/version3/models/projectAndIssueTypePair.ts b/src/version3/models/projectAndIssueTypePair.ts new file mode 100644 index 0000000000..96adac43fc --- /dev/null +++ b/src/version3/models/projectAndIssueTypePair.ts @@ -0,0 +1,7 @@ +/** A project and issueType ID pair that identifies a status mapping. */ +export interface ProjectAndIssueTypePair { + /** The ID of the issue type. */ + issueTypeId: string; + /** The ID of the project. */ + projectId: string; +} diff --git a/src/version3/models/projectComponent.ts b/src/version3/models/projectComponent.ts index 6703ca07d0..a21ca19478 100644 --- a/src/version3/models/projectComponent.ts +++ b/src/version3/models/projectComponent.ts @@ -2,22 +2,26 @@ import { User } from './user'; /** Details about a project component. */ export interface ProjectComponent { + /** Compass component's ID. Can't be updated. Not required for creating a Project Component. */ + ari?: string; assignee?: User; /** * The nominal user type used to determine the assignee for issues created with this component. See `realAssigneeType` * for details on how the type of the user, and hence the user, assigned to issues is determined. Can take the * following values: * - * `PROJECT_LEAD` the assignee to any issues created with this component is nominally the lead for the project the - * component is in. `COMPONENT_LEAD` the assignee to any issues created with this component is nominally the lead for - * the component. `UNASSIGNED` an assignee is not set for issues created with this component. `PROJECT_DEFAULT` the - * assignee to any issues created with this component is nominally the default assignee for the project that the - * component is in. + * - `PROJECT_LEAD` the assignee to any issues created with this component is nominally the lead for the project the + * component is in. + * - `COMPONENT_LEAD` the assignee to any issues created with this component is nominally the lead for the component. + * - `UNASSIGNED` an assignee is not set for issues created with this component. + * - `PROJECT_DEFAULT` the assignee to any issues created with this component is nominally the default assignee for the + * project that the component is in. * - * Default value: `PROJECT_DEFAULT`. - * Optional when creating or updating a component. + * Default value: `PROJECT_DEFAULT`. Optional when creating or updating a component. + * + * @default PROJECT_DEFAULT */ - assigneeType?: string; + assigneeType?: 'PROJECT_DEFAULT' | 'COMPONENT_LEAD' | 'PROJECT_LEAD' | 'UNASSIGNED' | string; /** The description for the component. Optional when creating or updating a component. */ description?: string; /** The unique identifier for the component. */ @@ -34,11 +38,15 @@ export interface ProjectComponent { */ leadAccountId?: string; /** - * This property is no longer available and will be removed from the documentation soon. See the [deprecation - * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) - * for details. + * @deprecated + * + * This property is no longer available and will be removed from the documentation soon. See the [deprecation + * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) + * for details. */ leadUserName?: string; + /** Compass component's metadata. Can't be updated. Not required for creating a Project Component. */ + metadata?: unknown; /** * The unique name for the component in the project. Required when creating a component. Optional when updating a * component. The maximum length is 255 characters. @@ -54,13 +62,14 @@ export interface ProjectComponent { * from the `assigneeType`. For example, `assigneeType` is set to `COMPONENT_LEAD` but no component lead is set. This * property is set to one of the following values: * - * `PROJECT_LEAD` when `assigneeType` is `PROJECT_LEAD` and the project lead has permission to be assigned issues in - * the project that the component is in. `COMPONENT_LEAD` when `assignee`Type is `COMPONENT_LEAD` and the component - * lead has permission to be assigned issues in the project that the component is in. `UNASSIGNED` when `assigneeType` - * is `UNASSIGNED` and Jira is configured to allow unassigned issues. `PROJECT_DEFAULT` when none of the preceding - * cases are true. + * - `PROJECT_LEAD` when `assigneeType` is `PROJECT_LEAD` and the project lead has permission to be assigned issues in + * the project that the component is in. + * - `COMPONENT_LEAD` when `assignee`Type is `COMPONENT_LEAD` and the component lead has permission to be assigned + * issues in the project that the component is in. + * - `UNASSIGNED` when `assigneeType` is `UNASSIGNED` and Jira is configured to allow unassigned issues. + * - `PROJECT_DEFAULT` when none of the preceding cases are true. */ - realAssigneeType?: string; + realAssigneeType?: 'PROJECT_DEFAULT' | 'COMPONENT_LEAD' | 'PROJECT_LEAD' | 'UNASSIGNED' | string; /** The URL of the component. */ self?: string; } diff --git a/src/version3/models/projectDataPolicies.ts b/src/version3/models/projectDataPolicies.ts new file mode 100644 index 0000000000..b36a920596 --- /dev/null +++ b/src/version3/models/projectDataPolicies.ts @@ -0,0 +1,7 @@ +import type { ProjectWithDataPolicy } from './projectWithDataPolicy'; + +/** Details about data policies for a list of projects. */ +export interface ProjectDataPolicies { + /** List of projects with data policies. */ + projectDataPolicies: ProjectWithDataPolicy[]; +} diff --git a/src/version3/models/projectDataPolicy.ts b/src/version3/models/projectDataPolicy.ts new file mode 100644 index 0000000000..84c4039d15 --- /dev/null +++ b/src/version3/models/projectDataPolicy.ts @@ -0,0 +1,5 @@ +/** Details about data policy. */ +export interface ProjectDataPolicy { + /** Whether the project contains any content inaccessible to the requesting application. */ + anyContentBlocked: boolean; +} diff --git a/src/version3/models/projectIssueTypes.ts b/src/version3/models/projectIssueTypes.ts index a712f1e06e..851ff795a5 100644 --- a/src/version3/models/projectIssueTypes.ts +++ b/src/version3/models/projectIssueTypes.ts @@ -1,6 +1,12 @@ import { ProjectId } from './projectId'; -/** Projects and issue types where the status is used. Only available if the `usages` expand is requested. */ +/** + * @deprecated See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-2298) + * for details.* + * + * Use the optional `workflows.usages` expand to get additional information about the projects and issue types + * associated with the requested workflows. + */ export interface ProjectIssueTypes { project?: ProjectId; /** IDs of the issue types */ diff --git a/src/version3/models/projectLandingPageInfo.ts b/src/version3/models/projectLandingPageInfo.ts index 5e4954cb88..6a373b4b79 100644 --- a/src/version3/models/projectLandingPageInfo.ts +++ b/src/version3/models/projectLandingPageInfo.ts @@ -9,5 +9,5 @@ export interface ProjectLandingPageInfo { queueCategory?: string; boardId?: number; simplified?: boolean; - attributes?: {}; + attributes?: unknown; } diff --git a/src/version3/models/projectRoleActorsUpdate.ts b/src/version3/models/projectRoleActorsUpdate.ts index 687796ad50..d297009d79 100644 --- a/src/version3/models/projectRoleActorsUpdate.ts +++ b/src/version3/models/projectRoleActorsUpdate.ts @@ -17,5 +17,5 @@ export interface ProjectRoleActorsUpdate { * Add 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?: {}; + categorisedActors?: unknown; } diff --git a/src/version3/models/projectUsage.ts b/src/version3/models/projectUsage.ts new file mode 100644 index 0000000000..2cc468d44c --- /dev/null +++ b/src/version3/models/projectUsage.ts @@ -0,0 +1,5 @@ +/** The project. */ +export interface ProjectUsage { + /** The project ID. */ + id?: string; +} diff --git a/src/version3/models/projectUsagePage.ts b/src/version3/models/projectUsagePage.ts new file mode 100644 index 0000000000..f018c8e7b1 --- /dev/null +++ b/src/version3/models/projectUsagePage.ts @@ -0,0 +1,9 @@ +import { ProjectUsage } from './projectUsage'; + +/** A page of projects. */ +export interface ProjectUsagePage { + /** Page token for the next page of project usages. */ + nextPageToken?: string; + /** The list of projects. */ + values?: ProjectUsage[]; +} diff --git a/src/version3/models/projectWithDataPolicy.ts b/src/version3/models/projectWithDataPolicy.ts new file mode 100644 index 0000000000..cd24fa197a --- /dev/null +++ b/src/version3/models/projectWithDataPolicy.ts @@ -0,0 +1,8 @@ +import { ProjectDataPolicy } from './projectDataPolicy'; + +/** Details about data policies for a project. */ +export interface ProjectWithDataPolicy { + dataPolicy: ProjectDataPolicy; + /** The project ID. */ + id: number; +} diff --git a/src/version3/models/requiredMappingByIssueType.ts b/src/version3/models/requiredMappingByIssueType.ts new file mode 100644 index 0000000000..3d85f836c5 --- /dev/null +++ b/src/version3/models/requiredMappingByIssueType.ts @@ -0,0 +1,7 @@ +/** The list of required status mappings by issue type. */ +export interface RequiredMappingByIssueType { + /** The ID of the issue type. */ + issueTypeId?: string; + /** The status IDs requiring mapping. */ + statusIds?: string[]; +} diff --git a/src/version3/models/requiredMappingByWorkflows.ts b/src/version3/models/requiredMappingByWorkflows.ts new file mode 100644 index 0000000000..b30e14666e --- /dev/null +++ b/src/version3/models/requiredMappingByWorkflows.ts @@ -0,0 +1,9 @@ +/** The list of required status mappings by workflow. */ +export interface RequiredMappingByWorkflows { + /** The ID of the source workflow. */ + sourceWorkflowId?: string; + /** The status IDs requiring mapping. */ + statusIds?: string[]; + /** The ID of the target workflow. */ + targetWorkflowId?: string; +} diff --git a/src/version3/models/searchAndReconcileResults.ts b/src/version3/models/searchAndReconcileResults.ts new file mode 100644 index 0000000000..dcf981096c --- /dev/null +++ b/src/version3/models/searchAndReconcileResults.ts @@ -0,0 +1,16 @@ +import { Issue } from './issue'; + +/** The result of a JQL search with issues reconsilation. */ +export interface SearchAndReconcileResults { + /** The list of issues found by the search or reconsiliation. */ + issues?: Issue[]; + /** The ID and name of each field in the search results. */ + names?: unknown; + /** + * 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. */ + schema?: unknown; +} diff --git a/src/version3/models/searchRequest.ts b/src/version3/models/searchRequest.ts index fd3fcf0e6f..8c06eecc66 100644 --- a/src/version3/models/searchRequest.ts +++ b/src/version3/models/searchRequest.ts @@ -70,7 +70,7 @@ export interface SearchRequest { | 'editmeta' | 'changelog' | 'versionedRepresentations' - )[] + )[] | string | string[]; /** A list of up to 5 issue properties to include in the results. This parameter accepts a comma-separated list. */ diff --git a/src/version3/models/searchResults.ts b/src/version3/models/searchResults.ts index 49911301ed..f4fa161bf2 100644 --- a/src/version3/models/searchResults.ts +++ b/src/version3/models/searchResults.ts @@ -15,7 +15,7 @@ export interface SearchResults { /** Any warnings related to the JQL query. */ warningMessages?: string[]; /** The ID and name of each field in the search results. */ - names?: {}; + names?: unknown; /** The schema describing the field types in the search results. */ - schema?: {}; + schema?: unknown; } diff --git a/src/version3/models/serviceRegistry.ts b/src/version3/models/serviceRegistry.ts new file mode 100644 index 0000000000..d46bfa2b86 --- /dev/null +++ b/src/version3/models/serviceRegistry.ts @@ -0,0 +1,15 @@ +import { ServiceRegistryTier } from './serviceRegistryTier'; + +export interface ServiceRegistry { + /** Service description */ + description?: string; + /** Service ID */ + id?: string; + /** Service name */ + name?: string; + /** Organization ID */ + organizationId?: string; + /** Service revision */ + revision?: string; + serviceTier?: ServiceRegistryTier; +} diff --git a/src/version3/models/serviceRegistryTier.ts b/src/version3/models/serviceRegistryTier.ts new file mode 100644 index 0000000000..b9f2ff9ca8 --- /dev/null +++ b/src/version3/models/serviceRegistryTier.ts @@ -0,0 +1,12 @@ +export interface ServiceRegistryTier { + /** Tier description */ + description?: string; + /** Tier ID */ + id?: string; + /** Tier level */ + level?: number; + /** Tier name */ + name?: string; + /** Name key of the tier */ + nameKey?: string; +} diff --git a/src/version3/models/simpleErrorCollection.ts b/src/version3/models/simpleErrorCollection.ts index 76588932b7..7c9560a7d8 100644 --- a/src/version3/models/simpleErrorCollection.ts +++ b/src/version3/models/simpleErrorCollection.ts @@ -3,7 +3,7 @@ export interface SimpleErrorCollection { * 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?: {}; + errors?: unknown; /** The list of error messages produced by this operation. For example, "input parameter 'key' must be provided" */ errorMessages?: string[]; httpStatusCode?: number; diff --git a/src/version3/models/simpleUsage.ts b/src/version3/models/simpleUsage.ts new file mode 100644 index 0000000000..b1ddd95231 --- /dev/null +++ b/src/version3/models/simpleUsage.ts @@ -0,0 +1,7 @@ +/** Represents a usage of an entity by a project ID and related issue type IDs. */ +export interface SimpleUsage { + /** The issue type IDs for the usage. */ + issueTypeIds: string[]; + /** The project ID for the usage. */ + projectId: string; +} diff --git a/src/version3/models/simplifiedIssueTransition.ts b/src/version3/models/simplifiedIssueTransition.ts new file mode 100644 index 0000000000..9d2f10eee8 --- /dev/null +++ b/src/version3/models/simplifiedIssueTransition.ts @@ -0,0 +1,9 @@ +import { IssueTransitionStatus } from './issueTransitionStatus'; + +export interface SimplifiedIssueTransition { + to?: IssueTransitionStatus; + /** The unique ID of the transition. */ + transitionId?: number; + /** The name of the transition. */ + transitionName?: string; +} diff --git a/src/version3/models/statusMetadata.ts b/src/version3/models/statusMetadata.ts new file mode 100644 index 0000000000..f6eaa22aaf --- /dev/null +++ b/src/version3/models/statusMetadata.ts @@ -0,0 +1,9 @@ +/** The details of the statuses in the associated workflows. */ +export interface StatusMetadata { + /** The category of the status. */ + category?: 'TODO' | 'IN_PROGRESS' | 'DONE' | string; + /** The ID of the status. */ + id?: string; + /** The name of the status. */ + name?: string; +} diff --git a/src/version3/models/statusProjectIssueTypeUsage.ts b/src/version3/models/statusProjectIssueTypeUsage.ts new file mode 100644 index 0000000000..a6e133af18 --- /dev/null +++ b/src/version3/models/statusProjectIssueTypeUsage.ts @@ -0,0 +1,10 @@ +import { StatusProjectIssueTypeUsagePage } from './statusProjectIssueTypeUsagePage'; + +/** The issue types using this status in a project. */ +export interface StatusProjectIssueTypeUsage { + issueTypes?: StatusProjectIssueTypeUsagePage; + /** The project ID. */ + projectId?: string; + /** The status ID. */ + statusId?: string; +} diff --git a/src/version3/models/statusProjectIssueTypeUsagePage.ts b/src/version3/models/statusProjectIssueTypeUsagePage.ts new file mode 100644 index 0000000000..b273c4e6c2 --- /dev/null +++ b/src/version3/models/statusProjectIssueTypeUsagePage.ts @@ -0,0 +1,9 @@ +import { StatusProjectIssueTypeUsage } from './statusProjectIssueTypeUsage'; + +/** A page of issue types. */ +export interface StatusProjectIssueTypeUsagePage { + /** Page token for the next page of issue type usages. */ + nextPageToken?: string; + /** The list of issue types. */ + values?: StatusProjectIssueTypeUsage[]; +} diff --git a/src/version3/models/statusProjectUsage.ts b/src/version3/models/statusProjectUsage.ts new file mode 100644 index 0000000000..c1390878c3 --- /dev/null +++ b/src/version3/models/statusProjectUsage.ts @@ -0,0 +1,8 @@ +import { StatusProjectUsagePage } from './statusProjectUsagePage'; + +/** The projects using this status. */ +export interface StatusProjectUsage { + projects?: StatusProjectUsagePage; + /** The status ID. */ + statusId?: string; +} diff --git a/src/version3/models/statusProjectUsagePage.ts b/src/version3/models/statusProjectUsagePage.ts new file mode 100644 index 0000000000..5a9583f815 --- /dev/null +++ b/src/version3/models/statusProjectUsagePage.ts @@ -0,0 +1,9 @@ +import { StatusProjectUsage } from './statusProjectUsage'; + +/** A page of projects. */ +export interface StatusProjectUsagePage { + /** Page token for the next page of issue type usages. */ + nextPageToken?: string; + /** The list of projects. */ + values?: StatusProjectUsage[]; +} diff --git a/src/version3/models/statusWorkflowUsage.ts b/src/version3/models/statusWorkflowUsage.ts new file mode 100644 index 0000000000..53780c802b --- /dev/null +++ b/src/version3/models/statusWorkflowUsage.ts @@ -0,0 +1,8 @@ +import { StatusWorkflowUsagePage } from './statusWorkflowUsagePage'; + +/** Workflows using the status. */ +export interface StatusWorkflowUsage { + /** The status ID. */ + statusId?: string; + workflows?: StatusWorkflowUsagePage; +} diff --git a/src/version3/models/statusWorkflowUsagePage.ts b/src/version3/models/statusWorkflowUsagePage.ts new file mode 100644 index 0000000000..6d358d8517 --- /dev/null +++ b/src/version3/models/statusWorkflowUsagePage.ts @@ -0,0 +1,9 @@ +import { StatusWorkflowUsageWorkflow } from './statusWorkflowUsageWorkflow'; + +/** A page of workflows. */ +export interface StatusWorkflowUsagePage { + /** Page token for the next page of issue type usages. */ + nextPageToken?: string; + /** The list of statuses. */ + values?: StatusWorkflowUsageWorkflow[]; +} diff --git a/src/version3/models/statusWorkflowUsageWorkflow.ts b/src/version3/models/statusWorkflowUsageWorkflow.ts new file mode 100644 index 0000000000..3e860725b5 --- /dev/null +++ b/src/version3/models/statusWorkflowUsageWorkflow.ts @@ -0,0 +1,5 @@ +/** The worflow. */ +export interface StatusWorkflowUsageWorkflow { + /** The workflow ID. */ + id?: string; +} diff --git a/src/version3/models/statusesPerWorkflow.ts b/src/version3/models/statusesPerWorkflow.ts new file mode 100644 index 0000000000..d4b31c1b71 --- /dev/null +++ b/src/version3/models/statusesPerWorkflow.ts @@ -0,0 +1,9 @@ +/** The statuses associated with each workflow. */ +export interface StatusesPerWorkflow { + /** The ID of the initial status for the workflow. */ + initialStatusId?: string; + /** The status IDs associated with the workflow. */ + statuses?: string[]; + /** The ID of the workflow. */ + workflowId?: string; +} diff --git a/src/version3/models/submittedBulkOperation.ts b/src/version3/models/submittedBulkOperation.ts new file mode 100644 index 0000000000..ed54a85ed8 --- /dev/null +++ b/src/version3/models/submittedBulkOperation.ts @@ -0,0 +1,3 @@ +export interface SubmittedBulkOperation { + taskId?: string; +} diff --git a/src/version3/models/suggestedMappingsForPrioritiesRequest.ts b/src/version3/models/suggestedMappingsForPrioritiesRequest.ts new file mode 100644 index 0000000000..57d9d155fc --- /dev/null +++ b/src/version3/models/suggestedMappingsForPrioritiesRequest.ts @@ -0,0 +1,7 @@ +/** Details of changes to a priority scheme's priorities that require suggested priority mappings. */ +export interface SuggestedMappingsForPrioritiesRequest { + /** The ids of priorities being removed from the scheme. */ + add?: number[]; + /** The ids of priorities being removed from the scheme. */ + remove?: number[]; +} diff --git a/src/version3/models/suggestedMappingsForProjectsRequest.ts b/src/version3/models/suggestedMappingsForProjectsRequest.ts new file mode 100644 index 0000000000..b86007bcff --- /dev/null +++ b/src/version3/models/suggestedMappingsForProjectsRequest.ts @@ -0,0 +1,5 @@ +/** Details of changes to a priority scheme's projects that require suggested priority mappings. */ +export interface SuggestedMappingsForProjectsRequest { + /** The ids of projects being added to the scheme. */ + add?: number[]; +} diff --git a/src/version3/models/suggestedMappingsRequest.ts b/src/version3/models/suggestedMappingsRequest.ts new file mode 100644 index 0000000000..32a6398d4b --- /dev/null +++ b/src/version3/models/suggestedMappingsRequest.ts @@ -0,0 +1,14 @@ +import { SuggestedMappingsForPrioritiesRequest } from './suggestedMappingsForPrioritiesRequest'; +import { SuggestedMappingsForProjectsRequest } from './suggestedMappingsForProjectsRequest'; + +/** Details of changes to a priority scheme that require suggested priority mappings. */ +export interface SuggestedMappingsRequest { + /** The maximum number of results that could be on the page. */ + maxResults?: number; + priorities?: SuggestedMappingsForPrioritiesRequest; + projects?: SuggestedMappingsForProjectsRequest; + /** The id of the priority scheme. */ + schemeId?: number; + /** The index of the first item returned on the page. */ + startAt?: number; +} diff --git a/src/version3/models/systemAvatars.ts b/src/version3/models/systemAvatars.ts index b7a72d47f9..bb60531b88 100644 --- a/src/version3/models/systemAvatars.ts +++ b/src/version3/models/systemAvatars.ts @@ -3,5 +3,5 @@ import { Avatar } from './avatar'; /** List of system avatars. */ export interface SystemAvatars { /** A list of avatar details. */ - system?: Avatar[]; + system: Omit[]; } diff --git a/src/version3/models/taskProgressNode.ts b/src/version3/models/taskProgressNode.ts new file mode 100644 index 0000000000..d49fa81446 --- /dev/null +++ b/src/version3/models/taskProgressNode.ts @@ -0,0 +1,30 @@ +import { JsonNode } from './jsonNode'; + +/** Details about a task. */ +export interface TaskProgressNode { + /** The description of the task. */ + description?: string; + /** The execution time of the task, in milliseconds. */ + elapsedRuntime: number; + /** A timestamp recording when the task was finished. */ + finished?: number; + /** The ID of the task. */ + id: string; + /** A timestamp recording when the task progress was last updated. */ + lastUpdate: number; + /** Information about the progress of the task. */ + message?: string; + /** The progress of the task, as a percentage complete. */ + progress: number; + result?: JsonNode; + /** The URL of the task. */ + self: string; + /** A timestamp recording when the task was started. */ + started?: number; + /** The status of the task. */ + status: 'ENQUEUED' | 'RUNNING' | 'COMPLETE' | 'FAILED' | 'CANCEL_REQUESTED' | 'CANCELLED' | 'DEAD' | string; + /** A timestamp recording when the task was submitted. */ + submitted: number; + /** The ID of the user who submitted the task. */ + submittedBy: number; +} diff --git a/src/version3/models/taskProgressObject.ts b/src/version3/models/taskProgressObject.ts index 44df841ab5..9b16a5e26b 100644 --- a/src/version3/models/taskProgressObject.ts +++ b/src/version3/models/taskProgressObject.ts @@ -11,6 +11,7 @@ export interface TaskProgressObject { /** Information about the progress of the task. */ message?: string; /** The result of the task execution. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any result?: any; /** The ID of the user who submitted the task. */ submittedBy: number; diff --git a/src/version3/models/transition.ts b/src/version3/models/transition.ts index d8396a74c4..77e36c3152 100644 --- a/src/version3/models/transition.ts +++ b/src/version3/models/transition.ts @@ -18,5 +18,5 @@ export interface Transition { screen?: ScreenID; rules?: WorkflowRules; /** The properties of the transition. */ - properties?: {}; + properties?: unknown; } diff --git a/src/version3/models/updateDefaultProjectClassification.ts b/src/version3/models/updateDefaultProjectClassification.ts new file mode 100644 index 0000000000..70ce9a4184 --- /dev/null +++ b/src/version3/models/updateDefaultProjectClassification.ts @@ -0,0 +1,5 @@ +/** The request for updating the default project classification level. */ +export interface UpdateDefaultProjectClassification { + /** The ID of the project classification. */ + id: string; +} diff --git a/src/version3/models/updatePrioritiesInSchemeRequest.ts b/src/version3/models/updatePrioritiesInSchemeRequest.ts new file mode 100644 index 0000000000..43fcd0e551 --- /dev/null +++ b/src/version3/models/updatePrioritiesInSchemeRequest.ts @@ -0,0 +1,7 @@ +import { PrioritySchemeChangesWithoutMappings } from './prioritySchemeChangesWithoutMappings'; + +/** Update priorities in a scheme */ +export interface UpdatePrioritiesInSchemeRequest { + add?: PrioritySchemeChangesWithoutMappings; + remove?: PrioritySchemeChangesWithoutMappings; +} diff --git a/src/version3/models/updatePriorityDetails.ts b/src/version3/models/updatePriorityDetails.ts index 7dccc516bd..5d61df8da2 100644 --- a/src/version3/models/updatePriorityDetails.ts +++ b/src/version3/models/updatePriorityDetails.ts @@ -1,11 +1,39 @@ /** Details of an issue priority. */ export interface UpdatePriorityDetails { - /** The name of the priority. Must be unique. */ - name?: string; + /** The ID for the avatar for the priority. This parameter is nullable and both iconUrl and avatarId cannot be defined. */ + avatarId?: number; /** The description of the priority. */ description?: string; - /** The URL of an icon for the priority. Accepted protocols are HTTP and HTTPS. Built in icons can also be used. */ - iconUrl?: string; + /** + * The URL of an icon for the priority. Accepted protocols are HTTP and HTTPS. Built in icons can also be used. Both + * iconUrl and avatarId cannot be defined. + * + * @deprecated This property is deprecated and will be removed in a future version. Use `avatarId` instead. + */ + iconUrl?: + | '/images/icons/priorities/blocker.png' + | '/images/icons/priorities/critical.png' + | '/images/icons/priorities/high.png' + | '/images/icons/priorities/highest.png' + | '/images/icons/priorities/low.png' + | '/images/icons/priorities/lowest.png' + | '/images/icons/priorities/major.png' + | '/images/icons/priorities/medium.png' + | '/images/icons/priorities/minor.png' + | '/images/icons/priorities/trivial.png' + | '/images/icons/priorities/blocker_new.png' + | '/images/icons/priorities/critical_new.png' + | '/images/icons/priorities/high_new.png' + | '/images/icons/priorities/highest_new.png' + | '/images/icons/priorities/low_new.png' + | '/images/icons/priorities/lowest_new.png' + | '/images/icons/priorities/major_new.png' + | '/images/icons/priorities/medium_new.png' + | '/images/icons/priorities/minor_new.png' + | '/images/icons/priorities/trivial_new.png' + | string; + /** The name of the priority. Must be unique. */ + name?: string; /** The status color of the priority in 3-digit or 6-digit hexadecimal format. */ statusColor?: string; } diff --git a/src/version3/models/updatePrioritySchemeRequest.ts b/src/version3/models/updatePrioritySchemeRequest.ts new file mode 100644 index 0000000000..95ecc0e93a --- /dev/null +++ b/src/version3/models/updatePrioritySchemeRequest.ts @@ -0,0 +1,16 @@ +import { PriorityMapping } from './priorityMapping'; +import { UpdatePrioritiesInSchemeRequest } from './updatePrioritiesInSchemeRequest'; +import { UpdateProjectsInSchemeRequest } from './updateProjectsInSchemeRequest'; + +/** Details of a priority scheme. */ +export interface UpdatePrioritySchemeRequest { + /** The default priority of the scheme. */ + defaultPriorityId?: number; + /** The description of the priority scheme. */ + description?: string; + mappings?: PriorityMapping; + /** The name of the priority scheme. Must be unique. */ + name?: string; + priorities?: UpdatePrioritiesInSchemeRequest; + projects?: UpdateProjectsInSchemeRequest; +} diff --git a/src/version3/models/updatePrioritySchemeResponse.ts b/src/version3/models/updatePrioritySchemeResponse.ts new file mode 100644 index 0000000000..236481e5b3 --- /dev/null +++ b/src/version3/models/updatePrioritySchemeResponse.ts @@ -0,0 +1,8 @@ +import { PrioritySchemeWithPaginatedPrioritiesAndProjects } from './prioritySchemeWithPaginatedPrioritiesAndProjects'; +import { TaskProgressNode } from './taskProgressNode'; + +/** Details of the updated priority scheme. */ +export interface UpdatePrioritySchemeResponse { + priorityScheme?: PrioritySchemeWithPaginatedPrioritiesAndProjects; + task?: TaskProgressNode; +} diff --git a/src/version3/models/updateProjectDetails.ts b/src/version3/models/updateProjectDetails.ts index 662e8afbdd..2c11c6591a 100644 --- a/src/version3/models/updateProjectDetails.ts +++ b/src/version3/models/updateProjectDetails.ts @@ -39,4 +39,9 @@ export interface UpdateProjectDetails { * the value to `-1.` */ categoryId?: number; + /** + * Previous project keys to be released from the current project. Released keys must belong to the current project and + * not contain the current project key + */ + releasedProjectKeys?: string[]; } diff --git a/src/version3/models/updateProjectsInSchemeRequest.ts b/src/version3/models/updateProjectsInSchemeRequest.ts new file mode 100644 index 0000000000..2269174ee8 --- /dev/null +++ b/src/version3/models/updateProjectsInSchemeRequest.ts @@ -0,0 +1,7 @@ +import { PrioritySchemeChangesWithoutMappings } from './prioritySchemeChangesWithoutMappings'; + +/** Update projects in a scheme */ +export interface UpdateProjectsInSchemeRequest { + add?: PrioritySchemeChangesWithoutMappings; + remove?: PrioritySchemeChangesWithoutMappings; +} diff --git a/src/version3/models/validationOptionsForCreate.ts b/src/version3/models/validationOptionsForCreate.ts new file mode 100644 index 0000000000..a6e052ae98 --- /dev/null +++ b/src/version3/models/validationOptionsForCreate.ts @@ -0,0 +1,7 @@ +/** + * The level of validation to return from the API. If no values are provided, the default would return `WARNING` and + * `ERROR` level validation results. + */ +export interface ValidationOptionsForCreate { + levels?: ('WARNING' | 'ERROR' | string)[]; +} diff --git a/src/version3/models/validationOptionsForUpdate.ts b/src/version3/models/validationOptionsForUpdate.ts new file mode 100644 index 0000000000..99bce46e1f --- /dev/null +++ b/src/version3/models/validationOptionsForUpdate.ts @@ -0,0 +1,7 @@ +/** + * The level of validation to return from the API. If no values are provided, the default would return `WARNING` and + * `ERROR` level validation results. + */ +export interface ValidationOptionsForUpdate { + levels?: ('WARNING' | 'ERROR' | string)[]; +} diff --git a/src/version3/models/version.ts b/src/version3/models/version.ts index fd618aefd7..d79073bc30 100644 --- a/src/version3/models/version.ts +++ b/src/version3/models/version.ts @@ -1,70 +1,85 @@ -import { SimpleLink } from './simpleLink'; +import { VersionApprover } from './versionApprover'; import { VersionIssuesStatus } from './versionIssuesStatus'; +import { SimpleLink } from './simpleLink'; /** Details about a project version. */ export interface Version { + /** If the expand option `approvers` is used, returns a list containing the approvers for this version. */ + approvers?: VersionApprover[]; + /** Indicates that the version is archived. Optional when creating or updating a version. */ + archived?: boolean; + /** The description of the version. Optional when creating or updating a version. The maximum size is 16,384 bytes. */ + description?: string; + /** If the expand option `driver` is used, returns the Atlassian account ID of the driver. */ + driver?: string; /** * Use [expand](em>#expansion) to include additional information about version in the response. This parameter accepts * a comma-separated list. Expand options include: * - * `operations` Returns the list of operations available for this version. `issuesstatus` Returns the count of issues - * in this version for each of the status categories _to do_, _in progress_, _done_, and _unmapped_. The _unmapped_ - * property contains a count of issues with a status other than _to do_, _in progress_, and _done_. + * - `operations` Returns the list of operations available for this version. + * - `issuesstatus` Returns the count of issues in this version for each of the status categories _to do_, _in + * progress_, _done_, and _unmapped_. The _unmapped_ property contains a count of issues with a status other than + * _to do_, _in progress_, and _done_. + * - `driver` Returns the Atlassian account ID of the version driver. + * - `approvers` Returns a list containing approvers for this version. * * Optional for create and update. */ - expand?: string; - /** The URL of the version. */ - self?: string; + expand?: + | 'operations' + | 'issuesstatus' + | 'driver' + | 'approvers' + | ('operations' | 'issuesstatus' | 'driver' | 'approvers')[] + | string + | string[]; /** The ID of the version. */ id?: string; - /** The description of the version. Optional when creating or updating a version. */ - description?: string; + issuesStatusForFixVersion?: VersionIssuesStatus; + /** + * The URL of the self link to the version to which all unfixed issues are moved when a version is released. Not + * applicable when creating a version. Optional when updating a version. + */ + moveUnfixedIssuesTo?: string; /** * The unique name of the version. Required when creating a version. Optional when updating a version. The maximum * length is 255 characters. */ name?: string; - /** Indicates that the version is archived. Optional when creating or updating a version. */ - archived?: boolean; + /** If the expand option `operations` is used, returns the list of operations available for this version. */ + operations?: SimpleLink[]; + /** Indicates that the version is overdue. */ + overdue?: boolean; + /** + * The ID of the project to which this version is attached. Required when creating a version. Not applicable when + * updating a version. + */ + projectId?: string | number; + /** + * The release date of the version. Expressed in ISO 8601 format (yyyy-mm-dd). Optional when creating or updating a + * version. + */ + releaseDate?: string; /** * Indicates that the version is released. If the version is released a request to release again is ignored. Not * applicable when creating a version. Optional when updating a version. */ released?: boolean; + /** The URL of the version. */ + self?: string; /** * The start date of the version. Expressed in ISO 8601 format (yyyy-mm-dd). Optional when creating or updating a * version. */ startDate?: string; - /** - * The release date of the version. Expressed in ISO 8601 format (yyyy-mm-dd). Optional when creating or updating a - * version. - */ - releaseDate?: string; - /** Indicates that the version is overdue. */ - overdue?: boolean; - /** - * The date on which work on this version is expected to start, expressed in the instance's _Day/Month/Year Format_ - * date format. - */ - userStartDate?: string; /** * The date on which work on this version is expected to finish, expressed in the instance's _Day/Month/Year Format_ * date format. */ userReleaseDate?: string; /** - * The ID of the project to which this version is attached. Required when creating a version. Not applicable when - * updating a version. - */ - projectId?: number; - /** - * The URL of the self link to the version to which all unfixed issues are moved when a version is released. Not - * applicable when creating a version. Optional when updating a version. + * The date on which work on this version is expected to start, expressed in the instance's _Day/Month/Year Format_ + * date format. */ - moveUnfixedIssuesTo?: string; - /** If the expand option `operations` is used, returns the list of operations available for this version. */ - operations?: SimpleLink[]; - issuesStatusForFixVersion?: VersionIssuesStatus; + userStartDate?: string; } diff --git a/src/version3/models/versionApprover.ts b/src/version3/models/versionApprover.ts new file mode 100644 index 0000000000..ab2a639679 --- /dev/null +++ b/src/version3/models/versionApprover.ts @@ -0,0 +1,11 @@ +/** Contains details about a version approver. */ +export interface VersionApprover { + /** The Atlassian account ID of the approver. */ + accountId?: string; + /** A description of why the user is declining the approval. */ + declineReason?: string; + /** A description of what the user is approving within the specified version. */ + description?: string; + /** The status of the approval, which can be _PENDING_, _APPROVED_, or _DECLINED_ */ + status?: 'PENDING' | 'APPROVED' | 'DECLINED' | string; +} diff --git a/src/version3/models/versionRelatedWork.ts b/src/version3/models/versionRelatedWork.ts new file mode 100644 index 0000000000..d8e8e88a06 --- /dev/null +++ b/src/version3/models/versionRelatedWork.ts @@ -0,0 +1,16 @@ +/** Associated related work to a version */ +export interface VersionRelatedWork { + /** The category of the related work */ + category: string; + /** The ID of the issue associated with the related work (if there is one). Cannot be updated via the Rest API. */ + issueId?: number; + /** + * The id of the related work. For the native release note related work item, this will be null, and Rest API does not + * support updating it. + */ + relatedWorkId?: string; + /** The title of the related work */ + title?: string; + /** The URL of the related work. Will be null for the native release note related work item, but is otherwise required. */ + url?: string; +} diff --git a/src/version3/models/workflowAssociationStatusMapping.ts b/src/version3/models/workflowAssociationStatusMapping.ts new file mode 100644 index 0000000000..17d5e22fe6 --- /dev/null +++ b/src/version3/models/workflowAssociationStatusMapping.ts @@ -0,0 +1,7 @@ +/** The list of status mappings. */ +export interface WorkflowAssociationStatusMapping { + /** The ID of the status in the new workflow. */ + newStatusId: string; + /** The ID of the status in the old workflow that isn't present in the new workflow. */ + oldStatusId: string; +} diff --git a/src/version3/models/workflowCapabilities.ts b/src/version3/models/workflowCapabilities.ts new file mode 100644 index 0000000000..57c9c17d0a --- /dev/null +++ b/src/version3/models/workflowCapabilities.ts @@ -0,0 +1,5 @@ +export interface WorkflowCapabilities { + workflowId?: string; + projectId?: string; + issueTypeId?: string; +} diff --git a/src/version2/models/workflowCreateResponse.ts b/src/version3/models/workflowCreate.ts similarity index 87% rename from src/version2/models/workflowCreateResponse.ts rename to src/version3/models/workflowCreate.ts index 1600d3ce86..1f6ff11d5f 100644 --- a/src/version2/models/workflowCreateResponse.ts +++ b/src/version3/models/workflowCreate.ts @@ -1,8 +1,8 @@ -import { JiraWorkflow } from './jiraWorkflow'; import { JiraWorkflowStatus } from './jiraWorkflowStatus'; +import { JiraWorkflow } from './jiraWorkflow'; /** Details of the created workflows and statuses. */ -export interface WorkflowCreateResponse { +export interface WorkflowCreate { /** List of created statuses. */ statuses?: JiraWorkflowStatus[]; /** List of created workflows. */ diff --git a/src/version3/models/workflowCreateRequest.ts b/src/version3/models/workflowCreateRequest.ts new file mode 100644 index 0000000000..421fcde858 --- /dev/null +++ b/src/version3/models/workflowCreateRequest.ts @@ -0,0 +1,12 @@ +import { WorkflowScope } from './workflowScope'; +import { WorkflowStatusUpdate } from './workflowStatusUpdate'; +import { WorkflowCreate } from './workflowCreate'; + +/** The create workflows payload. */ +export interface WorkflowCreateRequest { + scope: WorkflowScope; + /** The statuses to associate with the workflows. */ + statuses: WorkflowStatusUpdate[]; + /** The details of the workflows to create. */ + workflows: WorkflowCreate[]; +} diff --git a/src/version3/models/workflowElementReference.ts b/src/version3/models/workflowElementReference.ts new file mode 100644 index 0000000000..e0b0ed2390 --- /dev/null +++ b/src/version3/models/workflowElementReference.ts @@ -0,0 +1,14 @@ +import { ProjectAndIssueTypePair } from './projectAndIssueTypePair'; + +/** A reference to the location of the error. This will be null if the error does not refer to a specific element. */ +export interface WorkflowElementReference { + /** A property key. */ + propertyKey?: string; + /** A rule ID. */ + ruleId?: string; + statusMappingReference?: ProjectAndIssueTypePair; + /** A status reference. */ + statusReference?: string; + /** A transition ID. */ + transitionId?: string; +} diff --git a/src/version3/models/workflowLayout.ts b/src/version3/models/workflowLayout.ts new file mode 100644 index 0000000000..a11cd570b1 --- /dev/null +++ b/src/version3/models/workflowLayout.ts @@ -0,0 +1,7 @@ +/** The starting point for the statuses in the workflow. */ +export interface WorkflowLayout { + /** The x axis location. */ + x?: number; + /** The y axis location. */ + y?: number; +} diff --git a/src/version3/models/workflowMetadataAndIssueTypeRestModel.ts b/src/version3/models/workflowMetadataAndIssueTypeRestModel.ts new file mode 100644 index 0000000000..b418fdf196 --- /dev/null +++ b/src/version3/models/workflowMetadataAndIssueTypeRestModel.ts @@ -0,0 +1,8 @@ +import { WorkflowMetadataRestModel } from './workflowMetadataRestModel'; + +/** The workflow metadata and issue type IDs which use this workflow. */ +export interface WorkflowMetadataAndIssueTypeRestModel { + /** The list of issue type IDs for the mapping. */ + issueTypeIds: string[]; + workflow: WorkflowMetadataRestModel; +} diff --git a/src/version3/models/workflowMetadataRestModel.ts b/src/version3/models/workflowMetadataRestModel.ts new file mode 100644 index 0000000000..c09800a0aa --- /dev/null +++ b/src/version3/models/workflowMetadataRestModel.ts @@ -0,0 +1,21 @@ +import { SimpleUsage } from './simpleUsage'; +import { DocumentVersion } from './documentVersion'; + +/** Workflow metadata and usage detail. */ +export interface WorkflowMetadataRestModel { + /** The description of the workflow. */ + description: string; + /** The ID of the workflow. */ + id: string; + /** The name of the workflow. */ + name: string; + /** + * @deprecated See the [deprecation + * notice](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-2298) for details. + * + * Use the optional `workflows.usages` expand to get additional information about the projects and issue types + * associated with the workflows in the workflow scheme. + */ + usage?: SimpleUsage[]; + version: DocumentVersion; +} diff --git a/src/version3/models/workflowProjectIssueTypeUsage.ts b/src/version3/models/workflowProjectIssueTypeUsage.ts new file mode 100644 index 0000000000..9545964f09 --- /dev/null +++ b/src/version3/models/workflowProjectIssueTypeUsage.ts @@ -0,0 +1,10 @@ +import { WorkflowProjectIssueTypeUsagePage } from './workflowProjectIssueTypeUsagePage'; + +/** Issue types associated with the workflow for a project. */ +export interface WorkflowProjectIssueTypeUsage { + issueTypes?: WorkflowProjectIssueTypeUsagePage; + /** The ID of the project. */ + projectId?: string; + /** The ID of the workflow. */ + workflowId?: string; +} diff --git a/src/version3/models/workflowProjectIssueTypeUsagePage.ts b/src/version3/models/workflowProjectIssueTypeUsagePage.ts new file mode 100644 index 0000000000..33efc451d8 --- /dev/null +++ b/src/version3/models/workflowProjectIssueTypeUsagePage.ts @@ -0,0 +1,9 @@ +import { WorkflowProjectIssueTypeUsage } from './workflowProjectIssueTypeUsage'; + +/** A page of issue types. */ +export interface WorkflowProjectIssueTypeUsagePage { + /** Token for the next page of issue type usages. */ + nextPageToken?: string; + /** The list of issue types. */ + values?: WorkflowProjectIssueTypeUsage[]; +} diff --git a/src/version3/models/workflowProjectUsage.ts b/src/version3/models/workflowProjectUsage.ts new file mode 100644 index 0000000000..6276eb98c4 --- /dev/null +++ b/src/version3/models/workflowProjectUsage.ts @@ -0,0 +1,8 @@ +import { ProjectUsagePage } from './projectUsagePage'; + +/** Projects using the workflow. */ +export interface WorkflowProjectUsage { + projects?: ProjectUsagePage; + /** The workflow ID. */ + workflowId?: string; +} diff --git a/src/version3/models/workflowRead.ts b/src/version3/models/workflowRead.ts new file mode 100644 index 0000000000..8f1a0ba12e --- /dev/null +++ b/src/version3/models/workflowRead.ts @@ -0,0 +1,10 @@ +import { JiraWorkflowStatus } from './jiraWorkflowStatus'; +import { JiraWorkflow } from './jiraWorkflow'; + +/** Details of workflows and related statuses. */ +export interface WorkflowRead { + /** List of statuses. */ + statuses?: JiraWorkflowStatus[]; + /** List of workflows. */ + workflows?: JiraWorkflow[]; +} diff --git a/src/version3/models/workflowReferenceStatus.ts b/src/version3/models/workflowReferenceStatus.ts new file mode 100644 index 0000000000..14ca583f69 --- /dev/null +++ b/src/version3/models/workflowReferenceStatus.ts @@ -0,0 +1,14 @@ +import { ApprovalConfiguration } from './approvalConfiguration'; +import { WorkflowStatusLayout } from './workflowStatusLayout'; + +/** The statuses referenced in the workflow. */ +export interface WorkflowReferenceStatus { + approvalConfiguration?: ApprovalConfiguration; + /** Indicates if the status is deprecated. */ + deprecated?: boolean; + layout?: WorkflowStatusLayout; + /** The properties associated with the status. */ + properties?: unknown; + /** The reference of the status. */ + statusReference?: string; +} diff --git a/src/version3/models/workflowRuleConfiguration.ts b/src/version3/models/workflowRuleConfiguration.ts new file mode 100644 index 0000000000..3a4160aca8 --- /dev/null +++ b/src/version3/models/workflowRuleConfiguration.ts @@ -0,0 +1,9 @@ +/** The configuration of the rule. */ +export interface WorkflowRuleConfiguration { + /** The ID of the rule. */ + id?: string; + /** The parameters related to the rule. */ + parameters?: unknown; + /** The rule key of the rule. */ + ruleKey: string; +} diff --git a/src/version3/models/workflowScheme.ts b/src/version3/models/workflowScheme.ts index da6497af8d..fef18673bd 100644 --- a/src/version3/models/workflowScheme.ts +++ b/src/version3/models/workflowScheme.ts @@ -21,7 +21,7 @@ export interface WorkflowScheme { * 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?: {}; + issueTypeMappings?: unknown; /** * 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. @@ -32,7 +32,7 @@ export interface WorkflowScheme { * 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?: {}; + originalIssueTypeMappings?: unknown; /** Whether the workflow scheme is a draft or not. */ draft?: boolean; lastModifiedUser?: User; @@ -57,5 +57,5 @@ export interface WorkflowScheme { */ updateDraftIfNeeded?: boolean; /** The issue types available in Jira. */ - issueTypes?: {}; + issueTypes?: unknown; } diff --git a/src/version3/models/workflowSchemeAssociation.ts b/src/version3/models/workflowSchemeAssociation.ts new file mode 100644 index 0000000000..9e119c9edb --- /dev/null +++ b/src/version3/models/workflowSchemeAssociation.ts @@ -0,0 +1,7 @@ +/** The explicit association between issue types and a workflow in a workflow scheme. */ +export interface WorkflowSchemeAssociation { + /** The issue types assigned to the workflow. */ + issueTypeIds: string[]; + /** The ID of the workflow. */ + workflowId: string; +} diff --git a/src/version3/models/workflowSchemeProjectUsage.ts b/src/version3/models/workflowSchemeProjectUsage.ts new file mode 100644 index 0000000000..525818ea3b --- /dev/null +++ b/src/version3/models/workflowSchemeProjectUsage.ts @@ -0,0 +1,8 @@ +import { ProjectUsagePage } from './projectUsagePage'; + +/** Projects using the workflow scheme. */ +export interface WorkflowSchemeProjectUsage { + projects?: ProjectUsagePage; + /** The workflow scheme ID. */ + workflowSchemeId?: string; +} diff --git a/src/version3/models/workflowSchemeReadRequest.ts b/src/version3/models/workflowSchemeReadRequest.ts new file mode 100644 index 0000000000..448fe7361e --- /dev/null +++ b/src/version3/models/workflowSchemeReadRequest.ts @@ -0,0 +1,7 @@ +/** The workflow scheme read request body. */ +export interface WorkflowSchemeReadRequest { + /** The list of project IDs to query. */ + projectIds?: string[]; + /** The list of workflow scheme IDs to query. */ + workflowSchemeIds?: string[]; +} diff --git a/src/version3/models/workflowSchemeReadResponse.ts b/src/version3/models/workflowSchemeReadResponse.ts new file mode 100644 index 0000000000..657d771690 --- /dev/null +++ b/src/version3/models/workflowSchemeReadResponse.ts @@ -0,0 +1,20 @@ +import { WorkflowMetadataRestModel } from './workflowMetadataRestModel'; +import { WorkflowScope } from './workflowScope'; +import { DocumentVersion } from './documentVersion'; +import { WorkflowMetadataAndIssueTypeRestModel } from './workflowMetadataAndIssueTypeRestModel'; + +export interface WorkflowSchemeReadResponse { + defaultWorkflow?: WorkflowMetadataRestModel; + /** The description of the workflow scheme. */ + description?: string; + /** The ID of the workflow scheme. */ + id: string; + /** The name of the workflow scheme. */ + name: string; + scope: WorkflowScope; + /** Indicates if there's an [asynchronous task](#async-operations) for this workflow scheme. */ + taskId?: string; + version: DocumentVersion; + /** Mappings from workflows to issue types. */ + workflowsForIssueTypes: WorkflowMetadataAndIssueTypeRestModel[]; +} diff --git a/src/version3/models/workflowSchemeUpdateRequiredMappingsResponse.ts b/src/version3/models/workflowSchemeUpdateRequiredMappingsResponse.ts new file mode 100644 index 0000000000..c0ca2ff563 --- /dev/null +++ b/src/version3/models/workflowSchemeUpdateRequiredMappingsResponse.ts @@ -0,0 +1,15 @@ +import { RequiredMappingByIssueType } from './requiredMappingByIssueType'; +import { RequiredMappingByWorkflows } from './requiredMappingByWorkflows'; +import { StatusMetadata } from './statusMetadata'; +import { StatusesPerWorkflow } from './statusesPerWorkflow'; + +export interface WorkflowSchemeUpdateRequiredMappingsResponse { + /** The list of required status mappings by issue type. */ + statusMappingsByIssueTypes?: RequiredMappingByIssueType[]; + /** The list of required status mappings by workflow. */ + statusMappingsByWorkflows?: RequiredMappingByWorkflows[]; + /** The details of the statuses in the associated workflows. */ + statuses?: StatusMetadata[]; + /** The statuses associated with each workflow. */ + statusesPerWorkflow?: StatusesPerWorkflow[]; +} diff --git a/src/version3/models/workflowSchemeUsage.ts b/src/version3/models/workflowSchemeUsage.ts new file mode 100644 index 0000000000..0c28522096 --- /dev/null +++ b/src/version3/models/workflowSchemeUsage.ts @@ -0,0 +1,8 @@ +import { WorkflowSchemeUsagePage } from './workflowSchemeUsagePage'; + +/** Workflow schemes using the workflow. */ +export interface WorkflowSchemeUsage { + /** The workflow ID. */ + workflowId?: string; + workflowSchemes?: WorkflowSchemeUsagePage; +} diff --git a/src/version3/models/workflowSchemeUsagePage.ts b/src/version3/models/workflowSchemeUsagePage.ts new file mode 100644 index 0000000000..5b883978f6 --- /dev/null +++ b/src/version3/models/workflowSchemeUsagePage.ts @@ -0,0 +1,9 @@ +import { WorkflowSchemeUsage } from './workflowSchemeUsage'; + +/** A page of workflow schemes. */ +export interface WorkflowSchemeUsagePage { + /** Token for the next page of issue type usages. */ + nextPageToken?: string; + /** The list of workflow schemes. */ + values?: WorkflowSchemeUsage[]; +} diff --git a/src/version3/models/workflowScope.ts b/src/version3/models/workflowScope.ts new file mode 100644 index 0000000000..1ab974f921 --- /dev/null +++ b/src/version3/models/workflowScope.ts @@ -0,0 +1,8 @@ +import { ProjectId } from './projectId'; + +/** The scope of the workflow. */ +export interface WorkflowScope { + project?: ProjectId; + /** The scope of the workflow. `GLOBAL` for company-managed projects and `PROJECT` for team-managed projects. */ + type: 'PROJECT' | 'GLOBAL' | string; +} diff --git a/src/version3/models/workflowSearchResponse.ts b/src/version3/models/workflowSearchResponse.ts new file mode 100644 index 0000000000..966016a32a --- /dev/null +++ b/src/version3/models/workflowSearchResponse.ts @@ -0,0 +1,22 @@ +import { JiraWorkflowStatus } from './jiraWorkflowStatus'; +import { JiraWorkflow } from './jiraWorkflow'; + +/** Page of items, including workflows and related statuses. */ +export interface WorkflowSearchResponse { + /** Whether this is the last page. */ + isLast?: boolean; + /** The maximum number of items that could be returned. */ + maxResults?: number; + /** If there is another page of results, the URL of the next page. */ + nextPage?: string; + /** The URL of the page. */ + self?: string; + /** The index of the first item returned. */ + startAt?: number; + /** List of statuses. */ + statuses?: JiraWorkflowStatus[]; + /** The number of items returned. */ + total?: number; + /** List of workflows. */ + values?: JiraWorkflow[]; +} diff --git a/src/version3/models/workflowStatusAndPort.ts b/src/version3/models/workflowStatusAndPort.ts new file mode 100644 index 0000000000..1ef65ed402 --- /dev/null +++ b/src/version3/models/workflowStatusAndPort.ts @@ -0,0 +1,7 @@ +/** The status reference and port that a transition is connected to. */ +export interface WorkflowStatusAndPort { + /** The port the transition is connected to this status. */ + port?: number; + /** The reference of this status. */ + statusReference?: string; +} diff --git a/src/version3/models/workflowStatusLayout.ts b/src/version3/models/workflowStatusLayout.ts new file mode 100644 index 0000000000..2b760493dc --- /dev/null +++ b/src/version3/models/workflowStatusLayout.ts @@ -0,0 +1,7 @@ +/** The x and y location of the status in the workflow. */ +export interface WorkflowStatusLayout { + /** The x axis location. */ + x?: number; + /** The y axis location. */ + y?: number; +} diff --git a/src/version3/models/workflowStatusUpdate.ts b/src/version3/models/workflowStatusUpdate.ts new file mode 100644 index 0000000000..c77a22921a --- /dev/null +++ b/src/version3/models/workflowStatusUpdate.ts @@ -0,0 +1,13 @@ +/** Details of the status being updated. */ +export interface WorkflowStatusUpdate { + /** The description of the status. */ + description?: string; + /** The ID of the status. */ + id?: string; + /** The name of the status. */ + name: string; + /** The category of the status. */ + statusCategory: 'TODO' | 'IN_PROGRESS' | 'DONE' | string; + /** The reference of the status. */ + statusReference: string; +} diff --git a/src/version3/models/workflowTransitionLinks.ts b/src/version3/models/workflowTransitionLinks.ts new file mode 100644 index 0000000000..a6cb549dbe --- /dev/null +++ b/src/version3/models/workflowTransitionLinks.ts @@ -0,0 +1,9 @@ +/** The statuses the transition can start from, and the mapping of ports between the statuses. */ +export interface WorkflowTransitionLinks { + /** The port that the transition starts from. */ + fromPort?: number; + /** The status that the transition starts from. */ + fromStatusReference?: string; + /** The port that the transition goes to. */ + toPort?: number; +} diff --git a/src/version3/models/workflowTransitionRule.ts b/src/version3/models/workflowTransitionRule.ts index 3906a222a4..984d3fcf5b 100644 --- a/src/version3/models/workflowTransitionRule.ts +++ b/src/version3/models/workflowTransitionRule.ts @@ -3,5 +3,6 @@ export interface WorkflowTransitionRule { /** The type of the transition rule. */ type: string; /** EXPERIMENTAL. The configuration of the transition rule. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any configuration?: any; } diff --git a/src/version3/models/workflowTransitionRulesUpdateErrorDetails.ts b/src/version3/models/workflowTransitionRulesUpdateErrorDetails.ts index c3c2e1b683..73a51c7788 100644 --- a/src/version3/models/workflowTransitionRulesUpdateErrorDetails.ts +++ b/src/version3/models/workflowTransitionRulesUpdateErrorDetails.ts @@ -7,7 +7,7 @@ export interface WorkflowTransitionRulesUpdateErrorDetails { * A list of transition rule update errors, indexed by the transition rule ID. Any transition rule that appears here * wasn't updated. */ - ruleUpdateErrors: {}; + ruleUpdateErrors: unknown; /** * The list of errors that specify why the workflow update failed. The workflow was not updated if the list contains * any entries. diff --git a/src/version3/models/workflowTransitions.ts b/src/version3/models/workflowTransitions.ts new file mode 100644 index 0000000000..86b2b6210e --- /dev/null +++ b/src/version3/models/workflowTransitions.ts @@ -0,0 +1,42 @@ +import { WorkflowRuleConfiguration } from './workflowRuleConfiguration'; +import { ConditionGroupConfiguration } from './conditionGroupConfiguration'; +import { WorkflowStatusAndPort } from './workflowStatusAndPort'; +import { WorkflowTransitionLinks } from './workflowTransitionLinks'; +import { WorkflowTrigger } from './workflowTrigger'; + +/** + * The transitions of the workflow. Note that a transition can have either the deprecated `to`/`from` fields or the + * `toStatusReference`/`links` fields, but never both nor a combination. + */ +export interface WorkflowTransitions { + /** The post-functions of the transition. */ + actions?: WorkflowRuleConfiguration[]; + conditions?: ConditionGroupConfiguration; + /** The custom event ID of the transition. */ + customIssueEventId?: string; + /** The description of the transition. */ + description?: string; + /** + * The statuses and ports that the transition can start from. This field is deprecated - use + * `toStatusReference`/`links` instead. + */ + from?: WorkflowStatusAndPort[]; + /** The ID of the transition. */ + id?: string; + /** The statuses the transition can start from, and the mapping of ports between the statuses. */ + links?: WorkflowTransitionLinks[]; + /** The name of the transition. */ + name?: string; + /** The properties of the transition. */ + properties?: unknown; + to?: WorkflowStatusAndPort; + /** The status the transition goes to. */ + toStatusReference?: string; + transitionScreen?: WorkflowRuleConfiguration; + /** The triggers of the transition. */ + triggers?: WorkflowTrigger[]; + /** The transition type. */ + type?: 'INITIAL' | 'GLOBAL' | 'DIRECTED' | string; + /** The validators of the transition. */ + validators?: WorkflowRuleConfiguration[]; +} diff --git a/src/version3/models/workflowTrigger.ts b/src/version3/models/workflowTrigger.ts new file mode 100644 index 0000000000..6a01b17784 --- /dev/null +++ b/src/version3/models/workflowTrigger.ts @@ -0,0 +1,9 @@ +/** The trigger configuration associated with a workflow. */ +export interface WorkflowTrigger { + /** The ID of the trigger. */ + id?: string; + /** The parameters of the trigger. */ + parameters: unknown; + /** The rule key of the trigger. */ + ruleKey: string; +} diff --git a/src/version2/models/workflowUpdateResponse.ts b/src/version3/models/workflowUpdate.ts similarity index 89% rename from src/version2/models/workflowUpdateResponse.ts rename to src/version3/models/workflowUpdate.ts index 57e60d99dd..f62b866097 100644 --- a/src/version2/models/workflowUpdateResponse.ts +++ b/src/version3/models/workflowUpdate.ts @@ -1,7 +1,7 @@ -import { JiraWorkflow } from './jiraWorkflow'; import { JiraWorkflowStatus } from './jiraWorkflowStatus'; +import { JiraWorkflow } from './jiraWorkflow'; -export interface WorkflowUpdateResponse { +export interface WorkflowUpdate { /** List of updated statuses. */ statuses?: JiraWorkflowStatus[]; /** If there is a [asynchronous task](#async-operations) operation, as a result of this update. */ diff --git a/src/version3/models/workflowUpdateRequest.ts b/src/version3/models/workflowUpdateRequest.ts new file mode 100644 index 0000000000..7f5c7e9b17 --- /dev/null +++ b/src/version3/models/workflowUpdateRequest.ts @@ -0,0 +1,10 @@ +import { WorkflowStatusUpdate } from './workflowStatusUpdate'; +import { WorkflowUpdate } from './workflowUpdate'; + +/** The update workflows payload. */ +export interface WorkflowUpdateRequest { + /** The statuses to associate with the workflows. */ + statuses: WorkflowStatusUpdate[]; + /** The details of the workflows to update. */ + workflows: WorkflowUpdate[]; +} diff --git a/src/version3/models/workflowUpdateValidateRequest.ts b/src/version3/models/workflowUpdateValidateRequest.ts new file mode 100644 index 0000000000..8fcd81fead --- /dev/null +++ b/src/version3/models/workflowUpdateValidateRequest.ts @@ -0,0 +1,7 @@ +import { WorkflowUpdateRequest } from './workflowUpdateRequest'; +import { ValidationOptionsForUpdate } from './validationOptionsForUpdate'; + +export interface WorkflowUpdateValidateRequest { + payload: WorkflowUpdateRequest; + validationOptions?: ValidationOptionsForUpdate; +} diff --git a/src/version3/models/workflowValidationError.ts b/src/version3/models/workflowValidationError.ts new file mode 100644 index 0000000000..5a0408d3e6 --- /dev/null +++ b/src/version3/models/workflowValidationError.ts @@ -0,0 +1,25 @@ +import { WorkflowElementReference } from './workflowElementReference'; + +/** The details about a workflow validation error. */ +export interface WorkflowValidationError { + /** An error code. */ + code?: string; + elementReference?: WorkflowElementReference; + /** The validation error level. */ + level?: 'WARNING' | 'ERROR' | string; + /** An error message. */ + message?: string; + /** The type of element the error or warning references. */ + type?: + | 'RULE' + | 'STATUS' + | 'STATUS_LAYOUT' + | 'STATUS_PROPERTY' + | 'WORKFLOW' + | 'TRANSITION' + | 'TRANSITION_PROPERTY' + | 'SCOPE' + | 'STATUS_MAPPING' + | 'TRIGGER' + | string; +} diff --git a/src/version3/models/workflowValidationErrorList.ts b/src/version3/models/workflowValidationErrorList.ts new file mode 100644 index 0000000000..95e3690a4d --- /dev/null +++ b/src/version3/models/workflowValidationErrorList.ts @@ -0,0 +1,6 @@ +import { WorkflowValidationError } from './workflowValidationError'; + +export interface WorkflowValidationErrorList { + /** The list of validation errors. */ + errors?: WorkflowValidationError[]; +} diff --git a/src/version3/models/worklogsMoveRequest.ts b/src/version3/models/worklogsMoveRequest.ts new file mode 100644 index 0000000000..212d9419a7 --- /dev/null +++ b/src/version3/models/worklogsMoveRequest.ts @@ -0,0 +1,6 @@ +export interface WorklogsMoveRequest { + /** A list of worklog IDs. */ + ids?: number[]; + /** The issue id or key of the destination issue */ + issueIdOrKey?: string; +} diff --git a/src/version3/models/workspaceDataPolicy.ts b/src/version3/models/workspaceDataPolicy.ts new file mode 100644 index 0000000000..03090c03d6 --- /dev/null +++ b/src/version3/models/workspaceDataPolicy.ts @@ -0,0 +1,5 @@ +/** Details about data policy. */ +export interface WorkspaceDataPolicy { + /** Whether the workspace contains any content inaccessible to the requesting application. */ + anyContentBlocked: boolean; +} diff --git a/src/version3/myself.ts b/src/version3/myself.ts index c7b333331f..cc2ea6e448 100644 --- a/src/version3/myself.ts +++ b/src/version3/myself.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Myself { @@ -17,6 +17,14 @@ export class Myself { * - _jira.user.timezone_ The time zone of the user. By default this is not set and the user takes the timezone of the * instance. * + * These system preferences keys will be deprecated by 15/07/2024. You can still retrieve these keys, but it will not + * have any impact on Notification behaviour. + * + * - _user.notifications.watcher_ Whether the user gets notified when they are watcher. + * - _user.notifications.assignee_ Whether the user gets notified when they are assignee. + * - _user.notifications.reporter_ Whether the user gets notified when they are reporter. + * - _user.notifications.mentions_ Whether the user gets notified when they are mentions. + * * 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 to manage timezone and locale instead. @@ -35,6 +43,14 @@ export class Myself { * - _jira.user.timezone_ The time zone of the user. By default this is not set and the user takes the timezone of the * instance. * + * These system preferences keys will be deprecated by 15/07/2024. You can still retrieve these keys, but it will not + * have any impact on Notification behaviour. + * + * - _user.notifications.watcher_ Whether the user gets notified when they are watcher. + * - _user.notifications.assignee_ Whether the user gets notified when they are assignee. + * - _user.notifications.reporter_ Whether the user gets notified when they are reporter. + * - _user.notifications.mentions_ Whether the user gets notified when they are mentions. + * * 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 to manage timezone and locale instead. @@ -61,18 +77,26 @@ export class Myself { * following keys define system preferences that can be set or created: * * - _user.notifications.mimetype_ The mime type used in notifications sent to the user. Defaults to `html`. - * - _user.notify.own.changes_ Whether the user gets notified of their own changes. Defaults to `false`. * - _user.default.share.private_ Whether new [ filters](https://confluence.atlassian.com/x/eQiiLQ) are set to private. * Defaults to `true`. * - _user.keyboard.shortcuts.disabled_ Whether keyboard shortcuts are disabled. Defaults to `false`. * - _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. + * - _user.notifiy.own.changes_ Whether the user gets notified of their own changes. * * Note that these keys are deprecated: * * - _jira.user.locale_ The locale of the user. By default, not set. The user takes the instance locale. * - _jira.user.timezone_ The time zone of the user. By default, not set. The user takes the instance timezone. * + * These system preferences keys will be deprecated by 15/07/2024. You can still use these keys to create arbitrary + * preferences, but it will not have any impact on Notification behaviour. + * + * - _user.notifications.watcher_ Whether the user gets notified when they are watcher. + * - _user.notifications.assignee_ Whether the user gets notified when they are assignee. + * - _user.notifications.reporter_ Whether the user gets notified when they are reporter. + * - _user.notifications.mentions_ Whether the user gets notified when they are mentions. + * * 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 to manage timezone and locale instead. @@ -87,18 +111,26 @@ export class Myself { * following keys define system preferences that can be set or created: * * - _user.notifications.mimetype_ The mime type used in notifications sent to the user. Defaults to `html`. - * - _user.notify.own.changes_ Whether the user gets notified of their own changes. Defaults to `false`. * - _user.default.share.private_ Whether new [ filters](https://confluence.atlassian.com/x/eQiiLQ) are set to private. * Defaults to `true`. * - _user.keyboard.shortcuts.disabled_ Whether keyboard shortcuts are disabled. Defaults to `false`. * - _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. + * - _user.notifiy.own.changes_ Whether the user gets notified of their own changes. * * Note that these keys are deprecated: * * - _jira.user.locale_ The locale of the user. By default, not set. The user takes the instance locale. * - _jira.user.timezone_ The time zone of the user. By default, not set. The user takes the instance timezone. * + * These system preferences keys will be deprecated by 15/07/2024. You can still use these keys to create arbitrary + * preferences, but it will not have any impact on Notification behaviour. + * + * - _user.notifications.watcher_ Whether the user gets notified when they are watcher. + * - _user.notifications.assignee_ Whether the user gets notified when they are assignee. + * - _user.notifications.reporter_ Whether the user gets notified when they are reporter. + * - _user.notifications.mentions_ Whether the user gets notified when they are mentions. + * * 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 to manage timezone and locale instead. diff --git a/src/version3/parameters/addActorUsers.ts b/src/version3/parameters/addActorUsers.ts index 7126621c61..fb100a72ab 100644 --- a/src/version3/parameters/addActorUsers.ts +++ b/src/version3/parameters/addActorUsers.ts @@ -2,7 +2,7 @@ import { ActorsMap } from '../models'; export interface AddActorUsers extends ActorsMap { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** * 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. diff --git a/src/version3/parameters/addAtlassianTeam.ts b/src/version3/parameters/addAtlassianTeam.ts new file mode 100644 index 0000000000..78138433d5 --- /dev/null +++ b/src/version3/parameters/addAtlassianTeam.ts @@ -0,0 +1,14 @@ +export interface AddAtlassianTeam { + /** The ID of the plan. */ + planId: number; + /** The capacity for the Atlassian team. */ + capacity?: number; + /** The Atlassian team ID. */ + id: string; + /** The ID of the issue source for the Atlassian team. */ + issueSourceId?: number; + /** The planning style for the Atlassian team. This must be "Scrum" or "Kanban". */ + planningStyle: 'Scrum' | 'Kanban' | string; + /** The sprint length for the Atlassian team. */ + sprintLength?: number; +} diff --git a/src/version3/parameters/addAttachment.ts b/src/version3/parameters/addAttachment.ts index e372d3896a..d30367c879 100644 --- a/src/version3/parameters/addAttachment.ts +++ b/src/version3/parameters/addAttachment.ts @@ -1,3 +1,5 @@ +import type { Readable } from 'node:stream'; + /** * Represents an attachment to be added to an issue. * @@ -35,7 +37,7 @@ export interface Attachment { * const fileContent = fs.readFileSync('./document.pdf'); * ``` */ - file: Buffer | ReadableStream | string | Blob | File; + file: Buffer | ReadableStream | Readable | string | Blob | File; /** * Optional MIME type of the attachment. Example values include: diff --git a/src/version3/parameters/addNotifications.ts b/src/version3/parameters/addNotifications.ts new file mode 100644 index 0000000000..180d1ed1de --- /dev/null +++ b/src/version3/parameters/addNotifications.ts @@ -0,0 +1,8 @@ +import { NotificationSchemeEventDetails } from '../models'; + +export interface AddNotifications { + /** The ID of the notification scheme. */ + id: string; + /** The list of notifications which should be added to the notification scheme. */ + notificationSchemeEvents: NotificationSchemeEventDetails[]; +} diff --git a/src/version3/parameters/archivePlan.ts b/src/version3/parameters/archivePlan.ts new file mode 100644 index 0000000000..250cc9759f --- /dev/null +++ b/src/version3/parameters/archivePlan.ts @@ -0,0 +1,4 @@ +export interface ArchivePlan { + /** The ID of the plan. */ + planId: number; +} diff --git a/src/version3/parameters/archiveProject.ts b/src/version3/parameters/archiveProject.ts index 6030877bc8..21f2d1c389 100644 --- a/src/version3/parameters/archiveProject.ts +++ b/src/version3/parameters/archiveProject.ts @@ -1,4 +1,4 @@ export interface ArchiveProject { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; } diff --git a/src/version3/parameters/bulkDeleteWorklogs.ts b/src/version3/parameters/bulkDeleteWorklogs.ts new file mode 100644 index 0000000000..ed41bd5cab --- /dev/null +++ b/src/version3/parameters/bulkDeleteWorklogs.ts @@ -0,0 +1,19 @@ +import { WorklogIdsRequest } from '../models'; + +export interface BulkDeleteWorklogs extends WorklogIdsRequest { + /** The ID or key of the issue. */ + issueIdOrKey: string; + /** + * Defines how to update the issue's time estimate, the options are: + * + * - `leave` Leaves the estimate unchanged. + * - `auto` Reduces the estimate by the aggregate value of `timeSpent` across all worklogs being deleted. + */ + adjustEstimate?: 'leave' | 'auto' | string; + /** + * Whether the work log entries should be removed to the issue even if the issue is not editable, because + * jira.issue.editable set to false or missing. For example, the issue is closed. Connect and Forge app users with + * admin permission can use this flag. + */ + overrideEditableFlag?: boolean; +} diff --git a/src/version3/parameters/bulkFetchIssues.ts b/src/version3/parameters/bulkFetchIssues.ts new file mode 100644 index 0000000000..a788d59187 --- /dev/null +++ b/src/version3/parameters/bulkFetchIssues.ts @@ -0,0 +1,68 @@ +export interface BulkFetchIssues { + /** + * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#expansion) to include additional + * information about issues in the response. Note that, unlike the majority of instances where `expand` is specified, + * `expand` is defined as a list of values. The expand options are: + * + * - `renderedFields` Returns field values rendered in HTML format. + * - `names` Returns the display name of each field. + * - `schema` Returns the schema describing a field type. + * - `transitions` Returns all possible transitions for the issue. + * - `operations` Returns all possible operations for the issue. + * - `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. + */ + expand?: + | 'renderedFields' + | 'names' + | 'schema' + | 'transitions' + | 'operations' + | 'editmeta' + | 'changelog' + | 'versionedRepresentations' + | string + | ( + | 'renderedFields' + | 'names' + | 'schema' + | 'transitions' + | 'operations' + | 'editmeta' + | 'changelog' + | 'versionedRepresentations' + | string + )[]; + /** + * A list of fields to return for each issue, use it to retrieve a subset of fields. This parameter accepts a + * comma-separated list. Expand options include: + * + * - `*all` Returns all fields. + * - `*navigable` Returns navigable fields. + * - Any issue field, prefixed with a minus to exclude. + * + * The default is `*navigable`. + * + * Examples: + * - `summary,comment` Returns the summary and comments fields only. + * - `-description` Returns all navigable (default) fields except description. + * - `*all,-comment` Returns all fields except comments. + * + * Multiple `fields` parameters can be included in a request. + * + * Note: All navigable fields are returned by default. This differs from [GET + * issue](#api-rest-api-3-issue-issueIdOrKey-get) where the default is all fields. + */ + fields?: ('*all' | '*navigable' | string)[]; + /** Reference fields by their key (rather than ID). The default is `false`. */ + fieldsByKeys?: boolean; + /** An array of issue IDs or issue keys to fetch. You can mix issue IDs and keys in the same query. */ + issueIdsOrKeys: string[]; + /** + * A list of issue property keys of issue properties to be included in the results. A maximum of 5 issue property keys + * can be specified. + */ + properties?: string[]; +} diff --git a/src/version3/parameters/bulkMoveWorklogs.ts b/src/version3/parameters/bulkMoveWorklogs.ts new file mode 100644 index 0000000000..6e87b7d393 --- /dev/null +++ b/src/version3/parameters/bulkMoveWorklogs.ts @@ -0,0 +1,20 @@ +import { WorklogsMoveRequest } from '../models'; + +export interface BulkMoveWorklogs { + issueIdOrKey: string; + /** + * Defines how to update the issues' time estimate, the options are: + * + * - `leave` Leaves the estimate unchanged. + * - `auto` Reduces the estimate by the aggregate value of `timeSpent` across all worklogs being moved in the source + * issue, and increases it in the destination issue. + */ + adjustEstimate?: 'leave' | 'auto' | string; + /** + * Whether the work log entry should be moved to and from the issues even if the issues are not editable, because + * jira.issue.editable set to false or missing. For example, the issue is closed. Connect and Forge app users with + * admin permission can use this flag. + */ + overrideEditableFlag?: boolean; + worklogs: WorklogsMoveRequest; +} diff --git a/src/version3/parameters/copyDashboard.ts b/src/version3/parameters/copyDashboard.ts index 1e157d012e..905415da28 100644 --- a/src/version3/parameters/copyDashboard.ts +++ b/src/version3/parameters/copyDashboard.ts @@ -2,4 +2,9 @@ import { DashboardDetails } from '../models'; export interface CopyDashboard extends DashboardDetails { id: string; + /** + * Whether admin level permissions are used. It should only be true if the user has _Administer Jira_ [global + * permission](https://confluence.atlassian.com/x/x4dKLg) + */ + extendAdminPermissions?: boolean; } diff --git a/src/version3/parameters/countIssues.ts b/src/version3/parameters/countIssues.ts new file mode 100644 index 0000000000..527120f2a4 --- /dev/null +++ b/src/version3/parameters/countIssues.ts @@ -0,0 +1,3 @@ +import { JQLCountRequest } from '../models'; + +export interface CountIssues extends JQLCountRequest {} diff --git a/src/version3/parameters/createDashboard.ts b/src/version3/parameters/createDashboard.ts index eb78135c41..372243bbac 100644 --- a/src/version3/parameters/createDashboard.ts +++ b/src/version3/parameters/createDashboard.ts @@ -3,4 +3,9 @@ import { DashboardDetails, SharePermission } from '../models'; export interface CreateDashboard extends Omit { /** The edit permissions for the dashboard. */ editPermissions?: SharePermission[]; + /** + * Whether admin level permissions are used. It should only be true if the user has _Administer Jira_ [global + * permission](https://confluence.atlassian.com/x/x4dKLg) + */ + extendAdminPermissions?: boolean; } diff --git a/src/version3/parameters/createGroup.ts b/src/version3/parameters/createGroup.ts index 15c93233fd..f2d3dc8d71 100644 --- a/src/version3/parameters/createGroup.ts +++ b/src/version3/parameters/createGroup.ts @@ -1,5 +1,4 @@ import { AddGroup } from '../models'; -export interface CreateGroup extends AddGroup { - [key: string]: any; -} +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export type CreateGroup = AddGroup & Record; diff --git a/src/version3/parameters/createIssue.ts b/src/version3/parameters/createIssue.ts index 94849a384e..2e8786ddad 100644 --- a/src/version3/parameters/createIssue.ts +++ b/src/version3/parameters/createIssue.ts @@ -1,6 +1,5 @@ -import { - Document, IssueUpdateDetails, Project, TimeTrackingDetails, -} from '../models'; +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { Document, IssueUpdateDetails, Project, TimeTrackingDetails } from '../models'; export interface CreateIssue extends Omit { /** diff --git a/src/version3/parameters/createIssueTypeAvatar.ts b/src/version3/parameters/createIssueTypeAvatar.ts index ba645723db..b463b3f791 100644 --- a/src/version3/parameters/createIssueTypeAvatar.ts +++ b/src/version3/parameters/createIssueTypeAvatar.ts @@ -5,6 +5,12 @@ export interface CreateIssueTypeAvatar { x?: number; /** The Y coordinate of the top-left corner of the crop region. */ y?: number; - /** The length of each side of the crop region. */ - size: number; + /** + * The length of each side of the crop region. + * + * @default 0 + */ + size?: number; + mimeType: string; + avatar: Buffer | ArrayBuffer | Uint8Array; } diff --git a/src/version3/parameters/createPlan.ts b/src/version3/parameters/createPlan.ts new file mode 100644 index 0000000000..766678c054 --- /dev/null +++ b/src/version3/parameters/createPlan.ts @@ -0,0 +1,27 @@ +import { + CreateCrossProjectReleaseRequest, + CreateCustomFieldRequest, + CreateExclusionRulesRequest, + CreateIssueSourceRequest, + CreatePermissionRequest, + CreateSchedulingRequest, +} from '../models'; + +export interface CreatePlan { + /** Whether to accept group IDs instead of group names. Group names are deprecated. */ + useGroupId?: boolean; + /** The cross-project releases to include in the plan. */ + crossProjectReleases?: CreateCrossProjectReleaseRequest[]; + /** The custom fields for the plan. */ + customFields?: CreateCustomFieldRequest[]; + exclusionRules?: CreateExclusionRulesRequest; + /** The issue sources to include in the plan. */ + issueSources: CreateIssueSourceRequest[]; + /** The account ID of the plan lead. */ + leadAccountId?: string; + /** The plan name. */ + name: string; + /** The permissions for the plan. */ + permissions?: CreatePermissionRequest[]; + scheduling?: CreateSchedulingRequest; +} diff --git a/src/version3/parameters/createPlanOnlyTeam.ts b/src/version3/parameters/createPlanOnlyTeam.ts new file mode 100644 index 0000000000..838dcf07b3 --- /dev/null +++ b/src/version3/parameters/createPlanOnlyTeam.ts @@ -0,0 +1,16 @@ +export interface CreatePlanOnlyTeam { + /** The ID of the plan. */ + planId: number; + /** The capacity for the plan-only team. */ + capacity?: number; + /** The ID of the issue source for the plan-only team. */ + issueSourceId?: number; + /** The account IDs of the plan-only team members. */ + memberAccountIds?: string[]; + /** The plan-only team name. */ + name: string; + /** The planning style for the plan-only team. This must be "Scrum" or "Kanban". */ + planningStyle: 'Scrum' | 'Kanban' | string; + /** The sprint length for the plan-only team. */ + sprintLength?: number; +} diff --git a/src/version3/parameters/createPriorityScheme.ts b/src/version3/parameters/createPriorityScheme.ts new file mode 100644 index 0000000000..22e1347c9f --- /dev/null +++ b/src/version3/parameters/createPriorityScheme.ts @@ -0,0 +1,16 @@ +import { PriorityMapping } from '../models'; + +/** Details of a new priority scheme */ +export interface CreatePriorityScheme { + /** The ID of the default priority for the priority scheme. */ + defaultPriorityId: number; + /** The description of the priority scheme. */ + description?: string; + mappings?: PriorityMapping; + /** The name of the priority scheme. Must be unique. */ + name: string; + /** The IDs of priorities in the scheme. */ + priorityIds: number[]; + /** The IDs of projects that will use the priority scheme. */ + projectIds?: number[]; +} diff --git a/src/version3/parameters/createProjectAvatar.ts b/src/version3/parameters/createProjectAvatar.ts index cbc3eebfe5..db9f3f45a8 100644 --- a/src/version3/parameters/createProjectAvatar.ts +++ b/src/version3/parameters/createProjectAvatar.ts @@ -1,11 +1,16 @@ export interface CreateProjectAvatar { /** The ID or (case-sensitive) key of the project. */ - projectIdOrKey: string; - avatar: any; + projectIdOrKey: string | number; /** The X coordinate of the top-left corner of the crop region. */ x?: number; /** The Y coordinate of the top-left corner of the crop region. */ y?: number; - /** The length of each side of the crop region. */ + /** + * The length of each side of the crop region. + * + * @default 0 + */ size?: number; + mimeType: string; + avatar: Buffer | ArrayBuffer | Uint8Array; } diff --git a/src/version3/parameters/createRelatedWork.ts b/src/version3/parameters/createRelatedWork.ts new file mode 100644 index 0000000000..e3c0616741 --- /dev/null +++ b/src/version3/parameters/createRelatedWork.ts @@ -0,0 +1,5 @@ +import { VersionRelatedWork } from '../models'; + +export interface CreateRelatedWork extends VersionRelatedWork { + id: string; +} diff --git a/src/version3/parameters/createResolution.ts b/src/version3/parameters/createResolution.ts index 05bb71a11a..b57c766069 100644 --- a/src/version3/parameters/createResolution.ts +++ b/src/version3/parameters/createResolution.ts @@ -1,5 +1,4 @@ import { CreateResolutionDetails } from '../models'; -export interface CreateResolution extends CreateResolutionDetails { - [key: string]: any; -} +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export type CreateResolution = CreateResolutionDetails & Record; diff --git a/src/version3/parameters/createWorkflows.ts b/src/version3/parameters/createWorkflows.ts new file mode 100644 index 0000000000..945aa45f09 --- /dev/null +++ b/src/version3/parameters/createWorkflows.ts @@ -0,0 +1,3 @@ +import { WorkflowCreateRequest } from '../models'; + +export interface CreateWorkflows extends WorkflowCreateRequest {} diff --git a/src/version3/parameters/deleteActor.ts b/src/version3/parameters/deleteActor.ts index bf6b85f5e5..68f1f9aac3 100644 --- a/src/version3/parameters/deleteActor.ts +++ b/src/version3/parameters/deleteActor.ts @@ -1,6 +1,6 @@ export interface DeleteActor { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** * 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. diff --git a/src/version3/parameters/deleteComment.ts b/src/version3/parameters/deleteComment.ts index a06ad01e85..5050950ed1 100644 --- a/src/version3/parameters/deleteComment.ts +++ b/src/version3/parameters/deleteComment.ts @@ -3,4 +3,5 @@ export interface DeleteComment { issueIdOrKey: string; /** The ID of the comment. */ id: string; + parentId?: string; } diff --git a/src/version3/parameters/deletePlanOnlyTeam.ts b/src/version3/parameters/deletePlanOnlyTeam.ts new file mode 100644 index 0000000000..d87ea6bd4b --- /dev/null +++ b/src/version3/parameters/deletePlanOnlyTeam.ts @@ -0,0 +1,6 @@ +export interface DeletePlanOnlyTeam { + /** The ID of the plan. */ + planId: number; + /** The ID of the plan-only team. */ + planOnlyTeamId: number; +} diff --git a/src/version3/parameters/deletePriority.ts b/src/version3/parameters/deletePriority.ts new file mode 100644 index 0000000000..224cd5fc3d --- /dev/null +++ b/src/version3/parameters/deletePriority.ts @@ -0,0 +1,4 @@ +export interface DeletePriority { + /** The ID of the issue priority. */ + id: string; +} diff --git a/src/version3/parameters/deletePriorityScheme.ts b/src/version3/parameters/deletePriorityScheme.ts new file mode 100644 index 0000000000..3ac3ff970c --- /dev/null +++ b/src/version3/parameters/deletePriorityScheme.ts @@ -0,0 +1,4 @@ +export interface DeletePriorityScheme { + /** The priority scheme ID. */ + schemeId: number; +} diff --git a/src/version3/parameters/deleteProject.ts b/src/version3/parameters/deleteProject.ts index 618778ed43..41bb57bb4c 100644 --- a/src/version3/parameters/deleteProject.ts +++ b/src/version3/parameters/deleteProject.ts @@ -1,6 +1,6 @@ export interface DeleteProject { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** Whether this project is placed in the Jira recycle bin where it will be available for restoration. */ enableUndo?: boolean; } diff --git a/src/version3/parameters/deleteProjectAsynchronously.ts b/src/version3/parameters/deleteProjectAsynchronously.ts index 0c86e1e714..713570ef41 100644 --- a/src/version3/parameters/deleteProjectAsynchronously.ts +++ b/src/version3/parameters/deleteProjectAsynchronously.ts @@ -1,4 +1,4 @@ export interface DeleteProjectAsynchronously { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; } diff --git a/src/version3/parameters/deleteProjectAvatar.ts b/src/version3/parameters/deleteProjectAvatar.ts index db737d25af..78d2ed7859 100644 --- a/src/version3/parameters/deleteProjectAvatar.ts +++ b/src/version3/parameters/deleteProjectAvatar.ts @@ -1,6 +1,6 @@ export interface DeleteProjectAvatar { /** The project ID or (case-sensitive) key. */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** The ID of the avatar. */ id: number; } diff --git a/src/version3/parameters/deleteProjectProperty.ts b/src/version3/parameters/deleteProjectProperty.ts index 98b8d7be6b..3a66f9b52e 100644 --- a/src/version3/parameters/deleteProjectProperty.ts +++ b/src/version3/parameters/deleteProjectProperty.ts @@ -1,6 +1,6 @@ export interface DeleteProjectProperty { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** * The project property key. Use [Get project property keys](#api-rest-api-3-project-projectIdOrKey-properties-get) to * get a list of all project property keys. diff --git a/src/version3/parameters/deleteRelatedWork.ts b/src/version3/parameters/deleteRelatedWork.ts new file mode 100644 index 0000000000..2980e8f2e5 --- /dev/null +++ b/src/version3/parameters/deleteRelatedWork.ts @@ -0,0 +1,6 @@ +export interface DeleteRelatedWork { + /** The ID of the version that the target related work belongs to. */ + versionId: string; + /** The ID of the related work to delete. */ + relatedWorkId: string; +} diff --git a/src/version3/parameters/duplicatePlan.ts b/src/version3/parameters/duplicatePlan.ts new file mode 100644 index 0000000000..d154609f4e --- /dev/null +++ b/src/version3/parameters/duplicatePlan.ts @@ -0,0 +1,6 @@ +export interface DuplicatePlan { + /** The ID of the plan. */ + planId: number; + /** The plan name. */ + name: string; +} diff --git a/src/version3/parameters/evaluateJiraExpression.ts b/src/version3/parameters/evaluateJiraExpression.ts index db2c0c0e08..41d800cb6b 100644 --- a/src/version3/parameters/evaluateJiraExpression.ts +++ b/src/version3/parameters/evaluateJiraExpression.ts @@ -9,5 +9,5 @@ export interface EvaluateJiraExpression extends JiraExpressionEvalRequest { * limit](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/#restrictions). Useful when designing * and debugging your expressions. */ - expand?: string; + expand?: 'meta.complexity' | string; } diff --git a/src/version3/parameters/evaluateJiraExpressionUsingEnhancedSearch.ts b/src/version3/parameters/evaluateJiraExpressionUsingEnhancedSearch.ts new file mode 100644 index 0000000000..bad34f2b01 --- /dev/null +++ b/src/version3/parameters/evaluateJiraExpressionUsingEnhancedSearch.ts @@ -0,0 +1,13 @@ +import { JiraExpressionEvalUsingEnhancedSearchRequest } from '../models'; + +export interface EvaluateJiraExpressionUsingEnhancedSearch extends JiraExpressionEvalUsingEnhancedSearchRequest { + /** + * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#expansion) to include additional + * information in the response. This parameter accepts `meta.complexity` that returns information about the expression + * complexity. For example, the number of expensive operations used by the expression and how close the expression is + * to reaching the [complexity + * limit](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/#restrictions). Useful when designing + * and debugging your expressions. + */ + expand?: string; +} diff --git a/src/version3/parameters/findAssignableUsers.ts b/src/version3/parameters/findAssignableUsers.ts index 54f9e3a09f..3ebba3dce7 100644 --- a/src/version3/parameters/findAssignableUsers.ts +++ b/src/version3/parameters/findAssignableUsers.ts @@ -16,10 +16,12 @@ export interface FindAssignableUsers { username?: string; /** A query string that is matched exactly against user `accountId`. Required, unless `query` is specified. */ accountId?: string; - /** The project ID or project key (case sensitive). Required, unless `issueKey` is specified. */ + /** The project ID or project key (case sensitive). Required, unless `issueKey` or `issueId` is specified. */ project?: string; - /** The key of the issue. Required, unless `project` is specified. */ + /** The key of the issue. Required, unless `issueId` or `project` is specified. */ issueKey?: string; + /** The ID of the issue. Required, unless `issueKey` or `project` is specified. */ + issueId?: string; /** The index of the first item to return in a page of results (page offset). */ startAt?: number; /** diff --git a/src/version3/parameters/findComponentsForProjects.ts b/src/version3/parameters/findComponentsForProjects.ts new file mode 100644 index 0000000000..75a1ceff8b --- /dev/null +++ b/src/version3/parameters/findComponentsForProjects.ts @@ -0,0 +1,20 @@ +export interface FindComponentsForProjects { + /** The project IDs and/or project keys (case sensitive). */ + projectIdsOrKeys?: string[]; + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** + * [Order](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#ordering) the results by a field: + * + * - `description` Sorts by the component description. + * - `name` Sorts by component name. + */ + orderBy?: 'description' | '-description' | '+description' | 'name' | '-name' | '+name' | string; + /** + * Filter the results using a literal string. Components with a matching `name` or `description` are returned (case + * insensitive). + */ + query?: string; +} diff --git a/src/version3/parameters/findUserKeysByQuery.ts b/src/version3/parameters/findUserKeysByQuery.ts index 14b12d1fd0..b6c92aef83 100644 --- a/src/version3/parameters/findUserKeysByQuery.ts +++ b/src/version3/parameters/findUserKeysByQuery.ts @@ -3,6 +3,12 @@ export interface FindUserKeysByQuery { query: string; /** The index of the first item to return in a page of results (page offset). */ startAt?: number; - /** The maximum number of items to return per page. */ + /** + * The maximum number of items to return per page. + * + * @deprecated Use `maxResult` instead. + */ maxResults?: number; + /** The maximum number of items to return per page. */ + maxResult?: number; } diff --git a/src/version3/parameters/findUsersForPicker.ts b/src/version3/parameters/findUsersForPicker.ts index b5eb7749a2..18cb99f7ae 100644 --- a/src/version3/parameters/findUsersForPicker.ts +++ b/src/version3/parameters/findUsersForPicker.ts @@ -13,7 +13,6 @@ export interface FindUsersForPicker { * A list of account IDs to exclude from the search results. This parameter accepts a comma-separated list. Multiple * account IDs can also be provided using an ampersand-separated list. For example, * `excludeAccountIds=5b10a2844c20165700ede21g,5b10a0effa615349cb016cd8&excludeAccountIds=5b10ac8d82e05b22cc7d4ef5`. - * Cannot be provided with `exclude`. */ excludeAccountIds?: string[]; avatarSize?: string; diff --git a/src/version3/parameters/getAllProjectAvatars.ts b/src/version3/parameters/getAllProjectAvatars.ts index ba78677a9f..ed47d2ffff 100644 --- a/src/version3/parameters/getAllProjectAvatars.ts +++ b/src/version3/parameters/getAllProjectAvatars.ts @@ -1,4 +1,4 @@ export interface GetAllProjectAvatars { /** The ID or (case-sensitive) key of the project. */ - projectIdOrKey: string; + projectIdOrKey: string | number; } diff --git a/src/version3/parameters/getAllStatuses.ts b/src/version3/parameters/getAllStatuses.ts index c82be96267..c10d765625 100644 --- a/src/version3/parameters/getAllStatuses.ts +++ b/src/version3/parameters/getAllStatuses.ts @@ -1,4 +1,4 @@ export interface GetAllStatuses { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; } diff --git a/src/version3/parameters/getAllUserDataClassificationLevels.ts b/src/version3/parameters/getAllUserDataClassificationLevels.ts new file mode 100644 index 0000000000..eb477fbdde --- /dev/null +++ b/src/version3/parameters/getAllUserDataClassificationLevels.ts @@ -0,0 +1,6 @@ +export interface GetAllUserDataClassificationLevels { + /** Optional set of statuses to filter by. */ + status?: ('PUBLISHED' | 'ARCHIVED' | 'DRAFT' | string)[]; + /** Ordering of the results by a given field. If not provided, values will not be sorted. */ + orderBy?: 'rank' | '-rank' | '+rank' | string; +} diff --git a/src/version3/parameters/getAtlassianTeam.ts b/src/version3/parameters/getAtlassianTeam.ts new file mode 100644 index 0000000000..b3bc42a2b5 --- /dev/null +++ b/src/version3/parameters/getAtlassianTeam.ts @@ -0,0 +1,6 @@ +export interface GetAtlassianTeam { + /** The ID of the plan. */ + planId: number; + /** The ID of the Atlassian team. */ + atlassianTeamId: string; +} diff --git a/src/version3/parameters/getAvailablePrioritiesByPriorityScheme.ts b/src/version3/parameters/getAvailablePrioritiesByPriorityScheme.ts new file mode 100644 index 0000000000..da7ba318f6 --- /dev/null +++ b/src/version3/parameters/getAvailablePrioritiesByPriorityScheme.ts @@ -0,0 +1,12 @@ +export interface GetAvailablePrioritiesByPriorityScheme { + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** The string to query priorities on by name. */ + query?: string; + /** The priority scheme ID. */ + schemeId: string; + /** A list of priority IDs to exclude from the results. */ + exclude?: string[]; +} diff --git a/src/version3/parameters/getAvailableTransitions.ts b/src/version3/parameters/getAvailableTransitions.ts new file mode 100644 index 0000000000..8409ca4d6d --- /dev/null +++ b/src/version3/parameters/getAvailableTransitions.ts @@ -0,0 +1,8 @@ +export interface GetAvailableTransitions { + /** Ids or keys of the issues to get transitions available for them. */ + issueIdsOrKeys: string[]; + /** The end cursor for use in pagination. */ + endingBefore?: string; + /** The start cursor for use in pagination. */ + startingAfter?: string; +} diff --git a/src/version3/parameters/getAvatars.ts b/src/version3/parameters/getAvatars.ts index 94f9acecf2..aa4d2b86be 100644 --- a/src/version3/parameters/getAvatars.ts +++ b/src/version3/parameters/getAvatars.ts @@ -2,5 +2,5 @@ export interface GetAvatars { /** The avatar type. */ type: 'project' | 'issuetype' | string; /** The ID of the item the avatar is associated with. */ - entityId: string; + entityId: number | string; } diff --git a/src/version3/parameters/getBulkChangelogs.ts b/src/version3/parameters/getBulkChangelogs.ts new file mode 100644 index 0000000000..fefc8eb77f --- /dev/null +++ b/src/version3/parameters/getBulkChangelogs.ts @@ -0,0 +1,3 @@ +import { BulkChangelogRequest } from '../models'; + +export interface GetBulkChangelogs extends BulkChangelogRequest {} diff --git a/src/version3/parameters/getBulkEditableFields.ts b/src/version3/parameters/getBulkEditableFields.ts new file mode 100644 index 0000000000..3d218dc716 --- /dev/null +++ b/src/version3/parameters/getBulkEditableFields.ts @@ -0,0 +1,10 @@ +export interface GetBulkEditableFields { + /** The IDs or keys of the issues to get editable fields from. */ + issueIdsOrKeys: string; + /** (Optional)The text to search for in the editable fields. */ + searchText?: string; + /** (Optional)The end cursor for use in pagination. */ + endingBefore?: string; + /** (Optional)The start cursor for use in pagination. */ + startingAfter?: string; +} diff --git a/src/version3/parameters/getBulkOperationProgress.ts b/src/version3/parameters/getBulkOperationProgress.ts new file mode 100644 index 0000000000..976c68799c --- /dev/null +++ b/src/version3/parameters/getBulkOperationProgress.ts @@ -0,0 +1,4 @@ +export interface GetBulkOperationProgress { + /** The ID of the task. */ + taskId: string; +} diff --git a/src/version3/parameters/getBulkScreenTabs.ts b/src/version3/parameters/getBulkScreenTabs.ts new file mode 100644 index 0000000000..6f8227f85a --- /dev/null +++ b/src/version3/parameters/getBulkScreenTabs.ts @@ -0,0 +1,16 @@ +export interface GetBulkScreenTabs { + /** + * The list of screen IDs. To include multiple screen IDs, provide an ampersand-separated list. For example, + * `screenId=10000&screenId=10001`. + */ + screenId?: number[]; + /** + * The list of tab IDs. To include multiple tab IDs, provide an ampersand-separated list. For example, + * `tabId=10000&tabId=10001`. + */ + tabId?: number[]; + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. The maximum number is 100, */ + maxResult?: number; +} diff --git a/src/version3/parameters/getCreateIssueMetaIssueTypeId.ts b/src/version3/parameters/getCreateIssueMetaIssueTypeId.ts new file mode 100644 index 0000000000..6195fc1f49 --- /dev/null +++ b/src/version3/parameters/getCreateIssueMetaIssueTypeId.ts @@ -0,0 +1,10 @@ +export interface GetCreateIssueMetaIssueTypeId { + /** The ID or key of the project. */ + projectIdOrKey: string; + /** The issuetype ID. */ + issueTypeId: string; + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; +} diff --git a/src/version3/parameters/getCreateIssueMetaIssueTypes.ts b/src/version3/parameters/getCreateIssueMetaIssueTypes.ts new file mode 100644 index 0000000000..dc20e141b5 --- /dev/null +++ b/src/version3/parameters/getCreateIssueMetaIssueTypes.ts @@ -0,0 +1,8 @@ +export interface GetCreateIssueMetaIssueTypes { + /** The ID or key of the project. */ + projectIdOrKey: string; + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; +} diff --git a/src/version3/parameters/getCustomFieldsConfigurations.ts b/src/version3/parameters/getCustomFieldsConfigurations.ts new file mode 100644 index 0000000000..7039e4b8ba --- /dev/null +++ b/src/version3/parameters/getCustomFieldsConfigurations.ts @@ -0,0 +1,34 @@ +import { ConfigurationsListParameters } from '../models'; + +export interface GetCustomFieldsConfigurations extends ConfigurationsListParameters { + /** + * The list of configuration IDs. To include multiple configurations, separate IDs with an ampersand: + * `id=10000&id=10001`. Can't be provided with `fieldContextId`, `issueId`, `projectKeyOrId`, or `issueTypeId`. + */ + id?: number[]; + /** + * The list of field context IDs. To include multiple field contexts, separate IDs with an ampersand: + * `fieldContextId=10000&fieldContextId=10001`. Can't be provided with `id`, `issueId`, `projectKeyOrId`, or + * `issueTypeId`. + */ + fieldContextId?: number[]; + /** + * The ID of the issue to filter results by. If the issue doesn't exist, an empty list is returned. Can't be provided + * with `projectKeyOrId`, or `issueTypeId`. + */ + issueId?: number; + /** + * The ID or key of the project to filter results by. Must be provided with `issueTypeId`. Can't be provided with + * `issueId`. + */ + projectKeyOrId?: string; + /** + * The ID of the issue type to filter results by. Must be provided with `projectKeyOrId`. Can't be provided with + * `issueId`. + */ + issueTypeId?: string; + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; +} diff --git a/src/version3/parameters/getDashboardsPaginated.ts b/src/version3/parameters/getDashboardsPaginated.ts index bfa724cc85..981d408ce4 100644 --- a/src/version3/parameters/getDashboardsPaginated.ts +++ b/src/version3/parameters/getDashboardsPaginated.ts @@ -88,7 +88,7 @@ export interface GetDashboardsPaginated { | 'sharePermissions' | 'editPermissions' | 'isWritable' - )[] + )[] | string | string[]; } diff --git a/src/version3/parameters/getDefaultProjectClassification.ts b/src/version3/parameters/getDefaultProjectClassification.ts new file mode 100644 index 0000000000..cf8683da7a --- /dev/null +++ b/src/version3/parameters/getDefaultProjectClassification.ts @@ -0,0 +1,4 @@ +export interface GetDefaultProjectClassification { + /** The project ID or project key (case-sensitive). */ + projectIdOrKey: string; +} diff --git a/src/version3/parameters/getFeaturesForProject.ts b/src/version3/parameters/getFeaturesForProject.ts index 81902eb044..0e1567cd84 100644 --- a/src/version3/parameters/getFeaturesForProject.ts +++ b/src/version3/parameters/getFeaturesForProject.ts @@ -1,4 +1,4 @@ export interface GetFeaturesForProject { /** The ID or (case-sensitive) key of the project. */ - projectIdOrKey: string; + projectIdOrKey: string | number; } diff --git a/src/version3/parameters/getFieldConfigurationSchemeProjectMapping.ts b/src/version3/parameters/getFieldConfigurationSchemeProjectMapping.ts index fc16570b25..2bbc23e7ab 100644 --- a/src/version3/parameters/getFieldConfigurationSchemeProjectMapping.ts +++ b/src/version3/parameters/getFieldConfigurationSchemeProjectMapping.ts @@ -7,5 +7,5 @@ export interface GetFieldConfigurationSchemeProjectMapping { * The list of project IDs. To include multiple projects, separate IDs with ampersand: * `projectId=10000&projectId=10001`. */ - projectId: number[]; + projectId: (string | number)[]; } diff --git a/src/version3/parameters/getFiltersPaginated.ts b/src/version3/parameters/getFiltersPaginated.ts index f60612cb52..83c95d6098 100644 --- a/src/version3/parameters/getFiltersPaginated.ts +++ b/src/version3/parameters/getFiltersPaginated.ts @@ -76,6 +76,7 @@ export interface GetFiltersPaginated { * - `sharePermissions` Returns the share permissions defined for the filter. * - `editPermissions` Returns the edit permissions defined for the filter. * - `isWritable` Returns whether the current user has permission to edit the filter. + * - `approximateLastUsed` [Experimental] Returns the approximate date and time when the filter was last evaluated. * - `subscriptions` Returns the users that are subscribed to the filter. * - `viewUrl` Returns a URL to view the filter. */ @@ -89,6 +90,7 @@ export interface GetFiltersPaginated { | 'sharePermissions' | 'editPermissions' | 'isWritable' + | 'approximateLastUsed' | 'subscriptions' | 'viewUrl' | ( @@ -101,14 +103,21 @@ export interface GetFiltersPaginated { | 'sharePermissions' | 'editPermissions' | 'isWritable' + | 'approximateLastUsed' | 'subscriptions' | 'viewUrl' - )[] + )[] | string | string[]; /** - * EXPERIMENTAL: Whether share permissions are overridden to enable filters with any share permissions to be returned. + * @experimental EXPERIMENTAL: Whether share permissions are overridden to enable filters with any share permissions to be returned. * Available to users with _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ overrideSharePermissions?: boolean; + /** + * When `true` this will perform a case-insensitive substring match for the provided `filterName`. When `false` the + * filter name will be searched using [full text search + * syntax](https://support.atlassian.com/jira-software-cloud/docs/search-for-issues-using-the-text-field/). + */ + isSubstringMatch?: boolean; } diff --git a/src/version3/parameters/getHierarchy.ts b/src/version3/parameters/getHierarchy.ts index 2ea2e76b1e..ee2ae8c627 100644 --- a/src/version3/parameters/getHierarchy.ts +++ b/src/version3/parameters/getHierarchy.ts @@ -1,4 +1,4 @@ export interface GetHierarchy { /** The ID of the project. */ - projectId: number; + projectId: string | number; } diff --git a/src/version3/parameters/getIssue.ts b/src/version3/parameters/getIssue.ts index a85fabe0e4..bee085dd79 100644 --- a/src/version3/parameters/getIssue.ts +++ b/src/version3/parameters/getIssue.ts @@ -69,4 +69,10 @@ export interface GetIssue { * field. */ updateHistory?: boolean; + /** + * Whether to fail the request quickly in case of an error while loading fields for an issue. For `failFast=true`, if + * one field fails, the entire operation fails. For `failFast=false`, the operation will continue even if a field + * fails. It will return a valid response, but without values for the failed field(s). + */ + failFast?: boolean; } diff --git a/src/version3/parameters/getIssueLimitReport.ts b/src/version3/parameters/getIssueLimitReport.ts new file mode 100644 index 0000000000..70ea82a306 --- /dev/null +++ b/src/version3/parameters/getIssueLimitReport.ts @@ -0,0 +1,34 @@ +export interface GetIssueLimitReport { + /** Return issue keys instead of issue ids in the response. */ + isReturningKeys?: boolean; + /** + * A list of fields and their respective approaching limit threshold. Required for querying issues approaching limits. + * Optional for querying issues breaching limits. Accepted fields are: + * + * - `comment` + * - `worklog` + * - `attachment` + * - `remoteIssueLinks`, + * - `issuelinks`. + * + * @example + * { + * "issuesApproachingLimitParams": { + * "comment": 4500, + * "attachment": 1800 + * } + * } + */ + issuesApproachingLimitParams?: { + /** The limit for the number of comments. */ + comment?: number; + /** The limit for the number of worklogs. */ + worklog?: number; + /** The limit for the number of attachments. */ + attachment?: number; + /** The limit for the number of remote issue links. */ + remoteIssueLinks?: number; + /** The limit for the number of issue links. */ + issuelinks?: number; + }; +} diff --git a/src/version3/parameters/getIssueTypeSchemeForProjects.ts b/src/version3/parameters/getIssueTypeSchemeForProjects.ts index 80a6339149..aaf455ca82 100644 --- a/src/version3/parameters/getIssueTypeSchemeForProjects.ts +++ b/src/version3/parameters/getIssueTypeSchemeForProjects.ts @@ -7,5 +7,5 @@ export interface GetIssueTypeSchemeForProjects { * The list of project IDs. To include multiple project IDs, provide an ampersand-separated list. For example, * `projectId=10000&projectId=10001`. */ - projectId: number[]; + projectId: (string | number)[]; } diff --git a/src/version3/parameters/getIssueTypeScreenSchemeProjectAssociations.ts b/src/version3/parameters/getIssueTypeScreenSchemeProjectAssociations.ts index 401790f9d7..82ac3fabdc 100644 --- a/src/version3/parameters/getIssueTypeScreenSchemeProjectAssociations.ts +++ b/src/version3/parameters/getIssueTypeScreenSchemeProjectAssociations.ts @@ -7,5 +7,5 @@ export interface GetIssueTypeScreenSchemeProjectAssociations { * The list of project IDs. To include multiple projects, separate IDs with ampersand: * `projectId=10000&projectId=10001`. */ - projectId: number[]; + projectId: (string | number)[]; } diff --git a/src/version3/parameters/getIssueTypesForProject.ts b/src/version3/parameters/getIssueTypesForProject.ts index 11d1f2e25a..b06312da99 100644 --- a/src/version3/parameters/getIssueTypesForProject.ts +++ b/src/version3/parameters/getIssueTypesForProject.ts @@ -1,6 +1,6 @@ export interface GetIssueTypesForProject { /** The ID of the project. */ - projectId: number; + projectId: string | number; /** * The level of the issue type to filter by. Use: * diff --git a/src/version3/parameters/getNotificationSchemeForProject.ts b/src/version3/parameters/getNotificationSchemeForProject.ts new file mode 100644 index 0000000000..8d0d14f85c --- /dev/null +++ b/src/version3/parameters/getNotificationSchemeForProject.ts @@ -0,0 +1,26 @@ +export interface GetNotificationSchemeForProject { + /** The project ID or project key (case sensitive). */ + projectKeyOrId: string; + /** + * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#expansion) to include additional + * information in the response. This parameter accepts a comma-separated list. Expand options include: + * + * - `all` Returns all expandable information + * - `field` Returns information about any custom fields assigned to receive an event + * - `group` Returns information about any groups assigned to receive an event + * - `notificationSchemeEvents` Returns a list of event associations. This list is returned for all expandable + * information + * - `projectRole` Returns information about any project roles assigned to receive an event + * - `user` Returns information about any users assigned to receive an event + */ + expand?: + | 'all' + | 'field' + | 'group' + | 'notificationSchemeEvents' + | 'projectRole' + | 'user' + | ('all' | 'field' | 'group' | 'notificationSchemeEvents' | 'projectRole' | 'user')[] + | string + | string[]; +} diff --git a/src/version3/parameters/getNotificationSchemeToProjectMappings.ts b/src/version3/parameters/getNotificationSchemeToProjectMappings.ts index 34cfec0e7b..bfb504e6e2 100644 --- a/src/version3/parameters/getNotificationSchemeToProjectMappings.ts +++ b/src/version3/parameters/getNotificationSchemeToProjectMappings.ts @@ -1,8 +1,8 @@ export interface GetNotificationSchemeToProjectMappings { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** The list of notifications scheme IDs to be filtered out */ notificationSchemeId?: string[]; /** The list of project IDs to be filtered out */ diff --git a/src/version3/parameters/getPlan.ts b/src/version3/parameters/getPlan.ts new file mode 100644 index 0000000000..9ed1b0df18 --- /dev/null +++ b/src/version3/parameters/getPlan.ts @@ -0,0 +1,6 @@ +export interface GetPlan { + /** The ID of the plan. */ + planId: number; + /** Whether to return group IDs instead of group names. Group names are deprecated. */ + useGroupId?: boolean; +} diff --git a/src/version3/parameters/getPlanOnlyTeam.ts b/src/version3/parameters/getPlanOnlyTeam.ts new file mode 100644 index 0000000000..f48b73a426 --- /dev/null +++ b/src/version3/parameters/getPlanOnlyTeam.ts @@ -0,0 +1,6 @@ +export interface GetPlanOnlyTeam { + /** The ID of the plan. */ + planId: number; + /** The ID of the plan-only team. */ + planOnlyTeamId: number; +} diff --git a/src/version3/parameters/getPlans.ts b/src/version3/parameters/getPlans.ts new file mode 100644 index 0000000000..2633d4c9e8 --- /dev/null +++ b/src/version3/parameters/getPlans.ts @@ -0,0 +1,10 @@ +export interface GetPlans { + /** Whether to include trashed plans in the results. */ + includeTrashed?: boolean; + /** Whether to include archived plans in the results. */ + includeArchived?: boolean; + /** The cursor to start from. If not provided, the first page will be returned. */ + cursor?: string; + /** The maximum number of plans to return per page. The maximum value is 50. The default value is 50. */ + maxResults?: number; +} diff --git a/src/version3/parameters/getPolicies.ts b/src/version3/parameters/getPolicies.ts new file mode 100644 index 0000000000..dd996402d6 --- /dev/null +++ b/src/version3/parameters/getPolicies.ts @@ -0,0 +1,4 @@ +export interface GetPolicies { + /** A list of project identifiers. This parameter accepts a comma-separated list. */ + ids: string | string[]; +} diff --git a/src/version3/parameters/getPrecomputations.ts b/src/version3/parameters/getPrecomputations.ts index b20400335f..f797eda7eb 100644 --- a/src/version3/parameters/getPrecomputations.ts +++ b/src/version3/parameters/getPrecomputations.ts @@ -32,5 +32,6 @@ export interface GetPrecomputations { | '-created' | '-updated' | string; + /** @deprecated This property is no longer used. */ filter?: string; } diff --git a/src/version3/parameters/getPrecomputationsByID.ts b/src/version3/parameters/getPrecomputationsByID.ts new file mode 100644 index 0000000000..d663a1027c --- /dev/null +++ b/src/version3/parameters/getPrecomputationsByID.ts @@ -0,0 +1,28 @@ +import { JqlFunctionPrecomputationGetByIdRequest } from '../models'; + +export interface GetPrecomputationsByID extends JqlFunctionPrecomputationGetByIdRequest { + /** + * [Order](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#ordering) the results by a field: + * + * - `functionKey` Sorts by the functionKey. + * - `used` Sorts by the used timestamp. + * - `created` Sorts by the created timestamp. + * - `updated` Sorts by the updated timestamp. + * + * You can also use `+` or `-` prefixes to specify ascending or descending order (e.g., `+functionKey`, `-used`). + */ + orderBy?: + | 'functionKey' + | 'used' + | 'created' + | 'updated' + | '+functionKey' + | '+used' + | '+created' + | '+updated' + | '-functionKey' + | '-used' + | '-created' + | '-updated' + | string; +} diff --git a/src/version3/parameters/getPrioritiesByPriorityScheme.ts b/src/version3/parameters/getPrioritiesByPriorityScheme.ts new file mode 100644 index 0000000000..6cd7fcedac --- /dev/null +++ b/src/version3/parameters/getPrioritiesByPriorityScheme.ts @@ -0,0 +1,8 @@ +export interface GetPrioritiesByPriorityScheme { + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** The priority scheme ID. */ + schemeId: string; +} diff --git a/src/version3/parameters/getPrioritySchemes.ts b/src/version3/parameters/getPrioritySchemes.ts new file mode 100644 index 0000000000..bb87151030 --- /dev/null +++ b/src/version3/parameters/getPrioritySchemes.ts @@ -0,0 +1,32 @@ +export interface GetPrioritySchemes { + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** + * A set of priority IDs to filter by. To include multiple IDs, provide an ampersand-separated list. For example, + * `priorityId=10000&priorityId=10001`. + */ + priorityId?: number[]; + /** + * A set of priority scheme IDs. To include multiple IDs, provide an ampersand-separated list. For example, + * `schemeId=10000&schemeId=10001`. + */ + schemeId?: number[]; + /** The name of scheme to search for. */ + schemeName?: string; + /** Whether only the default priority is returned. */ + onlyDefault?: boolean; + /** The ordering to return the priority schemes by. */ + orderBy?: 'name' | '+name' | '-name' | string; + /** + * A comma separated list of additional information to return. + * + * - `priorities` will return priorities associated with the priority scheme. + * - `projects` will return projects associated with the priority scheme. + * + * @example + * expand: ['priorities', 'projects']. + */ + expand?: 'priorities' | 'projects' | ('priorities' | 'projects')[] | string | string[]; +} diff --git a/src/version3/parameters/getProjectComponents.ts b/src/version3/parameters/getProjectComponents.ts index 4bdde93bb0..aa6eb075c5 100644 --- a/src/version3/parameters/getProjectComponents.ts +++ b/src/version3/parameters/getProjectComponents.ts @@ -1,4 +1,12 @@ export interface GetProjectComponents { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; + /** + * The source of the components to return. Can be `jira` (default), `compass` or `auto`. When `auto` is specified, the + * API will return connected Compass components if the project is opted into Compass, otherwise it will return Jira + * components. Defaults to `jira`. + * + * @default jira + */ + componentSource?: 'jira' | 'compass' | 'auto' | string; } diff --git a/src/version3/parameters/getProjectComponentsPaginated.ts b/src/version3/parameters/getProjectComponentsPaginated.ts index d8b222a6f6..5f6ebda9ec 100644 --- a/src/version3/parameters/getProjectComponentsPaginated.ts +++ b/src/version3/parameters/getProjectComponentsPaginated.ts @@ -1,6 +1,6 @@ export interface GetProjectComponentsPaginated { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** The index of the first item to return in a page of results (page offset). */ startAt?: number; /** The maximum number of items to return per page. */ @@ -32,4 +32,12 @@ export interface GetProjectComponentsPaginated { * insensitive). */ query?: string; + /** + * The source of the components to return. Can be `jira` (default), `compass` or `auto`. When `auto` is specified, the + * API will return connected Compass components if the project is opted into Compass, otherwise it will return Jira + * components. Defaults to `jira`. + * + * @default jira + */ + componentSource?: 'jira' | 'compass' | 'auto' | string; } diff --git a/src/version3/parameters/getProjectEmail.ts b/src/version3/parameters/getProjectEmail.ts index e12df4811b..5a8b7e0ab5 100644 --- a/src/version3/parameters/getProjectEmail.ts +++ b/src/version3/parameters/getProjectEmail.ts @@ -1,4 +1,4 @@ export interface GetProjectEmail { /** The project ID. */ - projectId: number; + projectId: string | number; } diff --git a/src/version3/parameters/getProjectIssueTypeUsagesForStatus.ts b/src/version3/parameters/getProjectIssueTypeUsagesForStatus.ts new file mode 100644 index 0000000000..80deab4e9d --- /dev/null +++ b/src/version3/parameters/getProjectIssueTypeUsagesForStatus.ts @@ -0,0 +1,10 @@ +export interface GetProjectIssueTypeUsagesForStatus { + /** The statusId to fetch issue type usages for */ + statusId: string; + /** The projectId to fetch issue type usages for */ + projectId: string; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version3/parameters/getProjectProperty.ts b/src/version3/parameters/getProjectProperty.ts index 5c76846afa..1885de1282 100644 --- a/src/version3/parameters/getProjectProperty.ts +++ b/src/version3/parameters/getProjectProperty.ts @@ -1,6 +1,6 @@ export interface GetProjectProperty { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** * The project property key. Use [Get project property keys](#api-rest-api-3-project-projectIdOrKey-properties-get) to * get a list of all project property keys. diff --git a/src/version3/parameters/getProjectPropertyKeys.ts b/src/version3/parameters/getProjectPropertyKeys.ts index 0774dabd91..ed63fb62bb 100644 --- a/src/version3/parameters/getProjectPropertyKeys.ts +++ b/src/version3/parameters/getProjectPropertyKeys.ts @@ -1,4 +1,4 @@ export interface GetProjectPropertyKeys { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; } diff --git a/src/version3/parameters/getProjectRole.ts b/src/version3/parameters/getProjectRole.ts index 0107933ff3..e7a4bd70c0 100644 --- a/src/version3/parameters/getProjectRole.ts +++ b/src/version3/parameters/getProjectRole.ts @@ -1,6 +1,6 @@ export interface GetProjectRole { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** * 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. diff --git a/src/version3/parameters/getProjectRoleDetails.ts b/src/version3/parameters/getProjectRoleDetails.ts index 4ec30420fc..4330c48a78 100644 --- a/src/version3/parameters/getProjectRoleDetails.ts +++ b/src/version3/parameters/getProjectRoleDetails.ts @@ -1,6 +1,6 @@ export interface GetProjectRoleDetails { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** Whether the roles should be filtered to include only those the user is assigned to. */ currentMember?: boolean; excludeConnectAddons?: boolean; diff --git a/src/version3/parameters/getProjectRoles.ts b/src/version3/parameters/getProjectRoles.ts index 6de9e0b486..3f5792c849 100644 --- a/src/version3/parameters/getProjectRoles.ts +++ b/src/version3/parameters/getProjectRoles.ts @@ -1,4 +1,4 @@ export interface GetProjectRoles { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; } diff --git a/src/version3/parameters/getProjectUsagesForStatus.ts b/src/version3/parameters/getProjectUsagesForStatus.ts new file mode 100644 index 0000000000..0e8913c901 --- /dev/null +++ b/src/version3/parameters/getProjectUsagesForStatus.ts @@ -0,0 +1,8 @@ +export interface GetProjectUsagesForStatus { + /** The statusId to fetch project usages for */ + statusId: string; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version3/parameters/getProjectUsagesForWorkflow.ts b/src/version3/parameters/getProjectUsagesForWorkflow.ts new file mode 100644 index 0000000000..e70544f1f4 --- /dev/null +++ b/src/version3/parameters/getProjectUsagesForWorkflow.ts @@ -0,0 +1,8 @@ +export interface GetProjectUsagesForWorkflow { + /** The workflow ID */ + workflowId: string; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version3/parameters/getProjectUsagesForWorkflowScheme.ts b/src/version3/parameters/getProjectUsagesForWorkflowScheme.ts new file mode 100644 index 0000000000..0266959608 --- /dev/null +++ b/src/version3/parameters/getProjectUsagesForWorkflowScheme.ts @@ -0,0 +1,8 @@ +export interface GetProjectUsagesForWorkflowScheme { + /** The workflow scheme ID */ + workflowSchemeId: string; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version3/parameters/getProjectVersions.ts b/src/version3/parameters/getProjectVersions.ts index 851c405dad..db33ddce4d 100644 --- a/src/version3/parameters/getProjectVersions.ts +++ b/src/version3/parameters/getProjectVersions.ts @@ -1,6 +1,6 @@ export interface GetProjectVersions { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#expansion) to include additional * information in the response. This parameter accepts `operations`, which returns actions that can be performed on diff --git a/src/version3/parameters/getProjectVersionsPaginated.ts b/src/version3/parameters/getProjectVersionsPaginated.ts index 1046648a68..50d07d52c2 100644 --- a/src/version3/parameters/getProjectVersionsPaginated.ts +++ b/src/version3/parameters/getProjectVersionsPaginated.ts @@ -1,6 +1,6 @@ export interface GetProjectVersionsPaginated { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** The index of the first item to return in a page of results (page offset). */ startAt?: number; /** The maximum number of items to return per page. */ diff --git a/src/version3/parameters/getProjectsByPriorityScheme.ts b/src/version3/parameters/getProjectsByPriorityScheme.ts new file mode 100644 index 0000000000..607505f6d4 --- /dev/null +++ b/src/version3/parameters/getProjectsByPriorityScheme.ts @@ -0,0 +1,12 @@ +export interface GetProjectsByPriorityScheme { + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** The project IDs to filter by. For example, `projectId=10000&projectId=10001`. */ + projectId?: number[]; + /** The priority scheme ID. */ + schemeId: string; + /** The string to query projects on by name. */ + query?: string; +} diff --git a/src/version3/parameters/getRelatedWork.ts b/src/version3/parameters/getRelatedWork.ts new file mode 100644 index 0000000000..b6388182d0 --- /dev/null +++ b/src/version3/parameters/getRelatedWork.ts @@ -0,0 +1,4 @@ +export interface GetRelatedWork { + /** The ID of the version. */ + id: string; +} diff --git a/src/version3/parameters/getResolution.ts b/src/version3/parameters/getResolution.ts new file mode 100644 index 0000000000..13eba23264 --- /dev/null +++ b/src/version3/parameters/getResolution.ts @@ -0,0 +1,4 @@ +export interface GetResolution { + /** The ID of the issue resolution value. */ + id: string; +} diff --git a/src/version3/parameters/getSecurityLevelMembers.ts b/src/version3/parameters/getSecurityLevelMembers.ts index ca3cfe5b25..d1ed167d63 100644 --- a/src/version3/parameters/getSecurityLevelMembers.ts +++ b/src/version3/parameters/getSecurityLevelMembers.ts @@ -1,8 +1,8 @@ export interface GetSecurityLevelMembers { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** * The list of issue security level member IDs. To include multiple issue security level members separate IDs with an * ampersand: `id=10000&id=10001`. diff --git a/src/version3/parameters/getSecurityLevels.ts b/src/version3/parameters/getSecurityLevels.ts index 05024f88eb..4c49f93753 100644 --- a/src/version3/parameters/getSecurityLevels.ts +++ b/src/version3/parameters/getSecurityLevels.ts @@ -1,8 +1,8 @@ export interface GetSecurityLevels { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** * The list of issue security scheme level IDs. To include multiple issue security levels, separate IDs with an * ampersand: `id=10000&id=10001`. diff --git a/src/version3/parameters/getTeams.ts b/src/version3/parameters/getTeams.ts new file mode 100644 index 0000000000..289f646714 --- /dev/null +++ b/src/version3/parameters/getTeams.ts @@ -0,0 +1,8 @@ +export interface GetTeams { + /** The ID of the plan. */ + planId: number; + /** The cursor to start from. If not provided, the first page will be returned. */ + cursor?: string; + /** The maximum number of plan teams to return per page. The maximum value is 50. The default value is 50. */ + maxResults?: number; +} diff --git a/src/version3/parameters/getUser.ts b/src/version3/parameters/getUser.ts index 6d17d114ed..935f89a6d9 100644 --- a/src/version3/parameters/getUser.ts +++ b/src/version3/parameters/getUser.ts @@ -5,15 +5,15 @@ export interface GetUser { */ accountId?: string; /** - * This parameter is no longer available. See the [deprecation - * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide) - * for details. + * @deprecated This parameter is no longer available. See the [deprecation + * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide) + * for details. */ username?: string; /** - * This parameter is no longer available. See the [deprecation - * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide) - * for details. + * @deprecated This parameter is no longer available. See the [deprecation + * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide) + * for details. */ key?: string; /** diff --git a/src/version3/parameters/getWorkflowProjectIssueTypeUsages.ts b/src/version3/parameters/getWorkflowProjectIssueTypeUsages.ts new file mode 100644 index 0000000000..42ce81e475 --- /dev/null +++ b/src/version3/parameters/getWorkflowProjectIssueTypeUsages.ts @@ -0,0 +1,10 @@ +export interface GetWorkflowProjectIssueTypeUsages { + /** The workflow ID */ + workflowId: string; + /** The project ID */ + projectId: number; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version3/parameters/getWorkflowSchemeProjectAssociations.ts b/src/version3/parameters/getWorkflowSchemeProjectAssociations.ts index 5aa19373fd..e39ce06f95 100644 --- a/src/version3/parameters/getWorkflowSchemeProjectAssociations.ts +++ b/src/version3/parameters/getWorkflowSchemeProjectAssociations.ts @@ -3,5 +3,5 @@ export interface GetWorkflowSchemeProjectAssociations { * 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: number[]; + projectId: (string | number)[]; } diff --git a/src/version3/parameters/getWorkflowSchemeUsagesForWorkflow.ts b/src/version3/parameters/getWorkflowSchemeUsagesForWorkflow.ts new file mode 100644 index 0000000000..dae488d332 --- /dev/null +++ b/src/version3/parameters/getWorkflowSchemeUsagesForWorkflow.ts @@ -0,0 +1,8 @@ +export interface GetWorkflowSchemeUsagesForWorkflow { + /** The workflow ID */ + workflowId: string; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version3/parameters/getWorkflowUsagesForStatus.ts b/src/version3/parameters/getWorkflowUsagesForStatus.ts new file mode 100644 index 0000000000..cdfb21d971 --- /dev/null +++ b/src/version3/parameters/getWorkflowUsagesForStatus.ts @@ -0,0 +1,8 @@ +export interface GetWorkflowUsagesForStatus { + /** The statusId to fetch workflow usages for */ + statusId: string; + /** The cursor for pagination */ + nextPageToken?: string; + /** The maximum number of results to return. Must be an integer between 1 and 200. */ + maxResults?: number; +} diff --git a/src/version3/parameters/getWorkflowsPaginated.ts b/src/version3/parameters/getWorkflowsPaginated.ts index 2cb10cf063..b8a4fdafe5 100644 --- a/src/version3/parameters/getWorkflowsPaginated.ts +++ b/src/version3/parameters/getWorkflowsPaginated.ts @@ -49,7 +49,7 @@ export interface GetWorkflowsPaginated { | 'projects' | 'hasDraftWorkflow' | 'operations' - )[] + )[] | string | string[]; /** String used to perform a case-insensitive partial match with workflow name. */ diff --git a/src/version3/parameters/index.ts b/src/version3/parameters/index.ts index 862d5d6655..130d4bfb0b 100644 --- a/src/version3/parameters/index.ts +++ b/src/version3/parameters/index.ts @@ -1,4 +1,6 @@ +export * from './addNotifications'; export * from './addActorUsers'; +export * from './addAtlassianTeam'; export * from './addAttachment'; export * from './addComment'; export * from './addFieldToDefaultScreen'; @@ -19,6 +21,7 @@ export * from './analyseExpression'; export * from './appendMappingsForIssueTypeScreenScheme'; export * from './archiveIssues'; export * from './archiveIssuesAsync'; +export * from './archivePlan'; export * from './archiveProject'; export * from './assignFieldConfigurationSchemeToProject'; export * from './assignIssue'; @@ -29,16 +32,20 @@ export * from './assignProjectsToCustomFieldContext'; export * from './assignSchemeToProject'; export * from './associateSchemesToProjects'; export * from './bulkDeleteIssueProperty'; +export * from './bulkDeleteWorklogs'; export * from './bulkEditDashboards'; +export * from './bulkFetchIssues'; export * from './bulkGetGroups'; export * from './bulkGetUsers'; export * from './bulkGetUsersMigration'; +export * from './bulkMoveWorklogs'; export * from './bulkSetIssuePropertiesByIssue'; export * from './bulkSetIssueProperty'; export * from './bulkSetIssuesProperties'; export * from './cancelTask'; export * from './changeFilterOwner'; export * from './copyDashboard'; +export * from './countIssues'; export * from './createComponent'; export * from './createCustomField'; export * from './createCustomFieldContext'; @@ -61,11 +68,15 @@ export * from './createNotificationScheme'; export * from './createOrUpdateRemoteIssueLink'; export * from './createPermissionGrant'; export * from './createPermissionScheme'; +export * from './createPlan'; +export * from './createPlanOnlyTeam'; export * from './createPriority'; +export * from './createPriorityScheme'; export * from './createProject'; export * from './createProjectAvatar'; export * from './createProjectCategory'; export * from './createProjectRole'; +export * from './createRelatedWork'; export * from './createResolution'; export * from './createScreen'; export * from './createScreenScheme'; @@ -74,6 +85,7 @@ export * from './createUiModification'; export * from './createUser'; export * from './createVersion'; export * from './createWorkflow'; +export * from './createWorkflows'; export * from './createWorkflowScheme'; export * from './createWorkflowSchemeDraftFromParent'; export * from './createWorkflowTransitionProperty'; @@ -110,12 +122,16 @@ export * from './deleteIssueTypeScreenScheme'; export * from './deleteNotificationScheme'; export * from './deletePermissionScheme'; export * from './deletePermissionSchemeEntity'; +export * from './deletePlanOnlyTeam'; +export * from './deletePriority'; +export * from './deletePriorityScheme'; export * from './deleteProject'; export * from './deleteProjectAsynchronously'; export * from './deleteProjectAvatar'; export * from './deleteProjectProperty'; export * from './deleteProjectRole'; export * from './deleteProjectRoleActorsFromRole'; +export * from './deleteRelatedWork'; export * from './deleteRemoteIssueLinkByGlobalId'; export * from './deleteRemoteIssueLinkById'; export * from './deleteResolution'; @@ -138,13 +154,16 @@ export * from './deleteWorkflowTransitionRuleConfigurations'; export * from './deleteWorklog'; export * from './deleteWorklogProperty'; export * from './doTransition'; +export * from './duplicatePlan'; export * from './editIssue'; export * from './evaluateJiraExpression'; +export * from './evaluateJiraExpressionUsingEnhancedSearch'; export * from './expandAttachmentForHumans'; export * from './expandAttachmentForMachines'; export * from './exportArchivedIssues'; export * from './findAssignableUsers'; export * from './findBulkAssignableUsers'; +export * from './findComponentsForProjects'; export * from './findGroups'; export * from './findUserKeysByQuery'; export * from './findUsers'; @@ -170,6 +189,7 @@ export * from './getAllScreenTabFields'; export * from './getAllScreenTabs'; export * from './getAllStatuses'; export * from './getAllSystemAvatars'; +export * from './getAllUserDataClassificationLevels'; export * from './getAllUsers'; export * from './getAllUsersDefault'; export * from './getAllWorkflowSchemes'; @@ -177,17 +197,24 @@ export * from './getAlternativeIssueTypes'; export * from './getApplicationProperty'; export * from './getApplicationRole'; export * from './getAssignedPermissionScheme'; +export * from './getAtlassianTeam'; export * from './getAttachment'; export * from './getAttachmentContent'; export * from './getAttachmentThumbnail'; export * from './getAuditRecords'; export * from './getAutoCompletePost'; +export * from './getAvailablePrioritiesByPriorityScheme'; export * from './getAvailableScreenFields'; +export * from './getAvailableTransitions'; export * from './getAvatarImageByID'; export * from './getAvatarImageByOwner'; export * from './getAvatarImageByType'; export * from './getAvatars'; +export * from './getBulkChangelogs'; +export * from './getBulkEditableFields'; +export * from './getBulkOperationProgress'; export * from './getBulkPermissions'; +export * from './getBulkScreenTabs'; export * from './getChangeLogs'; export * from './getChangeLogsByIds'; export * from './getColumns'; @@ -200,14 +227,18 @@ export * from './getComponent'; export * from './getComponentRelatedIssues'; export * from './getContextsForField'; export * from './getCreateIssueMeta'; +export * from './getCreateIssueMetaIssueTypeId'; +export * from './getCreateIssueMetaIssueTypes'; export * from './getCurrentUser'; export * from './getCustomFieldConfiguration'; export * from './getCustomFieldContextsForProjectsAndIssueTypes'; export * from './getCustomFieldOption'; +export * from './getCustomFieldsConfigurations'; export * from './getDashboard'; export * from './getDashboardItemProperty'; export * from './getDashboardItemPropertyKeys'; export * from './getDashboardsPaginated'; +export * from './getDefaultProjectClassification'; export * from './getDefaultValues'; export * from './getDefaultWorkflow'; export * from './getDraftDefaultWorkflow'; @@ -229,6 +260,7 @@ export * from './getIdsOfWorklogsDeletedSince'; export * from './getIdsOfWorklogsModifiedSince'; export * from './getIssue'; export * from './getIssueFieldOption'; +export * from './getIssueLimitReport'; export * from './getIssueLink'; export * from './getIssueLinkType'; export * from './getIssuePickerResource'; @@ -253,6 +285,7 @@ export * from './getIsWatchingIssueBulk'; export * from './getMyFilters'; export * from './getMyPermissions'; export * from './getNotificationScheme'; +export * from './getNotificationSchemeForProject'; export * from './getNotificationSchemes'; export * from './getNotificationSchemeToProjectMappings'; export * from './getOptionsForContext'; @@ -260,9 +293,16 @@ export * from './getPermissionScheme'; export * from './getPermissionSchemeGrant'; export * from './getPermissionSchemeGrants'; export * from './getPermittedProjects'; +export * from './getPlan'; +export * from './getPlanOnlyTeam'; +export * from './getPlans'; +export * from './getPolicies'; export * from './getPrecomputations'; +export * from './getPrecomputationsByID'; export * from './getPreference'; +export * from './getPrioritiesByPriorityScheme'; export * from './getPriority'; +export * from './getPrioritySchemes'; export * from './getProject'; export * from './getProjectCategoryById'; export * from './getProjectComponents'; @@ -270,6 +310,7 @@ export * from './getProjectComponentsPaginated'; export * from './getProjectContextMapping'; export * from './getProjectEmail'; export * from './getProjectIssueSecurityScheme'; +export * from './getProjectIssueTypeUsagesForStatus'; export * from './getProjectProperty'; export * from './getProjectPropertyKeys'; export * from './getProjectRole'; @@ -277,13 +318,19 @@ export * from './getProjectRoleActorsForRole'; export * from './getProjectRoleById'; export * from './getProjectRoleDetails'; export * from './getProjectRoles'; +export * from './getProjectsByPriorityScheme'; export * from './getProjectsForIssueTypeScreenScheme'; export * from './getProjectTypeByKey'; +export * from './getProjectUsagesForStatus'; +export * from './getProjectUsagesForWorkflow'; +export * from './getProjectUsagesForWorkflowScheme'; export * from './getProjectVersions'; export * from './getProjectVersionsPaginated'; export * from './getRecent'; +export * from './getRelatedWork'; export * from './getRemoteIssueLinkById'; export * from './getRemoteIssueLinks'; +export * from './getResolution'; export * from './getScreens'; export * from './getScreenSchemes'; export * from './getScreensForField'; @@ -297,6 +344,7 @@ export * from './getStatus'; export * from './getStatusCategory'; export * from './getStatusesById'; export * from './getTask'; +export * from './getTeams'; export * from './getTransitions'; export * from './getTrashedFieldsPaginated'; export * from './getUiModifications'; @@ -316,14 +364,17 @@ export * from './getVersionUnresolvedIssues'; export * from './getVisibleIssueFieldOptions'; export * from './getVotes'; export * from './getWorkflow'; +export * from './getWorkflowProjectIssueTypeUsages'; export * from './getWorkflowScheme'; export * from './getWorkflowSchemeDraft'; export * from './getWorkflowSchemeDraftIssueType'; export * from './getWorkflowSchemeIssueType'; export * from './getWorkflowSchemeProjectAssociations'; +export * from './getWorkflowSchemeUsagesForWorkflow'; export * from './getWorkflowsPaginated'; export * from './getWorkflowTransitionProperties'; export * from './getWorkflowTransitionRuleConfigurations'; +export * from './getWorkflowUsagesForStatus'; export * from './getWorklog'; export * from './getWorklogProperty'; export * from './getWorklogPropertyKeys'; @@ -343,11 +394,15 @@ export * from './partialUpdateProjectRole'; export * from './publishDraftWorkflowScheme'; export * from './putAddonProperty'; export * from './putAppProperty'; +export * from './readWorkflows'; +export * from './readWorkflowSchemes'; export * from './refreshWebhooks'; export * from './registerDynamicWebhooks'; export * from './registerModules'; +export * from './removeAtlassianTeam'; export * from './removeAttachment'; export * from './removeCustomFieldContextFromProjects'; +export * from './removeDefaultProjectClassification'; export * from './removeGadget'; export * from './removeGroup'; export * from './removeIssueTypeFromIssueTypeScheme'; @@ -368,6 +423,7 @@ export * from './removeWatcher'; export * from './renameScreenTab'; export * from './reorderCustomFieldOptions'; export * from './reorderIssueTypesInIssueTypeScheme'; +export * from './replaceCustomFieldOption'; export * from './replaceIssueFieldOption'; export * from './resetColumns'; export * from './resetUserColumns'; @@ -375,14 +431,19 @@ export * from './restore'; export * from './restoreCustomField'; export * from './sanitiseJqlQueries'; export * from './search'; +export * from './searchForIssuesIds'; export * from './searchForIssuesUsingJql'; +export * from './searchForIssuesUsingJqlEnhancedSearch'; +export * from './searchForIssuesUsingJqlEnhancedSearchPost'; export * from './searchForIssuesUsingJqlPost'; export * from './searchPriorities'; export * from './searchProjects'; export * from './searchProjectsUsingSecuritySchemes'; export * from './searchResolutions'; export * from './searchSecuritySchemes'; +export * from './searchWorkflows'; export * from './selectTimeTrackingImplementation'; +export * from './services'; export * from './setActors'; export * from './setApplicationProperty'; export * from './setBanner'; @@ -407,9 +468,16 @@ export * from './setWorkflowSchemeDraftIssueType'; export * from './setWorkflowSchemeIssueType'; export * from './setWorklogProperty'; export * from './storeAvatar'; +export * from './submitBulkDelete'; +export * from './submitBulkEdit'; +export * from './submitBulkMove'; +export * from './submitBulkTransition'; +export * from './suggestedPrioritiesForMappings'; export * from './toggleFeatureForProject'; export * from './trashCustomField'; +export * from './trashPlan'; export * from './unarchiveIssues'; +export * from './updateAtlassianTeam'; export * from './updateComment'; export * from './updateComponent'; export * from './updateCustomField'; @@ -418,6 +486,7 @@ export * from './updateCustomFieldContext'; export * from './updateCustomFieldOption'; export * from './updateCustomFieldValue'; export * from './updateDashboard'; +export * from './updateDefaultProjectClassification'; export * from './updateDefaultScreenScheme'; export * from './updateDefaultWorkflow'; export * from './updateDraftDefaultWorkflow'; @@ -438,14 +507,19 @@ export * from './updateIssueTypeScreenScheme'; export * from './updateMultipleCustomFieldValues'; export * from './updateNotificationScheme'; export * from './updatePermissionScheme'; +export * from './updatePlan'; +export * from './updatePlanOnlyTeam'; export * from './updatePrecomputations'; export * from './updatePriority'; +export * from './updatePriorityScheme'; export * from './updateProject'; export * from './updateProjectAvatar'; export * from './updateProjectCategory'; export * from './updateProjectEmail'; +export * from './updateRelatedWork'; export * from './updateRemoteIssueLink'; export * from './updateResolution'; +export * from './updateSchemes'; export * from './updateScreen'; export * from './updateScreenScheme'; export * from './updateSecurityLevel'; @@ -453,10 +527,15 @@ export * from './updateStatuses'; export * from './updateUiModification'; export * from './updateVersion'; export * from './updateWorkflowMapping'; +export * from './updateWorkflows'; export * from './updateWorkflowScheme'; export * from './updateWorkflowSchemeDraft'; +export * from './updateWorkflowSchemeMappings'; export * from './updateWorkflowTransitionProperty'; export * from './updateWorkflowTransitionRuleConfigurations'; export * from './updateWorklog'; +export * from './validateCreateWorkflows'; export * from './validateProjectKey'; +export * from './validateUpdateWorkflows'; +export * from './workflowCapabilities'; export * from './workflowRuleSearch'; diff --git a/src/version3/parameters/putAddonProperty.ts b/src/version3/parameters/putAddonProperty.ts index f1be24ac61..b9c56822bb 100644 --- a/src/version3/parameters/putAddonProperty.ts +++ b/src/version3/parameters/putAddonProperty.ts @@ -3,5 +3,6 @@ export interface PutAddonProperty { addonKey: string; /** The key of the property. */ propertyKey: string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any propertyValue: any; } diff --git a/src/version3/parameters/readWorkflowSchemes.ts b/src/version3/parameters/readWorkflowSchemes.ts new file mode 100644 index 0000000000..5fb818a169 --- /dev/null +++ b/src/version3/parameters/readWorkflowSchemes.ts @@ -0,0 +1,3 @@ +import { WorkflowSchemeReadRequest } from '../models'; + +export interface ReadWorkflowSchemes extends WorkflowSchemeReadRequest {} diff --git a/src/version3/parameters/readWorkflows.ts b/src/version3/parameters/readWorkflows.ts new file mode 100644 index 0000000000..cc844a5386 --- /dev/null +++ b/src/version3/parameters/readWorkflows.ts @@ -0,0 +1,20 @@ +import { ProjectAndIssueTypePair } from '../models'; + +export interface ReadWorkflows { + /** + * Return the new fields (`toStatusReference`/`links`) instead of the deprecated fields (`to`/`from`) for workflow + * transition port mappings. + */ + useTransitionLinksFormat?: boolean; + /** + * Return the new field `approvalConfiguration` instead of the deprecated status properties for approval + * configuration. + */ + useApprovalConfiguration?: boolean; + /** The list of projects and issue types to query. */ + projectAndIssueTypes?: ProjectAndIssueTypePair[]; + /** The list of workflow IDs to query. */ + workflowIds?: string[]; + /** The list of workflow names to query. */ + workflowNames?: string[]; +} diff --git a/src/version3/parameters/removeAtlassianTeam.ts b/src/version3/parameters/removeAtlassianTeam.ts new file mode 100644 index 0000000000..02650c1553 --- /dev/null +++ b/src/version3/parameters/removeAtlassianTeam.ts @@ -0,0 +1,6 @@ +export interface RemoveAtlassianTeam { + /** The ID of the plan. */ + planId: number; + /** The ID of the Atlassian team. */ + atlassianTeamId: string; +} diff --git a/src/version3/parameters/removeDefaultProjectClassification.ts b/src/version3/parameters/removeDefaultProjectClassification.ts new file mode 100644 index 0000000000..103f00b406 --- /dev/null +++ b/src/version3/parameters/removeDefaultProjectClassification.ts @@ -0,0 +1,4 @@ +export interface RemoveDefaultProjectClassification { + /** The project ID or project key (case-sensitive). */ + projectIdOrKey: string; +} diff --git a/src/version3/parameters/removeUser.ts b/src/version3/parameters/removeUser.ts index 9a94e575af..0cb0db148e 100644 --- a/src/version3/parameters/removeUser.ts +++ b/src/version3/parameters/removeUser.ts @@ -5,15 +5,15 @@ export interface RemoveUser { */ accountId: string; /** - * This parameter is no longer available. See the [deprecation - * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) - * for details. + * @deprecated This parameter is no longer available. See the [deprecation + * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) + * for details. */ username?: string; /** - * This parameter is no longer available. See the [deprecation - * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) - * for details. + * @deprecated This parameter is no longer available. See the [deprecation + * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) + * for details. */ key?: string; } diff --git a/src/version3/parameters/replaceCustomFieldOption.ts b/src/version3/parameters/replaceCustomFieldOption.ts new file mode 100644 index 0000000000..aa7b88be53 --- /dev/null +++ b/src/version3/parameters/replaceCustomFieldOption.ts @@ -0,0 +1,12 @@ +export interface ReplaceCustomFieldOption { + /** The ID of the option that will replace the currently selected option. */ + replaceWith?: number; + /** A JQL query that specifies the issues to be updated. For example, _project=10000_. */ + jql?: string; + /** The ID of the custom field. */ + fieldId: string; + /** The ID of the option to be deselected. */ + optionId: number; + /** The ID of the context. */ + contextId: number; +} diff --git a/src/version3/parameters/resetUserColumns.ts b/src/version3/parameters/resetUserColumns.ts index db5e050077..55e573ad27 100644 --- a/src/version3/parameters/resetUserColumns.ts +++ b/src/version3/parameters/resetUserColumns.ts @@ -5,9 +5,9 @@ export interface ResetUserColumns { */ accountId?: string; /** - * This parameter is no longer available. See the [deprecation - * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) - * for details. + * @deprecated This parameter is no longer available. See the [deprecation + * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) + * for details. */ username?: string; } diff --git a/src/version3/parameters/restore.ts b/src/version3/parameters/restore.ts index 07853edc20..c8fd6ca5ef 100644 --- a/src/version3/parameters/restore.ts +++ b/src/version3/parameters/restore.ts @@ -1,4 +1,4 @@ export interface Restore { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; } diff --git a/src/version3/parameters/search.ts b/src/version3/parameters/search.ts index 12e70ef240..226af19539 100644 --- a/src/version3/parameters/search.ts +++ b/src/version3/parameters/search.ts @@ -1,10 +1,13 @@ export interface Search { /** - * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#expansion) to include additional - * information in the response. This parameter accepts a comma-separated list. Expand options include: + * @deprecated See the [deprecation + * notice](https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-2298) for details. * - * - `usages` Returns the project and issue types that use the status in their workflow. - * - `workflowUsages` Returns the workflows that use the status. + * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#expansion) to include additional + * information in the response. This parameter accepts a comma-separated list. Expand options include: + * + * - `usages` Returns the project and issue types that use the status in their workflow. + * - `workflowUsages` Returns the workflows that use the status. */ expand?: 'usages' | 'workflowUsages' | ('usages' | 'workflowUsages')[] | string | string[]; /** The project the status is part of or null for global statuses. */ diff --git a/src/version3/parameters/searchForIssuesIds.ts b/src/version3/parameters/searchForIssuesIds.ts new file mode 100644 index 0000000000..3c6179bc0b --- /dev/null +++ b/src/version3/parameters/searchForIssuesIds.ts @@ -0,0 +1,3 @@ +import { IdSearchRequest } from '../models'; + +export interface SearchForIssuesIds extends IdSearchRequest {} diff --git a/src/version3/parameters/searchForIssuesUsingJql.ts b/src/version3/parameters/searchForIssuesUsingJql.ts index c47b71a6c1..9cefd77cfa 100644 --- a/src/version3/parameters/searchForIssuesUsingJql.ts +++ b/src/version3/parameters/searchForIssuesUsingJql.ts @@ -47,14 +47,37 @@ export interface SearchForIssuesUsingJql { * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#expansion) to include additional * information about issues in the response. This parameter accepts a comma-separated list. Expand options include: * - * `renderedFields` Returns field values rendered in HTML format. `names` Returns the display name of each field. - * `schema` Returns the schema describing a field type. `transitions` Returns all possible transitions for the issue. - * `operations` Returns all possible operations for the issue. `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. + * - `renderedFields` Returns field values rendered in HTML format. + * - `names` Returns the display name of each field. + * - `schema` Returns the schema describing a field type. + * - `transitions` Returns all possible transitions for the issue. + * - `operations` Returns all possible operations for the issue. + * - `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. */ - expand?: string; + expand?: + | 'renderedFields' + | 'names' + | 'schema' + | 'transitions' + | 'operations' + | 'editmeta' + | 'changelog' + | 'versionedRepresentations' + | string + | ( + | 'renderedFields' + | 'names' + | 'schema' + | 'transitions' + | 'operations' + | 'editmeta' + | 'changelog' + | 'versionedRepresentations' + | string + )[]; /** * A list of issue property keys for issue properties to include in the results. This parameter accepts a * comma-separated list. Multiple properties can also be provided using an ampersand separated list. For example, @@ -63,4 +86,10 @@ export interface SearchForIssuesUsingJql { properties?: string[]; /** Reference fields by their key (rather than ID). */ fieldsByKeys?: boolean; + /** + * Whether to fail the request quickly in case of an error while loading fields for an issue. For `failFast=true`, if + * one field fails, the entire operation fails. For `failFast=false`, the operation will continue even if a field + * fails. It will return a valid response, but without values for the failed field(s). + */ + failFast?: boolean; } diff --git a/src/version3/parameters/searchForIssuesUsingJqlEnhancedSearch.ts b/src/version3/parameters/searchForIssuesUsingJqlEnhancedSearch.ts new file mode 100644 index 0000000000..03c024d4d5 --- /dev/null +++ b/src/version3/parameters/searchForIssuesUsingJqlEnhancedSearch.ts @@ -0,0 +1,79 @@ +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. + * + * - 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. + */ + nextPageToken?: string; + /** + * The maximum number of items to return per page. To manage page size, API may return fewer items per page where a + * large number of fields are requested. The greatest number of items returned per page is achieved when requesting + * `id` or `key` only. + * + * It returns max 5000 issues. + * + * Default: `50` + * + * Format: `int32` + */ + maxResults?: number; + /** + * A list of fields to return for each issue, use it to retrieve a subset of fields. This parameter accepts a + * comma-separated list. Expand options include: + * + * - `*all` Returns all fields. + * - `*navigable` Returns navigable fields. + * - `id` Returns only issue IDs. + * - Any issue field, prefixed with a minus to exclude. + * + * The default is `id`. + * + * Examples: + * + * - `summary,comment` Returns only the summary and comments fields. + * - `-description` Returns all navigable (default) fields except description. + * - `*all,-comment` Returns all fields except comments. + * + * 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/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-get) + * where the default is all fields. + */ + fields?: string[]; + /** + * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#expansion) to include additional + * information about issues in the response. Note that, unlike the majority of instances where `expand` is specified, + * `expand` is defined as a comma-delimited string of values. The expand options are: + * + * - `renderedFields` Returns field values rendered in HTML format. + * - `names` Returns the display name of each field. + * - `schema` Returns the schema describing a field type. + * - `transitions` Returns all possible transitions for the issue. + * - `operations` Returns all possible operations for the issue. + * - `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. + * + * 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. */ + properties?: string[]; + /** Reference fields by their key (rather than ID). The default is `false`. */ + fieldsByKeys?: boolean; + /** Fail this request early if we can't retrieve all field data. The default is `false`. */ + failFast?: boolean; + /** Strong consistency issue ids to be reconciled with search results. Accepts max 50 ids. All issues must exist. */ + reconcileIssues?: number[]; +} diff --git a/src/version3/parameters/searchForIssuesUsingJqlEnhancedSearchPost.ts b/src/version3/parameters/searchForIssuesUsingJqlEnhancedSearchPost.ts new file mode 100644 index 0000000000..f00326bc86 --- /dev/null +++ b/src/version3/parameters/searchForIssuesUsingJqlEnhancedSearchPost.ts @@ -0,0 +1,3 @@ +import { EnhancedSearchRequest } from '../models'; + +export interface SearchForIssuesUsingJqlEnhancedSearchPost extends EnhancedSearchRequest {} diff --git a/src/version3/parameters/searchPriorities.ts b/src/version3/parameters/searchPriorities.ts index 2d704bbb30..7ad7be9707 100644 --- a/src/version3/parameters/searchPriorities.ts +++ b/src/version3/parameters/searchPriorities.ts @@ -1,8 +1,8 @@ export interface SearchPriorities { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** The list of priority IDs. To include multiple IDs, provide an ampersand-separated list. For example, `id=2&id=3`. */ id?: string[]; /** @@ -10,6 +10,13 @@ export interface SearchPriorities { * `projectId=10010&projectId=10111`. */ projectId?: string[]; + /** The name of priority to search for. */ + priorityName?: string; /** Whether only the default priority is returned. */ onlyDefault?: boolean; + /** + * Use `schemes` to return the associated priority schemes for each priority. Limited to returning first 15 priority + * schemes per priority. + */ + expand?: 'schemes' | string; } diff --git a/src/version3/parameters/searchProjectsUsingSecuritySchemes.ts b/src/version3/parameters/searchProjectsUsingSecuritySchemes.ts index 6e2ee07020..ba08b5778f 100644 --- a/src/version3/parameters/searchProjectsUsingSecuritySchemes.ts +++ b/src/version3/parameters/searchProjectsUsingSecuritySchemes.ts @@ -1,8 +1,8 @@ export interface SearchProjectsUsingSecuritySchemes { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** The list of security scheme IDs to be filtered out. */ issueSecuritySchemeId?: string[]; /** The list of project IDs to be filtered out. */ diff --git a/src/version3/parameters/searchSecuritySchemes.ts b/src/version3/parameters/searchSecuritySchemes.ts index eb6b6edc62..df7dae9577 100644 --- a/src/version3/parameters/searchSecuritySchemes.ts +++ b/src/version3/parameters/searchSecuritySchemes.ts @@ -1,8 +1,8 @@ export interface SearchSecuritySchemes { /** The index of the first item to return in a page of results (page offset). */ - startAt?: string; + startAt?: number; /** The maximum number of items to return per page. */ - maxResults?: string; + maxResults?: number; /** * The list of issue security scheme IDs. To include multiple issue security scheme IDs, separate IDs with an * ampersand: `id=10000&id=10001`. diff --git a/src/version3/parameters/searchWorkflows.ts b/src/version3/parameters/searchWorkflows.ts new file mode 100644 index 0000000000..c58c10c393 --- /dev/null +++ b/src/version3/parameters/searchWorkflows.ts @@ -0,0 +1,37 @@ +export interface SearchWorkflows { + /** The index of the first item to return in a page of results (page offset). */ + startAt?: number; + /** The maximum number of items to return per page. */ + maxResults?: number; + /** + * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#expansion) to include additional + * information in the response. This parameter accepts a comma-separated list. Expand options include: + * + * - `values.transitions` Returns the transitions that each workflow is associated with. + */ + expand?: 'values.transitions' | string; + /** String used to perform a case-insensitive partial match with workflow name. */ + queryString?: string; + /** + * [Order](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#ordering) the results by a field: + * + * - `name` Sorts by workflow name. + * - `created` Sorts by create time. + * - `updated` Sorts by update time. + */ + orderBy?: + | 'name' + | 'created' + | 'updated' + | '+name' + | '+created' + | '+updated' + | '-name' + | '-created' + | '-updated' + | string; + /** The scope of the workflow. Global for company-managed projects and Project for team-managed projects. */ + scope?: string; + /** Filters active and inactive workflows. */ + isActive?: boolean; +} diff --git a/src/version3/parameters/services.ts b/src/version3/parameters/services.ts new file mode 100644 index 0000000000..296a9d0439 --- /dev/null +++ b/src/version3/parameters/services.ts @@ -0,0 +1,4 @@ +export interface Services { + /** The ID of the services (the strings starting with "b:" need to be decoded in Base64). */ + serviceIds: string[]; +} diff --git a/src/version3/parameters/setActors.ts b/src/version3/parameters/setActors.ts index 07bf498caf..a85bf1a69a 100644 --- a/src/version3/parameters/setActors.ts +++ b/src/version3/parameters/setActors.ts @@ -2,7 +2,7 @@ import { ProjectRoleActorsUpdate } from '../models'; export interface SetActors extends ProjectRoleActorsUpdate { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** * 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. diff --git a/src/version3/parameters/setCommentProperty.ts b/src/version3/parameters/setCommentProperty.ts index 1ae0fddcdb..e99af93039 100644 --- a/src/version3/parameters/setCommentProperty.ts +++ b/src/version3/parameters/setCommentProperty.ts @@ -3,5 +3,6 @@ export interface SetCommentProperty { commentId: string; /** The key of the property. The maximum length is 255 characters. */ propertyKey: string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any property: any; } diff --git a/src/version3/parameters/setDashboardItemProperty.ts b/src/version3/parameters/setDashboardItemProperty.ts index 74623a28f4..0326f4f325 100644 --- a/src/version3/parameters/setDashboardItemProperty.ts +++ b/src/version3/parameters/setDashboardItemProperty.ts @@ -9,5 +9,6 @@ export interface SetDashboardItemProperty { * object with all keys and values as strings. */ propertyKey: string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any propertyValue: any; } diff --git a/src/version3/parameters/setIssueProperty.ts b/src/version3/parameters/setIssueProperty.ts index 37fe0211f4..2784d73305 100644 --- a/src/version3/parameters/setIssueProperty.ts +++ b/src/version3/parameters/setIssueProperty.ts @@ -4,5 +4,6 @@ export interface SetIssueProperty { /** The key of the issue property. The maximum length is 255 characters. */ propertyKey: string; /** The value of the issue property. Can be of any type. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any propertyValue: any; } diff --git a/src/version3/parameters/setProjectProperty.ts b/src/version3/parameters/setProjectProperty.ts index 518b1d3e9e..2ff27299a2 100644 --- a/src/version3/parameters/setProjectProperty.ts +++ b/src/version3/parameters/setProjectProperty.ts @@ -1,7 +1,8 @@ export interface SetProjectProperty { /** The project ID or project key (case sensitive). */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** The key of the project property. The maximum length is 255 characters. */ propertyKey: string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any propertyValue: any; } diff --git a/src/version3/parameters/setUserColumns.ts b/src/version3/parameters/setUserColumns.ts index 7489ebbf81..a51497036f 100644 --- a/src/version3/parameters/setUserColumns.ts +++ b/src/version3/parameters/setUserColumns.ts @@ -4,5 +4,6 @@ export interface SetUserColumns { * _5b10ac8d82e05b22cc7d4ef5_. */ accountId?: string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any columns: any; } diff --git a/src/version3/parameters/setUserProperty.ts b/src/version3/parameters/setUserProperty.ts index 38ad1931f4..88ecc0ff20 100644 --- a/src/version3/parameters/setUserProperty.ts +++ b/src/version3/parameters/setUserProperty.ts @@ -6,5 +6,6 @@ export interface SetUserProperty { accountId?: string; /** The key of the user's property. The maximum length is 255 characters. */ propertyKey: string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any propertyValue: any; } diff --git a/src/version3/parameters/storeAvatar.ts b/src/version3/parameters/storeAvatar.ts index b9f98e0b99..398a59baff 100644 --- a/src/version3/parameters/storeAvatar.ts +++ b/src/version3/parameters/storeAvatar.ts @@ -2,12 +2,17 @@ export interface StoreAvatar { /** The avatar type. */ type: 'project' | 'issuetype' | string; /** The ID of the item the avatar is associated with. */ - entityId: string; + entityId: number | string; /** The X coordinate of the top-left corner of the crop region. */ x?: number; /** The Y coordinate of the top-left corner of the crop region. */ y?: number; - /** The length of each side of the crop region. */ - size: number; - avatar: any; + /** + * The length of each side of the crop region. + * + * @default 0 + */ + size?: number; + mimeType: string; + avatar: Buffer | ArrayBuffer | Uint8Array; } diff --git a/src/version3/parameters/submitBulkDelete.ts b/src/version3/parameters/submitBulkDelete.ts new file mode 100644 index 0000000000..623f3ab259 --- /dev/null +++ b/src/version3/parameters/submitBulkDelete.ts @@ -0,0 +1,3 @@ +import { IssueBulkDeletePayload } from '../models'; + +export interface SubmitBulkDelete extends IssueBulkDeletePayload {} diff --git a/src/version3/parameters/submitBulkEdit.ts b/src/version3/parameters/submitBulkEdit.ts new file mode 100644 index 0000000000..a00603a06d --- /dev/null +++ b/src/version3/parameters/submitBulkEdit.ts @@ -0,0 +1,3 @@ +import { IssueBulkEditPayload } from '../models'; + +export interface SubmitBulkEdit extends IssueBulkEditPayload {} diff --git a/src/version3/parameters/submitBulkMove.ts b/src/version3/parameters/submitBulkMove.ts new file mode 100644 index 0000000000..198ed83acc --- /dev/null +++ b/src/version3/parameters/submitBulkMove.ts @@ -0,0 +1,3 @@ +import { IssueBulkMovePayload } from '../models'; + +export interface SubmitBulkMove extends IssueBulkMovePayload {} diff --git a/src/version3/parameters/submitBulkTransition.ts b/src/version3/parameters/submitBulkTransition.ts new file mode 100644 index 0000000000..21b62066a2 --- /dev/null +++ b/src/version3/parameters/submitBulkTransition.ts @@ -0,0 +1,3 @@ +import { IssueBulkTransitionPayload } from '../models'; + +export interface SubmitBulkTransition extends IssueBulkTransitionPayload {} diff --git a/src/version3/parameters/suggestedPrioritiesForMappings.ts b/src/version3/parameters/suggestedPrioritiesForMappings.ts new file mode 100644 index 0000000000..ed706bf989 --- /dev/null +++ b/src/version3/parameters/suggestedPrioritiesForMappings.ts @@ -0,0 +1,3 @@ +import { SuggestedMappingsRequest } from '../models'; + +export interface SuggestedPrioritiesForMappings extends SuggestedMappingsRequest {} diff --git a/src/version3/parameters/toggleFeatureForProject.ts b/src/version3/parameters/toggleFeatureForProject.ts index c5a8fde0f7..7891492f04 100644 --- a/src/version3/parameters/toggleFeatureForProject.ts +++ b/src/version3/parameters/toggleFeatureForProject.ts @@ -2,7 +2,7 @@ import { ProjectFeatureToggleRequest } from '../models'; export interface ToggleFeatureForProject extends ProjectFeatureToggleRequest { /** The ID or (case-sensitive) key of the project. */ - projectIdOrKey: string; + projectIdOrKey: string | number; /** The key of the feature. */ featureKey: string; } diff --git a/src/version3/parameters/trashPlan.ts b/src/version3/parameters/trashPlan.ts new file mode 100644 index 0000000000..e960cc100a --- /dev/null +++ b/src/version3/parameters/trashPlan.ts @@ -0,0 +1,4 @@ +export interface TrashPlan { + /** The ID of the plan. */ + planId: number; +} diff --git a/src/version3/parameters/updateAtlassianTeam.ts b/src/version3/parameters/updateAtlassianTeam.ts new file mode 100644 index 0000000000..d5a9fb9dfe --- /dev/null +++ b/src/version3/parameters/updateAtlassianTeam.ts @@ -0,0 +1,6 @@ +export interface UpdateAtlassianTeam { + /** The ID of the plan. */ + planId: number; + /** The ID of the Atlassian team. */ + atlassianTeamId: string; +} diff --git a/src/version3/parameters/updateComment.ts b/src/version3/parameters/updateComment.ts index 3fe24754b9..417108b569 100644 --- a/src/version3/parameters/updateComment.ts +++ b/src/version3/parameters/updateComment.ts @@ -1,6 +1,6 @@ -import { Comment } from '../models'; +import { Comment, Document } from '../models'; -export interface UpdateComment extends Comment { +export interface UpdateComment extends Omit { /** The ID or key of the issue. */ issueIdOrKey: string; /** The ID of the comment. */ @@ -19,4 +19,5 @@ export interface UpdateComment extends Comment { * rendered in HTML. */ expand?: 'renderedBody' | ['renderedBody'] | string | string[]; + body?: Document | string; } diff --git a/src/version3/parameters/updateDashboard.ts b/src/version3/parameters/updateDashboard.ts index 3b01c0c2d9..7144648aa6 100644 --- a/src/version3/parameters/updateDashboard.ts +++ b/src/version3/parameters/updateDashboard.ts @@ -3,4 +3,9 @@ import { DashboardDetails } from '../models'; export interface UpdateDashboard extends DashboardDetails { /** The ID of the dashboard to update. */ id: string; + /** + * Whether admin level permissions are used. It should only be true if the user has _Administer Jira_ [global + * permission](https://confluence.atlassian.com/x/x4dKLg) + */ + extendAdminPermissions?: boolean; } diff --git a/src/version3/parameters/updateDefaultProjectClassification.ts b/src/version3/parameters/updateDefaultProjectClassification.ts new file mode 100644 index 0000000000..01b6cb1eb2 --- /dev/null +++ b/src/version3/parameters/updateDefaultProjectClassification.ts @@ -0,0 +1,6 @@ +import { UpdateDefaultProjectClassification as UpdateDefaultProjectClassificationModel } from '../models'; + +export interface UpdateDefaultProjectClassification extends UpdateDefaultProjectClassificationModel { + /** The project ID or project key (case-sensitive). */ + projectIdOrKey: string; +} diff --git a/src/version3/parameters/updatePlan.ts b/src/version3/parameters/updatePlan.ts new file mode 100644 index 0000000000..3fd90fe9f8 --- /dev/null +++ b/src/version3/parameters/updatePlan.ts @@ -0,0 +1,29 @@ +import type { + CreateCrossProjectReleaseRequest, + CreateCustomFieldRequest, + CreateExclusionRulesRequest, + CreateIssueSourceRequest, + CreatePermissionRequest, + CreateSchedulingRequest, +} from '../models'; + +export interface UpdatePlan { + /** The ID of the plan. */ + planId: number; + /** Whether to accept group IDs instead of group names. Group names are deprecated. */ + useGroupId?: boolean; + /** The cross-project releases to include in the plan. */ + crossProjectReleases?: CreateCrossProjectReleaseRequest[]; + /** The custom fields for the plan. */ + customFields?: CreateCustomFieldRequest[]; + exclusionRules?: CreateExclusionRulesRequest; + /** The issue sources to include in the plan. */ + issueSources?: CreateIssueSourceRequest[]; + /** The account ID of the plan lead. */ + leadAccountId?: string; + /** The plan name. */ + name?: string; + /** The permissions for the plan. */ + permissions?: CreatePermissionRequest[]; + scheduling?: CreateSchedulingRequest; +} diff --git a/src/version3/parameters/updatePlanOnlyTeam.ts b/src/version3/parameters/updatePlanOnlyTeam.ts new file mode 100644 index 0000000000..7e4b3b5820 --- /dev/null +++ b/src/version3/parameters/updatePlanOnlyTeam.ts @@ -0,0 +1,6 @@ +export interface UpdatePlanOnlyTeam { + /** The ID of the plan. */ + planId: number; + /** The ID of the plan-only team. */ + planOnlyTeamId: number; +} diff --git a/src/version3/parameters/updatePrecomputations.ts b/src/version3/parameters/updatePrecomputations.ts index ecf83b9aaf..7371900380 100644 --- a/src/version3/parameters/updatePrecomputations.ts +++ b/src/version3/parameters/updatePrecomputations.ts @@ -1,3 +1,5 @@ import { JqlFunctionPrecomputationUpdateRequest } from '../models'; -export interface UpdatePrecomputations extends JqlFunctionPrecomputationUpdateRequest {} +export interface UpdatePrecomputations extends JqlFunctionPrecomputationUpdateRequest { + skipNotFoundPrecomputations?: boolean; +} diff --git a/src/version3/parameters/updatePriorityScheme.ts b/src/version3/parameters/updatePriorityScheme.ts new file mode 100644 index 0000000000..bbd7a2f666 --- /dev/null +++ b/src/version3/parameters/updatePriorityScheme.ts @@ -0,0 +1,6 @@ +import { UpdatePrioritySchemeRequest } from '../models'; + +export interface UpdatePriorityScheme extends UpdatePrioritySchemeRequest { + /** The ID of the priority scheme. */ + schemeId: number; +} diff --git a/src/version3/parameters/updateProject.ts b/src/version3/parameters/updateProject.ts index e800522df0..9fdfd4e2c8 100644 --- a/src/version3/parameters/updateProject.ts +++ b/src/version3/parameters/updateProject.ts @@ -2,7 +2,7 @@ import { UpdateProjectDetails } from '../models'; export interface UpdateProject extends UpdateProjectDetails { /** The project ID or project key (case-sensitive). */ - projectIdOrKey: number | string; + projectIdOrKey: string | number; projectTypeKey?: string; projectTemplateKey?: string; /** diff --git a/src/version3/parameters/updateProjectAvatar.ts b/src/version3/parameters/updateProjectAvatar.ts index d31b4ca4b6..6803b3f5d8 100644 --- a/src/version3/parameters/updateProjectAvatar.ts +++ b/src/version3/parameters/updateProjectAvatar.ts @@ -2,5 +2,5 @@ import { Avatar } from '../models'; export interface UpdateProjectAvatar extends Avatar { /** The ID or (case-sensitive) key of the project. */ - projectIdOrKey: string; + projectIdOrKey: string | number; } diff --git a/src/version3/parameters/updateProjectEmail.ts b/src/version3/parameters/updateProjectEmail.ts index c3bf7237a2..e8f4ca86f7 100644 --- a/src/version3/parameters/updateProjectEmail.ts +++ b/src/version3/parameters/updateProjectEmail.ts @@ -2,5 +2,5 @@ import { ProjectEmailAddress } from '../models'; export interface UpdateProjectEmail extends ProjectEmailAddress { /** The project ID. */ - projectId: number; + projectId: string | number; } diff --git a/src/version3/parameters/updateRelatedWork.ts b/src/version3/parameters/updateRelatedWork.ts new file mode 100644 index 0000000000..4d0d5a170b --- /dev/null +++ b/src/version3/parameters/updateRelatedWork.ts @@ -0,0 +1,6 @@ +import { VersionRelatedWork } from '../models'; + +export interface UpdateRelatedWork extends VersionRelatedWork { + /** The ID of the version to update the related work on. For the related work id, pass it to the input JSON. */ + id: string; +} diff --git a/src/version3/parameters/updateSchemes.ts b/src/version3/parameters/updateSchemes.ts new file mode 100644 index 0000000000..8f6e0ef5fa --- /dev/null +++ b/src/version3/parameters/updateSchemes.ts @@ -0,0 +1,32 @@ +import { MappingsByIssueTypeOverride, MappingsByWorkflow, DocumentVersion, WorkflowSchemeAssociation } from '../models'; + +/** The update workflow scheme payload. */ +export interface UpdateSchemes { + /** + * The ID of the workflow for issue types without having a mapping defined in this workflow scheme. Only used in + * global-scoped workflow schemes. If the `defaultWorkflowId` isn't specified, this is set to _Jira Workflow (jira)_. + */ + defaultWorkflowId?: string; + /** The new description for this workflow scheme. */ + description: string; + /** The ID of this workflow scheme. */ + id: string; + /** The new name for this workflow scheme. */ + name: string; + /** + * Overrides, for the selected issue types, any status mappings provided in `statusMappingsByWorkflows`. Status + * mappings are required when the new workflow for an issue type doesn't contain all statuses that the old workflow + * has. Status mappings can be provided by a combination of `statusMappingsByWorkflows` and + * `statusMappingsByIssueTypeOverride`. + */ + statusMappingsByIssueTypeOverride?: MappingsByIssueTypeOverride[]; + /** + * The status mappings by workflows. Status mappings are required when the new workflow for an issue type doesn't + * contain all statuses that the old workflow has. Status mappings can be provided by a combination of + * `statusMappingsByWorkflows` and `statusMappingsByIssueTypeOverride`. + */ + statusMappingsByWorkflows?: MappingsByWorkflow[]; + version: DocumentVersion; + /** Mappings from workflows to issue types. */ + workflowsForIssueTypes?: WorkflowSchemeAssociation[]; +} diff --git a/src/version3/parameters/updateWorkflowSchemeMappings.ts b/src/version3/parameters/updateWorkflowSchemeMappings.ts new file mode 100644 index 0000000000..2dfcab81e4 --- /dev/null +++ b/src/version3/parameters/updateWorkflowSchemeMappings.ts @@ -0,0 +1,14 @@ +import { WorkflowSchemeAssociation } from '../models'; + +/** The request payload to get the required mappings for updating a workflow scheme. */ +export interface UpdateWorkflowSchemeMappings { + /** + * The ID of the new default workflow for this workflow scheme. Only used in global-scoped workflow schemes. If it + * isn't specified, is set to _Jira Workflow (jira)_. + */ + defaultWorkflowId?: string; + /** The ID of the workflow scheme. */ + id: string; + /** The new workflow to issue type mappings for this workflow scheme. */ + workflowsForIssueTypes: WorkflowSchemeAssociation[]; +} diff --git a/src/version3/parameters/updateWorkflows.ts b/src/version3/parameters/updateWorkflows.ts new file mode 100644 index 0000000000..119dc8461e --- /dev/null +++ b/src/version3/parameters/updateWorkflows.ts @@ -0,0 +1,12 @@ +import { WorkflowUpdateRequest } from '../models'; + +export interface UpdateWorkflows extends WorkflowUpdateRequest { + /** + * Use [expand](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#expansion) to include additional + * information in the response. This parameter accepts a comma-separated list. Expand options include: + * + * - `workflows.usages` Returns the project and issue types that each workflow is associated with. + * - `statuses.usages` Returns the project and issue types that each status is associated with. + */ + expand?: 'workflows.usages' | 'statuses.usages' | ('workflows.usages' | 'statuses.usages')[] | string; +} diff --git a/src/version3/parameters/validateCreateWorkflows.ts b/src/version3/parameters/validateCreateWorkflows.ts new file mode 100644 index 0000000000..f48f1b8140 --- /dev/null +++ b/src/version3/parameters/validateCreateWorkflows.ts @@ -0,0 +1,6 @@ +import { WorkflowCreateRequest, ValidationOptionsForCreate } from '../models'; + +export interface ValidateCreateWorkflows { + payload: WorkflowCreateRequest; + validationOptions?: ValidationOptionsForCreate; +} diff --git a/src/version3/parameters/validateUpdateWorkflows.ts b/src/version3/parameters/validateUpdateWorkflows.ts new file mode 100644 index 0000000000..2f78a43b27 --- /dev/null +++ b/src/version3/parameters/validateUpdateWorkflows.ts @@ -0,0 +1,3 @@ +import { WorkflowUpdateValidateRequest } from '../models'; + +export interface ValidateUpdateWorkflows extends WorkflowUpdateValidateRequest {} diff --git a/src/version3/parameters/workflowCapabilities.ts b/src/version3/parameters/workflowCapabilities.ts new file mode 100644 index 0000000000..d3e4c8fb4f --- /dev/null +++ b/src/version3/parameters/workflowCapabilities.ts @@ -0,0 +1,3 @@ +import type { WorkflowCapabilities as WorkflowCapabilitiesModel } from '../models'; + +export type WorkflowCapabilities = WorkflowCapabilitiesModel; diff --git a/src/version3/permissionSchemes.ts b/src/version3/permissionSchemes.ts index 9add325b3f..f4f5f1f44a 100644 --- a/src/version3/permissionSchemes.ts +++ b/src/version3/permissionSchemes.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class PermissionSchemes { @@ -20,8 +20,9 @@ export class PermissionSchemes { * The `holder` object contains information about the user or group being granted the permission. For example, the * _Administer projects_ permission is granted to a group named _Teams in space administrators_. In this case, the * type is `"type": "group"`, and the parameter is the group name, `"parameter": "Teams in space administrators"` and - * the value is group ID, `"value": "ca85fac0-d974-40ca-a615-7af99c48d24f"`. The `holder` object is defined by the - * following properties: + * the value is group ID, `"value": "ca85fac0-d974-40ca-a615-7af99c48d24f"`. + * + * The `holder` object is defined by the following properties: * * - `type` Identifies the user or group (see the list of types below). * - `parameter` As a group's name can change, use of `value` is recommended. The value of this property depends on the @@ -130,8 +131,9 @@ export class PermissionSchemes { * The `holder` object contains information about the user or group being granted the permission. For example, the * _Administer projects_ permission is granted to a group named _Teams in space administrators_. In this case, the * type is `"type": "group"`, and the parameter is the group name, `"parameter": "Teams in space administrators"` and - * the value is group ID, `"value": "ca85fac0-d974-40ca-a615-7af99c48d24f"`. The `holder` object is defined by the - * following properties: + * the value is group ID, `"value": "ca85fac0-d974-40ca-a615-7af99c48d24f"`. + * + * The `holder` object is defined by the following properties: * * - `type` Identifies the user or group (see the list of types below). * - `parameter` As a group's name can change, use of `value` is recommended. The value of this property depends on the @@ -477,10 +479,10 @@ export class PermissionSchemes { expand: parameters.expand, }, data: { - id: parameters.id, - self: parameters.self, holder: parameters.holder, + id: parameters.id, permission: parameters.permission, + self: parameters.self, }, }; diff --git a/src/version3/permissions.ts b/src/version3/permissions.ts index 6936121d24..45d29a9048 100644 --- a/src/version3/permissions.ts +++ b/src/version3/permissions.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Permissions { @@ -28,6 +28,12 @@ export class Permissions { * project, because any user can be a reporter. However, if they are not the user who reported the issue queried they * would not have EDIT_ISSUES permission for that issue. * + * For [Jira Service Management project + * permissions](https://support.atlassian.com/jira-cloud-administration/docs/customize-jira-service-management-permissions/), + * this will be evaluated similarly to a user in the customer portal. For example, if the BROWSE_PROJECTS permission + * is granted to Service Project Customer - Portal Access, any users with access to the customer portal will have the + * BROWSE_PROJECTS permission. + * * Global permissions are unaffected by context. * * This operation can be accessed anonymously. @@ -59,6 +65,12 @@ export class Permissions { * project, because any user can be a reporter. However, if they are not the user who reported the issue queried they * would not have EDIT_ISSUES permission for that issue. * + * For [Jira Service Management project + * permissions](https://support.atlassian.com/jira-cloud-administration/docs/customize-jira-service-management-permissions/), + * this will be evaluated similarly to a user in the customer portal. For example, if the BROWSE_PROJECTS permission + * is granted to Service Project Customer - Portal Access, any users with access to the customer portal will have the + * BROWSE_PROJECTS permission. + * * Global permissions are unaffected by context. * * This operation can be accessed anonymously. @@ -98,8 +110,9 @@ export class Permissions { * - Project permissions. * - Global permissions added by plugins. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. */ async getAllPermissions(callback: Callback): Promise; /** @@ -109,8 +122,9 @@ export class Permissions { * - Project permissions. * - Global permissions added by plugins. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. */ async getAllPermissions(callback?: never): Promise; async getAllPermissions(callback?: Callback): Promise { @@ -139,6 +153,11 @@ export class Permissions { * `projectPermissions.issues` are ignored. * - Empty strings in `projectPermissions.permissions` are ignored. * + * **Deprecation notice:** The required OAuth 2.0 scopes will be updated on June 15, 2024. + * + * - **Classic**: `read:jira-work` + * - **Granular**: `read:permission:jira` + * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** @@ -168,6 +187,11 @@ export class Permissions { * `projectPermissions.issues` are ignored. * - Empty strings in `projectPermissions.permissions` are ignored. * + * **Deprecation notice:** The required OAuth 2.0 scopes will be updated on June 15, 2024. + * + * - **Classic**: `read:jira-work` + * - **Granular**: `read:permission:jira` + * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** @@ -188,9 +212,9 @@ export class Permissions { url: '/rest/api/3/permissions/check', method: 'POST', data: { - projectPermissions: parameters?.projectPermissions, - globalPermissions: parameters?.globalPermissions, accountId: parameters?.accountId, + globalPermissions: parameters?.globalPermissions, + projectPermissions: parameters?.projectPermissions, }, }; diff --git a/src/version3/plans.ts b/src/version3/plans.ts new file mode 100644 index 0000000000..322a2a5964 --- /dev/null +++ b/src/version3/plans.ts @@ -0,0 +1,223 @@ +import * as Models from './models'; +import * as Parameters from './parameters'; +import { Client } from '../clients'; +import { Callback } from '../callback'; +import { RequestConfig } from '../requestConfig'; + +export class Plans { + constructor(private client: Client) {} + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of plans. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getPlans( + parameters: Parameters.GetPlans | undefined, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of plans. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getPlans( + parameters?: Parameters.GetPlans, + callback?: never, + ): Promise; + async getPlans( + parameters?: Parameters.GetPlans, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/plans/plan', + method: 'GET', + params: { + includeTrashed: parameters?.includeTrashed, + includeArchived: parameters?.includeArchived, + cursor: parameters?.cursor, + maxResults: parameters?.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Creates a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async createPlan(parameters: Parameters.CreatePlan, callback: Callback): Promise; + /** + * Creates a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async createPlan(parameters: Parameters.CreatePlan, callback?: never): Promise; + async createPlan(parameters: Parameters.CreatePlan, callback?: Callback): Promise { + const config: RequestConfig = { + url: '/rest/api/3/plans/plan', + method: 'POST', + params: { + useGroupId: parameters.useGroupId, + }, + data: { + crossProjectReleases: parameters.crossProjectReleases, + customFields: parameters.customFields, + exclusionRules: parameters.exclusionRules, + issueSources: parameters.issueSources, + leadAccountId: parameters.leadAccountId, + name: parameters.name, + permissions: parameters.permissions, + scheduling: parameters.scheduling, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getPlan(parameters: Parameters.GetPlan, callback: Callback): Promise; + /** + * Returns a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getPlan(parameters: Parameters.GetPlan, callback?: never): Promise; + async getPlan(parameters: Parameters.GetPlan, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/3/plans/plan/${parameters.planId}`, + method: 'GET', + params: { + useGroupId: parameters.useGroupId, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Updates any of the following details of a plan using [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902). + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * + * _Note that "add" operations do not respect array indexes in target locations. Call the "Get plan" endpoint to find + * out the order of array elements._ + */ + async updatePlan(parameters: Parameters.UpdatePlan, callback: Callback): Promise; + /** + * Updates any of the following details of a plan using [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902). + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * + * _Note that "add" operations do not respect array indexes in target locations. Call the "Get plan" endpoint to find + * out the order of array elements._ + */ + async updatePlan(parameters: Parameters.UpdatePlan, callback?: never): Promise; + async updatePlan(parameters: Parameters.UpdatePlan, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/3/plans/plan/${parameters.planId}`, + method: 'PUT', + params: { + useGroupId: parameters.useGroupId, + }, + data: { + crossProjectReleases: parameters.crossProjectReleases, + customFields: parameters.customFields, + exclusionRules: parameters.exclusionRules, + issueSources: parameters.issueSources, + leadAccountId: parameters.leadAccountId, + name: parameters.name, + permissions: parameters.permissions, + scheduling: parameters.scheduling, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Archives a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async archivePlan(parameters: Parameters.ArchivePlan, callback: Callback): Promise; + /** + * Archives a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async archivePlan(parameters: Parameters.ArchivePlan, callback?: never): Promise; + async archivePlan(parameters: Parameters.ArchivePlan, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/3/plans/plan/${parameters.planId}/archive`, + method: 'PUT', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Duplicates a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async duplicatePlan(parameters: Parameters.DuplicatePlan, callback: Callback): Promise; + /** + * Duplicates a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async duplicatePlan(parameters: Parameters.DuplicatePlan, callback?: never): Promise; + async duplicatePlan(parameters: Parameters.DuplicatePlan, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/3/plans/plan/${parameters.planId}/duplicate`, + method: 'POST', + data: { + name: parameters.name, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Moves a plan to trash. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async trashPlan(parameters: Parameters.TrashPlan, callback: Callback): Promise; + /** + * Moves a plan to trash. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async trashPlan(parameters: Parameters.TrashPlan, callback?: never): Promise; + async trashPlan(parameters: Parameters.TrashPlan, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/3/plans/plan/${parameters.planId}/trash`, + method: 'PUT', + }; + + return this.client.sendRequest(config, callback); + } +} diff --git a/src/version3/prioritySchemes.ts b/src/version3/prioritySchemes.ts new file mode 100644 index 0000000000..c38f4c5b48 --- /dev/null +++ b/src/version3/prioritySchemes.ts @@ -0,0 +1,330 @@ +import * as Models from './models'; +import * as Parameters from './parameters'; +import { Client } from '../clients'; +import { Callback } from '../callback'; +import { RequestConfig } from '../requestConfig'; +import { paramSerializer } from '../paramSerializer'; +import { Paginated } from '../paginated'; + +export class PrioritySchemes { + constructor(private client: Client) {} + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of + * priority schemes. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * Permission to access Jira. + */ + async getPrioritySchemes>( + parameters: Parameters.GetPrioritySchemes | undefined, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of + * priority schemes. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * Permission to access Jira. + */ + async getPrioritySchemes>( + parameters?: Parameters.GetPrioritySchemes, + callback?: never, + ): Promise; + async getPrioritySchemes>( + parameters?: Parameters.GetPrioritySchemes, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/priorityscheme', + method: 'GET', + params: { + startAt: parameters?.startAt, + maxResults: parameters?.maxResults, + priorityId: paramSerializer('priorityId', parameters?.priorityId), + schemeId: paramSerializer('schemeId', parameters?.schemeId), + schemeName: parameters?.schemeName, + onlyDefault: parameters?.onlyDefault, + orderBy: parameters?.orderBy, + expand: parameters?.expand, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Creates a new priority scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async createPriorityScheme( + parameters: Parameters.CreatePriorityScheme, + callback: Callback, + ): Promise; + /** + * Creates a new priority scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async createPriorityScheme( + parameters: Parameters.CreatePriorityScheme, + callback?: never, + ): Promise; + async createPriorityScheme( + parameters: Parameters.CreatePriorityScheme, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/priorityscheme', + method: 'POST', + data: { + defaultPriorityId: parameters.defaultPriorityId, + description: parameters.description, + mappings: parameters.mappings, + name: parameters.name, + priorityIds: parameters.priorityIds, + projectIds: parameters.projectIds, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of + * priorities that would require mapping, given a change in priorities or projects associated with a priority scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * Permission to access Jira. + */ + async suggestedPrioritiesForMappings>( + parameters: Parameters.SuggestedPrioritiesForMappings | undefined, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of + * priorities that would require mapping, given a change in priorities or projects associated with a priority scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * Permission to access Jira. + */ + async suggestedPrioritiesForMappings>( + parameters?: Parameters.SuggestedPrioritiesForMappings, + callback?: never, + ): Promise; + async suggestedPrioritiesForMappings>( + parameters?: Parameters.SuggestedPrioritiesForMappings, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/priorityscheme/mappings', + method: 'POST', + data: { + maxResults: parameters?.maxResults, + priorities: parameters?.priorities, + projects: parameters?.projects, + schemeId: parameters?.schemeId, + startAt: parameters?.startAt, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of + * priorities available for adding to a priority scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * Permission to access Jira. + */ + async getAvailablePrioritiesByPriorityScheme>( + parameters: Parameters.GetAvailablePrioritiesByPriorityScheme, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of + * priorities available for adding to a priority scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * Permission to access Jira. + */ + async getAvailablePrioritiesByPriorityScheme>( + parameters: Parameters.GetAvailablePrioritiesByPriorityScheme, + callback?: never, + ): Promise; + async getAvailablePrioritiesByPriorityScheme>( + parameters: Parameters.GetAvailablePrioritiesByPriorityScheme, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/priorityscheme/priorities/available', + method: 'GET', + params: { + startAt: parameters.startAt, + maxResults: parameters.maxResults, + query: parameters.query, + schemeId: parameters.schemeId, + exclude: parameters.exclude, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Updates a priority scheme. This includes its details, the lists of priorities and projects in it + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async updatePriorityScheme( + parameters: Parameters.UpdatePriorityScheme, + callback: Callback, + ): Promise; + /** + * Updates a priority scheme. This includes its details, the lists of priorities and projects in it + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async updatePriorityScheme( + parameters: Parameters.UpdatePriorityScheme, + callback?: never, + ): Promise; + async updatePriorityScheme( + parameters: Parameters.UpdatePriorityScheme, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/priorityscheme/${parameters.schemeId}`, + method: 'PUT', + data: { + defaultPriorityId: parameters.defaultPriorityId, + description: parameters.description, + mappings: parameters.mappings, + name: parameters.name, + priorities: parameters.priorities, + projects: parameters.projects, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Deletes a priority scheme. + * + * This operation is only available for priority schemes without any associated projects. Any associated projects must + * be removed from the priority scheme before this operation can be performed. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async deletePriorityScheme( + parameters: Parameters.DeletePriorityScheme, + callback: Callback, + ): Promise; + /** + * Deletes a priority scheme. + * + * This operation is only available for priority schemes without any associated projects. Any associated projects must + * be removed from the priority scheme before this operation can be performed. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async deletePriorityScheme(parameters: Parameters.DeletePriorityScheme, callback?: never): Promise; + async deletePriorityScheme( + parameters: Parameters.DeletePriorityScheme, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/priorityscheme/${parameters.schemeId}`, + method: 'DELETE', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of + * priorities by scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * Permission to access Jira. + */ + async getPrioritiesByPriorityScheme>( + parameters: Parameters.GetPrioritiesByPriorityScheme, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of + * priorities by scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * Permission to access Jira. + */ + async getPrioritiesByPriorityScheme>( + parameters: Parameters.GetPrioritiesByPriorityScheme, + callback?: never, + ): Promise; + async getPrioritiesByPriorityScheme>( + parameters: Parameters.GetPrioritiesByPriorityScheme, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/priorityscheme/${parameters.schemeId}/priorities`, + method: 'GET', + params: { + startAt: parameters.startAt, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of + * projects by scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * Permission to access Jira. + */ + async getProjectsByPriorityScheme( + parameters: Parameters.GetProjectsByPriorityScheme, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of + * projects by scheme. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * Permission to access Jira. + */ + async getProjectsByPriorityScheme( + parameters: Parameters.GetProjectsByPriorityScheme, + callback?: never, + ): Promise; + async getProjectsByPriorityScheme( + parameters: Parameters.GetProjectsByPriorityScheme, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/priorityscheme/${parameters.schemeId}/projects`, + method: 'GET', + params: { + startAt: parameters.startAt, + maxResults: parameters.maxResults, + projectId: paramSerializer('projectId', parameters.projectId), + query: parameters.query, + }, + }; + + return this.client.sendRequest(config, callback); + } +} diff --git a/src/version3/projectAvatars.ts b/src/version3/projectAvatars.ts index f343761268..c5a799057d 100644 --- a/src/version3/projectAvatars.ts +++ b/src/version3/projectAvatars.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ProjectAvatars { @@ -79,29 +79,14 @@ export class ProjectAvatars { * * Specify the avatar's local file location in the body of the request. Also, include the following headers: * - * - `X-Atlassian-Token: no-check` To prevent XSRF protection blocking the request, for more information see [Special - * Headers](#special-request-headers). - * - `Content-Type: image/image type` Valid image types are JPEG, GIF, or PNG. - * - * For example: `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/project/{projectIdOrKey}/avatar2'` - * * The 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. * * The cropped image is then used to create avatars of 16x16, 24x24, 32x32, and 48x48 in size. * - * After creating the avatar use [Set project avatar](#api-rest-api-3-project-projectIdOrKey-avatar-put) to set it as - * the project's displayed avatar. + * After creating the avatar use [Set project + * avatar](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-avatars/#api-rest-api-3-project-projectidorkey-avatar-put) + * to set it as the project's displayed avatar. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer projects_ [project permission](https://confluence.atlassian.com/x/yodKLg). @@ -113,31 +98,14 @@ export class ProjectAvatars { /** * Loads an avatar for a project. * - * Specify the avatar's local file location in the body of the request. Also, include the following headers: - * - * - `X-Atlassian-Token: no-check` To prevent XSRF protection blocking the request, for more information see [Special - * Headers](#special-request-headers). - * - `Content-Type: image/image type` Valid image types are JPEG, GIF, or PNG. - * - * For example: `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/project/{projectIdOrKey}/avatar2'` - * * The 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. * * The cropped image is then used to create avatars of 16x16, 24x24, 32x32, and 48x48 in size. * - * After creating the avatar use [Set project avatar](#api-rest-api-3-project-projectIdOrKey-avatar-put) to set it as - * the project's displayed avatar. + * After creating the avatar use [Set project + * avatar](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-avatars/#api-rest-api-3-project-projectidorkey-avatar-put) + * to set it as the project's displayed avatar. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer projects_ [project permission](https://confluence.atlassian.com/x/yodKLg). @@ -153,10 +121,14 @@ export class ProjectAvatars { const config: RequestConfig = { url: `/rest/api/3/project/${parameters.projectIdOrKey}/avatar2`, method: 'POST', + headers: { + 'X-Atlassian-Token': 'no-check', + 'Content-Type': parameters.mimeType, + }, params: { x: parameters.x, y: parameters.y, - size: parameters.size, + size: parameters.size ?? 0, }, data: parameters.avatar, }; diff --git a/src/version3/projectCategories.ts b/src/version3/projectCategories.ts index 8e5ff3c321..93c1040aca 100644 --- a/src/version3/projectCategories.ts +++ b/src/version3/projectCategories.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ProjectCategories { diff --git a/src/version3/projectClassificationLevels.ts b/src/version3/projectClassificationLevels.ts new file mode 100644 index 0000000000..4db3358568 --- /dev/null +++ b/src/version3/projectClassificationLevels.ts @@ -0,0 +1,121 @@ +import * as Parameters from './parameters'; +import { Client } from '../clients'; +import { Callback } from '../callback'; +import { RequestConfig } from '../requestConfig'; + +export class ProjectClassificationLevels { + constructor(private client: Client) {} + + /** + * Returns the default data classification for a project. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Browse Projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * - _Administer projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * - _Administer jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getDefaultProjectClassification( + parameters: Parameters.GetDefaultProjectClassification, + callback: Callback, + ): Promise; + /** + * Returns the default data classification for a project. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Browse Projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * - _Administer projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * - _Administer jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getDefaultProjectClassification( + parameters: Parameters.GetDefaultProjectClassification, + callback?: never, + ): Promise; + async getDefaultProjectClassification( + parameters: Parameters.GetDefaultProjectClassification, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/project/${parameters.projectIdOrKey}/classification-level/default`, + method: 'GET', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Updates the default data classification level for a project. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * - _Administer jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async updateDefaultProjectClassification( + parameters: Parameters.UpdateDefaultProjectClassification, + callback: Callback, + ): Promise; + /** + * Updates the default data classification level for a project. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * - _Administer jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async updateDefaultProjectClassification( + parameters: Parameters.UpdateDefaultProjectClassification, + callback?: never, + ): Promise; + async updateDefaultProjectClassification( + parameters: Parameters.UpdateDefaultProjectClassification, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/project/${parameters.projectIdOrKey}/classification-level/default`, + method: 'PUT', + data: { + id: parameters.id, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Remove the default data classification level for a project. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * - _Administer jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async removeDefaultProjectClassification( + parameters: Parameters.RemoveDefaultProjectClassification, + callback: Callback, + ): Promise; + /** + * Remove the default data classification level for a project. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * - _Administer jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async removeDefaultProjectClassification( + parameters: Parameters.RemoveDefaultProjectClassification, + callback?: never, + ): Promise; + async removeDefaultProjectClassification( + parameters: Parameters.RemoveDefaultProjectClassification, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/project/${parameters.projectIdOrKey}/classification-level/default`, + method: 'DELETE', + }; + + return this.client.sendRequest(config, callback); + } +} diff --git a/src/version3/projectComponents.ts b/src/version3/projectComponents.ts index 2a2456c58b..f60cf3d106 100644 --- a/src/version3/projectComponents.ts +++ b/src/version3/projectComponents.ts @@ -1,14 +1,61 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; +import { Paginated } from '../paginated'; export class ProjectComponents { constructor(private client: Client) {} /** - * Creates a component. Use components to provide containers for issues within a project. + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of all + * components in a project, including global (Compass) components when applicable. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** _Browse + * Projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + */ + async findComponentsForProjects>( + parameters: Parameters.FindComponentsForProjects, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of all + * components in a project, including global (Compass) components when applicable. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** _Browse + * Projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + */ + async findComponentsForProjects>( + parameters: Parameters.FindComponentsForProjects, + callback?: never, + ): Promise; + async findComponentsForProjects>( + parameters: Parameters.FindComponentsForProjects, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/component', + method: 'GET', + params: { + projectIdsOrKeys: parameters.projectIdsOrKeys, + startAt: parameters.startAt, + maxResults: parameters.maxResults, + orderBy: parameters.orderBy, + query: parameters.query, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Creates a component. Use components to provide containers for issues within a project. Use components to provide + * containers for issues within a project. * * This operation can be accessed anonymously. * @@ -21,7 +68,8 @@ export class ProjectComponents { callback: Callback, ): Promise; /** - * Creates a component. Use components to provide containers for issues within a project. + * Creates a component. Use components to provide containers for issues within a project. Use components to provide + * containers for issues within a project. * * This operation can be accessed anonymously. * @@ -41,20 +89,22 @@ export class ProjectComponents { url: '/rest/api/3/component', method: 'POST', data: { - assignee: parameters?.assignee, - assigneeType: parameters?.assigneeType, - description: parameters?.description, - id: parameters?.id, - isAssigneeTypeValid: parameters?.isAssigneeTypeValid, - lead: parameters?.lead, - leadAccountId: parameters?.leadAccountId, - leadUserName: parameters?.leadUserName, - name: parameters?.name, - project: parameters?.project, - projectId: parameters?.projectId, - realAssignee: parameters?.realAssignee, - realAssigneeType: parameters?.realAssigneeType, - self: parameters?.self, + ari: parameters.ari, + assignee: parameters.assignee, + assigneeType: parameters.assigneeType, + description: parameters.description, + id: parameters.id, + isAssigneeTypeValid: parameters.isAssigneeTypeValid, + lead: parameters.lead, + leadAccountId: parameters.leadAccountId, + leadUserName: parameters.leadUserName, + metadata: parameters.metadata, + name: parameters.name, + project: parameters.project, + projectId: parameters.projectId, + realAssignee: parameters.realAssignee, + realAssigneeType: parameters.realAssigneeType, + self: parameters.self, }, }; @@ -179,6 +229,11 @@ export class ProjectComponents { * * This operation can be accessed anonymously. * + * **Deprecation notice:** The required OAuth 2.0 scopes will be updated on June 15, 2024. + * + * - **Classic**: `read:jira-work` + * - **Granular**: `read:field:jira`, `read:project.component:jira` + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. */ async getComponentRelatedIssues( @@ -190,6 +245,11 @@ export class ProjectComponents { * * This operation can be accessed anonymously. * + * **Deprecation notice:** The required OAuth 2.0 scopes will be updated on June 15, 2024. + * + * - **Classic**: `read:jira-work` + * - **Granular**: `read:field:jira`, `read:project.component:jira` + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. */ async getComponentRelatedIssues( @@ -213,6 +273,9 @@ export class ProjectComponents { * components in a project. See the [Get project components](#api-rest-api-3-project-projectIdOrKey-components-get) * resource if you want to get a full list of versions without pagination. * + * If your project uses Compass components, this API will return a list of Compass components that are linked to + * issues in that project. + * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** _Browse @@ -227,6 +290,9 @@ export class ProjectComponents { * components in a project. See the [Get project components](#api-rest-api-3-project-projectIdOrKey-components-get) * resource if you want to get a full list of versions without pagination. * + * If your project uses Compass components, this API will return a list of Compass components that are linked to + * issues in that project. + * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** _Browse @@ -247,6 +313,7 @@ export class ProjectComponents { startAt: parameters.startAt, maxResults: parameters.maxResults, orderBy: parameters.orderBy, + componentSource: parameters.componentSource, query: parameters.query, }, }; @@ -259,6 +326,9 @@ export class ProjectComponents { * paginated](#api-rest-api-3-project-projectIdOrKey-component-get) resource if you want to get a full list of * components with pagination. * + * If your project uses Compass components, this API will return a paginated list of Compass components that are + * linked to issues in that project. + * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** _Browse @@ -273,6 +343,9 @@ export class ProjectComponents { * paginated](#api-rest-api-3-project-projectIdOrKey-component-get) resource if you want to get a full list of * components with pagination. * + * If your project uses Compass components, this API will return a paginated list of Compass components that are + * linked to issues in that project. + * * This operation can be accessed anonymously. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** _Browse @@ -289,6 +362,9 @@ export class ProjectComponents { const config: RequestConfig = { url: `/rest/api/3/project/${parameters.projectIdOrKey}/components`, method: 'GET', + params: { + componentSource: parameters.componentSource, + }, }; return this.client.sendRequest(config, callback); diff --git a/src/version3/projectEmail.ts b/src/version3/projectEmail.ts index ae27bbbdea..c7c07671b2 100644 --- a/src/version3/projectEmail.ts +++ b/src/version3/projectEmail.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ProjectEmail { @@ -46,8 +46,9 @@ export class ProjectEmail { * * If `emailAddress` is an empty string, the default email address is restored. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** _Browse - * projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Administer Projects_ [project + * permission.](https://confluence.atlassian.com/x/yodKLg) */ async updateProjectEmail(parameters: Parameters.UpdateProjectEmail, callback: Callback): Promise; /** @@ -55,8 +56,9 @@ export class ProjectEmail { * * If `emailAddress` is an empty string, the default email address is restored. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** _Browse - * projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Administer Projects_ [project + * permission.](https://confluence.atlassian.com/x/yodKLg) */ async updateProjectEmail(parameters: Parameters.UpdateProjectEmail, callback?: never): Promise; async updateProjectEmail( diff --git a/src/version3/projectFeatures.ts b/src/version3/projectFeatures.ts index c7c080500c..3ea858612d 100644 --- a/src/version3/projectFeatures.ts +++ b/src/version3/projectFeatures.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ProjectFeatures { diff --git a/src/version3/projectKeyAndNameValidation.ts b/src/version3/projectKeyAndNameValidation.ts index 811c7d0d93..bd6fe78813 100644 --- a/src/version3/projectKeyAndNameValidation.ts +++ b/src/version3/projectKeyAndNameValidation.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ProjectKeyAndNameValidation { @@ -47,7 +47,7 @@ export class ProjectKeyAndNameValidation { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. */ - async getValidProjectKey( + async getValidProjectKey( parameters: Parameters.GetValidProjectKey | string | undefined, callback: Callback, ): Promise; @@ -56,11 +56,11 @@ export class ProjectKeyAndNameValidation { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. */ - async getValidProjectKey( + async getValidProjectKey( parameters?: Parameters.GetValidProjectKey | string, callback?: never, ): Promise; - async getValidProjectKey( + async getValidProjectKey( parameters?: Parameters.GetValidProjectKey | string, callback?: Callback, ): Promise { @@ -84,7 +84,7 @@ export class ProjectKeyAndNameValidation { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. */ - async getValidProjectName( + async getValidProjectName( parameters: Parameters.GetValidProjectName | string, callback: Callback, ): Promise; @@ -95,11 +95,11 @@ export class ProjectKeyAndNameValidation { * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** None. */ - async getValidProjectName( + async getValidProjectName( parameters: Parameters.GetValidProjectName | string, callback?: never, ): Promise; - async getValidProjectName( + async getValidProjectName( parameters: Parameters.GetValidProjectName | string, callback?: Callback, ): Promise { diff --git a/src/version3/projectPermissionSchemes.ts b/src/version3/projectPermissionSchemes.ts index 3beb67dca1..ab4e145326 100644 --- a/src/version3/projectPermissionSchemes.ts +++ b/src/version3/projectPermissionSchemes.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ProjectPermissionSchemes { diff --git a/src/version3/projectProperties.ts b/src/version3/projectProperties.ts index 9c80b3a9ee..333400b5d2 100644 --- a/src/version3/projectProperties.ts +++ b/src/version3/projectProperties.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ProjectProperties { diff --git a/src/version3/projectRoleActors.ts b/src/version3/projectRoleActors.ts index 227a24ac32..6f41714e38 100644 --- a/src/version3/projectRoleActors.ts +++ b/src/version3/projectRoleActors.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ProjectRoleActors { @@ -44,9 +44,9 @@ export class ProjectRoleActors { url: `/rest/api/3/project/${parameters.projectIdOrKey}/role/${parameters.id}`, method: 'POST', data: { - user: parameters.user, group: parameters.group, groupId: parameters.groupId, + user: parameters.user, }, }; @@ -195,9 +195,9 @@ export class ProjectRoleActors { url: `/rest/api/3/role/${parameters.id}/actors`, method: 'POST', data: { - user: parameters.user, - groupId: parameters.groupId, group: parameters.group, + groupId: parameters.groupId, + user: parameters.user, }, }; diff --git a/src/version3/projectRoles.ts b/src/version3/projectRoles.ts index 36bf07a571..64005bdc68 100644 --- a/src/version3/projectRoles.ts +++ b/src/version3/projectRoles.ts @@ -1,15 +1,16 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ProjectRoles { constructor(private client: Client) {} /** - * Returns a list of [project roles](https://confluence.atlassian.com/x/3odKLg) for the project returning the name and - * self URL for each role. + * Returns a list of [project + * roles](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/) for the project + * returning the name and self URL for each role. * * Note 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. @@ -25,8 +26,9 @@ export class ProjectRoles { callback: Callback, ): Promise; /** - * Returns a list of [project roles](https://confluence.atlassian.com/x/3odKLg) for the project returning the name and - * self URL for each role. + * Returns a list of [project + * roles](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/) for the project + * returning the name and self URL for each role. * * Note 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. @@ -104,8 +106,8 @@ export class ProjectRoles { } /** - * 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. + * Returns all [project roles](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/) and + * the details for each role. Note that the list of project roles is common to all projects. * * This operation can be accessed anonymously. * @@ -118,8 +120,8 @@ export class ProjectRoles { callback: Callback, ): Promise; /** - * 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. + * Returns all [project roles](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/) and + * the details for each role. Note that the list of project roles is common to all projects. * * This operation can be accessed anonymously. * @@ -154,10 +156,10 @@ export class ProjectRoles { * * ### About project roles * - * [Project roles](https://confluence.atlassian.com/x/3odKLg) are a flexible way to to associate users and groups with - * projects. In Jira Cloud, the list of project roles is shared globally with all projects, but each project can have - * a different set of actors associated with it (unlike groups, which have the same membership throughout all Jira - * applications). + * [Project roles](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/) are a flexible + * way to to associate users and groups with projects. In Jira Cloud, the list of project roles is shared globally + * with all projects, but each project can have a different set of actors associated with it (unlike groups, which + * have the same membership throughout all Jira applications). * * Project roles are used in [permission schemes](#api-rest-api-3-permissionscheme-get), [email notification * schemes](#api-rest-api-3-notificationscheme-get), [issue security @@ -170,7 +172,7 @@ export class ProjectRoles { * with a project role. * * Actors may be set as [default - * members](https://confluence.atlassian.com/x/3odKLg#Managingprojectroles-Specifying'defaultmembers'foraprojectrole) + * members](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/#Specifying-'default-members'-for-a-project-role) * of the project role or set at the project level: * * - Default actors: Users and groups that are assigned to the project role for all newly created projects. The default @@ -187,10 +189,10 @@ export class ProjectRoles { * * ### About project roles * - * [Project roles](https://confluence.atlassian.com/x/3odKLg) are a flexible way to to associate users and groups with - * projects. In Jira Cloud, the list of project roles is shared globally with all projects, but each project can have - * a different set of actors associated with it (unlike groups, which have the same membership throughout all Jira - * applications). + * [Project roles](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/) are a flexible + * way to to associate users and groups with projects. In Jira Cloud, the list of project roles is shared globally + * with all projects, but each project can have a different set of actors associated with it (unlike groups, which + * have the same membership throughout all Jira applications). * * Project roles are used in [permission schemes](#api-rest-api-3-permissionscheme-get), [email notification * schemes](#api-rest-api-3-notificationscheme-get), [issue security @@ -203,7 +205,7 @@ export class ProjectRoles { * with a project role. * * Actors may be set as [default - * members](https://confluence.atlassian.com/x/3odKLg#Managingprojectroles-Specifying'defaultmembers'foraprojectrole) + * members](https://support.atlassian.com/jira-cloud-administration/docs/manage-project-roles/#Specifying-'default-members'-for-a-project-role) * of the project role or set at the project level: * * - Default actors: Users and groups that are assigned to the project role for all newly created projects. The default @@ -262,8 +264,8 @@ export class ProjectRoles { url: '/rest/api/3/role', method: 'POST', data: { - name: parameters.name, description: parameters.description, + name: parameters.name, }, }; @@ -340,8 +342,8 @@ export class ProjectRoles { url: `/rest/api/3/role/${parameters.id}`, method: 'POST', data: { - name: parameters.name, description: parameters.description, + name: parameters.name, }, }; @@ -376,8 +378,8 @@ export class ProjectRoles { url: `/rest/api/3/role/${parameters.id}`, method: 'PUT', data: { - name: parameters.name, description: parameters.description, + name: parameters.name, }, }; diff --git a/src/version3/projectTypes.ts b/src/version3/projectTypes.ts index 580dc24706..0544663c72 100644 --- a/src/version3/projectTypes.ts +++ b/src/version3/projectTypes.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ProjectTypes { diff --git a/src/version3/projectVersions.ts b/src/version3/projectVersions.ts index 5a53a87d9c..2c8cf92afb 100644 --- a/src/version3/projectVersions.ts +++ b/src/version3/projectVersions.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ProjectVersions { @@ -130,22 +130,24 @@ export class ProjectVersions { url: '/rest/api/3/version', method: 'POST', data: { + approvers: parameters.approvers, + archived: parameters.archived, + description: parameters.description, + driver: parameters.driver, expand: parameters.expand, - self: parameters.self, id: parameters.id, - description: parameters.description, + issuesStatusForFixVersion: parameters.issuesStatusForFixVersion, + moveUnfixedIssuesTo: parameters.moveUnfixedIssuesTo, name: parameters.name, - archived: parameters.archived, + operations: parameters.operations, + overdue: parameters.overdue, + projectId: parameters.projectId, + releaseDate: parameters.releaseDate, released: parameters.released, + self: parameters.self, startDate: parameters.startDate, - releaseDate: parameters.releaseDate, - overdue: parameters.overdue, - userStartDate: parameters.userStartDate, userReleaseDate: parameters.userReleaseDate, - projectId: parameters.projectId, - moveUnfixedIssuesTo: parameters.moveUnfixedIssuesTo, - operations: parameters.operations, - issuesStatusForFixVersion: parameters.issuesStatusForFixVersion, + userStartDate: parameters.userStartDate, }, }; @@ -218,6 +220,8 @@ export class ProjectVersions { url: `/rest/api/3/version/${parameters.id}`, method: 'PUT', data: { + approvers: parameters.approvers, + driver: parameters.driver, expand: parameters.expand, description: parameters.description, name: parameters.name, @@ -347,6 +351,140 @@ export class ProjectVersions { return this.client.sendRequest(config, callback); } + /** + * Returns related work items for the given version id. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** _Browse + * projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the version. + */ + async getRelatedWork( + parameters: Parameters.GetRelatedWork, + callback: Callback, + ): Promise; + /** + * Returns related work items for the given version id. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** _Browse + * projects_ [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the version. + */ + async getRelatedWork( + parameters: Parameters.GetRelatedWork, + callback?: never, + ): Promise; + async getRelatedWork( + parameters: Parameters.GetRelatedWork, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/version/${parameters.id}/relatedwork`, + method: 'GET', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Creates a related work for the given version. You can only create a generic link type of related works via this + * API. relatedWorkId will be auto-generated UUID, that does not need to be provided. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Resolve issues:_ and _Edit issues_ [Managing project + * permissions](https://confluence.atlassian.com/adminjiraserver/managing-project-permissions-938847145.html) for the + * project that contains the version. + */ + async createRelatedWork( + parameters: Parameters.CreateRelatedWork, + callback: Callback, + ): Promise; + /** + * Creates a related work for the given version. You can only create a generic link type of related works via this + * API. relatedWorkId will be auto-generated UUID, that does not need to be provided. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Resolve issues:_ and _Edit issues_ [Managing project + * permissions](https://confluence.atlassian.com/adminjiraserver/managing-project-permissions-938847145.html) for the + * project that contains the version. + */ + async createRelatedWork( + parameters: Parameters.CreateRelatedWork, + callback?: never, + ): Promise; + async createRelatedWork( + parameters: Parameters.CreateRelatedWork, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/version/${parameters.id}/relatedwork`, + method: 'POST', + data: { + category: parameters.category, + issueId: parameters.issueId, + relatedWorkId: parameters.relatedWorkId, + title: parameters.title, + url: parameters.url, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Updates the given related work. You can only update generic link related works via Rest APIs. Any archived version + * related works can't be edited. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Resolve issues:_ and _Edit issues_ [Managing project + * permissions](https://confluence.atlassian.com/adminjiraserver/managing-project-permissions-938847145.html) for the + * project that contains the version. + */ + async updateRelatedWork( + parameters: Parameters.UpdateRelatedWork, + callback: Callback, + ): Promise; + /** + * Updates the given related work. You can only update generic link related works via Rest APIs. Any archived version + * related works can't be edited. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Resolve issues:_ and _Edit issues_ [Managing project + * permissions](https://confluence.atlassian.com/adminjiraserver/managing-project-permissions-938847145.html) for the + * project that contains the version. + */ + async updateRelatedWork( + parameters: Parameters.UpdateRelatedWork, + callback?: never, + ): Promise; + async updateRelatedWork( + parameters: Parameters.UpdateRelatedWork, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/version/${parameters.id}/relatedwork`, + method: 'PUT', + data: { + category: parameters.category, + issueId: parameters.issueId, + relatedWorkId: parameters.relatedWorkId, + title: parameters.title, + url: parameters.url, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Deletes a project version. * @@ -390,9 +528,9 @@ export class ProjectVersions { url: `/rest/api/3/version/${parameters.id}/removeAndSwap`, method: 'POST', data: { - moveFixIssuesTo: parameters.moveFixIssuesTo, - moveAffectedIssuesTo: parameters.moveAffectedIssuesTo, customFieldReplacementList: parameters.customFieldReplacementList, + moveAffectedIssuesTo: parameters.moveAffectedIssuesTo, + moveFixIssuesTo: parameters.moveFixIssuesTo, }, }; @@ -436,4 +574,38 @@ export class ProjectVersions { return this.client.sendRequest(config, callback); } + + /** + * Deletes the given related work for the given version. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Resolve issues:_ and _Edit issues_ [Managing project + * permissions](https://confluence.atlassian.com/adminjiraserver/managing-project-permissions-938847145.html) for the + * project that contains the version. + */ + async deleteRelatedWork(parameters: Parameters.DeleteRelatedWork, callback: Callback): Promise; + /** + * Deletes the given related work for the given version. + * + * This operation can be accessed anonymously. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Resolve issues:_ and _Edit issues_ [Managing project + * permissions](https://confluence.atlassian.com/adminjiraserver/managing-project-permissions-938847145.html) for the + * project that contains the version. + */ + async deleteRelatedWork(parameters: Parameters.DeleteRelatedWork, callback?: never): Promise; + async deleteRelatedWork( + parameters: Parameters.DeleteRelatedWork, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/version/${parameters.versionId}/relatedwork/${parameters.relatedWorkId}`, + method: 'DELETE', + }; + + return this.client.sendRequest(config, callback); + } } diff --git a/src/version3/projects.ts b/src/version3/projects.ts index 1272ee5e71..f05662bb55 100644 --- a/src/version3/projects.ts +++ b/src/version3/projects.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Projects { @@ -10,11 +10,11 @@ export class Projects { /** * Creates a project based on a project type template, as shown in the following table: * - * | Project Type Key | Project Template Key | - * | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `business` | `com.atlassian.jira-core-project-templates:jira-core-simplified-content-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval`, `com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking`, `com.atlassian.jira-core-project-templates:jira-core-simplified-process-control`, `com.atlassian.jira-core-project-templates:jira-core-simplified-procurement`, `com.atlassian.jira-core-project-templates:jira-core-simplified-project-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment`, `com.atlassian.jira-core-project-templates:jira-core-simplified-task-tracking` | - * | `service_desk` | `com.atlassian.servicedesk:simplified-it-service-management`, `com.atlassian.servicedesk:simplified-general-service-desk-it`, `com.atlassian.servicedesk:simplified-general-service-desk-business`, `com.atlassian.servicedesk:simplified-internal-service-desk`, `com.atlassian.servicedesk:simplified-external-service-desk`, `com.atlassian.servicedesk:simplified-hr-service-desk`, `com.atlassian.servicedesk:simplified-facilities-service-desk`, `com.atlassian.servicedesk:simplified-legal-service-desk`, `com.atlassian.servicedesk:simplified-analytics-service-desk`, `com.atlassian.servicedesk:simplified-marketing-service-desk`, `com.atlassian.servicedesk:simplified-design-service-desk`, `com.atlassian.servicedesk:simplified-sales-service-desk`, `com.atlassian.servicedesk:simplified-finance-service-desk` | - * | `software` | `com.pyxis.greenhopper.jira:gh-simplified-agility-kanban`, `com.pyxis.greenhopper.jira:gh-simplified-agility-scrum`, `com.pyxis.greenhopper.jira:gh-simplified-basic`, `com.pyxis.greenhopper.jira:gh-cross-team-template`, `com.pyxis.greenhopper.jira:gh-simplified-kanban-classic`, `com.pyxis.greenhopper.jira:gh-simplified-scrum-classic` | + * | Project Type Key | Project Template Key | + * | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `business` | `com.atlassian.jira-core-project-templates:jira-core-simplified-content-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval`, `com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking`, `com.atlassian.jira-core-project-templates:jira-core-simplified-process-control`, `com.atlassian.jira-core-project-templates:jira-core-simplified-procurement`, `com.atlassian.jira-core-project-templates:jira-core-simplified-project-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment`, `com.atlassian.jira-core-project-templates:jira-core-simplified-task-tracking` | + * | `service_desk` | `com.atlassian.servicedesk:simplified-it-service-management`, `com.atlassian.servicedesk:simplified-general-service-desk-it`, `com.atlassian.servicedesk:simplified-general-service-desk-business`, `com.atlassian.servicedesk:simplified-external-service-desk`, `com.atlassian.servicedesk:simplified-hr-service-desk`, `com.atlassian.servicedesk:simplified-facilities-service-desk`, `com.atlassian.servicedesk:simplified-legal-service-desk`, `com.atlassian.servicedesk:simplified-analytics-service-desk`, `com.atlassian.servicedesk:simplified-marketing-service-desk`, `com.atlassian.servicedesk:simplified-design-service-desk`, `com.atlassian.servicedesk:simplified-sales-service-desk`, `com.atlassian.servicedesk:simplified-blank-project-business`, `com.atlassian.servicedesk:simplified-blank-project-it`, `com.atlassian.servicedesk:simplified-finance-service-desk`, `com.atlassian.servicedesk:next-gen-it-service-desk`, `com.atlassian.servicedesk:next-gen-hr-service-desk`, `com.atlassian.servicedesk:next-gen-legal-service-desk`, `com.atlassian.servicedesk:next-gen-marketing-service-desk`, `com.atlassian.servicedesk:next-gen-facilities-service-desk`, `com.atlassian.servicedesk:next-gen-general-it-service-desk`, `com.atlassian.servicedesk:next-gen-general-business-service-desk`, `com.atlassian.servicedesk:next-gen-analytics-service-desk`, `com.atlassian.servicedesk:next-gen-finance-service-desk`, `com.atlassian.servicedesk:next-gen-design-service-desk`, `com.atlassian.servicedesk:next-gen-sales-service-desk` | + * | `software` | `com.pyxis.greenhopper.jira:gh-simplified-agility-kanban`, `com.pyxis.greenhopper.jira:gh-simplified-agility-scrum`, `com.pyxis.greenhopper.jira:gh-simplified-basic`, `com.pyxis.greenhopper.jira:gh-simplified-kanban-classic`, `com.pyxis.greenhopper.jira:gh-simplified-scrum-classic` | * * The project types are available according to the installed Jira features as follows: * @@ -37,11 +37,11 @@ export class Projects { /** * Creates a project based on a project type template, as shown in the following table: * - * | Project Type Key | Project Template Key | - * | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `business` | `com.atlassian.jira-core-project-templates:jira-core-simplified-content-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval`, `com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking`, `com.atlassian.jira-core-project-templates:jira-core-simplified-process-control`, `com.atlassian.jira-core-project-templates:jira-core-simplified-procurement`, `com.atlassian.jira-core-project-templates:jira-core-simplified-project-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment`, `com.atlassian.jira-core-project-templates:jira-core-simplified-task-tracking` | - * | `service_desk` | `com.atlassian.servicedesk:simplified-it-service-management`, `com.atlassian.servicedesk:simplified-general-service-desk-it`, `com.atlassian.servicedesk:simplified-general-service-desk-business`, `com.atlassian.servicedesk:simplified-internal-service-desk`, `com.atlassian.servicedesk:simplified-external-service-desk`, `com.atlassian.servicedesk:simplified-hr-service-desk`, `com.atlassian.servicedesk:simplified-facilities-service-desk`, `com.atlassian.servicedesk:simplified-legal-service-desk`, `com.atlassian.servicedesk:simplified-analytics-service-desk`, `com.atlassian.servicedesk:simplified-marketing-service-desk`, `com.atlassian.servicedesk:simplified-design-service-desk`, `com.atlassian.servicedesk:simplified-sales-service-desk`, `com.atlassian.servicedesk:simplified-finance-service-desk` | - * | `software` | `com.pyxis.greenhopper.jira:gh-simplified-agility-kanban`, `com.pyxis.greenhopper.jira:gh-simplified-agility-scrum`, `com.pyxis.greenhopper.jira:gh-simplified-basic`, `com.pyxis.greenhopper.jira:gh-cross-team-template`, `com.pyxis.greenhopper.jira:gh-simplified-kanban-classic`, `com.pyxis.greenhopper.jira:gh-simplified-scrum-classic` | + * | Project Type Key | Project Template Key | + * | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `business` | `com.atlassian.jira-core-project-templates:jira-core-simplified-content-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval`, `com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking`, `com.atlassian.jira-core-project-templates:jira-core-simplified-process-control`, `com.atlassian.jira-core-project-templates:jira-core-simplified-procurement`, `com.atlassian.jira-core-project-templates:jira-core-simplified-project-management`, `com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment`, `com.atlassian.jira-core-project-templates:jira-core-simplified-task-tracking` | + * | `service_desk` | `com.atlassian.servicedesk:simplified-it-service-management`, `com.atlassian.servicedesk:simplified-general-service-desk-it`, `com.atlassian.servicedesk:simplified-general-service-desk-business`, `com.atlassian.servicedesk:simplified-external-service-desk`, `com.atlassian.servicedesk:simplified-hr-service-desk`, `com.atlassian.servicedesk:simplified-facilities-service-desk`, `com.atlassian.servicedesk:simplified-legal-service-desk`, `com.atlassian.servicedesk:simplified-analytics-service-desk`, `com.atlassian.servicedesk:simplified-marketing-service-desk`, `com.atlassian.servicedesk:simplified-design-service-desk`, `com.atlassian.servicedesk:simplified-sales-service-desk`, `com.atlassian.servicedesk:simplified-blank-project-business`, `com.atlassian.servicedesk:simplified-blank-project-it`, `com.atlassian.servicedesk:simplified-finance-service-desk`, `com.atlassian.servicedesk:next-gen-it-service-desk`, `com.atlassian.servicedesk:next-gen-hr-service-desk`, `com.atlassian.servicedesk:next-gen-legal-service-desk`, `com.atlassian.servicedesk:next-gen-marketing-service-desk`, `com.atlassian.servicedesk:next-gen-facilities-service-desk`, `com.atlassian.servicedesk:next-gen-general-it-service-desk`, `com.atlassian.servicedesk:next-gen-general-business-service-desk`, `com.atlassian.servicedesk:next-gen-analytics-service-desk`, `com.atlassian.servicedesk:next-gen-finance-service-desk`, `com.atlassian.servicedesk:next-gen-design-service-desk`, `com.atlassian.servicedesk:next-gen-sales-service-desk` | + * | `software` | `com.pyxis.greenhopper.jira:gh-simplified-agility-kanban`, `com.pyxis.greenhopper.jira:gh-simplified-agility-scrum`, `com.pyxis.greenhopper.jira:gh-simplified-basic`, `com.pyxis.greenhopper.jira:gh-simplified-kanban-classic`, `com.pyxis.greenhopper.jira:gh-simplified-scrum-classic` | * * The project types are available according to the installed Jira features as follows: * @@ -173,19 +173,19 @@ export class Projects { url: '/rest/api/3/project/search', method: 'GET', params: { - action: parameters?.action, - categoryId: parameters?.categoryId, - expand: parameters?.expand, - id: parameters?.id, - keys: parameters?.keys, + startAt: parameters?.startAt, maxResults: parameters?.maxResults, orderBy: parameters?.orderBy, - properties: parameters?.properties, - propertyQuery: parameters?.propertyQuery, + id: parameters?.id, + keys: parameters?.keys, query: parameters?.query, - startAt: parameters?.startAt, - status: parameters?.status, typeKey: parameters?.typeKey, + categoryId: parameters?.categoryId, + action: parameters?.action, + expand: parameters?.expand, + status: parameters?.status, + properties: parameters?.properties, + propertyQuery: parameters?.propertyQuery, }, }; @@ -234,19 +234,25 @@ export class Projects { /** * Updates the [project details](https://confluence.atlassian.com/x/ahLpNw) of a project. * - * All parameters are optional in the body of the request. + * All parameters are optional in the body of the request. Schemes will only be updated if they are included in the + * request, any omitted schemes will be left unchanged. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). is only needed when changing the + * schemes or project key. Otherwise you will only need _Administer Projects_ [project + * permission](https://confluence.atlassian.com/x/yodKLg) */ async updateProject(parameters: Parameters.UpdateProject, callback: Callback): Promise; /** * Updates the [project details](https://confluence.atlassian.com/x/ahLpNw) of a project. * - * All parameters are optional in the body of the request. + * All parameters are optional in the body of the request. Schemes will only be updated if they are included in the + * request, any omitted schemes will be left unchanged. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). is only needed when changing the + * schemes or project key. Otherwise you will only need _Administer Projects_ [project + * permission](https://confluence.atlassian.com/x/yodKLg) */ async updateProject(parameters: Parameters.UpdateProject, callback?: never): Promise; async updateProject( @@ -272,6 +278,7 @@ export class Projects { permissionScheme: parameters.permissionScheme, projectTemplateKey: parameters.projectTemplateKey, projectTypeKey: parameters.projectTypeKey, + releasedProjectKeys: parameters.releasedProjectKeys, url: parameters.url, }, }; @@ -398,14 +405,20 @@ export class Projects { * Restores a project that has been archived or placed in the Jira recycle bin. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg)for Company managed projects. + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Administer projects_ [project + * permission](https://confluence.atlassian.com/x/yodKLg) for the project for Team managed projects. */ async restore(parameters: Parameters.Restore | string, callback: Callback): Promise; /** * Restores a project that has been archived or placed in the Jira recycle bin. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** - * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg)for Company managed projects. + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Administer projects_ [project + * permission](https://confluence.atlassian.com/x/yodKLg) for the project for Team managed projects. */ async restore(parameters: Parameters.Restore | string, callback?: never): Promise; async restore( @@ -511,4 +524,41 @@ export class Projects { return this.client.sendRequest(config, callback); } + + /** + * Gets a [notification scheme](https://confluence.atlassian.com/x/8YdKLg) associated with the project. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Administer Projects_ [project + * permission](https://confluence.atlassian.com/x/yodKLg). + */ + async getNotificationSchemeForProject( + parameters: Parameters.GetNotificationSchemeForProject, + callback: Callback, + ): Promise; + /** + * Gets a [notification scheme](https://confluence.atlassian.com/x/8YdKLg) associated with the project. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Administer Projects_ [project + * permission](https://confluence.atlassian.com/x/yodKLg). + */ + async getNotificationSchemeForProject( + parameters: Parameters.GetNotificationSchemeForProject, + callback?: never, + ): Promise; + async getNotificationSchemeForProject( + parameters: Parameters.GetNotificationSchemeForProject, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/project/${parameters.projectKeyOrId}/notificationscheme`, + method: 'GET', + params: { + expand: parameters.expand, + }, + }; + + return this.client.sendRequest(config, callback); + } } diff --git a/src/version3/screenSchemes.ts b/src/version3/screenSchemes.ts index 0d105c2fdf..3f57c7a5aa 100644 --- a/src/version3/screenSchemes.ts +++ b/src/version3/screenSchemes.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ScreenSchemes { @@ -114,8 +114,8 @@ export class ScreenSchemes { url: `/rest/api/3/screenscheme/${parameters.screenSchemeId}`, method: 'PUT', data: { - name: parameters.name, description: parameters.description, + name: parameters.name, screens: parameters.screens, }, }; diff --git a/src/version3/screenTabFields.ts b/src/version3/screenTabFields.ts index 96de3f640e..9ef07edd53 100644 --- a/src/version3/screenTabFields.ts +++ b/src/version3/screenTabFields.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ScreenTabFields { diff --git a/src/version3/screenTabs.ts b/src/version3/screenTabs.ts index 370565a10f..683f5ccdc5 100644 --- a/src/version3/screenTabs.ts +++ b/src/version3/screenTabs.ts @@ -1,12 +1,50 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; +import { paramSerializer } from '../paramSerializer'; export class ScreenTabs { constructor(private client: Client) {} + /** + * Returns the list of tabs for a bulk of screens. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getBulkScreenTabs( + parameters: Parameters.GetBulkScreenTabs | undefined, + callback: Callback, + ): Promise; + /** + * Returns the list of tabs for a bulk of screens. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getBulkScreenTabs(parameters?: Parameters.GetBulkScreenTabs, callback?: never): Promise; + async getBulkScreenTabs( + parameters?: Parameters.GetBulkScreenTabs, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/screens/tabs', + method: 'GET', + params: { + screenId: paramSerializer('screenId', parameters?.screenId), + tabId: parameters?.tabId, + startAt: parameters?.startAt, + maxResult: parameters?.maxResult, + }, + }; + + return this.client.sendRequest(config, callback); + } + /** * Returns the list of tabs for a screen. * diff --git a/src/version3/screens.ts b/src/version3/screens.ts index 7a1c41365c..11bb5be54b 100644 --- a/src/version3/screens.ts +++ b/src/version3/screens.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Screens { @@ -109,8 +109,8 @@ export class Screens { url: '/rest/api/3/screens', method: 'POST', data: { - name: parameters.name, description: parameters.description, + name: parameters.name, }, }; @@ -173,8 +173,8 @@ export class Screens { url: `/rest/api/3/screens/${parameters.screenId}`, method: 'PUT', data: { - name: parameters.name, description: parameters.description, + name: parameters.name, }, }; diff --git a/src/version3/serverInfo.ts b/src/version3/serverInfo.ts index d1eb84ee3f..0e5d52465a 100644 --- a/src/version3/serverInfo.ts +++ b/src/version3/serverInfo.ts @@ -1,6 +1,6 @@ import * as Models from './models'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class ServerInfo { diff --git a/src/version3/serviceRegistry.ts b/src/version3/serviceRegistry.ts new file mode 100644 index 0000000000..b289f99d68 --- /dev/null +++ b/src/version3/serviceRegistry.ts @@ -0,0 +1,38 @@ +import * as Models from './models'; +import * as Parameters from './parameters'; +import { Client } from '../clients'; +import { Callback } from '../callback'; +import { RequestConfig } from '../requestConfig'; + +export class ServiceRegistry { + constructor(private client: Client) {} + + /** + * Retrieve the attributes of given service registries. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only + * Connect apps can make this request and the servicesIds belong to the tenant you are requesting + */ + async services(parameters: Parameters.Services, callback: Callback): Promise; + /** + * Retrieve the attributes of given service registries. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only + * Connect apps can make this request and the servicesIds belong to the tenant you are requesting + */ + async services(parameters: Parameters.Services, callback?: never): Promise; + async services( + parameters: Parameters.Services, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/atlassian-connect/1/service-registry', + method: 'GET', + params: { + serviceIds: parameters.serviceIds, + }, + }; + + return this.client.sendRequest(config, callback); + } +} diff --git a/src/version3/status.ts b/src/version3/status.ts index ac52b3a0a0..095e3ec058 100644 --- a/src/version3/status.ts +++ b/src/version3/status.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Status { @@ -42,7 +42,7 @@ export class Status { method: 'GET', params: { id, - expand: typeof parameters !== 'string' && parameters.expand, + expand: typeof parameters !== 'string' ? parameters.expand : undefined, }, }; @@ -78,8 +78,8 @@ export class Status { url: '/rest/api/3/statuses', method: 'POST', data: { - statuses: parameters.statuses, scope: parameters.scope, + statuses: parameters.statuses, }, }; @@ -193,4 +193,82 @@ export class Status { return this.client.sendRequest(config, callback); } + + /** Returns a page of issue types in a project using a given status. */ + async getProjectIssueTypeUsagesForStatus( + parameters: Parameters.GetProjectIssueTypeUsagesForStatus, + callback: Callback, + ): Promise; + /** Returns a page of issue types in a project using a given status. */ + async getProjectIssueTypeUsagesForStatus( + parameters: Parameters.GetProjectIssueTypeUsagesForStatus, + callback?: never, + ): Promise; + async getProjectIssueTypeUsagesForStatus( + parameters: Parameters.GetProjectIssueTypeUsagesForStatus, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/statuses/${parameters.statusId}/project/${parameters.projectId}/issueTypeUsages`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** Returns a page of projects using a given status. */ + async getProjectUsagesForStatus( + parameters: Parameters.GetProjectUsagesForStatus, + callback: Callback, + ): Promise; + /** Returns a page of projects using a given status. */ + async getProjectUsagesForStatus( + parameters: Parameters.GetProjectUsagesForStatus, + callback?: never, + ): Promise; + async getProjectUsagesForStatus( + parameters: Parameters.GetProjectUsagesForStatus, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/statuses/${parameters.statusId}/projectUsages`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** Returns a page of workflows using a given status. */ + async getWorkflowUsagesForStatus( + parameters: Parameters.GetWorkflowUsagesForStatus, + callback: Callback, + ): Promise; + /** Returns a page of workflows using a given status. */ + async getWorkflowUsagesForStatus( + parameters: Parameters.GetWorkflowUsagesForStatus, + callback?: never, + ): Promise; + async getWorkflowUsagesForStatus( + parameters: Parameters.GetWorkflowUsagesForStatus, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/statuses/${parameters.statusId}/workflowUsages`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } } diff --git a/src/version3/tasks.ts b/src/version3/tasks.ts index 12997fe418..1c5252e079 100644 --- a/src/version3/tasks.ts +++ b/src/version3/tasks.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Tasks { @@ -9,12 +9,16 @@ export class Tasks { /** * Returns the status of a [long-running asynchronous - * task](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). + * task](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations). * * When a task has finished, this operation returns the JSON blob applicable to the task. See the documentation of the * operation that created the task for details. Task details are not permanently retained. As of September 2019, * details are retained for 14 days although this period may change without notice. * + * **Deprecation notice:** The required OAuth 2.0 scopes will be updated on June 15, 2024. + * + * - `read:jira-work` + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** either * of: * @@ -27,12 +31,16 @@ export class Tasks { ): Promise; /** * Returns the status of a [long-running asynchronous - * task](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). + * task](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations). * * When a task has finished, this operation returns the JSON blob applicable to the task. See the documentation of the * operation that created the task for details. Task details are not permanently retained. As of September 2019, * details are retained for 14 days although this period may change without notice. * + * **Deprecation notice:** The required OAuth 2.0 scopes will be updated on June 15, 2024. + * + * - `read:jira-work` + * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** either * of: * diff --git a/src/version3/teamsInPlan.ts b/src/version3/teamsInPlan.ts new file mode 100644 index 0000000000..c046b450fb --- /dev/null +++ b/src/version3/teamsInPlan.ts @@ -0,0 +1,322 @@ +import * as Models from './models'; +import * as Parameters from './parameters'; +import { Client } from '../clients'; +import { Callback } from '../callback'; +import { RequestConfig } from '../requestConfig'; + +export class TeamsInPlan { + constructor(private client: Client) {} + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of + * plan-only and Atlassian teams in a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getTeams( + parameters: Parameters.GetTeams, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of + * plan-only and Atlassian teams in a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getTeams( + parameters: Parameters.GetTeams, + callback?: never, + ): Promise; + async getTeams( + parameters: Parameters.GetTeams, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/plans/plan/${parameters.planId}/team`, + method: 'GET', + params: { + cursor: parameters.cursor, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Adds an existing Atlassian team to a plan and configures their plannning settings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async addAtlassianTeam(parameters: Parameters.AddAtlassianTeam, callback: Callback): Promise; + /** + * Adds an existing Atlassian team to a plan and configures their plannning settings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async addAtlassianTeam(parameters: Parameters.AddAtlassianTeam, callback?: never): Promise; + async addAtlassianTeam(parameters: Parameters.AddAtlassianTeam, callback?: Callback): Promise { + const config: RequestConfig = { + url: `/rest/api/3/plans/plan/${parameters.planId}/team/atlassian`, + method: 'POST', + data: { + capacity: parameters.capacity, + id: parameters.id, + issueSourceId: parameters.issueSourceId, + planningStyle: parameters.planningStyle, + sprintLength: parameters.sprintLength, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns planning settings for an Atlassian team in a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getAtlassianTeam( + parameters: Parameters.GetAtlassianTeam, + callback: Callback, + ): Promise; + /** + * Returns planning settings for an Atlassian team in a plan. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getAtlassianTeam( + parameters: Parameters.GetAtlassianTeam, + callback?: never, + ): Promise; + async getAtlassianTeam( + parameters: Parameters.GetAtlassianTeam, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/plans/plan/${parameters.planId}/team/atlassian/${parameters.atlassianTeamId}`, + method: 'GET', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Updates any of the following planning settings of an Atlassian team in a plan using [JSON + * Patch](https://datatracker.ietf.org/doc/html/rfc6902). + * + * - PlanningStyle + * - IssueSourceId + * - SprintLength + * - Capacity + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * + * _Note that "add" operations do not respect array indexes in target locations. Call the "Get Atlassian team in plan" + * endpoint to find out the order of array elements._ + */ + async updateAtlassianTeam(parameters: Parameters.UpdateAtlassianTeam, callback: Callback): Promise; + /** + * Updates any of the following planning settings of an Atlassian team in a plan using [JSON + * Patch](https://datatracker.ietf.org/doc/html/rfc6902). + * + * - PlanningStyle + * - IssueSourceId + * - SprintLength + * - Capacity + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * + * _Note that "add" operations do not respect array indexes in target locations. Call the "Get Atlassian team in plan" + * endpoint to find out the order of array elements._ + */ + async updateAtlassianTeam(parameters: Parameters.UpdateAtlassianTeam, callback?: never): Promise; + async updateAtlassianTeam( + parameters: Parameters.UpdateAtlassianTeam, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/plans/plan/${parameters.planId}/team/atlassian/${parameters.atlassianTeamId}`, + method: 'PUT', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Removes an Atlassian team from a plan and deletes their planning settings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async removeAtlassianTeam(parameters: Parameters.RemoveAtlassianTeam, callback: Callback): Promise; + /** + * Removes an Atlassian team from a plan and deletes their planning settings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async removeAtlassianTeam(parameters: Parameters.RemoveAtlassianTeam, callback?: never): Promise; + async removeAtlassianTeam( + parameters: Parameters.RemoveAtlassianTeam, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/plans/plan/${parameters.planId}/team/atlassian/${parameters.atlassianTeamId}`, + method: 'DELETE', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Creates a plan-only team and configures their planning settings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async createPlanOnlyTeam( + parameters: Parameters.CreatePlanOnlyTeam, + callback: Callback, + ): Promise; + /** + * Creates a plan-only team and configures their planning settings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async createPlanOnlyTeam(parameters: Parameters.CreatePlanOnlyTeam, callback?: never): Promise; + async createPlanOnlyTeam( + parameters: Parameters.CreatePlanOnlyTeam, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/plans/plan/${parameters.planId}/team/planonly`, + method: 'POST', + data: { + capacity: parameters.capacity, + issueSourceId: parameters.issueSourceId, + memberAccountIds: parameters.memberAccountIds, + name: parameters.name, + planningStyle: parameters.planningStyle, + sprintLength: parameters.sprintLength, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns planning settings for a plan-only team. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getPlanOnlyTeam( + parameters: Parameters.GetPlanOnlyTeam, + callback: Callback, + ): Promise; + /** + * Returns planning settings for a plan-only team. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async getPlanOnlyTeam( + parameters: Parameters.GetPlanOnlyTeam, + callback?: never, + ): Promise; + async getPlanOnlyTeam( + parameters: Parameters.GetPlanOnlyTeam, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/plans/plan/${parameters.planId}/team/planonly/${parameters.planOnlyTeamId}`, + method: 'GET', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Updates any of the following planning settings of a plan-only team using [JSON + * Patch](https://datatracker.ietf.org/doc/html/rfc6902). + * + * - Name + * - PlanningStyle + * - IssueSourceId + * - SprintLength + * - Capacity + * - MemberAccountIds + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * + * _Note that "add" operations do not respect array indexes in target locations. Call the "Get plan-only team" + * endpoint to find out the order of array elements._ + */ + async updatePlanOnlyTeam(parameters: Parameters.UpdatePlanOnlyTeam, callback: Callback): Promise; + /** + * Updates any of the following planning settings of a plan-only team using [JSON + * Patch](https://datatracker.ietf.org/doc/html/rfc6902). + * + * - Name + * - PlanningStyle + * - IssueSourceId + * - SprintLength + * - Capacity + * - MemberAccountIds + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + * + * _Note that "add" operations do not respect array indexes in target locations. Call the "Get plan-only team" + * endpoint to find out the order of array elements._ + */ + async updatePlanOnlyTeam(parameters: Parameters.UpdatePlanOnlyTeam, callback?: never): Promise; + async updatePlanOnlyTeam( + parameters: Parameters.UpdatePlanOnlyTeam, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/plans/plan/${parameters.planId}/team/planonly/${parameters.planOnlyTeamId}`, + method: 'PUT', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Deletes a plan-only team and their planning settings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async deletePlanOnlyTeam(parameters: Parameters.DeletePlanOnlyTeam, callback: Callback): Promise; + /** + * Deletes a plan-only team and their planning settings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). + */ + async deletePlanOnlyTeam(parameters: Parameters.DeletePlanOnlyTeam, callback?: never): Promise; + async deletePlanOnlyTeam( + parameters: Parameters.DeletePlanOnlyTeam, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/plans/plan/${parameters.planId}/team/planonly/${parameters.planOnlyTeamId}`, + method: 'DELETE', + }; + + return this.client.sendRequest(config, callback); + } +} diff --git a/src/version3/timeTracking.ts b/src/version3/timeTracking.ts index aaae78b612..3ef6089f9d 100644 --- a/src/version3/timeTracking.ts +++ b/src/version3/timeTracking.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class TimeTracking { @@ -136,7 +136,7 @@ export class TimeTracking { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async setSharedTimeTrackingConfiguration( - parameters: Parameters.SetSharedTimeTrackingConfiguration | undefined, + parameters: Parameters.SetSharedTimeTrackingConfiguration, callback: Callback, ): Promise; /** @@ -146,21 +146,21 @@ export class TimeTracking { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async setSharedTimeTrackingConfiguration( - parameters?: Parameters.SetSharedTimeTrackingConfiguration, + parameters: Parameters.SetSharedTimeTrackingConfiguration, callback?: never, ): Promise; async setSharedTimeTrackingConfiguration( - parameters?: Parameters.SetSharedTimeTrackingConfiguration, + parameters: Parameters.SetSharedTimeTrackingConfiguration, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/3/configuration/timetracking/options', method: 'PUT', data: { - workingHoursPerDay: parameters?.workingHoursPerDay, - workingDaysPerWeek: parameters?.workingDaysPerWeek, - timeFormat: parameters?.timeFormat, - defaultUnit: parameters?.defaultUnit, + defaultUnit: parameters.defaultUnit, + timeFormat: parameters.timeFormat, + workingDaysPerWeek: parameters.workingDaysPerWeek, + workingHoursPerDay: parameters.workingHoursPerDay, }, }; diff --git a/src/version3/userProperties.ts b/src/version3/userProperties.ts index a65acc1c60..7ccd353459 100644 --- a/src/version3/userProperties.ts +++ b/src/version3/userProperties.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class UserProperties { diff --git a/src/version3/userSearch.ts b/src/version3/userSearch.ts index 3c0088dee1..53a6b7fba8 100644 --- a/src/version3/userSearch.ts +++ b/src/version3/userSearch.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { paramSerializer } from '../paramSerializer'; import { RequestConfig } from '../requestConfig'; @@ -75,9 +75,9 @@ export class UserSearch { * assigned to: * * - A new issue, by providing the `projectKeyOrId`. - * - An updated issue, by providing the `issueKey`. - * - To an issue during a transition (workflow action), by providing the `issueKey` and the transition id in - * `actionDescriptorId`. You can obtain the IDs of an issue's valid transitions using the `transitions` option in + * - An updated issue, by providing the `issueKey` or `issueId`. + * - To an issue during a transition (workflow action), by providing the `issueKey` or `issueId` and the transition id + * in `actionDescriptorId`. You can obtain the IDs of an issue's valid transitions using the `transitions` option in * the `expand` parameter of [ Get issue](#api-rest-api-3-issue-issueIdOrKey-get). * * In all these cases, you can pass an account ID to determine if a user can be assigned to an issue. The user is @@ -92,8 +92,9 @@ export class UserSearch { * the user's email address is hidden. See the [Profile visibility * overview](https://developer.atlassian.com/cloud/jira/platform/profile-visibility/) for more details. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** - * Permission to access Jira. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** _Browse + * users and groups_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Assign issues_ [project + * permission](https://confluence.atlassian.com/x/yodKLg) */ async findAssignableUsers( parameters: Parameters.FindAssignableUsers | undefined, @@ -104,9 +105,9 @@ export class UserSearch { * assigned to: * * - A new issue, by providing the `projectKeyOrId`. - * - An updated issue, by providing the `issueKey`. - * - To an issue during a transition (workflow action), by providing the `issueKey` and the transition id in - * `actionDescriptorId`. You can obtain the IDs of an issue's valid transitions using the `transitions` option in + * - An updated issue, by providing the `issueKey` or `issueId`. + * - To an issue during a transition (workflow action), by providing the `issueKey` or `issueId` and the transition id + * in `actionDescriptorId`. You can obtain the IDs of an issue's valid transitions using the `transitions` option in * the `expand` parameter of [ Get issue](#api-rest-api-3-issue-issueIdOrKey-get). * * In all these cases, you can pass an account ID to determine if a user can be assigned to an issue. The user is @@ -121,8 +122,9 @@ export class UserSearch { * the user's email address is hidden. See the [Profile visibility * overview](https://developer.atlassian.com/cloud/jira/platform/profile-visibility/) for more details. * - * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** - * Permission to access Jira. + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** _Browse + * users and groups_ [global permission](https://confluence.atlassian.com/x/x4dKLg) or _Assign issues_ [project + * permission](https://confluence.atlassian.com/x/yodKLg) */ async findAssignableUsers( parameters?: Parameters.FindAssignableUsers, @@ -142,6 +144,7 @@ export class UserSearch { accountId: parameters?.accountId, project: parameters?.project, issueKey: parameters?.issueKey, + issueId: parameters?.issueId, startAt: parameters?.startAt, maxResults: parameters?.maxResults, actionDescriptorId: parameters?.actionDescriptorId, @@ -303,7 +306,7 @@ export class UserSearch { } /** - * Returns a list of users that match the search string and property. + * Returns a list of active users that match the search string and property. * * This operation first applies a filter to match the search string and property, and then takes the filtered users in * the range defined by `startAt` and `maxResults`, up to the thousandth user. To get all the users who match the @@ -325,7 +328,7 @@ export class UserSearch { callback: Callback, ): Promise; /** - * Returns a list of users that match the search string and property. + * Returns a list of active users that match the search string and property. * * This operation first applies a filter to match the search string and property, and then takes the filtered users in * the range defined by `startAt` and `maxResults`, up to the thousandth user. To get all the users who match the @@ -382,7 +385,9 @@ export class UserSearch { * - `is commenter of (PROJ-1, PROJ-2)` Returns users that have posted a comment on the issues _PROJ-1_ or _PROJ-2_. * - `is transitioner of (PROJ-1, PROJ-2)` Returns users that have performed a transition on issues _PROJ-1_ or * _PROJ-2_. - * - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. + * - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. For example, + * if user property `location` is set to value `{"office": {"country": "AU", "city": "Sydney"}}`, then it's possible + * to use `[location].office.city is "Sydney"` to match the user. * * The list of issues can be extended as needed, as in _(PROJ-1, PROJ-2, ... PROJ-n)_. Statements can be combined * using the `AND` and `OR` operators to form more complex queries. For example: @@ -415,7 +420,9 @@ export class UserSearch { * - `is commenter of (PROJ-1, PROJ-2)` Returns users that have posted a comment on the issues _PROJ-1_ or _PROJ-2_. * - `is transitioner of (PROJ-1, PROJ-2)` Returns users that have performed a transition on issues _PROJ-1_ or * _PROJ-2_. - * - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. + * - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. For example, + * if user property `location` is set to value `{"office": {"country": "AU", "city": "Sydney"}}`, then it's possible + * to use `[location].office.city is "Sydney"` to match the user. * * The list of issues can be extended as needed, as in _(PROJ-1, PROJ-2, ... PROJ-n)_. Statements can be combined * using the `AND` and `OR` operators to form more complex queries. For example: @@ -462,7 +469,9 @@ export class UserSearch { * - `is commenter of (PROJ-1, PROJ-2)` Returns users that have posted a comment on the issues _PROJ-1_ or _PROJ-2_. * - `is transitioner of (PROJ-1, PROJ-2)` Returns users that have performed a transition on issues _PROJ-1_ or * _PROJ-2_. - * - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. + * - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. For example, + * if user property `location` is set to value `{"office": {"country": "AU", "city": "Sydney"}}`, then it's possible + * to use `[location].office.city is "Sydney"` to match the user. * * The list of issues can be extended as needed, as in _(PROJ-1, PROJ-2, ... PROJ-n)_. Statements can be combined * using the `AND` and `OR` operators to form more complex queries. For example: @@ -495,7 +504,9 @@ export class UserSearch { * - `is commenter of (PROJ-1, PROJ-2)` Returns users that have posted a comment on the issues _PROJ-1_ or _PROJ-2_. * - `is transitioner of (PROJ-1, PROJ-2)` Returns users that have performed a transition on issues _PROJ-1_ or * _PROJ-2_. - * - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. + * - `[propertyKey].entity.property.path is "property value"` Returns users with the entity property value. For example, + * if user property `location` is set to value `{"office": {"country": "AU", "city": "Sydney"}}`, then it's possible + * to use `[location].office.city is "Sydney"` to match the user. * * The list of issues can be extended as needed, as in _(PROJ-1, PROJ-2, ... PROJ-n)_. Statements can be combined * using the `AND` and `OR` operators to form more complex queries. For example: @@ -516,7 +527,7 @@ export class UserSearch { params: { query: parameters.query, startAt: parameters.startAt, - maxResults: parameters.maxResults, + maxResult: parameters.maxResult || parameters.maxResults, }, }; diff --git a/src/version3/users.ts b/src/version3/users.ts index bdbfc46c98..523c21c3f0 100644 --- a/src/version3/users.ts +++ b/src/version3/users.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { paramSerializer } from '../paramSerializer'; import { RequestConfig } from '../requestConfig'; @@ -18,7 +18,7 @@ export class Users { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** _Browse * users and groups_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getUser(parameters: Parameters.GetUser | undefined, callback: Callback): Promise; + async getUser(parameters: Parameters.GetUser, callback: Callback): Promise; /** * Returns a user. * @@ -29,16 +29,16 @@ export class Users { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** _Browse * users and groups_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async getUser(parameters?: Parameters.GetUser, callback?: never): Promise; - async getUser(parameters?: Parameters.GetUser, callback?: Callback): Promise { + async getUser(parameters: Parameters.GetUser, callback?: never): Promise; + async getUser(parameters: Parameters.GetUser, callback?: Callback): Promise { const config: RequestConfig = { url: '/rest/api/3/user', method: 'GET', params: { - accountId: parameters?.accountId, - expand: parameters?.expand, - key: parameters?.key, - username: parameters?.username, + accountId: parameters.accountId, + username: parameters.username, + key: parameters.key, + expand: parameters.expand, }, }; @@ -105,8 +105,8 @@ export class Users { method: 'DELETE', params: { accountId: parameters.accountId, - key: parameters.key, username: parameters.username, + key: parameters.key, }, }; @@ -137,9 +137,9 @@ export class Users { url: '/rest/api/3/user/bulk', method: 'GET', params: { - accountId: paramSerializer('accountId', parameters.accountId), - maxResults: parameters.maxResults, startAt: parameters.startAt, + maxResults: parameters.maxResults, + accountId: paramSerializer('accountId', parameters.accountId), }, }; @@ -234,44 +234,31 @@ export class Users { * is not passed, the calling user's default columns are set. If no column details are sent, then all default columns * are removed. * - * The parameters for this resource are expressed as HTML form data. For example, in curl: - * - * `curl -X PUT -d columns=summary -d columns=description - * https://your-domain.atlassian.net/rest/api/3/user/columns?accountId=5b10ac8d82e05b22cc7d4ef5'` - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg), to set the columns on any user. * - Permission to access Jira, to set the calling user's columns. */ - async setUserColumns( - parameters: Parameters.SetUserColumns | undefined, - callback: Callback, - ): Promise; + async setUserColumns(parameters: Parameters.SetUserColumns, callback: Callback): Promise; /** * 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. * - * The parameters for this resource are expressed as HTML form data. For example, in curl: - * - * `curl -X PUT -d columns=summary -d columns=description - * https://your-domain.atlassian.net/rest/api/3/user/columns?accountId=5b10ac8d82e05b22cc7d4ef5'` - * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * * - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg), to set the columns on any user. * - Permission to access Jira, to set the calling user's columns. */ - async setUserColumns(parameters?: Parameters.SetUserColumns, callback?: never): Promise; - async setUserColumns(parameters?: Parameters.SetUserColumns, callback?: Callback): Promise { + async setUserColumns(parameters: Parameters.SetUserColumns, callback?: never): Promise; + async setUserColumns(parameters: Parameters.SetUserColumns, callback?: Callback): Promise { const config: RequestConfig = { url: '/rest/api/3/user/columns', method: 'PUT', params: { - accountId: parameters?.accountId, + accountId: parameters.accountId, }, - data: parameters?.columns, + data: parameters.columns, }; return this.client.sendRequest(config, callback); @@ -311,16 +298,20 @@ export class Users { } /** - * Returns a user's email address. This API is only available to apps approved by Atlassian, according to these + * Returns a user's email address regardless of the user's profile visibility settings. For Connect apps, this API is + * only available to apps approved by Atlassian, according to these * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603). + * For Forge apps, this API only supports access via asApp() requests. */ async getUserEmail( parameters: Parameters.GetUserEmail | string, callback: Callback, ): Promise; /** - * Returns a user's email address. This API is only available to apps approved by Atlassian, according to these + * Returns a user's email address regardless of the user's profile visibility settings. For Connect apps, this API is + * only available to apps approved by Atlassian, according to these * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603). + * For Forge apps, this API only supports access via asApp() requests. */ async getUserEmail( parameters: Parameters.GetUserEmail | string, @@ -344,16 +335,20 @@ export class Users { } /** - * Returns a user's email address. This API is only available to apps approved by Atlassian, according to these + * Returns a user's email address regardless of the user's profile visibility settings. For Connect apps, this API is + * only available to apps approved by Atlassian, according to these * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603). + * For Forge apps, this API only supports access via asApp() requests. */ async getUserEmailBulk( parameters: Parameters.GetUserEmailBulk | string, callback: Callback, ): Promise; /** - * Returns a user's email address. This API is only available to apps approved by Atlassian, according to these + * Returns a user's email address regardless of the user's profile visibility settings. For Connect apps, this API is + * only available to apps approved by Atlassian, according to these * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603). + * For Forge apps, this API only supports access via asApp() requests. */ async getUserEmailBulk( parameters: Parameters.GetUserEmailBulk | string, @@ -443,8 +438,8 @@ export class Users { url: '/rest/api/3/users', method: 'GET', params: { - maxResults: parameters?.maxResults, startAt: parameters?.startAt, + maxResults: parameters?.maxResults, }, }; @@ -483,8 +478,8 @@ export class Users { url: '/rest/api/3/users/search', method: 'GET', params: { - maxResults: parameters?.maxResults, startAt: parameters?.startAt, + maxResults: parameters?.maxResults, }, }; diff --git a/src/version3/webhooks.ts b/src/version3/webhooks.ts index 64d597fbc9..ea06f3e805 100644 --- a/src/version3/webhooks.ts +++ b/src/version3/webhooks.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class Webhooks { @@ -83,8 +83,8 @@ export class Webhooks { url: '/rest/api/3/webhook', method: 'POST', data: { - webhooks: parameters.webhooks, url: parameters.url, + webhooks: parameters.webhooks, }, }; diff --git a/src/version3/workflowSchemeDrafts.ts b/src/version3/workflowSchemeDrafts.ts index 9472a21faa..e75d434f27 100644 --- a/src/version3/workflowSchemeDrafts.ts +++ b/src/version3/workflowSchemeDrafts.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class WorkflowSchemeDrafts { @@ -47,7 +47,8 @@ export class WorkflowSchemeDrafts { * Returns the draft workflow scheme for an active workflow scheme. Draft workflow schemes allow changes to be made to * the active workflow schemes: When an active workflow scheme is updated, a draft copy is created. The draft is * modified, then the changes in the draft are copied back to the active workflow scheme. See [Configuring workflow - * schemes](https://confluence.atlassian.com/x/tohKLg) for more information. Note that: + * schemes](https://confluence.atlassian.com/x/tohKLg) for more information.\ + * Note that: * * - Only active workflow schemes can have draft workflow schemes. * - An active workflow scheme can only have one draft workflow scheme. @@ -63,7 +64,8 @@ export class WorkflowSchemeDrafts { * Returns the draft workflow scheme for an active workflow scheme. Draft workflow schemes allow changes to be made to * the active workflow schemes: When an active workflow scheme is updated, a draft copy is created. The draft is * modified, then the changes in the draft are copied back to the active workflow scheme. See [Configuring workflow - * schemes](https://confluence.atlassian.com/x/tohKLg) for more information. Note that: + * schemes](https://confluence.atlassian.com/x/tohKLg) for more information.\ + * Note that: * * - Only active workflow schemes can have draft workflow schemes. * - An active workflow scheme can only have one draft workflow scheme. @@ -230,8 +232,8 @@ export class WorkflowSchemeDrafts { url: `/rest/api/3/workflowscheme/${parameters.id}/draft/default`, method: 'PUT', data: { - workflow: parameters.workflow, updateDraftIfNeeded: parameters.updateDraftIfNeeded, + workflow: parameters.workflow, }, }; @@ -378,7 +380,7 @@ export class WorkflowSchemeDrafts { * with the original workflow status to the new workflow status. * * This operation is - * [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). Follow the + * [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations). 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 updates. * @@ -396,7 +398,7 @@ export class WorkflowSchemeDrafts { * with the original workflow status to the new workflow status. * * This operation is - * [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#async-operations). Follow the + * [asynchronous](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations). 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 updates. * @@ -495,10 +497,10 @@ export class WorkflowSchemeDrafts { workflowName: parameters.workflowName, }, data: { - workflow: parameters.workflow, - issueTypes: parameters.issueTypes, defaultMapping: parameters.defaultMapping, + issueTypes: parameters.issueTypes, updateDraftIfNeeded: parameters.updateDraftIfNeeded, + workflow: parameters.workflow, }, }; diff --git a/src/version3/workflowSchemeProjectAssociations.ts b/src/version3/workflowSchemeProjectAssociations.ts index 8c1596f10f..67d242713b 100644 --- a/src/version3/workflowSchemeProjectAssociations.ts +++ b/src/version3/workflowSchemeProjectAssociations.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class WorkflowSchemeProjectAssociations { @@ -61,7 +61,7 @@ export class WorkflowSchemeProjectAssociations { * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ async assignSchemeToProject( - parameters: Parameters.AssignSchemeToProject | undefined, + parameters: Parameters.AssignSchemeToProject, callback: Callback, ): Promise; /** @@ -72,17 +72,17 @@ export class WorkflowSchemeProjectAssociations { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async assignSchemeToProject(parameters?: Parameters.AssignSchemeToProject, callback?: never): Promise; + async assignSchemeToProject(parameters: Parameters.AssignSchemeToProject, callback?: never): Promise; async assignSchemeToProject( - parameters?: Parameters.AssignSchemeToProject, + parameters: Parameters.AssignSchemeToProject, callback?: Callback, ): Promise { const config: RequestConfig = { url: '/rest/api/3/workflowscheme/project', method: 'PUT', data: { - workflowSchemeId: parameters?.workflowSchemeId, - projectId: parameters?.projectId, + projectId: parameters.projectId, + workflowSchemeId: parameters.workflowSchemeId, }, }; diff --git a/src/version3/workflowSchemes.ts b/src/version3/workflowSchemes.ts index d5d083cd1d..4811b7ed0b 100644 --- a/src/version3/workflowSchemes.ts +++ b/src/version3/workflowSchemes.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class WorkflowSchemes { @@ -73,19 +73,147 @@ export class WorkflowSchemes { url: '/rest/api/3/workflowscheme', method: 'POST', data: { - id: parameters.id, - name: parameters.name, - description: parameters.description, defaultWorkflow: parameters.defaultWorkflow, + description: parameters.description, + draft: parameters.draft, + id: parameters.id, issueTypeMappings: parameters.issueTypeMappings, + issueTypes: parameters.issueTypes, + lastModified: parameters.lastModified, + lastModifiedUser: parameters.lastModifiedUser, + name: parameters.name, originalDefaultWorkflow: parameters.originalDefaultWorkflow, originalIssueTypeMappings: parameters.originalIssueTypeMappings, - draft: parameters.draft, - lastModifiedUser: parameters.lastModifiedUser, - lastModified: parameters.lastModified, self: parameters.self, updateDraftIfNeeded: parameters.updateDraftIfNeeded, - issueTypes: parameters.issueTypes, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a list of workflow schemes by providing workflow scheme IDs or project IDs. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer Jira_ global permission to access all, including project-scoped, workflow schemes + * - _Administer projects_ project permissions to access project-scoped workflow schemes + */ + async readWorkflowSchemes( + parameters: Parameters.ReadWorkflowSchemes, + callback: Callback, + ): Promise; + /** + * Returns a list of workflow schemes by providing workflow scheme IDs or project IDs. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer Jira_ global permission to access all, including project-scoped, workflow schemes + * - _Administer projects_ project permissions to access project-scoped workflow schemes + */ + async readWorkflowSchemes( + parameters: Parameters.ReadWorkflowSchemes, + callback?: never, + ): Promise; + async readWorkflowSchemes( + parameters: Parameters.ReadWorkflowSchemes, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/workflowscheme/read', + method: 'POST', + data: { + projectIds: parameters.projectIds, + workflowSchemeIds: parameters.workflowSchemeIds, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Updates company-managed and team-managed project workflow schemes. This API doesn't have a concept of draft, so any + * changes made to a workflow scheme are immediately available. When changing the available statuses for issue types, + * an [asynchronous task](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations) + * migrates the issues as defined in the provided mappings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to update all, including global-scoped, workflow schemes. + * - _Administer projects_ project permission to update project-scoped workflow schemes. + */ + async updateSchemes(parameters: Parameters.UpdateSchemes, callback: Callback): Promise; + /** + * Updates company-managed and team-managed project workflow schemes. This API doesn't have a concept of draft, so any + * changes made to a workflow scheme are immediately available. When changing the available statuses for issue types, + * an [asynchronous task](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations) + * migrates the issues as defined in the provided mappings. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to update all, including global-scoped, workflow schemes. + * - _Administer projects_ project permission to update project-scoped workflow schemes. + */ + async updateSchemes(parameters: Parameters.UpdateSchemes, callback?: never): Promise; + async updateSchemes(parameters: Parameters.UpdateSchemes, callback?: Callback): Promise { + const config: RequestConfig = { + url: '/rest/api/3/workflowscheme/update', + method: 'POST', + data: { + defaultWorkflowId: parameters.defaultWorkflowId, + description: parameters.description, + id: parameters.id, + name: parameters.name, + statusMappingsByIssueTypeOverride: parameters.statusMappingsByIssueTypeOverride, + statusMappingsByWorkflows: parameters.statusMappingsByWorkflows, + version: parameters.version, + workflowsForIssueTypes: parameters.workflowsForIssueTypes, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Gets the required status mappings for the desired changes to a workflow scheme. The results are provided per issue + * type and workflow. When updating a workflow scheme, status mappings can be provided per issue type, per workflow, + * or both. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer Jira_ permission to update all, including global-scoped, workflow schemes. + * - _Administer projects_ project permission to update project-scoped workflow schemes. + */ + async updateWorkflowSchemeMappings( + parameters: Parameters.UpdateWorkflowSchemeMappings, + callback: Callback, + ): Promise; + /** + * Gets the required status mappings for the desired changes to a workflow scheme. The results are provided per issue + * type and workflow. When updating a workflow scheme, status mappings can be provided per issue type, per workflow, + * or both. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer Jira_ permission to update all, including global-scoped, workflow schemes. + * - _Administer projects_ project permission to update project-scoped workflow schemes. + */ + async updateWorkflowSchemeMappings( + parameters: Parameters.UpdateWorkflowSchemeMappings, + callback?: never, + ): Promise; + async updateWorkflowSchemeMappings( + parameters: Parameters.UpdateWorkflowSchemeMappings, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/workflowscheme/update/mappings', + method: 'POST', + data: { + defaultWorkflowId: parameters.defaultWorkflowId, + id: parameters.id, + workflowsForIssueTypes: parameters.workflowsForIssueTypes, }, }; @@ -130,9 +258,9 @@ export class WorkflowSchemes { } /** - * 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`. + * Updates a company-manged project 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`. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). @@ -142,9 +270,9 @@ export class WorkflowSchemes { callback: Callback, ): Promise; /** - * 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`. + * Updates a company-manged project 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`. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). @@ -285,8 +413,8 @@ export class WorkflowSchemes { url: `/rest/api/3/workflowscheme/${parameters.id}/default`, method: 'PUT', data: { - workflow: parameters.workflow, updateDraftIfNeeded: parameters.updateDraftIfNeeded, + workflow: parameters.workflow, }, }; @@ -538,10 +666,10 @@ export class WorkflowSchemes { workflowName: parameters.workflowName, }, data: { - workflow: parameters.workflow, - issueTypes: parameters.issueTypes, defaultMapping: parameters.defaultMapping, + issueTypes: parameters.issueTypes, updateDraftIfNeeded: parameters.updateDraftIfNeeded, + workflow: parameters.workflow, }, }; @@ -593,4 +721,30 @@ export class WorkflowSchemes { return this.client.sendRequest(config, callback); } + + /** Returns a page of projects using a given workflow scheme. */ + async getProjectUsagesForWorkflowScheme( + parameters: Parameters.GetProjectUsagesForWorkflowScheme, + callback: Callback, + ): Promise; + /** Returns a page of projects using a given workflow scheme. */ + async getProjectUsagesForWorkflowScheme( + parameters: Parameters.GetProjectUsagesForWorkflowScheme, + callback?: never, + ): Promise; + async getProjectUsagesForWorkflowScheme( + parameters: Parameters.GetProjectUsagesForWorkflowScheme, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/workflowscheme/${parameters.workflowSchemeId}/projectUsages`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } } diff --git a/src/version3/workflowStatusCategories.ts b/src/version3/workflowStatusCategories.ts index 261b9b4d63..ae0a487616 100644 --- a/src/version3/workflowStatusCategories.ts +++ b/src/version3/workflowStatusCategories.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class WorkflowStatusCategories { diff --git a/src/version3/workflowStatuses.ts b/src/version3/workflowStatuses.ts index d65c6f16de..36ccf84310 100644 --- a/src/version3/workflowStatuses.ts +++ b/src/version3/workflowStatuses.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class WorkflowStatuses { diff --git a/src/version3/workflowTransitionProperties.ts b/src/version3/workflowTransitionProperties.ts index 4305996be4..934c9f8b56 100644 --- a/src/version3/workflowTransitionProperties.ts +++ b/src/version3/workflowTransitionProperties.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class WorkflowTransitionProperties { diff --git a/src/version3/workflowTransitionRules.ts b/src/version3/workflowTransitionRules.ts index 21d2a8e41d..a16dde3e85 100644 --- a/src/version3/workflowTransitionRules.ts +++ b/src/version3/workflowTransitionRules.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { RequestConfig } from '../requestConfig'; export class WorkflowTransitionRules { @@ -84,7 +84,9 @@ export class WorkflowTransitionRules { * - [conditions](https://developer.atlassian.com/cloud/jira/platform/modules/workflow-condition/) * - [validators](https://developer.atlassian.com/cloud/jira/platform/modules/workflow-validator/) * - * Only rules created by the calling Connect app can be updated. + * Only rules created by the calling + * [Connect](https://developer.atlassian.com/cloud/jira/platform/index/#connect-apps) or + * [Forge](https://developer.atlassian.com/cloud/jira/platform/index/#forge-apps) app can be updated. * * To assist with app migration, this operation can be used to: * @@ -95,7 +97,8 @@ export class WorkflowTransitionRules { * Rules are enabled if the `disabled` parameter is not provided. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only - * Connect apps can use this operation. + * [Connect](https://developer.atlassian.com/cloud/jira/platform/index/#connect-apps) or + * [Forge](https://developer.atlassian.com/cloud/jira/platform/index/#forge-apps) apps can use this operation. */ async updateWorkflowTransitionRuleConfigurations( parameters: Parameters.UpdateWorkflowTransitionRuleConfigurations, @@ -108,7 +111,9 @@ export class WorkflowTransitionRules { * - [conditions](https://developer.atlassian.com/cloud/jira/platform/modules/workflow-condition/) * - [validators](https://developer.atlassian.com/cloud/jira/platform/modules/workflow-validator/) * - * Only rules created by the calling Connect app can be updated. + * Only rules created by the calling + * [Connect](https://developer.atlassian.com/cloud/jira/platform/index/#connect-apps) or + * [Forge](https://developer.atlassian.com/cloud/jira/platform/index/#forge-apps) app can be updated. * * To assist with app migration, this operation can be used to: * @@ -119,7 +124,8 @@ export class WorkflowTransitionRules { * Rules are enabled if the `disabled` parameter is not provided. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only - * Connect apps can use this operation. + * [Connect](https://developer.atlassian.com/cloud/jira/platform/index/#connect-apps) or + * [Forge](https://developer.atlassian.com/cloud/jira/platform/index/#forge-apps) apps can use this operation. */ async updateWorkflowTransitionRuleConfigurations( parameters: Parameters.UpdateWorkflowTransitionRuleConfigurations, diff --git a/src/version3/workflows.ts b/src/version3/workflows.ts index d6785fe38c..eaccfee546 100644 --- a/src/version3/workflows.ts +++ b/src/version3/workflows.ts @@ -1,7 +1,7 @@ import * as Models from './models'; import * as Parameters from './parameters'; -import { Callback } from '../callback'; import { Client } from '../clients'; +import { Callback } from '../callback'; import { paramSerializer } from '../paramSerializer'; import { RequestConfig } from '../requestConfig'; @@ -9,7 +9,11 @@ export class Workflows { constructor(private client: Client) {} /** - * Creates a workflow. Workflow transitions are created with the default system transition rules. + * Creates a workflow. You can define transition rules using the shapes detailed in the following sections. If no + * transitional rules are specified the default system transition rules are used. Note: This only applies to + * company-managed scoped workflows. Use [bulk create + * workflows](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows/#api-rest-api-3-workflows-create-post) + * to create both team and company-managed scoped workflows. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). @@ -19,7 +23,11 @@ export class Workflows { callback: Callback, ): Promise; /** - * Creates a workflow. Workflow transitions are created with the default system transition rules. + * Creates a workflow. You can define transition rules using the shapes detailed in the following sections. If no + * transitional rules are specified the default system transition rules are used. Note: This only applies to + * company-managed scoped workflows. Use [bulk create + * workflows](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows/#api-rest-api-3-workflows-create-post) + * to create both team and company-managed scoped workflows. * * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). @@ -33,10 +41,10 @@ export class Workflows { url: '/rest/api/3/workflow', method: 'POST', data: { - name: parameters.name, description: parameters.description, - transitions: parameters.transitions, + name: parameters.name, statuses: parameters.statuses, + transitions: parameters.transitions, }, }; @@ -122,10 +130,6 @@ export class Workflows { * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** * _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg). */ - async deleteInactiveWorkflow( - parameters: Parameters.DeleteInactiveWorkflow | string, - callback?: never, - ): Promise; async deleteInactiveWorkflow( parameters: Parameters.DeleteInactiveWorkflow | string, callback?: Callback, @@ -139,4 +143,392 @@ export class Workflows { return this.client.sendRequest(config, callback); } + + /** Returns a page of issue types using a given workflow within a project. */ + async getWorkflowProjectIssueTypeUsages( + parameters: Parameters.GetWorkflowProjectIssueTypeUsages, + callback: Callback, + ): Promise; + /** Returns a page of issue types using a given workflow within a project. */ + async getWorkflowProjectIssueTypeUsages( + parameters: Parameters.GetWorkflowProjectIssueTypeUsages, + callback?: never, + ): Promise; + async getWorkflowProjectIssueTypeUsages( + parameters: Parameters.GetWorkflowProjectIssueTypeUsages, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/workflow/${parameters.workflowId}/project/${parameters.projectId}/issueTypeUsages`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** Returns a page of projects using a given workflow. */ + async getProjectUsagesForWorkflow( + parameters: Parameters.GetProjectUsagesForWorkflow, + callback: Callback, + ): Promise; + /** Returns a page of projects using a given workflow. */ + async getProjectUsagesForWorkflow( + parameters: Parameters.GetProjectUsagesForWorkflow, + callback?: never, + ): Promise; + async getProjectUsagesForWorkflow( + parameters: Parameters.GetProjectUsagesForWorkflow, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/workflow/${parameters.workflowId}/projectUsages`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** Returns a page of workflow schemes using a given workflow. */ + async getWorkflowSchemeUsagesForWorkflow( + parameters: Parameters.GetWorkflowSchemeUsagesForWorkflow, + callback: Callback, + ): Promise; + /** Returns a page of workflow schemes using a given workflow. */ + async getWorkflowSchemeUsagesForWorkflow( + parameters: Parameters.GetWorkflowSchemeUsagesForWorkflow, + callback?: never, + ): Promise; + async getWorkflowSchemeUsagesForWorkflow( + parameters: Parameters.GetWorkflowSchemeUsagesForWorkflow, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/rest/api/3/workflow/${parameters.workflowId}/workflowSchemes`, + method: 'GET', + params: { + nextPageToken: parameters.nextPageToken, + maxResults: parameters.maxResults, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a list of workflows and related statuses by providing workflow names, workflow IDs, or project and issue + * types. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer Jira_ global permission to access all, including project-scoped, workflows + * - At least one of the _Administer projects_ and _View (read-only) workflow_ project permissions to access + * project-scoped workflows + */ + async readWorkflows( + parameters: Parameters.ReadWorkflows | undefined, + callback: Callback, + ): Promise; + /** + * Returns a list of workflows and related statuses by providing workflow names, workflow IDs, or project and issue + * types. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer Jira_ global permission to access all, including project-scoped, workflows + * - At least one of the _Administer projects_ and _View (read-only) workflow_ project permissions to access + * project-scoped workflows + */ + async readWorkflows(parameters?: Parameters.ReadWorkflows, callback?: never): Promise; + async readWorkflows( + parameters?: Parameters.ReadWorkflows, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/workflows', + method: 'POST', + params: { + useTransitionLinksFormat: parameters?.useTransitionLinksFormat, + useApprovalConfiguration: parameters?.useApprovalConfiguration, + }, + data: { + projectAndIssueTypes: parameters?.projectAndIssueTypes, + workflowIds: parameters?.workflowIds, + workflowNames: parameters?.workflowNames, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Get the list of workflow capabilities for a specific workflow using either the workflow ID, or the project and + * issue type ID pair. The response includes the scope of the workflow, defined as global/project-based, and a list of + * project types that the workflow is scoped to. It also includes all rules organised into their broad categories + * (conditions, validators, actions, triggers, screens) as well as the source location (Atlassian-provided, Connect, + * Forge). + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to access all, including global-scoped, workflows + * - _Administer projects_ project permissions to access project-scoped workflows + */ + async workflowCapabilities( + parameters: Parameters.WorkflowCapabilities | undefined, + callback: Callback, + ): Promise; + /** + * Get the list of workflow capabilities for a specific workflow using either the workflow ID, or the project and + * issue type ID pair. The response includes the scope of the workflow, defined as global/project-based, and a list of + * project types that the workflow is scoped to. It also includes all rules organised into their broad categories + * (conditions, validators, actions, triggers, screens) as well as the source location (Atlassian-provided, Connect, + * Forge). + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to access all, including global-scoped, workflows + * - _Administer projects_ project permissions to access project-scoped workflows + */ + async workflowCapabilities( + parameters?: Parameters.WorkflowCapabilities, + callback?: never, + ): Promise; + async workflowCapabilities( + parameters?: Parameters.WorkflowCapabilities, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/workflows/capabilities', + method: 'GET', + params: { + workflowId: parameters?.workflowId, + projectId: parameters?.projectId, + issueTypeId: parameters?.issueTypeId, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Create workflows and related statuses. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to create all, including global-scoped, workflows + * - _Administer projects_ project permissions to create project-scoped workflows + */ + async createWorkflows( + parameters: Parameters.CreateWorkflows, + callback: Callback, + ): Promise; + /** + * Create workflows and related statuses. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to create all, including global-scoped, workflows + * - _Administer projects_ project permissions to create project-scoped workflows + */ + async createWorkflows( + parameters: Parameters.CreateWorkflows, + callback?: never, + ): Promise; + async createWorkflows( + parameters: Parameters.CreateWorkflows, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/workflows/create', + method: 'POST', + data: { + scope: parameters.scope, + statuses: parameters.statuses, + workflows: parameters.workflows, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Validate the payload for bulk create workflows. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to create all, including global-scoped, workflows + * - _Administer projects_ project permissions to create project-scoped workflows + */ + async validateCreateWorkflows( + parameters: Parameters.ValidateCreateWorkflows, + callback: Callback, + ): Promise; + /** + * Validate the payload for bulk create workflows. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to create all, including global-scoped, workflows + * - _Administer projects_ project permissions to create project-scoped workflows + */ + async validateCreateWorkflows( + parameters: Parameters.ValidateCreateWorkflows, + callback?: never, + ): Promise; + async validateCreateWorkflows( + parameters: Parameters.ValidateCreateWorkflows, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/workflows/create/validation', + method: 'POST', + data: { + payload: parameters.payload, + validationOptions: parameters.validationOptions, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of global + * and project workflows. If workflow names are specified in query string, details of those workflows are returned. + * Otherwise, all workflows are returned. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer Jira_ global permission to access all, including project-scoped, workflows + * - At least one of the _Administer projects_ and _View (read-only) workflow_ project permissions to access + * project-scoped workflows + */ + async searchWorkflows( + parameters: Parameters.SearchWorkflows | undefined, + callback: Callback, + ): Promise; + /** + * Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#pagination) list of global + * and project workflows. If workflow names are specified in query string, details of those workflows are returned. + * Otherwise, all workflows are returned. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer Jira_ global permission to access all, including project-scoped, workflows + * - At least one of the _Administer projects_ and _View (read-only) workflow_ project permissions to access + * project-scoped workflows + */ + async searchWorkflows( + parameters?: Parameters.SearchWorkflows, + callback?: never, + ): Promise; + async searchWorkflows( + parameters?: Parameters.SearchWorkflows, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/workflows/search', + method: 'GET', + params: { + startAt: parameters?.startAt, + maxResults: parameters?.maxResults, + expand: parameters?.expand, + queryString: parameters?.queryString, + orderBy: parameters?.orderBy, + scope: parameters?.scope, + isActive: parameters?.isActive, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Update workflows and related statuses. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to create all, including global-scoped, workflows + * - _Administer projects_ project permissions to create project-scoped workflows + */ + async updateWorkflows( + parameters: Parameters.UpdateWorkflows, + callback: Callback, + ): Promise; + /** + * Update workflows and related statuses. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to create all, including global-scoped, workflows + * - _Administer projects_ project permissions to create project-scoped workflows + */ + async updateWorkflows( + parameters: Parameters.UpdateWorkflows, + callback?: never, + ): Promise; + async updateWorkflows( + parameters: Parameters.UpdateWorkflows, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/workflows/update', + method: 'POST', + params: { + expand: parameters.expand, + }, + data: { + statuses: parameters.statuses, + workflows: parameters.workflows, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Validate the payload for bulk update workflows. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to create all, including global-scoped, workflows + * - _Administer projects_ project permissions to create project-scoped workflows + */ + async validateUpdateWorkflows( + parameters: Parameters.ValidateUpdateWorkflows, + callback: Callback, + ): Promise; + /** + * Validate the payload for bulk update workflows. + * + * **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** + * + * - _Administer Jira_ project permission to create all, including global-scoped, workflows + * - _Administer projects_ project permissions to create project-scoped workflows + */ + async validateUpdateWorkflows( + parameters: Parameters.ValidateUpdateWorkflows, + callback?: never, + ): Promise; + async validateUpdateWorkflows( + parameters: Parameters.ValidateUpdateWorkflows, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: '/rest/api/3/workflows/update/validation', + method: 'POST', + data: { + payload: parameters.payload, + validationOptions: parameters.validationOptions, + }, + }; + + return this.client.sendRequest(config, callback); + } } diff --git a/tests/integration/agile/sprint.test.ts b/tests/integration/agile/sprint.test.ts index c9e61a1d1e..4fe6c76d2d 100644 --- a/tests/integration/agile/sprint.test.ts +++ b/tests/integration/agile/sprint.test.ts @@ -10,7 +10,7 @@ import { const client = getAgileClient(); -let board: any; +let board: AgileModels.Board | undefined; let sprint: AgileModels.Sprint; beforeAll(async () => { @@ -21,15 +21,17 @@ afterAll(async () => { await deleteAgileProject(); }); -test.sequential('should create new sprint', async ({ expect }) => { +test.sequential.skip('should create new sprint', async ({ expect }) => { const boards = await client.board.getAllBoards({ name: Constants.testAgileProjectKey }); expect(boards.total).toBe(1); [board] = boards.values; + // @ts-expect-error Wrong typings sprint = await client.sprint.createSprint({ name: 'New sprint', + // @ts-expect-error Wrong typings originBoardId: board.id, }); @@ -38,7 +40,7 @@ test.sequential('should create new sprint', async ({ expect }) => { expect(sprint.state).toBe('future'); }); -test.sequential('should create and move task to sprint', async ({ expect }) => { +test.sequential.skip('should create and move task to sprint', async ({ expect }) => { const issue = await getVersion3Client().issues.createIssue({ fields: { summary: 'Test task', @@ -63,7 +65,7 @@ test.sequential('should create and move task to sprint', async ({ expect }) => { expect(!!issue).toBeTruthy(); }); -test.sequential('should return issues for sprint', async ({ expect }) => { +test.sequential.skip('should return issues for sprint', async ({ expect }) => { const { issues } = await client.sprint.getIssuesForSprint({ sprintId: sprint.id, }); @@ -72,7 +74,7 @@ test.sequential('should return issues for sprint', async ({ expect }) => { expect(issues[0].fields?.summary).toBe('Test task'); }); -test.sequential('should partially update sprint', async ({ expect }) => { +test.sequential.skip('should partially update sprint', async ({ expect }) => { const newSprint = await client.sprint.partiallyUpdateSprint({ sprintId: sprint.id, state: 'active', @@ -83,6 +85,6 @@ test.sequential('should partially update sprint', async ({ expect }) => { expect(newSprint.state).toBe('active'); }); -test.sequential('should remove sprint', async ({ expect }) => { +test.sequential.skip('should remove sprint', async () => { await client.sprint.deleteSprint({ sprintId: sprint.id }); }); diff --git a/tests/integration/index.ts b/tests/integration/index.ts index 2b30a95c10..f2f9b95989 100644 --- a/tests/integration/index.ts +++ b/tests/integration/index.ts @@ -1,2 +1,2 @@ -export * from '@tests/constants'; -export * as Utils from '@tests/utils'; +export * from '@tests/integration/constants'; +export * as Utils from '@tests/integration/utils'; diff --git a/tests/integration/utils/createSoftwareProject.ts b/tests/integration/utils/createSoftwareProject.ts index b8d653a86d..7615b1c35a 100644 --- a/tests/integration/utils/createSoftwareProject.ts +++ b/tests/integration/utils/createSoftwareProject.ts @@ -6,7 +6,12 @@ export const createSoftwareProject = async () => { const client = getVersion2Client(); const currentUser = await client.myself.getCurrentUser(); - if (!currentUser.accountId) throw new Error("Couldn't get the current user's account ID", { cause: { currentUser } }); + if (!currentUser.accountId) { + throw new Error( + 'Couldn\'t get the current user\'s account ID', + { cause: { currentUser } }, + ); + } return client.projects .createProject({ diff --git a/tests/integration/version2/avatars.test.ts b/tests/integration/version2/avatars.test.ts index f568b2afee..975e7b6949 100644 --- a/tests/integration/version2/avatars.test.ts +++ b/tests/integration/version2/avatars.test.ts @@ -1,22 +1,63 @@ import { test } from 'vitest'; import type { Avatar } from '@jirajs/version3/models'; -import { getVersion2Client } from '@tests/integration/utils'; +import { createSoftwareProject, deleteSoftwareProject, getVersion2Client } from '../utils'; const client = getVersion2Client(); -let avatar: Avatar | undefined; +let avatar: Omit; test.sequential('should get all system avatars', async ({ expect }) => { const systemAvatars = await client.avatars.getAllSystemAvatars({ type: 'project' }); - avatar = systemAvatars.system?.[0]; + [avatar] = systemAvatars.system; expect(!!avatar).toBeTruthy(); + expect(typeof avatar.id).toBe('string'); + expect(avatar.isSystemAvatar).toBe(true); + expect(avatar.isSelected).toBe(false); + expect(avatar.isDeletable).toBe(false); + expect(typeof avatar.urls['16x16']).toBe('string'); + expect(typeof avatar.urls['24x24']).toBe('string'); + expect(typeof avatar.urls['32x32']).toBe('string'); + expect(typeof avatar.urls['48x48']).toBe('string'); }); test.sequential('should return avatar image with contentType', async ({ expect }) => { - const avatarWithDetails = await client.avatars.getAvatarImageByID({ id: avatar!.id, type: 'project' }); + const avatarWithDetails = await client.avatars.getAvatarImageByID({ + id: avatar.id, + type: 'project', + }); expect(avatarWithDetails.contentType).toBe('image/svg+xml'); expect(avatarWithDetails.avatar instanceof Uint8Array).toBeTruthy(); }); + +test.sequential('should store a new avatar', async ({ expect }) => { + const project = await createSoftwareProject(); + + let storedAvatar; + + try { + const avatarWithDetails = await client.avatars.getAvatarImageByType({ + type: 'project', + format: 'png', + }); + + storedAvatar = await client.avatars.storeAvatar({ + entityId: project.id, + type: 'project', + size: 0, + mimeType: avatarWithDetails.contentType, + avatar: avatarWithDetails.avatar, + }); + } finally { + await deleteSoftwareProject(); + } + + expect(storedAvatar).toBeDefined(); + expect(storedAvatar.id).toBeTruthy(); + expect(storedAvatar.owner).toBeTruthy(); + expect(storedAvatar.isSystemAvatar).toBeFalsy(); + expect(storedAvatar.isSelected).toBeFalsy(); + expect(storedAvatar.isDeletable).toBeTruthy(); +}); diff --git a/tests/integration/version2/issueAttachments.test.ts b/tests/integration/version2/issueAttachments.test.ts index 195d035a88..8b5b22724a 100644 --- a/tests/integration/version2/issueAttachments.test.ts +++ b/tests/integration/version2/issueAttachments.test.ts @@ -1,8 +1,9 @@ -import * as fs from 'fs'; +import * as fs from 'node:fs'; import { afterAll, beforeAll, test } from 'vitest'; import type { Attachment, Issue } from '@jirajs/version2/models'; import { Constants } from '@tests/integration/constants'; import { cleanupEnvironment, getVersion2Client, prepareEnvironment } from '@tests/integration/utils'; +import { Readable } from 'node:stream'; const client = getVersion2Client({ noCheckAtlassianToken: true }); @@ -62,6 +63,40 @@ test.sequential('should add attachment with custom MIME type', async ({ expect } expect(customAttachment[0].mimeType).toBe(customMimeType); }); +test.sequential('should add attachment with ReadableStream', async ({ expect }) => { + const readableStream = Readable.from(['This is a test content for ReadableStream.']); + + attachments = await client.issueAttachments.addAttachment({ + issueIdOrKey: issue.key, + attachment: { + filename: 'readableStreamAttachment.txt', + file: readableStream, + }, + }); + + expect(!!attachments).toBeTruthy(); + expect(attachments[0].filename).toBe('readableStreamAttachment.txt'); + expect(attachments[0].mimeType).toBe('text/plain'); +}); + +test.sequential('should add attachment with fs.createReadStream', async ({ expect }) => { + const customMimeType = 'application/typescript'; + const fileStream = fs.createReadStream('./tests/integration/version2/issueAttachments.test.ts'); + + attachments = await client.issueAttachments.addAttachment({ + issueIdOrKey: issue.key, + attachment: { + filename: 'fsReadStreamAttachment.ts', + file: fileStream, + mimeType: customMimeType, + }, + }); + + expect(!!attachments).toBeTruthy(); + expect(attachments[0].filename).toBe('fsReadStreamAttachment.ts'); + expect(attachments[0].mimeType).toBe(customMimeType); +}); + test.sequential('should getAttachmentContent', async ({ expect }) => { const content = await client.issueAttachments.getAttachmentContent({ id: attachments[0].id }); diff --git a/tests/integration/version2/issueComments.test.ts b/tests/integration/version2/issueComments.test.ts index a31d2b2d35..67123151b4 100644 --- a/tests/integration/version2/issueComments.test.ts +++ b/tests/integration/version2/issueComments.test.ts @@ -43,7 +43,7 @@ test.sequential('should update comment', async ({ expect }) => { const updatedComment = await client.issueComments.updateComment({ issueIdOrKey: issue.key, - id: comment.id, + id: comment.id!, comment: 'updated comment', }); diff --git a/tests/integration/version3/avatars.test.ts b/tests/integration/version3/avatars.test.ts index 91ec9d1f6f..4981104c5c 100644 --- a/tests/integration/version3/avatars.test.ts +++ b/tests/integration/version3/avatars.test.ts @@ -1,22 +1,63 @@ -import { test } from 'vitest'; import type { Avatar } from '@jirajs/version3/models'; -import { getVersion3Client } from '@tests/integration/utils'; +import { test } from 'vitest'; +import { createSoftwareProject, deleteSoftwareProject, getVersion3Client } from '@tests/integration/utils'; const client = getVersion3Client(); -let avatar: Avatar | undefined; +let avatar: Omit; test.sequential('should get all system avatars', async ({ expect }) => { const systemAvatars = await client.avatars.getAllSystemAvatars({ type: 'project' }); - avatar = systemAvatars.system?.[0]; + [avatar] = systemAvatars.system; expect(!!avatar).toBeTruthy(); + expect(typeof avatar.id).toBe('string'); + expect(avatar.isSystemAvatar).toBe(true); + expect(avatar.isSelected).toBe(false); + expect(avatar.isDeletable).toBe(false); + expect(typeof avatar.urls['16x16']).toBe('string'); + expect(typeof avatar.urls['24x24']).toBe('string'); + expect(typeof avatar.urls['32x32']).toBe('string'); + expect(typeof avatar.urls['48x48']).toBe('string'); }); test.sequential('should return avatar image with contentType', async ({ expect }) => { - const avatarWithDetails = await client.avatars.getAvatarImageByID({ id: avatar!.id, type: 'project' }); + const avatarWithDetails = await client.avatars.getAvatarImageByID({ + id: avatar.id, + type: 'project', + }); expect(avatarWithDetails.contentType).toBe('image/svg+xml'); expect(avatarWithDetails.avatar instanceof Uint8Array).toBeTruthy(); }); + +test.sequential('should store a new avatar', async ({ expect }) => { + const project = await createSoftwareProject(); + + let storedAvatar; + + try { + const avatarWithDetails = await client.avatars.getAvatarImageByType({ + type: 'project', + format: 'png', + }); + + storedAvatar = await client.avatars.storeAvatar({ + entityId: project.id, + type: 'project', + size: 0, + mimeType: avatarWithDetails.contentType, + avatar: avatarWithDetails.avatar, + }); + } finally { + await deleteSoftwareProject(); + } + + expect(storedAvatar).toBeDefined(); + expect(storedAvatar.id).toBeTruthy(); + expect(storedAvatar.owner).toBeTruthy(); + expect(storedAvatar.isSystemAvatar).toBeFalsy(); + expect(storedAvatar.isSelected).toBeFalsy(); + expect(storedAvatar.isDeletable).toBeTruthy(); +}); diff --git a/tests/integration/version3/issueAttachments.test.ts b/tests/integration/version3/issueAttachments.test.ts index 4a2f21043f..863e411318 100644 --- a/tests/integration/version3/issueAttachments.test.ts +++ b/tests/integration/version3/issueAttachments.test.ts @@ -3,6 +3,7 @@ import { afterAll, beforeAll, test } from 'vitest'; import type { Attachment, Issue } from '@jirajs/version3/models'; import { Constants } from '@tests/integration/constants'; import { cleanupEnvironment, getVersion3Client, prepareEnvironment } from '@tests/integration/utils'; +import { Readable } from 'node:stream'; const client = getVersion3Client({ noCheckAtlassianToken: true }); @@ -62,6 +63,40 @@ test.sequential('should add attachment with custom MIME type', async ({ expect } expect(customAttachment[0].mimeType).toBe(customMimeType); }); +test.sequential('should add attachment with ReadableStream', async ({ expect }) => { + const readableStream = Readable.from(['This is a test content for ReadableStream.']); + + attachments = await client.issueAttachments.addAttachment({ + issueIdOrKey: issue.key, + attachment: { + filename: 'readableStreamAttachment.txt', + file: readableStream, + }, + }); + + expect(!!attachments).toBeTruthy(); + expect(attachments[0].filename).toBe('readableStreamAttachment.txt'); + expect(attachments[0].mimeType).toBe('text/plain'); +}); + +test.sequential('should add attachment with fs.createReadStream', async ({ expect }) => { + const customMimeType = 'application/typescript'; + const fileStream = fs.createReadStream('./tests/integration/version2/issueAttachments.test.ts'); + + attachments = await client.issueAttachments.addAttachment({ + issueIdOrKey: issue.key, + attachment: { + filename: 'fsReadStreamAttachment.ts', + file: fileStream, + mimeType: customMimeType, + }, + }); + + expect(!!attachments).toBeTruthy(); + expect(attachments[0].filename).toBe('fsReadStreamAttachment.ts'); + expect(attachments[0].mimeType).toBe(customMimeType); +}); + test.sequential('should getAttachmentContent', async ({ expect }) => { const content = await client.issueAttachments.getAttachmentContent({ id: attachments[0].id }); diff --git a/tests/integration/version3/issueBulkOperations.test.ts b/tests/integration/version3/issueBulkOperations.test.ts new file mode 100644 index 0000000000..82b91e97fd --- /dev/null +++ b/tests/integration/version3/issueBulkOperations.test.ts @@ -0,0 +1,75 @@ +import { afterAll, beforeAll, test } from 'vitest'; +import { Constants } from '@tests/integration/constants'; +import { cleanupEnvironment, getVersion3Client, prepareEnvironment } from '@tests/integration/utils'; +import { CreatedIssue } from '@jirajs/version3/models'; + +const client = getVersion3Client(); +let createdIssues: CreatedIssue[] = []; + +beforeAll(async () => { + await prepareEnvironment(); +}); + +afterAll(async () => { + await cleanupEnvironment(); +}); + +test.sequential('should create test issues', async ({ expect }) => { + function createIssue(num: number) { + return client.issues.createIssue({ + fields: { + summary: `${Constants.testIssueSummary} ${num}`, + issuetype: { name: 'Task' }, + project: { key: Constants.testProjectKey }, + description: { + type: 'doc', + version: 1, + content: [ + { + type: 'paragraph', + content: [ + { + text: `${Constants.testIssueDescription} ${num}`, + type: 'text', + }, + ], + }, + ], + }, + }, + }); + } + + createdIssues = await Promise.all([createIssue(1), createIssue(2)]); + + expect(createdIssues).toHaveLength(2); + expect(createdIssues[0].key).toContain(Constants.testProjectKey); + expect(createdIssues[1].key).toContain(Constants.testProjectKey); +}); + +test.sequential('should get available transitions for multiple issues', async ({ expect }) => { + const result = await client.issueBulkOperations.getAvailableTransitions({ + issueIdsOrKeys: createdIssues.map(issue => issue.key), + }); + + expect(result).toBeDefined(); + expect(result.availableTransitions).toBeDefined(); + expect(Array.isArray(result.availableTransitions)).toBeTruthy(); + + if (result.availableTransitions && result.availableTransitions.length > 0) { + const firstWorkflow = result.availableTransitions[0]; + + expect(Array.isArray(firstWorkflow.transitions)).toBeTruthy(); + expect(Array.isArray(firstWorkflow.issues)).toBeTruthy(); + expect(typeof firstWorkflow.isTransitionsFiltered).toBe('boolean'); + } +}); + +test.sequential('should cleanup test issues', async ({ expect }) => { + const result = await client.issueBulkOperations.submitBulkDelete({ + selectedIssueIdsOrKeys: createdIssues.map(issue => issue.key), + }); + + expect(result).toBeDefined(); + expect(result.taskId).toBeDefined(); +}); diff --git a/tests/tsconfig.json b/tests/tsconfig.json new file mode 100644 index 0000000000..6a1e663c31 --- /dev/null +++ b/tests/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "baseUrl": ".", + "outDir": "./out", + "noEmit": true, + "paths": { + "@jirajs": ["../src"], + "@jirajs/*": ["../src/*"], + "@tests": ["."], + "@tests/*": ["*"] + } + }, + "include": ["integration", "unit"] +} diff --git a/tests/unit/clients/baseClient.test.ts b/tests/unit/clients/baseClient.test.ts index 27e97e0481..ab14c3f2ba 100644 --- a/tests/unit/clients/baseClient.test.ts +++ b/tests/unit/clients/baseClient.test.ts @@ -10,14 +10,14 @@ test('should create X-Atlassian-Token: no-check header in requests', ({ expect } noCheckAtlassianToken: true, }); - // @ts-ignore - const defaultHeaders: Record = client.instance.defaults.headers || {}; + // @ts-expect-error Wrong typings + const defaultHeaders: Record = client.instance.defaults.headers; expect(defaultHeaders[XAtlassianToken]).toBe('no-check'); const sendRequestStub = sinon.stub(client, 'sendRequest'); - // @ts-ignore + // @ts-expect-error Wrong typings client.sendRequest({}, undefined); // TODO problem with never type expect(sendRequestStub.calledOnce).toBeTruthy(); @@ -32,14 +32,14 @@ test('should not create X-Atlassian-Token: no-check header in requests case 1', host: 'http://localhost', noCheckAtlassianToken: false, }); - // @ts-ignore - const defaultHeaders: Record = client.instance.defaults.headers || {}; + // @ts-expect-error Wrong typings + const defaultHeaders: Record = client.instance.defaults.headers; expect(defaultHeaders[XAtlassianToken]).toBe(undefined); const sendRequestStub = sinon.stub(client, 'sendRequest'); - // @ts-ignore + // @ts-expect-error Wrong typings client.sendRequest({}, undefined); // TODO problem with never type expect(sendRequestStub.calledOnce).toBeTruthy(); @@ -53,14 +53,14 @@ test('should create X-Atlassian-Token: no-check header in requests case 2', ({ e host: 'http://localhost', }); - // @ts-ignore - const defaultHeaders: Record = client.instance.defaults.headers || {}; + // @ts-expect-error Wrong typings + const defaultHeaders: Record = client.instance.defaults.headers; expect(defaultHeaders[XAtlassianToken]).toBe(undefined); const sendRequestStub = sinon.stub(client, 'sendRequest'); - // @ts-ignore + // @ts-expect-error Wrong typings client.sendRequest({}, undefined); // TODO problem with never type expect(sendRequestStub.calledOnce).toBeTruthy(); @@ -70,18 +70,16 @@ test('should create X-Atlassian-Token: no-check header in requests case 2', ({ e expect(callArgument.headers?.[XAtlassianToken]).toBe(undefined); }); -test("shouldn't display error message for correct host urls", ({ expect }) => { - // eslint-disable-next-line no-new +test('shouldn\'t display error message for correct host urls', () => { new BaseClient({ host: 'http://localhost', }); - // eslint-disable-next-line no-new new BaseClient({ host: 'https://localhost/' }); }); test('should display error message for incorrect host url', ({ expect }) => { - const errorMessage = "Couldn't parse the host URL. Perhaps you forgot to add 'http://' or 'https://' at the beginning of the URL?"; + const errorMessage = 'Couldn\'t parse the host URL. Perhaps you forgot to add \'http://\' or \'https://\' at the beginning of the URL?'; expect(() => new BaseClient({ host: '' })).toThrowError(errorMessage); expect(() => new BaseClient({ host: 'localhost' })).toThrowError(errorMessage); diff --git a/tests/unit/createClient.test.ts b/tests/unit/createClient.test.ts index 802189eae0..59f9bc21d3 100644 --- a/tests/unit/createClient.test.ts +++ b/tests/unit/createClient.test.ts @@ -39,7 +39,7 @@ test('should create ServiceDesk client', ({ expect }) => { }); test('should create Base client', ({ expect }) => { - // @ts-ignore + // @ts-expect-error Internal typings const client = createClient('baseClient', defaultConfig); expect(!!client).toBeTruthy(); diff --git a/tests/unit/services/authenticationService.test.ts b/tests/unit/services/authenticationService.test.ts index 769b704dcf..75c50c0cb5 100644 --- a/tests/unit/services/authenticationService.test.ts +++ b/tests/unit/services/authenticationService.test.ts @@ -10,21 +10,8 @@ test('should return undefined when authentication does not used', async ({ expec expect(token).toBe(undefined); }); -test('should return Basic authentication token for password case', async ({ expect }) => { - const authentication: Config.Authentication = { - basic: { - username: 'test_username', - password: 'test_password', - }, - }; - - const token = await getAuthenticationToken(authentication); - - expect(token).toBe('Basic dGVzdF91c2VybmFtZTp0ZXN0X3Bhc3N3b3Jk'); -}); - test('should return Basic authentication token for apiToken case', async ({ expect }) => { - const authentication: Config.Authentication = { + const authentication: Config['authentication'] = { basic: { email: 'test_email@test.qwe', apiToken: 'test_apiToken', @@ -35,13 +22,3 @@ test('should return Basic authentication token for apiToken case', async ({ expe expect(token).toBe('Basic dGVzdF9lbWFpbEB0ZXN0LnF3ZTp0ZXN0X2FwaVRva2Vu'); }); - -test('should generate Bearer Header correctly for Personal Access Token', async ({ expect }) => { - const authentication: Config.Authentication = { - personalAccessToken: 'secretPAT', - }; - - const token = await getAuthenticationToken(authentication); - - expect(token).toBe('Bearer secretPAT'); -}); diff --git a/tests/unit/version2/issueSearch.test.ts b/tests/unit/version2/issueSearch.test.ts index 06079ad878..a4a7ffb920 100644 --- a/tests/unit/version2/issueSearch.test.ts +++ b/tests/unit/version2/issueSearch.test.ts @@ -12,7 +12,9 @@ test('searchForIssuesUsingJql should calls without parameters', ({ expect }) => const client = new Version2Client(config); const sendRequestStub = sinon.stub(client, 'sendRequest'); - client.issueSearch.searchForIssuesUsingJql(); + client.issueSearch.searchForIssuesUsingJql({ + jql: '', + }); expect(sendRequestStub.calledOnce).toBeTruthy(); }); @@ -33,6 +35,7 @@ test('searchForIssuesUsingJql should accept follow parameters', ({ expect }) => expect(callArgument.params).toStrictEqual({ expand: undefined, + failFast: undefined, fields: ['key', 'summary'], fieldsByKeys: undefined, jql: 'id IN (TICKET_ID) ORDER BY key ASC', @@ -67,3 +70,67 @@ test('searchForIssuesUsingJqlPost should accept follow parameters', ({ expect }) validateQuery: undefined, }); }); + +test('searchForIssuesUsingJqlEnhancedSearch should calls without parameters', ({ expect }) => { + const client = new Version2Client(config); + const sendRequestStub = sinon.stub(client, 'sendRequest'); + + client.issueSearch.searchForIssuesUsingJqlEnhancedSearch({ + jql: '', + }); + + expect(sendRequestStub.calledOnce).toBeTruthy(); +}); + +test('searchForIssuesUsingJqlEnhancedSearch should accept follow parameters', ({ expect }) => { + const client = new Version2Client(config); + const sendRequestStub = sinon.stub(client, 'sendRequest'); + + client.issueSearch.searchForIssuesUsingJqlEnhancedSearch({ + jql: 'id IN (TICKET_ID) ORDER BY key ASC', + maxResults: 10, + fields: ['key', 'summary'], + }); + + expect(sendRequestStub.calledOnce).toBeTruthy(); + + const callArgument = sendRequestStub.getCall(0).args[0]; + + expect(callArgument.params).toStrictEqual({ + jql: 'id IN (TICKET_ID) ORDER BY key ASC', + nextPageToken: undefined, + maxResults: 10, + fields: ['key', 'summary'], + expand: undefined, + properties: undefined, + fieldsByKeys: undefined, + failFast: undefined, + reconcileIssues: undefined, + }); +}); + +test('searchForIssuesUsingJqlEnhancedSearchPost should accept follow parameters', ({ expect }) => { + const client = new Version2Client(config); + const sendRequestStub = sinon.stub(client, 'sendRequest'); + + client.issueSearch.searchForIssuesUsingJqlEnhancedSearchPost({ + jql: 'test JQL', + expand: ['changelog'], + }); + + expect(sendRequestStub.calledOnce).toBeTruthy(); + + const callArgument = sendRequestStub.getCall(0).args[0]; + + expect(callArgument.data).toStrictEqual({ + jql: 'test JQL', + nextPageToken: undefined, + maxResults: undefined, + fields: undefined, + expand: ['changelog'], + properties: undefined, + fieldsByKeys: undefined, + failFast: undefined, + reconcileIssues: undefined, + }); +}); diff --git a/tests/unit/version2/issueVotes.test.ts b/tests/unit/version2/issueVotes.test.ts index 1c885b5093..8a432d12a2 100644 --- a/tests/unit/version2/issueVotes.test.ts +++ b/tests/unit/version2/issueVotes.test.ts @@ -7,7 +7,7 @@ const client = new Version2Client({ host: 'http://localhost' }); const sendRequestStub = sinon.stub(client, 'sendRequest'); const issueVote = new IssueVotes(client); -test("should contains 'Content-Type'", ({ expect }) => { +test('should contains \'Content-Type\'', ({ expect }) => { issueVote.addVote({ issueIdOrKey: 'TEST-2' }); expect(sendRequestStub.calledOnce).toBeTruthy(); diff --git a/tests/unit/version2/jiraExpressions.test.ts b/tests/unit/version2/jiraExpressions.test.ts new file mode 100644 index 0000000000..94a374c2af --- /dev/null +++ b/tests/unit/version2/jiraExpressions.test.ts @@ -0,0 +1,42 @@ +import * as sinon from 'sinon'; +import { test } from 'vitest'; +import { JiraExpressions, Version2Client } from '@jirajs/version2'; + +const config = { host: 'http://localhost' }; + +test('should be defined', ({ expect }) => { + expect(!!JiraExpressions).toBeTruthy(); +}); + +test('evaluateJiraExpressionUsingEnhancedSearch should calls without parameters', ({ expect }) => { + const client = new Version2Client(config); + const sendRequestStub = sinon.stub(client, 'sendRequest'); + + client.jiraExpressions.evaluateJiraExpressionUsingEnhancedSearch({ + expression: '', + }); + + expect(sendRequestStub.calledOnce).toBeTruthy(); +}); + +test('evaluateJiraExpressionUsingEnhancedSearch should accept follow parameters', ({ expect }) => { + const client = new Version2Client(config); + const sendRequestStub = sinon.stub(client, 'sendRequest'); + + client.jiraExpressions.evaluateJiraExpressionUsingEnhancedSearch({ + expression: '{ key: issue.key, type: issue.issueType.name }', + }); + + expect(sendRequestStub.calledOnce).toBeTruthy(); + + const callArgument = sendRequestStub.getCall(0).args[0]; + + expect(callArgument.params).toStrictEqual({ + expand: undefined, + }); + + expect(callArgument.data).toStrictEqual({ + expression: '{ key: issue.key, type: issue.issueType.name }', + context: undefined, + }); +}); diff --git a/tests/unit/version2/projectVersions.test.ts b/tests/unit/version2/projectVersions.test.ts index b60f9201e0..1d3caf5520 100644 --- a/tests/unit/version2/projectVersions.test.ts +++ b/tests/unit/version2/projectVersions.test.ts @@ -73,8 +73,10 @@ test('createVersion should accept follow parameters', ({ expect }) => { const callArgument = sendRequestStub.getCall(0).args[0]; expect(callArgument.data).toStrictEqual({ + approvers: undefined, archived: undefined, description: undefined, + driver: undefined, expand: undefined, id: undefined, issuesStatusForFixVersion: undefined, diff --git a/tests/unit/version3/client/version3Client.test.ts b/tests/unit/version3/client/version3Client.test.ts new file mode 100644 index 0000000000..adddf2e391 --- /dev/null +++ b/tests/unit/version3/client/version3Client.test.ts @@ -0,0 +1,197 @@ +import { describe, it, expect } from 'vitest'; +import { Version3Client } from '@jirajs/version3'; +import { AnnouncementBanner } from '@jirajs/version3/announcementBanner'; +import { AppDataPolicies } from '@jirajs/version3/appDataPolicies'; +import { AppMigration } from '@jirajs/version3/appMigration'; +import { AppProperties } from '@jirajs/version3/appProperties'; +import { ApplicationRoles } from '@jirajs/version3/applicationRoles'; +import { AuditRecords } from '@jirajs/version3/auditRecords'; +import { Avatars } from '@jirajs/version3/avatars'; +import { ClassificationLevels } from '@jirajs/version3/classificationLevels'; +import { Dashboards } from '@jirajs/version3/dashboards'; +import { DynamicModules } from '@jirajs/version3/dynamicModules'; +import { FilterSharing } from '@jirajs/version3/filterSharing'; +import { Filters } from '@jirajs/version3/filters'; +import { GroupAndUserPicker } from '@jirajs/version3/groupAndUserPicker'; +import { Groups } from '@jirajs/version3/groups'; +import { InstanceInformation } from '@jirajs/version3/instanceInformation'; +import { IssueAttachments } from '@jirajs/version3/issueAttachments'; +import { IssueBulkOperations } from '@jirajs/version3/issueBulkOperations'; +import { IssueCommentProperties } from '@jirajs/version3/issueCommentProperties'; +import { IssueComments } from '@jirajs/version3/issueComments'; +import { IssueCustomFieldConfigurationApps } from '@jirajs/version3/issueCustomFieldConfigurationApps'; +import { IssueCustomFieldContexts } from '@jirajs/version3/issueCustomFieldContexts'; +import { IssueCustomFieldOptions } from '@jirajs/version3/issueCustomFieldOptions'; +import { IssueCustomFieldOptionsApps } from '@jirajs/version3/issueCustomFieldOptionsApps'; +import { IssueCustomFieldValuesApps } from '@jirajs/version3/issueCustomFieldValuesApps'; +import { IssueFieldConfigurations } from '@jirajs/version3/issueFieldConfigurations'; +import { IssueFields } from '@jirajs/version3/issueFields'; +import { IssueLinks } from '@jirajs/version3/issueLinks'; +import { IssueLinkTypes } from '@jirajs/version3/issueLinkTypes'; +import { IssueNavigatorSettings } from '@jirajs/version3/issueNavigatorSettings'; +import { IssueNotificationSchemes } from '@jirajs/version3/issueNotificationSchemes'; +import { IssuePriorities } from '@jirajs/version3/issuePriorities'; +import { IssueProperties } from '@jirajs/version3/issueProperties'; +import { IssueRemoteLinks } from '@jirajs/version3/issueRemoteLinks'; +import { IssueResolutions } from '@jirajs/version3/issueResolutions'; +import { Issues } from '@jirajs/version3/issues'; +import { IssueSearch } from '@jirajs/version3/issueSearch'; +import { IssueSecurityLevel } from '@jirajs/version3/issueSecurityLevel'; +import { IssueSecuritySchemes } from '@jirajs/version3/issueSecuritySchemes'; +import { IssueTypeProperties } from '@jirajs/version3/issueTypeProperties'; +import { IssueTypes } from '@jirajs/version3/issueTypes'; +import { IssueTypeSchemes } from '@jirajs/version3/issueTypeSchemes'; +import { IssueTypeScreenSchemes } from '@jirajs/version3/issueTypeScreenSchemes'; +import { IssueVotes } from '@jirajs/version3/issueVotes'; +import { IssueWatchers } from '@jirajs/version3/issueWatchers'; +import { IssueWorklogProperties } from '@jirajs/version3/issueWorklogProperties'; +import { IssueWorklogs } from '@jirajs/version3/issueWorklogs'; +import { JiraExpressions } from '@jirajs/version3/jiraExpressions'; +import { JiraSettings } from '@jirajs/version3/jiraSettings'; +import { JQL } from '@jirajs/version3/jQL'; +import { JqlFunctionsApps } from '@jirajs/version3/jqlFunctionsApps'; +import { Labels } from '@jirajs/version3/labels'; +import { LicenseMetrics } from '@jirajs/version3/licenseMetrics'; +import { Myself } from '@jirajs/version3/myself'; +import { Permissions } from '@jirajs/version3/permissions'; +import { PermissionSchemes } from '@jirajs/version3/permissionSchemes'; +import { Plans } from '@jirajs/version3/plans'; +import { PrioritySchemes } from '@jirajs/version3/prioritySchemes'; +import { ProjectAvatars } from '@jirajs/version3/projectAvatars'; +import { ProjectCategories } from '@jirajs/version3/projectCategories'; +import { ProjectClassificationLevels } from '@jirajs/version3/'; +import { ProjectComponents } from '@jirajs/version3/projectComponents'; +import { ProjectEmail } from '@jirajs/version3/projectEmail'; +import { ProjectFeatures } from '@jirajs/version3/projectFeatures'; +import { ProjectKeyAndNameValidation } from '@jirajs/version3/projectKeyAndNameValidation'; +import { ProjectPermissionSchemes } from '@jirajs/version3/projectPermissionSchemes'; +import { ProjectProperties } from '@jirajs/version3/projectProperties'; +import { ProjectRoleActors } from '@jirajs/version3/projectRoleActors'; +import { ProjectRoles } from '@jirajs/version3/projectRoles'; +import { Projects } from '@jirajs/version3/projects'; +import { ProjectTypes } from '@jirajs/version3/projectTypes'; +import { ProjectVersions } from '@jirajs/version3/projectVersions'; +import { Screens } from '@jirajs/version3/screens'; +import { ScreenSchemes } from '@jirajs/version3/screenSchemes'; +import { ScreenTabFields } from '@jirajs/version3/screenTabFields'; +import { ScreenTabs } from '@jirajs/version3/screenTabs'; +import { ServerInfo } from '@jirajs/version3/serverInfo'; +import { ServiceRegistry } from '@jirajs/version3/serviceRegistry'; +import { Status } from '@jirajs/version3/status'; +import { Tasks } from '@jirajs/version3/tasks'; +import { TeamsInPlan } from '@jirajs/version3/teamsInPlan'; +import { TimeTracking } from '@jirajs/version3/timeTracking'; +import { UIModificationsApps } from '@jirajs/version3/uIModificationsApps'; +import { UserProperties } from '@jirajs/version3/userProperties'; +import { UserSearch } from '@jirajs/version3/userSearch'; +import { Users } from '@jirajs/version3/users'; +import { Webhooks } from '@jirajs/version3/webhooks'; +import { Workflows } from '@jirajs/version3/workflows'; +import { WorkflowSchemeDrafts } from '@jirajs/version3/workflowSchemeDrafts'; +import { WorkflowSchemeProjectAssociations } from '@jirajs/version3/workflowSchemeProjectAssociations'; +import { WorkflowSchemes } from '@jirajs/version3/workflowSchemes'; +import { WorkflowStatusCategories } from '@jirajs/version3/workflowStatusCategories'; +import { WorkflowStatuses } from '@jirajs/version3/workflowStatuses'; +import { WorkflowTransitionProperties } from '@jirajs/version3/workflowTransitionProperties'; +import { WorkflowTransitionRules } from '@jirajs/version3/workflowTransitionRules'; + +describe('Version3Client', () => { + it('should have all required properties instantiated', () => { + const client = new Version3Client({ host: 'http://localhost:3000' }); + + expect(client.announcementBanner).toBeInstanceOf(AnnouncementBanner); + expect(client.appDataPolicies).toBeInstanceOf(AppDataPolicies); + expect(client.applicationRoles).toBeInstanceOf(ApplicationRoles); + expect(client.appMigration).toBeInstanceOf(AppMigration); + expect(client.appProperties).toBeInstanceOf(AppProperties); + expect(client.auditRecords).toBeInstanceOf(AuditRecords); + expect(client.avatars).toBeInstanceOf(Avatars); + expect(client.classificationLevels).toBeInstanceOf(ClassificationLevels); + expect(client.dashboards).toBeInstanceOf(Dashboards); + expect(client.dynamicModules).toBeInstanceOf(DynamicModules); + expect(client.filters).toBeInstanceOf(Filters); + expect(client.filterSharing).toBeInstanceOf(FilterSharing); + expect(client.groupAndUserPicker).toBeInstanceOf(GroupAndUserPicker); + expect(client.groups).toBeInstanceOf(Groups); + expect(client.instanceInformation).toBeInstanceOf(InstanceInformation); + expect(client.issueAttachments).toBeInstanceOf(IssueAttachments); + expect(client.issueBulkOperations).toBeInstanceOf(IssueBulkOperations); + expect(client.issueCommentProperties).toBeInstanceOf(IssueCommentProperties); + expect(client.issueComments).toBeInstanceOf(IssueComments); + expect(client.issueCustomFieldConfigurationApps).toBeInstanceOf(IssueCustomFieldConfigurationApps); + expect(client.issueCustomFieldContexts).toBeInstanceOf(IssueCustomFieldContexts); + expect(client.issueCustomFieldOptions).toBeInstanceOf(IssueCustomFieldOptions); + expect(client.issueCustomFieldOptionsApps).toBeInstanceOf(IssueCustomFieldOptionsApps); + expect(client.issueCustomFieldValuesApps).toBeInstanceOf(IssueCustomFieldValuesApps); + expect(client.issueFieldConfigurations).toBeInstanceOf(IssueFieldConfigurations); + expect(client.issueFields).toBeInstanceOf(IssueFields); + expect(client.issueLinks).toBeInstanceOf(IssueLinks); + expect(client.issueLinkTypes).toBeInstanceOf(IssueLinkTypes); + expect(client.issueNavigatorSettings).toBeInstanceOf(IssueNavigatorSettings); + expect(client.issueNotificationSchemes).toBeInstanceOf(IssueNotificationSchemes); + expect(client.issuePriorities).toBeInstanceOf(IssuePriorities); + expect(client.issueProperties).toBeInstanceOf(IssueProperties); + expect(client.issueRemoteLinks).toBeInstanceOf(IssueRemoteLinks); + expect(client.issueResolutions).toBeInstanceOf(IssueResolutions); + expect(client.issues).toBeInstanceOf(Issues); + expect(client.issueSearch).toBeInstanceOf(IssueSearch); + expect(client.issueSecurityLevel).toBeInstanceOf(IssueSecurityLevel); + expect(client.issueSecuritySchemes).toBeInstanceOf(IssueSecuritySchemes); + expect(client.issueTypeProperties).toBeInstanceOf(IssueTypeProperties); + expect(client.issueTypes).toBeInstanceOf(IssueTypes); + expect(client.issueTypeSchemes).toBeInstanceOf(IssueTypeSchemes); + expect(client.issueTypeScreenSchemes).toBeInstanceOf(IssueTypeScreenSchemes); + expect(client.issueVotes).toBeInstanceOf(IssueVotes); + expect(client.issueWatchers).toBeInstanceOf(IssueWatchers); + expect(client.issueWorklogProperties).toBeInstanceOf(IssueWorklogProperties); + expect(client.issueWorklogs).toBeInstanceOf(IssueWorklogs); + expect(client.jiraExpressions).toBeInstanceOf(JiraExpressions); + expect(client.jiraSettings).toBeInstanceOf(JiraSettings); + expect(client.jql).toBeInstanceOf(JQL); + expect(client.jqlFunctionsApps).toBeInstanceOf(JqlFunctionsApps); + expect(client.labels).toBeInstanceOf(Labels); + expect(client.licenseMetrics).toBeInstanceOf(LicenseMetrics); + expect(client.myself).toBeInstanceOf(Myself); + expect(client.permissions).toBeInstanceOf(Permissions); + expect(client.permissionSchemes).toBeInstanceOf(PermissionSchemes); + expect(client.plans).toBeInstanceOf(Plans); + expect(client.prioritySchemes).toBeInstanceOf(PrioritySchemes); + expect(client.projectAvatars).toBeInstanceOf(ProjectAvatars); + expect(client.projectCategories).toBeInstanceOf(ProjectCategories); + expect(client.projectClassificationLevels).toBeInstanceOf(ProjectClassificationLevels); + expect(client.projectComponents).toBeInstanceOf(ProjectComponents); + expect(client.projectEmail).toBeInstanceOf(ProjectEmail); + expect(client.projectFeatures).toBeInstanceOf(ProjectFeatures); + expect(client.projectKeyAndNameValidation).toBeInstanceOf(ProjectKeyAndNameValidation); + expect(client.projectPermissionSchemes).toBeInstanceOf(ProjectPermissionSchemes); + expect(client.projectProperties).toBeInstanceOf(ProjectProperties); + expect(client.projectRoleActors).toBeInstanceOf(ProjectRoleActors); + expect(client.projectRoles).toBeInstanceOf(ProjectRoles); + expect(client.projects).toBeInstanceOf(Projects); + expect(client.projectTypes).toBeInstanceOf(ProjectTypes); + expect(client.projectVersions).toBeInstanceOf(ProjectVersions); + expect(client.screens).toBeInstanceOf(Screens); + expect(client.screenSchemes).toBeInstanceOf(ScreenSchemes); + expect(client.screenTabFields).toBeInstanceOf(ScreenTabFields); + expect(client.screenTabs).toBeInstanceOf(ScreenTabs); + expect(client.serverInfo).toBeInstanceOf(ServerInfo); + expect(client.serviceRegistry).toBeInstanceOf(ServiceRegistry); + expect(client.status).toBeInstanceOf(Status); + expect(client.tasks).toBeInstanceOf(Tasks); + expect(client.teamsInPlan).toBeInstanceOf(TeamsInPlan); + expect(client.timeTracking).toBeInstanceOf(TimeTracking); + expect(client.uiModificationsApps).toBeInstanceOf(UIModificationsApps); + expect(client.userProperties).toBeInstanceOf(UserProperties); + expect(client.users).toBeInstanceOf(Users); + expect(client.userSearch).toBeInstanceOf(UserSearch); + expect(client.webhooks).toBeInstanceOf(Webhooks); + expect(client.workflows).toBeInstanceOf(Workflows); + expect(client.workflowSchemeDrafts).toBeInstanceOf(WorkflowSchemeDrafts); + expect(client.workflowSchemeProjectAssociations).toBeInstanceOf(WorkflowSchemeProjectAssociations); + expect(client.workflowSchemes).toBeInstanceOf(WorkflowSchemes); + expect(client.workflowStatusCategories).toBeInstanceOf(WorkflowStatusCategories); + expect(client.workflowStatuses).toBeInstanceOf(WorkflowStatuses); + expect(client.workflowTransitionProperties).toBeInstanceOf(WorkflowTransitionProperties); + expect(client.workflowTransitionRules).toBeInstanceOf(WorkflowTransitionRules); + }); +}); diff --git a/tests/unit/version3/issueBulkOperations.test.ts b/tests/unit/version3/issueBulkOperations.test.ts new file mode 100644 index 0000000000..8ca212feee --- /dev/null +++ b/tests/unit/version3/issueBulkOperations.test.ts @@ -0,0 +1,33 @@ +import * as sinon from 'sinon'; +import { test } from 'vitest'; +import { Version3Client } from '@jirajs'; + +const config = { + host: 'http://localhost', +}; + +test('getAvailableTransitions should accept follow parameters', ({ expect }) => { + const client = new Version3Client(config); + const sendRequestStub = sinon.stub(client, 'sendRequest'); + + client.issueBulkOperations.getAvailableTransitions({ + issueIdsOrKeys: ['PROJ-1', 'PROJ-2'], + startingAfter: 'cursor1', + endingBefore: 'cursor2', + }); + + expect(sendRequestStub.calledOnce).toBeTruthy(); + + const callArgument = sendRequestStub.getCall(0).args[0]; + + expect(callArgument.url).toBe('/rest/api/3/bulk/issues/transition'); + expect(callArgument.method).toBe('GET'); + expect(callArgument.params).toStrictEqual({ + issueIdsOrKeys: ['PROJ-1', 'PROJ-2'], + startingAfter: 'cursor1', + endingBefore: 'cursor2', + }); + expect(callArgument.headers).toStrictEqual({ + 'Content-Type': 'application/json', + }); +}); diff --git a/tests/unit/version3/issueLinks.test.ts b/tests/unit/version3/issueLinks.test.ts index 1ed238d219..16d669e6d2 100644 --- a/tests/unit/version3/issueLinks.test.ts +++ b/tests/unit/version3/issueLinks.test.ts @@ -6,7 +6,17 @@ test('linkIssues should calls without parameters', ({ expect }) => { const client = new Version3Client({ host: 'http://localhost' }); const sendRequestStub = sinon.stub(client, 'sendRequest'); - client.issueLinks.linkIssues(); + client.issueLinks.linkIssues({ + inwardIssue: { + id: '1', + }, + outwardIssue: { + id: '2', + }, + type: { + id: '3', + }, + }); expect(sendRequestStub.calledOnce).toBeTruthy(); @@ -14,8 +24,14 @@ test('linkIssues should calls without parameters', ({ expect }) => { expect(callArgument.data).toStrictEqual({ comment: undefined, - inwardIssue: undefined, - outwardIssue: undefined, - type: undefined, + inwardIssue: { + id: '1', + }, + outwardIssue: { + id: '2', + }, + type: { + id: '3', + }, }); }); diff --git a/tests/unit/version3/issueSearch.test.ts b/tests/unit/version3/issueSearch.test.ts index 107fc72340..606fd4d2e6 100644 --- a/tests/unit/version3/issueSearch.test.ts +++ b/tests/unit/version3/issueSearch.test.ts @@ -12,7 +12,9 @@ test('searchForIssuesUsingJql should calls without parameters', ({ expect }) => const client = new Version3Client(config); const sendRequestStub = sinon.stub(client, 'sendRequest'); - client.issueSearch.searchForIssuesUsingJql(); + client.issueSearch.searchForIssuesUsingJql({ + jql: '', + }); expect(sendRequestStub.calledOnce).toBeTruthy(); }); @@ -33,6 +35,7 @@ test('searchForIssuesUsingJql should accept follow parameters', ({ expect }) => expect(callArgument.params).toStrictEqual({ expand: undefined, + failFast: undefined, fields: ['key', 'summary'], fieldsByKeys: undefined, jql: 'id IN (TICKET_ID) ORDER BY key ASC', @@ -67,3 +70,67 @@ test('searchForIssuesUsingJqlPost should accept follow parameters', ({ expect }) validateQuery: undefined, }); }); + +test('searchForIssuesUsingJqlEnhancedSearch should calls without parameters', ({ expect }) => { + const client = new Version3Client(config); + const sendRequestStub = sinon.stub(client, 'sendRequest'); + + client.issueSearch.searchForIssuesUsingJqlEnhancedSearch({ + jql: '', + }); + + expect(sendRequestStub.calledOnce).toBeTruthy(); +}); + +test('searchForIssuesUsingJqlEnhancedSearch should accept follow parameters', ({ expect }) => { + const client = new Version3Client(config); + const sendRequestStub = sinon.stub(client, 'sendRequest'); + + client.issueSearch.searchForIssuesUsingJqlEnhancedSearch({ + jql: 'id IN (TICKET_ID) ORDER BY key ASC', + maxResults: 10, + fields: ['key', 'summary'], + }); + + expect(sendRequestStub.calledOnce).toBeTruthy(); + + const callArgument = sendRequestStub.getCall(0).args[0]; + + expect(callArgument.params).toStrictEqual({ + jql: 'id IN (TICKET_ID) ORDER BY key ASC', + nextPageToken: undefined, + maxResults: 10, + fields: ['key', 'summary'], + expand: undefined, + properties: undefined, + fieldsByKeys: undefined, + failFast: undefined, + reconcileIssues: undefined, + }); +}); + +test('searchForIssuesUsingJqlEnhancedSearchPost should accept follow parameters', ({ expect }) => { + const client = new Version3Client(config); + const sendRequestStub = sinon.stub(client, 'sendRequest'); + + client.issueSearch.searchForIssuesUsingJqlEnhancedSearchPost({ + jql: 'test JQL', + expand: ['changelog'], + }); + + expect(sendRequestStub.calledOnce).toBeTruthy(); + + const callArgument = sendRequestStub.getCall(0).args[0]; + + expect(callArgument.data).toStrictEqual({ + jql: 'test JQL', + nextPageToken: undefined, + maxResults: undefined, + fields: undefined, + expand: ['changelog'], + properties: undefined, + fieldsByKeys: undefined, + failFast: undefined, + reconcileIssues: undefined, + }); +}); diff --git a/tests/unit/version3/issueVotes.test.ts b/tests/unit/version3/issueVotes.test.ts index 1bd43b64e9..a3435818f8 100644 --- a/tests/unit/version3/issueVotes.test.ts +++ b/tests/unit/version3/issueVotes.test.ts @@ -7,7 +7,7 @@ const client = new Version3Client({ host: 'http://localhost' }); const sendRequestStub = sinon.stub(client, 'sendRequest'); const issueVote = new IssueVotes(client); -test("should contains 'Content-Type'", ({ expect }) => { +test('should contains \'Content-Type\'', ({ expect }) => { issueVote.addVote({ issueIdOrKey: 'TEST-2' }); expect(sendRequestStub.calledOnce).toBeTruthy(); diff --git a/tests/unit/version3/jiraExpressions.test.ts b/tests/unit/version3/jiraExpressions.test.ts new file mode 100644 index 0000000000..ca2624cce6 --- /dev/null +++ b/tests/unit/version3/jiraExpressions.test.ts @@ -0,0 +1,42 @@ +import * as sinon from 'sinon'; +import { test } from 'vitest'; +import { JiraExpressions, Version3Client } from '@jirajs/version3'; + +const config = { host: 'http://localhost' }; + +test('should be defined', ({ expect }) => { + expect(!!JiraExpressions).toBeTruthy(); +}); + +test('evaluateJiraExpressionUsingEnhancedSearch should calls without parameters', ({ expect }) => { + const client = new Version3Client(config); + const sendRequestStub = sinon.stub(client, 'sendRequest'); + + client.jiraExpressions.evaluateJiraExpressionUsingEnhancedSearch({ + expression: '', + }); + + expect(sendRequestStub.calledOnce).toBeTruthy(); +}); + +test('evaluateJiraExpressionUsingEnhancedSearch should accept follow parameters', ({ expect }) => { + const client = new Version3Client(config); + const sendRequestStub = sinon.stub(client, 'sendRequest'); + + client.jiraExpressions.evaluateJiraExpressionUsingEnhancedSearch({ + expression: '{ key: issue.key, type: issue.issueType.name }', + }); + + expect(sendRequestStub.calledOnce).toBeTruthy(); + + const callArgument = sendRequestStub.getCall(0).args[0]; + + expect(callArgument.params).toStrictEqual({ + expand: undefined, + }); + + expect(callArgument.data).toStrictEqual({ + expression: '{ key: issue.key, type: issue.issueType.name }', + context: undefined, + }); +}); diff --git a/tests/unit/version3/projectVersions.test.ts b/tests/unit/version3/projectVersions.test.ts index ca33b80ca4..812a868b71 100644 --- a/tests/unit/version3/projectVersions.test.ts +++ b/tests/unit/version3/projectVersions.test.ts @@ -75,8 +75,10 @@ test('createVersion should accept follow parameters', ({ expect }) => { const callArgument = sendRequestStub.getCall(0).args[0]; expect(callArgument.data).toStrictEqual({ + approvers: undefined, archived: undefined, description: undefined, + driver: undefined, expand: undefined, id: undefined, issuesStatusForFixVersion: undefined, diff --git a/tsconfig.json b/tsconfig.json index 105050e126..1443a4aa9a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,24 +1,17 @@ { "compilerOptions": { - "target": "ES6", - "outDir": "out", - "module": "NodeNext", + "target": "ES2022", + "outDir": "dist", + "module": "ES2022", + "moduleResolution": "bundler", "skipLibCheck": true, "lib": [ - "ES2018", + "ES2022", "DOM" ], "baseUrl": ".", - "paths": { - "@jirajs": ["src"], - "@jirajs/*": ["src/*"], - "@tests": ["tests"], - "@tests/*": ["tests/*"] - }, "declaration": true, - "importHelpers": true, "strict": true, - "sourceMap": true, "forceConsistentCasingInFileNames": true }, "include": [ diff --git a/vitest.config.mts b/vitest.config.mts index 3d8f3167d9..43243190a4 100644 --- a/vitest.config.mts +++ b/vitest.config.mts @@ -1,6 +1,4 @@ import { defineConfig } from 'vitest/config'; -// eslint-disable-next-line import/no-extraneous-dependencies -import tsconfigPaths from 'vite-tsconfig-paths'; export default defineConfig({ test: { @@ -16,5 +14,4 @@ export default defineConfig({ '@tests': new URL('./tests', import.meta.url).pathname, }, }, - plugins: [tsconfigPaths({ configNames: ['tsconfig.json', 'tsconfig.lint.json'] })], });