PostmanTooling
Defined in: plugins/holocron-plugin-postman/src/capabilities/tooling.ts:73
The Postman implementation of the tooling capability: syncs an OpenAPI spec, collection and environments into a workspace.
Implements
Section titled “Implements”Tooling
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new PostmanTooling(
client,opts):PostmanTooling
Defined in: plugins/holocron-plugin-postman/src/capabilities/tooling.ts:83
Parameters
Section titled “Parameters”client
Section titled “client”() => object
PostmanToolingOptions
Returns
Section titled “Returns”PostmanTooling
Properties
Section titled “Properties”
readonlykey:"tooling"
Defined in: plugins/holocron-plugin-postman/src/capabilities/tooling.ts:75
The capability this class provides, always "tooling".
Implementation of
Section titled “Implementation of”Tooling.key
providerName
Section titled “providerName”
readonlyproviderName:"postman"="postman"
Defined in: plugins/holocron-plugin-postman/src/capabilities/tooling.ts:77
The provider name, "postman".
Implementation of
Section titled “Implementation of”Tooling.providerName
Methods
Section titled “Methods”createCollection()
Section titled “createCollection()”createCollection(
input):Promise<PostmanCollection>
Defined in: plugins/holocron-plugin-postman/src/capabilities/tooling.ts:247
Creates a collection in the workspace from a Postman collection document.
Parameters
Section titled “Parameters”collection
Section titled “collection”unknown
workspaceId
Section titled “workspaceId”string
Returns
Section titled “Returns”Promise<PostmanCollection>
createEnvironment()
Section titled “createEnvironment()”createEnvironment(
input):Promise<PostmanEnvironment>
Defined in: plugins/holocron-plugin-postman/src/capabilities/tooling.ts:296
Creates an environment in the workspace.
Parameters
Section titled “Parameters”environment
Section titled “environment”unknown
workspaceId
Section titled “workspaceId”string
Returns
Section titled “Returns”Promise<PostmanEnvironment>
createSpec()
Section titled “createSpec()”createSpec(
input):Promise<PostmanSpec>
Defined in: plugins/holocron-plugin-postman/src/capabilities/tooling.ts:314
Creates an API spec in the workspace from the given file content.
Parameters
Section titled “Parameters”fileContent
Section titled “fileContent”string
filePath?
Section titled “filePath?”string
string
string
workspaceId
Section titled “workspaceId”string
Returns
Section titled “Returns”Promise<PostmanSpec>
deleteCollection()
Section titled “deleteCollection()”deleteCollection(
uid):Promise<void>
Defined in: plugins/holocron-plugin-postman/src/capabilities/tooling.ts:259
Deletes the collection with this uid.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
doctor()
Section titled “doctor()”doctor():
Promise<ToolingDoctorReport>
Defined in: plugins/holocron-plugin-postman/src/capabilities/tooling.ts:196
Checks the key and the configured workspace; reports the authenticated user and the workspace, or why either failed.
Returns
Section titled “Returns”Promise<ToolingDoctorReport>
Implementation of
Section titled “Implementation of”Tooling.doctor
export()
Section titled “export()”export(
input):Promise<ToolingExportResult>
Defined in: plugins/holocron-plugin-postman/src/capabilities/tooling.ts:191
Writes each collection file in Postman’s schema 3.0 YAML layout under input.outDir by running the Postman CLI
(postman collection migrate), one folder per collection. Environment files are reported as issues, not exported.
Needs the CLI on the PATH and no API key: it never touches the workspace.
Parameters
Section titled “Parameters”ToolingExportInput
Returns
Section titled “Returns”Promise<ToolingExportResult>
Implementation of
Section titled “Implementation of”Tooling.export
findCollectionByName()
Section titled “findCollectionByName()”findCollectionByName(
input):Promise<PostmanCollection|null>
Defined in: plugins/holocron-plugin-postman/src/capabilities/tooling.ts:241
Finds a collection in the workspace by exact name, or null when there is none.
Parameters
Section titled “Parameters”string
workspaceId
Section titled “workspaceId”string
Returns
Section titled “Returns”Promise<PostmanCollection | null>
findEnvironmentByName()
Section titled “findEnvironmentByName()”findEnvironmentByName(
input):Promise<PostmanEnvironment|null>
Defined in: plugins/holocron-plugin-postman/src/capabilities/tooling.ts:284
Finds an environment in the workspace by exact name, or null when there is none.
Parameters
Section titled “Parameters”string
workspaceId
Section titled “workspaceId”string
Returns
Section titled “Returns”Promise<PostmanEnvironment | null>
findSpecByName()
Section titled “findSpecByName()”findSpecByName(
input):Promise<PostmanSpec|null>
Defined in: plugins/holocron-plugin-postman/src/capabilities/tooling.ts:308
Finds an API spec in the workspace by exact name, or null when there is none.
Parameters
Section titled “Parameters”string
workspaceId
Section titled “workspaceId”string
Returns
Section titled “Returns”Promise<PostmanSpec | null>
getEnvironment()
Section titled “getEnvironment()”getEnvironment(
uid):Promise<PostmanEnvironment>
Defined in: plugins/holocron-plugin-postman/src/capabilities/tooling.ts:290
Reads one environment with its variables.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<PostmanEnvironment>
getMyself()
Section titled “getMyself()”getMyself():
Promise<PostmanUser>
Defined in: plugins/holocron-plugin-postman/src/capabilities/tooling.ts:229
Returns the authenticated Postman user.
Returns
Section titled “Returns”Promise<PostmanUser>
importOpenApi()
Section titled “importOpenApi()”importOpenApi(
input):Promise<PostmanCollection>
Defined in: plugins/holocron-plugin-postman/src/capabilities/tooling.ts:264
Imports an OpenAPI document into the workspace as a collection; throws when Postman returns none.
Parameters
Section titled “Parameters”unknown
workspaceId
Section titled “workspaceId”string
Returns
Section titled “Returns”Promise<PostmanCollection>
listEnvironments()
Section titled “listEnvironments()”listEnvironments(
input):Promise<PostmanEnvironment[]>
Defined in: plugins/holocron-plugin-postman/src/capabilities/tooling.ts:278
Lists the workspace’s environments.
Parameters
Section titled “Parameters”workspaceId
Section titled “workspaceId”string
Returns
Section titled “Returns”Promise<PostmanEnvironment[]>
listWorkspaces()
Section titled “listWorkspaces()”listWorkspaces():
Promise<PostmanWorkspace[]>
Defined in: plugins/holocron-plugin-postman/src/capabilities/tooling.ts:235
Lists the workspaces the key can see.
Returns
Section titled “Returns”Promise<PostmanWorkspace[]>
sync()
Section titled “sync()”sync():
Promise<void>
Defined in: plugins/holocron-plugin-postman/src/capabilities/tooling.ts:96
Sync the tool’s authoritative state from the repo.
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”Tooling.sync
updateCollection()
Section titled “updateCollection()”updateCollection(
input):Promise<PostmanCollection>
Defined in: plugins/holocron-plugin-postman/src/capabilities/tooling.ts:253
Replaces the collection with this uid.
Parameters
Section titled “Parameters”collection
Section titled “collection”unknown
string
Returns
Section titled “Returns”Promise<PostmanCollection>
updateEnvironment()
Section titled “updateEnvironment()”updateEnvironment(
input):Promise<PostmanEnvironment>
Defined in: plugins/holocron-plugin-postman/src/capabilities/tooling.ts:302
Replaces the environment with this uid.
Parameters
Section titled “Parameters”environment
Section titled “environment”unknown
string
Returns
Section titled “Returns”Promise<PostmanEnvironment>
upsertSpecFile()
Section titled “upsertSpecFile()”upsertSpecFile(
input):Promise<void>
Defined in: plugins/holocron-plugin-postman/src/capabilities/tooling.ts:330
Writes new content to a file of an existing spec.
Parameters
Section titled “Parameters”content
Section titled “content”string
filePath
Section titled “filePath”string
specId
Section titled “specId”string
Returns
Section titled “Returns”Promise<void>