Hierarchy

  • ReactQueryNetworkClient
    • ContentClient

Constructors

Properties

accountWorkflows action actionByActionVersionId actionInputs actions actionsFromStack actionsInStack actionsV2 actionsVersions actionVersionRange actionVersions addActionsToPluginVersion addActionsToStackVersion addLinkInStack addWorkflowToStack addWorkspaceToStudio allStackVersionByIds applicationUsingPlugin availableWorkflowVersionsBySlug changeStudioVisibility connectionInterfaceTypes createStudio deleteActionVersion deleteLinkFromStack deletePluginVersion deleteStackVersion deleteStudio deprecateActionVersion deprecatePluginVersion deprecateStackVersion deprecationReasons downloadActionVersion getAllStacks getAllStacksV3 getStackByVersionId infrastructureUsingPlugin linksInStack listMostUsedStackVersions listPluginsFromStack pluginsRequiresPlugin pluginUsageSummary pluginVersionsByIds pluginVersionsNotInUse pluginVersionsUsedByApplication pluginVersionsUsedByInfrastructure pluginVersionsUsedByPlugin pluginVersionsUsedByStack pluginVersionsUsedByStarter pluginVersionUsageSummary removeActionVersionFromPlugin removeActionVersionFromStack removeWorkflowsFromStack removeWorkspaceFromStudio stacksFromStudios stacksUsingPlugin stackUsageSummary stackVersionsNotInUse stackVersionsUsageSummary stackVersionsUsedByWorkspace startersInStackVersion starterUsingPlugin studio studios studiosUserHasCreatePermission studiosWithPagination studioTabs updateStarter updateStudio updateStudioTabs workflow workflowDoc workflowsFromStackVersion workflowsFromStudio workflowVersions workspacesAssociatedToStudio workspacesUsingStack

Methods

Constructors

Properties

accountWorkflows: InfiniteQueryObject<
    { accountOnly?: boolean; filter?: string; page?: number; size?: number },
    PageAccountWorkflowResponse,
    "content",
> = ...

Gets all account workflows

action: QueryObject<
    {
        actionSlug: string;
        studioSlug: string;
        version?: string;
        xWorkspaceId?: string;
    },
    GetActionResponse,
> = ...

Gets Action by Slug and Studio

actionByActionVersionId: QueryObject<
    { actionVersionId: string; xWorkspaceId?: string },
    GetActionResponse,
> = ...

Gets Action by Action Version Id

actionInputs: OperationObject<
    { accountId?: string; actionVersionId: string; xWorkspaceId?: string },
> = ...

Gets the inputs of a specific Action. This fn is only used for permission purposes.

actions: QueryObject<
    {
        $type?: string;
        accountOnly?: boolean;
        filter?: string;
        name?: string;
        requiresConnection?: boolean;
        status?: (
            | "PENDING_APPROVAL"
            | "PENDING_CREATOR_UPDATE"
            | "PUBLICATION_APPROVED"
            | "PUBLICATION_DECLINED"
        )[];
        studioSlug?: string;
        technologies?: string[];
        xWorkspaceId?: string;
    },
    ActionResponse[],
> = ...

Gets list of Actions V1

actionsFromStack: QueryObject<
    {
        filterStackActionRequest: FilterStackActionRequest;
        pageable: Pageable;
        stackVersionId: string;
        xWorkspaceId?: string;
    },
    PageGetStackActionResponse,
> = ...

Get Actions from Stack

actionsInStack: QueryObject<
    {
        forPluginVersionId?: string;
        stackVersionId: string;
        xWorkspaceId?: string;
    },
    GetStackActionResponse[],
> = ...

Get list of Actions in Stack

actionsV2: QueryObject<
    {
        actionSlug?: string;
        filter?: string;
        pageable: Pageable;
        requiresConnection?: boolean;
        studioSlug?: string;
    },
    PageListActionV2Response,
> = ...

Gets list of Actions V2

actionsVersions: QueryObject<
    { body: ActionIdAndVersionReferenceRequest[] },
    ActionVersionDataWithInputsResponse[],
> = ...

Gets action versions by ids

actionVersionRange: QueryObject<
    {
        actionSlug: string;
        pageable: Pageable;
        range: string;
        requiresConnection?: boolean;
        studioSlug: string;
        xWorkspaceId?: string;
    },
    PageActionVersionDto,
> = ...

Get Action Version range by Action Slug

actionVersions: QueryObject<
    {
        actionSlug: string;
        requiresConnection?: boolean;
        status?: ("PUBLISHED" | "DEPRECATED" | "DRAFT" | "REPROVED")[];
        studioSlug: string;
        xWorkspaceId?: string;
    },
    ListActionVersionResponse,
> = ...

Gets all Versions of Action

