-
Notifications
You must be signed in to change notification settings - Fork 2
new endpoints #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
new endpoints #35
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
934ca92
fix: remove spaces
wraithgar bb4a434
feat: add new package/org/user access endpoint
wraithgar 2ed5388
feat: add org membership endpoints
wraithgar a0b2ed5
feat: add team membership endpoints
wraithgar 61be604
feat: add search endpoint
wraithgar 54caf8f
fix: deal with no-invalid-media-type-examples warning
wraithgar 545e3b9
fix: add 4xx response to search
wraithgar 5a4138d
fix: set time field to date-time format
wraithgar ae5f75b
fix: search results description
wraithgar 2707603
fix: typo
wraithgar 0a6b138
fix: typo
wraithgar d1ea3df
fix: typo
wraithgar c1476b2
fix: typo
wraithgar 6ffa659
fix: add tag
wraithgar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,178 @@ | ||
| components: | ||
| responses: | ||
| PackageAccessLevels: | ||
| description: 'Packages with their access levels' | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: object | ||
| additionalProperties: | ||
| type: string | ||
| example: | ||
| '@npmcli/arborist': read-write | ||
| '@npmcli/config': read-only | ||
| PackageVisibility: | ||
| description: 'Packages with their visibility' | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: object | ||
| additionalProperties: | ||
| type: string | ||
| example: | ||
| '@npmcli/arborist': public | ||
| '@npmcli/hidden': private | ||
| UserAccessLevels: | ||
| description: User access levels | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: object | ||
| additionalProperties: | ||
| type: string | ||
| example: | ||
| npm: read-write | ||
| microsoft: read-only | ||
| paths: | ||
| /-/team/{orgName}/{teamName}/package: | ||
| parameters: | ||
| - $ref: './api/shared-components.yaml#/components/parameters/OrgName' | ||
| - $ref: './api/shared-components.yaml#/components/parameters/TeamName' | ||
| - $ref: './api/shared-components.yaml#/components/parameters/RequiredBearerToken' | ||
| get: | ||
| tags: | ||
| - Access | ||
| summary: Get all packages for a team | ||
| description: Get all of the packages a team has access to, as well as the access level that team has for each package. | ||
| operationId: getTeamPackageGrants | ||
| security: | ||
| - npmSessionToken: [] | ||
| responses: | ||
| '200': | ||
| $ref: '#/components/responses/PackageAccessLevels' | ||
| '401': | ||
| $ref: './api/shared-components.yaml#/components/responses/Unauthorized' | ||
| put: | ||
| tags: | ||
| - Access | ||
| summary: Grant access to a package for a team | ||
| operationId: createTeamPackageGrant | ||
| requestBody: | ||
| required: true | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: object | ||
| properties: | ||
| package: | ||
| type: string | ||
| description: The name of the package to give access to | ||
| permissions: | ||
| type: string | ||
| enum: | ||
| - read-only | ||
| - read-write | ||
| description: The access level of the package to grant to the team | ||
| security: | ||
| - npmSessionToken: [] | ||
| responses: | ||
| '201': | ||
| $ref: './api/shared-components.yaml#/components/responses/EmptySuccess' | ||
| '401': | ||
| $ref: './api/shared-components.yaml#/components/responses/Unauthorized' | ||
| delete: | ||
wraithgar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| tags: | ||
| - Access | ||
| summary: Remove access to a package for a team | ||
| operationId: deleteTeamPackageGrant | ||
| security: | ||
| - npmSessionToken: [] | ||
| responses: | ||
| '204': | ||
| $ref: './api/shared-components.yaml#/components/responses/EmptySuccess' | ||
| '401': | ||
| $ref: './api/shared-components.yaml#/components/responses/Unauthorized' | ||
| /-/org/{orgName}/package: | ||
| parameters: | ||
| - $ref: './api/shared-components.yaml#/components/parameters/OrgName' | ||
| - $ref: './api/shared-components.yaml#/components/parameters/RequiredBearerToken' | ||
| get: | ||
| tags: | ||
| - Access | ||
| summary: Get all packages for an org | ||
| description: Get all of the packages an org has access to, as well a the access level that org has for each pacakge. | ||
| operationId: getOrgPackages | ||
| security: | ||
| - npmSessionToken: [] | ||
| responses: | ||
| '200': | ||
| $ref: '#/components/responses/PackageAccessLevels' | ||
| '401': | ||
| $ref: './api/shared-components.yaml#/components/responses/Unauthorized' | ||
| /-/package/{escapedPackageName}/collaborators: | ||
| parameters: | ||
| - $ref: './api/shared-components.yaml#/components/parameters/EscapedPackageName' | ||
| - $ref: './api/shared-components.yaml#/components/parameters/RequiredBearerToken' | ||
| get: | ||
| tags: | ||
| - Access | ||
| summary: Get all of the users that have access to a package, as well as the access level that user has for each package. | ||
| operationId: getPackageCollaborators | ||
| security: | ||
| - npmSessionToken: [] | ||
| responses: | ||
| '200': | ||
| $ref: '#/components/responses/UserAccessLevels' | ||
| '401': | ||
| $ref: './api/shared-components.yaml#/components/responses/Unauthorized' | ||
| /-/package/{escapedPackageName}/visibility: | ||
| parameters: | ||
| - $ref: './api/shared-components.yaml#/components/parameters/EscapedPackageName' | ||
| - $ref: './api/shared-components.yaml#/components/parameters/RequiredBearerToken' | ||
| get: | ||
| tags: | ||
| - Access | ||
| summary: Get the visibility of a package. | ||
| operationId: getPackageVisibility | ||
| security: | ||
| - npmSessionToken: [] | ||
| responses: | ||
| '200': | ||
| $ref: '#/components/responses/PackageVisibility' | ||
| '401': | ||
| $ref: './api/shared-components.yaml#/components/responses/Unauthorized' | ||
| /-/package/{escapedPackageName}/access: | ||
| parameters: | ||
| - $ref: './api/shared-components.yaml#/components/parameters/EscapedPackageName' | ||
| post: | ||
| tags: | ||
| - Access | ||
| summary: Sets the various access levels for a package. | ||
| operationId: setPackageAccess | ||
| requestBody: | ||
| required: true | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: object | ||
| properties: | ||
| # cidr_whitelist? | ||
| access: | ||
| type: string | ||
| enum: | ||
| - public | ||
| - private | ||
| description: Visibility of a package | ||
| publish_requires_tfa: | ||
| type: boolean | ||
| description: Whether publishing this package requires multifactor auth | ||
| automation_token_overrides_tfa: | ||
| type: boolean | ||
| description: Whether or not automation tokens override the requirement for multifactor auth | ||
| security: | ||
| - npmSessionToken: [] | ||
| responses: | ||
| '200': | ||
| $ref: './api/shared-components.yaml#/components/responses/EmptySuccess' | ||
| '401': | ||
| $ref: './api/shared-components.yaml#/components/responses/Unauthorized' | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.