Class AppsResource

Hierarchy

  • Resource
    • AppsResource

Constructors

Methods

  • Crea la app del cliente. Exige token de usuario (512) y sólo puede haber una (536).

    keycloak_client_idenfifier —con la errata, que es el nombre del campo— es el client_id con el que luego se pide el token, y tiene que ser único en todo PlanVortex (534). Los dominios y las urls de redirección tienen que ser URLs válidas (531 y 532), y webhook_url también (535).

    Parameters

    • idClient: string
    • body: {
          allowed_domains?: string[];
          keycloak_client_idenfifier: string;
          name: string;
          redirect_urls?: string[];
          webhook_url?: string;
      }
      • Optionalallowed_domains?: string[]

        Origins allowed to call the API with this app's identity. Every entry has to be a valid URL (error 531).

      • keycloak_client_idenfifier: string

        The app's client_id, which is what you send to POST /oauth/token. It has to be unique across PlanVortex (error 534). The spelling of the field is historical and kept for compatibility.

      • name: string

        A name for the app. Cannot be blank (error 525).

      • Optionalredirect_urls?: string[]

        URLs the connect flow is allowed to come back to. A redirect_uri that is not in this list is refused when issuing a temporal connect token (error 532).

      • Optionalwebhook_url?: string

        Where PlanVortex posts events. Has to be a valid URL (error 535). See ClientApp.webhook_url for what arrives and how it is signed.

    • options: RequestOptions = {}

    Returns Promise<
        {
            _id: string;
            allowed_domains: string[];
            creation_date: string;
            deleted: boolean;
            deleted_date?: string;
            id_client: string;
            id_user?: string;
            keycloak_client_idenfifier: string;
            name: string;
            redirect_urls: string[];
            webhook_url?: string;
        },
    >

  • Una app. Es de lo poco de esta sección que admite un token de app: una app puede leer su propio registro.

    Parameters

    Returns Promise<
        {
            _id: string;
            allowed_domains: string[];
            creation_date: string;
            deleted: boolean;
            deleted_date?: string;
            id_client: string;
            id_user?: string;
            keycloak_client_idenfifier: string;
            name: string;
            redirect_urls: string[];
            webhook_url?: string;
        },
    >

  • Las apps del cliente. Exige token de usuario (512) y devuelve como mucho una.

    Parameters

    Returns Promise<
        Paginated<
            {
                _id: string;
                allowed_domains: string[];
                creation_date: string;
                deleted: boolean;
                deleted_date?: string;
                id_client: string;
                id_user?: string;
                keycloak_client_idenfifier: string;
                name: string;
                redirect_urls: string[];
                webhook_url?: string;
            },
        >,
    >

  • Borra la app. Exige token de usuario (512).

    El cliente de Keycloak se borra de verdad —así que las credenciales dejan de servir en el acto— y el documento se marca como borrado en vez de desaparecer.

    Parameters

    Returns Promise<void>

  • El client_secret de la app. Exige token de usuario (512).

    Viene de Keycloak, así que es el secreto vivo y no una copia: trátalo como una credencial, no lo escribas en un log y no lo guardes donde no guardarías una contraseña.

    Parameters

    Returns Promise<string>

  • Cambia la app. Admite token de app: una app puede actualizar su propio registro.

    REEMPLAZA los cinco campos con lo que traiga el cuerpo. No es un PATCH: mandar una actualización sin webhook_url apaga el webhook, y sin redirect_urls deja la lista vacía — con lo que el flujo de conexión de cuentas deja de admitir ninguna redirección. Lee la app primero y devuélvela entera.

    Parameters

    • idClient: string
    • idApp: string
    • body: {
          allowed_domains?: string[];
          keycloak_client_idenfifier: string;
          name: string;
          redirect_urls?: string[];
          webhook_url?: string;
      }
      • Optionalallowed_domains?: string[]

        Origins allowed to call the API with this app's identity. Every entry has to be a valid URL (error 531).

      • keycloak_client_idenfifier: string

        The app's client_id, which is what you send to POST /oauth/token. It has to be unique across PlanVortex (error 534). The spelling of the field is historical and kept for compatibility.

      • name: string

        A name for the app. Cannot be blank (error 525).

      • Optionalredirect_urls?: string[]

        URLs the connect flow is allowed to come back to. A redirect_uri that is not in this list is refused when issuing a temporal connect token (error 532).

      • Optionalwebhook_url?: string

        Where PlanVortex posts events. Has to be a valid URL (error 535). See ClientApp.webhook_url for what arrives and how it is signed.

    • options: RequestOptions = {}

    Returns Promise<
        {
            _id: string;
            allowed_domains: string[];
            creation_date: string;
            deleted: boolean;
            deleted_date?: string;
            id_client: string;
            id_user?: string;
            keycloak_client_idenfifier: string;
            name: string;
            redirect_urls: string[];
            webhook_url?: string;
        },
    >