Hierarchy

  • ReactQueryNetworkClient
    • WorkspaceManagerClient

Constructors

Properties

actionInputsAccount: QueryObject<
    { actionsVersionId: string; envName?: string; stackVersionId: string },
    FixedFullInputContextResponse,
> = ...

Gets inputs from an action in account context

actionInputsInWorkspace: QueryObject<
    {
        actionsVersionId: string;
        envName?: string;
        stackVersionId: string;
        workspaceId: string;
    },
    FixedFullInputContextResponse,
> = ...

Gets inputs from an action in a workspace

activitiesApplication: InfiniteQueryObject<
    {
        $type?: | "CREATE"
        | "DEPLOY"
        | "DESTROY"
        | "ROLLBACK"
        | "ACTION"
        | "CUSTOMER_WORKFLOW";
        applicationId: string;
        envName: string;
        page: number;
        size: number;
        workspaceId: string;
    },
    FixedPaginatedActivityResponse,
    "items",
> = ...

Gets activities of an application

activitiesSharedInfra: InfiniteQueryObject<
    {
        $type?: | "CREATE"
        | "DEPLOY"
        | "DESTROY"
        | "ROLLBACK"
        | "ACTION"
        | "CUSTOMER_WORKFLOW";
        envName: string;
        page: number;
        sharedInfraId: string;
        size: number;
        workspaceId: string;
    },
    FixedPaginatedActivityResponse,
    "items",
> = ...

Gets activities of a shared infra

addStackToWorkspace: MutationObject<
    {
        addStackInWorkspaceRequest: AddStackInWorkspaceRequest;
        workspaceId: string;
    },
    never,
> = ...

Add a stack in a workspace

applicationDetails: QueryObject<
    { applicationId: string; envName: string; workspaceId: string },
    ApplicationResponse,
> = ...

Gets details of an application in an environment

applicationLinks: QueryObject<
    { applicationId: string; envName: string; workspaceId: string },
    LinksConsolidateResponse[],
> = ...

Gets links in an application for a given env

applicationsByWorkspaceWithPagination: QueryObject<
    {
        name?: string;
        page?: number;
        size?: number;
        sortBy?: "NAME"
        | "STACK"
        | "CREATED_AT"
        | "STACK_VERSION";
        sortDir?: "ASC" | "DESC";
        stackId?: string;
        stackVersionId?: string;
        workspaceId: string;
    },
    ApplicationPageResponse,
> = ...

Get all applications by workspace with pagination

appliedPluginsApplication: QueryObject<
    {
        applicationId: string;
        containsLinks?: boolean;
        envName: string;
        pluginType?: string;
        workspaceId: string;
    },
    ApplicationAppliedPluginsV2Response,
> = ...

Gets applied plugins in application

appliedPluginsSharedInfra: QueryObject<
    {
        containsLinks?: boolean;
        envName: string;
        pluginType?: string;
        sharedInfraId: string;
        workspaceId: string;
    },
    SharedInfraAppliedPluginsV2Response,
> = ...

Gets applied plugins in shared infra

createAppUsingWorkflow: MutationObject<
    {
        contentWorkflowSaveRequest: ContentWorkflowSaveRequest;
        workflowVersionId: string;
        workspaceId: string;
    },
    ContentWorkflowSaveResponse,
> = ...

Creates an application using workflow

createInfraUsingWorkflow: MutationObject<
    {
        contentWorkflowSaveRequest: ContentWorkflowSaveRequest;
        workflowVersionId: string;
        workspaceId: string;
    },
    ContentWorkflowSaveResponse,
> = ...

Creates an infra using workflow

deleteApplication: MutationObject<
    { applicationId: string; workspaceId: string },
    ManagerRunResponse[],
> = ...

Deletes an application

deleteInfra: MutationObject<
    { sharedInfraId: string; workspaceId: string },
    never,
> = ...

Deletes an infra

deleteWorkspace: MutationObject<{ workspaceId: string }, never> = ...

Deletes a workspace