addActionsToPluginVersion: MutationObject<
    {
        body: AddActionRequest[];
        pluginVersionId: string;
        stackVersionId: string;
    },
    unknown,
> = ...

Add Action to Plugin Version

addActionsToStackVersion: MutationObject<
    { body: AddActionRequest[]; stackVersionId: string },
    unknown,
> = ...

Add Action to Stack Version

addLinkInStack: MutationObject<
    { addLinkRequest: AddLinkRequest; stackVersionId: string },
    LinkResponse,
> = ...

Adds a link in a stack

addWorkflowToStack: MutationObject<
    { body: AddWorkflowRequest[]; stackVersionId: string },
    unknown,
> = ...

Adds a workflow from a stack version

addWorkspaceToStudio: MutationObject<
    { studioSlug: string; studioWorkspaceRequest: StudioWorkspaceRequest },
    unknown,
> = ...

Adds a workspace to a studio

allStackVersionByIds: QueryObject<
    {
        filterStackVersionRequest: FilterStackVersionRequest;
        xWorkspaceId?: string;
    },
    GetStackVersionResponse[],
> = ...

Gets all stack version by a list of ids

applicationUsingPlugin: QueryObject<
    {
        filter?: string;
        pageable: Pageable;
        pluginSlug: string;
        studioSlug: string;
    },
    PagePluginApplicationsResponse,
> = ...

Gets list of Application using the plugin

availableWorkflowVersionsBySlug: QueryObject<
    {
        pageable: Pageable;
        range: string;
        studioSlug: string;
        workflowSlug: string;
        xWorkspaceId?: string;
    },
    PageGetAvailableWorkflowVersionsResponse,
> = ...

Gets workflow doc

changeStudioVisibility: MutationObject<
    { changeVisibilityRequest: ChangeVisibilityRequest; studioSlug: string },
    StudioResponse,
> = ...

Changes studio visibility

connectionInterfaceTypes: QueryObject<void, ConnectionInterfaceResponseV2[]> = ...

Gets connection interface types

createStudio: MutationObject<
    Omit<
        { createStudioRequest: CreateStudioRequest },
        "authorization" | "jwtToken",
    > & {},
    CreateStudioResponse,
> = ...

Creates a studio

deleteActionVersion: MutationObject<{ actionVersionId: string }, unknown> = ...

Delete Action Version

deleteLinkFromStack: MutationObject<
    { linkId: string; stackVersionId: string },
    unknown,
> = ...

Adds a link in a stack

deletePluginVersion: MutationObject<
    { $override?: boolean; pluginVersionId: string },
    unknown,
> = ...

Delete a Plugin version of type draft or unpublish

deleteStackVersion: MutationObject<
    { deletionType: "DRAFT"
    | "UNPUBLISH"; stackVersionId: string },
    DeleteStackVersionResponse,
> = ...

Delete a stack version of type draft or unpublish

deleteStudio: MutationObject<{ studioId: string }, unknown> = ...

Deletes a studio

deprecateActionVersion: MutationObject<
    {
        actionVersionId: string;
        deprecateContentRequest: DeprecateContentRequest;
    },
    unknown,
> = ...

Deprecate Action Version

deprecatePluginVersion: MutationObject<
    Omit<
        {
            deprecateContentRequest: DeprecateContentRequest;
            pluginVersionId: string;
        },
        "authorization"
        | "jwtToken",
    > & {},
    unknown,
> = ...

Deprecate a plugin version

deprecateStackVersion: MutationObject<
    Omit<
        {
            deprecateContentRequest: DeprecateContentRequest;
            stackVersionId: string;
        },
        "authorization"
        | "jwtToken",
    > & {},
    unknown,
> = ...

Deprecate a stack version

deprecationReasons: QueryObject<void, string[]> = ...

Gets content deprecation reasons

downloadActionVersion: QueryObject<
    {
        actionSlug: string;
        studioSlug: string;
        version: string;
        xWorkspaceId?: string;
    },
    DownloadBase64Response,
> = ...

Download Action Version

getAllStacks: QueryObject<
    { isAccountHolder?: boolean; xWorkspaceId?: string },
    GetStackV2Response[],
> = ...

View all stacks by account

getAllStacksV3: QueryObject<
    {
        direction?: "ASC"
        | "DESC";
        filter?: string;
        isAccountHolder?: boolean;
        page?: number;
        size?: number;
        sort?: "NAME" | "DATE" | "STUDIO_NAME" | "VERSION";
        view?: "FAVORITES" | "ALL";
    },
    PageGetStackV3Response,
> = ...

View all stacks V3 by account

getStackByVersionId: QueryObject<
    { stackVersionId: string; xWorkspaceId?: string },
    GetStackVersionResponse,
> = ...

Gets a stack from a stack version id

infrastructureUsingPlugin: QueryObject<
    {
        filter?: string;
        pageable: Pageable;
        pluginSlug: string;
        studioSlug: string;
    },
    PagePluginInfrastructureViewResponse,
