chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import * as sdk from '@botpress/sdk'
|
||||
|
||||
const { z } = sdk
|
||||
|
||||
export namespace Comment {
|
||||
const _fields = {
|
||||
id: z.string().title('ID').describe('The ID of the page.'),
|
||||
title: z.string().title('Title').describe('The title of the page.'),
|
||||
status: z
|
||||
.enum(['current', 'draft', 'archived', 'historical', 'trashed', 'any', 'deleted'])
|
||||
.title('Status')
|
||||
.describe('The status of the page.'),
|
||||
pageId: z.string().title('Page ID').describe('The ID of the page.'),
|
||||
body: z.object({
|
||||
atlas_doc_format: z.object({
|
||||
value: z.string().title('Value').describe('The content of the page.'),
|
||||
representation: z.string().title('Representation').describe('The representation of the content.'),
|
||||
}),
|
||||
}),
|
||||
version: z.object({
|
||||
createdAt: z.string().title('Created At').describe('The creation date of the version.'),
|
||||
number: z.number().title('number').describe('Represents the version number.'),
|
||||
authorId: z.string().title('Author ID').describe('The account ID of the user who created this version.'),
|
||||
minorEdit: z.boolean().title('Minor Edit').describe('Indicates whether this version is a minor edit or not.'),
|
||||
message: z.string().title('Message').describe('The message associated with the current version.'),
|
||||
}),
|
||||
_links: z.object({
|
||||
webui: z.string().title('Web UI').describe('Web UI link of the content.'),
|
||||
editui: z.string().title('Edit UI').describe('Edit UI link of the content.'),
|
||||
tinyui: z.string().title('Web UI').describe('Web UI link of the content.'),
|
||||
}),
|
||||
} as const
|
||||
|
||||
export const schema = z.object(_fields)
|
||||
export type InferredType = sdk.z.infer<typeof schema>
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { Comment } from './comment'
|
||||
import { Page } from './page'
|
||||
import { PageToCreate } from './pageToCreate'
|
||||
|
||||
export const entities = {
|
||||
page: {
|
||||
title: 'Page',
|
||||
description: 'A page in confluence',
|
||||
schema: Page.schema,
|
||||
},
|
||||
pageToCreate: {
|
||||
title: 'Page To Create',
|
||||
description: 'A page in confluence',
|
||||
schema: PageToCreate.schema,
|
||||
},
|
||||
comment: {
|
||||
title: 'Comment',
|
||||
description: 'A comment on a page in confluence',
|
||||
schema: Comment.schema,
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
import * as sdk from '@botpress/sdk'
|
||||
|
||||
const { z } = sdk
|
||||
|
||||
export namespace Page {
|
||||
const _fields = {
|
||||
id: z.string().title('ID').describe('The ID of the page.'),
|
||||
title: z.string().title('Title').describe('The title of the page.').optional(),
|
||||
status: z
|
||||
.enum(['current', 'draft', 'archived', 'historical', 'trashed', 'any', 'deleted'])
|
||||
.title('Status')
|
||||
.describe('The status of the page.')
|
||||
.optional(),
|
||||
spaceId: z.string().title('Space ID').describe('The ID of the space the page is in.'),
|
||||
parentId: z
|
||||
.string()
|
||||
.title('Parent ID')
|
||||
.describe('ID of the parent page, or null if there is no parent page.')
|
||||
.nullable(),
|
||||
parentType: z
|
||||
.enum(['page', 'whiteboard', 'database', 'embed', 'folder'])
|
||||
.title('Parent Type')
|
||||
.describe('Content type of the parent, or null if there is no parent.')
|
||||
.nullable(),
|
||||
position: z
|
||||
.number()
|
||||
.title('Position')
|
||||
.describe('Position of child page within the given parent page tree.')
|
||||
.nullable(),
|
||||
authorId: z
|
||||
.string()
|
||||
.title('Author ID')
|
||||
.describe('The account ID of the user who created this page originally.')
|
||||
.optional(),
|
||||
ownerId: z
|
||||
.string()
|
||||
.title('Owner ID')
|
||||
.describe('The account ID of the user who owns this page.')
|
||||
.nullable()
|
||||
.optional(),
|
||||
lastOwnerId: z
|
||||
.string()
|
||||
.title('Last Owner ID')
|
||||
.describe('The account ID of the user who last edited this page.')
|
||||
.nullable()
|
||||
.optional(),
|
||||
createdAt: z
|
||||
.string()
|
||||
.title('Created At')
|
||||
.describe("Date and time when the page was created. In format 'YYYY-MM-DDTHH:mm:ss.sssZ'.")
|
||||
.optional(),
|
||||
body: z
|
||||
.object({
|
||||
atlas_doc_format: z.object({
|
||||
value: z.string().title('Value').describe('The content of the page.'),
|
||||
representation: z.string().title('Representation').describe('The representation of the content.'),
|
||||
}),
|
||||
})
|
||||
.optional(),
|
||||
version: z
|
||||
.object({
|
||||
createdAt: z.string().title('Created At').describe('The creation date of the version.'),
|
||||
number: z.number().title('number').describe('Represents the version number.'),
|
||||
authorId: z.string().title('Author ID').describe('The account ID of the user who created this version.'),
|
||||
minorEdit: z.boolean().title('Minor Edit').describe('Indicates whether this version is a minor edit or not.'),
|
||||
})
|
||||
.optional(),
|
||||
_links: z.object({
|
||||
webui: z.string().title('Web UI').describe('Web UI link of the content.').optional(),
|
||||
editui: z.string().title('Edit UI').describe('Edit UI link of the content.').optional(),
|
||||
tinyui: z.string().title('Web UI').describe('Web UI link of the content.').optional(),
|
||||
}),
|
||||
} as const
|
||||
|
||||
export const schema = z.object(_fields)
|
||||
export type InferredType = sdk.z.infer<typeof schema>
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
import * as sdk from '@botpress/sdk'
|
||||
|
||||
const { z } = sdk
|
||||
|
||||
export namespace PageToCreate {
|
||||
const _fields = {
|
||||
id: z.string().title('ID').describe('The ID of the page.').nullable(),
|
||||
title: z.string().title('Title').describe('The title of the page.').nullable(),
|
||||
status: z
|
||||
.enum(['current', 'draft', 'archived', 'historical', 'trashed', 'any', 'deleted'])
|
||||
.title('Status')
|
||||
.describe('The status of the page.'),
|
||||
spaceId: z.string().title('Space ID').describe('The ID of the space the page is in.'),
|
||||
parentId: z
|
||||
.string()
|
||||
.title('Parent ID')
|
||||
.describe('ID of the parent page, or null if there is no parent page.')
|
||||
.nullable(),
|
||||
parentType: z
|
||||
.enum(['page', 'whiteboard', 'database', 'embed', 'folder'])
|
||||
.title('Parent Type')
|
||||
.describe('Content type of the parent, or null if there is no parent.')
|
||||
.nullable(),
|
||||
position: z
|
||||
.number()
|
||||
.title('Position')
|
||||
.describe('Position of child page within the given parent page tree.')
|
||||
.nullable(),
|
||||
authorId: z.string().title('Author ID').describe('The account ID of the user who created this page originally.'),
|
||||
ownerId: z.string().title('Owner ID').describe('The account ID of the user who owns this page.').nullable(),
|
||||
lastOwnerId: z
|
||||
.string()
|
||||
.title('Last Owner ID')
|
||||
.describe('The account ID of the user who last edited this page.')
|
||||
.nullable(),
|
||||
createdAt: z
|
||||
.string()
|
||||
.title('Created At')
|
||||
.describe("Date and time when the page was created. In format 'YYYY-MM-DDTHH:mm:ss.sssZ'."),
|
||||
body: z.object({
|
||||
atlas_doc_format: z.object({
|
||||
value: z.string().title('Value').describe('The content of the page.'),
|
||||
representation: z.string().title('Representation').describe('The representation of the content.'),
|
||||
}),
|
||||
}),
|
||||
version: z.object({
|
||||
createdAt: z.string().title('Created At').describe('The creation date of the version.'),
|
||||
number: z.number().title('number').describe('Represents the version number.'),
|
||||
authorId: z.string().title('Author ID').describe('The account ID of the user who created this version.'),
|
||||
minorEdit: z.boolean().title('Minor Edit').describe('Indicates whether this version is a minor edit or not.'),
|
||||
}),
|
||||
_links: z.object({
|
||||
webui: z.string().title('Web UI').describe('Web UI link of the content.'),
|
||||
editui: z.string().title('Self').describe('Edit UI link of the content.'),
|
||||
tinyui: z.string().title('Self').describe('Web UI link of the content.'),
|
||||
}),
|
||||
} as const
|
||||
|
||||
export const schema = z.object(_fields)
|
||||
export type InferredType = sdk.z.infer<typeof schema>
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export * from './entities'
|
||||
Reference in New Issue
Block a user