vmware / build-tools-for-vmware-aria

Build Tools for VMware Aria provides development and release management tools for implementing automation solutions based on the VMware Aria Suite and VMware Cloud Director. The solution enables Virtual Infrastructure Administrators and Automation Developers to use standard DevOps practices for managing and deploying content.
Other
47 stars 22 forks source link

ActiveDirectory plugin types are incomplete #251

Closed pe1pip closed 5 months ago

pe1pip commented 5 months ago

The type definitions for the AD types are incomplete/incorrect

[Description of the issue. Affected functionality / feature.]

Steps to Reproduce

n/a

Preconditions:

n/a

Expected behavior:

export declare class AD_Unknown {
  public readonly id: string
  public readonly distinguishedName: string
  public readonly allAttributes: any[]
  public readonly gUID: string
  public getArrayAttribute (attribName: string): string[]
  public getAttributeValueBytes (attribName: string): any[]
  public removeAttribute (attibName: string): void
  public destroy (param0: boolean): void
  public rename (name: string): void
  public setAttribute (attribName: string, newValue: any): void
  public getAttribute (attribName: string): string
  public addAttribute (attribName: string, newValue: any): void
}

export declare class AD_User extends AD_Unknown {
  public readonly sID: string
  public readonly memberof: AD_Group[]
  public readonly userPrincipalName: string
  public readonly accountName: string
  public readonly enabled: boolean
  public setPassword (password: string): void
  public setChangePasswordAtNextLogon (value: string): boolean
}

export declare class AD_Group extends AD_Unknown {
  public readonly userGroups: any[]
  public readonly computers: any[]
  public readonly containers: any[]
  public readonly organizationalUnits: any[]
  public readonly users: any[]
  public createUser (accountName: string, domainName: string, displayName: string)
}

export declare class AD_UserGroup extends AD_Unknown {
  public readonly sID: string
  public readonly computerMembers: any[]
  public readonly groupMembers: AD_UserGroup[]
  public readonly userMembers: AD_User[]
  public readonly memberOf: AD_UserGroup[]
}

Actual behavior:

declare interface AD_Group {
    id: string;
}

/**
 * Unknown type of object
 */
declare interface AD_Unknown {
    id: string;
}

/**
 * User
 */
declare interface AD_User {
    id: string;
}

/**
 * UserGroup
 */
declare interface AD_UserGroup {
    id: string;
}

Reproduces how often:

100%

Component/s:

node_modules/@types/o11n-plugin-activedirectory/index.d.ts

Affects Build/s:

all <2.37.0

Environment

Client

Server

Failure Logs

n/a

Related issues and PRs

Additional Context

unbreakabl3 commented 5 months ago

I think I can try to work on it

SimonSparksUK commented 5 months ago

Also these are NOT classes they are ENUMS!

/**

/**

unbreakabl3 commented 5 months ago

Also these are NOT classes they are ENUMS!

/**

  • Ldap search scope */ declare class LdapSearchScope { static readonly BASE: LdapSearchScope; static readonly ONE: LdapSearchScope; static readonly SUB: LdapSearchScope; static readonly SUBORDINATE_SUBTREE: LdapSearchScope; }

/**

  • This class defines a data type for dereference policy values. Clients should
  • generally use one of the {@code NEVER}, {@code SEARCHING}, {@code FINDING},
  • {@code ALWAYS} values.

*/ declare class LdapDereferencePolicy { static readonly NEVER: LdapDereferencePolicy; static readonly SEARCHING: LdapDereferencePolicy; static readonly FINDING: LdapDereferencePolicy; static readonly ALWAYS: LdapDereferencePolicy; }

Is it worth to mix this in that commit? Not so related I think.

SimonSparksUK commented 5 months ago

Did my comments about the CLASSES vs ENUMS get included ?

SimonSparksUK commented 5 months ago

I see that this is now closed and no body answered my question.

VenelinBakalov commented 5 months ago

Hi @SimonSparksUK , I think the issue get's automatically closed when the related PR is merged. Would you mind opening a new issue for this one