@agentforge-io/sdk-server 4.80.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;
@@ -2633,6 +2636,10 @@ export interface CaseReceiptLine {
2633
2636
  unit?: string;
2634
2637
  /** AGF-UNITS U2 — sold by measure: `qty` is in `unit` (0.75 lb), not a count of items. */
2635
2638
  measured?: boolean;
2639
+ /** PDK-SERVICE-CART — the line is a service. Absent: a product, a receipt issued before, or an older platform. */
2640
+ kind?: 'service';
2641
+ /** PDK-SERVICE-CART — a service charged by a unit: `unitCents` is its rate, never an amount; the business confirms the price (the total is null). */
2642
+ rate?: true;
2636
2643
  /** AGF-UNITS U3 — sold by value: the line costs this (cents); `qty` is the measure it buys (an estimate). */
2637
2644
  amountCents?: number;
2638
2645
  /** A value line the business can weigh: pass it to `cases.weighLine`. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentforge-io/sdk-server",
3
- "version": "4.80.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",