@agentforge-io/sdk-server 4.84.0 → 4.86.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
@@ -8,7 +8,7 @@ export { BillingResource } from './resources/billing';
8
8
  export type { BillingCurrency, BillingEntitlement, BillingEntitlementStatus, BillingInterval, BillingLimits, BillingPlan, BillingInvoice, BillingInvoicePage, BillingInvoicesQuery, BillingPaymentMethod, BillingCheckoutInput, BillingStartTrialInput, AppBillingWebhookEvent, AppBillingWebhookEventName, AppBillingWebhookData, } from './resources/billing';
9
9
  export { APP_WEBHOOK_HEADERS, TOOL_CALLBACK_HEADERS, ToolCallbackSignatureError, signToolCallbackPayload, verifyAppWebhook, verifyToolCallbackSignature, } from './webhooks';
10
10
  export { WebhookResource, type SetAppWebhookInput } from './resources/webhook';
11
- 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, ProfileBlockPlacement, ProfileBlockPosition, CatalogBlockPreview, ServiceCta, ServiceCtaAction, CatalogServicesBlockConfig, AppInstallation, TemplateConfigField, TemplateSummary, TemplateDetail, TemplateInstallStats, TemplatePublisher, TemplateAuthor, AppTemplatePolicy, TemplateCategoryRef, MarketplaceCategory, MarketplaceCategoryGroup, MarketplaceLocale, TemplateInstallResult, CheckSystemTemplateResult, TemplatePublishIssue, 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, CaseContactLink, CaseStateStep, CreateDirectOrderInput, CreateOpenOrderInput, CaseOffCatalogLine, CaseOffCatalogView, ConfirmCaseLineInput, CreateOffCatalogLineInput, OpenOrderFreeLine, OpenOrderLineMark, OpenOrderPayment, CreateDirectBookingInput, MoveCaseSlotInput, CaseSlot, CatalogAttendedAt, CatalogBookingRule, CaseOrigin, CaseOriginChannel, DirectOrderForm, DirectPaymentOption, CaseClosingMethod, CaseClosingOrder, CaseClosingReport, CaseClosingReceivables, CaseAccount, SetOnAccountInput, SetOnAccountResult, 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, ListCatalogCategoriesInput, 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, ReferenceMatchItemInput, ReferenceMatchDecisionKind, ReferenceMatchCandidate, ReferenceMatchDecision, ReferenceMatchInput, ReferenceMatchResult, ReferenceProductInput, ReferenceProductsBulkInput, ReferenceProductsBulkResult, ReferenceProduct, ListReferenceProductsInput, ReferenceProductPage, GoogleCalendarAccount, GoogleCalendarEventInput, GoogleCalendarUpsertResult, GoogleCalendarBusyInput, GoogleCalendarBusyResult, GoogleSheetsPickerInput, GoogleSheetsPickerSession, GoogleSheetsPickerErrorCode, GoogleSheetsPickerResult, RegisterToolsResult, ToolCallbackPayload, ToolCallRecord, ToolPermission, ToolPermissionMode, TokenUsage, TenantSecretEntry, UpdateAgentInput, InboxThreadMode, InboxMessageDirection, InboxMessageSource, InboxMessageType, InboxThreadCustomerProfileView, InboxThreadView, InboxMessageView, SupportKpiTotals, SupportKpiResponse, AgentAttentionLogRow, } from './types';
11
+ 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, ThemedColor, TeamBusinessHours, TeamWeekday, TeamProfileBlock, ProfileBlockPlacement, ProfileBlockPosition, CatalogBlockPreview, ServiceCta, ServiceCtaAction, CatalogServicesBlockConfig, AppInstallation, TemplateConfigField, TemplateSummary, TemplateDetail, TemplateInstallStats, TemplatePublisher, TemplateAuthor, AppTemplatePolicy, TemplateCategoryRef, MarketplaceCategory, MarketplaceCategoryGroup, MarketplaceLocale, TemplateInstallResult, CheckSystemTemplateResult, SetSystemAppProfileResult, SystemAppProfileView, TemplatePublishIssue, 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, CaseContactLink, CaseStateStep, CreateDirectOrderInput, CreateOpenOrderInput, CaseOffCatalogLine, CaseOffCatalogView, ConfirmCaseLineInput, CreateOffCatalogLineInput, OpenOrderFreeLine, OpenOrderLineMark, OpenOrderPayment, CreateDirectBookingInput, MoveCaseSlotInput, CaseSlot, CatalogAttendedAt, CatalogBookingRule, CaseOrigin, CaseOriginChannel, DirectOrderForm, DirectPaymentOption, CaseClosingMethod, CaseClosingOrder, CaseClosingReport, CaseClosingReceivables, CaseAccount, SetOnAccountInput, SetOnAccountResult, 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, ListCatalogCategoriesInput, 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, ReferenceMatchItemInput, ReferenceMatchDecisionKind, ReferenceMatchCandidate, ReferenceMatchDecision, ReferenceMatchInput, ReferenceMatchResult, ReferenceProductInput, ReferenceProductsBulkInput, ReferenceProductsBulkResult, ReferenceProduct, ListReferenceProductsInput, ReferenceProductPage, GoogleCalendarAccount, GoogleCalendarEventInput, GoogleCalendarUpsertResult, GoogleCalendarBusyInput, GoogleCalendarBusyResult, GoogleSheetsPickerInput, GoogleSheetsPickerSession, GoogleSheetsPickerErrorCode, GoogleSheetsPickerResult, RegisterToolsResult, ToolCallbackPayload, ToolCallRecord, ToolPermission, ToolPermissionMode, TokenUsage, TenantSecretEntry, UpdateAgentInput, InboxThreadMode, InboxMessageDirection, InboxMessageSource, InboxMessageType, InboxThreadCustomerProfileView, InboxThreadView, InboxMessageView, SupportKpiTotals, SupportKpiResponse, AgentAttentionLogRow, } from './types';
12
12
  export { AgentsResource } from './resources/agents';
