@giantcontext/sdk-typescript

中文文档
1.240.0发布于 2026/11/13TypeScriptES Module零依赖近 30 天下载 3756

大型文本类型SDK

中文使用文档
文档目录56 节
  1. 安装
  2. 使用量
  3. 认证
  4. 核心概念
  5. 与组织和项目合作
  6. 列出您的组织
  7. 用口水打一个组织
  8. 列出项目
  9. 以弹子取出一个项目
  10. 在项目中发现应用
  11. 处理网站内容
  12. 列表页面
  13. 获得一页
  14. 列表博客文章
  15. 获取单个博客文章
  16. 布局、页眉、页脚、边栏
  17. 对话框(模式/流行)
  18. 标记和 URL
  19. 使用 lite 模式
  20. 与电子邮件合作
  21. 与客户关系管理合作
  22. 使用表格工作
  23. 与知识库合作
  24. 与聊天合作
  25. 处理文件
  26. 列表文件
  27. 获取一个文件
  28. 按内容搜索文件
  29. 从文本内容中保存文件
  30. 文件夹
  31. 查找文件的使用地点
  32. 处理草稿
  33. 清单草稿
  34. 请求编辑草稿
  35. 完成草稿的投票
  36. 与思想合作
  37. 列出想法
  38. 批准一个想法
  39. 放弃一个想法
  40. 与品牌合作
  41. 倾斜
  42. 遍及所有页面
  43. 处理错误
  44. 错误代码
  45. 申请身份证和追查
  46. 配置
  47. API 参考
  48. API 密钥
  49. 分析
  50. App 成员
  51. 错误报告
  52. 构建器
  53. 客户关系管理
  54. 聊天
  55. 内容版本
  56. 开发者

大型文本类型SDK

正式类型SDK 巨型环境 API-自主营销平台.

npm version

资源链接
无npmjs.com/package/@giantcontext/sdk-typescript
GitHub 图像github.com/giantcontext/sdk-typescript
Python SDK 键盘pypi.org/project/giantcontext
Python GitHub 键github.com/giantcontext/sdk-python (英语)
开发者门户giantcontext.com/en/ developers (中文(简体) )
平台giantcontext.com (中文(中国大陆) )

安装

npm install @giantcontext/sdk-typescript
# or
pnpm add @giantcontext/sdk-typescript
# or
yarn add @giantcontext/sdk-typescript

使用量

import { createGiantContext } from "@giantcontext/sdk-typescript";

const gc = createGiantContext({
    apiKey: process.env.GIANTCONTEXT_API_KEY!,
});

// Get your organizations
const orgs = await gc.me.listMyOrganizations();
const org = orgs[0];

// List projects in the organization
const { data: projects } = await gc.projects.listProjects({ id: org.id });

// Find the website app in the first project
const project = projects[0];
const { data: apps } = await gc.projectApps.listProjectApps({
    id: org.id,
    projectId: project.id,
});
const websiteApp = apps.find((app) => app.appType === "website");

// List all website pages
const { data: pages } = await gc.website.listWebsitePages({
    organizationId: org.id,
    projectId: project.id,
    appId: websiteApp.id,
});

console.log(`Found ${pages.length} pages`);
for (const page of pages) {
    console.log(`  ${page.title} - ${page.slug}`);
}

认证

SDK 使用以 API 键开头的 gct_从巨型上下文控制台拿起你的 设置 > API 密钥。 。 。 .

const gc = createGiantContext({
    apiKey: "gct_a1b2c3d4e5f6...",
});

如何运作: SDK在第一次请求时会自动将您的 API 密钥交换为短寿命的 JWT, 然后缓存到到期前60秒. 你用不着自己去管理代币.

环境可变模式:

# .env
GIANTCONTEXT_API_KEY=gct_a1b2c3d4e5f6...
const gc = createGiantContext({
    apiKey: process.env.GIANTCONTEXT_API_KEY!,
});

核心概念

巨型上下文将内容组织在一个等级:

Organization (my-company)
└── Project (marketing-site)
    ├── Website App
    │   ├── Pages
    │   ├── Posts (blog)
    │   ├── Layouts
    │   ├── Headers
    │   ├── Footers
    │   ├── Sidebars
    │   └── Dialogs
    ├── Email App
    │   ├── Emails (each carries a natural-language trigger description)
    │   ├── Sends (the delivery timeline Mind plans per contact)
    │   ├── Headers
    │   └── Footers
    ├── CRM App
    │   ├── Contacts
    │   ├── Companies
    │   └── Activities
    ├── Forms App
    │   ├── Forms
    │   └── Submissions
    ├── Knowledge Base App
    │   ├── Articles
    │   └── Categories
    └── Chat App
        └── Conversations

主要实体:

  • 组织 --上层工作空间. 就像一个GitHub Org, 这是你的团队或公司.
  • 项目 - 在一个北极圈里 包含单一网站或产品的所有内容、应用软件、文件和品牌.
  • 应用程序 - 在一个项目内 每个应用类型(Website, Email, CRM, Formes, Knowledge Base, Chat)是一个单独的应用实例,有自己的内容.
  • 文件 - 媒体库在一个项目中共享所有应用程序。 支持文件夹、搜索和图像变体.
  • 标记 -- 应用到项目内应用的应用软件的设计符(颜色,字体,标志).
  • 想法 - 来自Mind(内置AI)的AI生成内容建议. 复议,批准,或者开除.
  • 草稿 - AI生成的内容,并附有审查工作流程: pending > 翻译: ready > 翻译: accepted编号 :rejected > 翻译: published。 。 。 .

与组织和项目合作

列出您的组织

const orgs = await gc.me.listMyOrganizations();
// [{ id: "d3f1a2b4-...", name: "My Company", slug: "my-company", ... }]

用口水打一个组织

const org = await gc.organizations.getOrganizationBySlug({
    slug: "my-company",
});
// { id: "d3f1a2b4-...", name: "My Company", plan: "pro", ... }

列出项目

const { data: projects, meta } = await gc.projects.listProjects({
    id: org.id,
});
// data: [{ id: "...", name: "Marketing Site", slug: "marketing-site", ... }]
// meta: { total: 3, page: 1, pageSize: 25, pageCount: 1 }

以弹子取出一个项目

const project = await gc.projects.getProjectBySlug({
    id: org.id,
    projectSlug: "marketing-site",
});
// { id: "...", name: "Marketing Site", defaultLocale: "en", apps: [...] }

在项目中发现应用

每个项目都包含一个或多个应用程序. 使用 listProjectApps 然后使用 appType 选项

const { data: apps } = await gc.projectApps.listProjectApps({
    id: org.id,
    projectId: project.id,
});

const websiteApp = apps.find((a) => a.appType === "website");
const emailApp = apps.find((a) => a.appType === "email");
const crmApp = apps.find((a) => a.appType === "crm");
const formsApp = apps.find((a) => a.appType === "forms");
const kbApp = apps.find((a) => a.appType === "knowledgeBase");
const chatApp = apps.find((a) => a.appType === "chat");

