@agentforge-io/sdk-server 4.32.0 → 4.33.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 +1 -1
- package/dist/resources/chat.d.ts +2 -0
- package/dist/resources/places.d.ts +3 -1
- package/dist/resources/places.js +6 -0
- package/dist/types.d.ts +38 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export type { AgentForgeClientOptions, RequestOptions } from './client';
|
|
|
3
3
|
export { AgentForgeError, AgentForgeAuthError, AgentForgeNotFoundError, AgentForgeNetworkError, } from './errors';
|
|
4
4
|
export { APP_WEBHOOK_HEADERS, TOOL_CALLBACK_HEADERS, ToolCallbackSignatureError, signToolCallbackPayload, verifyAppWebhook, verifyToolCallbackSignature, } from './webhooks';
|
|
5
5
|
export { WebhookResource, type SetAppWebhookInput } from './resources/webhook';
|
|
6
|
-
export type { AppWebhook, AppWebhookEvent, AppWebhookEventName, AgentMe, AgentSummary, AppUserConnectorStatus, ApprovalCopyBundle, ChannelContext, ChatStreamChunk, ChatStreamEvent, ChatTokenRecord, ConnectorDefaultsResult, ConnectorDefaultsSource, ConnectorResourceItem, ConnectorStatus, ConnectorToolInfo, ConversationHistory, ConversationStatus, CreateAgentInput, CreateClickupTaskInput, CreateClickupTaskResult, ExternalToolSummary, IssueChatTokenInput, ListAgentsResult, ListConnectorResourcesResult, McpServerConfig, MessageRecord, MessageRole, PublicAppBranding, PublicProfileBlock, PublicProfileTemplate, PublicTeamLanding, CreateTeamInput, UpdateTeamInput, TeamSummary, TeamDetail, TeamTheme, TeamBusinessHours, TeamWeekday, TeamProfileBlock, AppInstallation, TemplateConfigField, TemplateSummary, TemplateDetail, TemplateCategoryRef, MarketplaceCategory, MarketplaceCategoryGroup, MarketplaceLocale, TemplateInstallResult, TenantConfigEntry, Place, PlaceSuggestion, SearchPlacesInput, AutocompletePlacesInput, CaseField, CaseBusinessState, CaseType, CaseState, CasePayment, CasePaymentAccount, CasePaymentStatus, CaseReceiptPayment, CaseView, CreateDirectOrderInput, DirectOrderForm, CaseReceipt, CaseReceiptLine, ListCasesInput, AddressValue, DeliveryLocalPricing, DeliverySettings, PaymentMethodKind, PaymentSettings, PaymentSettingsInput, PaymentAccount, PaymentCountry, PaymentFieldDef, PaymentMethodDef, StructuredConfigInput, StructuredConfigEntry, DeliveryQuoteStatus, DeliveryQuoteInput, DeliveryQuote, AppSelf, AppSelfConnector, AppSelfConnectors, AppSelfConnectorTools, AppSelfConnectorToolsResponse, RegisterToolInput, RegisterToolsInput, BusinessRoleEntry, Catalog, CatalogCheckoutCta, CatalogCategory, CatalogProduct, CatalogProductPhoto, CatalogProductKind, CatalogProductStatus, CatalogPriceKind, CatalogAvailability, CatalogLockableField, CatalogProductPage, UpsertCatalogInput, CreateCatalogCategoryInput, UpdateCatalogCategoryInput, CreateCatalogProductInput, UpdateCatalogProductInput, ListCatalogProductsInput, CatalogPhotoUploadTarget, SignCatalogPhotoUploadInput, AttachCatalogPhotoInput, CatalogImportItem, CatalogImportPreview, CatalogImportApplyResult, CatalogFileMapping, CatalogFilePlan, CatalogFilePreview, CatalogFileApplyResult, CatalogFileInput, CatalogFilePreviewInput, CatalogFileApplyInput, CatalogFileErrorCode, CatalogImportSourceStatus, CatalogImportColumnMapping, CatalogImportRunResult, CatalogImportSource, CreateCatalogImportSourceInput, UpdateCatalogImportSourceInput, PreviewCatalogImportSourceInput, CatalogImportSourcePreview, CatalogSheetTab, CatalogTemplateSheet, CreateCatalogTemplateSheetInput, GoogleSheetsPickerInput, GoogleSheetsPickerSession, GoogleSheetsPickerErrorCode, GoogleSheetsPickerResult, RegisterToolsResult, ToolCallbackPayload, ToolCallRecord, ToolPermission, ToolPermissionMode, TokenUsage, TenantSecretEntry, UpdateAgentInput, InboxThreadMode, InboxMessageDirection, InboxMessageSource, InboxMessageType, InboxThreadCustomerProfileView, InboxThreadView, InboxMessageView, SupportKpiTotals, SupportKpiResponse, AgentAttentionLogRow, } from './types';
|
|
6
|
+
export type { AppWebhook, AppWebhookEvent, AppWebhookEventName, AgentMe, AgentSummary, AppUserConnectorStatus, ApprovalCopyBundle, ChannelContext, ChatStreamChunk, ChatStreamEvent, ChatTokenRecord, ConnectorDefaultsResult, ConnectorDefaultsSource, ConnectorResourceItem, ConnectorStatus, ConnectorToolInfo, ConversationHistory, ConversationStatus, CreateAgentInput, CreateClickupTaskInput, CreateClickupTaskResult, ExternalToolSummary, IssueChatTokenInput, ListAgentsResult, ListConnectorResourcesResult, McpServerConfig, MessageRecord, MessageRole, PublicAppBranding, PublicProfileBlock, PublicProfileTemplate, PublicTeamLanding, CreateTeamInput, UpdateTeamInput, TeamSummary, TeamDetail, TeamTheme, TeamBusinessHours, TeamWeekday, TeamProfileBlock, AppInstallation, TemplateConfigField, TemplateSummary, TemplateDetail, TemplateCategoryRef, MarketplaceCategory, MarketplaceCategoryGroup, MarketplaceLocale, TemplateInstallResult, TenantConfigEntry, Place, PlaceSuggestion, SearchPlacesInput, AutocompletePlacesInput, PlacesScope, CaseField, CaseBusinessState, CaseType, CaseState, CasePayment, CasePaymentAccount, CasePaymentStatus, CaseReceiptPayment, CaseView, CreateDirectOrderInput, DirectOrderForm, CaseReceipt, CaseReceiptLine, ListCasesInput, AddressValue, DeliveryLocalPricing, DeliverySettings, PaymentMethodKind, PaymentSettings, PaymentSettingsInput, PaymentAccount, PaymentCountry, PaymentFieldDef, PaymentMethodDef, StructuredConfigInput, StructuredConfigEntry, DeliveryQuoteStatus, DeliveryQuoteInput, DeliveryQuote, AppSelf, AppSelfConnector, AppSelfConnectors, AppSelfConnectorTools, AppSelfConnectorToolsResponse, RegisterToolInput, RegisterToolsInput, BusinessRoleEntry, Catalog, CatalogCheckoutCta, CatalogCategory, CatalogProduct, CatalogProductPhoto, CatalogProductKind, CatalogProductStatus, CatalogPriceKind, CatalogAvailability, CatalogLockableField, CatalogProductPage, UpsertCatalogInput, CreateCatalogCategoryInput, UpdateCatalogCategoryInput, CreateCatalogProductInput, UpdateCatalogProductInput, ListCatalogProductsInput, CatalogPhotoUploadTarget, SignCatalogPhotoUploadInput, AttachCatalogPhotoInput, CatalogImportItem, CatalogImportPreview, CatalogImportApplyResult, CatalogFileMapping, CatalogFilePlan, CatalogFilePreview, CatalogFileApplyResult, CatalogFileInput, CatalogFilePreviewInput, CatalogFileApplyInput, CatalogFileErrorCode, CatalogImportSourceStatus, CatalogImportColumnMapping, CatalogImportRunResult, CatalogImportSource, CreateCatalogImportSourceInput, UpdateCatalogImportSourceInput, PreviewCatalogImportSourceInput, CatalogImportSourcePreview, CatalogSheetTab, CatalogTemplateSheet, CreateCatalogTemplateSheetInput, GoogleSheetsPickerInput, GoogleSheetsPickerSession, GoogleSheetsPickerErrorCode, GoogleSheetsPickerResult, RegisterToolsResult, ToolCallbackPayload, ToolCallRecord, ToolPermission, ToolPermissionMode, TokenUsage, TenantSecretEntry, UpdateAgentInput, InboxThreadMode, InboxMessageDirection, InboxMessageSource, InboxMessageType, InboxThreadCustomerProfileView, InboxThreadView, InboxMessageView, SupportKpiTotals, SupportKpiResponse, AgentAttentionLogRow, } from './types';
|
|
7
7
|
export { AgentsResource } from './resources/agents';
|
|
8
8
|
export { AnalyticsResource } from './resources/analytics';
|
|
9
9
|
export type { GetSupportKpisInput, GetAgentAttentionLogInput, } from './resources/analytics';
|
package/dist/resources/chat.d.ts
CHANGED
|
@@ -71,6 +71,8 @@ export interface AppCallerClaims {
|
|
|
71
71
|
/** Where the person is, in the App's words — e.g. the reference of a
|
|
72
72
|
* scanned QR code (`mesa-03`). */
|
|
73
73
|
location?: string;
|
|
74
|
+
/** The delivery address the person chose in the App; the assistant offers it instead of asking (AGF-CUSTOMER-WHERE). */
|
|
75
|
+
deliveryAddress?: string;
|
|
74
76
|
}
|
|
75
77
|
export declare class ChatResource {
|
|
76
78
|
private readonly client;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AgentForgeClient } from '../client';
|
|
2
|
-
import type { AutocompletePlacesInput, Place, PlaceSuggestion, SearchPlacesInput } from '../types';
|
|
2
|
+
import type { AutocompletePlacesInput, Place, PlaceSuggestion, PlacesScope, SearchPlacesInput } from '../types';
|
|
3
3
|
export declare class PlacesResource {
|
|
4
4
|
private readonly client;
|
|
5
5
|
constructor(client: AgentForgeClient);
|
|
@@ -8,6 +8,8 @@ export declare class PlacesResource {
|
|
|
8
8
|
* (AGF-GEO-GOOGLE). Pick one with `details` and the same `sessionToken`.
|
|
9
9
|
*/
|
|
10
10
|
autocomplete(input: AutocompletePlacesInput): Promise<PlaceSuggestion[]>;
|
|
11
|
+
/** `GET /api/v1/places/scope` — where this business's customers' addresses are searched (AGF-GEO-SCOPE). */
|
|
12
|
+
scope(): Promise<PlacesScope>;
|
|
11
13
|
/** `GET /api/v1/places/details/:placeId` — the picked suggestion with its point; null when the id is unknown. */
|
|
12
14
|
details(placeId: string, opts?: {
|
|
13
15
|
sessionToken?: string;
|
package/dist/resources/places.js
CHANGED
|
@@ -20,9 +20,15 @@ class PlacesResource {
|
|
|
20
20
|
qs.set('near', `${input.near.lat},${input.near.lng}`);
|
|
21
21
|
if (input.language)
|
|
22
22
|
qs.set('language', input.language);
|
|
23
|
+
if (input.area)
|
|
24
|
+
qs.set('area', input.area);
|
|
23
25
|
const res = await this.client.request('GET', `/api/v1/places/autocomplete?${qs.toString()}`);
|
|
24
26
|
return res.items;
|
|
25
27
|
}
|
|
28
|
+
/** `GET /api/v1/places/scope` — where this business's customers' addresses are searched (AGF-GEO-SCOPE). */
|
|
29
|
+
async scope() {
|
|
30
|
+
return this.client.request('GET', '/api/v1/places/scope');
|
|
31
|
+
}
|
|
26
32
|
/** `GET /api/v1/places/details/:placeId` — the picked suggestion with its point; null when the id is unknown. */
|
|
27
33
|
async details(placeId, opts = {}) {
|
|
28
34
|
const qs = new URLSearchParams();
|
package/dist/types.d.ts
CHANGED
|
@@ -1449,6 +1449,35 @@ export interface AutocompletePlacesInput {
|
|
|
1449
1449
|
lng: number;
|
|
1450
1450
|
};
|
|
1451
1451
|
language?: string;
|
|
1452
|
+
/**
|
|
1453
|
+
* AGF-GEO-SCOPE: 'local' (default) = only inside the business's area (see
|
|
1454
|
+
* `places.scope()`); 'country' = all of it, nearest to the business first —
|
|
1455
|
+
* for the owner setting the address itself, or a customer of a business
|
|
1456
|
+
* that ships nationally (`scope.canWiden`).
|
|
1457
|
+
*/
|
|
1458
|
+
area?: 'local' | 'country';
|
|
1459
|
+
}
|
|
1460
|
+
/** Where a business's customers' addresses are searched (`places.scope()`, AGF-GEO-SCOPE). */
|
|
1461
|
+
export interface PlacesScope {
|
|
1462
|
+
/** The business address: the center of every search. */
|
|
1463
|
+
origin?: {
|
|
1464
|
+
lat: number;
|
|
1465
|
+
lng: number;
|
|
1466
|
+
};
|
|
1467
|
+
/** The business address as text: where a pickup is. */
|
|
1468
|
+
address?: string;
|
|
1469
|
+
city?: string;
|
|
1470
|
+
/** Department / state. */
|
|
1471
|
+
region?: string;
|
|
1472
|
+
country?: string;
|
|
1473
|
+
/** Searches stay within this distance of the origin; null = the whole country. */
|
|
1474
|
+
areaKm: number | null;
|
|
1475
|
+
/** It delivers locally (up to its radius). */
|
|
1476
|
+
local: boolean;
|
|
1477
|
+
/** It ships anywhere in the country. */
|
|
1478
|
+
national: boolean;
|
|
1479
|
+
/** A customer may search outside the area (`area: 'country'`). */
|
|
1480
|
+
canWiden: boolean;
|
|
1452
1481
|
}
|
|
1453
1482
|
/** A geocoded address: a confirmed pin, never static text. */
|
|
1454
1483
|
export interface AddressValue {
|
|
@@ -1707,6 +1736,8 @@ export interface CaseView {
|
|
|
1707
1736
|
customerName: string | null;
|
|
1708
1737
|
/** AGF-ORDER-WITHOUT-AI — the phone given at checkout (orders placed without the chat). */
|
|
1709
1738
|
customerPhone: string | null;
|
|
1739
|
+
/** Where in the business the customer ordered from («Mesa 2», a scanned code). */
|
|
1740
|
+
customerPlace?: string | null;
|
|
1710
1741
|
/** The road the business walks it: sent, accepted, the type's own phases, completed. */
|
|
1711
1742
|
path: Array<{
|
|
1712
1743
|
key: string;
|
|
@@ -1873,7 +1904,13 @@ export interface CaseReceipt {
|
|
|
1873
1904
|
* checkout on the host App. Created already sent (holds, receipt, `case.submitted`).
|
|
1874
1905
|
*/
|
|
1875
1906
|
export interface CreateDirectOrderInput {
|
|
1876
|
-
/** Who orders: the App's visitor id, and the name and phone they gave (both required). */
|
|
1907
|
+
/** Who orders: the App's visitor id, and the name and phone they gave (both required unless `place`). */
|
|
1908
|
+
/**
|
|
1909
|
+
* AGF-CUSTOMER-WHERE: where in the business the customer is («Mesa 2»),
|
|
1910
|
+
* from a code your server resolved — never text the customer typed. With
|
|
1911
|
+
* it, `customer.name` and `customer.phone` may be '' (optional at a table).
|
|
1912
|
+
*/
|
|
1913
|
+
place?: string;
|
|
1877
1914
|
customer: {
|
|
1878
1915
|
ref: string;
|
|
1879
1916
|
name: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentforge-io/sdk-server",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.33.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",
|