@zowe/cics-for-zowe-explorer-api
Version:
IBM CICS for Zowe Explorer API
67 lines (43 loc) • 2.03 kB
Markdown
This is an API package that works alongside the **IBM CICS for Zowe Explorer** VS Code extension to allow extenders to import and access interfaces relevent to extending the CICS extension.
- Enum of CICS resources supported by IBM CICS for Zowe Explorer.
```typescript
import { ResourceTypes } from "@zowe/cics-for-zowe-explorer-api";
const localFileResource = ResourcesTypes.CICSLocalFile;
const programResource = ResourcesTypes.CICSProgram;
```
- List of strings representing the names of CICS resources supported by IBM CICS for Zowe Explorer.
```typescript
import { SupportedResourceTypes } from "@zowe/cics-for-zowe-explorer-api";
SupportedResourceTypes.map((resourceName: string) => console.log(resourceName));
```
- Interface used as a parent to all CICS resources; specific resources extend this interface.
```typescript
import { IResource } from "@zowe/cics-for-zowe-explorer-api";
const program: IResource = {
eyu_cicsname: "MYREGION",
status: "enabled",
};
```
- Interface representing context information about a CICS resource.
- Includes a the CICS session, CICS Zowe profile, CICSplex name, and region name
```typescript
import { IResourceContext } from "@zowe/cics-for-zowe-explorer-api";
const resourceContext: IResourceContext;
const cicsSessionWithAuthToken = resourceContext.session;
console.log(`My resource is in region ${resourceContext.regionName} and CICSplex ${resourceContext.cicsplexName}`);
```
- Interface representing the whole API offered by the IBM CICS for Zowe Explorer VS Code extension.
- Contains the ResourceTypes, and SupportedResources APIs.
```typescript
import { IExtensionAPI } from "@zowe/cics-for-zowe-explorer-api";
import { Extension } from "vscode";
const extension: Extension = vscode.extensions.getExtension("Zowe.cics-extension-for-zowe");
const api: IExtensionAPI = await extension?.activate();
```