@agentforge-io/sdk-server 4.65.0 → 4.67.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, AgentForgeDuplicateContactError, } 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, AppCaseWebhookEvent, AppCaseWebhookEventName, AppConversationMessageWebhookEvent, AppChannelStatusWebhookEvent, 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, TemplateInstallStats, TemplatePublisher, TemplateAuthor, AppTemplatePolicy, TemplateCategoryRef, MarketplaceCategory, MarketplaceCategoryGroup, MarketplaceLocale, TemplateInstallResult, UpsertSystemTemplateInput, UpsertSystemTemplateResult, TemplateReview, TemplateRatingSummary, TemplateReviewsPage, BusinessReview, BusinessReviewsPage, ProductRatingSummary, ProductReview, ProductReviewOwner, ProductReviewsPage, ProductReviewsOwnerPage, ListProductReviewsInput, ListProductReviewsForOwnerInput, HideProductReviewInput, ProductLikeResult, ReceiptReviewable, ReceiptReviewables, SaveReceiptReviewInput, ListTemplateReviewsInput, SaveTemplateReviewInput, TemplateReportKind, CreateTemplateReportInput, TenantConfigEntry, Place, PlaceSuggestion, SearchPlacesInput, AutocompletePlacesInput, PlacesScope, CaseField, CaseBusinessState, CaseType, CaseState, CaseStateType, CasePayment, CasePaymentAccount, CasePaymentStatus, CaseReceiptPayment, CaseDestination, CaseView, CaseStateStep, CreateDirectOrderInput, CreateDirectBookingInput, MoveCaseSlotInput, CaseSlot, CatalogAttendedAt, CatalogBookingRule, CaseOrigin, CaseOriginChannel, DirectOrderForm, DirectPaymentOption, CaseClosingMethod, CaseClosingOrder, CaseClosingReport, CaseReportPage, CaseReceipt, CaseReceiptLine, CaseProposal, CaseProposalAnswer, CaseProposalChange, CaseProposalInput, ListCasesInput, AddressValue, DeliveryLocalPricing, DeliverySettings, PaymentMethodKind, PaymentSettings, PaymentSettingsInput, PaymentAccount, PaymentCountry, PaymentFieldDef, PaymentMethodDef, StructuredConfigInput, StructuredConfigEntry, DeliveryQuoteStatus, DeliveryQuoteInput, DeliveryRoute, DeliveryRouteInput, DeliveryQuote, AppSelf, AppOwner, 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, AttachCatalogCategoryImageInput, 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, AppCaseWebhookEvent, AppCaseWebhookEventName, AppConversationMessageWebhookEvent, AppChannelStatusWebhookEvent, 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, TemplateInstallStats, TemplatePublisher, TemplateAuthor, AppTemplatePolicy, TemplateCategoryRef, MarketplaceCategory, MarketplaceCategoryGroup, MarketplaceLocale, TemplateInstallResult, UpsertSystemTemplateInput, UpsertSystemTemplateResult, TemplateReview, TemplateRatingSummary, TemplateReviewsPage, BusinessReview, BusinessReviewsPage, ProductRatingSummary, ProductReview, ProductReviewOwner, ProductReviewsPage, ProductReviewsOwnerPage, ListProductReviewsInput, ListProductReviewsForOwnerInput, HideProductReviewInput, ProductLikeResult, ReceiptReviewable, ReceiptReviewables, SaveReceiptReviewInput, ListTemplateReviewsInput, SaveTemplateReviewInput, TemplateReportKind, CreateTemplateReportInput, TenantConfigEntry, Place, PlaceSuggestion, SearchPlacesInput, AutocompletePlacesInput, PlacesScope, CaseField, CaseBusinessState, CaseType, CaseState, CaseStateType, CasePayment, CasePaymentAccount, CasePaymentStatus, CaseReceiptPayment, CaseDestination, CaseView, CaseStateStep, CreateDirectOrderInput, CreateDirectBookingInput, MoveCaseSlotInput, CaseSlot, CatalogAttendedAt, CatalogBookingRule, CaseOrigin, CaseOriginChannel, DirectOrderForm, DirectPaymentOption, CaseClosingMethod, CaseClosingOrder, CaseClosingReport, CaseReportPage, CaseReceipt, CaseReceiptLine, CaseProposal, CaseProposalAnswer, CaseProposalChange, CaseProposalInput, ListCasesInput, AddressValue, DeliveryLocalPricing, DeliverySettings, PaymentMethodKind, PaymentSettings, PaymentSettingsInput, PaymentAccount, PaymentCountry, PaymentFieldDef, PaymentMethodDef, StructuredConfigInput, StructuredConfigEntry, DeliveryQuoteStatus, DeliveryQuoteInput, DeliveryPricePreview, DeliveryPricingPreview, DeliveryPricingPreviewInput, DeliveryRoute, DeliveryRouteInput, DeliveryQuote, AppSelf, AppOwner, 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, AttachCatalogCategoryImageInput, 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';
|
|
@@ -271,6 +271,10 @@ class CatalogProductsResource {
|
|
|
271
271
|
qs.set('page', String(input.page));
|
|
272
272
|
if (input.pageSize !== undefined)
|
|
273
273
|
qs.set('pageSize', String(input.pageSize));
|
|
274
|
+
if (input.categoryIds?.length)
|
|
275
|
+
qs.set('categoryIds', input.categoryIds.join(','));
|
|
276
|
+
if (input.productIds?.length)
|
|
277
|
+
qs.set('productIds', input.productIds.join(','));
|
|
274
278
|
const q = qs.toString();
|
|
275
279
|
return this.client.request('GET', `${BASE}/products${q ? `?${q}` : ''}`, undefined, TENANT_AUTH);
|
|
276
280
|
}
|
package/dist/resources/chat.d.ts
CHANGED
|
@@ -73,6 +73,18 @@ export interface AppCallerClaims {
|
|
|
73
73
|
location?: string;
|
|
74
74
|
/** The delivery address the person chose in the App; the assistant offers it instead of asking (AGF-CUSTOMER-WHERE). */
|
|
75
75
|
deliveryAddress?: string;
|
|
76
|
+
/**
|
|
77
|
+
* AGF-LOCATION-FOCUS: what the person is looking at in the App, by name. The
|
|
78
|
+
* assistant prioritizes it and the rest of the catalog stays available. Never
|
|
79
|
+
* where the person is: that is `location`, and only `location` means they are
|
|
80
|
+
* attended there. A case opened without a `location` takes `focus.place` as its
|
|
81
|
+
* origin. Capped by the platform: 20 categories, 30 products.
|
|
82
|
+
*/
|
|
83
|
+
focus?: {
|
|
84
|
+
place?: string;
|
|
85
|
+
categories?: string[];
|
|
86
|
+
products?: string[];
|
|
87
|
+
};
|
|
76
88
|
}
|
|
77
89
|
export declare class ChatResource {
|
|
78
90
|
private readonly client;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import type { AgentForgeClient } from '../client';
|
|
2
|
-
import type { DeliveryQuote, DeliveryQuoteInput, DeliveryRoute, DeliveryRouteInput } from '../types';
|
|
2
|
+
import type { DeliveryPricingPreview, DeliveryPricingPreviewInput, 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/pricing-preview` — the local price at some distances for a DRAFT delivery value,
|
|
10
|
+
* computed by the platform with the same math as `quote` (nothing is saved, no maps call). 400 when the draft is invalid.
|
|
11
|
+
*/
|
|
12
|
+
pricingPreview(input: DeliveryPricingPreviewInput): Promise<DeliveryPricingPreview>;
|
|
8
13
|
/**
|
|
9
14
|
* `POST /api/v1/delivery/route` — the road through some stops, from `from` (else the
|
|
10
15
|
* business), to draw on a Google map (Google's terms bar other maps). Google orders the
|
|
@@ -12,6 +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/pricing-preview` — the local price at some distances for a DRAFT delivery value,
|
|
17
|
+
* computed by the platform with the same math as `quote` (nothing is saved, no maps call). 400 when the draft is invalid.
|
|
18
|
+
*/
|
|
19
|
+
async pricingPreview(input) {
|
|
20
|
+
return this.client.request('POST', '/api/v1/delivery/pricing-preview', input);
|
|
21
|
+
}
|
|
15
22
|
/**
|
|
16
23
|
* `POST /api/v1/delivery/route` — the road through some stops, from `from` (else the
|
|
17
24
|
* business), to draw on a Google map (Google's terms bar other maps). Google orders the
|
package/dist/types.d.ts
CHANGED
|
@@ -1448,6 +1448,14 @@ export interface ListCatalogProductsInput {
|
|
|
1448
1448
|
page?: number;
|
|
1449
1449
|
/** Default 20, max 100 (server-capped). */
|
|
1450
1450
|
pageSize?: number;
|
|
1451
|
+
/**
|
|
1452
|
+
* AGF-LOCATION-FOCUS: a selection of the catalog, products in these categories
|
|
1453
|
+
* OR with these ids, on top of every other filter (`categoryId` included). UUIDs,
|
|
1454
|
+
* at most 30 categories and 100 products (else 400). Omitted or both empty: no
|
|
1455
|
+
* restriction.
|
|
1456
|
+
*/
|
|
1457
|
+
categoryIds?: string[];
|
|
1458
|
+
productIds?: string[];
|
|
1451
1459
|
}
|
|
1452
1460
|
export interface CatalogProductPage {
|
|
1453
1461
|
items: CatalogProduct[];
|
|
@@ -1966,10 +1974,13 @@ export interface AddressValue {
|
|
|
1966
1974
|
export type DeliveryLocalPricing = {
|
|
1967
1975
|
kind: 'fixed';
|
|
1968
1976
|
amount: number;
|
|
1969
|
-
}
|
|
1977
|
+
}
|
|
1978
|
+
/** `includedKm`: the base covers up to here; each km counts from there, or from the free radius if it is further. */
|
|
1979
|
+
| {
|
|
1970
1980
|
kind: 'distance';
|
|
1971
1981
|
base: number;
|
|
1972
1982
|
perKm: number;
|
|
1983
|
+
includedKm?: number;
|
|
1973
1984
|
roundTo?: number;
|
|
1974
1985
|
};
|
|
1975
1986
|
/** Delivery coverage and prices (SDD AGF-PDK-DELIVERY §3.2). */
|
|
@@ -2095,6 +2106,21 @@ export type StructuredConfigEntry = ({
|
|
|
2095
2106
|
updatedAt: string;
|
|
2096
2107
|
};
|
|
2097
2108
|
export type DeliveryQuoteStatus = 'free' | 'paid' | 'national' | 'pickup_only' | 'out_of_coverage' | 'no_delivery' | 'needs_confirmation';
|
|
2109
|
+
/** `delivery.pricingPreview` input: a draft delivery value and up to 20 distances (0..300 km). */
|
|
2110
|
+
export interface DeliveryPricingPreviewInput {
|
|
2111
|
+
value: DeliverySettings;
|
|
2112
|
+
km: number[];
|
|
2113
|
+
}
|
|
2114
|
+
export interface DeliveryPricePreview {
|
|
2115
|
+
km: number;
|
|
2116
|
+
/** The local delivery price at `km` (0 inside the free radius); null when there is none. */
|
|
2117
|
+
price: number | null;
|
|
2118
|
+
reason?: 'out_of_radius' | 'local_disabled';
|
|
2119
|
+
}
|
|
2120
|
+
export interface DeliveryPricingPreview {
|
|
2121
|
+
currency: string;
|
|
2122
|
+
prices: DeliveryPricePreview[];
|
|
2123
|
+
}
|
|
2098
2124
|
export interface DeliveryRouteInput {
|
|
2099
2125
|
/** Where the courier is now; default: the business. */
|
|
2100
2126
|
from?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentforge-io/sdk-server",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.67.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",
|