或者直接用弹子搜索应用程序:

const app = await gc.projectApps.getProjectAppBySlug({
    id: org.id,
    projectId: project.id,
    appSlug: "main-website",
});

处理网站内容

所有网站方法都需要 organizationId, (中文(简体) ), projectId,以及 appId。从上面的Org/项目/应用发现模式中获取这些.

列表页面

const { data: pages, meta } = await gc.website.listWebsitePages({
    organizationId: org.id,
    projectId: project.id,
    appId: websiteApp.id,
});

for (const page of pages) {
    console.log(`${page.title} (${page.slug})`);
}

获得一页

const page = await gc.website.getWebsitePage({
    organizationId: org.id,
    projectId: project.id,
    appId: websiteApp.id,
    pageId: "a1b2c3d4-5678-9abc-def0-1234567890ab",
});
// { id: "...", title: "About Us", slug: "about-us", content: { sections: [...] }, ... }

列表博客文章

const { data: posts } = await gc.website.listWebsitePosts({
    organizationId: org.id,
    projectId: project.id,
    appId: websiteApp.id,
    search: "product launch", // optional: filter by keyword
});

获取单个博客文章

const post = await gc.website.getWebsitePost({
    organizationId: org.id,
    projectId: project.id,
    appId: websiteApp.id,
    postId: "b2c3d4e5-6789-abcd-ef01-234567890abc",
});

布局、页眉、页脚、边栏

// Layouts
const { data: layouts } = await gc.website.listWebsiteLayouts({
    organizationId: org.id,
    projectId: project.id,
    appId: websiteApp.id,
});

// Headers
const { data: headers } = await gc.website.listWebsiteHeaders({
    organizationId: org.id,
    projectId: project.id,
    appId: websiteApp.id,
});

// Footers
const { data: footers } = await gc.website.listWebsiteFooters({
    organizationId: org.id,
    projectId: project.id,
    appId: websiteApp.id,
});

// Sidebars
const { data: sidebars } = await gc.website.listWebsiteSidebars({
    organizationId: org.id,
    projectId: project.id,
    appId: websiteApp.id,
});

对话框(模式/流行)

const { data: dialogs } = await gc.website.listWebsiteDialogs({
    organizationId: org.id,
    projectId: project.id,
    appId: websiteApp.id,
});

标记和 URL

// Get all tags used in the website
const tags = await gc.website.listWebsiteTags({
    organizationId: org.id,
    projectId: project.id,
    appId: websiteApp.id,
});

// Get all page URLs (useful for sitemaps)
const { urls } = await gc.website.listWebsiteUrls({
    organizationId: org.id,
    projectId: project.id,
    appId: websiteApp.id,
});

使用 lite 模式

许多列表终点接受 a lite 参数。 设定为 "true",回复中省略了重字段,如完整内容正文,只返回元数据。 用于列出/浏览用户界面 :

const { data: pages } = await gc.website.listWebsitePages({
    organizationId: org.id,
    projectId: project.id,
    appId: websiteApp.id,
    lite: "true", // lighter response, no full content bodies
});

与电子邮件合作

没有竞选活动或活动。 每封邮件都带有自然语言的触发描述("如果登机未完成则在注册后发送48h"),而Mind则决定每个联系人发送什么,何时发送. 发送时间表是其计划和交付的记录.

// List emails
const { data: emails } = await gc.email.listEmails({
    organizationId: org.id,
    projectId: project.id,
    appId: emailApp.id,
});

// Get a specific email
const email = await gc.email.getEmail({
    organizationId: org.id,
    projectId: project.id,
    appId: emailApp.id,
    emailId: "c3d4e5f6-7890-abcd-ef01-34567890abcd",
});

// List sends (past + planned deliveries across the app)
const { data: sends } = await gc.email.listEmailSends({
    organizationId: org.id,
    projectId: project.id,
    appId: emailApp.id,
});

// A contact's full email timeline (what Mind sent and has planned)
const timeline = await gc.email.getContactEmailTimeline({
    organizationId: org.id,
    projectId: project.id,
    appId: emailApp.id,
    contactId: "d4e5f6a7-8901-bcde-f012-4567890abcde",
});

// Email headers and footers
const { data: emailHeaders } = await gc.email.listEmailHeaders({
    organizationId: org.id,
    projectId: project.id,
    appId: emailApp.id,
});

const { data: emailFooters } = await gc.email.listEmailFooters({
    organizationId: org.id,
    projectId: project.id,
    appId: emailApp.id,
});

与客户关系管理合作

// List contacts (with pagination and search)
const { data: contacts, meta } = await gc.crm.listCrmContacts({
    organizationId: org.id,
    projectId: project.id,
    appId: crmApp.id,
    page: "1",
    pageSize: "50",
    search: "jane",
});

// Get a single contact
const contact = await gc.crm.getCrmContact({
    organizationId: org.id,
    projectId: project.id,
    appId: crmApp.id,
    contactId: "d4e5f6a7-8901-bcde-f012-4567890abcde",
});

// List companies
const { data: companies } = await gc.crm.listCrmCompanies({
    organizationId: org.id,
    projectId: project.id,
    appId: crmApp.id,
});

// Get contacts for a specific company
const companyContacts = await gc.crm.listCrmCompanyContacts({
    organizationId: org.id,
    projectId: project.id,
    appId: crmApp.id,
    companyId: companies[0].id,
});

// List activities (calls, emails, meetings, tasks, notes)
const { data: activities } = await gc.crm.listCrmActivities({
    organizationId: org.id,
    projectId: project.id,
    appId: crmApp.id,
});

// Get activities for a specific contact
const contactActivities = await gc.crm.listCrmContactActivities({
    organizationId: org.id,
    projectId: project.id,
    appId: crmApp.id,
    contactId: contact.id,
});

使用表格工作

// List forms
const { data: forms } = await gc.forms.listForms({
    organizationId: org.id,
    projectId: project.id,
    appId: formsApp.id,
});

// Get a specific form
const form = await gc.forms.getForm({
    organizationId: org.id,
    projectId: project.id,
    appId: formsApp.id,
    formId: forms[0].id,
});

// List submissions for a form
const { data: submissions } = await gc.forms.listFormSubmissions({
    organizationId: org.id,
    projectId: project.id,
    appId: formsApp.id,
    formId: forms[0].id,
    page: "1",
    pageSize: "25",
});

// Get a single submission
const submission = await gc.forms.getFormSubmission({
    organizationId: org.id,
    projectId: project.id,
    appId: formsApp.id,
    formId: forms[0].id,
    submissionId: submissions[0].id,
});

与知识库合作

// List categories
const categories = await gc.other.listKbCategories({
    organizationId: org.id,
    projectId: project.id,
    appId: kbApp.id,
});

