npm

package
v1.0.0-b5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NpmBatchOperationTypeValues = npmBatchOperationTypeValuesType{

	Promote: "promote",

	Deprecate: "deprecate",

	Unpublish: "unpublish",

	PermanentDelete: "permanentDelete",

	RestoreToFeed: "restoreToFeed",

	Delete: "delete",
}
View Source
var ResourceAreaId, _ = uuid.Parse("4c83cfc1-f33a-477e-a789-29d38ffca52e")

Functions

This section is empty.

Types

type BatchDeprecateData

type BatchDeprecateData struct {
	// Deprecate message that will be added to packages
	Message *string `json:"message,omitempty"`
}

Data required to deprecate multiple package versions. Pass this while performing NpmBatchOperationTypes.Deprecate batch operation.

type Client

type Client interface {
	// [Preview API] Delete a package version without an npm scope from the recycle bin.
	DeletePackageVersionFromRecycleBin(context.Context, DeletePackageVersionFromRecycleBinArgs) error
	// [Preview API] Delete a package version with an npm scope from the recycle bin.
	DeleteScopedPackageVersionFromRecycleBin(context.Context, DeleteScopedPackageVersionFromRecycleBinArgs) error
	// [Preview API]
	GetContentScopedPackage(context.Context, GetContentScopedPackageArgs) (io.ReadCloser, error)
	// [Preview API] Get an unscoped npm package.
	GetContentUnscopedPackage(context.Context, GetContentUnscopedPackageArgs) (io.ReadCloser, error)
	// [Preview API] Get information about an unscoped package version.
	GetPackageInfo(context.Context, GetPackageInfoArgs) (*Package, error)
	// [Preview API] Get information about an unscoped package version in the recycle bin.
	GetPackageVersionMetadataFromRecycleBin(context.Context, GetPackageVersionMetadataFromRecycleBinArgs) (*NpmPackageVersionDeletionState, error)
	// [Preview API] Get the Readme for a package version with an npm scope.
	GetReadmeScopedPackage(context.Context, GetReadmeScopedPackageArgs) (io.ReadCloser, error)
	// [Preview API] Get the Readme for a package version that has no npm scope.
	GetReadmeUnscopedPackage(context.Context, GetReadmeUnscopedPackageArgs) (io.ReadCloser, error)
	// [Preview API] Get information about a scoped package version (such as @scope/name).
	GetScopedPackageInfo(context.Context, GetScopedPackageInfoArgs) (*Package, error)
	// [Preview API] Get information about a scoped package version in the recycle bin.
	GetScopedPackageVersionMetadataFromRecycleBin(context.Context, GetScopedPackageVersionMetadataFromRecycleBinArgs) (*NpmPackageVersionDeletionState, error)
	// [Preview API] Restore a package version without an npm scope from the recycle bin to its feed.
	RestorePackageVersionFromRecycleBin(context.Context, RestorePackageVersionFromRecycleBinArgs) error
	// [Preview API] Restore a package version with an npm scope from the recycle bin to its feed.
	RestoreScopedPackageVersionFromRecycleBin(context.Context, RestoreScopedPackageVersionFromRecycleBinArgs) error
	// [Preview API] Unpublish an unscoped package version.
	UnpublishPackage(context.Context, UnpublishPackageArgs) (*Package, error)
	// [Preview API] Unpublish a scoped package version (such as @scope/name).
	UnpublishScopedPackage(context.Context, UnpublishScopedPackageArgs) (*Package, error)
	// [Preview API]
	UpdatePackage(context.Context, UpdatePackageArgs) (*Package, error)
	// [Preview API] Update several packages from a single feed in a single request. The updates to the packages do not happen atomically.
	UpdatePackages(context.Context, UpdatePackagesArgs) error
	// [Preview API]
	UpdateScopedPackage(context.Context, UpdateScopedPackageArgs) (*Package, error)
}

func NewClient

func NewClient(ctx context.Context, connection *azuredevops.Connection) (Client, error)

type ClientImpl

type ClientImpl struct {
	Client azuredevops.Client
}

func (*ClientImpl) DeletePackageVersionFromRecycleBin

func (client *ClientImpl) DeletePackageVersionFromRecycleBin(ctx context.Context, args DeletePackageVersionFromRecycleBinArgs) error

[Preview API] Delete a package version without an npm scope from the recycle bin.

func (*ClientImpl) DeleteScopedPackageVersionFromRecycleBin