13
13
  export { AnalyticsResource } from './resources/analytics';
14
14
  export type { GetSupportKpisInput, GetAgentAttentionLogInput, } from './resources/analytics';
@@ -1,5 +1,5 @@
1
1
  import type { AgentForgeClient } from '../client';
2
- import type { CheckSystemTemplateResult, CreateTemplateReportInput, UpsertSystemTemplateInput, UpsertSystemTemplateResult, ListTemplateReviewsInput, SaveTemplateReviewInput, TemplateDetail, TemplateInstallResult, TemplateReview, TemplateReviewsPage, TemplateSummary } from '../types';
2
+ import type { CheckSystemTemplateResult, CreateTemplateReportInput, SetSystemAppProfileResult, SystemAppProfileView, UpsertSystemTemplateInput, UpsertSystemTemplateResult, ListTemplateReviewsInput, SaveTemplateReviewInput, TemplateDetail, TemplateInstallResult, TemplateReview, TemplateReviewsPage, TemplateSummary } from '../types';
3
3
  export interface ListTemplatesInput {
4
4
  kind?: 'agent' | 'team';
5
5
  /** Every tag must match (AND), e.g. ['type:food']. */
@@ -63,6 +63,25 @@ export declare class TemplatesResource {
63
63
  checkSystem(slug: string, input: UpsertSystemTemplateInput, opts?: {
64
64
  strict?: boolean;
65
65
  }): Promise<CheckSystemTemplateResult>;
66
+ /**
67
+ * PDK-PAGE-THEMES — `GET /api/v1/templates/system/:slug/app-profile`: the
68
+ * calling App's OWN metadata blob on one of its system templates
69
+ * (`{ profile: null }` when it has none). App secret only; 404 when `slug`
70
+ * is not a system template of this App.
71
+ */
72
+ getSystemAppProfile(slug: string): Promise<SystemAppProfileView>;
73
+ /**
74
+ * PDK-PAGE-THEMES — `PUT /api/v1/templates/system/:slug/app-profile`: writes
75
+ * ONLY the calling App's blob (a JSON object, <= 32 KB; `null` removes it) on
76
+ * one of its system templates, live — no draft or publish step, and the
77
+ * other Apps' blobs are untouched. Same blob again = `action: 'unchanged'`.
78
+ * `opts.ifAbsent` leaves an existing blob alone (`'unchanged'`, returning it).
79
+ * App secret only (a tenant key gets 403); 400 on a bad blob; 404 when `slug`
80
+ * is not a system template of this App.
81
+ */
82
+ setSystemAppProfile(slug: string, profile: Record<string, unknown> | null, opts?: {
83
+ ifAbsent?: boolean;
84
+ }): Promise<SetSystemAppProfileResult>;
66
85
  /** `GET /api/v1/templates/:id` — summary + payload. 404 → `AgentForgeNotFoundError`. An unlisted template is readable by id only from its own tenant / App. */
67
86
  get(templateId: string): Promise<TemplateDetail>;
68
87
  /** `POST /api/v1/templates/:id/install` — clone into the caller's tenant. */
@@ -82,6 +82,27 @@ class TemplatesResource {
82
82
  async checkSystem(slug, input, opts = {}) {
83
83
  return this.client.request('POST', `/api/v1/templates/system/${encodeURIComponent(slug)}/check${opts.strict ? '?strict=true' : ''}`, input);
84
84
  }
85
+ /**
86
+ * PDK-PAGE-THEMES — `GET /api/v1/templates/system/:slug/app-profile`: the
87
+ * calling App's OWN metadata blob on one of its system templates
88
+ * (`{ profile: null }` when it has none). App secret only; 404 when `slug`
89
+ * is not a system template of this App.
90
+ */
91
+ async getSystemAppProfile(slug) {
92
+ return this.client.request('GET', `/api/v1/templates/system/${encodeURIComponent(slug)}/app-profile`);
93
+ }
94
+ /**
95
+ * PDK-PAGE-THEMES — `PUT /api/v1/templates/system/:slug/app-profile`: writes
96
+ * ONLY the calling App's blob (a JSON object, <= 32 KB; `null` removes it) on
97
+ * one of its system templates, live — no draft or publish step, and the
98
+ * other Apps' blobs are untouched. Same blob again = `action: 'unchanged'`.
99
+ * `opts.ifAbsent` leaves an existing blob alone (`'unchanged'`, returning it).
100
+ * App secret only (a tenant key gets 403); 400 on a bad blob; 404 when `slug`
101
+ * is not a system template of this App.
102
+ */
103
+ async setSystemAppProfile(slug, profile, opts = {}) {
104
+ return this.client.request('PUT', `/api/v1/templates/system/${encodeURIComponent(slug)}/app-profile${opts.ifAbsent ? '?ifAbsent=true' : ''}`, { profile });
105
+ }
85
106
  /** `GET /api/v1/templates/:id` — summary + payload. 404 → `AgentForgeNotFoundError`. An unlisted template is readable by id only from its own tenant / App. */
86
107
  async get(templateId) {
87
108
  return this.client.request('GET', `/api/v1/templates/${encodeURIComponent(templateId)}`);
package/dist/types.d.ts CHANGED
@@ -788,15 +788,24 @@ export interface TeamBusinessHours {
788
788
  }>;
789
789
  }
790
790
  export type TeamWeekday = 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun';
791
- /** A team's public-page theme (`af_teams.theme`). Colors are hex strings. */
791
+ /**
792
+ * A color that may differ per mode: a hex string (`#rgb` / `#rrggbb`, the same
793
+ * in light and dark) or `{ light?, dark? }` (each face hex). The server
794
+ * rejects an invalid face with 400 on the API-key path.
795
+ */
796
+ export type ThemedColor = string | {
797
+ light?: string;
798
+ dark?: string;
799
+ };
800
+ /** A team's public-page theme (`af_teams.theme`). Colors are `ThemedColor`: hex, or per-mode `{ light, dark }`. */
792
801
  export interface TeamTheme {
793
802
  logoUrl?: string;
794
803
  bannerUrl?: string;
795
- primaryColor?: string;
796
- accentColor?: string;
797
- headerBg?: string;
798
- surfaceBg?: string;
799
- surfaceFg?: string;
804
+ primaryColor?: ThemedColor;
805
+ accentColor?: ThemedColor;
806
+ headerBg?: ThemedColor;
807
+ surfaceBg?: ThemedColor;
808
+ surfaceFg?: ThemedColor;
800
809
  font?: 'inter' | 'geist' | 'dm-sans' | 'serif';
801
810
  mode?: 'light' | 'dark' | 'auto';
802
811
  personaName?: string;
@@ -804,14 +813,14 @@ export interface TeamTheme {
804
813
  bio?: string;
805
814
  greeting?: string;
806
815
  shortcuts?: string[];
807
- bubbleAgentBg?: string;
808
- bubbleAgentFg?: string;
809
- bubbleUserBg?: string;
810
- bubbleUserFg?: string;
811
- sendButtonBg?: string;
812
- inputBg?: string;
813
- inputFg?: string;
814
- avatarBg?: string;
816
+ bubbleAgentBg?: ThemedColor;
817
+ bubbleAgentFg?: ThemedColor;
818
+ bubbleUserBg?: ThemedColor;
819
+ bubbleUserFg?: ThemedColor;
820
+ sendButtonBg?: ThemedColor;
821
+ inputBg?: ThemedColor;
822
+ inputFg?: ThemedColor;
823
+ avatarBg?: ThemedColor;
815
824
  }
816
825
  /**
817
826
  * PDK-PAGE-BLOCKS — where a block is drawn. Absent = `inline` (every block saved before this existed).
@@ -1117,6 +1126,15 @@ export interface CheckSystemTemplateResult {
1117
1126
  errors: TemplatePublishIssue[];
1118
1127
  warnings: TemplatePublishIssue[];
1119
1128
  }
1129
+ /** PDK-PAGE-THEMES. `templates.getSystemAppProfile` result: the calling App's own blob, or `null`. */
1130
+ export interface SystemAppProfileView {
1131
+ profile: Record<string, unknown> | null;
1132
+ }
1133
+ /** PDK-PAGE-THEMES. `templates.setSystemAppProfile` result. `unchanged`: the App's blob was already exactly this. */
1134
+ export interface SetSystemAppProfileResult {
1135
+ action: 'updated' | 'unchanged';
1136
+ profile: Record<string, unknown> | null;
1137
+ }
1120
1138
  /** `created`: new template (v1). `updated`: a new version was published, or
1121
1139
  * display fields changed (compare `template.currentVersion`). `unchanged`:
1122
1140
  * the same definition was already there — nothing written. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentforge-io/sdk-server",
3
- "version": "4.84.0",
3
+ "version": "4.86.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",