// List articles (optionally filter by category or status)
const { data: articles } = await gc.other.listKbArticles({
    organizationId: org.id,
    projectId: project.id,
    appId: kbApp.id,
    categoryId: categories[0]?.id,
    status: "published",
});

// Get a single article
const article = await gc.other.getKbArticle({
    organizationId: org.id,
    projectId: project.id,
    appId: kbApp.id,
    articleId: articles[0].id,
});

与聊天合作

// List conversations
const { data: conversations } = await gc.chat.listChatConversations({
    organizationId: org.id,
    projectId: project.id,
    appId: chatApp.id,
});

// Get a conversation with paginated messages
const conversation = await gc.chat.getChatConversation({
    organizationId: org.id,
    projectId: project.id,
    appId: chatApp.id,
    conversationId: conversations[0].id,
    limit: "50",
});

处理文件

文件在工程中所有应用程序共享 。 API 所存文件为 gc.projectFiles。 。 。 .

列表文件

const { data: files, meta } = await gc.projectFiles.listFiles({
    id: org.id,
    projectId: project.id,
    page: "1",
    pageSize: "50",
});

for (const file of files) {
    console.log(`${file.filename} (${file.mimeType}, ${file.sizeBytes} bytes)`);
    console.log(`  URL: ${file.url}`);
}

获取一个文件

const file = await gc.projectFiles.getFile({
    id: org.id,
    projectId: project.id,
    fileId: "e5f6a7b8-9012-cdef-0123-567890abcdef",
});
// { id: "...", filename: "hero.jpg", url: "https://...", width: 1920, height: 1080, variants: { thumbnail: {...}, small: {...}, medium: {...}, large: {...} } }

按内容搜索文件

const results = await gc.projectFiles.searchProjectFiles({
    id: org.id,
    projectId: project.id,
    query: "product roadmap",
    limit: "10",
});
// [{ fileId: "...", filename: "roadmap.pdf", similarity: 0.87, matchingContent: "..." }]

从文本内容中保存文件

const file = await gc.projectFiles.saveFile({
    id: org.id,
    projectId: project.id,
    data: {
        content: "# Meeting Notes\n\nDiscussed Q3 goals...",
        filename: "meeting-notes-2025-01.md",
        mimeType: "text/markdown",
        title: "Q3 Planning Meeting Notes",
    },
});

文件夹

// List all folders
const folders = await gc.projectFiles.listFileFolders({
    id: org.id,
    projectId: project.id,
});

// Get files in a specific folder
const { data: folderFiles } = await gc.projectFiles.listFiles({
    id: org.id,
    projectId: project.id,
    folderId: folders[0].id,
});

// Get a folder by ID
const folder = await gc.projectFiles.getFileFolder({
    id: org.id,
    projectId: project.id,
    folderId: folders[0].id,
});

查找文件的使用地点

const references = await gc.projectFiles.listFileReferences({
    id: org.id,
    projectId: project.id,
    fileId: file.id,
});
// [{ type: "page", id: "...", name: "About Us", projectId: "..." }]

处理草稿

草稿是AI生成的内容,经过审查工作流程. 当你请求内容生成时,它会同步运行. 把草稿公布到完成为止.

清单草稿

const { data: drafts } = await gc.drafts.listDrafts({
    id: org.id,
    projectId: project.id,
});

for (const draft of drafts) {
    console.log(`${draft.title} [${draft.status}] - ${draft.contentType}`);
}

请求编辑草稿

const result = await gc.drafts.editDraft({
    data: {
        organizationId: org.id,
        projectId: project.id,
        contentType: "page",
        resourceId: "a1b2c3d4-5678-9abc-def0-1234567890ab",
        prompt: "Rewrite the hero section to focus on enterprise customers",
    },
});
// { draftId: "f6a7b8c9-...", status: "pending" }

完成草稿的投票

async function waitForDraft(orgId: string, projectId: string, draftId: string) {
    while (true) {
        const draft = await gc.drafts.getDraft({
            id: orgId,
            projectId,
            draftId,
        });

        if (draft.status === "ready") {
            console.log("Draft is ready for review");
            return draft;
        }
        if (draft.status === "failed") {
            throw new Error(`Draft failed: ${draft.errorMessage}`);
        }

        // Still processing, wait and retry
        await new Promise((resolve) => setTimeout(resolve, 3000));
    }
}

const draft = await waitForDraft(org.id, project.id, result.draftId);
console.log(`Quality score: ${draft.qualityScore}`);
console.log(`Items: ${draft.itemCount}`);

与思想合作

想法是来自Mind的AI生成的内容建议. 他们根据你现有的内容和知识库 展现出机会.

列出想法

const { data: ideas } = await gc.ideas.listIdeas({
    id: org.id,
    projectId: project.id,
});

for (const idea of ideas) {
    console.log(`[${idea.priority}] ${idea.title}`);
    console.log(`  ${idea.description}`);
    console.log(`  Status: ${idea.status}`);
}

批准一个想法

批准一个想法触发了代词. 您可以选择覆盖内容类型或提供自定义提示 :

const approved = await gc.ideas.approveIdea({
    id: org.id,
    projectId: project.id,
    ideaId: ideas[0].id,
    data: {
        contentType: "post",
        prompt: "Focus on a beginner audience",
    },
});
// approved.status === "approved"
// approved.draftId will be set once generation starts

放弃一个想法

const dismissed = await gc.ideas.dismissIdea({
    id: org.id,
    projectId: project.id,
    ideaId: ideas[1].id,
    data: {
        reason: "Already covered in the FAQ page",
    },
});

与品牌合作

// List brandings for a project
const { data: brandings } = await gc.projectBranding.listProjectBrandings({
    id: org.id,
    projectId: project.id,
});

// Get a specific branding (colors, fonts, logos)
const branding = await gc.projectBranding.getProjectBranding({
    id: org.id,
    projectId: project.id,
    brandingId: brandings[0].id,
});

倾斜

列表端点返回带有一个 meta 对象 :

const { data, meta } = await gc.website.listWebsitePages({
    organizationId: org.id,
    projectId: project.id,
    appId: websiteApp.id,
    page: "1",
    pageSize: "25",
});

console.log(`Page ${meta.page} of ${meta.pageCount}`);
console.log(`${meta.total} total items`);

遍及所有页面

async function getAllPages(orgId: string, projectId: string, appId: string) {
    const allPages = [];
    let page = 1;

    while (true) {
        const { data, meta } = await gc.website.listWebsitePages({
            organizationId: orgId,
            projectId: projectId,
            appId: appId,
            page: String(page),
            pageSize: "100",
        });

        allPages.push(...data);

        if (page >= meta.pageCount) break;
        page++;
    }

    return allPages;
}

处理错误

SDK抛出Axios出错. 检查 error.response aPI 错误细节 :

import { AxiosError } from "axios";

