@agentforge-io/sdk-server 4.38.0 → 4.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ export type { AgentForgeClientOptions, RequestOptions } from './client';
3
3
  export { AgentForgeError, AgentForgeAuthError, AgentForgeNotFoundError, AgentForgeNetworkError, } from './errors';
4
4
  export { APP_WEBHOOK_HEADERS, TOOL_CALLBACK_HEADERS, ToolCallbackSignatureError, signToolCallbackPayload, verifyAppWebhook, verifyToolCallbackSignature, } from './webhooks';
5
5
  export { WebhookResource, type SetAppWebhookInput } from './resources/webhook';
6
- export type { AppWebhook, AppWebhookEvent, AppWebhookEventName, AgentMe, AgentSummary, AppUserConnectorStatus, ApprovalCopyBundle, ChannelContext, ChatStreamChunk, ChatStreamEvent, ChatTokenRecord, ConnectorDefaultsResult, ConnectorDefaultsSource, ConnectorResourceItem, ConnectorStatus, ConnectorToolInfo, ConversationHistory, ConversationStatus, CreateAgentInput, CreateClickupTaskInput, CreateClickupTaskResult, ExternalToolSummary, IssueChatTokenInput, ListAgentsResult, ListConnectorResourcesResult, McpServerConfig, MessageRecord, MessageRole, PublicAppBranding, PublicProfileBlock, PublicProfileTemplate, PublicTeamLanding, CreateTeamInput, UpdateTeamInput, TeamSummary, TeamDetail, TeamTheme, TeamBusinessHours, TeamWeekday, TeamProfileBlock, AppInstallation, TemplateConfigField, TemplateSummary, TemplateDetail, TemplateCategoryRef, MarketplaceCategory, MarketplaceCategoryGroup, MarketplaceLocale, TemplateInstallResult, TenantConfigEntry, Place, PlaceSuggestion, SearchPlacesInput, AutocompletePlacesInput, PlacesScope, CaseField, CaseBusinessState, CaseType, CaseState, CasePayment, CasePaymentAccount, CasePaymentStatus, CaseReceiptPayment, CaseView, CreateDirectOrderInput, DirectOrderForm, CaseReceipt, CaseReceiptLine, ListCasesInput, AddressValue, DeliveryLocalPricing, DeliverySettings, PaymentMethodKind, PaymentSettings, PaymentSettingsInput, PaymentAccount, PaymentCountry, PaymentFieldDef, PaymentMethodDef, StructuredConfigInput, StructuredConfigEntry, DeliveryQuoteStatus, DeliveryQuoteInput, DeliveryQuote, AppSelf, AppSelfConnector, AppSelfConnectors, AppSelfConnectorTools, AppSelfConnectorToolsResponse, RegisterToolInput, RegisterToolsInput, BusinessRoleEntry, Catalog, CatalogCheckoutCta, CatalogCategory, CatalogProduct, CatalogProductPhoto, CatalogProductKind, CatalogProductStatus, CatalogPriceKind, CatalogAvailability, CatalogLockableField, CatalogProductPage, UpsertCatalogInput, CreateCatalogCategoryInput, UpdateCatalogCategoryInput, CreateCatalogProductInput, UpdateCatalogProductInput, ListCatalogProductsInput, CatalogPhotoUploadTarget, SignCatalogPhotoUploadInput, AttachCatalogPhotoInput, CatalogImportItem, CatalogImportPreview, CatalogImportApplyResult, CatalogFileMapping, CatalogFilePlan, CatalogFilePreview, CatalogFileApplyResult, CatalogFileInput, CatalogFilePreviewInput, CatalogMenuItem, CatalogMenuRead, CatalogMenuReadInput, CatalogOption, CatalogOptionGroup, SaveCatalogOptionGroupInput, CatalogOptionChoice, CatalogOptionChange, CatalogOptionChangesPlan, CatalogUnit, SaveCatalogUnitInput, CatalogSaleRule, CatalogFileApplyInput, CatalogFileErrorCode, CatalogImportSourceStatus, CatalogImportColumnMapping, CatalogImportRunResult, CatalogImportSource, CreateCatalogImportSourceInput, UpdateCatalogImportSourceInput, PreviewCatalogImportSourceInput, CatalogImportSourcePreview, CatalogSheetTab, CatalogTemplateSheet, CreateCatalogTemplateSheetInput, GoogleSheetsPickerInput, GoogleSheetsPickerSession, GoogleSheetsPickerErrorCode, GoogleSheetsPickerResult, RegisterToolsResult, ToolCallbackPayload, ToolCallRecord, ToolPermission, ToolPermissionMode, TokenUsage, TenantSecretEntry, UpdateAgentInput, InboxThreadMode, InboxMessageDirection, InboxMessageSource, InboxMessageType, InboxThreadCustomerProfileView, InboxThreadView, InboxMessageView, SupportKpiTotals, SupportKpiResponse, AgentAttentionLogRow, } from './types';
6
+ export type { AppWebhook, AppWebhookEvent, AppWebhookEventName, AgentMe, AgentSummary, AppUserConnectorStatus, ApprovalCopyBundle, ChannelContext, ChatStreamChunk, ChatStreamEvent, ChatTokenRecord, ConnectorDefaultsResult, ConnectorDefaultsSource, ConnectorResourceItem, ConnectorStatus, ConnectorToolInfo, ConversationHistory, ConversationStatus, CreateAgentInput, CreateClickupTaskInput, CreateClickupTaskResult, ExternalToolSummary, IssueChatTokenInput, ListAgentsResult, ListConnectorResourcesResult, McpServerConfig, MessageRecord, MessageRole, PublicAppBranding, PublicProfileBlock, PublicProfileTemplate, PublicTeamLanding, CreateTeamInput, UpdateTeamInput, TeamSummary, TeamDetail, TeamTheme, TeamBusinessHours, TeamWeekday, TeamProfileBlock, AppInstallation, TemplateConfigField, TemplateSummary, TemplateDetail, TemplateCategoryRef, MarketplaceCategory, MarketplaceCategoryGroup, MarketplaceLocale, TemplateInstallResult, TenantConfigEntry, Place, PlaceSuggestion, SearchPlacesInput, AutocompletePlacesInput, PlacesScope, CaseField, CaseBusinessState, CaseType, CaseState, CasePayment, CasePaymentAccount, CasePaymentStatus, CaseReceiptPayment, CaseView, CreateDirectOrderInput, DirectOrderForm, CaseReceipt, CaseReceiptLine, ListCasesInput, AddressValue, DeliveryLocalPricing, DeliverySettings, PaymentMethodKind, PaymentSettings, PaymentSettingsInput, PaymentAccount, PaymentCountry, PaymentFieldDef, PaymentMethodDef, StructuredConfigInput, StructuredConfigEntry, DeliveryQuoteStatus, DeliveryQuoteInput, DeliveryQuote, AppSelf, AppSelfConnector, AppSelfConnectors, AppSelfConnectorTools, AppSelfConnectorToolsResponse, RegisterToolInput, RegisterToolsInput, BusinessRoleEntry, Catalog, CatalogCheckoutCta, CatalogCategory, CatalogProduct, CatalogProductPhoto, CatalogProductKind, CatalogProductStatus, CatalogPriceKind, CatalogAvailability, CatalogLockableField, CatalogProductPage, UpsertCatalogInput, CreateCatalogCategoryInput, UpdateCatalogCategoryInput, CreateCatalogProductInput, UpdateCatalogProductInput, ListCatalogProductsInput, CatalogPhotoUploadTarget, SignCatalogPhotoUploadInput, AttachCatalogPhotoInput, CatalogImportItem, CatalogImportPreview, CatalogImportApplyResult, CatalogFileMapping, CatalogFilePlan, CatalogFilePreview, CatalogFileApplyResult, CatalogFileInput, CatalogFilePreviewInput, CatalogMenuItem, CatalogMenuRead, CatalogMenuReadInput, CatalogMenuAttachInput, CatalogMenuChatFile, CatalogOption, CatalogOptionGroup, SaveCatalogOptionGroupInput, CatalogOptionChoice, CatalogOptionChange, CatalogOptionChangesPlan, CatalogUnit, SaveCatalogUnitInput, CatalogSaleRule, CatalogFileApplyInput, CatalogFileErrorCode, CatalogImportSourceStatus, CatalogImportColumnMapping, CatalogImportRunResult, CatalogImportSource, CreateCatalogImportSourceInput, UpdateCatalogImportSourceInput, PreviewCatalogImportSourceInput, CatalogImportSourcePreview, CatalogSheetTab, CatalogTemplateSheet, CreateCatalogTemplateSheetInput, GoogleSheetsPickerInput, GoogleSheetsPickerSession, GoogleSheetsPickerErrorCode, GoogleSheetsPickerResult, RegisterToolsResult, ToolCallbackPayload, ToolCallRecord, ToolPermission, ToolPermissionMode, TokenUsage, TenantSecretEntry, UpdateAgentInput, InboxThreadMode, InboxMessageDirection, InboxMessageSource, InboxMessageType, InboxThreadCustomerProfileView, InboxThreadView, InboxMessageView, SupportKpiTotals, SupportKpiResponse, AgentAttentionLogRow, } from './types';
7
7
  export { AgentsResource } from './resources/agents';
