@agentforge-io/sdk-server 4.92.0 → 4.94.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
@@ -11,7 +11,7 @@ export { BillingResource } from './resources/billing';
11
11
  export type { BillingCurrency, BillingEntitlement, BillingEntitlementStatus, BillingInterval, BillingLimits, BillingPlan, BillingInvoice, BillingInvoicePage, BillingInvoicesQuery, BillingPaymentMethod, BillingCheckoutInput, BillingStartTrialInput, AppBillingWebhookEvent, AppBillingWebhookEventName, AppBillingWebhookData, } from './resources/billing';
12
12
  export { APP_WEBHOOK_HEADERS, TOOL_CALLBACK_HEADERS, ToolCallbackSignatureError, signToolCallbackPayload, verifyAppWebhook, verifyToolCallbackSignature, } from './webhooks';
13
13
  export { WebhookResource, type SetAppWebhookInput } from './resources/webhook';
14
- 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, SetCaseLinePriceInput, CaseLinePrices, CaseChangeInput, CaseChangeKind, CaseChangeLine, CaseChangeReason, CasePendingChange, CaseLinePriceEntry, CaseLinePriceHistoryEntry, CaseLinePriceSet, CaseLinePriceActor, CaseLinePriceBreakdownItem, 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, CatalogPhotoStudioMode, CatalogPhotoStudioAngle, CatalogPhotoStudioStatus, CatalogPhotoStudioRequest, CatalogPhotoStudioQuote, CreateCatalogPhotoStudioJobInput, CatalogPhotoStudioJob, CatalogPhotoStudioCreated, CatalogPhotoStudioAttachResult, CatalogPhotoStudioSkill, CatalogPhotoStudioOutput, CatalogPhotoStudioPalette, CatalogPhotoStudioSkillInfo, CatalogPhotoStudioSkills, 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';
14
+ 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, SetCaseLinePriceInput, CaseLinePrices, CaseChangeInput, CaseChangeKind, CaseChangeLine, CaseChangeReason, CasePendingChange, CaseLinePriceEntry, CaseLinePriceHistoryEntry, CaseLinePriceSet, CaseLinePriceActor, CaseLinePriceBreakdownItem, 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, CatalogPhotoStudioMode, CatalogPhotoStudioAngle, CatalogPhotoStudioStatus, CatalogPhotoStudioRequest, CatalogPhotoStudioQuoteInput, CatalogPhotoStudioQuote, CreateCatalogPhotoStudioJobInput, CatalogPhotoStudioJob, CatalogPhotoStudioCreated, CatalogPhotoStudioAttachResult, CatalogPhotoStudioSkill, CatalogPhotoStudioOutput, CatalogPhotoStudioPalette, CatalogPhotoStudioSkillInfo, CatalogPhotoStudioSkills, CatalogPhotoStudioBatchItemInput, CatalogPhotoStudioBatchQuoteInput, CatalogPhotoStudioBatchQuoteItem, CatalogPhotoStudioBatchQuote, CreateCatalogPhotoStudioBatchInput, CatalogPhotoStudioBatchCreated, 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';
15
15
  export { AgentsResource } from './resources/agents';
16
16
  export { AnalyticsResource } from './resources/analytics';
17
17
  export type { GetSupportKpisInput, GetAgentAttentionLogInput, } from './resources/analytics';
@@ -1,6 +1,6 @@
1
1
  import type { AgentForgeClient } from '../client';
2
2
  import { AgentForgeError } from '../errors';