try {
    const project = await gc.projects.getProject({
        id: org.id,
        projectId: "nonexistent-id",
    });
} catch (error) {
    if (error instanceof AxiosError && error.response) {
        console.error("Status:", error.response.status); // 404
        console.error("Message:", error.response.data.message); // "Project not found"
        console.error("Code:", error.response.data.code); // "NOT_FOUND"
    } else {
        // Network error, timeout, etc.
        console.error("Request failed:", error.message);
    }
}

错误代码

状态代码说明
400个BAD_REQUEST无效参数或请求正文
401 (中文(简体) )UNAUTHORIZED无效或已过期的 API 密钥
403 (韩语)FORBIDDEN此资源的权限不足
404 (韩语)NOT_FOUND资源不存在
429个RATE_LIMITED请求太多。 退后再试.
500个INTERNAL_ERROR服务器错误 。 复以后取为相.

申请身份证和追查

每个API的回复都包含一个 x-request-id 调试头 。 在报告问题时,包括这一标识:

import axios, { AxiosError } from "axios";

try {
    await gc.projects.getProject({ id: org.id, projectId: "some-id" });
} catch (error) {
    if (error instanceof AxiosError && error.response) {
        const requestId = error.response.headers["x-request-id"];
        console.error(
            `Request failed (${requestId}):`,
            error.response.data.message,
        );
        // Include requestId when contacting support
    }
}

配置

const gc = createGiantContext({
    // Required: Your API key (get one from Settings > API Keys in the console)
    apiKey: process.env.GIANTCONTEXT_API_KEY!,

    // Optional: Custom API base URL (default: https://api.giantcontext.com)
    baseUrl: "https://api.giantcontext.com",

    // Optional: Request timeout in milliseconds (default: 30000)
    timeout: 30000,
});

您也可以直接即时化课程 :

import { GiantContext } from "@giantcontext/sdk-typescript";

const gc = new GiantContext({
    apiKey: process.env.GIANTCONTEXT_API_KEY!,
});

API 参考

在33个资源中采用265个方法.

API 密钥

gc.apiKeys ——跨组织列出你自己的 API 密钥; 永远不要返回秘密值, 在组织中列出所有 API 密钥; 仅列出元数据, 没有秘密值, 还有更多 .

listMyApiKeys

在整个组织中列出您自己的 API 密钥; 永远不要返回秘密值 返回属于当前用户的所有活动 API 密钥。 每个键包括它的ID,名称,创建日期,到期日期,以及关联组织. 秘密密钥值不为安全而返回 .

参数类型需求
pagestring没有
pageSizestring没有
litestring没有
sortstring没有
searchstring没有
namestring没有
organizationIdstring没有

回返情况: Promise<object>

const result = await gc.apiKeys.listMyApiKeys({
  page: 1,
});

listOrganizationApiKeys

在组织中列出所有 API 密钥; 只列出元数据, 没有秘密值 返回一个组织的所有活动 API 密钥 。 每个密钥对象包括它的ID,名称,创建日期,到期日期,以及它与之相关的用户. 密钥值从未在列表回复中返回 。 要求在组织内发挥行政或业主作用.

参数类型需求
organizationIdstring对
pagestring没有
pageSizestring没有
litestring没有
sortstring没有
searchstring没有
namestring没有
userIdstring没有

回返情况: Promise<object>

const result = await gc.apiKeys.listOrganizationApiKeys({
  organizationId: "uuid-organizationId",
  page: 1,
});

分析

gc.analytics ——一个项目的网站流量,一个组织的交通和使用情况,等等.

getProjectAnalyticsReport

一个项目的网站流量 返回此工程的一个分析报告, 选择“ dimension ” 。 5个覆盖公共网站:"网站-流量"用于时常浏览,"网站-网页"用于最阅读的网页,以及"网站-国家","网站-设备"和"网站-城市"用于人们阅读的地点和方式. 其余内容涵盖项目本身对平台的使用:“活动”用于随时间演变的事件,“事件逐类”和“托肯斯”用于这些事件及其成本,“操作”和“顶端操作”用于哪些业务,“健康”和“应对时间”用于如何开展这些活动。 用起步 Date 和 endDate 缩小范围, 并按间隔选择桶大小; 报告该组以一栏取出“ field ” 并默认为报告命名的类别 。 除非PageSize要求部分内容. 报告从不默不作声地缩短:如果反应超过256KB,则通过测量和缩小的方法被拒绝——一个更窄的日期范围,一个更短的间隔,一个更小的限度,或者一个页Size一次取取一页. 仅涵盖该项目——其他任何组织的数字都无法通过该项目获得.

参数类型需求
organizationIdstring对
projectIdstring对
pagestring没有
pageSizestring没有
litestring没有
dimensionstring对
appIdstring没有
startDatestring没有
endDatestring没有
intervalstring没有
fieldstring没有
limitstring没有
actionstring没有
appSlugstring没有
appTypestring没有
blockTypestring没有
browserstring没有
categorystring没有
channelstring没有
citystring没有
contentTypestring没有
countryCodestring没有
deviceTypestring没有
endpointstring没有
entityTypestring没有
hostnamestring没有
httpMethodstring没有
kindstring没有
localestring没有
mimeTypestring没有
modelstring没有
osstring没有
outcomestring没有
partstring没有
platformstring没有
projectstring没有
projectSlugstring没有
ratingstring没有
regionstring没有
resourcestring没有
resourceTypestring没有
rolestring没有
sourcestring没有
sourceTypestring没有
statusstring没有
statusCodestring没有
tagstring没有
templatestring没有
typestring没有
writerstring没有

回返情况: Promise<object>

const result = await gc.analytics.getProjectAnalyticsReport({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  page: 1,
  dimension: "value",
});

getOrganizationAnalyticsReport

跨组织的交通和使用 返回一份分析报告,其中包含这个组织的每个项目,选择的是“dimension”。 5个涵盖公共网站:"网站-流量"(website-travel for views),"网页-页面"(website-pages for the most-read sages),以及"网站-国家"(website-counties),"网站-设备"(website-devices)和"网站-城市"(website-citys),用于人们阅读的地点和方式. 其余内容涵盖组织对平台的自身使用:"活动"用于随时间推移的事件,"事件逐个类别"和"托肯斯"用于那些事件是什么及其成本,"行动"和"顶级操作"用于哪些行动,"健康"和"应对时间"用于如何进行. 用起步Date和endDate来缩小范围,并按间隔选择桶大小;以一栏报告该组取出"field",这个"field"接受"ProjectSlug"在此将一个总数在组织的项目中分出. 除非PageSize要求部分内容. 报告从不默不作声地缩短:如果反应超过256KB,则通过测量和缩小的方法被拒绝——一个更窄的日期范围,一个更短的间隔,一个更小的限度,或者一个页Size一次取取一页. 仅涵盖这个组织——其他任何组织的数字都无法通过它得到.

