@agentforge-io/sdk-server 4.40.0 → 4.41.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 +2 -2
- package/dist/index.js +3 -1
- package/dist/resources/templates.d.ts +33 -1
- package/dist/resources/templates.js +46 -1
- package/dist/types.d.ts +68 -0
- 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, 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, 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, ListTemplateReviewsInput, SaveTemplateReviewInput, TemplateReportKind, CreateTemplateReportInput, 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, 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';
|
|
@@ -15,7 +15,7 @@ export type { InboxChannelView } from './resources/connectors';
|
|
|
15
15
|
export { InboxResource } from './resources/inbox';
|
|
16
16
|
export { InstallationsResource } from './resources/installations';
|
|
17
17
|
export type { InstallAppInput } from './resources/installations';
|
|
18
|
-
export { TemplatesResource } from './resources/templates';
|
|
18
|
+
export { TemplatesResource, TemplateReviewsResource, TemplateReportsResource } from './resources/templates';
|
|
19
19
|
export type { ListTemplatesInput } from './resources/templates';
|
|
20
20
|
export { MarketplaceResource } from './resources/marketplace';
|
|
21
21
|
export type { ListMarketplaceCategoriesInput } from './resources/marketplace';
|
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
// const payload = af.tools.verifyCallback({ rawBody, signatureHeader, secretPlaintext });
|
|
29
29
|
// await af.tools.respondToCallback({ resultUrl: payload.resultUrl, tenantId: payload.tenantId, secret, result });
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
exports.ToolsResource = exports.TeamsResource = exports.SecretsResource = exports.ProvisioningResource = exports.CATALOG_IMPORT_MAX_ITEMS = exports.AgentForgeCatalogImportLimitError = exports.CatalogSourcesResource = exports.CatalogUnitsResource = exports.CatalogOptionGroupsResource = exports.CatalogMenuImportResource = exports.CatalogFileImportResource = exports.CatalogImportResource = exports.CatalogPhotosResource = exports.CatalogProductsResource = exports.CatalogCategoriesResource = exports.CatalogResource = exports.BusinessRolesResource = exports.CasesResource = exports.DeliveryResource = exports.ContactVerificationResource = exports.ContactsResource = exports.PlacesResource = exports.TenantConfigResource = exports.MarketplaceResource = exports.TemplatesResource = exports.InstallationsResource = exports.InboxResource = exports.parseGoogleSheetsPickerResult = exports.ConnectorsResource = exports.ChatResource = exports.AppsResource = exports.AnalyticsResource = exports.AgentsResource = exports.WebhookResource = exports.verifyToolCallbackSignature = exports.verifyAppWebhook = exports.signToolCallbackPayload = exports.ToolCallbackSignatureError = exports.TOOL_CALLBACK_HEADERS = exports.APP_WEBHOOK_HEADERS = exports.AgentForgeNetworkError = exports.AgentForgeNotFoundError = exports.AgentForgeAuthError = exports.AgentForgeError = exports.INSTALLED_TENANT_HEADER = exports.AgentForgeClient = void 0;
|
|
31
|
+
exports.ToolsResource = exports.TeamsResource = exports.SecretsResource = exports.ProvisioningResource = exports.CATALOG_IMPORT_MAX_ITEMS = exports.AgentForgeCatalogImportLimitError = exports.CatalogSourcesResource = exports.CatalogUnitsResource = exports.CatalogOptionGroupsResource = exports.CatalogMenuImportResource = exports.CatalogFileImportResource = exports.CatalogImportResource = exports.CatalogPhotosResource = exports.CatalogProductsResource = exports.CatalogCategoriesResource = exports.CatalogResource = exports.BusinessRolesResource = exports.CasesResource = exports.DeliveryResource = exports.ContactVerificationResource = exports.ContactsResource = exports.PlacesResource = exports.TenantConfigResource = exports.MarketplaceResource = exports.TemplateReportsResource = exports.TemplateReviewsResource = exports.TemplatesResource = exports.InstallationsResource = exports.InboxResource = exports.parseGoogleSheetsPickerResult = exports.ConnectorsResource = exports.ChatResource = exports.AppsResource = exports.AnalyticsResource = exports.AgentsResource = exports.WebhookResource = exports.verifyToolCallbackSignature = exports.verifyAppWebhook = exports.signToolCallbackPayload = exports.ToolCallbackSignatureError = exports.TOOL_CALLBACK_HEADERS = exports.APP_WEBHOOK_HEADERS = exports.AgentForgeNetworkError = exports.AgentForgeNotFoundError = exports.AgentForgeAuthError = exports.AgentForgeError = exports.INSTALLED_TENANT_HEADER = exports.AgentForgeClient = void 0;
|
|
32
32
|
var client_1 = require("./client");
|
|
33
33
|
Object.defineProperty(exports, "AgentForgeClient", { enumerable: true, get: function () { return client_1.AgentForgeClient; } });
|
|
34
34
|
Object.defineProperty(exports, "INSTALLED_TENANT_HEADER", { enumerable: true, get: function () { return client_1.INSTALLED_TENANT_HEADER; } });
|
|
@@ -63,6 +63,8 @@ var installations_1 = require("./resources/installations");
|
|
|
63
63
|
Object.defineProperty(exports, "InstallationsResource", { enumerable: true, get: function () { return installations_1.InstallationsResource; } });
|
|
64
64
|
var templates_1 = require("./resources/templates");
|
|
65
65
|
Object.defineProperty(exports, "TemplatesResource", { enumerable: true, get: function () { return templates_1.TemplatesResource; } });
|
|
66
|
+
Object.defineProperty(exports, "TemplateReviewsResource", { enumerable: true, get: function () { return templates_1.TemplateReviewsResource; } });
|
|
67
|
+
Object.defineProperty(exports, "TemplateReportsResource", { enumerable: true, get: function () { return templates_1.TemplateReportsResource; } });
|
|
66
68
|
var marketplace_1 = require("./resources/marketplace");
|
|
67
69
|
Object.defineProperty(exports, "MarketplaceResource", { enumerable: true, get: function () { return marketplace_1.MarketplaceResource; } });
|
|
68
70
|
var config_1 = require("./resources/config");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AgentForgeClient } from '../client';
|
|
2
|
-
import type { TemplateDetail, TemplateInstallResult, TemplateSummary } from '../types';
|
|
2
|
+
import type { CreateTemplateReportInput, 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']. */
|
|
@@ -22,6 +22,10 @@ export interface ListTemplatesInput {
|
|
|
22
22
|
}
|
|
23
23
|
export declare class TemplatesResource {
|
|
24
24
|
private readonly client;
|
|
25
|
+
/** AGF-PDK-TEMPLATE-PAGE. Reviews kept on the template, one per person. */
|
|
26
|
+
readonly reviews: TemplateReviewsResource;
|
|
27
|
+
/** AGF-PDK-TEMPLATE-PAGE. Problems reported about a template (private). */
|
|
28
|
+
readonly reports: TemplateReportsResource;
|
|
25
29
|
constructor(client: AgentForgeClient);
|
|
26
30
|
/** `GET /api/v1/templates` — templates visible to the caller's tenant. */
|
|
27
31
|
list(input?: ListTemplatesInput): Promise<TemplateSummary[]>;
|
|
@@ -32,3 +36,31 @@ export declare class TemplatesResource {
|
|
|
32
36
|
name?: string;
|
|
33
37
|
}): Promise<TemplateInstallResult>;
|
|
34
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* A template's reviews (AGF-PDK-TEMPLATE-PAGE). They live on the template, so
|
|
41
|
+
* the marketplace and every App show one list. An App writes as its user
|
|
42
|
+
* (`externalUserId`), from the tenant it acts in — which must have installed
|
|
43
|
+
* the template. One review per person and template; saving again edits it.
|
|
44
|
+
*/
|
|
45
|
+
export declare class TemplateReviewsResource {
|
|
46
|
+
private readonly client;
|
|
47
|
+
constructor(client: AgentForgeClient);
|
|
48
|
+
/** `GET /api/v1/templates/:id/reviews` — visible reviews + summary (+ `mine`). */
|
|
49
|
+
list(templateId: string, input?: ListTemplateReviewsInput): Promise<TemplateReviewsPage>;
|
|
50
|
+
/** `PUT /api/v1/templates/:id/reviews/mine` — create or edit. 403 `not_installed`, 400 on bad input. */
|
|
51
|
+
save(templateId: string, input: SaveTemplateReviewInput): Promise<TemplateReview>;
|
|
52
|
+
/** `DELETE /api/v1/templates/:id/reviews/mine` — no error when there was none. */
|
|
53
|
+
remove(templateId: string, input: {
|
|
54
|
+
externalUserId: string;
|
|
55
|
+
}): Promise<void>;
|
|
56
|
+
}
|
|
57
|
+
/** Report a problem with a template — a bug, inappropriate or misleading content… (AGF-PDK-TEMPLATE-PAGE). */
|
|
58
|
+
export declare class TemplateReportsResource {
|
|
59
|
+
private readonly client;
|
|
60
|
+
constructor(client: AgentForgeClient);
|
|
61
|
+
/** `POST /api/v1/templates/:id/reports`. 400 on bad input, 429 past 10 a day. */
|
|
62
|
+
create(templateId: string, input: CreateTemplateReportInput): Promise<{
|
|
63
|
+
id: string;
|
|
64
|
+
createdAt: string;
|
|
65
|
+
}>;
|
|
66
|
+
}
|
|
@@ -13,10 +13,12 @@
|
|
|
13
13
|
// creates the template's config variables EMPTY (`configCreated`); fill them
|
|
14
14
|
// with `config.set`. Rows created by an App secret are owned by the App.
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.TemplatesResource = void 0;
|
|
16
|
+
exports.TemplateReportsResource = exports.TemplateReviewsResource = exports.TemplatesResource = void 0;
|
|
17
17
|
class TemplatesResource {
|
|
18
18
|
constructor(client) {
|
|
19
19
|
this.client = client;
|
|
20
|
+
this.reviews = new TemplateReviewsResource(client);
|
|
21
|
+
this.reports = new TemplateReportsResource(client);
|
|
20
22
|
}
|
|
21
23
|
/** `GET /api/v1/templates` — templates visible to the caller's tenant. */
|
|
22
24
|
async list(input = {}) {
|
|
@@ -51,3 +53,46 @@ class TemplatesResource {
|
|
|
51
53
|
}
|
|
52
54
|
}
|
|
53
55
|
exports.TemplatesResource = TemplatesResource;
|
|
56
|
+
/**
|
|
57
|
+
* A template's reviews (AGF-PDK-TEMPLATE-PAGE). They live on the template, so
|
|
58
|
+
* the marketplace and every App show one list. An App writes as its user
|
|
59
|
+
* (`externalUserId`), from the tenant it acts in — which must have installed
|
|
60
|
+
* the template. One review per person and template; saving again edits it.
|
|
61
|
+
*/
|
|
62
|
+
class TemplateReviewsResource {
|
|
63
|
+
constructor(client) {
|
|
64
|
+
this.client = client;
|
|
65
|
+
}
|
|
66
|
+
/** `GET /api/v1/templates/:id/reviews` — visible reviews + summary (+ `mine`). */
|
|
67
|
+
async list(templateId, input = {}) {
|
|
68
|
+
const qs = new URLSearchParams();
|
|
69
|
+
if (input.externalUserId)
|
|
70
|
+
qs.set('externalUserId', input.externalUserId);
|
|
71
|
+
if (input.cursor)
|
|
72
|
+
qs.set('cursor', input.cursor);
|
|
73
|
+
if (input.limit !== undefined)
|
|
74
|
+
qs.set('limit', String(input.limit));
|
|
75
|
+
const query = qs.toString();
|
|
76
|
+
return this.client.request('GET', `/api/v1/templates/${encodeURIComponent(templateId)}/reviews${query ? `?${query}` : ''}`);
|
|
77
|
+
}
|
|
78
|
+
/** `PUT /api/v1/templates/:id/reviews/mine` — create or edit. 403 `not_installed`, 400 on bad input. */
|
|
79
|
+
async save(templateId, input) {
|
|
80
|
+
return this.client.request('PUT', `/api/v1/templates/${encodeURIComponent(templateId)}/reviews/mine`, input);
|
|
81
|
+
}
|
|
82
|
+
/** `DELETE /api/v1/templates/:id/reviews/mine` — no error when there was none. */
|
|
83
|
+
async remove(templateId, input) {
|
|
84
|
+
await this.client.request('DELETE', `/api/v1/templates/${encodeURIComponent(templateId)}/reviews/mine?externalUserId=${encodeURIComponent(input.externalUserId)}`);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
exports.TemplateReviewsResource = TemplateReviewsResource;
|
|
88
|
+
/** Report a problem with a template — a bug, inappropriate or misleading content… (AGF-PDK-TEMPLATE-PAGE). */
|
|
89
|
+
class TemplateReportsResource {
|
|
90
|
+
constructor(client) {
|
|
91
|
+
this.client = client;
|
|
92
|
+
}
|
|
93
|
+
/** `POST /api/v1/templates/:id/reports`. 400 on bad input, 429 past 10 a day. */
|
|
94
|
+
async create(templateId, input) {
|
|
95
|
+
return this.client.request('POST', `/api/v1/templates/${encodeURIComponent(templateId)}/reports`, input);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
exports.TemplateReportsResource = TemplateReportsResource;
|
package/dist/types.d.ts
CHANGED
|
@@ -875,6 +875,11 @@ export interface TemplateSummary {
|
|
|
875
875
|
* Absent on platforms older than the field: treat as `false`. */
|
|
876
876
|
usesCatalog?: boolean;
|
|
877
877
|
installsCount: number;
|
|
878
|
+
/** AGF-PDK-TEMPLATE-PAGE. Average of the visible reviews (one decimal),
|
|
879
|
+
* null with none. Absent on platforms older than reviews. */
|
|
880
|
+
ratingAvg?: number | null;
|
|
881
|
+
/** Visible reviews. */
|
|
882
|
+
ratingCount?: number;
|
|
878
883
|
currentVersion: number;
|
|
879
884
|
/** One-time price in cents (USD). 0 / undefined = free. */
|
|
880
885
|
priceCents?: number;
|
|
@@ -894,6 +899,69 @@ export interface TemplateDetail extends TemplateSummary {
|
|
|
894
899
|
/** ISO timestamp of the last guide change. */
|
|
895
900
|
guideUpdatedAt?: string;
|
|
896
901
|
}
|
|
902
|
+
/** AGF-PDK-TEMPLATE-PAGE. A person's review of a template (one per person,
|
|
903
|
+
* editable). Never carries the reviewer's ids. */
|
|
904
|
+
export interface TemplateReview {
|
|
905
|
+
id: string;
|
|
906
|
+
/** 1–5. */
|
|
907
|
+
rating: number;
|
|
908
|
+
/** Plain text, or null for stars only. */
|
|
909
|
+
body: string | null;
|
|
910
|
+
reviewerName: string;
|
|
911
|
+
reviewerAvatarUrl: string | null;
|
|
912
|
+
/** Template version the review was last saved on. */
|
|
913
|
+
version: number;
|
|
914
|
+
createdAt: string;
|
|
915
|
+
updatedAt: string;
|
|
916
|
+
}
|
|
917
|
+
export interface TemplateRatingSummary {
|
|
918
|
+
/** One decimal; null with no reviews. */
|
|
919
|
+
avg: number | null;
|
|
920
|
+
count: number;
|
|
921
|
+
/** Reviews per star: index 0 = 1 star … 4 = 5 stars. */
|
|
922
|
+
distribution: [number, number, number, number, number];
|
|
923
|
+
}
|
|
924
|
+
/** `GET /api/v1/templates/:id/reviews`. */
|
|
925
|
+
export interface TemplateReviewsPage {
|
|
926
|
+
/** Visible reviews, newest first. */
|
|
927
|
+
items: TemplateReview[];
|
|
928
|
+
/** The `externalUserId`'s own review (also when hidden), or null. */
|
|
929
|
+
mine: TemplateReview | null;
|
|
930
|
+
summary: TemplateRatingSummary;
|
|
931
|
+
nextCursor: string | null;
|
|
932
|
+
}
|
|
933
|
+
export interface ListTemplateReviewsInput {
|
|
934
|
+
/** The App user whose own review comes back as `mine`. */
|
|
935
|
+
externalUserId?: string;
|
|
936
|
+
cursor?: string;
|
|
937
|
+
/** 1–50, default 20. */
|
|
938
|
+
limit?: number;
|
|
939
|
+
}
|
|
940
|
+
/** `PUT /api/v1/templates/:id/reviews/mine`. Only from a tenant that
|
|
941
|
+
* installed the template (403 `not_installed`). */
|
|
942
|
+
export interface SaveTemplateReviewInput {
|
|
943
|
+
/** The App user writing it (PoodleDeck: `member:<ownerId>`). */
|
|
944
|
+
externalUserId: string;
|
|
945
|
+
/** Whole number 1–5. */
|
|
946
|
+
rating: number;
|
|
947
|
+
/** ≤ 2,000 characters; empty or null = stars only. */
|
|
948
|
+
body?: string | null;
|
|
949
|
+
/** Shown name, ≤ 80. */
|
|
950
|
+
reviewerName: string;
|
|
951
|
+
/** https photo. */
|
|
952
|
+
reviewerAvatarUrl?: string | null;
|
|
953
|
+
}
|
|
954
|
+
/** AGF-PDK-TEMPLATE-PAGE. What kind of problem a report is about. */
|
|
955
|
+
export type TemplateReportKind = 'bug' | 'inappropriate' | 'misleading' | 'other';
|
|
956
|
+
/** `POST /api/v1/templates/:id/reports` — private to the author and admins. 429 past 10 a day. */
|
|
957
|
+
export interface CreateTemplateReportInput {
|
|
958
|
+
/** The App user sending it. */
|
|
959
|
+
externalUserId: string;
|
|
960
|
+
kind: TemplateReportKind;
|
|
961
|
+
/** What happened, ≤ 2,000 characters. */
|
|
962
|
+
note: string;
|
|
963
|
+
reporterName?: string | null;
|
|
964
|
+
}
|
|
897
965
|
/** AGF-MARKET-LISTING. Languages a listing can be written in. */
|
|
898
966
|
export type MarketplaceLocale = 'es' | 'en';
|
|
899
967
|
/** `industry` = what the business is; `use_case` = what the template does. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentforge-io/sdk-server",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.41.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",
|