filterStacksFromApplicationInWorkspace: QueryObject<
    { workspaceId: string },
    StackFilterResponse,
> = ...

Get all stacks used to create application in a workspace

filterStacksFromInfraInWorkspace: QueryObject<
    { workspaceId: string },
    StackFilterResponse,
> = ...

Get all stacks used to create infra in a workspace.

getAccountApplications: QueryObject<
    {
        name?: string;
        page?: number;
        size?: number;
        sortBy?: "NAME"
        | "STACK"
        | "CREATED_AT"
        | "STACK_VERSION";
        sortDir?: "ASC" | "DESC";
        stackId?: string;
        stackVersionId?: string;
        tab?: "FAVORITES" | "MY_RESOURCE" | "ALL_RESOURCE";
    },
    AccountApplicationPageResponse,
> = ...

Get all applications associated with an account.

getAccountApplicationsFilters: QueryObject<void, StackFilterResponse> = ...
  • Gets filters for applications associated with an account.
getAccountSharedInfra: QueryObject<
    {
        name?: string;
        page?: number;
        size?: number;
        sortBy?: "NAME"
        | "STACK"
        | "CREATED_AT"
        | "STACK_VERSION";
        sortDir?: "ASC" | "DESC";
        stackId?: string;
        stackVersionId?: string;
        tab?: "FAVORITES" | "MY_RESOURCE" | "ALL_RESOURCE";
    },
    AccountSharedInfraPageResponse,
> = ...

Get all shared infrastructures associated with an account.

getAccountSharedInfraFilters: QueryObject<void, StackFilterResponse> = ...
  • Gets filters for shared infrastructures associated with an account.
getAccountWorkspaces: QueryObject<
    {
        accountId?: string;
        aclOnly?: boolean;
        name?: string;
        page?: number;
        size?: number;
        sortBy?: "NAME"
        | "DESCRIPTION";
        sortDir?: "ASC" | "DESC";
        tabFilter?: "FAVORITES" | "MY_RESOURCE" | "ALL_RESOURCE";
    },
    WorkspacePageResponse,
> = ...

Get all workspaces associated with an account.

pluginInputsAccount: QueryObject<
    { envName?: string; pluginVersionId: string; stackVersionId: string },
    FixedFullInputContextResponse,
> = ...

Gets inputs from a plugin in account context

pluginInputsInWorkspace: QueryObject<
    {
        envName?: string;
        pluginVersionId: string;
        stackVersionId: string;
        workspaceId: string;
    },
    FixedFullInputContextResponse,
> = ...

Gets inputs from a plugin in a workspace stack

pluginInputsWithConnectionInterfaces: QueryObject<
    { pluginVersionId: string; stackVersionId: string; workspaceId: string },
    FixedPluginForAppCreationV2Response,
> = ...

Gets plugin inputs and connection interface from a plugin in a stack version in workspace

removeStackFromWorkspace: MutationObject<
    { stackVersionId: string; workspaceId: string },
    never,
> = ...

Removes a stack from a workspace

sharedInfraByWorkspaceWithPagination: QueryObject<
    {
        name?: string;
        page?: number;
        size?: number;
        sortBy?: "NAME"
        | "STACK"
        | "CREATED_AT"
        | "STACK_VERSION";
        sortDir?: "ASC" | "DESC";
        stackId?: string;
        stackVersionId?: string;
        workspaceId: string;
    },
    SharedInfraPageResponse,
> = ...

Get all shared infra by workspace with pagination

sharedInfraDetails: QueryObject<
    { envName: string; sharedInfraId: string; workspaceId: string },
    SharedInfraResponse,
> = ...

Gets details of a shared infra in an environment

sharedInfraLinks: QueryObject<
    { envName: string; sharedInfraId: string; workspaceId: string },
    LinksConsolidateResponse[],
> = ...

Gets links in a shared infra for a given env

stacksInWorkspace: QueryObject<
    { workspaceId: string },
    WorkspaceStackResponse[],
> = ...

Gets all stacks in a workspace