参数类型需求
organizationIdstring对
pagestring没有
pageSizestring没有
litestring没有
dimensionstring对
appIdstring没有
startDatestring没有
endDatestring没有
intervalstring没有
fieldstring没有
limitstring没有
actionstring没有
appSlugstring没有
appTypestring没有
blockTypestring没有
browserstring没有
categorystring没有
channelstring没有
citystring没有
contentTypestring没有
countryCodestring没有
deviceTypestring没有
endpointstring没有
entityTypestring没有
hostnamestring没有
httpMethodstring没有
kindstring没有
localestring没有
mimeTypestring没有
modelstring没有
osstring没有
outcomestring没有
partstring没有
platformstring没有
projectstring没有
projectSlugstring没有
ratingstring没有
regionstring没有
resourcestring没有
resourceTypestring没有
rolestring没有
sourcestring没有
sourceTypestring没有
statusstring没有
statusCodestring没有
tagstring没有
templatestring没有
typestring没有
writerstring没有

回返情况: Promise<object>

const result = await gc.analytics.getOrganizationAnalyticsReport({
  organizationId: "uuid-organizationId",
  page: 1,
  dimension: "value",
});

App 成员

gc.appMembers ——通过ID获得一个app成员,List用户具有明确的app级角色,不包括继承的org和项目访问,等等.

getAppMember

通过ID获取应用程序成员 由会员ID获取特定应用成员的全部细节. 返回成员的用户配置信息(名称,电子邮件,avatar)及其在应用程序和会员时间戳中被分配的角色.

参数类型需求
organizationIdstring对
projectIdstring对
appIdstring对
memberIdstring对

回返情况: Promise<object>

const result = await gc.appMembers.getAppMember({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  appId: "uuid-appId",
  memberId: "uuid-memberId",
});

listAppMembers

列出具有明确的应用级别角色的用户,不包括继承的Org和项目访问 返回所有在应用程序一级明确分配角色的成员的列表。 每个成员条目包括用户的配置信息(名称,电子邮件,avatar)及其在应用中被指定的角色. 这与组织一级或项目一级的成员分开;只有直接承担应用一级角色任务的用户才能返回.

参数类型需求
organizationIdstring对
projectIdstring对
appIdstring对
pagestring没有
pageSizestring没有
litestring没有
sortstring没有
searchstring没有
rolestring没有

回返情况: Promise<object>

const result = await gc.appMembers.listAppMembers({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  appId: "uuid-appId",
  page: 1,
});

错误报告

gc.bugReports ——列表错误报告您已存档, 带有严重性, 状态和 GitHub 问题链接, 列表注释用于错误报告, 还有更多 .

listMyBugReports

列表错误报告您已归档, 带有严重性、 状态和 GitHub 问题链接 返回当前用户提交的、按状态、严重程度和来源可过滤和可按标题或描述可搜索的错误报告。 每份报告包括标题,描述,复制步骤,预期/实际行为,严重程度,状态(开放/解析/取消),浏览器信息,页面URL,报告计数,如果有GitHub问题细节链接的话.

参数类型需求
pagestring没有
pageSizestring没有
litestring没有
sortstring没有
searchstring没有
statusstring没有
severitystring没有
sourcestring没有
reportCountstring没有
createdAtstring没有

回返情况: Promise<object>

const result = await gc.bugReports.listMyBugReports({
  page: 1,
});

listBugReportComments

列出错误报告的评论 返回当前用户拥有的特定错误报告的所有团队评论和回复 。 每个评论包括它的ID,评论文本,作者名,以及一个创建时间戳. 评论意见按时间顺序退回.

参数类型需求
bugReportIdstring对
pagestring没有
pageSizestring没有
litestring没有
sortstring没有
searchstring没有
authorstring没有
sourcestring没有
createdAtstring没有

回返情况: Promise<object>

const result = await gc.bugReports.listBugReportComments({
  bugReportId: "uuid-bugReportId",
  page: 1,
});

构建器

gc.builder ——获取每个内容类型和其中允许的块,获取每个块共享的样式计划,获取一个块类型自己的字段和提示,还有更多.

getContentTypes

获取每个内容类型和其中允许的块 列出每个内容类型——网页,帖子,起落架,页眉,页脚,侧边栏,对话框和布局;kb文章和起落架;开发者docs和起落架;窗体;电子邮件及其页眉和页脚——每个内容都属于构建者上下文,并允许内部有确切的块类型.

回返情况: Promise<object>

const result = await gc.builder.getContentTypes();

getBlockStyles

获得每个区块共享的样式计划 返回单个样式对象每个块,列和部分接受——边距,贴花,宽度,背景,边框,框阴影,位置,每个断点能见度,入口动画和csId/csClasses. 每个区块类型都相同,不重复。 schema带有自有的值-格式指导:哪个字段取出每个断点对象,当一个赤色数字表示一个主题间距多比像素,而不是像素,以及究竟哪个颜色符号解决. 每个断点{桌面、平板电脑、移动式}发送到平面字段的对象不会出错,也不会渲染出.

回返情况: Promise<{ styles: unknown; }>

const result = await gc.builder.getBlockStyles();

getBlock

获取一个块类型自己的字段和提示 返回单个块类型的 JSON 计划,加上其每个字段的编写提示,范围为(并针对)内容类型的调色板。 样式对象对每个块类型都相同,在此不重复.

参数类型需求
blockTypestring对
contentTypestring对

回返情况: Promise<{ type: string; schema: unknown; hints: Record<string, unknown>; }>

const result = await gc.builder.getBlock({
  blockType: "value",
  contentType: "value",
});

deleteSection

删除一个区域及其内的每一块; 从版本历史中可回收 从内容树上去掉一个区域(及其块)并记录一个版本。 返回已删除的部分。 前一个状态可以从版本历史中恢复.

参数类型需求
organizationIdstring对
projectIdstring对
dataobject对

回返情况: Promise<{ section: unknown; }>

const result = await gc.builder.deleteSection({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  data: { /* ... */ },
});

insertSection

在内容树上插入一节 插入一个新的区域(根据区域计划,包括它携带的任何块)并记录一个版本。 所提供部分的每个字段都保留;只有ID和类型是服务器拥有的. 区块和省略出区块的列/区块都会产生ID. 将锚放入尾部 指定无列的区块将创建一个空列.

参数类型需求
organizationIdstring对
projectIdstring对
dataobject对

回返情况: Promise<{ section: unknown; position: number; }>

const result = await gc.builder.insertSection({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  data: { /* ... */ },
});

updateSection

更新一个区域自己的属性; 块不动, 列无法被补丁 补丁一节自己的属性并记录一个版本. 任何分区字段都可以被补丁; id, type and 欄被以出错拒绝而不是被忽略. 不要碰它的地块.

参数类型需求
organizationIdstring对
projectIdstring对
dataobject对

回返情况: Promise<{ section: unknown; }>

