Skip to content
Docs
Reference

BackstageClient.integrations

BackstageClient.integrations in @ticketlayer/backstage.

@ticketlayer/backstage


@ticketlayer/backstage / BackstageClient / integrations

integrations: {
  get: (id: string, requestOptions?: RequestOptions) => Promise<{
     available: boolean;
     capability?: string;
     category: string;
     configResource?: string;
     connection:   | {
        clientId: string;
        firstSeenAt: string;
        integrationId: string | null;
        lastSeenAt: string;
        revokedAt: string | null;
        scopes: string[];
        status: "revoked" | "connected";
      }
        | null;
     definition: {
        available: boolean;
        capability?: "payments" | "marketing" | "analytics" | "fulfilment";
        category: string;
        configResource?: string;
        connectHint?: string;
        description: string;
        docsUrl?: string;
        id: string;
        kind: "provider" | "connected_app";
        logoUri: string | null;
        name: string;
        oauthClientId?: string;
        providerType?: string;
        scopes?: string[];
     };
     description: string;
     id: string;
     kind: "provider" | "connected_app";
     lastUsedAt?: string | null;
     logoUri: string | null;
     name: string;
     scopes?: string[];
     status: "connected" | "configured" | "not_connected" | "coming_soon";
  }>;
  list: (requestOptions?: RequestOptions) => Promise<{
     categories: {
        blurb: string;
        id: string;
        label: string;
        order: number;
     }[];
     integrations: {
        available: boolean;
        capability?: string;
        category: string;
        configResource?: string;
        description: string;
        id: string;
        kind: "provider" | "connected_app";
        lastUsedAt?: string | null;
        logoUri: string | null;
        name: string;
        scopes?: string[];
        status: "connected" | "configured" | "not_connected" | "coming_soon";
     }[];
  }>;
  listConnectedApps: (requestOptions?: RequestOptions) => Promise<{
     clientId: string;
     firstSeenAt: string;
     integrationId: string | null;
     lastSeenAt: string;
     revokedAt: string | null;
     scopes: string[];
     status: "revoked" | "connected";
  }[]>;
  listGrants: (requestOptions?: RequestOptions) => Promise<{
     client: {
        clientUri: string | null;
        id: string;
        logoUri: string | null;
        name: string;
     };
     expiresAt: string;
     grantedAt: string;
     id: string;
     integrationId: string | null;
     lastUsedAt: string;
     organisation:   | {
        id: string;
        name: string | null;
        slug: string | null;
      }
        | null;
     resources: string[];
     scopes: string[];
   } & {
     person: {
        email: string | null;
        id: string;
        name: string | null;
     };
  }[]>;
  listScopes: (requestOptions?: RequestOptions) => Promise<{
     description: string;
     kind: "identity" | "platform" | "resource";
     label: string;
     scope: string;
  }[]>;
  revokeConnection: (id: string, requestOptions?: RequestOptions) => Promise<boolean>;
  revokeGrant: (grantId: string, requestOptions?: RequestOptions) => Promise<boolean>;
};

Defined in: client.ts:10607

Integrations methods

get()#

get: (id: string, requestOptions?: RequestOptions) => Promise<{
  available: boolean;
  capability?: string;
  category: string;
  configResource?: string;
  connection:   | {
     clientId: string;
     firstSeenAt: string;
     integrationId: string | null;
     lastSeenAt: string;
     revokedAt: string | null;
     scopes: string[];
     status: "revoked" | "connected";
   }
     | null;
  definition: {
     available: boolean;
     capability?: "payments" | "marketing" | "analytics" | "fulfilment";
     category: string;
     configResource?: string;
     connectHint?: string;
     description: string;
     docsUrl?: string;
     id: string;
     kind: "provider" | "connected_app";
     logoUri: string | null;
     name: string;
     oauthClientId?: string;
     providerType?: string;
     scopes?: string[];
  };
  description: string;
  id: string;
  kind: "provider" | "connected_app";
  lastUsedAt?: string | null;
  logoUri: string | null;
  name: string;
  scopes?: string[];
  status: "connected" | "configured" | "not_connected" | "coming_soon";
}>;

Get an integration

Parameters#

ParameterType
idstring
requestOptions?RequestOptions

Returns#

Promise<{ available: boolean; capability?: string; category: string; configResource?: string; connection: | { clientId: string; firstSeenAt: string; integrationId: string | null; lastSeenAt: string; revokedAt: string | null; scopes: string[]; status: "revoked" | "connected"; } | null; definition: { available: boolean; capability?: "payments" | "marketing" | "analytics" | "fulfilment"; category: string; configResource?: string; connectHint?: string; description: string; docsUrl?: string; id: string; kind: "provider" | "connected_app"; logoUri: string | null; name: string; oauthClientId?: string; providerType?: string; scopes?: string[]; }; description: string; id: string; kind: "provider" | "connected_app"; lastUsedAt?: string | null; logoUri: string | null; name: string; scopes?: string[]; status: "connected" | "configured" | "not_connected" | "coming_soon"; }>