> = ...

Gets list of Infrastructure using the plugin

linksInStack: QueryObject<{ stackVersionId: string }, GetLinkResponse[]> = ...

Gets links in a stack

listMostUsedStackVersions: QueryObject<
    { filter?: string; pageable: Pageable },
    PageStackVersionMostUsedListResponse,
> = ...

List most used stack versions

listPluginsFromStack: QueryObject<
    {
        stackVersionId: string;
        starterType?: "INFRA"
        | "APP";
        xWorkspaceId?: string;
    },
    GetStackPluginsResponse,
> = ...

Gets plugins from a stack version

pluginsRequiresPlugin: QueryObject<
    {
        $type?: "INFRA"
        | "APP";
        filter?: string;
        pageable: Pageable;
        pluginSlug: string;
        studio?: string;
        studioSlug: string;
    },
    PagePluginViewUsageMonitorResponse,
> = ...

Gets list of Plugin that requires the plugin

pluginUsageSummary: QueryObject<
    { pluginSlug: string; studioSlug: string },
    PluginInUseSummaryResponse,
> = ...

Get usage summary of plugin

pluginVersionsByIds: QueryObject<
    {
        filterPluginVersionByIdsRequest: FilterPluginVersionByIdsRequest;
        xWorkspaceId?: string;
    },
    PluginVersionResponse[],
> = ...

Gets a list of plugin versions from list of ids.

pluginVersionsNotInUse: QueryObject<
    { pageable: Pageable; pluginSlug: string; studioSlug: string },
    PageGetPluginVersionsNotInUseResponse,
> = ...

Gets list of PluginVersions not used by any Content

pluginVersionsUsedByApplication: QueryObject<
    {
        applicationId: string;
        pageable: Pageable;
        pluginSlug: string;
        studioSlug: string;
    },
    PagePluginUsageMonitorApplicationViewResponse,
> = ...

Gets list of PluginVersions used by Applications

pluginVersionsUsedByInfrastructure: QueryObject<
    {
        infraId: string;
        pageable: Pageable;
        pluginSlug: string;
        studioSlug: string;
    },
    PageInfrastructureEnvironmentsUsesPluginResponse,
> = ...

Gets list of PluginVersions used by Infrastructure

pluginVersionsUsedByPlugin: QueryObject<
    {
        pageable: Pageable;
        pluginId: string;
        pluginSlug: string;
        studioSlug: string;
    },
    PageGetDependentPluginsVersionsResponse,
> = ...

Gets list of PluginVersions used by Plugin

pluginVersionsUsedByStack: QueryObject<
    {
        pageable: Pageable;
        pluginSlug: string;
        stackId: string;
        studioSlug: string;
        xWorkspaceId?: string;
    },
    PageGetPluginStackUsageResponse,
> = ...

Gets list of PluginVersions used by Stack

pluginVersionsUsedByStarter: QueryObject<
    {
        pageable: Pageable;
        pluginSlug: string;
        starterSlug: string;
        studioSlug: string;
    },
    PageGetPluginStackStarterUsageResponse,
> = ...

Gets list of PluginVersions used by Starter

pluginVersionUsageSummary: QueryObject<
    { pluginVersionId: string },
    PluginVersionUsageSummaryResponse,
> = ...

Get Plugin Version Usage Summary

removeActionVersionFromPlugin: MutationObject<
    {
        actionVersionId: string;
        pluginVersionId: string;
        stackVersionId: string;
    },
    unknown,
> = ...

Remove Action Version from Plugin

removeActionVersionFromStack: MutationObject<
    { actionVersionId: string; stackVersionId: string },
    unknown,
> = ...

Remove Action Version from Stack

removeWorkflowsFromStack: MutationObject<
    { stackVersionId: string; workflowId: string },
    unknown,
> = ...

Removes a workflow from a stack version

removeWorkspaceFromStudio: MutationObject<
    { studioSlug: string; workspaceId: string },
    unknown,
> = ...

Removes a given workspace from a studio

stacksFromStudios: QueryObject<
    {
        filterStackRequest: FilterStackRequest;
        pageable: Pageable;
        studioSlug: string;
        xWorkspaceId?: string;
    },
    PageGetStackStudioResponse,
> = ...

Gets stacks from a given studio

stacksUsingPlugin: QueryObject<
    {
        filter?: string;
        pageable: Pageable;
        pluginSlug: string;
        studioSlug: string;
    },
    PagePluginStacksResponse,
> = ...

Gets list of Stacks using the plugin

stackUsageSummary: QueryObject<
    { stackSlug: string; studioSlug: string },
    StackModalViewResponse,
> = ...

Gets usage summary of stack

