@agentforge-io/sdk-server 4.59.0 → 4.60.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.
Files changed (2) hide show
  1. package/dist/types.d.ts +12 -1
  2. package/package.json +1 -1
package/dist/types.d.ts CHANGED
@@ -2316,6 +2316,11 @@ export interface CaseReceiptLine {
2316
2316
  /** AGF-PRODUCT-SKU — the product's inventory code as it is now (absent: none, or an older platform). */
2317
2317
  sku?: string;
2318
2318
  }
2319
+ /** One option group's choice on a proposed alternative: the group and what was picked in it (ids, or names). */
2320
+ export interface CaseProposalSwapOption {
2321
+ group: string;
2322
+ options: string[];
2323
+ }
2319
2324
  /** AGF-PDK-DISPATCH-PROPOSAL — one change to a line: out of stock, or swapped for another product. */
2320
2325
  export interface CaseProposalChange {
2321
2326
  /** The receipt line's `key`. */
@@ -2332,8 +2337,12 @@ export interface CaseProposalChange {
2332
2337
  unitCents: number | null;
2333
2338
  currency: string;
2334
2339
  coverUrl: string | null;
2335
- /** What it costs for the line's quantity; null when that cannot be said. */
2340
+ /** What it costs for the line's quantity, options included; null when that cannot be said. */
2336
2341
  amountCents: number | null;
2342
+ /** The choice made on the alternative (group id → option ids). Absent: none, or an older platform. */
2343
+ options?: CaseProposalSwapOption[];
2344
+ /** The choice as the customer reads it («Arroz, Sin cebolla»). */
2345
+ optionsLabel?: string;
2337
2346
  };
2338
2347
  /** The answer to an alternative (an out-of-stock line is always `drop`); absent while pending. */
2339
2348
  answer?: 'keep' | 'drop';
@@ -2365,8 +2374,10 @@ export interface CaseProposalInput {
2365
2374
  out: true;
2366
2375
  } | {
2367
2376
  line: string;
2377
+ /** `options`: required when the alternative has a required option group (refused at propose time otherwise). */
2368
2378
  swap: {
2369
2379
  productId: string;
2380
+ options?: CaseProposalSwapOption[];
2370
2381
  };
2371
2382
  }>;
2372
2383
  /** Words for the customer (≤ 500). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentforge-io/sdk-server",
3
- "version": "4.59.0",
3
+ "version": "4.60.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",