Class: ContentService
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:75
Content Service Manages content operations with full type safety
Extends
BaseService
Constructors
Constructor
new ContentService(
client):ContentService
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:12
Parameters
client
Returns
ContentService
Inherited from
BaseService.constructor
Properties
client
protectedclient:TanqoryClient
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:10
Inherited from
BaseService.client
Methods
buildQuery()
protectedbuildQuery(options?):Record<string,any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:26
Build query parameters
Parameters
options?
Returns
Record<string, any>
Inherited from
BaseService.buildQuery
createBlog()
createBlog(
storeId,data):Promise<{articlesCount?:number;commentPolicy:"NONE"|"MODERATED"|"AUTO_PUBLISH";createdAt:Date;description?:string;handle:string;id:string;seo?: {description?:string;keywords?:string[];title?:string; };storeId:string;templateSuffix?:string;title:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:317
Create a new blog
Parameters
storeId
string
Store identifier
data
Blog data
commentPolicy
"NONE" | "MODERATED" | "AUTO_PUBLISH"
description?
string
handle?
string
metafields?
object[]
seo?
{ description?: string; keywords?: string[]; title?: string; }
seo.description?
string
seo.keywords?
string[]
seo.title?
string
templateSuffix?
string
title
string
Returns
Promise<{ articlesCount?: number; commentPolicy: "NONE" | "MODERATED" | "AUTO_PUBLISH"; createdAt: Date; description?: string; handle: string; id: string; seo?: { description?: string; keywords?: string[]; title?: string; }; storeId: string; templateSuffix?: string; title: string; updatedAt: Date; }>
Created blog
createBlogPost()
createBlogPost(
storeId,data):Promise<{author?:string;authorId?:string;blog?: {handle:string;id:string;title:string; };blogId:string;content?:string;createdAt:Date;excerpt?:string;featuredImage?: {alt?:string;height?:number;url:string;width?:number; };handle:string;id:string;isPublished:boolean;publishedAt?:Date;seo?: {description?:string;keywords?:string[];title?:string; };storeId:string;tags?:string[];templateSuffix?:string;title:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:383
Create a new blog post
Parameters
storeId
string
Store identifier
data
Blog post data
author?
string
blogId
string
content?
string
excerpt?
string
featuredImage?
{ alt?: string; height?: number; url: string; width?: number; }
featuredImage.alt?
string
featuredImage.height?
number
featuredImage.url
string
featuredImage.width?
number
handle?
string
isPublished
boolean
metafields?
object[]
seo?
{ description?: string; keywords?: string[]; title?: string; }
seo.description?
string
seo.keywords?
string[]
seo.title?
string
tags?
string[]
templateSuffix?
string
title
string
Returns
Promise<{ author?: string; authorId?: string; blog?: { handle: string; id: string; title: string; }; blogId: string; content?: string; createdAt: Date; excerpt?: string; featuredImage?: { alt?: string; height?: number; url: string; width?: number; }; handle: string; id: string; isPublished: boolean; publishedAt?: Date; seo?: { description?: string; keywords?: string[]; title?: string; }; storeId: string; tags?: string[]; templateSuffix?: string; title: string; updatedAt: Date; }>
Created blog post
createMenu()
createMenu(
storeId,data):Promise<{createdAt:Date;handle:string;id:string;items:object[];name:string;storeId:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:237
Create a new menu
Parameters
storeId
string
Store identifier
data
Menu data
handle?
string
items?
object[]
name
string
Returns
Promise<{ createdAt: Date; handle: string; id: string; items: object[]; name: string; storeId: string; updatedAt: Date; }>
Created menu
createMetaobjectDefinition()
createMetaobjectDefinition(
storeId,data):Promise<{addedBy?:string;createdAt:Date;description?:string;entriesCount:number;fields:object[];id:string;name:string;options?: {activeDraftStatus:boolean;customerAccountApiAccess:boolean;publishAsWebPages:boolean;storefrontApiAccess:boolean;translations:boolean;webPagesConfig?: {enableOnlineStore:boolean;metaDescriptionField?:string;pageTitleField?:string;themeTemplate?:string;urlHandle?:string; }; };storeId:string;type:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:133
Create a new metaobject definition
Parameters
storeId
string
Store identifier
data
Metaobject definition data
description?
string
fields
object[]
name
string
options?
{ activeDraftStatus: boolean; customerAccountApiAccess: boolean; publishAsWebPages: boolean; storefrontApiAccess: boolean; translations: boolean; webPagesConfig?: { enableOnlineStore: boolean; metaDescriptionField?: string; pageTitleField?: string; themeTemplate?: string; urlHandle?: string; }; }
options.activeDraftStatus
boolean
options.customerAccountApiAccess
boolean
options.publishAsWebPages
boolean
options.storefrontApiAccess
boolean
options.translations
boolean
options.webPagesConfig?
{ enableOnlineStore: boolean; metaDescriptionField?: string; pageTitleField?: string; themeTemplate?: string; urlHandle?: string; }
options.webPagesConfig.enableOnlineStore
boolean
options.webPagesConfig.metaDescriptionField?
string
options.webPagesConfig.pageTitleField?
string
options.webPagesConfig.themeTemplate?
string
options.webPagesConfig.urlHandle?
string
type
string
Returns
Promise<{ addedBy?: string; createdAt: Date; description?: string; entriesCount: number; fields: object[]; id: string; name: string; options?: { activeDraftStatus: boolean; customerAccountApiAccess: boolean; publishAsWebPages: boolean; storefrontApiAccess: boolean; translations: boolean; webPagesConfig?: { enableOnlineStore: boolean; metaDescriptionField?: string; pageTitleField?: string; themeTemplate?: string; urlHandle?: string; }; }; storeId: string; type: string; updatedAt: Date; }>
Created metaobject definition
createPage()
createPage(
storeId,data):Promise<{authorId?:string;content?:string;createdAt:Date;handle:string;id:string;isPublished:boolean;publishedAt?:Date;seo?: {description?:string;keywords?:string[];title?:string; };storeId:string;templateSuffix?:string;title:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:471
Create a new page
Parameters
storeId
string
Store identifier
data
Page data
content?
string
handle?
string
isPublished
boolean
seo?
{ description?: string; keywords?: string[]; title?: string; }
seo.description?
string
seo.keywords?
string[]
seo.title?
string
templateSuffix?
string
title
string
Returns
Promise<{ authorId?: string; content?: string; createdAt: Date; handle: string; id: string; isPublished: boolean; publishedAt?: Date; seo?: { description?: string; keywords?: string[]; title?: string; }; storeId: string; templateSuffix?: string; title: string; updatedAt: Date; }>
Created page
deleteBlog()
deleteBlog(
storeId,blogId):Promise<DeletedResponse>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:344
Delete a blog
Parameters
storeId
string
Store identifier
blogId
string
Blog ID
Returns
Promise<DeletedResponse>
Deletion confirmation
deleteBlogPost()
deleteBlogPost(
storeId,postId):Promise<DeletedResponse>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:414
Delete a blog post
Parameters
storeId
string
Store identifier
postId
string
Blog post ID
Returns
Promise<DeletedResponse>
Deletion confirmation
deleteMenu()
deleteMenu(
storeId,menuId):Promise<DeletedResponse>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:278
Delete a menu
Parameters
storeId
string
Store identifier
menuId
string
Menu ID
Returns
Promise<DeletedResponse>
Deletion confirmation
deleteMetaobjectDefinition()
deleteMetaobjectDefinition(
storeId,definitionId):Promise<DeletedResponse>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:169
Delete a metaobject definition
Parameters
storeId
string
Store identifier
definitionId
string
Metaobject definition ID
Returns
Promise<DeletedResponse>
Deletion confirmation
deletePage()
deletePage(
storeId,pageId):Promise<DeletedResponse>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:498
Delete a page
Parameters
storeId
string
Store identifier
pageId
string
Page ID
Returns
Promise<DeletedResponse>
Deletion confirmation
duplicateBlogPost()
duplicateBlogPost(
storeId,postId,data):Promise<{author?:string;authorId?:string;blog?: {handle:string;id:string;title:string; };blogId:string;content?:string;createdAt:Date;excerpt?:string;featuredImage?: {alt?:string;height?:number;url:string;width?:number; };handle:string;id:string;isPublished:boolean;publishedAt?:Date;seo?: {description?:string;keywords?:string[];title?:string; };storeId:string;tags?:string[];templateSuffix?:string;title:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:426
Duplicate an existing blog post
Parameters
storeId
string
Store identifier
postId
string
Blog post ID to duplicate
data
Duplication parameters
title?
string
Returns
Promise<{ author?: string; authorId?: string; blog?: { handle: string; id: string; title: string; }; blogId: string; content?: string; createdAt: Date; excerpt?: string; featuredImage?: { alt?: string; height?: number; url: string; width?: number; }; handle: string; id: string; isPublished: boolean; publishedAt?: Date; seo?: { description?: string; keywords?: string[]; title?: string; }; storeId: string; tags?: string[]; templateSuffix?: string; title: string; updatedAt: Date; }>
Duplicated blog post
duplicateMenu()
duplicateMenu(
storeId,menuId,data):Promise<{createdAt:Date;handle:string;id:string;items:object[];name:string;storeId:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:265
Duplicate an existing menu
Parameters
storeId
string
Store identifier
menuId
string
Menu ID to duplicate
data
Duplication parameters
handle?
string
name
string
Returns
Promise<{ createdAt: Date; handle: string; id: string; items: object[]; name: string; storeId: string; updatedAt: Date; }>
Duplicated menu
generateIdempotencyKey()
protectedgenerateIdempotencyKey(prefix):string
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:19
Generate idempotency key
Parameters
prefix
string
Returns
string
Inherited from
BaseService.generateIdempotencyKey
getBlog()
getBlog(
storeId,blogId):Promise<{articlesCount?:number;commentPolicy:"NONE"|"MODERATED"|"AUTO_PUBLISH";createdAt:Date;description?:string;handle:string;id:string;seo?: {description?:string;keywords?:string[];title?:string; };storeId:string;templateSuffix?:string;title:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:306
Get a single blog by ID
Parameters
storeId
string
Store identifier
blogId
string
Blog ID
Returns
Promise<{ articlesCount?: number; commentPolicy: "NONE" | "MODERATED" | "AUTO_PUBLISH"; createdAt: Date; description?: string; handle: string; id: string; seo?: { description?: string; keywords?: string[]; title?: string; }; storeId: string; templateSuffix?: string; title: string; updatedAt: Date; }>
Blog details
getBlogPost()
getBlogPost(
storeId,postId):Promise<{author?:string;authorId?:string;blog?: {handle:string;id:string;title:string; };blogId:string;content?:string;createdAt:Date;excerpt?:string;featuredImage?: {alt?:string;height?:number;url:string;width?:number; };handle:string;id:string;isPublished:boolean;publishedAt?:Date;seo?: {description?:string;keywords?:string[];title?:string; };storeId:string;tags?:string[];templateSuffix?:string;title:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:372
Get a single blog post by ID
Parameters
storeId
string
Store identifier
postId
string
Blog post ID
Returns
Promise<{ author?: string; authorId?: string; blog?: { handle: string; id: string; title: string; }; blogId: string; content?: string; createdAt: Date; excerpt?: string; featuredImage?: { alt?: string; height?: number; url: string; width?: number; }; handle: string; id: string; isPublished: boolean; publishedAt?: Date; seo?: { description?: string; keywords?: string[]; title?: string; }; storeId: string; tags?: string[]; templateSuffix?: string; title: string; updatedAt: Date; }>
Blog post details
getBlogPosts()
getBlogPosts(
storeId,params?):Promise<ListResponse<{author?:string;authorId?:string;blog?: {handle:string;id:string;title:string; };blogId:string;content?:string;createdAt:Date;excerpt?:string;featuredImage?: {alt?:string;height?:number;url:string;width?:number; };handle:string;id:string;isPublished:boolean;publishedAt?:Date;seo?: {description?:string;keywords?:string[];title?:string; };storeId:string;tags?:string[];templateSuffix?:string;title:string;updatedAt:Date; }>>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:359
List all blog posts with advanced filtering
Parameters
storeId
string
Store identifier
params?
Query parameters
author?
string
blogId?
string
isPublished?
unknown
limit?
number
page?
number
search?
string
sortBy?
"createdAt" | "updatedAt" | "title" | "handle" | "author" | "publishedAt"
sortOrder?
"asc" | "desc"
tag?
string
Returns
Promise<ListResponse<{ author?: string; authorId?: string; blog?: { handle: string; id: string; title: string; }; blogId: string; content?: string; createdAt: Date; excerpt?: string; featuredImage?: { alt?: string; height?: number; url: string; width?: number; }; handle: string; id: string; isPublished: boolean; publishedAt?: Date; seo?: { description?: string; keywords?: string[]; title?: string; }; storeId: string; tags?: string[]; templateSuffix?: string; title: string; updatedAt: Date; }>>
Paginated list of blog posts
getBlogs()
getBlogs(
storeId,params?):Promise<ListResponse<{articlesCount?:number;commentPolicy:"NONE"|"MODERATED"|"AUTO_PUBLISH";createdAt:Date;description?:string;handle:string;id:string;seo?: {description?:string;keywords?:string[];title?:string; };storeId:string;templateSuffix?:string;title:string;updatedAt:Date; }>>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:293
List all blogs
Parameters
storeId
string
Store identifier
params?
Query parameters
limit?
number
page?
number
search?
string
sortBy?
"createdAt" | "updatedAt" | "title" | "handle"
sortOrder?
"asc" | "desc"
Returns
Promise<ListResponse<{ articlesCount?: number; commentPolicy: "NONE" | "MODERATED" | "AUTO_PUBLISH"; createdAt: Date; description?: string; handle: string; id: string; seo?: { description?: string; keywords?: string[]; title?: string; }; storeId: string; templateSuffix?: string; title: string; updatedAt: Date; }>>
Paginated list of blogs
getExportMimeType()
protectedgetExportMimeType(format):string
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:45
Get MIME type for export format
Parameters
format
string
Returns
string
Inherited from
BaseService.getExportMimeType
getMenu()
getMenu(
storeId,menuId):Promise<{createdAt:Date;handle:string;id:string;items:object[];name:string;storeId:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:226
Get a single menu by ID
Parameters
storeId
string
Store identifier
menuId
string
Menu ID
Returns
Promise<{ createdAt: Date; handle: string; id: string; items: object[]; name: string; storeId: string; updatedAt: Date; }>
Menu details
getMenus()
getMenus(
storeId,params?):Promise<ListResponse<{createdAt:Date;handle:string;id:string;items:object[];name:string;storeId:string;updatedAt:Date; }>>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:213
List all menus
Parameters
storeId
string
Store identifier
params?
Query parameters
limit?
number
page?
number
search?
string
sortBy?
"name" | "createdAt" | "updatedAt" | "handle"
sortOrder?
"asc" | "desc"
Returns
Promise<ListResponse<{ createdAt: Date; handle: string; id: string; items: object[]; name: string; storeId: string; updatedAt: Date; }>>
Paginated list of menus
getMetaobjectDefinition()
getMetaobjectDefinition(
storeId,definitionId):Promise<{addedBy?:string;createdAt:Date;description?:string;entriesCount:number;fields:object[];id:string;name:string;options?: {activeDraftStatus:boolean;customerAccountApiAccess:boolean;publishAsWebPages:boolean;storefrontApiAccess:boolean;translations:boolean;webPagesConfig?: {enableOnlineStore:boolean;metaDescriptionField?:string;pageTitleField?:string;themeTemplate?:string;urlHandle?:string; }; };storeId:string;type:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:116
Get a single metaobject definition by ID
Parameters
storeId
string
Store identifier
definitionId
string
Metaobject definition ID
Returns
Promise<{ addedBy?: string; createdAt: Date; description?: string; entriesCount: number; fields: object[]; id: string; name: string; options?: { activeDraftStatus: boolean; customerAccountApiAccess: boolean; publishAsWebPages: boolean; storefrontApiAccess: boolean; translations: boolean; webPagesConfig?: { enableOnlineStore: boolean; metaDescriptionField?: string; pageTitleField?: string; themeTemplate?: string; urlHandle?: string; }; }; storeId: string; type: string; updatedAt: Date; }>
Metaobject definition details
getMetaobjectDefinitions()
getMetaobjectDefinitions(
storeId,params?):Promise<ListResponse<{addedBy?:string;createdAt:Date;description?:string;entriesCount:number;fields:object[];id:string;name:string;options?: {activeDraftStatus:boolean;customerAccountApiAccess:boolean;publishAsWebPages:boolean;storefrontApiAccess:boolean;translations:boolean;webPagesConfig?: {enableOnlineStore:boolean;metaDescriptionField?:string;pageTitleField?:string;themeTemplate?:string;urlHandle?:string; }; };storeId:string;type:string;updatedAt:Date; }>>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:98
List all metaobject definitions
Parameters
storeId
string
Store identifier
params?
Query parameters for filtering and pagination
includeTaxonomy?
unknown
limit?
number
page?
number
search?
string
sortBy?
"name" | "createdAt" | "updatedAt" | "type" | "entriesCount"
sortOrder?
"asc" | "desc"
Returns
Promise<ListResponse<{ addedBy?: string; createdAt: Date; description?: string; entriesCount: number; fields: object[]; id: string; name: string; options?: { activeDraftStatus: boolean; customerAccountApiAccess: boolean; publishAsWebPages: boolean; storefrontApiAccess: boolean; translations: boolean; webPagesConfig?: { enableOnlineStore: boolean; metaDescriptionField?: string; pageTitleField?: string; themeTemplate?: string; urlHandle?: string; }; }; storeId: string; type: string; updatedAt: Date; }>>
Paginated list of metaobject definitions
Example
const definitions = await client.content.getMetaobjectDefinitions('store-123', {
page: 1,
limit: 20,
search: 'product',
sortBy: 'name',
sortOrder: 'asc'
})
getPage()
getPage(
storeId,pageId):Promise<{authorId?:string;content?:string;createdAt:Date;handle:string;id:string;isPublished:boolean;publishedAt?:Date;seo?: {description?:string;keywords?:string[];title?:string; };storeId:string;templateSuffix?:string;title:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:460
Get a single page by ID
Parameters
storeId
string
Store identifier
pageId
string
Page ID
Returns
Promise<{ authorId?: string; content?: string; createdAt: Date; handle: string; id: string; isPublished: boolean; publishedAt?: Date; seo?: { description?: string; keywords?: string[]; title?: string; }; storeId: string; templateSuffix?: string; title: string; updatedAt: Date; }>
Page details
getPages()
getPages(
storeId,params?):Promise<ListResponse<{authorId?:string;content?:string;createdAt:Date;handle:string;id:string;isPublished:boolean;publishedAt?:Date;seo?: {description?:string;keywords?:string[];title?:string; };storeId:string;templateSuffix?:string;title:string;updatedAt:Date; }>>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:447
List all pages
Parameters
storeId
string
Store identifier
params?
Query parameters
isPublished?
unknown
limit?
number
page?
number
search?
string
sortBy?
"createdAt" | "updatedAt" | "title" | "handle" | "publishedAt"
sortOrder?
"asc" | "desc"
Returns
Promise<ListResponse<{ authorId?: string; content?: string; createdAt: Date; handle: string; id: string; isPublished: boolean; publishedAt?: Date; seo?: { description?: string; keywords?: string[]; title?: string; }; storeId: string; templateSuffix?: string; title: string; updatedAt: Date; }>>
Paginated list of pages
updateBlog()
updateBlog(
storeId,blogId,data):Promise<{articlesCount?:number;commentPolicy:"NONE"|"MODERATED"|"AUTO_PUBLISH";createdAt:Date;description?:string;handle:string;id:string;seo?: {description?:string;keywords?:string[];title?:string; };storeId:string;templateSuffix?:string;title:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:331
Update an existing blog
Parameters
storeId
string
Store identifier
blogId
string
Blog ID
data
Updated blog data
commentPolicy?
"NONE" | "MODERATED" | "AUTO_PUBLISH"
description?
string
handle?
string
metafields?
object[]
seo?
{ description?: string; keywords?: string[]; title?: string; }
seo.description?
string
seo.keywords?
string[]
seo.title?
string
templateSuffix?
string
title?
string
Returns
Promise<{ articlesCount?: number; commentPolicy: "NONE" | "MODERATED" | "AUTO_PUBLISH"; createdAt: Date; description?: string; handle: string; id: string; seo?: { description?: string; keywords?: string[]; title?: string; }; storeId: string; templateSuffix?: string; title: string; updatedAt: Date; }>
Updated blog
updateBlogPost()
updateBlogPost(
storeId,postId,data):Promise<{author?:string;authorId?:string;blog?: {handle:string;id:string;title:string; };blogId:string;content?:string;createdAt:Date;excerpt?:string;featuredImage?: {alt?:string;height?:number;url:string;width?:number; };handle:string;id:string;isPublished:boolean;publishedAt?:Date;seo?: {description?:string;keywords?:string[];title?:string; };storeId:string;tags?:string[];templateSuffix?:string;title:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:397
Update an existing blog post
Parameters
storeId
string
Store identifier
postId
string
Blog post ID
data
Updated blog post data
author?
string
content?
string
excerpt?
string
featuredImage?
{ alt?: string; height?: number; url: string; width?: number; }
featuredImage.alt?
string
featuredImage.height?
number
featuredImage.url
string
featuredImage.width?
number
handle?
string
isPublished?
boolean
metafields?
object[]
seo?
{ description?: string; keywords?: string[]; title?: string; }
seo.description?
string
seo.keywords?
string[]
seo.title?
string
tags?
string[]
templateSuffix?
string
title?
string
Returns
Promise<{ author?: string; authorId?: string; blog?: { handle: string; id: string; title: string; }; blogId: string; content?: string; createdAt: Date; excerpt?: string; featuredImage?: { alt?: string; height?: number; url: string; width?: number; }; handle: string; id: string; isPublished: boolean; publishedAt?: Date; seo?: { description?: string; keywords?: string[]; title?: string; }; storeId: string; tags?: string[]; templateSuffix?: string; title: string; updatedAt: Date; }>
Updated blog post
updateMenu()
updateMenu(
storeId,menuId,data):Promise<{createdAt:Date;handle:string;id:string;items:object[];name:string;storeId:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:251
Update an existing menu
Parameters
storeId
string
Store identifier
menuId
string
Menu ID
data
Updated menu data
items?
object[]
name?
string
Returns
Promise<{ createdAt: Date; handle: string; id: string; items: object[]; name: string; storeId: string; updatedAt: Date; }>
Updated menu
updateMetaobjectDefinition()
updateMetaobjectDefinition(
storeId,definitionId,data):Promise<{addedBy?:string;createdAt:Date;description?:string;entriesCount:number;fields:object[];id:string;name:string;options?: {activeDraftStatus:boolean;customerAccountApiAccess:boolean;publishAsWebPages:boolean;storefrontApiAccess:boolean;translations:boolean;webPagesConfig?: {enableOnlineStore:boolean;metaDescriptionField?:string;pageTitleField?:string;themeTemplate?:string;urlHandle?:string; }; };storeId:string;type:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:150
Update an existing metaobject definition
Parameters
storeId
string
Store identifier
definitionId
string
Metaobject definition ID
data
Updated metaobject definition data
description?
string
expected_updated_at?
string
name?
string
options?
{ activeDraftStatus: boolean; customerAccountApiAccess: boolean; publishAsWebPages: boolean; storefrontApiAccess: boolean; translations: boolean; webPagesConfig?: { enableOnlineStore: boolean; metaDescriptionField?: string; pageTitleField?: string; themeTemplate?: string; urlHandle?: string; }; }
options.activeDraftStatus
boolean
options.customerAccountApiAccess
boolean
options.publishAsWebPages
boolean
options.storefrontApiAccess
boolean
options.translations
boolean
options.webPagesConfig?
{ enableOnlineStore: boolean; metaDescriptionField?: string; pageTitleField?: string; themeTemplate?: string; urlHandle?: string; }
options.webPagesConfig.enableOnlineStore
boolean
options.webPagesConfig.metaDescriptionField?
string
options.webPagesConfig.pageTitleField?
string
options.webPagesConfig.themeTemplate?
string
options.webPagesConfig.urlHandle?
string
Returns
Promise<{ addedBy?: string; createdAt: Date; description?: string; entriesCount: number; fields: object[]; id: string; name: string; options?: { activeDraftStatus: boolean; customerAccountApiAccess: boolean; publishAsWebPages: boolean; storefrontApiAccess: boolean; translations: boolean; webPagesConfig?: { enableOnlineStore: boolean; metaDescriptionField?: string; pageTitleField?: string; themeTemplate?: string; urlHandle?: string; }; }; storeId: string; type: string; updatedAt: Date; }>
Updated metaobject definition
updatePage()
updatePage(
storeId,pageId,data):Promise<{authorId?:string;content?:string;createdAt:Date;handle:string;id:string;isPublished:boolean;publishedAt?:Date;seo?: {description?:string;keywords?:string[];title?:string; };storeId:string;templateSuffix?:string;title:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/content.ts:485
Update an existing page
Parameters
storeId
string
Store identifier
pageId
string
Page ID
data
Updated page data
content?
string
handle?
string
isPublished?
boolean
seo?
{ description?: string; keywords?: string[]; title?: string; }
seo.description?
string
seo.keywords?
string[]
seo.title?
string
templateSuffix?
string
title?
string
Returns
Promise<{ authorId?: string; content?: string; createdAt: Date; handle: string; id: string; isPublished: boolean; publishedAt?: Date; seo?: { description?: string; keywords?: string[]; title?: string; }; storeId: string; templateSuffix?: string; title: string; updatedAt: Date; }>
Updated page