@agentforge-io/sdk-server 4.26.0 → 4.27.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/resources/cases.d.ts +6 -0
- package/dist/resources/cases.js +8 -0
- package/dist/types.d.ts +11 -2
- package/package.json +1 -1
|
@@ -21,6 +21,12 @@ export declare class CasesResource {
|
|
|
21
21
|
* when unknown or turned off.
|
|
22
22
|
*/
|
|
23
23
|
receipt(token: string): Promise<CaseReceipt>;
|
|
24
|
+
/**
|
|
25
|
+
* `POST /api/v1/cases/receipts/:token/received` — the customer got it (the
|
|
26
|
+
* receipt's «Ya lo recibí»): completes a case the business took. 400 before
|
|
27
|
+
* it was accepted or once closed. Returns the receipt as it is now.
|
|
28
|
+
*/
|
|
29
|
+
receiptReceived(token: string): Promise<CaseReceipt>;
|
|
24
30
|
/**
|
|
25
31
|
* `GET /api/v1/cases/receipts/:token/image.png` — the receipt as a PNG:
|
|
26
32
|
* `wide` (1200×630, what a shared link previews) or `tall` (1080×1350, to send or save).
|
package/dist/resources/cases.js
CHANGED
|
@@ -48,6 +48,14 @@ class CasesResource {
|
|
|
48
48
|
async receipt(token) {
|
|
49
49
|
return this.client.request('GET', `/api/v1/cases/receipts/${encodeURIComponent(token)}`);
|
|
50
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* `POST /api/v1/cases/receipts/:token/received` — the customer got it (the
|
|
53
|
+
* receipt's «Ya lo recibí»): completes a case the business took. 400 before
|
|
54
|
+
* it was accepted or once closed. Returns the receipt as it is now.
|
|
55
|
+
*/
|
|
56
|
+
async receiptReceived(token) {
|
|
57
|
+
return this.client.request('POST', `/api/v1/cases/receipts/${encodeURIComponent(token)}/received`, {});
|
|
58
|
+
}
|
|
51
59
|
/**
|
|
52
60
|
* `GET /api/v1/cases/receipts/:token/image.png` — the receipt as a PNG:
|
|
53
61
|
* `wide` (1200×630, what a shared link previews) or `tall` (1080×1350, to send or save).
|
package/dist/types.d.ts
CHANGED
|
@@ -1568,8 +1568,10 @@ export interface CaseType {
|
|
|
1568
1568
|
export type CaseState = 'open' | 'review' | 'submitted' | 'accepted' | 'completed' | 'cancelled' | 'rejected' | 'abandoned' | (string & {});
|
|
1569
1569
|
export interface CaseView {
|
|
1570
1570
|
id: string;
|
|
1571
|
-
/** Per workspace,
|
|
1571
|
+
/** Per workspace, sequential (ordering). People read `code`. */
|
|
1572
1572
|
number: number;
|
|
1573
|
+
/** What people read it by ("Pedido #K7Q2XM"): 6 capitals and digits; the number for a case from before codes. */
|
|
1574
|
+
code: string;
|
|
1573
1575
|
conversationId: string;
|
|
1574
1576
|
teamId: string | null;
|
|
1575
1577
|
type: string;
|
|
@@ -1642,6 +1644,10 @@ export interface CaseReceiptLine {
|
|
|
1642
1644
|
*/
|
|
1643
1645
|
export interface CaseReceipt {
|
|
1644
1646
|
token: string;
|
|
1647
|
+
/** What people read it by ("K7Q2XM"); absent on receipts from before codes (use `number`). */
|
|
1648
|
+
code?: string;
|
|
1649
|
+
/** The customer may say they got it now (it is ready or on its way): `cases.receiptReceived`. */
|
|
1650
|
+
receivable: boolean;
|
|
1645
1651
|
/** 1, then +1 each time the customer changed the case and sent it again (same link). */
|
|
1646
1652
|
revision: number;
|
|
1647
1653
|
/** The business's note on its last move ("listo en 20 min", a rejection reason). */
|
|
@@ -1673,6 +1679,7 @@ export interface CaseReceipt {
|
|
|
1673
1679
|
updatedAt: string;
|
|
1674
1680
|
business: {
|
|
1675
1681
|
name: string;
|
|
1682
|
+
description: string | null;
|
|
1676
1683
|
logoUrl: string | null;
|
|
1677
1684
|
primaryColor: string | null;
|
|
1678
1685
|
accentColor: string | null;
|
|
@@ -1712,7 +1719,9 @@ export interface AppWebhookEvent {
|
|
|
1712
1719
|
previousState?: string;
|
|
1713
1720
|
/** `case.customer_request`: the customer asks to change the case (a sent one was reopened) or to cancel an accepted one. */
|
|
1714
1721
|
request?: 'change' | 'cancel';
|
|
1715
|
-
by: 'assistant' | 'business' | 'system';
|
|
1722
|
+
by: 'assistant' | 'business' | 'system' | 'customer';
|
|
1723
|
+
/** What people read it by ("K7Q2XM"). */
|
|
1724
|
+
caseCode?: string;
|
|
1716
1725
|
conversationId: string;
|
|
1717
1726
|
};
|
|
1718
1727
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentforge-io/sdk-server",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.27.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",
|