@agentforge-io/sdk-server 4.50.0 → 4.51.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
|
@@ -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, TemplateReview, TemplateRatingSummary, TemplateReviewsPage, BusinessReview, BusinessReviewsPage, ListTemplateReviewsInput, SaveTemplateReviewInput, TemplateReportKind, CreateTemplateReportInput, TenantConfigEntry, Place, PlaceSuggestion, SearchPlacesInput, AutocompletePlacesInput, PlacesScope, CaseField, CaseBusinessState, CaseType, CaseState, CasePayment, CasePaymentAccount, CasePaymentStatus, CaseReceiptPayment, CaseDestination, CaseView, CaseStateStep, CreateDirectOrderInput, CreateDirectBookingInput, MoveCaseSlotInput, CaseSlot, CatalogAttendedAt, CatalogBookingRule, CaseOrigin, CaseOriginChannel, DirectOrderForm, DirectPaymentOption, CaseClosingMethod, CaseClosingOrder, CaseClosingReport, 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, CatalogMenuItem, CatalogMenuRead, CatalogMenuReadInput, CatalogMenuAttachInput, CatalogMenuChatFile, CatalogMenuKeepInSyncInput, CatalogMenuKeepInSyncResult, CatalogOption, CatalogOptionGroup, SaveCatalogOptionGroupInput, CatalogOptionChoice, CatalogOptionChange, CatalogOptionChangesPlan, CatalogUnit, SaveCatalogUnitInput, CatalogSaleRule, 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, TemplateReview, TemplateRatingSummary, TemplateReviewsPage, BusinessReview, BusinessReviewsPage, ListTemplateReviewsInput, SaveTemplateReviewInput, TemplateReportKind, CreateTemplateReportInput, TenantConfigEntry, Place, PlaceSuggestion, SearchPlacesInput, AutocompletePlacesInput, PlacesScope, CaseField, CaseBusinessState, CaseType, CaseState, CasePayment, CasePaymentAccount, CasePaymentStatus, CaseReceiptPayment, CaseDestination, CaseView, CaseStateStep, CreateDirectOrderInput, CreateDirectBookingInput, MoveCaseSlotInput, CaseSlot, CatalogAttendedAt, CatalogBookingRule, CaseOrigin, CaseOriginChannel, DirectOrderForm, DirectPaymentOption, CaseClosingMethod, CaseClosingOrder, CaseClosingReport, CaseReceipt, CaseReceiptLine, ListCasesInput, AddressValue, DeliveryLocalPricing, DeliverySettings, PaymentMethodKind, PaymentSettings, PaymentSettingsInput, PaymentAccount, PaymentCountry, PaymentFieldDef, PaymentMethodDef, StructuredConfigInput, StructuredConfigEntry, DeliveryQuoteStatus, DeliveryQuoteInput, DeliveryRoute, DeliveryRouteInput, 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, CatalogMenuItem, CatalogMenuRead, CatalogMenuReadInput, CatalogMenuAttachInput, CatalogMenuChatFile, CatalogMenuKeepInSyncInput, CatalogMenuKeepInSyncResult, CatalogOption, CatalogOptionGroup, SaveCatalogOptionGroupInput, CatalogOptionChoice, CatalogOptionChange, CatalogOptionChangesPlan, CatalogUnit, SaveCatalogUnitInput, CatalogSaleRule, 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';
|
|
@@ -66,6 +66,13 @@ export declare class CasesResource {
|
|
|
66
66
|
* duration. A retried `idempotencyKey` returns the same booking.
|
|
67
67
|
*/
|
|
68
68
|
createDirectBooking(input: CreateDirectBookingInput): Promise<CaseView>;
|
|
69
|
+
/**
|
|
70
|
+
* `POST /api/v1/cases/:id/notice` — AGF-DELIVERY: tells the customer something through the
|
|
71
|
+
* conversation's channel. The same `key` never says it twice.
|
|
72
|
+
*/
|
|
73
|
+
notice(caseId: string, text: string, key: string): Promise<{
|
|
74
|
+
result: string;
|
|
75
|
+
}>;
|
|
69
76
|
/**
|
|
70
77
|
* `POST /api/v1/cases/:id/assign` — AGF-AGENDA: who of the business attends any
|
|
71
78
|
* open request (your member reference), or null to leave it unassigned.
|
package/dist/resources/cases.js
CHANGED
|
@@ -109,6 +109,13 @@ class CasesResource {
|
|
|
109
109
|
async createDirectBooking(input) {
|
|
110
110
|
return this.client.request('POST', '/api/v1/cases/bookings', input);
|
|
111
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* `POST /api/v1/cases/:id/notice` — AGF-DELIVERY: tells the customer something through the
|
|
114
|
+
* conversation's channel. The same `key` never says it twice.
|
|
115
|
+
*/
|
|
116
|
+
async notice(caseId, text, key) {
|
|
117
|
+
return this.client.request('POST', `/api/v1/cases/${encodeURIComponent(caseId)}/notice`, { text, key });
|
|
118
|
+
}
|
|
112
119
|
/**
|
|
113
120
|
* `POST /api/v1/cases/:id/assign` — AGF-AGENDA: who of the business attends any
|
|
114
121
|
* open request (your member reference), or null to leave it unassigned.
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import type { AgentForgeClient } from '../client';
|
|
2
|
-
import type { DeliveryQuote, DeliveryQuoteInput } from '../types';
|
|
2
|
+
import type { DeliveryQuote, DeliveryQuoteInput, DeliveryRoute, DeliveryRouteInput } from '../types';
|
|
3
3
|
export declare class DeliveryResource {
|
|
4
4
|
private readonly client;
|
|
5
5
|
constructor(client: AgentForgeClient);
|
|
6
6
|
/** `POST /api/v1/delivery/quote` — 404 when the workspace has no delivery settings. */
|
|
7
7
|
quote(input: DeliveryQuoteInput): Promise<DeliveryQuote>;
|
|
8
|
+
/**
|
|
9
|
+
* `POST /api/v1/delivery/route` — the road through some stops, from `from` (else the
|
|
10
|
+
* business), to draw on a Google map (Google's terms bar other maps). Google orders the
|
|
11
|
+
* stops in between. `route` is null when there is no road.
|
|
12
|
+
*/
|
|
13
|
+
route(input: DeliveryRouteInput): Promise<DeliveryRoute>;
|
|
8
14
|
}
|
|
@@ -12,5 +12,13 @@ class DeliveryResource {
|
|
|
12
12
|
async quote(input) {
|
|
13
13
|
return this.client.request('POST', '/api/v1/delivery/quote', input);
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* `POST /api/v1/delivery/route` — the road through some stops, from `from` (else the
|
|
17
|
+
* business), to draw on a Google map (Google's terms bar other maps). Google orders the
|
|
18
|
+
* stops in between. `route` is null when there is no road.
|
|
19
|
+
*/
|
|
20
|
+
async route(input) {
|
|
21
|
+
return this.client.request('POST', '/api/v1/delivery/route', input);
|
|
22
|
+
}
|
|
15
23
|
}
|
|
16
24
|
exports.DeliveryResource = DeliveryResource;
|
package/dist/types.d.ts
CHANGED
|
@@ -1965,6 +1965,35 @@ export type StructuredConfigEntry = ({
|
|
|
1965
1965
|
updatedAt: string;
|
|
1966
1966
|
};
|
|
1967
1967
|
export type DeliveryQuoteStatus = 'free' | 'paid' | 'national' | 'pickup_only' | 'out_of_coverage' | 'no_delivery' | 'needs_confirmation';
|
|
1968
|
+
export interface DeliveryRouteInput {
|
|
1969
|
+
/** Where the courier is now; default: the business. */
|
|
1970
|
+
from?: {
|
|
1971
|
+
lat: number;
|
|
1972
|
+
lng: number;
|
|
1973
|
+
};
|
|
1974
|
+
stops: Array<{
|
|
1975
|
+
lat: number;
|
|
1976
|
+
lng: number;
|
|
1977
|
+
}>;
|
|
1978
|
+
}
|
|
1979
|
+
/** The road through some stops. `order`: the stops' indexes as driven; `legs` the same way. */
|
|
1980
|
+
export interface DeliveryRoute {
|
|
1981
|
+
origin: {
|
|
1982
|
+
lat: number;
|
|
1983
|
+
lng: number;
|
|
1984
|
+
formatted: string;
|
|
1985
|
+
} | null;
|
|
1986
|
+
route: {
|
|
1987
|
+
distanceMeters: number;
|
|
1988
|
+
durationSeconds: number;
|
|
1989
|
+
polyline: string;
|
|
1990
|
+
order: number[];
|
|
1991
|
+
legs: Array<{
|
|
1992
|
+
distanceMeters: number;
|
|
1993
|
+
durationSeconds: number;
|
|
1994
|
+
}>;
|
|
1995
|
+
} | null;
|
|
1996
|
+
}
|
|
1968
1997
|
export interface DeliveryQuoteInput {
|
|
1969
1998
|
/** What the customer typed… */
|
|
1970
1999
|
address?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentforge-io/sdk-server",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.51.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",
|