@agentforge-io/sdk-server 4.57.0 → 4.59.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.
@@ -67,6 +67,13 @@ export declare class CasesResource {
67
67
  */
68
68
  receiptReopen(token: string): Promise<CaseReceipt>;
69
69
  receiptRedoProposal(token: string): Promise<CaseReceipt>;
70
+ /**
71
+ * `POST /api/v1/cases/receipts/:token/cancel` — «Cancelar pedido»: the customer cancels from
72
+ * the receipt while the order is a draft (sent, accepted, being prepared or redone, changes
73
+ * waiting). Its stock goes back. 400 once confirmed or closed; any other case only before the
74
+ * business accepted it.
75
+ */
76
+ receiptCancel(token: string): Promise<CaseReceipt>;
70
77
  /**
71
78
  * `POST /api/v1/cases/:id/transition` — the business moves a case:
72
79
  * `accepted` / `rejected` from `submitted`, then the type's states,
@@ -114,6 +114,15 @@ class CasesResource {
114
114
  async receiptRedoProposal(token) {
115
115
  return this.client.request('POST', `/api/v1/cases/receipts/${encodeURIComponent(token)}/proposal/redo`, {});
116
116
  }
117
+ /**
118
+ * `POST /api/v1/cases/receipts/:token/cancel` — «Cancelar pedido»: the customer cancels from
119
+ * the receipt while the order is a draft (sent, accepted, being prepared or redone, changes
120
+ * waiting). Its stock goes back. 400 once confirmed or closed; any other case only before the
121
+ * business accepted it.
122
+ */
123
+ async receiptCancel(token) {
124
+ return this.client.request('POST', `/api/v1/cases/receipts/${encodeURIComponent(token)}/cancel`, {});
125
+ }
117
126
  /**
118
127
  * `POST /api/v1/cases/:id/transition` — the business moves a case:
119
128
  * `accepted` / `rejected` from `submitted`, then the type's states,
package/dist/types.d.ts CHANGED
@@ -1126,6 +1126,8 @@ export interface CatalogProduct {
1126
1126
  sortOrder: number;
1127
1127
  origin?: string;
1128
1128
  externalId?: string | null;
1129
+ /** AGF-PRODUCT-SKU — the business's inventory code (SKU, barcode number), unique in the catalog; null = none. */
1130
+ sku?: string | null;
1129
1131
  kind: CatalogProductKind;
1130
1132
  status: CatalogProductStatus;
1131
1133
  priceKind: CatalogPriceKind;
@@ -1162,6 +1164,9 @@ export interface CreateCatalogProductInput {
1162
1164
  stock?: number | null;
1163
1165
  categoryId?: string | null;
1164
1166
  isAvailable?: boolean;
1167
+ /** AGF-PRODUCT-SKU — the inventory code, max 64 chars (trimmed; null or '' clears it).
1168
+ * 409 SKU_CONFLICT when another product of the catalog has it. */
1169
+ sku?: string | null;
1165
1170
  kind?: CatalogProductKind;
1166
1171
  status?: CatalogProductStatus;
1167
1172
  priceKind?: CatalogPriceKind;
@@ -2308,6 +2313,8 @@ export interface CaseReceiptLine {
2308
2313
  productId?: string;
2309
2314
  /** The product's cover photo, when it has one. */
2310
2315
  coverUrl?: string;
2316
+ /** AGF-PRODUCT-SKU — the product's inventory code as it is now (absent: none, or an older platform). */
2317
+ sku?: string;
2311
2318
  }
2312
2319
  /** AGF-PDK-DISPATCH-PROPOSAL — one change to a line: out of stock, or swapped for another product. */
2313
2320
  export interface CaseProposalChange {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentforge-io/sdk-server",
3
- "version": "4.57.0",
3
+ "version": "4.59.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",