3
- import type { AttachCatalogCategoryImageInput, AttachCatalogPhotoInput, Catalog, CatalogCategory, CatalogFileApplyInput, CatalogFileApplyResult, CatalogOptionChange, CatalogOptionChangesPlan, CatalogOptionGroup, CatalogUnit, SaveCatalogUnitInput, SaveCatalogOptionGroupInput, CatalogMenuItem, CatalogMenuRead, CatalogMenuReadInput, CatalogMenuAttachInput, CatalogMenuChatFile, CatalogMenuKeepInSyncInput, CatalogMenuKeepInSyncResult, CatalogFilePreview, CatalogFilePreviewInput, CatalogImportApplyResult, CatalogImportItem, CatalogImportPreview, CatalogImportSource, CatalogImportSourcePreview, CatalogImportRunResult, CatalogPhotoUploadTarget, CatalogPhotoStudioAttachResult, CatalogPhotoStudioCreated, CatalogPhotoStudioJob, CatalogPhotoStudioQuote, CatalogPhotoStudioSkills, CatalogPhotoStudioRequest, CreateCatalogPhotoStudioJobInput, CatalogProduct, CatalogProductPage, HideProductReviewInput, ListProductReviewsForOwnerInput, ListProductReviewsInput, ProductLikeResult, ProductReviewOwner, ProductReviewsOwnerPage, ProductReviewsPage, CatalogSheetTab, CatalogTemplateSheet, CreateCatalogTemplateSheetInput, CreateCatalogCategoryInput, ListCatalogCategoriesInput, CreateCatalogImportSourceInput, CreateCatalogProductInput, ListCatalogProductsInput, PreviewCatalogImportSourceInput, SignCatalogPhotoUploadInput, UpdateCatalogCategoryInput, UpdateCatalogImportSourceInput, UpdateCatalogProductInput, UpsertCatalogInput } from '../types';
3
+ import type { AttachCatalogCategoryImageInput, AttachCatalogPhotoInput, Catalog, CatalogCategory, CatalogFileApplyInput, CatalogFileApplyResult, CatalogOptionChange, CatalogOptionChangesPlan, CatalogOptionGroup, CatalogUnit, SaveCatalogUnitInput, SaveCatalogOptionGroupInput, CatalogMenuItem, CatalogMenuRead, CatalogMenuReadInput, CatalogMenuAttachInput, CatalogMenuChatFile, CatalogMenuKeepInSyncInput, CatalogMenuKeepInSyncResult, CatalogFilePreview, CatalogFilePreviewInput, CatalogImportApplyResult, CatalogImportItem, CatalogImportPreview, CatalogImportSource, CatalogImportSourcePreview, CatalogImportRunResult, CatalogPhotoUploadTarget, CatalogPhotoStudioAttachResult, CatalogPhotoStudioCreated, CatalogPhotoStudioJob, CatalogPhotoStudioQuote, CatalogPhotoStudioSkills, CatalogPhotoStudioQuoteInput, CatalogPhotoStudioBatchQuote, CatalogPhotoStudioBatchQuoteInput, CatalogPhotoStudioBatchCreated, CreateCatalogPhotoStudioBatchInput, CreateCatalogPhotoStudioJobInput, CatalogProduct, CatalogProductPage, HideProductReviewInput, ListProductReviewsForOwnerInput, ListProductReviewsInput, ProductLikeResult, ProductReviewOwner, ProductReviewsOwnerPage, ProductReviewsPage, CatalogSheetTab, CatalogTemplateSheet, CreateCatalogTemplateSheetInput, CreateCatalogCategoryInput, ListCatalogCategoriesInput, CreateCatalogImportSourceInput, CreateCatalogProductInput, ListCatalogProductsInput, PreviewCatalogImportSourceInput, SignCatalogPhotoUploadInput, UpdateCatalogCategoryInput, UpdateCatalogImportSourceInput, UpdateCatalogProductInput, UpsertCatalogInput } from '../types';
4
4
  /** Max structured items per `import.preview/apply` call (platform cap). */
5
5
  export declare const CATALOG_IMPORT_MAX_ITEMS = 200;
6
6
  /** Thrown client-side, before any request, when `items` exceeds the cap. */
