@cfxlabsinc/b2b-services
    Preparing search index...

    Roles within a bank dashboard role set, for CFX operators. A set's one internal role (CFX Admin) is seeded: it is neither created nor deleted here, and its rank stays above every other role's. Records no activity: the admin dashboard records it from what each write returns. Each write publishes with publish, as config; with a caller's tx nothing is published.

    Index
    instance: (...args: []) => BankDashboardRoleAdminService = ...

    The process service: the shared database and the internal event bus.

    • permissionKeys is the full set; an unknown key fails the whole create.

      Parameters

      • __namedParameters: {
            data: {
                description?: string;
                name: string;
                permissionKeys: string[];
                rank: number;
                roleSetId: string;
            };
            tx?: PgAsyncTransaction<NodePgQueryResultHKT, EmptyRelations>;
        }

      Returns Promise<
          | { error: ServiceError; ok: false }
          | { ok: true; value: BankDashboardRole },
      >

    • Hard-deletes a custom role and its grants: the catalog has no deleted_at. Refused for a system or internal role, the set's default, and while any membership or invite, live or past, references it.

      Parameters

      • __namedParameters: { id: string; tx?: PgAsyncTransaction<NodePgQueryResultHKT, EmptyRelations> }

      Returns Promise<
          | { error: ServiceError; ok: false }
          | { ok: true; value: BankDashboardRole },
      >

    • A field left out is left alone. permissionKeys replaces the grant set. A system role keeps its name; the internal role keeps its rank.

      Parameters

      • __namedParameters: {
            data: {
                description?: string;
                name?: string;
                permissionKeys?: string[];
                rank?: number;
            };
            id: string;
            tx?: PgAsyncTransaction<NodePgQueryResultHKT, EmptyRelations>;
        }

      Returns Promise<
          { ok: true; value: BankDashboardRole }
          | { error: RoleError; ok: false },
      >