Operation Id#

getIntegration

list()#

list: (requestOptions?: RequestOptions) => Promise<{
  categories: {
     blurb: string;
     id: string;
     label: string;
     order: number;
  }[];
  integrations: {
     available: boolean;
     capability?: string;
     category: string;
     configResource?: string;
     description: string;
     id: string;
     kind: "provider" | "connected_app";
     lastUsedAt?: string | null;
     logoUri: string | null;
     name: string;
     scopes?: string[];
     status: "connected" | "configured" | "not_connected" | "coming_soon";
  }[];
}>;

List the integration marketplace The marketplace catalogue (connected apps + provider integrations) with this org’s status for each.

Parameters#

ParameterType
requestOptions?RequestOptions

Returns#

Promise<{ categories: { blurb: string; id: string; label: string; order: number; }[]; integrations: { available: boolean; capability?: string; category: string; configResource?: string; description: string; id: string; kind: "provider" | "connected_app"; lastUsedAt?: string | null; logoUri: string | null; name: string; scopes?: string[]; status: "connected" | "configured" | "not_connected" | "coming_soon"; }[]; }>

Operation Id#

listIntegrations

listConnectedApps()#

listConnectedApps: (requestOptions?: RequestOptions) => Promise<{
  clientId: string;
  firstSeenAt: string;
  integrationId: string | null;
  lastSeenAt: string;
  revokedAt: string | null;
  scopes: string[];
  status: "revoked" | "connected";
}[]>;

List connected OAuth apps for the org

Parameters#

ParameterType
requestOptions?RequestOptions

Returns#

Promise<{ clientId: string; firstSeenAt: string; integrationId: string | null; lastSeenAt: string; revokedAt: string | null; scopes: string[]; status: "revoked" | "connected"; }[]>

Operation Id#

listConnectedApps

listGrants()#

listGrants: (requestOptions?: RequestOptions) => Promise<{
  client: {
     clientUri: string | null;
     id: string;
     logoUri: string | null;
     name: string;
  };
  expiresAt: string;
  grantedAt: string;
  id: string;
  integrationId: string | null;
  lastUsedAt: string;
  organisation:   | {
     id: string;
     name: string | null;
     slug: string | null;
   }
     | null;
  resources: string[];
  scopes: string[];
} & {
  person: {
     email: string | null;
     id: string;
     name: string | null;
  };
}[]>;

List members' grants to connected apps Every grant a member of this organisation has given a third-party app to act in it, with who gave it, its scopes and when it was last used: the administrator's view of Connected apps. A grant acts as the person who gave it, capped by its scopes, so it stops working when they leave the organisation. Needs integrations.read.

Parameters#

ParameterType
requestOptions?RequestOptions

Returns#

Promise<{ client: { clientUri: string | null; id: string; logoUri: string | null; name: string; }; expiresAt: string; grantedAt: string; id: string; integrationId: string | null; lastUsedAt: string; organisation: | { id: string; name: string | null; slug: string | null; } | null; resources: string[]; scopes: string[]; } & { person: { email: string | null; id: string; name: string | null; }; }[]>

Operation Id#

listOrganisationGrants

listScopes()#

listScopes: (requestOptions?: RequestOptions) => Promise<{
  description: string;
  kind: "identity" | "platform" | "resource";
  label: string;
  scope: string;
}[]>;

What each OAuth scope means Every scope a connected app can be granted, with a label and a description in words: the catalogue the consent page shows a person before they approve an app, so a list of grants can say the same. Needs only a credential for the organisation, since the words are the same for everyone.

Parameters#

ParameterType
requestOptions?RequestOptions

Returns#

Promise<{ description: string; kind: "identity" | "platform" | "resource"; label: string; scope: string; }[]>

Operation Id#

listIntegrationScopes

revokeConnection()#

revokeConnection: (id: string, requestOptions?: RequestOptions) => Promise<boolean>;

Revoke a connected app

Parameters#

ParameterType
idstring
requestOptions?RequestOptions

Returns#

Promise<boolean>

Operation Id#

revokeIntegrationConnection

revokeGrant()#

revokeGrant: (grantId: string, requestOptions?: RequestOptions) => Promise<boolean>;

Revoke a member's grant to a connected app Revoke one member's grant in this organisation at the identity issuer, with RFC 7009 semantics: its refresh tokens end with it, and an access token already issued lapses within 15 minutes. When it was the app's last grant in the organisation, the app shows as revoked. 404 CONNECTED_APP_GRANT_NOT_FOUND for a grant that is not a live one in this organisation. Needs integrations.manage.

Parameters#

ParameterType
grantIdstring
requestOptions?RequestOptions

Returns#

Promise<boolean>

Operation Id#

revokeOrganisationGrant