func (client *ClientImpl) DeleteScopedPackageVersionFromRecycleBin(ctx context.Context, args DeleteScopedPackageVersionFromRecycleBinArgs) error

[Preview API] Delete a package version with an npm scope from the recycle bin.

func (*ClientImpl) GetContentScopedPackage

func (client *ClientImpl) GetContentScopedPackage(ctx context.Context, args GetContentScopedPackageArgs) (io.ReadCloser, error)

[Preview API]

func (*ClientImpl) GetContentUnscopedPackage

func (client *ClientImpl) GetContentUnscopedPackage(ctx context.Context, args GetContentUnscopedPackageArgs) (io.ReadCloser, error)

[Preview API] Get an unscoped npm package.

func (*ClientImpl) GetPackageInfo

func (client *ClientImpl) GetPackageInfo(ctx context.Context, args GetPackageInfoArgs) (*Package, error)

[Preview API] Get information about an unscoped package version.

func (*ClientImpl) GetPackageVersionMetadataFromRecycleBin

func (client *ClientImpl) GetPackageVersionMetadataFromRecycleBin(ctx context.Context, args GetPackageVersionMetadataFromRecycleBinArgs) (*NpmPackageVersionDeletionState, error)

[Preview API] Get information about an unscoped package version in the recycle bin.

func (*ClientImpl) GetReadmeScopedPackage

func (client *ClientImpl) GetReadmeScopedPackage(ctx context.Context, args GetReadmeScopedPackageArgs) (io.ReadCloser, error)

[Preview API] Get the Readme for a package version with an npm scope.

func (*ClientImpl) GetReadmeUnscopedPackage

func (client *ClientImpl) GetReadmeUnscopedPackage(ctx context.Context, args GetReadmeUnscopedPackageArgs) (io.ReadCloser, error)

[Preview API] Get the Readme for a package version that has no npm scope.

func (*ClientImpl) GetScopedPackageInfo

func (client *ClientImpl) GetScopedPackageInfo(ctx context.Context, args GetScopedPackageInfoArgs) (*Package, error)

[Preview API] Get information about a scoped package version (such as @scope/name).

func (*ClientImpl) GetScopedPackageVersionMetadataFromRecycleBin

func (client *ClientImpl) GetScopedPackageVersionMetadataFromRecycleBin(ctx context.Context, args GetScopedPackageVersionMetadataFromRecycleBinArgs) (*NpmPackageVersionDeletionState, error)

[Preview API] Get information about a scoped package version in the recycle bin.

func (*ClientImpl) RestorePackageVersionFromRecycleBin

func (client *ClientImpl) RestorePackageVersionFromRecycleBin(ctx context.Context, args RestorePackageVersionFromRecycleBinArgs) error

[Preview API] Restore a package version without an npm scope from the recycle bin to its feed.

func (*ClientImpl) RestoreScopedPackageVersionFromRecycleBin

func (client *ClientImpl) RestoreScopedPackageVersionFromRecycleBin(ctx context.Context, args RestoreScopedPackageVersionFromRecycleBinArgs) error

[Preview API] Restore a package version with an npm scope from the recycle bin to its feed.

func (*ClientImpl) UnpublishPackage

func (client *ClientImpl) UnpublishPackage(ctx context.Context, args UnpublishPackageArgs) (*Package, error)

[Preview API] Unpublish an unscoped package version.

func (*ClientImpl) UnpublishScopedPackage

func (client *ClientImpl) UnpublishScopedPackage(ctx context.Context, args UnpublishScopedPackageArgs) (*Package, error)

[Preview API] Unpublish a scoped package version (such as @scope/name).

func (*ClientImpl) UpdatePackage

func (client *ClientImpl) UpdatePackage(ctx context.Context, args UpdatePackageArgs) (*Package, error)

[Preview API]

func (*ClientImpl) UpdatePackages

func (client *ClientImpl) UpdatePackages(ctx context.Context, args UpdatePackagesArgs) error

[Preview API] Update several packages from a single feed in a single request. The updates to the packages do not happen atomically.

func (*ClientImpl) UpdateScopedPackage

func (client *ClientImpl) UpdateScopedPackage(ctx context.Context, args UpdateScopedPackageArgs) (*Package, error)

[Preview API]

type DeletePackageVersionFromRecycleBinArgs

type DeletePackageVersionFromRecycleBinArgs struct {
	// (required) Name or ID of the feed.
	FeedId *string
	// (required) Name of the package.
	PackageName *string
	// (required) Version of the package.
	PackageVersion *string
}

