Skip to content

Commit

Permalink
interface changed from User to TeamUser in types
Browse files Browse the repository at this point in the history
  • Loading branch information
harshithad0703 committed Nov 9, 2023
1 parent e5b0807 commit e85be9f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions types/teams/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { AnyProperty, SystemFields } from "../utility/fields";
import { AnyProperty } from "../utility/fields";
import { ContentstackCollection } from '../contentstackCollection'
import { Creatable, SystemFunction } from "../utility/operations";
import { User, Users } from "./teamUsers";
import { StackRoleMapping, StackRoleMappings, StackRoleMappingData } from "./stackRoleMapping";
import { Creatable } from "../utility/operations";
import { TeamUser, TeamUsers, TeamUserData } from "./teamUsers";
import { StackRoleMapping, StackRoleMappings, StackRoleMappingData } from "./stackRoleMappings";

export interface Team extends TeamData {
update(data: TeamData, param?: { includeUserDetails?: boolean}): Promise<AnyProperty>
users(): Users
users(uid: string): User
users(): TeamUsers
users(uid: string): TeamUser
stackRoleMappings(): StackRoleMappings
stackRoleMappings(uid: string): StackRoleMapping
fetch(): Promise<Team>
Expand All @@ -21,7 +21,7 @@ export interface Teams extends Creatable<Team, TeamData> {
export interface TeamData extends AnyProperty {
uid?: string,
name?: string,
users?: any,
users?: TeamUserData | string[] | [],
stackRoleMapping?: StackRoleMappingData[] | [],
organizationRole?: string
}
Expand Down
8 changes: 4 additions & 4 deletions types/teams/teamUsers/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { AnyProperty } from "../../utility/fields";

export interface Users extends UserData {
add(data:UserData): Promise<UserData>
export interface TeamUsers extends TeamUserData {
add(data:TeamUserData): Promise<TeamUserData>
fetchAll(params?: { includeUserDetails: boolean, include_count: boolean}): Promise<AnyProperty>
}

export interface User {
export interface TeamUser {
remove(): Promise<AnyProperty>
}

export interface UserData extends AnyProperty {
export interface TeamUserData extends AnyProperty {
emails?: string[]
users?: string[]
}

0 comments on commit e85be9f

Please sign in to comment.