Skip to content

Commit 3d25d85

Browse files
committed
fix: add back and deprecate removed types
1 parent 9f950e1 commit 3d25d85

File tree

5 files changed

+23
-2
lines changed

5 files changed

+23
-2
lines changed

lib/common-types.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,11 @@ export interface MetaSysProps extends BasicMetaSysProps {
256256
}
257257

258258
export interface EntityMetaSysProps extends MetaSysProps {
259+
/**
260+
* @deprecated `contentType` only exists on entries. Please refactor to use a
261+
* type guard to get the correct `EntryMetaSysProps` type with this property.
262+
*/
263+
contentType: SysLink
259264
space: SysLink
260265
status?: SysLink
261266
environment: SysLink

lib/entities/access-token.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ export type AccessTokenProps = {
2525
token?: string
2626
}
2727

28+
/**
29+
* @deprecated Use `AccessTokenProps` instead.
30+
*/
31+
export type AccessTokenProp = AccessTokenProps
32+
2833
export type CreatePersonalAccessTokenProps = Pick<AccessToken, 'name' | 'scopes'> & {
2934
expiresIn: number
3035
}

lib/entities/organization.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ export type OrganizationProps = {
2121
name: string
2222
}
2323

24+
/**
25+
* @deprecated Use `OrganizationProps` instead.
26+
*/
27+
export type OrganizationProp = OrganizationProps
28+
2429
/**
2530
* This method creates the API for the given organization with all the methods for
2631
* reading and creating other entities. It also passes down a clone of the

lib/entities/personal-access-token.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ export type PersonalAccessTokenProps = {
1212
token?: string
1313
}
1414

15+
/**
16+
* @deprecated Use `PersonalAccessTokenProps` instead.
17+
*/
18+
export type PersonalAccessTokenProp = PersonalAccessTokenProps
19+
1520
export type CreatePersonalAccessTokenProps = Pick<PersonalAccessToken, 'name' | 'scopes'> & {
1621
expiresIn?: number
1722
}

lib/export-types.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export type {
144144
} from './entities/extension'
145145
export type { FieldType } from './entities/field-type'
146146
export type { CreateLocaleProps, Locale, LocaleProps } from './entities/locale'
147-
export type { Organization, OrganizationProps } from './entities/organization'
147+
export type { Organization, OrganizationProp, OrganizationProps } from './entities/organization'
148148
export type {
149149
CreateOrganizationInvitationProps,
150150
OrganizationInvitation,
@@ -157,7 +157,8 @@ export type {
157157
export type {
158158
CreatePersonalAccessTokenProps,
159159
PersonalAccessToken,
160-
PersonalAccessTokenProps as PersonalAccessTokenProp,
160+
PersonalAccessTokenProp,
161+
PersonalAccessTokenProps,
161162
} from './entities/personal-access-token'
162163
export type {
163164
CreatePersonalAccessTokenProps as CreatePATProps,

0 commit comments

Comments
 (0)