const result = await gc.builder.updateSection({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  data: { /* ... */ },
});

deleteBlock

删除块, 返回; 上一个树保留在版本历史中 删除内容树上的块并记录一个版本。 返回已删除的块, 在删除块清空其容器时加上列 Removed 或段 Removed : 一个空列被冲出( 它使一个缺口) , 当空出整个块时, 段也被冲出( 它画了一个孤儿背景带) 。 历史层面的无损——前作状态可以从版本历史中恢复.

参数类型需求
organizationIdstring对
projectIdstring对
dataobject对

回返情况: Promise<object>

const result = await gc.builder.deleteBlock({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  data: { /* ... */ },
});

insertBlock

在内容树上插入块 在内容实体树上插入新块并记录一个版本。 区块的数据对照其类型的"计划"和内容的"区块调色板"进行验证. 返回创建的块(及其生成的 id) .

参数类型需求
organizationIdstring对
projectIdstring对
dataobject对

回返情况: Promise<object>

const result = await gc.builder.insertBlock({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  data: { /* ... */ },
});

updateBlock

仅合并您发送的字段来更新块的数据和/或样式; 无效清除字段 将所提供的字段合并为块的数据和/或其样式并记录一个版本。 发送数据、样式或两者兼有; 字段省略保留其当前值; 发送无效以清除 。 样式覆盖了粘贴、边距、边框、背景、对齐和隐藏。 地语地图每个地语合并,所以写出一种语言后,其他语言就完好无损了. 对照区块类型的计划进行了验证.

参数类型需求
organizationIdstring对
projectIdstring对
dataobject对

回返情况: Promise<{ block: unknown; }>

const result = await gc.builder.updateBlock({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  data: { /* ... */ },
});

moveSection

在兄弟会之前或之后移动一节,或在结尾附加 将一节重排为新位置(相对一兄弟姐妹,或附件)并记录一个版本. 返回所移动的部分.

参数类型需求
organizationIdstring对
projectIdstring对
dataobject对

回返情况: Promise<{ section: unknown; }>

const result = await gc.builder.moveSection({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  data: { /* ... */ },
});

moveBlock

将一个块移动到兄弟会旁边或一个区域,使其数据保持不变 将块重置为新主播(接接接一兄弟会,或被放入一节)并记录一个版本. 返回已移动块 .

参数类型需求
organizationIdstring对
projectIdstring对
dataobject对

回返情况: Promise<{ block: unknown; }>

const result = await gc.builder.moveBlock({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  data: { /* ... */ },
});

setContentVisibility

设定内容是否列出, 是否需要登录阅读器 改变谁可以读取一个内容项目,以及是否有任何广告,其他的则没有,不是内容、状况、弹道或元数据。 两旗独立. isListed 规范了项目是否出现在站点图、索引、网格和搜索中;未列出的项目在自己的URL上保持活性,即“任何有链接的人”。 要求ViewerAuth 规范是否为匿名读取器服务; 装有门面的物品使网站的标志在页面中, 绝不是404。 所有四种组合都是有意义的,包括列出和封门——一个存在公开的网页,其内容不是. 只有网站的网页和帖子才能被登入;KB文章,开发者doc或登陆只能被不列入清单,对一号闸的要求被姓名拒绝. 只有发送的旗帜被更改.

参数类型需求
organizationIdstring对
projectIdstring对
dataobject对

回返情况: Promise<object>

const result = await gc.builder.setContentVisibility({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  data: { /* ... */ },
});

unpublishContent

打开内容项目, 返回到草稿 从公共网站上取出一个已公布的内容项目,然后返回起草。 机体,弹壳和元数据未受影响,因此可以再次被修改后公布,并保留了第一次公布的日期而不是清除.

一个待公布的预定出版物被取消,因此一个被取下来的物品在旧时间表到期后不再重新出现。 搜索引擎被告知URL已消失并被清理出公共缓存,因此页面停止服务而不是被停留在缓存或索引中. 答复报告已经 当项目成为草案时 已经是州里了.

参数类型需求
organizationIdstring对
projectIdstring对
dataobject对

回返情况: Promise<object>

const result = await gc.builder.unpublishContent({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  data: { /* ... */ },
});

publishContent

发布一个页面、帖子、文章、文件或电子邮件——只发布状态,不发布正文 设置一个内容项的状态以发布, 并让其他一切不受影响: 而不是它的内容, shall,布局或元数据 。 为每个有生命周期草稿/已出版内容类型工作——网页和帖子、KB文章、开发者文件及电子邮件。 结构块(头,脚,布局,起落地,形式)总是活活的并被取名拒绝. 发布再索引项目用于AI搜索,信号搜索引擎,并清理公共缓存. 重新发布已经发布的东西不是一个错误;响应已经表示InState. 一个有未来时间戳时间表的出版At a computing At a future timetamp channess 而不是出版:项目保留一个草稿,直到一个工作活下来,而响应返回了预定的PublishAt 仍然保留状态草稿. 过去出版At被拒绝,而不是作为现在出版处理,而出版或不出版会取消一个已经待出版的时间表. 当内容引用项目未定义的租户值时——在"工程env.name"下没有匹配条目的"X"(env.name}})——和被拒绝者命名了这些值时,就拒绝发布,所以要定义这些值或删除引用并再次发布. 因此,从未拒绝出版.

参数类型需求
organizationIdstring对
projectIdstring对
dataobject对

回返情况: Promise<object>

const result = await gc.builder.publishContent({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  data: { /* ... */ },
});

searchContent

在内容中查找字符串或块类型 在一个项目中搜索页面,帖子, KB 文章和开发者 Docs 的内容—— 按精确的不敏感大小写字符串( query) , 按块类型( blockTypes) , 或者两者兼有. 一个文本查询还搜索了每个部分的标题和子标题,而不仅仅是块复制. 按内容类型和草稿/公布状态过滤 。 每个匹配都报告它的全部位置——内容Id(分类类型),节 Id, 列Id and blockId – 外加匹配入(块, 标题或子标题). blockTypes是对照内容类型调色板验证的,因此一个未知类型错误而不是返回空结果. 字段路径,地语和片段是用于文本查询而纯块类型匹配无效的,地语是匹配报告所持有的——补丁不同地语覆盖了另一种语言.

参数类型需求
organizationIdstring对
projectIdstring对
querystring没有
blockTypesstring没有
contentTypesstring没有
statusstring没有
limitstring没有

回返情况: Promise<object>

const result = await gc.builder.searchContent({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
});

getContent

获取内容树进行编辑 返回一个内容实体的完整部分[]内容树(每个部分/栏/块ID)——页面、帖子、登陆等。 包括每一节、一栏和一栏的编号.

参数类型需求
organizationIdstring对
projectIdstring对
contentTypestring对
contentIdstring对

回返情况: Promise<{ content: Array<Record<string, unknown>>; }>

const result = await gc.builder.getContent({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  contentType: "value",
  contentId: "uuid-contentId",
});