Arguments for the DeletePackageVersionFromRecycleBin function

type DeleteScopedPackageVersionFromRecycleBinArgs

type DeleteScopedPackageVersionFromRecycleBinArgs struct {
	// (required) Name or ID of the feed.
	FeedId *string
	// (required) Scope of the package (the 'scope' part of @scope/name).
	PackageScope *string
	// (required) Name of the package (the 'name' part of @scope/name).
	UnscopedPackageName *string
	// (required) Version of the package.
	PackageVersion *string
}

Arguments for the DeleteScopedPackageVersionFromRecycleBin function

type GetContentScopedPackageArgs

type GetContentScopedPackageArgs struct {
	// (required)
	FeedId *string
	// (required)
	PackageScope *string
	// (required)
	UnscopedPackageName *string
	// (required)
	PackageVersion *string
}

Arguments for the GetContentScopedPackage function

type GetContentUnscopedPackageArgs

type GetContentUnscopedPackageArgs struct {
	// (required) Name or ID of the feed.
	FeedId *string
	// (required) Name of the package.
	PackageName *string
	// (required) Version of the package.
	PackageVersion *string
}

Arguments for the GetContentUnscopedPackage function

type GetPackageInfoArgs

type GetPackageInfoArgs struct {
	// (required) Name or ID of the feed.
	FeedId *string
	// (required) Name of the package.
	PackageName *string
	// (required) Version of the package.
	PackageVersion *string
}

Arguments for the GetPackageInfo function

type GetPackageVersionMetadataFromRecycleBinArgs

type GetPackageVersionMetadataFromRecycleBinArgs struct {
	// (required) Name or ID of the feed.
	FeedId *string
	// (required) Name of the package.
	PackageName *string
	// (required) Version of the package.
	PackageVersion *string
}

Arguments for the GetPackageVersionMetadataFromRecycleBin function

type GetReadmeScopedPackageArgs

type GetReadmeScopedPackageArgs struct {
	// (required) Name or ID of the feed.
	FeedId *string
	// (required) Scope of the package (the 'scope' part of @scope\name)
	PackageScope *string
	// (required) Name of the package (the 'name' part of @scope\name)
	UnscopedPackageName *string
	// (required) Version of the package.
	PackageVersion *string
}

Arguments for the GetReadmeScopedPackage function

type GetReadmeUnscopedPackageArgs

type GetReadmeUnscopedPackageArgs struct {
	// (required) Name or ID of the feed.
	FeedId *string
	// (required) Name of the package.
	PackageName *string
	// (required) Version of the package.
	PackageVersion *string
}

Arguments for the GetReadmeUnscopedPackage function

type GetScopedPackageInfoArgs

type GetScopedPackageInfoArgs struct {
	// (required) Name or ID of the feed.
	FeedId *string
	// (required) Scope of the package (the 'scope' part of @scope/name).
	PackageScope *string
	// (required) Name of the package (the 'name' part of @scope/name).
	UnscopedPackageName *string
	// (required) Version of the package.
	PackageVersion *string
}

Arguments for the GetScopedPackageInfo function

type GetScopedPackageVersionMetadataFromRecycleBinArgs

type GetScopedPackageVersionMetadataFromRecycleBinArgs struct {
	// (required) Name or ID of the feed.
	FeedId *string
	// (required) Scope of the package (the 'scope' part of @scope/name)
	PackageScope *string
	// (required) Name of the package (the 'name' part of @scope/name).
	UnscopedPackageName *string
	// (required) Version of the package.
	PackageVersion *string
}

Arguments for the GetScopedPackageVersionMetadataFromRecycleBin function

type NpmBatchOperationType

type NpmBatchOperationType string

Describes Npm batch operation types.

type NpmPackageVersionDeletionState

type NpmPackageVersionDeletionState struct {
	// Name of the package.
	Name *string `json:"name,omitempty"`
	// UTC date the package was unpublished.
	UnpublishedDate *azuredevops.Time `json:"unpublishedDate,omitempty"`
	// Version of the package.
	Version *string `json:"version,omitempty"`
}

Deletion state of an npm package.

type NpmPackagesBatchRequest

type NpmPackagesBatchRequest struct {
	// Data required to perform the operation. This is optional based on type of operation. Use BatchPromoteData if performing a promote operation.
	Data interface{} `json:"data,omitempty"`
	// Type of operation that needs to be performed on packages.
	Operation *NpmBatchOperationType `json:"operation,omitempty"`
	// The packages onto which the operation will be performed.
	Packages *[]packagingshared.MinimalPackageDetails `json:"packages,omitempty"`
}