8
8
  export { AnalyticsResource } from './resources/analytics';
9
9
  export type { GetSupportKpisInput, GetAgentAttentionLogInput, } from './resources/analytics';
@@ -1,6 +1,6 @@
1
1
  import type { AgentForgeClient } from '../client';
2
2
  import { AgentForgeError } from '../errors';
3
- import type { AttachCatalogPhotoInput, Catalog, CatalogCategory, CatalogFileApplyInput, CatalogFileApplyResult, CatalogOptionChange, CatalogOptionChangesPlan, CatalogOptionGroup, CatalogUnit, SaveCatalogUnitInput, SaveCatalogOptionGroupInput, CatalogMenuItem, CatalogMenuRead, CatalogMenuReadInput, CatalogFilePreview, CatalogFilePreviewInput, CatalogImportApplyResult, CatalogImportItem, CatalogImportPreview, CatalogImportSource, CatalogImportSourcePreview, CatalogImportRunResult, CatalogPhotoUploadTarget, CatalogProduct, CatalogProductPage, CatalogSheetTab, CatalogTemplateSheet, CreateCatalogTemplateSheetInput, CreateCatalogCategoryInput, CreateCatalogImportSourceInput, CreateCatalogProductInput, ListCatalogProductsInput, PreviewCatalogImportSourceInput, SignCatalogPhotoUploadInput, UpdateCatalogCategoryInput, UpdateCatalogImportSourceInput, UpdateCatalogProductInput, UpsertCatalogInput } from '../types';
3
+ import type { AttachCatalogPhotoInput, Catalog, CatalogCategory, CatalogFileApplyInput, CatalogFileApplyResult, CatalogOptionChange, CatalogOptionChangesPlan, CatalogOptionGroup, CatalogUnit, SaveCatalogUnitInput, SaveCatalogOptionGroupInput, CatalogMenuItem, CatalogMenuRead, CatalogMenuReadInput, CatalogMenuAttachInput, CatalogMenuChatFile, CatalogFilePreview, CatalogFilePreviewInput, CatalogImportApplyResult, CatalogImportItem, CatalogImportPreview, CatalogImportSource, CatalogImportSourcePreview, CatalogImportRunResult, CatalogPhotoUploadTarget, CatalogProduct, CatalogProductPage, CatalogSheetTab, CatalogTemplateSheet, CreateCatalogTemplateSheetInput, CreateCatalogCategoryInput, CreateCatalogImportSourceInput, CreateCatalogProductInput, ListCatalogProductsInput, PreviewCatalogImportSourceInput, SignCatalogPhotoUploadInput, UpdateCatalogCategoryInput, UpdateCatalogImportSourceInput, UpdateCatalogProductInput, UpsertCatalogInput } from '../types';
4
4
  /** Max structured items per `import.preview/apply` call (platform cap). */
