@openloaf-saas/sdk 0.1.33 → 0.1.35

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
@@ -741,11 +741,13 @@ declare class SaaSContract {
741
741
  variant: string;
742
742
  inputs?: Record<string, unknown> | undefined;
743
743
  params?: Record<string, unknown> | undefined;
744
+ stream?: boolean | undefined;
744
745
  }, {
745
746
  success: true;
746
747
  data: {
747
748
  text: string;
748
749
  creditsConsumed?: number | undefined;
750
+ taskId?: string | undefined;
749
751
  };
750
752
  }>;
751
753
  readonly v3Generate: Endpoint<{
@@ -2020,17 +2022,19 @@ declare const aiEndpoints: {
2020
2022
  updatedAt?: string | undefined;
2021
2023
  };
2022
2024
  }>;
2023
- /** Submit a v3 text generate request (sync, for translate/OCR/caption). */
2025
+ /** Submit a v3 text generate request (sync JSON or streaming SSE). */
2024
2026
  readonly v3TextGenerate: Endpoint<{
2025
2027
  feature: string;
2026
2028
  variant: string;
2027
2029
  inputs?: Record<string, unknown> | undefined;
2028
2030
  params?: Record<string, unknown> | undefined;
2031
+ stream?: boolean | undefined;
2029
2032
  }, {
2030
2033
  success: true;
2031
2034
  data: {
2032
2035
  text: string;
2033
2036
  creditsConsumed?: number | undefined;
2037
+ taskId?: string | undefined;
2034
2038
  };
2035
2039
  }>;
2036
2040
  /** Submit a v3 generate request. */
@@ -3712,6 +3716,7 @@ declare const v3TextGenerateRequestSchema: z.ZodObject<{
3712
3716
  variant: z.ZodString;
3713
3717
  inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3714
3718
  params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3719
+ stream: z.ZodOptional<z.ZodBoolean>;
3715
3720
  }, z.core.$strip>;
3716
3721
  /** v3 text generate response. */
3717
3722
  declare const v3TextGenerateResponseSchema: z.ZodObject<{
@@ -3719,6 +3724,7 @@ declare const v3TextGenerateResponseSchema: z.ZodObject<{
3719
3724
  data: z.ZodObject<{
3720
3725
  text: z.ZodString;
3721
3726
  creditsConsumed: z.ZodOptional<z.ZodNumber>;
3727
+ taskId: z.ZodOptional<z.ZodString>;
3722
3728
  }, z.core.$strip>;
3723
3729
  }, z.core.$strip>;
3724
3730
  /** Individual task item within a v3 response. */
@@ -4651,8 +4657,15 @@ declare class AiClient {
4651
4657
  updatedAt?: string | undefined;
4652
4658
  };
4653
4659
  }>;
4654
- /** Submit a v3 text generate request (sync, for translate/OCR/caption). */
4660
+ /** Submit a v3 text generate request (sync mode, returns parsed JSON). */
4655
4661
  v3TextGenerate(payload: V3TextGenerateRequest): Promise<V3TextGenerateResponse>;
4662
+ /**
4663
+ * Submit a v3 text generate request in streaming mode.
4664
+ * 返回原始 Response,调用方通过 response.body (ReadableStream) 消费 SSE 事件。
4665
+ * 每个 SSE event 的 data 字段是 OpenAI chat completions chunk 格式。
4666
+ * taskId 通过响应头 x-task-id 返回。
4667
+ */
4668
+ v3TextGenerateStream(payload: Omit<V3TextGenerateRequest, "stream">): Promise<Response>;
4656
4669
  /** Submit a v3 generate request (unified for all media types). */
4657
4670
  v3Generate(payload: V3GenerateRequest): Promise<{
4658
4671
  success: true;
@@ -5178,6 +5191,21 @@ declare const MEDIA_FEATURES: {
5178
5191
  readonly ja: "画像内のテキストを認識";
5179
5192
  };
5180
5193
  };