updateInputContextActionAccount: MutationObject<
    {
        actionVersionId: string;
        body: UpsertActionInputContextRequest[];
        stackVersionId: string;
    },
    never,
> = ...

Update context inputs from an action in account

updateInputContextActionWorkspace: MutationObject<
    {
        actionVersionId: string;
        body: UpsertActionInputContextRequest[];
        stackVersionId: string;
        workspaceId: string;
    },
    never,
> = ...

Update context inputs from an action in workspace

updateInputContextPluginAccount: MutationObject<
    {
        body: UpsertPluginInputContextRequest[];
        pluginVersionId: string;
        stackVersionId: string;
    },
    never,
> = ...

Update context inputs from an action in account

updateInputContextPluginWorkspace: MutationObject<
    {
        body: UpsertPluginInputContextRequest[];
        pluginVersionId: string;
        stackVersionId: string;
        workspaceId: string;
    },
    never,
> = ...

Update context inputs from an action in workspace

updateStacksToLatestVersionByWorkspace: MutationObject<
    {
        addStackInWorkspaceRequest: AddStackInWorkspaceRequest;
        workspaceId: string;
    },
    never,
> = ...

Updates Stacks To Latest Version By Workspace

workflowDataWithInputsInWorkspace: QueryObject<
    {
        stackVersionId: string;
        workflowVersionId: string;
        workspaceId: string;
    },
    FixedWorkflowForCreationResponse,
> = ...

Gets workflow in a workspace stack

workflowInputsInAccount: QueryObject<
    { envName?: string; stackVersionId: string; workflowVersionId: string },
    FixedFullInputContextResponse,
> = ...

Gets workflow inputs in an account stack

workflowsByStackIdAndWorkflowType: QueryObject<
    { stackId: string; workflowType: string; workspaceId: string },
    WorkflowCompleteResponse,
> = ...

Gets workflows from a given stack and workflow type

workspacesWithPagination: QueryObject<
    {
        accountId?: string;
        aclOnly?: boolean;
        name?: string;
        page?: number;
        size?: number;
        sortBy?: "NAME"
        | "DESCRIPTION";
        sortDir?: "ASC" | "DESC";
        tabFilter?: "FAVORITES" | "MY_RESOURCE" | "ALL_RESOURCE";
    },
    WorkspacePageResponse,
> = ...

Get all workspaces with pagination

