Skip to content

sdk/types

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:128

Represents a base cache object with a timestamp of the last cache update.

lastCacheUpdate: Date;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:129


Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:243

Represents the combined data for a page, extending the stripped page data.

CombinedPageData

authorId: null | string;
PageDataStripped.authorId

categories: {
description: string;
id: number;
meta: unknown;
name: string;
parent: null | number;
slug: string;
}[];

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:245

An array of categories selected for the page.

description: string;
id: number;
meta: unknown;
name: string;
parent: null | number;
slug: string;

contentLang: string;
PageDataStripped.contentLang

contributorIds: string[];

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:244

An array of contributor IDs associated with the page.

defaultContent:
| undefined
| {
content: null | string;
contentId: string;
contentLang: string;
id: string;
};

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:248

description: string;
PageDataStripped.description

draft: null | boolean;
PageDataStripped.draft

heroImage: string;
PageDataStripped.heroImage

id: string;
PageDataStripped.id

multiLangContent: {
content: null | string;
contentId: string;
contentLang: string;
id: string;
}[];

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:247

content: null | string;
contentId: string;
contentLang: string;
id: string;

package: string;
PageDataStripped.package

parentFolder: null | string;
PageDataStripped.parentFolder

publishedAt: Date;
PageDataStripped.publishedAt

showAuthor: null | boolean;
PageDataStripped.showAuthor

showContributors: null | boolean;
PageDataStripped.showContributors

showOnNav: boolean;
PageDataStripped.showOnNav

slug: string;
PageDataStripped.slug

tags: {
description: string;
id: number;
meta: unknown;
name: string;
slug: string;
}[];

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:246

An array of tags selected for the page.

description: string;
id: number;
meta: unknown;
name: string;
slug: string;

title: string;
PageDataStripped.title

updatedAt: null | Date;
PageDataStripped.updatedAt

urlRoute: string;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:249


Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:227

Interface representing combined user data.

This interface extends tsUsersSelect and includes additional properties for OAuth data and permissions data.

CombinedUserData

avatar: null | string;
tsUsersSelect.avatar

createdAt: null | Date;
tsUsersSelect.createdAt

email: null | string;
tsUsersSelect.email

id: string;
tsUsersSelect.id

name: string;
tsUsersSelect.name

oAuthData:
| undefined
| {
provider: string;
providerUserId: string;
userId: string;
}[];

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:228

An array of OAuth account data or undefined.

password: null | string;
tsUsersSelect.password

permissionsData:
| undefined
| {
rank: string;
user: string;
};

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:229

Permissions data or undefined.

updatedAt: null | Date;
tsUsersSelect.updatedAt

url: null | string;
tsUsersSelect.url

username: string;
tsUsersSelect.username

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:258

Interface representing the response received after a deletion operation.

message: string;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:260

A message providing additional information about the deletion operation.

status: "error" | "success";

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:259

The status of the deletion operation.


Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:191

Represents a cache object for folder list data. Extends the BaseCacheObject interface.

FolderListCacheObject

data: FolderListItem[];

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:192

The folder list data to be cached.

lastCacheUpdate: Date;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:129

BaseCacheObject.lastCacheUpdate


Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:94

id: string;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:95

name: string;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:96

optional parent: null | string;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:97


Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:86

children: FolderNode[];

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:91

id: string;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:87

name: string;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:88

page: boolean;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:89

pageData:
| null
| CombinedPageData;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:90


Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:178

Represents a cache object for folder tree data. Extends the BaseCacheObject interface.

FolderTreeCacheObject

data: FolderNode[];

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:179

The folder tree data to be cached.

lastCacheUpdate: Date;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:129

BaseCacheObject.lastCacheUpdate


Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:141

Represents a cache object for page data. Extends the BaseCacheObject interface.

PageDataCacheObject

data: CombinedPageData;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:142

The combined page data to be cached.

lastCacheUpdate: Date;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:129

BaseCacheObject.lastCacheUpdate


Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:266

Represents the data required to insert a new page.

pageContent: CombinedInsertContent;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:268