5194
+ readonly audioRecognize: {
5195
+ readonly id: "audioRecognize";
5196
+ readonly label: {
5197
+ readonly zh: "音频识别";
5198
+ readonly "zh-TW": "音訊辨識";
5199
+ readonly en: "Audio Recognition";
5200
+ readonly ja: "音声認識";
5201
+ };
5202
+ readonly description: {
5203
+ readonly zh: "识别音频中的语音内容并转录为文字";
5204
+ readonly "zh-TW": "辨識音訊中的語音內容並轉錄為文字";
5205
+ readonly en: "Recognize speech in audio and transcribe to text";
5206
+ readonly ja: "音声の内容を認識してテキストに書き起こす";
5207
+ };
5208
+ };
5181
5209
  readonly imageCaption: {
5182
5210
  readonly id: "imageCaption";
5183
5211
  readonly label: {
@@ -5193,6 +5221,21 @@ declare const MEDIA_FEATURES: {
5193
5221
  readonly ja: "画像のテキスト説明を自動生成";
5194
5222
  };
5195
5223
  };
5224
+ readonly videoCaption: {
5225
+ readonly id: "videoCaption";
5226
+ readonly label: {
5227
+ readonly zh: "视频描述";
5228
+ readonly "zh-TW": "影片描述";
5229
+ readonly en: "Video Caption";
5230
+ readonly ja: "動画キャプション";
5231
+ };
5232
+ readonly description: {
5233
+ readonly zh: "自动生成视频的文字描述";
5234
+ readonly "zh-TW": "自動生成影片的文字描述";
5235
+ readonly en: "Automatically generate text descriptions for videos";
5236
+ readonly ja: "動画のテキスト説明を自動生成";
5237
+ };
5238
+ };
5196
5239
  readonly musicGenerate: {
5197
5240
  readonly id: "musicGenerate";
5198
5241
  readonly label: {
@@ -7068,9 +7111,18 @@ declare class SkillMarketClient {
7068
7111
  private readonly sdk;
7069
7112
  /** Create skill market client. */
7070
7113
  constructor(sdk: SkillMarketSdkHost);
7071
- /** List marketplace skills with optional filters. */
7114
+ /** Build URL query string from params (skip undefined/null values). */
7115
+ private buildQuery;
7116
+ /**
7117
+ * List marketplace skills with optional filters.
7118
+ * @remarks Public endpoint — no authentication required.
7119
+ * Uses direct fetch because GET endpoints need query params, not JSON body.
7120
+ */
7072
7121
  list(params?: SkillMarketListRequest): Promise<SkillMarketListResponse>;
7073
- /** Fetch skill detail by id. */
7122
+ /**
7123
+ * Fetch skill detail by id.
7124
+ * @remarks Public endpoint — no authentication required.
7125
+ */
7074
7126
  detail(skillId: string, lang?: string): Promise<SkillMarketDetailResponse>;
7075
7127
  /**
7076
7128
  * Download a skill as ZIP archive.
@@ -7711,4 +7763,4 @@ declare function createTrpcClient(options: TrpcClientOptions): _trpc_client.TRPC
7711
7763
  transformer: false;
7712
7764
  }, _trpc_server.TRPCDecorateCreateRouterOptions<_trpc_server.TRPCCreateRouterOptions>>>;
7713
7765
 
7714
- export { AI_MODEL_CAPABILITY_INPUT_KEYS, AI_MODEL_CAPABILITY_OUTPUT_KEYS, AI_MODEL_TAGS, AI_MODEL_TAG_LABELS, type AiChatCompletionsRequest, type AiChatModel, type AiChatModelsResponse, type AiChatSessionMetadata, AiClient, type AiClientMetadata, type AiFileUploadOptions, type AiFileUploadResponse, type AiModel, type AiModelCapabilities, type AiModelCapabilitiesInput, type AiModelCapabilitiesOutput, type AiModelCapabilityInputKey, type AiModelCapabilityOutputKey, type AiModelTag, type AiModelsUpdatedAtData, type AiModelsUpdatedAtResponse, type AiProviderTemplate, type AiProviderTemplateModel, type AiProviderTemplatesResponse, type AiResponsesRequest, AiToolsClient, type AnalyzeSkillsRequest, type AnalyzeSkillsResponse, AuthClient, type AuthExchangeRequest, type AuthExchangeResponse, type AuthLogoutRequest, type AuthLogoutResponse, type AuthRefreshError, type AuthRefreshRequest, type AuthRefreshResponse, type AuthRefreshSuccess, AuxiliaryClient, type AuxiliaryInferRequest, type AuxiliaryInferResponse, type AuxiliaryQuota, type AuxiliaryQuotaResponse, type CreateEmbedOptions, type EmbedEventMap, type EmbedInstance, Endpoint, type FeedbackAttachmentResponse, FeedbackClient, type FeedbackDetailPayload, type FeedbackDetailRequest, type FeedbackDetailResponse, type FeedbackListPayload, type FeedbackListRequest, type FeedbackListResponse, type FeedbackSaasStatus, type FeedbackSource, type FeedbackSubmitError, type FeedbackSubmitRequest, type FeedbackSubmitResponse, type FeedbackType, type HeaderInput, type HttpMethod, MEDIA_FEATURES, MODEL_PROVIDERS, type MediaFeatureId, type ModelProviderId, type OrderStatusRequest, type OrderStatusResponse, PaymentClient, type RechargeRequest, type RechargeResponse, type RecommendActionsRequest, type RecommendActionsResponse, RedeemCodeClient, type RedeemCodeRecordItem, type RedeemCodeRecordsRequest, type RedeemCodeRecordsResponse, type RedeemCodeRedeemRequest, type RedeemCodeRedeemResponse, type RedeemCodeSummary, type RefundRequest, type RefundResponse, type ResponseType, SaaSClient, type SaaSClientOptions, SaaSContract, SaaSHttpError, SaaSNetworkError, SaaSSchemaError, type SkillArchiveFormat, type SkillListItem, type SkillOwnerSummary, type SkillSource, type SkillStatus, type SkillType, type SkillVersionSummary, type SkillVisibility, SkillsClient, type SkillsDetailResponse, type SkillsDownloadResponse, type SkillsListRequest, type SkillsListResponse, type SubscribeRequest, type SubscribeResponse, type SummarizeRequest, type SummarizeResponse, type TrpcClientOptions, type UpgradeRequest, type UpgradeResponse, UserClient, type UserMembershipLevel, type UserSelf, type UserSelfRequest, type UserSelfResponse, type V3BasicSuccess, type V3CapabilitiesData, type V3CapabilitiesResponse, type V3CreditEstimate, type V3EstimatePriceRequest, type V3EstimatePriceResponse, type V3Feature, type V3GenerateRequest, type V3InputSlot, type V3ParamSchema, type V3QueueRequest, type V3QueueResponse, type V3QueueTicket, type V3TaskCreated, type V3TaskGroupResponse, type V3TaskItem, type V3TaskResponse, type V3TaskSSEEvent, type V3TextGenerateRequest, type V3TextGenerateResponse, type V3UploadResponse, type V3Variant, aiChatCompletionsRequestSchema, aiChatModelSchema, aiChatModelsPayloadSchema, aiChatModelsResponseSchema, aiChatModelsSuccessSchema, aiChatSessionMetadataSchema, aiClientMetadataSchema, aiEndpoints, aiErrorResponseSchema, aiModelCapabilitiesInputSchema, aiModelCapabilitiesOutputSchema, aiModelCapabilitiesSchema, aiModelCapabilityCommonSchema, aiModelParameterFieldSchema, aiModelParamsSchema, aiModelSchema, aiModelsRequestSchema, aiModelsUpdatedAtDataSchema, aiModelsUpdatedAtResponseSchema, aiModelsUpdatedAtSuccessSchema, index$9 as aiModule, aiProviderTemplateModelSchema, aiProviderTemplateSchema, aiProviderTemplatesPayloadSchema, aiProviderTemplatesRequestSchema, aiProviderTemplatesResponseSchema, aiProviderTemplatesSuccessSchema, aiResponsesRequestSchema, aiToolsEndpoints, index$8 as aiToolsModule, analyzeSkillsRequestSchema, analyzeSkillsResponseSchema, authEndpoints, authExchangeRequestSchema, authExchangeResponseSchema, authLogoutRequestSchema, authLogoutResponseSchema, index$7 as authModule, authRefreshErrorSchema, authRefreshRequestSchema, authRefreshResponseSchema, authRefreshSuccessSchema, authRefreshUserSchema, auxiliaryEndpoints, auxiliaryInferRequestSchema, auxiliaryInferResponseSchema, index$6 as auxiliaryModule, auxiliaryQuotaResponseSchema, contract, createEmbed, createPricingEmbed, createRechargeEmbed, createTrpcClient, feedbackDetailPayloadSchema, feedbackDetailRequestSchema, feedbackDetailResponseSchema, feedbackEndpoints, feedbackItemSchema, feedbackListPayloadSchema, feedbackListRequestSchema, feedbackListResponseSchema, index$5 as feedbackModule, feedbackSaasStatusSchema, feedbackSourceSchema, feedbackSubmitErrorSchema, feedbackSubmitRequestSchema, feedbackSubmitResponseSchema, feedbackTypeSchema, inputSlotSchema, mergeHeaders, normalizeHeaders, orderStatusRequestSchema, orderStatusResponseSchema, paramSchemaSchema, paymentEndpoints, index$4 as paymentModule, rechargeRequestSchema, rechargeResponseSchema, recommendActionsRequestSchema, recommendActionsResponseSchema, redeemCodeEndpoints, redeemCodeMembershipLevelSchema, index$3 as redeemCodeModule, redeemCodeRecordItemSchema, redeemCodeRecordsRequestSchema, redeemCodeRecordsResponseSchema, redeemCodeRedeemRequestSchema, redeemCodeRedeemResponseSchema, redeemCodeSummarySchema, refundRequestSchema, refundResponseSchema, request, skillArchiveFormatSchema, skillListItemSchema, index$2 as skillMarketModule, skillOwnerSummarySchema, skillSourceSchema, skillStatusSchema, skillTypeSchema, skillVersionSummarySchema, skillVisibilitySchema, skillsDetailRequestSchema, skillsDetailResponseSchema, skillsDownloadResponseSchema, skillsEndpoints, skillsListRequestSchema, skillsListResponseSchema, index$1 as skillsModule, subscribeRequestSchema, subscribeResponseSchema, summarizeRequestSchema, summarizeResponseSchema, upgradeRequestSchema, upgradeResponseSchema, userEndpoints, userMembershipLevelSchema, index as userModule, userSelfRequestSchema, userSelfResponseSchema, userSelfSchema, v3BasicSuccessSchema, v3CapabilitiesDataSchema, v3CapabilitiesResponseSchema, v3CreditEstimateSchema, v3EstimatePriceRequestSchema, v3EstimatePriceResponseSchema, v3FeatureSchema, v3GenerateRequestSchema, v3QueueRequestSchema, v3QueueResponseSchema, v3QueueTicketSchema, v3TaskCreatedSchema, v3TaskGroupResponseSchema, v3TaskItemSchema, v3TaskResponseSchema, v3TaskSSEEventSchema, v3TextGenerateRequestSchema, v3TextGenerateResponseSchema, v3UploadResponseSchema, v3VariantSchema };
7766
+ export { AI_MODEL_CAPABILITY_INPUT_KEYS, AI_MODEL_CAPABILITY_OUTPUT_KEYS, AI_MODEL_TAGS, AI_MODEL_TAG_LABELS, type AiChatCompletionsRequest, type AiChatModel, type AiChatModelsResponse, type AiChatSessionMetadata, AiClient, type AiClientMetadata, type AiFileUploadOptions, type AiFileUploadResponse, type AiModel, type AiModelCapabilities, type AiModelCapabilitiesInput, type AiModelCapabilitiesOutput, type AiModelCapabilityInputKey, type AiModelCapabilityOutputKey, type AiModelTag, type AiModelsUpdatedAtData, type AiModelsUpdatedAtResponse, type AiProviderTemplate, type AiProviderTemplateModel, type AiProviderTemplatesResponse, type AiResponsesRequest, AiToolsClient, type AnalyzeSkillsRequest, type AnalyzeSkillsResponse, AuthClient, type AuthExchangeRequest, type AuthExchangeResponse, type AuthLogoutRequest, type AuthLogoutResponse, type AuthRefreshError, type AuthRefreshRequest, type AuthRefreshResponse, type AuthRefreshSuccess, AuxiliaryClient, type AuxiliaryInferRequest, type AuxiliaryInferResponse, type AuxiliaryQuota, type AuxiliaryQuotaResponse, type CreateEmbedOptions, type EmbedEventMap, type EmbedInstance, Endpoint, type FeedbackAttachmentResponse, FeedbackClient, type FeedbackDetailPayload, type FeedbackDetailRequest, type FeedbackDetailResponse, type FeedbackListPayload, type FeedbackListRequest, type FeedbackListResponse, type FeedbackSaasStatus, type FeedbackSource, type FeedbackSubmitError, type FeedbackSubmitRequest, type FeedbackSubmitResponse, type FeedbackType, type HeaderInput, type HttpMethod, MEDIA_FEATURES, MODEL_PROVIDERS, type MarketSkillEntry, type MediaFeatureId, type ModelProviderId, type OrderStatusRequest, type OrderStatusResponse, PaymentClient, type RechargeRequest, type RechargeResponse, type RecommendActionsRequest, type RecommendActionsResponse, RedeemCodeClient, type RedeemCodeRecordItem, type RedeemCodeRecordsRequest, type RedeemCodeRecordsResponse, type RedeemCodeRedeemRequest, type RedeemCodeRedeemResponse, type RedeemCodeSummary, type RefundRequest, type RefundResponse, type ResponseType, SaaSClient, type SaaSClientOptions, SaaSContract, SaaSHttpError, SaaSNetworkError, SaaSSchemaError, type SkillArchiveFormat, type SkillListItem, type SkillMarketCheckUpdatesRequest, type SkillMarketCheckUpdatesResponse, SkillMarketClient, type SkillMarketDetailResponse, type SkillMarketListRequest, type SkillMarketListResponse, type SkillMarketRateRequest, type SkillMarketRateResponse, type SkillOwnerSummary, type SkillSource, type SkillStatus, type SkillType, type SkillVersionSummary, type SkillVisibility, SkillsClient, type SkillsDetailResponse, type SkillsDownloadResponse, type SkillsListRequest, type SkillsListResponse, type SubscribeRequest, type SubscribeResponse, type SummarizeRequest, type SummarizeResponse, type TrpcClientOptions, type UpgradeRequest, type UpgradeResponse, UserClient, type UserMembershipLevel, type UserSelf, type UserSelfRequest, type UserSelfResponse, type V3BasicSuccess, type V3CapabilitiesData, type V3CapabilitiesResponse, type V3CreditEstimate, type V3EstimatePriceRequest, type V3EstimatePriceResponse, type V3Feature, type V3GenerateRequest, type V3InputSlot, type V3ParamSchema, type V3QueueRequest, type V3QueueResponse, type V3QueueTicket, type V3TaskCreated, type V3TaskGroupResponse, type V3TaskItem, type V3TaskResponse, type V3TaskSSEEvent, type V3TextGenerateRequest, type V3TextGenerateResponse, type V3UploadResponse, type V3Variant, aiChatCompletionsRequestSchema, aiChatModelSchema, aiChatModelsPayloadSchema, aiChatModelsResponseSchema, aiChatModelsSuccessSchema, aiChatSessionMetadataSchema, aiClientMetadataSchema, aiEndpoints, aiErrorResponseSchema, aiModelCapabilitiesInputSchema, aiModelCapabilitiesOutputSchema, aiModelCapabilitiesSchema, aiModelCapabilityCommonSchema, aiModelParameterFieldSchema, aiModelParamsSchema, aiModelSchema, aiModelsRequestSchema, aiModelsUpdatedAtDataSchema, aiModelsUpdatedAtResponseSchema, aiModelsUpdatedAtSuccessSchema, index$9 as aiModule, aiProviderTemplateModelSchema, aiProviderTemplateSchema, aiProviderTemplatesPayloadSchema, aiProviderTemplatesRequestSchema, aiProviderTemplatesResponseSchema, aiProviderTemplatesSuccessSchema, aiResponsesRequestSchema, aiToolsEndpoints, index$8 as aiToolsModule, analyzeSkillsRequestSchema, analyzeSkillsResponseSchema, authEndpoints, authExchangeRequestSchema, authExchangeResponseSchema, authLogoutRequestSchema, authLogoutResponseSchema, index$7 as authModule, authRefreshErrorSchema, authRefreshRequestSchema, authRefreshResponseSchema, authRefreshSuccessSchema, authRefreshUserSchema, auxiliaryEndpoints, auxiliaryInferRequestSchema, auxiliaryInferResponseSchema, index$6 as auxiliaryModule, auxiliaryQuotaResponseSchema, contract, createEmbed, createPricingEmbed, createRechargeEmbed, createTrpcClient, feedbackDetailPayloadSchema, feedbackDetailRequestSchema, feedbackDetailResponseSchema, feedbackEndpoints, feedbackItemSchema, feedbackListPayloadSchema, feedbackListRequestSchema, feedbackListResponseSchema, index$5 as feedbackModule, feedbackSaasStatusSchema, feedbackSourceSchema, feedbackSubmitErrorSchema, feedbackSubmitRequestSchema, feedbackSubmitResponseSchema, feedbackTypeSchema, inputSlotSchema, marketSkillEntrySchema, mergeHeaders, normalizeHeaders, orderStatusRequestSchema, orderStatusResponseSchema, paramSchemaSchema, paymentEndpoints, index$4 as paymentModule, rechargeRequestSchema, rechargeResponseSchema, recommendActionsRequestSchema, recommendActionsResponseSchema, redeemCodeEndpoints, redeemCodeMembershipLevelSchema, index$3 as redeemCodeModule, redeemCodeRecordItemSchema, redeemCodeRecordsRequestSchema, redeemCodeRecordsResponseSchema, redeemCodeRedeemRequestSchema, redeemCodeRedeemResponseSchema, redeemCodeSummarySchema, refundRequestSchema, refundResponseSchema, request, skillArchiveFormatSchema, skillListItemSchema, skillMarketCheckUpdatesRequestSchema, skillMarketCheckUpdatesResponseSchema, skillMarketDetailResponseSchema, skillMarketEndpoints, skillMarketListRequestSchema, skillMarketListResponseSchema, index$2 as skillMarketModule, skillMarketRateRequestSchema, skillMarketRateResponseSchema, skillOwnerSummarySchema, skillSourceSchema, skillStatusSchema, skillTypeSchema, skillVersionSummarySchema, skillVisibilitySchema, skillsDetailRequestSchema, skillsDetailResponseSchema, skillsDownloadResponseSchema, skillsEndpoints, skillsListRequestSchema, skillsListResponseSchema, index$1 as skillsModule, subscribeRequestSchema, subscribeResponseSchema, summarizeRequestSchema, summarizeResponseSchema, upgradeRequestSchema, upgradeResponseSchema, userEndpoints, userMembershipLevelSchema, index as userModule, userSelfRequestSchema, userSelfResponseSchema, userSelfSchema, v3BasicSuccessSchema, v3CapabilitiesDataSchema, v3CapabilitiesResponseSchema, v3CreditEstimateSchema, v3EstimatePriceRequestSchema, v3EstimatePriceResponseSchema, v3FeatureSchema, v3GenerateRequestSchema, v3QueueRequestSchema, v3QueueResponseSchema, v3QueueTicketSchema, v3TaskCreatedSchema, v3TaskGroupResponseSchema, v3TaskItemSchema, v3TaskResponseSchema, v3TaskSSEEventSchema, v3TextGenerateRequestSchema, v3TextGenerateResponseSchema, v3UploadResponseSchema, v3VariantSchema };