A batch of operations to apply to package versions.

type NpmRecycleBinPackageVersionDetails

type NpmRecycleBinPackageVersionDetails struct {
	// Setting to false will undo earlier deletion and restore the package to feed.
	Deleted *bool `json:"deleted,omitempty"`
}

type Package

type Package struct {
	// Related REST links.
	Links interface{} `json:"_links,omitempty"`
	// Deprecated message, if any, for the package.
	DeprecateMessage *string `json:"deprecateMessage,omitempty"`
	// Package Id.
	Id *string `json:"id,omitempty"`
	// The display name of the package.
	Name *string `json:"name,omitempty"`
	// If and when the package was permanently deleted.
	PermanentlyDeletedDate *azuredevops.Time `json:"permanentlyDeletedDate,omitempty"`
	// The history of upstream sources for this package. The first source in the list is the immediate source from which this package was saved.
	SourceChain *[]packagingshared.UpstreamSourceInfo `json:"sourceChain,omitempty"`
	// If and when the package was deleted.
	UnpublishedDate *azuredevops.Time `json:"unpublishedDate,omitempty"`
	// The version of the package.
	Version *string `json:"version,omitempty"`
}

Package version metadata for an npm package

type PackageVersionDetails

type PackageVersionDetails struct {
	// Indicates the deprecate message of a package version
	DeprecateMessage *string `json:"deprecateMessage,omitempty"`
	// The view to which the package version will be added
	Views *webapi.JsonPatchOperation `json:"views,omitempty"`
}

type RestorePackageVersionFromRecycleBinArgs

type RestorePackageVersionFromRecycleBinArgs struct {
	// (required)
	PackageVersionDetails *NpmRecycleBinPackageVersionDetails
	// (required) Name or ID of the feed.
	FeedId *string
	// (required) Name of the package.
	PackageName *string
	// (required) Version of the package.
	PackageVersion *string
}

Arguments for the RestorePackageVersionFromRecycleBin function

type RestoreScopedPackageVersionFromRecycleBinArgs

type RestoreScopedPackageVersionFromRecycleBinArgs struct {
	// (required)
	PackageVersionDetails *NpmRecycleBinPackageVersionDetails
	// (required) Name or ID of the feed.
	FeedId *string
	// (required) Scope of the package (the 'scope' part of @scope/name).
	PackageScope *string
	// (required) Name of the package (the 'name' part of @scope/name).
	UnscopedPackageName *string
	// (required) Version of the package.
	PackageVersion *string
}

Arguments for the RestoreScopedPackageVersionFromRecycleBin function

type UnpublishPackageArgs

type UnpublishPackageArgs struct {
	// (required) Name or ID of the feed.
	FeedId *string
	// (required) Name of the package.
	PackageName *string
	// (required) Version of the package.
	PackageVersion *string
}

Arguments for the UnpublishPackage function

type UnpublishScopedPackageArgs

type UnpublishScopedPackageArgs struct {
	// (required) Name or ID of the feed.
	FeedId *string
	// (required) Scope of the package (the 'scope' part of @scope/name).
	PackageScope *string
	// (required) Name of the package (the 'name' part of @scope/name).
	UnscopedPackageName *string
	// (required) Version of the package.
	PackageVersion *string
}

Arguments for the UnpublishScopedPackage function

type UpdatePackageArgs

type UpdatePackageArgs struct {
	// (required)
	PackageVersionDetails *PackageVersionDetails
	// (required)
	FeedId *string
	// (required)
	PackageName *string
	// (required)
	PackageVersion *string
}

Arguments for the UpdatePackage function

type UpdatePackagesArgs

type UpdatePackagesArgs struct {
	// (required) Information about the packages to update, the operation to perform, and its associated data.
	BatchRequest *NpmPackagesBatchRequest
	// (required) Name or ID of the feed.
	FeedId *string
}

Arguments for the UpdatePackages function

type UpdateScopedPackageArgs

type UpdateScopedPackageArgs struct {
	// (required)
	PackageVersionDetails *PackageVersionDetails
	// (required)
	FeedId *string
	// (required)
	PackageScope *string
	// (required)
	UnscopedPackageName *string
	// (required)
	PackageVersion *string
}

Arguments for the UpdateScopedPackage function

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL