Frodo Library - v4.5.0
    Preparing search index...

    Type Alias ManagedObjectSchemaOps

    A managed-object type's schema is its resolved property/relationship definitions, readable in full via readManagedObjectSchema below — a read-only projection of the same underlying configuration IdmConfigOps.ts's readSubConfigEntity('managed', type) / importSubConfigEntity('managed', ...) read and write as a whole document. See ManagedObjectOps.ts's own header comment for how schema relates to managed-object records and configuration, the other two things this domain covers.

    There are two ways to mutate a type's schema, and they are not interchangeable:

    1. readManagedObjectSchemaProperty / updateManagedObjectSchemaProperty / removeManagedObjectSchemaProperty below use IDM's dedicated v2 schema API, which is specifically for relationship-property definitions, one at a time, in place, with no whole-blob read-modify-write. This is Cloud (PingOne Advanced Identity Cloud) only — see rockcarver/frodo-lib#388 for the design discussion this followed.
    2. For every other case — any non-relationship property on any deployment, relationship properties on ForgeOps/classic (managed the regular way, like any other property type), and whole-type schema changes on any deployment — use IdmConfigOps.ts's readSubConfigEntity('managed', type) / importSubConfigEntity('managed', ...) to read-modify-write the entire type definition (edit .schema.properties on the object you read before writing it back). This is the general-purpose path; #1 above is a narrow, Cloud-specific optimization for one particular case, not the default.

    Neither path touches the underlying repository's index/persistence-layer definitions (e.g. DS's repo.ds on ForgeOps/classic) — Frodo has no support for reading or writing repo.ds today, so adding a genuinely new custom relationship property on ForgeOps/classic still requires a manual, Frodo-unassisted edit to that file outside either API above.

    type ManagedObjectSchemaOps = {
        readManagedObjectSchema(
            type: string,
            refreshCache?: boolean,
            options?: ManagedObjectSchemaOptions,
        ): Promise<ManagedObjectSchema>;
        readManagedObjectSchemaProperty(
            type: string,
            propertyName: string,
        ): Promise<ManagedObjectSchemaProperty>;
        removeManagedObjectSchemaProperty(
            type: string,
            propertyName: string,
        ): Promise<ManagedObjectSchemaProperty>;
        updateManagedObjectSchemaProperty(
            type: string,
            propertyName: string,
            propertyData: ManagedObjectSchemaProperty,
        ): Promise<ManagedObjectSchemaProperty>;
    }
    Index

    Methods

    • Read a single managed object relationship-property definition. Cloud (PingOne Advanced Identity Cloud) only — uses IDM's dedicated v2 relationship-schema API to read one relationship-property definition without fetching the type's entire schema. For any non-relationship property, or for any property (including relationships) on ForgeOps/classic, use readSubConfigEntity('managed', type) and read the property off the returned schema.properties instead.

      Parameters

      • type: string

        managed object type, e.g. alpha_user

      • propertyName: string

        schema property name, e.g. custom_merchantId

      Returns Promise<ManagedObjectSchemaProperty>

      a promise that resolves to the property definition

    • Create or update a single managed object relationship-property definition, leaving the rest of the type's schema untouched. Cloud only — see readManagedObjectSchemaProperty. For any non-relationship property, or for any property on ForgeOps/classic, use importSubConfigEntity('managed', ...) with the full updated type definition instead.

      Parameters

      • type: string

        managed object type, e.g. alpha_user

      • propertyName: string

        schema property name, e.g. custom_merchantId

      • propertyData: ManagedObjectSchemaProperty

        the property definition to write

      Returns Promise<ManagedObjectSchemaProperty>

      a promise that resolves to the written property definition