客户关系管理

gc.crm ——获取一个活动的描述,写出应用软件和JSON数据有效载荷,列出整个CRM应用的活动时间表,最新的第一,可搜索,将一个过去紧张的句子记录在联系人或公司时间表上,仅附件,等等.

getCrmActivity

获取一项活动的描述, 写入应用程序和 JSON 数据有效载荷 通过 ID 返回单一的客户关系管理活动 。 每种活动都是对所发生事物的自然语言描述,被标记为所写的应用,带有可选的JSON元数据以及链接到的联系人/公司对象.

参数类型需求
organizationIdstring对
projectIdstring对
appIdstring对
activityIdstring对

回返情况: Promise<object>

const result = await gc.crm.getCrmActivity({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  appId: "uuid-appId",
  activityId: "uuid-activityId",
});

listCrmActivities

列出整个客户关系管理应用程序的活动时间表, 最新的第一, 可搜索 返回指定应用程序的客户关系管理活动的标定时间段, 首先是最新时间段 。 每个活动都是对一个联系人(或公司)所发生的事物的自然语言描述,贴有写作的应用程序的标签,可选地用JSON来丰富内容 data 载荷。 支持在描述中进行自由文本搜索 .

参数类型需求
organizationIdstring对
projectIdstring对
appIdstring对
pagestring没有
pageSizestring没有
litestring没有
sortstring没有
searchstring没有
contactIdstring没有
companyIdstring没有
writtenBystring没有
createdAtstring没有

回返情况: Promise<object>

const result = await gc.crm.listCrmActivities({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  appId: "uuid-appId",
  page: 1,
});

logCrmActivity

将过去语句记录在联系人或公司时间表上, 仅附加 在客户关系管理时间表中附加一个活动. description 是自然语言的句子(“Viewed price page”,“未订阅通讯”). writtenBy 识别哪个应用程序写它。 可选 data 包含结构化元数据。 通过ID链接到联系人和/或公司.

参数类型需求
organizationIdstring对
projectIdstring对
appIdstring对
dataobject对
const result = await gc.crm.logCrmActivity({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  appId: "uuid-appId",
  data: { /* ... */ },
});

listCrmCompanyActivities

列出公司的活动时间表, 最新的第一, 无论应用记录 返回一个公司的自然语言活动时间线, 首先是最新的。 每行都是对所发生事情的描述,用所写的应用程序标记,带有可选的JSON元数据.

参数类型需求
organizationIdstring对
projectIdstring对
appIdstring对
companyIdstring对
pagestring没有
pageSizestring没有
litestring没有
sortstring没有
searchstring没有
writtenBystring没有
contactIdstring没有

回返情况: Promise<object>

const result = await gc.crm.listCrmCompanyActivities({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  appId: "uuid-appId",
  companyId: "uuid-companyId",
  page: 1,
});

listCrmCompanyContacts

列表联系到一个公司的联系人, 按姓字母顺序排列 返回与特定公司链接的CRM 联系人的平面列表,该列表按姓顺序排列。 每个联系人包括姓名、电子邮件、电话、标题、部门、状况、来源、标签和连通公司对象.

参数类型需求
organizationIdstring对
projectIdstring对
appIdstring对
companyIdstring对
pagestring没有
pageSizestring没有
litestring没有
sortstring没有
searchstring没有
statusstring没有
sourcestring没有
titlestring没有
departmentstring没有

回返情况: Promise<object>

const result = await gc.crm.listCrmCompanyContacts({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  appId: "uuid-appId",
  companyId: "uuid-companyId",
  page: 1,
});

listCrmCompanyTimeline

一个公司的时间表——它的人正在发生,一个溪流 每个人在一家公司的活动,合并成一个列表,是最新的第一. 由于这是人们自己通过雇主进行的活动,它需要获得许可才能阅读整个项目的人以及进入公司——光是使用CRM应用是不够的,而且拒绝打电话.

参数类型需求
organizationIdstring对
projectIdstring对
appIdstring对
companyIdstring对
pagestring没有
pageSizestring没有
litestring没有
limitnumber没有

回返情况: Promise<object>

const result = await gc.crm.listCrmCompanyTimeline({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  appId: "uuid-appId",
  companyId: "uuid-companyId",
  page: 1,
});

getCrmCompany

找到一个公司, 拥有它的配置字段 和链接的联系人数 通过ID返回一个单一的客户关系管理公司,包括名称,网站,行业,规模,年收入,联系信息,地址,标签,自定义属性,以及关联联系人的倒数.

参数类型需求
organizationIdstring对
projectIdstring对
appIdstring对
companyIdstring对

回返情况: Promise<object>

const result = await gc.crm.getCrmCompany({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  appId: "uuid-appId",
  companyId: "uuid-companyId",
});

listCrmCompanies

在一个CRM应用程序中列出公司,按名称字母,每个应用程序都有联系人数 返回指定应用的所有客户关系管理公司列表。 支持按公司名称或行业搜索. 每个公司包括一个相关联系人的数目.

参数类型需求
organizationIdstring对
projectIdstring对
appIdstring对
pagestring没有
pageSizestring没有
litestring没有
sortstring没有
searchstring没有
namestring没有
industrystring没有
sizestring没有
emailstring没有
websitestring没有

回返情况: Promise<object>

const result = await gc.crm.listCrmCompanies({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  appId: "uuid-appId",
  page: 1,
});

聊天

gc.chat ——与被发短信进行聊天对话,以人类操作员的身份回复到聊天对话中,从AI那里接听聊天对话,等等.

getChatConversation

与 pagized 信件聊天 获取基于光标的 pagized 消息的聊天对话 。 没有光标,则返回最新消息(最多可限制). 有光标/cursorId的指向=老年人走过历史.

参数类型需求
organizationIdstring对
projectIdstring对
appIdstring对
conversationIdstring对
cursorstring没有
cursorIdstring没有
directionstring没有
limitstring没有

回返情况: Promise<object>

const result = await gc.chat.getChatConversation({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  appId: "uuid-appId",
  conversationId: "uuid-conversationId",
});

replyToChatConversation

作为人类操作员回答聊天 送接线员回话 支持“ 操作者” 角色信息, 如果操作者尚未举行的话, 则为操作者要求对话 。 访客的部件在下次民调时收到.

参数类型需求
organizationIdstring对
projectIdstring对
appIdstring对
conversationIdstring对
data`{
content: string;

}`,是也

const result = await gc.chat.replyToChatConversation({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  appId: "uuid-appId",
  conversationId: "uuid-conversationId",
  data: { /* ... */ },
});

takeOverChatConversation

接听AI的聊天 人类的操作者控制了现场谈话. 在举行期间,AI回答路径站倒了,操作员的答复驱动了对话. 返回生成的持有状态 .

参数类型需求
organizationIdstring对
projectIdstring对
appIdstring对
conversationIdstring对