stackVersionsNotInUse: QueryObject<
    { pageable: Pageable; stackSlug: string; studioSlug: string },
    PageGetUnusedStackVersionsResponse,
> = ...

Gets list of StackVersions not used by any Content

stackVersionsUsageSummary: QueryObject<
    { stackVersionId: string },
    StackVersionUsageSummaryResponse,
> = ...

Get Stack Version Usage Summary

stackVersionsUsedByWorkspace: QueryObject<
    {
        pageable: Pageable;
        stackSlug: string;
        studioSlug: string;
        workspaceId: string;
    },
    PageStackWorkspaceDetailViewResponse,
> = ...

Gets list StackVersions used by Workspace

startersInStackVersion: QueryObject<
    {
        $type?: "INFRA"
        | "APP";
        appAllowed?: boolean;
        stackVersionId: string;
        xWorkspaceId?: string;
    },
    StarterResponseWithRange[],
> = ...

Gets all starters from a stack version id

starterUsingPlugin: QueryObject<
    {
        $type?: "INFRA"
        | "APP";
        filter?: string;
        pageable: Pageable;
        pluginSlug: string;
        studioSlug: string;
    },
    PagePluginStarterResponse,
> = ...

Gets list of Starter using the plugin

studio: QueryObject<
    { studioIdOrSlug: string; xWorkspaceId?: string },
    StudioResponse,
> = ...

Gets a studio

studios: QueryObject<
    Omit<
        {
            aclOnly?: boolean;
            filter?: string;
            isAccountHolder?: boolean;
            xWorkspaceId?: string;
        },
        "authorization"
        | "jwtToken",
    > & {},
    StudioResponse[],
> = ...

Gets all studios

studiosUserHasCreatePermission: QueryObject<
    Omit<undefined | RequestOpts, "authorization" | "jwtToken"> & {},
    StudioSummaryResponse[],
> = ...

Gets all studios

studiosWithPagination: QueryObject<
    Omit<
        {
            aclOnly?: boolean;
            authorization: string;
            filter?: string;
            infraOnly?: boolean;
            isAccountHolder?: boolean;
            pageable: Pageable;
            startersOnly?: boolean;
            view?: "FAVORITES"
            | "ALL";
            workspaceId?: string;
            xWorkspaceId?: string;
        },
        "authorization"
        | "jwtToken",
    > & {},
    PageStudioResponse,
> = ...

Gets all studios

studioTabs: QueryObject<{ studioSlug: string }, string[]> = ...

Gets studio tabs

updateStarter: MutationObject<
    {
        patchStarterV2Request: PatchStarterV2Request;
        stackVersionId: string;
        starterId: string;
    },
    StarterResponseWithRange,
> = ...
updateStudio: MutationObject<
    { studioId: string; updateStudioRequest: UpdateStudioRequest },
    StudioResponse,
> = ...

Updates a studio

updateStudioTabs: MutationObject<
    { body: string[]; studioSlug: string },
    unknown,
> = ...

Updates studio tabs

workflow: QueryObject<
    {
        studioSlug: string;
        version?: string;
        workflowSlug: string;
        xWorkspaceId?: string;
    },
    GetWorkflowResponse,
> = ...

Gets a workflow by slug

workflowDoc: QueryObject<
    {
        documentationId: string;
        language: string;
        status?: string;
        studioSlug: string;
    },
    DocumentationResponse,
> = ...

Gets workflow doc

workflowsFromStackVersion: QueryObject<
    {
        $type?: string;
        displayName?: string;
        pageable: Pageable;
        stackVersionId: string;
        target?: string;
        xWorkspaceId?: string;
    },
    PageListStackWorkflowResponse,
> = ...

Gets workflows of a stack version

workflowsFromStudio: InfiniteQueryObject<
    {
        $type?: | "create"
        | "deploy"
        | "destroy"
        | "reusable"
        | "rollback"
        | "starter";
        description?: string;
        displayName?: string;
        pageable: Pageable;
        slug?: string;
        studioSlug: string;
        xWorkspaceId?: string;
    },
    PageGetWorkflowsByStudioResponse,
    "content",
> = ...

Gets workflows from a given studio

workflowVersions: QueryObject<
    {
        pageable: Pageable;
        status?: "PUBLISHED"
        | "DEPRECATED";
        studioSlug: string;
        workflowSlug: string;
        xWorkspaceId?: string;
    },
    PageListWorkflowVersionsResponse,
> = ...

Gets all the versions of a workflow

workspacesAssociatedToStudio: QueryObject<
    { studioSlug: string },
    StudioWorkspaceResponse[],
> = ...

Gets all workspaces associated with a given studio

workspacesUsingStack: QueryObject<
    {
        filter?: string;
        pageable: Pageable;
        stackSlug: string;
        studioSlug: string;
    },
    PageStackWorkspaceViewResponse,
> = ...

Gets list of Workspaces using the Stack

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