5
5
  export declare const CATALOG_IMPORT_MAX_ITEMS = 200;
6
6
  /** Thrown client-side, before any request, when `items` exceeds the cap. */
@@ -122,6 +122,13 @@ export declare class CatalogMenuImportResource {
122
122
  constructor(client: AgentForgeClient);
123
123
  /** `POST /import/menu/read` (multipart) — `text` and/or a `file` (≤10 MB). Can take a minute. */
124
124
  read(input: CatalogMenuReadInput): Promise<CatalogMenuRead>;
125
+ /**
126
+ * `POST /import/menu/files` (multipart) — a file the owner attached in their
127
+ * chat, kept 30 min for the assistant: the message carries
128
+ * `[filename](file:<fileId>)` and the staff tool `catalog_staff_menu_preview`
129
+ * reads it by `fileId`. Writes nothing.
130
+ */
131
+ attach(input: CatalogMenuAttachInput): Promise<CatalogMenuChatFile>;
125
132
  /** `POST /import/menu/apply` — the confirmed items (max 200). */
126
133
  apply(items: CatalogMenuItem[], opts?: {
127
134
  kind?: 'product' | 'service';
@@ -255,6 +255,20 @@ class CatalogMenuImportResource {
255
255
  const res = await this.client.requestRaw('POST', `${BASE}/import/menu/read`, { ...TENANT_AUTH, formData: form, timeoutMs: 180000 });
256
256
  return (await res.json());
257
257
  }
258
+ /**
259
+ * `POST /import/menu/files` (multipart) — a file the owner attached in their
260
+ * chat, kept 30 min for the assistant: the message carries
261
+ * `[filename](file:<fileId>)` and the staff tool `catalog_staff_menu_preview`
262
+ * reads it by `fileId`. Writes nothing.
263
+ */
264
+ async attach(input) {
265
+ const form = new FormData();
266
+ const raw = toBlob(input.file);
267
+ const blob = input.mimeType && !raw.type ? new Blob([raw], { type: input.mimeType }) : raw;
268
+ form.append('file', blob, input.filename ?? 'menu');
269
+ const res = await this.client.requestRaw('POST', `${BASE}/import/menu/files`, { ...TENANT_AUTH, formData: form, timeoutMs: 60000 });
270
+ return (await res.json());
271
+ }
258
272
  /** `POST /import/menu/apply` — the confirmed items (max 200). */
259
273
  async apply(items, opts = {}) {
260
274
  return this.client.request('POST', `${BASE}/import/menu/apply`, { items, ...opts }, { ...TENANT_AUTH, timeoutMs: 120000 });
package/dist/types.d.ts CHANGED
@@ -1364,6 +1364,21 @@ export interface CatalogMenuReadInput {
1364
1364
  filename?: string;
1365
1365
  mimeType?: string;
1366
1366
  }
1367
+ /** A file the owner attached in their chat (`catalog.import.menu.attach`). */
1368
+ export interface CatalogMenuAttachInput {
1369
+ /** A photo (JPG/PNG/WebP), PDF, .docx, .xlsx, .csv or .txt (≤10 MB). */
1370
+ file: CatalogFileInput;
1371
+ filename?: string;
1372
+ mimeType?: string;
1373
+ }
1374
+ /** Kept 30 min for the assistant: the message carries `[filename](file:<fileId>)`. */
1375
+ export interface CatalogMenuChatFile {
1376
+ fileId: string;
1377
+ filename: string;
1378
+ size: number;
1379
+ /** Epoch ms. */
1380
+ expiresAt: number;
1381
+ }
1367
1382
  export interface CatalogMenuRead {
1368
1383
  items: CatalogMenuItem[];
1369
1384
  source: 'text' | 'image' | 'pdf' | 'document' | 'sheet';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentforge-io/sdk-server",
3
- "version": "4.38.0",
3
+ "version": "4.39.0",
4
4
  "description": "Server-side SDK for backend apps integrating with AgentForge platform. Auth via ChatToken, ak_live_ API key or App secret (sk_live_), with App installations across tenants.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",