pageData: {
authorId: null | string;
categories: unknown;
contentLang: string;
contributorIds: unknown;
description: string;
draft: null | boolean;
heroImage: string;
id: string;
package: string;
parentFolder: null | string;
publishedAt: Date;
showAuthor: null | boolean;
showContributors: null | boolean;
showOnNav: boolean;
slug: string;
tags: unknown;
title: string;
updatedAt: null | Date;
};

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:267

optional authorId: null | string;

optional categories: unknown;

optional contentLang: string;

optional contributorIds: unknown;

description: string;

optional draft: null | boolean;

optional heroImage: string;

optional id: string;

optional package: string;

optional parentFolder: null | string;

optional publishedAt: Date;

optional showAuthor: null | boolean;

optional showContributors: null | boolean;

optional showOnNav: boolean;

slug: string;

optional tags: unknown;

title: string;

optional updatedAt: null | Date;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:154

Represents a cache object for site configuration. Extends the BaseCacheObject interface.

SiteConfigCacheObject

data: SiteConfig;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:155

The site configuration data.

lastCacheUpdate: Date;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:129

BaseCacheObject.lastCacheUpdate


Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:198

Represents a cache object that stores pages and site configuration data.

pages: Map<string, PageDataCacheObject>;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:199

siteConfig:
| undefined
| SiteConfigCacheObject;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:200

version:
| undefined
| VersionCacheObject;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:201


Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:165

Represents a cache object that includes version information.

lastCacheUpdate: Date;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:129

BaseCacheObject.lastCacheUpdate

version: string;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:166

The version of the cache object.

type addDatabaseEntryInsertPage = {
pageContent: PageContentReturnId[];
pageData: PageDataReturnId[];
};

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:210

Represents the structure for adding a database entry for a page.

pageContent: PageContentReturnId[];

pageData: PageDataReturnId[];

type AstroDBVirtualModule = __module;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:100


type MultiPageInsert = PageInsert[];

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:274

Represents an array of PageInsert objects.


type STUDIOCMS_SDK_CACHE = STUDIOCMS_SDK_CACHEInstance["cacheModule"];

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:123

Type representing the return type of the STUDIOCMS_SDK_CACHEModule function.


type STUDIOCMS_SDK_CACHEConstructor = typeof StudioCMSVirtualCache;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:110

Type definition for the constructor of the StudioCMS SDK Cache.

This type represents the constructor function of the StudioCMSVirtualCache class.


type STUDIOCMS_SDK_CACHEInstance = InstanceType<STUDIOCMS_SDK_CACHEConstructor>;

Defined in: studiocms/packages/studiocms/src/sdk/types/index.ts:118

Type representing an instance of the STUDIOCMS SDK cache.

This type is derived from the constructor type STUDIOCMS_SDK_CACHEConstructor. It is used to define the shape of the cache instance within the STUDIOCMS SDK.

Re-exports AvailableLists

Re-exports CacheConfig

Re-exports CombinedInsertContent

Re-exports CombinedRank

Re-exports DatabaseTables

Re-exports PageContentReturnId

Re-exports PageDataCategoriesInsertResponse

Re-exports PageDataReturnId

Re-exports PageDataStripped

Re-exports PageDataTagsInsertResponse

Re-exports ProcessedCacheConfig

Re-exports ProcessedSDKConfig

Re-exports SingleRank

Re-exports SiteConfig

Re-exports tsDiffTrackingInsert

Re-exports tsDiffTrackingSelect

Re-exports tsOAuthAccountsSelect

Re-exports tsPageContentInsert

Re-exports tsPageContentSelect

Re-exports tsPageDataCategoriesInsert

Re-exports tsPageDataCategoriesSelect

Re-exports tsPageDataInsert

Re-exports tsPageDataSelect

Re-exports tsPageDataTagsInsert

Re-exports tsPageDataTagsSelect

Re-exports tsPageFolderInsert

Re-exports tsPageFolderSelect

Re-exports tsPermissionsInsert

Re-exports tsPermissionsSelect

Re-exports tsSessionTableInsert

Re-exports tsSessionTableSelect

Re-exports tsSiteConfigInsert

Re-exports tsSiteConfigSelect

Re-exports tsUsersInsert

Re-exports tsUsersSelect

Re-exports tsUsersUpdate