@@ -67,10 +67,15 @@ export declare class CatalogPhotoStudioResource {
67
67
  /** `GET api/v1/catalog/studio/skills` — the image skills (slug, label, purpose, aspect, output). Tenant-level: no product. */
68
68
  skills(): Promise<CatalogPhotoStudioSkills>;
69
69
  /** `POST …/studio/quote` — price and workspace balance before spending. cutout has `credits: null`. */
70
- quote(productId: string, input: CatalogPhotoStudioRequest): Promise<CatalogPhotoStudioQuote>;
70
+ quote(productId: string, input: CatalogPhotoStudioQuoteInput): Promise<CatalogPhotoStudioQuote>;
71
71
  /** `POST …/studio/jobs` — start a job (spends Higgsfield credits). `replayed` is true when the same
72
72
  * `idempotencyKey` had already created it. */
73
73
  create(productId: string, input: CreateCatalogPhotoStudioJobInput): Promise<CatalogPhotoStudioCreated>;
74
+ /** `POST …/studio/batch-quote` — price 1..4 skill images at once (per image + total + balance). Spends nothing. */
75
+ batchQuote(productId: string, input: CatalogPhotoStudioBatchQuoteInput): Promise<CatalogPhotoStudioBatchQuote>;
76
+ /** `POST …/studio/batches` — start a batch of 1..4 jobs (spends Higgsfield credits). Jobs share `batchId`
77
+ * and run one at a time on the platform. 201 created / 200 replay of the same `idempotencyKey`. */
78
+ createBatch(productId: string, input: CreateCatalogPhotoStudioBatchInput): Promise<CatalogPhotoStudioBatchCreated>;
74
79
  /** `GET …/studio/jobs` — this product's jobs, newest first (max 20). */
75
80
  list(productId: string): Promise<CatalogPhotoStudioJob[]>;
76
81
  /** `GET …/studio/jobs/:jobId` — status, stage, error code and (when ready) the candidate `resultUrl`. */
@@ -159,6 +159,15 @@ class CatalogPhotoStudioResource {
159
159
  async create(productId, input) {
160
160
  return this.client.request('POST', this.path(productId, '/jobs'), input, TENANT_AUTH);
161
161
  }
162
+ /** `POST …/studio/batch-quote` — price 1..4 skill images at once (per image + total + balance). Spends nothing. */
163
+ async batchQuote(productId, input) {
164
+ return this.client.request('POST', this.path(productId, '/batch-quote'), input, TENANT_AUTH);
165
+ }
166
+ /** `POST …/studio/batches` — start a batch of 1..4 jobs (spends Higgsfield credits). Jobs share `batchId`
167
+ * and run one at a time on the platform. 201 created / 200 replay of the same `idempotencyKey`. */
168
+ async createBatch(productId, input) {
169
+ return this.client.request('POST', this.path(productId, '/batches'), input, TENANT_AUTH);
170
+ }
162
171
  /** `GET …/studio/jobs` — this product's jobs, newest first (max 20). */
163
172
  async list(productId) {
164
173
  return this.client.request('GET', this.path(productId, '/jobs'), undefined, TENANT_AUTH);
package/dist/types.d.ts CHANGED
@@ -1682,6 +1682,17 @@ export interface CatalogPhotoStudioRequest {
1682
1682
  /** Short art-direction note, at most 140 characters (`NOTE_TOO_LONG`; `NOTE_NOT_ALLOWED` when it asks for text to render). */
1683
1683
  note?: string;
1684
1684
  }
1685
+ /**
1686
+ * Body of `studio.quote`. Same as {@link CatalogPhotoStudioRequest} except that with a `skill`, `sourceUrl` is
1687
+ * optional (omit or `null` → priced without a photo; the price only depends on skill / aspect / model). Mode-only
1688
+ * requests (cutout / studio) still require it.
1689
+ */
1690
+ export type CatalogPhotoStudioQuoteInput = (CatalogPhotoStudioRequest & {
1691
+ skill?: undefined;
1692
+ }) | (Omit<CatalogPhotoStudioRequest, 'sourceUrl' | 'skill'> & {
1693
+ skill: CatalogPhotoStudioSkill;
1694
+ sourceUrl?: string | null;
1695
+ });
1685
1696
  export interface CatalogPhotoStudioQuote {
1686
1697
  mode: CatalogPhotoStudioMode;
1687
1698
  angle: CatalogPhotoStudioAngle | null;
@@ -1690,7 +1701,8 @@ export interface CatalogPhotoStudioQuote {
1690
1701
  output: CatalogPhotoStudioOutput;
1691
1702
  /** Steps of the job that have no published price (cutout's `remove_background`); `[]` for a scene skill. */
1692
1703
  unpricedSteps: string[];
1693
- sourceUrl: string;
1704
+ /** `null` when quoted without a photo (skill quotes only). */
1705
+ sourceUrl: string | null;
1694
1706
  /** Credits the job would cost; `null` for cutout (no published price). */
1695
1707
  credits: number | null;
1696
1708
  creditsExact: number | null;
@@ -1732,6 +1744,10 @@ export interface CatalogPhotoStudioJob {
1732
1744
  errorMessage: string | null;
1733
1745
  /** `true` when `studio.resume` would be accepted (failed after the paid step for a recoverable cause). */
1734
1746
  resumable: boolean;
1747
+ /** PDK-IMAGE-STUDIO — the batch this job belongs to; `null` for a single job. */
1748
+ batchId: string | null;
1749
+ /** Position of the job inside its batch (0-based); `null` for a single job. */
1750
+ batchIndex: number | null;
1735
1751
  createdAt: string;
1736
1752
  updatedAt: string;
1737
1753
  }
@@ -1769,6 +1785,60 @@ export interface CatalogPhotoStudioAttachResult {
1769
1785
  job: CatalogPhotoStudioJob;
1770
1786
  product: CatalogProduct | null;
1771
1787
  }
1788
+ /** One image of a studio batch: a skill applied to one of the product's photos. */
1789
+ export interface CatalogPhotoStudioBatchItemInput {
1790
+ skill: CatalogPhotoStudioSkill;
1791
+ /** Must be one of the product's photos (`SOURCE_NOT_IN_PRODUCT`); omit / `null` → the platform picks the cover. */
1792
+ sourceUrl?: string | null;
1793
+ /** Short art-direction note, at most 140 characters (`NOTE_NOT_ALLOWED` when it asks for text to render). */
1794
+ note?: string;
1795
+ }
1796
+ /** Body of `studio.batchQuote`: 1..4 items sharing one palette. */
1797
+ export interface CatalogPhotoStudioBatchQuoteInput {
1798
+ items: CatalogPhotoStudioBatchItemInput[];
1799
+ palette?: CatalogPhotoStudioPalette;
1800
+ }
1801
+ export interface CatalogPhotoStudioBatchQuoteItem {
1802
+ skill: CatalogPhotoStudioSkill;
1803
+ sourceUrl: string | null;
1804
+ credits: number | null;
1805
+ output: CatalogPhotoStudioOutput;
1806
+ /** Delivered aspect ratio, e.g. `1:1`, `4:5`. */
1807
+ aspect: string;
1808
+ /** Paid steps the provider cannot price in advance (`remove_background` for transparent-master skills); charged on top of `credits`. */
1809
+ unpricedSteps?: string[];
1810
+ }
1811
+ /** `studio.batchQuote` result. Spends nothing. */
1812
+ export interface CatalogPhotoStudioBatchQuote {
1813
+ items: CatalogPhotoStudioBatchQuoteItem[];
1814
+ totalCredits: number;
1815
+ /** The workspace's Higgsfield balance now. */
1816
+ balance: number;
1817
+ /** Computed on `totalCredits` only: unpriced steps are not covered by it. */
1818
+ sufficient: boolean;
1819
+ /** False when at least one item has an unpriced paid step. */
1820
+ pricingComplete?: boolean;
1821
+ /** How many items have an unpriced paid step. */
1822
+ unpricedItems?: number;
1823
+ }
1824
+ /** Body of `studio.createBatch`. */
1825
+ export interface CreateCatalogPhotoStudioBatchInput extends CatalogPhotoStudioBatchQuoteInput {
1826
+ /** 8-128 chars of letters, digits and `. _ : -`. Same key, same request → the same batch. */
1827
+ idempotencyKey: string;
1828
+ /** The `totalCredits` the owner saw (`PRICE_CHANGED` when the price moved). */
1829
+ confirmedCredits: number;
1830
+ }
1831
+ /**
1832
+ * `studio.createBatch` result (HTTP 201 created / 200 replay). Errors carry stable codes: `PRICE_CHANGED`,
1833
+ * `INSUFFICIENT_CREDITS`, `ACTIVE_JOB_EXISTS`, `TENANT_JOB_CAP`, `PHOTO_REQUIRED`, `SOURCE_NOT_IN_PRODUCT`,
1834
+ * `NOTE_NOT_ALLOWED`, `HIGGSFIELD_RECONNECT`.
1835
+ */
1836
+ export interface CatalogPhotoStudioBatchCreated {
1837
+ batchId: string;
1838
+ jobs: CatalogPhotoStudioJob[];
1839
+ /** `true` on a replay of the same `idempotencyKey` (HTTP 200). Optional: absent until the platform sends it (read as `false`). */
1840
+ replayed?: boolean;
1841
+ }
1772
1842
  export interface SignCatalogPhotoUploadInput {
1773
1843
  /** image/jpeg, image/png, image/webp… (server whitelist). */
1774
1844
  contentType: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentforge-io/sdk-server",
3
- "version": "4.92.0",
3
+ "version": "4.94.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",