@agentforge-io/sdk-server 4.81.0 → 4.82.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
@@ -33,7 +33,7 @@ export { DeliveryResource } from './resources/delivery';
33
33
  export { CasesResource } from './resources/cases';
34
34
  export { BusinessRolesResource } from './resources/business-roles';
35
35
  export { CatalogResource, CatalogCategoriesResource, CatalogProductsResource, CatalogProductReviewsResource, CatalogProductLikesResource, CatalogReviewsResource, CatalogPhotosResource, CatalogImportResource, CatalogFileImportResource, CatalogMenuImportResource, CatalogOptionGroupsResource, CatalogUnitsResource, CatalogSourcesResource, AgentForgeCatalogImportLimitError, CATALOG_IMPORT_MAX_ITEMS, } from './resources/catalog';
36
- export type { ListThreadsOptions, ListNewestMessagesOptions, NewestMessagesPage, SendMessageInput, AssignThreadInput, UnassignThreadInput, SetThreadModeInput, CloseThreadInput, } from './resources/inbox';
36
+ export type { ListThreadsOptions, ListNewestMessagesOptions, NewestMessagesPage, SendMessageInput, InboxOperatorAttachment, InboxAttachmentKind, AssignThreadInput, UnassignThreadInput, SetThreadModeInput, CloseThreadInput, } from './resources/inbox';
37
37
  export { ProvisioningResource } from './resources/provisioning';
38
38
  export type { ProvisionedTenant, ProvisionedApp, ProvisionedTeam, } from './resources/provisioning';
39
39
  export { SecretsResource } from './resources/secrets';
@@ -18,9 +18,30 @@ export interface NewestMessagesPage {
18
18
  /** Absent on the last page. */
19
19
  nextCursor?: string;
20
20
  }
21
+ /** What a WhatsApp number can carry: image jpeg/png/webp up to 5 MB, document pdf/doc(x)/xls(x)/ppt(x)/txt, video mp4/3gp up to 16 MB. */
22
+ export type InboxAttachmentKind = 'image' | 'document' | 'audio' | 'video';
23
+ /**
24
+ * A file the operator sends. `key` is the `key` that `files.signUpload` returned for a file
25
+ * uploaded in this tenant (`apps/<appId>/tenants/<tenantId>/files/…`): never a URL.
26
+ * Errors: 403 `attachment_not_owned`; 400 `attachment_not_sendable`, `attachment_type_mismatch`,
27
+ * `attachment_caption_too_long`.
28
+ */
29
+ export interface InboxOperatorAttachment {
30
+ key: string;
31
+ kind: InboxAttachmentKind;
32
+ /** Must match the file that was uploaded. */
33
+ mimeType: string;
34
+ fileName?: string;
35
+ /** ≤ 1024 characters. Give it here OR as `text`, never both. */
36
+ caption?: string;
37
+ /** Checked against the channel's cap when sent. */
38
+ sizeBytes?: number;
39
+ }
21
40
  export interface SendMessageInput {
22
- /** The operator's text. */
23
- text: string;
41
+ /** The operator's text. Optional when `attachment` is given (then use `attachment.caption`). */
42
+ text?: string;
43
+ /** One file. `text` and `attachment.caption` together are refused. */
44
+ attachment?: InboxOperatorAttachment;
24
45
  /** Default true. Toggle off when the operator wants to chime in
25
46
  * without taking the thread away from the agent. */
26
47
  pauseAgent?: boolean;
package/dist/types.d.ts CHANGED
@@ -525,6 +525,9 @@ export interface ToolCallbackPayload {
525
525
  tenantId: string;
526
526
  agentId: string;
527
527
  conversationId: string;
528
+ /** The inbox thread of the turn, when the tool ran on an inbox turn.
529
+ * Absent otherwise (and on an older platform). */
530
+ threadId?: string;
528
531
  /** The App's end user of that turn, when the tool ran on the App-user
529
532
  * chat path (`chat.streamMessageForAppUser`). Absent otherwise. */
530
533
  externalUserId?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentforge-io/sdk-server",
3
- "version": "4.81.0",
3
+ "version": "4.82.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",