Methods

  • Receives an HttpError and returns a StackspotAPIError.

    Parameters

    • error: HttpError

      the original HttpError created by oazapfts.

    Returns StackspotAPIError

  • Creates a function that checks the permission for a request generated by an oazapfts function.

    This is intended to help creating a manual operation.

    Type Parameters

    • Args extends [variables: Record<string, any>, opts?: RequestOpts] | [opts?: RequestOpts]

    Parameters

    • fn: (...args: Args) => Promise<any>

      the function generated by oazapfts.

    Returns (
        ...args: Args extends [opts?: RequestOpts]
            ? []
            : [variables?: Partial<Args[0]>],
    ) => Promise<boolean>

    a function that receives the variables of fn (if any) and returns a promise that resolves to true if the request is allowed and false otherwise.

    myOperation = this.mutation({
    // ...
    permission: this.createPermissionFunctionFor(oazapftsFnForMyOperation)
    })
  • Creates a function that runs a oazapfts function with an abort signal.

    This is intended to help creating a manual operation.

    Type Parameters

    • Args extends [variables: Record<string, any>, opts?: RequestOpts] | [opts?: RequestOpts]
    • Result

    Parameters

    • fn: (...args: Args) => Promise<Result>

      the function generated by oazapfts.

    Returns (
        ...args: Args extends [opts?: RequestOpts]
            ? [signal: AbortSignal]
            : [signal: AbortSignal, variables: Args[0]],
    ) => Promise<Result>

    a function that receives a signal and the variables of fn (if any) and returns the same as fn.

    myOperation = this.mutation({
    // ...
    request: this.createRequestFunctionFor(oazapftsFnForMyOperation)
    })
  • Makes a request (same signature as globalThis.fetch). This request will prepend the base url to the url and, if there's an active session, include authentication headers.

    Parameters

    • input: string | URL | Request

      the url or request object.

    • Optionalinit: RequestInit

      the fetch options.

    Returns Promise<Response>

    a promise with the Response.

  • Checks whether or not the current account is freemium.

    Returns boolean

    true if it's a freemium account, false otherwise.

  • Builds a mutation manually by using a configuration object.

    Type Parameters

    • Args extends [AbortSignal, Record<string, any>] | [AbortSignal]
    • Result

    Parameters

    • config: OperationConfig<Args, Result>

      the configuration object containing the name, a request function and a permission function.

    Returns MutationObject<Args extends [AbortSignal] ? void : Args[1], Result>

  • Builds a mutation manually by using a configuration object.

    Type Parameters

    • Args extends [AbortSignal, Record<string, any>] | [AbortSignal]
    • Result

    Parameters

    • config: Omit<OperationConfig<Args, Result>, "permission">

      the configuration object containing the name and a request function.

    Returns Omit<
        MutationObject<Args extends [AbortSignal] ? void : Args[1], Result>,
        keyof OperationObject<any>,
    >

  • Builds a mutation automatically by using a function generated by oazapfts.

    Type Parameters

    • Args extends [opts?: RequestOpts] | [variables: Record<string, any>, opts?: RequestOpts]
    • Result

    Parameters

    • fn: (...args: Args) => Promise<Result>

      the oazapfts function.

    Returns Args extends [variables: Variables, opts?: RequestOpts]
        ? MutationObject<Variables, Result>
        : MutationObject<void, Result>

  • Builds a query manually by using a configuration object.

    Type Parameters

    • Args extends [AbortSignal, Record<string, any>] | [AbortSignal]
    • Result

    Parameters

    • config: OperationConfig<Args, Result>

      the configuration object containing the name, a request function and a permission function.

    Returns QueryObject<Args extends [AbortSignal] ? void : Args[1], Result>

  • Builds a query manually by using a configuration object.

    Type Parameters

    • Args extends [AbortSignal, Record<string, any>] | [AbortSignal]
    • Result

    Parameters

    • config: Omit<OperationConfig<Args, Result>, "permission">

      the configuration object containing the name and a request function.

    Returns Omit<
        QueryObject<Args extends [AbortSignal] ? void : Args[1], Result>,
        "isAllowed" | "useAllowed" | "getPermissionKey",
    >

  • Builds a query automatically by using a function generated by oazapfts.

    Type Parameters

    • Args extends [opts?: RequestOpts] | [variables: Record<string, any>, opts?: RequestOpts]
    • Result

    Parameters

    • fn: (...args: Args) => Promise<Result>

      the oazapfts function.

    Returns Args extends [variables: Variables, opts?: RequestOpts]
        ? QueryObject<Variables, Result>
        : QueryObject<void, Result>

  • Verifies if the current user is allowed to send the given request.

    Parameters

    • method: HTTPMethod

      the request's method.

    • path: string

      the path to the resource.

    • Optionalbody: string | object

      the request's body.

    Returns Promise<boolean>

    a promise that resolves to true if it's allowed or false otherwise.

  • Builds a URL with the baseUrl of this network client and the path passed as parameter.

    Parameters

    • path: string

      the path to the resource.

    Returns URL

    a full URL.

  • Reads an EventSource from the endpoint. Differently than the original specification, this allows common HTTP requests with method and body to be made.

    Parameters

    • input: string | URL | Request

      the url or request object.

    • Optionalinit: RequestInit

      the fetch options.

    Returns Promise<FetchEventStream>

    a promise with a FetchEventStream, which is an AsyncGenerator.

    let events = this.stream('url', options)
    for await (let event of events) {
    console.log('<<', event.data)
    }
  • Sets up all network clients. Must be called before attempting to make any request.

    Parameters

    • sessionManager: SessionManager

      An object with functions capable of checking, retrieving and ending the current session.

    • env: Env

      The environment to send the requests to.

    Returns void