回返情况: Promise<{ heldByUserId: string | unknown; heldAt: string | unknown; }>

const result = await gc.chat.takeOverChatConversation({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  appId: "uuid-appId",
  conversationId: "uuid-conversationId",
});

releaseChatConversation

向AI发布聊天对话 释放一个人类的谈话 AI回答路径为对话的下个访问者信息恢复.

参数类型需求
organizationIdstring对
projectIdstring对
appIdstring对
conversationIdstring对
const result = await gc.chat.releaseChatConversation({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  appId: "uuid-appId",
  conversationId: "uuid-conversationId",
});

getChatConversationTimeline

游客的线索 背后的谈话, 最新的第一 此次对话的访客在整个项目中所做的——页面阅读,提交表格,其他对话——都是最新的第一,所以无论谁回答聊天,都会知道他们在和谁说话. 如果访问者已经确认身份,则包括他们的全部历史;如果没有,则是浏览器自己的活动.

参数类型需求
organizationIdstring对
projectIdstring对
appIdstring对
conversationIdstring对
pagestring没有
pageSizestring没有
litestring没有
limitnumber没有

回返情况: Promise<object>

const result = await gc.chat.getChatConversationTimeline({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  appId: "uuid-appId",
  conversationId: "uuid-conversationId",
  page: 1,
});

listChatConversations

在聊天应用程序中列出每个访问者的对话, 最近一次更新是 列出特定聊天应用程序的所有聊天对话 。 返回带有身份证、头衔、访客身份证和时间戳的相声列表。 支持通过对话标题或访问者ID进行搜索过滤. 最新更新的结果是首先排序的。 这是一个只管理端点,用于审查和管理所有客户聊天谈话.

参数类型需求
organizationIdstring对
projectIdstring对
appIdstring对
pagestring没有
pageSizestring没有
litestring没有
sortstring没有
searchstring没有
visitorIdstring没有
userIdstring没有

回返情况: Promise<object>

const result = await gc.chat.listChatConversations({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  appId: "uuid-appId",
  page: 1,
});

listChatEscalations

在聊天应用程序中列出每个升级, 首先是最新的 列出聊天应用程序的所有升级——升级收件箱. 返回一个包含每次升级状态的已标定列表、访问者联系方式、摘要、源代码 URL、链接的对话和时间戳。 状态是收集 contact, collect summary, 提交或取消, 并过滤将打开的交割与提交或取消的交割分开; 访问者电子邮件过滤器给一个人并搜索匹配访问者的电子邮件或摘要 。 成果由最近创建的先命令. 唯执.

参数类型需求
organizationIdstring对
projectIdstring对
appIdstring对
pagestring没有
pageSizestring没有
litestring没有
sortstring没有
searchstring没有
statusstring没有
visitorEmailstring没有

回返情况: Promise<object>

const result = await gc.chat.listChatEscalations({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  appId: "uuid-appId",
  page: 1,
});

内容版本

gc.contentVersions ——将一个实体恢复到更古老的版本;无损的,前行历史被保留,获得一个版本的全部内容快照,列表工具省略了这些快照,列出一个实体的最新编辑历史;仅元数据,没有内容快照,还有更多.

restoreContentVersion

将一个实体恢复到旧版本; 保留无损、 前向历史 将内容实体滚回上一个版本。 无损:将快照的内容写入活实体并附加一个新的"倒置"版本,保留前向历史.

参数类型需求
organizationIdstring对
projectIdstring对
versionIdstring对

回返情况: Promise<object>

const result = await gc.contentVersions.restoreContentVersion({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  versionId: "uuid-versionId",
});

getContentVersion

获得一个版本的全部内容快照, 列表工具省略了该快照 返回一个单一内容版本,包括其完整部分[ 内容快照.

参数类型需求
organizationIdstring对
projectIdstring对
versionIdstring对

回返情况: Promise<object>

const result = await gc.contentVersions.getContentVersion({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  versionId: "uuid-versionId",
});

listContentVersions

首先列出一个实体的最新编辑历史; 只列出元数据, 没有内容快照 返回单个内容实体的最新首个版本历史(页,帖子,登陆等). 只包含元数据;没有包含内容快照. 这是人类和AI编辑的倒放/倒放线索.

参数类型需求
organizationIdstring对
projectIdstring对
pagestring没有
pageSizestring没有
litestring没有
sortstring没有
searchstring没有
sourcestring没有
createdBystring没有
versionstring没有
createdAtstring没有
contentTypestring对
contentIdstring对

回返情况: Promise<object>

const result = await gc.contentVersions.listContentVersions({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  page: 1,
  contentType: "value",
  contentId: "uuid-contentId",
});

开发者

gc.developers ——获得一个类自己的字段,删除开发者 doc 类,更新一个类的手柄,公共标题和描述;不能再粘接或再上映,等等.

getDevelopersDocCategory

获得一个类别自己的字段 按其ID检索单一的开发者docs分类,包括名称, swit,描述,父关系,图标,和显示顺序. 如果该类别不存在或已被软删除,则返回404.

参数类型需求
organizationIdstring对
projectIdstring对
appIdstring对
categoryIdstring对

回返情况: Promise<Record<string, unknown>>

const result = await gc.developers.getDevelopersDocCategory({
  organizationId: "uuid-organizationId",
  projectId: "uuid-projectId",
  appId: "uuid-appId",
  categoryId: "uuid-categoryId",
});

deleteDevelopersDocCategory

删除开发者 doc 类别 将开发者 Docs 分类移动到垃圾桶中 。 如果 t 返回 404 个

版本与发布记录

@giantcontext/sdk-typescript 共发布 101 个版本,首次发布于 2026/04/16;过去 12 个月发布了 101 个版本。

版本发布日期距今
1.240.0latest2026/11/133 天前
1.239.02026/11/115 天前
1.238.02026/11/106 天前
1.237.02026/11/079 天前
1.233.02026/11/0412 天前
1.231.02026/11/0214 天前

关于 @giantcontext/sdk-typescript 的常见问题

@giantcontext/sdk-typescript 是什么?

大型文本类型SDK

如何安装 @giantcontext/sdk-typescript?

在项目目录运行 npm install @giantcontext/sdk-typescript,或使用 pnpm add / yarn add / bun add。

@giantcontext/sdk-typescript 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@giantcontext/sdk-typescript 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@giantcontext/sdk-typescript 可以商用吗?

@giantcontext/sdk-typescript 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@giantcontext/sdk-typescript 的下载量有多少?

根据 npm 官方下载统计,@giantcontext/sdk-typescript 在 2026/10/17 – 2026/11/15 这 30 天内被下载 3,756 次,日均约 125 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@giantcontext/sdk-typescript 还在维护吗?

最新版本 1.240.0 发布于 2026/11/13(3 天前);至今共发布 101 个版本,其中过去 12 个月发布了 101 个;首次发布于 2026/04/16。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。