Skip to content

Commit

Permalink
fix: add back and deprecate removed types (#2460)
Browse files Browse the repository at this point in the history
  • Loading branch information
denkristoffer authored Nov 6, 2024
1 parent 9f950e1 commit e27e01a
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 2 deletions.
5 changes: 5 additions & 0 deletions lib/common-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,11 @@ export interface MetaSysProps extends BasicMetaSysProps {
}

export interface EntityMetaSysProps extends MetaSysProps {
/**
* @deprecated `contentType` only exists on entries. Please refactor to use a
* type guard to get the correct `EntryMetaSysProps` type with this property.
*/
contentType: SysLink
space: SysLink
status?: SysLink
environment: SysLink
Expand Down
5 changes: 5 additions & 0 deletions lib/entities/access-token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ export type AccessTokenProps = {
token?: string
}

/**
* @deprecated Use `AccessTokenProps` instead.
*/
export type AccessTokenProp = AccessTokenProps

export type CreatePersonalAccessTokenProps = Pick<AccessToken, 'name' | 'scopes'> & {
expiresIn: number
}
Expand Down
5 changes: 5 additions & 0 deletions lib/entities/organization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ export type OrganizationProps = {
name: string
}

/**
* @deprecated Use `OrganizationProps` instead.
*/
export type OrganizationProp = OrganizationProps

/**
* This method creates the API for the given organization with all the methods for
* reading and creating other entities. It also passes down a clone of the
Expand Down
5 changes: 5 additions & 0 deletions lib/entities/personal-access-token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ export type PersonalAccessTokenProps = {
token?: string
}

/**
* @deprecated Use `PersonalAccessTokenProps` instead.
*/
export type PersonalAccessTokenProp = PersonalAccessTokenProps

export type CreatePersonalAccessTokenProps = Pick<PersonalAccessToken, 'name' | 'scopes'> & {
expiresIn?: number
}
Expand Down
5 changes: 3 additions & 2 deletions lib/export-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export type {
} from './entities/extension'
export type { FieldType } from './entities/field-type'
export type { CreateLocaleProps, Locale, LocaleProps } from './entities/locale'
export type { Organization, OrganizationProps } from './entities/organization'
export type { Organization, OrganizationProp, OrganizationProps } from './entities/organization'
export type {
CreateOrganizationInvitationProps,
OrganizationInvitation,
Expand All @@ -157,7 +157,8 @@ export type {
export type {
CreatePersonalAccessTokenProps,
PersonalAccessToken,
PersonalAccessTokenProps as PersonalAccessTokenProp,
PersonalAccessTokenProp,
PersonalAccessTokenProps,
} from './entities/personal-access-token'
export type {
CreatePersonalAccessTokenProps as CreatePATProps,
Expand Down

0 comments on commit e27e01a

Please sign in to comment.