@flaqai/network 0.2.3
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/README.md +3 -0
- package/dist/account/index.d.mts +15 -0
- package/dist/account/index.mjs +1 -0
- package/dist/account/types.d.mts +7 -0
- package/dist/audio/index.d.mts +15 -0
- package/dist/audio/index.mjs +1 -0
- package/dist/audio/types.d.mts +39 -0
- package/dist/auth/index.d.mts +29 -0
- package/dist/auth/index.mjs +1 -0
- package/dist/auth/types.d.mts +81 -0
- package/dist/billing/index.d.mts +34 -0
- package/dist/billing/index.mjs +1 -0
- package/dist/billing/types.d.mts +99 -0
- package/dist/blog/index.d.mts +19 -0
- package/dist/blog/index.mjs +1 -0
- package/dist/blog/types.d.mts +117 -0
- package/dist/client.d.mts +5 -0
- package/dist/client.mjs +1 -0
- package/dist/collection/index.d.mts +21 -0
- package/dist/collection/index.mjs +1 -0
- package/dist/collection/types.d.mts +38 -0
- package/dist/core/compact-request.mjs +1 -0
- package/dist/core/create-get-fetcher.d.mts +5 -0
- package/dist/core/create-get-fetcher.mjs +1 -0
- package/dist/core/create-json-fetch.mjs +1 -0
- package/dist/core/merge-request-data.mjs +1 -0
- package/dist/core/query-string.mjs +1 -0
- package/dist/core/types.d.mts +25 -0
- package/dist/feedback/index.d.mts +9 -0
- package/dist/feedback/index.mjs +1 -0
- package/dist/feedback/types.d.mts +9 -0
- package/dist/image/index.d.mts +43 -0
- package/dist/image/index.mjs +1 -0
- package/dist/image/types.d.mts +290 -0
- package/dist/index.d.mts +26 -0
- package/dist/index.mjs +1 -0
- package/dist/music/index.d.mts +26 -0
- package/dist/music/index.mjs +1 -0
- package/dist/music/types.d.mts +97 -0
- package/dist/prompt/index.d.mts +24 -0
- package/dist/prompt/index.mjs +1 -0
- package/dist/prompt/types.d.mts +35 -0
- package/dist/server.d.mts +5 -0
- package/dist/server.mjs +1 -0
- package/dist/shared-types.d.mts +18 -0
- package/dist/types.d.mts +25 -0
- package/dist/types.mjs +1 -0
- package/dist/video/index.d.mts +36 -0
- package/dist/video/index.mjs +1 -0
- package/dist/video/types.d.mts +207 -0
- package/package.json +48 -0
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Awaitable, CreateGetFetcherOptions, FetcherKey, JsonFetchOptions, JsonFetchRuntimeConfig, JsonFetcher, JsonRequest } from "./core/types.mjs";
|
|
2
|
+
import { MediaCollection, ResponseBase, ResponseData, ResponseRows } from "./shared-types.mjs";
|
|
3
|
+
import { AccountMutationResponse, DeleteAccountResponse, ShareRewardResponse } from "./account/types.mjs";
|
|
4
|
+
import { ACCOUNT_ROUTES, createAccountNetwork } from "./account/index.mjs";
|
|
5
|
+
import { AudioHistoryItem, AudioHistoryRequest, AudioHistoryResponse, AudioType, CreateAudioData, CreateAudioRequest, CreateAudioResponse, DeleteAudioRequest, DeleteAudioResponse } from "./audio/types.mjs";
|
|
6
|
+
import { AUDIO_ROUTES, createAudioNetwork } from "./audio/index.mjs";
|
|
7
|
+
import { AuthMutationResponse, CountryResponse, GetUserInfoRequest, LoginData, LoginRequest, LoginResponse, RegisterRequest, RegisterV2Request, ResetPasswordRequest, SendVerificationEmailRequest, SocialBindingRequest, SocialBindingResponse, UserInfoData, UserInfoResponse, VerifyEmailRequest } from "./auth/types.mjs";
|
|
8
|
+
import { AUTH_ROUTES, createAuthNetwork } from "./auth/index.mjs";
|
|
9
|
+
import { BillingMutationResponse, CancelSubscriptionByMemberCardIdRequest, CancelSubscriptionByMemberCardIdResponse, CancelSubscriptionRequest, CapturePaypalOrderRequest, CreateOrderRequest, CreateOrderResponse, CreateOrderV2Request, CreatePaypalOrderRequest, CreatePaypalOrderResponse, CreatePaypalSubscriptionResponse, CustomerPortalRequest, CustomerPortalResponse, ManageSubscriptionRequest, ManageSubscriptionResponse, OrderHistoryItem, OrderHistoryRequest, OrderHistoryResponse, PaymentVendor, SubscriptionUpgradeData, SubscriptionUpgradeRequest, SubscriptionUpgradeResponse, UpgradeSubscriptionRequest } from "./billing/types.mjs";
|
|
10
|
+
import { BILLING_ROUTES, createBillingNetwork } from "./billing/index.mjs";
|
|
11
|
+
import { BlogDetail, BlogDetailRequest, BlogDetailResponse, BlogIdsResponse, BlogListData, BlogListItem, BlogListRequest, BlogListResponse, BlogModule, BlogRecommendItem, BlogRecommendRequest, BlogRecommendResponse, BlogVoteRequest, BlogVoteResponse, RecommendedBlog } from "./blog/types.mjs";
|
|
12
|
+
import { BLOG_ROUTES, createBlogNetwork } from "./blog/index.mjs";
|
|
13
|
+
import { AddMediaToCollectionRequest, CollectionListItem, CollectionListRequest, CollectionListResponse, CollectionMutationResponse, CreateCollectionRequest, DeleteCollectionRequest, MediaCollectionData, MediaType, RemoveMediaFromCollectionRequest, UpdateCollectionRequest } from "./collection/types.mjs";
|
|
14
|
+
import { COLLECTION_ROUTES, createCollectionNetwork } from "./collection/index.mjs";
|
|
15
|
+
import { SendFeedbackRequest, SendFeedbackResponse } from "./feedback/types.mjs";
|
|
16
|
+
import { FEEDBACK_ROUTE, createFeedbackNetwork } from "./feedback/index.mjs";
|
|
17
|
+
import { AsyncImageGenerationData, AsyncImageGenerationResponse, DeleteImageRequest, DeleteImageResponse, DeleteImagesRequest, ExploreImagesData, ExploreImagesRequest, ExploreImagesResponse, ExploreImagesV2Request, ExploreImagesV2Response, FaceRatingData, FaceRatingRequest, FaceRatingResponse, GeneratedImageRecord, ImageCategory, ImageDetail, ImageDetailRequest, ImageDetailResponse, ImageGenerationRecord, ImageGenerationRecordV2, ImageGenerationRequest, ImageHistoryItem, ImageHistoryRequest, ImageHistoryResponse, ImageHistoryStatus, ImageStatisticsData, ImageStatisticsDatum, ImageStatisticsPeriod, ImageStatisticsRequest, ImageStatisticsResponse, LegacyImageHistoryRequest, LegacyImageHistoryResponse, PollImageGenerationRequest, RemoveImageBackgroundRequest, RemoveImageBackgroundResponse, SignedUrlItem, SignedUrlRequest, SignedUrlResponse, UpdateImageVisibilityRequest, UpdateImageVisibilityResponse } from "./image/types.mjs";
|
|
18
|
+
import { IMAGE_HISTORY_ROUTE, IMAGE_ROUTES, IMAGE_SIGNED_URL_ROUTE, createImageNetwork } from "./image/index.mjs";
|
|
19
|
+
import { DeleteMusicBatchRequest, DeleteMusicRequest, DeleteMusicResponse, DetectMusicRequest, DetectMusicResponse, GenerateMusicRequest, GenerateMusicResponse, MusicDetection, MusicHistoryItem, MusicHistoryRequest, MusicHistoryResponse, MusicHistoryStatus, MusicPromptRequest, MusicPromptResponse } from "./music/types.mjs";
|
|
20
|
+
import { MUSIC_HISTORY_ROUTE, MUSIC_ROUTES, createMusicNetwork } from "./music/index.mjs";
|
|
21
|
+
import { AudioPromptRequest, ImageDescriptionRequest, ImageForVideoPromptRequest, ImageToPromptModel, ImageToPromptRequest, ImageToPromptWithModelRequest, ModelPromptRequest, OptimizedPromptResponse, PromptRequest, PromptResponse } from "./prompt/types.mjs";
|
|
22
|
+
import { PROMPT_ROUTES, createPromptNetwork } from "./prompt/index.mjs";
|
|
23
|
+
import { DeleteVideoRequest, DeleteVideoResponse, DeleteVideosRequest, ExtendVideoRequest, ExtendVideoResponse, GenerateAsyncVideoRequest, GenerateAsyncVideoResponse, GenerateMultiModelVideoRequest, GenerateMultiModelVideoResponse, GenerateVideoRequest, GenerateVideoResponse, GenerateVideoWithAudioRequest, GenerateVideoWithAudioResponse, PollVideoData, PollVideoRequest, PollVideoResponse, UpdateVideoVisibilityRequest, UpdateVideoVisibilityResponse, VideoDetail, VideoDetailRequest, VideoDetailResponse, VideoExample, VideoExamplesRequest, VideoExamplesResponse, VideoHistoryItem, VideoHistoryRequest, VideoHistoryResponse, VideoHistoryStatus, VideoModelRequest, VideoStatisticsData, VideoStatisticsDatum, VideoStatisticsPeriod, VideoStatisticsRequest, VideoStatisticsResponse, VideoSubject } from "./video/types.mjs";
|
|
24
|
+
import { VIDEO_HISTORY_ROUTE, VIDEO_ROUTES, createVideoNetwork } from "./video/index.mjs";
|
|
25
|
+
export type { ACCOUNT_ROUTES, AUDIO_ROUTES, AUTH_ROUTES, AccountMutationResponse, AddMediaToCollectionRequest, AsyncImageGenerationData, AsyncImageGenerationResponse, AudioHistoryItem, AudioHistoryRequest, AudioHistoryResponse, AudioPromptRequest, AudioType, AuthMutationResponse, Awaitable, BILLING_ROUTES, BLOG_ROUTES, BillingMutationResponse, BlogDetail, BlogDetailRequest, BlogDetailResponse, BlogIdsResponse, BlogListData, BlogListItem, BlogListRequest, BlogListResponse, BlogModule, BlogRecommendItem, BlogRecommendRequest, BlogRecommendResponse, BlogVoteRequest, BlogVoteResponse, COLLECTION_ROUTES, CancelSubscriptionByMemberCardIdRequest, CancelSubscriptionByMemberCardIdResponse, CancelSubscriptionRequest, CapturePaypalOrderRequest, CollectionListItem, CollectionListRequest, CollectionListResponse, CollectionMutationResponse, CountryResponse, CreateAudioData, CreateAudioRequest, CreateAudioResponse, CreateCollectionRequest, CreateGetFetcherOptions, CreateOrderRequest, CreateOrderResponse, CreateOrderV2Request, CreatePaypalOrderRequest, CreatePaypalOrderResponse, CreatePaypalSubscriptionResponse, CustomerPortalRequest, CustomerPortalResponse, DeleteAccountResponse, DeleteAudioRequest, DeleteAudioResponse, DeleteCollectionRequest, DeleteImageRequest, DeleteImageResponse, DeleteImagesRequest, DeleteMusicBatchRequest, DeleteMusicRequest, DeleteMusicResponse, DeleteVideoRequest, DeleteVideoResponse, DeleteVideosRequest, DetectMusicRequest, DetectMusicResponse, ExploreImagesData, ExploreImagesRequest, ExploreImagesResponse, ExploreImagesV2Request, ExploreImagesV2Response, ExtendVideoRequest, ExtendVideoResponse, FEEDBACK_ROUTE, FaceRatingData, FaceRatingRequest, FaceRatingResponse, FetcherKey, GenerateAsyncVideoRequest, GenerateAsyncVideoResponse, GenerateMultiModelVideoRequest, GenerateMultiModelVideoResponse, GenerateMusicRequest, GenerateMusicResponse, GenerateVideoRequest, GenerateVideoResponse, GenerateVideoWithAudioRequest, GenerateVideoWithAudioResponse, GeneratedImageRecord, GetUserInfoRequest, IMAGE_HISTORY_ROUTE, IMAGE_ROUTES, IMAGE_SIGNED_URL_ROUTE, ImageCategory, ImageDescriptionRequest, ImageDetail, ImageDetailRequest, ImageDetailResponse, ImageForVideoPromptRequest, ImageGenerationRecord, ImageGenerationRecordV2, ImageGenerationRequest, ImageHistoryItem, ImageHistoryRequest, ImageHistoryResponse, ImageHistoryStatus, ImageStatisticsData, ImageStatisticsDatum, ImageStatisticsPeriod, ImageStatisticsRequest, ImageStatisticsResponse, ImageToPromptModel, ImageToPromptRequest, ImageToPromptWithModelRequest, JsonFetchOptions, JsonFetchRuntimeConfig, JsonFetcher, JsonRequest, LegacyImageHistoryRequest, LegacyImageHistoryResponse, LoginData, LoginRequest, LoginResponse, MUSIC_HISTORY_ROUTE, MUSIC_ROUTES, ManageSubscriptionRequest, ManageSubscriptionResponse, MediaCollection, MediaCollectionData, MediaType, ModelPromptRequest, MusicDetection, MusicHistoryItem, MusicHistoryRequest, MusicHistoryResponse, MusicHistoryStatus, MusicPromptRequest, MusicPromptResponse, OptimizedPromptResponse, OrderHistoryItem, OrderHistoryRequest, OrderHistoryResponse, PROMPT_ROUTES, PaymentVendor, PollImageGenerationRequest, PollVideoData, PollVideoRequest, PollVideoResponse, PromptRequest, PromptResponse, RecommendedBlog, RegisterRequest, RegisterV2Request, RemoveImageBackgroundRequest, RemoveImageBackgroundResponse, RemoveMediaFromCollectionRequest, ResetPasswordRequest, ResponseBase, ResponseData, ResponseRows, SendFeedbackRequest, SendFeedbackResponse, SendVerificationEmailRequest, ShareRewardResponse, SignedUrlItem, SignedUrlRequest, SignedUrlResponse, SocialBindingRequest, SocialBindingResponse, SubscriptionUpgradeData, SubscriptionUpgradeRequest, SubscriptionUpgradeResponse, UpdateCollectionRequest, UpdateImageVisibilityRequest, UpdateImageVisibilityResponse, UpdateVideoVisibilityRequest, UpdateVideoVisibilityResponse, UpgradeSubscriptionRequest, UserInfoData, UserInfoResponse, VIDEO_HISTORY_ROUTE, VIDEO_ROUTES, VerifyEmailRequest, VideoDetail, VideoDetailRequest, VideoDetailResponse, VideoExample, VideoExamplesRequest, VideoExamplesResponse, VideoHistoryItem, VideoHistoryRequest, VideoHistoryResponse, VideoHistoryStatus, VideoModelRequest, VideoStatisticsData, VideoStatisticsDatum, VideoStatisticsPeriod, VideoStatisticsRequest, VideoStatisticsResponse, VideoSubject, createAccountNetwork, createAudioNetwork, createAuthNetwork, createBillingNetwork, createBlogNetwork, createCollectionNetwork, createFeedbackNetwork, createImageNetwork, createMusicNetwork, createPromptNetwork, createVideoNetwork };
|
package/dist/types.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { JsonFetcher } from "../core/types.mjs";
|
|
2
|
+
import { DeleteVideoRequest, DeleteVideoResponse, DeleteVideosRequest, ExtendVideoRequest, ExtendVideoResponse, GenerateAsyncVideoRequest, GenerateAsyncVideoResponse, GenerateMultiModelVideoRequest, GenerateMultiModelVideoResponse, GenerateVideoRequest, GenerateVideoResponse, GenerateVideoWithAudioRequest, GenerateVideoWithAudioResponse, PollVideoData, PollVideoRequest, PollVideoResponse, UpdateVideoVisibilityRequest, UpdateVideoVisibilityResponse, VideoDetail, VideoDetailRequest, VideoDetailResponse, VideoExample, VideoExamplesRequest, VideoExamplesResponse, VideoHistoryItem, VideoHistoryRequest, VideoHistoryResponse, VideoHistoryStatus, VideoModelRequest, VideoStatisticsData, VideoStatisticsDatum, VideoStatisticsPeriod, VideoStatisticsRequest, VideoStatisticsResponse, VideoSubject } from "./types.mjs";
|
|
3
|
+
//#region src/video/index.d.ts
|
|
4
|
+
declare const VIDEO_HISTORY_ROUTE = "/video/history";
|
|
5
|
+
declare const VIDEO_ROUTES: {
|
|
6
|
+
readonly history: "/video/history";
|
|
7
|
+
readonly generate: '/video/genVideo';
|
|
8
|
+
readonly extend: '/video/genVideoExtendAsync';
|
|
9
|
+
readonly result: '/video/result';
|
|
10
|
+
readonly delete: '/video/delete';
|
|
11
|
+
readonly deleteBatch: '/video/batchDelete';
|
|
12
|
+
readonly generateMultiModel: '/video/genVideoAsyncMultiModel';
|
|
13
|
+
readonly generateWithAudio: '/video/genVideoAsync/lipsync';
|
|
14
|
+
readonly updateVisibility: '/video/updateVideo';
|
|
15
|
+
readonly examples: '/video/example';
|
|
16
|
+
readonly detail: '/video/detail';
|
|
17
|
+
readonly generateAsync: '/video/genVideoAsync';
|
|
18
|
+
readonly statistics: '/video/statistics';
|
|
19
|
+
};
|
|
20
|
+
declare function createVideoNetwork(appFetch: JsonFetcher): {
|
|
21
|
+
readonly history: (request: VideoHistoryRequest) => Promise<VideoHistoryResponse>;
|
|
22
|
+
readonly generate: (request: GenerateVideoRequest) => Promise<GenerateVideoResponse>;
|
|
23
|
+
readonly extend: (request: ExtendVideoRequest) => Promise<ExtendVideoResponse>;
|
|
24
|
+
readonly pollByTraceId: (request: PollVideoRequest) => Promise<PollVideoResponse>;
|
|
25
|
+
readonly deleteById: (request: DeleteVideoRequest) => Promise<DeleteVideoResponse>;
|
|
26
|
+
readonly deleteBatch: (request: DeleteVideosRequest) => Promise<DeleteVideoResponse>;
|
|
27
|
+
readonly generateMultiModel: (request: GenerateMultiModelVideoRequest) => Promise<GenerateMultiModelVideoResponse>;
|
|
28
|
+
readonly generateWithAudio: (request: GenerateVideoWithAudioRequest) => Promise<GenerateVideoWithAudioResponse>;
|
|
29
|
+
readonly updateVisibility: (request: UpdateVideoVisibilityRequest) => Promise<UpdateVideoVisibilityResponse>;
|
|
30
|
+
readonly examples: (request: VideoExamplesRequest) => Promise<VideoExamplesResponse>;
|
|
31
|
+
readonly getById: (request: VideoDetailRequest) => Promise<VideoDetailResponse>;
|
|
32
|
+
readonly generateAsync: (request: GenerateAsyncVideoRequest) => Promise<GenerateAsyncVideoResponse>;
|
|
33
|
+
readonly statistics: (request: VideoStatisticsRequest) => Promise<VideoStatisticsResponse>;
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { type DeleteVideoRequest, type DeleteVideoResponse, type DeleteVideosRequest, type ExtendVideoRequest, type ExtendVideoResponse, type GenerateAsyncVideoRequest, type GenerateAsyncVideoResponse, type GenerateMultiModelVideoRequest, type GenerateMultiModelVideoResponse, type GenerateVideoRequest, type GenerateVideoResponse, type GenerateVideoWithAudioRequest, type GenerateVideoWithAudioResponse, type PollVideoData, type PollVideoRequest, type PollVideoResponse, type UpdateVideoVisibilityRequest, type UpdateVideoVisibilityResponse, VIDEO_HISTORY_ROUTE, VIDEO_ROUTES, type VideoDetail, type VideoDetailRequest, type VideoDetailResponse, type VideoExample, type VideoExamplesRequest, type VideoExamplesResponse, type VideoHistoryItem, type VideoHistoryRequest, type VideoHistoryResponse, type VideoHistoryStatus, type VideoModelRequest, type VideoStatisticsData, type VideoStatisticsDatum, type VideoStatisticsPeriod, type VideoStatisticsRequest, type VideoStatisticsResponse, type VideoSubject, createVideoNetwork };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{compactRequest as e}from"../core/compact-request.mjs";const t=`/video/history`,n={history:t,generate:`/video/genVideo`,extend:`/video/genVideoExtendAsync`,result:`/video/result`,delete:`/video/delete`,deleteBatch:`/video/batchDelete`,generateMultiModel:`/video/genVideoAsyncMultiModel`,generateWithAudio:`/video/genVideoAsync/lipsync`,updateVisibility:`/video/updateVideo`,examples:`/video/example`,detail:`/video/detail`,generateAsync:`/video/genVideoAsync`,statistics:`/video/statistics`};function r(r){return{history(e){return r([t,e],{method:`GET`})},generate(t){return r(n.generate,{body:e(t),method:`POST`})},extend(e){return r(n.extend,{body:e,method:`POST`})},pollByTraceId(e){return r([n.result,e],{method:`GET`})},deleteById(e){return r([n.delete,e],{method:`DELETE`})},deleteBatch(e){return r(n.deleteBatch,{body:e,method:`POST`})},generateMultiModel(e){return r(n.generateMultiModel,{body:e,method:`POST`})},generateWithAudio(e){return r(n.generateWithAudio,{body:e,method:`POST`})},updateVisibility(e){return r(n.updateVisibility,{body:e,method:`POST`})},examples(e){return r([n.examples,e],{method:`GET`})},getById(e){return r([n.detail,e],{method:`GET`})},generateAsync(t){return r(n.generateAsync,{body:e(t),method:`POST`})},statistics(e){return r([n.statistics,e],{method:`GET`})}}}export{t as VIDEO_HISTORY_ROUTE,n as VIDEO_ROUTES,r as createVideoNetwork};
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { MediaCollection, ResponseData, ResponseRows } from "../shared-types.mjs";
|
|
2
|
+
//#region src/video/types.d.ts
|
|
3
|
+
type VideoHistoryStatus = 'pending' | 'processing' | 'completed' | 'fail';
|
|
4
|
+
interface VideoHistoryRequest extends Record<string, unknown> {
|
|
5
|
+
readonly pageNum: number;
|
|
6
|
+
readonly pageSize: number;
|
|
7
|
+
readonly videoType?: string;
|
|
8
|
+
readonly startTimeStamp?: number;
|
|
9
|
+
readonly endTimeStamp?: number;
|
|
10
|
+
readonly isPublic?: number;
|
|
11
|
+
readonly collectionId?: string;
|
|
12
|
+
}
|
|
13
|
+
interface VideoHistoryItem {
|
|
14
|
+
readonly status: VideoHistoryStatus;
|
|
15
|
+
readonly coverImage: string;
|
|
16
|
+
readonly createTime: number;
|
|
17
|
+
readonly credit: number;
|
|
18
|
+
readonly errorInfo: string;
|
|
19
|
+
readonly faceSwapImageResult: string;
|
|
20
|
+
readonly faceSwapVideoResult: string;
|
|
21
|
+
readonly id: string;
|
|
22
|
+
readonly imageEndUrl: string;
|
|
23
|
+
readonly imageUrl: string;
|
|
24
|
+
readonly isAllowExtend: boolean;
|
|
25
|
+
readonly isPublic: number;
|
|
26
|
+
readonly prompt: string;
|
|
27
|
+
readonly ratio: string;
|
|
28
|
+
readonly swapImage: string;
|
|
29
|
+
readonly targetImage: string;
|
|
30
|
+
readonly targetVideo: string;
|
|
31
|
+
readonly traceId: string;
|
|
32
|
+
readonly videoUrl: string;
|
|
33
|
+
readonly duration: number;
|
|
34
|
+
readonly mediaCollections: readonly MediaCollection[];
|
|
35
|
+
readonly modelInfo?: string;
|
|
36
|
+
readonly platformModel?: string;
|
|
37
|
+
readonly platformName: string;
|
|
38
|
+
}
|
|
39
|
+
type VideoHistoryResponse = ResponseRows<readonly VideoHistoryItem[]>;
|
|
40
|
+
interface GenerateVideoRequest extends Record<string, unknown> {
|
|
41
|
+
readonly imageEndId?: string;
|
|
42
|
+
readonly imageEndUrl?: string;
|
|
43
|
+
readonly imageId?: string;
|
|
44
|
+
readonly imageUrl?: string;
|
|
45
|
+
readonly model: string;
|
|
46
|
+
readonly prompt: string;
|
|
47
|
+
}
|
|
48
|
+
interface ExtendVideoRequest extends Record<string, unknown> {
|
|
49
|
+
readonly prompt: string;
|
|
50
|
+
readonly videoId: string;
|
|
51
|
+
}
|
|
52
|
+
interface PollVideoRequest extends Record<string, unknown> {
|
|
53
|
+
readonly traceId: string;
|
|
54
|
+
}
|
|
55
|
+
interface PollVideoData {
|
|
56
|
+
readonly status: string;
|
|
57
|
+
readonly videoThumbnailUrl?: string | null;
|
|
58
|
+
readonly videoUrl: string;
|
|
59
|
+
readonly message?: string;
|
|
60
|
+
}
|
|
61
|
+
interface DeleteVideoRequest extends Record<string, unknown> {
|
|
62
|
+
readonly videoId: string;
|
|
63
|
+
}
|
|
64
|
+
interface DeleteVideosRequest extends Record<string, unknown> {
|
|
65
|
+
readonly videoIds: readonly string[];
|
|
66
|
+
}
|
|
67
|
+
interface VideoModelRequest {
|
|
68
|
+
readonly model: string;
|
|
69
|
+
readonly platformType: number;
|
|
70
|
+
}
|
|
71
|
+
interface GenerateMultiModelVideoRequest extends Record<string, unknown> {
|
|
72
|
+
readonly imageEndUrl?: string | null;
|
|
73
|
+
readonly imageUrl?: string | null;
|
|
74
|
+
readonly prompt: string;
|
|
75
|
+
readonly ratio?: string | null;
|
|
76
|
+
readonly videoType: string;
|
|
77
|
+
readonly models: readonly VideoModelRequest[];
|
|
78
|
+
}
|
|
79
|
+
interface GenerateVideoWithAudioRequest extends Record<string, unknown> {
|
|
80
|
+
readonly audioOrder?: string;
|
|
81
|
+
readonly audioUrl?: string;
|
|
82
|
+
readonly audioUrlList?: readonly string[];
|
|
83
|
+
readonly imageUrl?: string;
|
|
84
|
+
readonly ratio?: string;
|
|
85
|
+
readonly prompt?: string;
|
|
86
|
+
readonly model: string;
|
|
87
|
+
readonly platformType: number;
|
|
88
|
+
readonly videoType: string;
|
|
89
|
+
}
|
|
90
|
+
interface UpdateVideoVisibilityRequest extends Record<string, unknown> {
|
|
91
|
+
readonly videoId: string;
|
|
92
|
+
readonly isPublic: 0 | 1;
|
|
93
|
+
}
|
|
94
|
+
interface VideoExamplesRequest extends Record<string, unknown> {
|
|
95
|
+
readonly pageNum: number;
|
|
96
|
+
readonly pageSize: number;
|
|
97
|
+
}
|
|
98
|
+
interface VideoExample {
|
|
99
|
+
readonly categoryName: string;
|
|
100
|
+
readonly coverImage: string;
|
|
101
|
+
readonly duration: number;
|
|
102
|
+
readonly id: string;
|
|
103
|
+
readonly imageEndUrl: string;
|
|
104
|
+
readonly imageUrl: string;
|
|
105
|
+
readonly prompt: string;
|
|
106
|
+
readonly videoUrl: string;
|
|
107
|
+
}
|
|
108
|
+
interface VideoDetailRequest extends Record<string, unknown> {
|
|
109
|
+
readonly videoId: string;
|
|
110
|
+
}
|
|
111
|
+
interface VideoDetail {
|
|
112
|
+
readonly categoryName: string;
|
|
113
|
+
readonly createTime: number;
|
|
114
|
+
readonly credit: string;
|
|
115
|
+
readonly errorInfo: string;
|
|
116
|
+
readonly id: string;
|
|
117
|
+
readonly imageEndUrl: string;
|
|
118
|
+
readonly imageUrl: string;
|
|
119
|
+
readonly prompt: string;
|
|
120
|
+
readonly status: string;
|
|
121
|
+
readonly traceId: string;
|
|
122
|
+
readonly videoThumbnailUrl: string;
|
|
123
|
+
readonly videoUrl: string;
|
|
124
|
+
readonly isAllowExtend?: boolean;
|
|
125
|
+
readonly isFeatured?: number;
|
|
126
|
+
readonly isPublic?: number;
|
|
127
|
+
readonly userId?: string;
|
|
128
|
+
}
|
|
129
|
+
type GenerateVideoResponse = ResponseData<{
|
|
130
|
+
readonly traceId: string;
|
|
131
|
+
}>;
|
|
132
|
+
type ExtendVideoResponse = ResponseData<{
|
|
133
|
+
readonly traceId: string;
|
|
134
|
+
}>;
|
|
135
|
+
type PollVideoResponse = ResponseData<PollVideoData>;
|
|
136
|
+
type DeleteVideoResponse = ResponseData<null>;
|
|
137
|
+
type GenerateMultiModelVideoResponse = ResponseData<null>;
|
|
138
|
+
type GenerateVideoWithAudioResponse = ResponseData<{
|
|
139
|
+
readonly credit: number;
|
|
140
|
+
}>;
|
|
141
|
+
type UpdateVideoVisibilityResponse = ResponseData<null>;
|
|
142
|
+
type VideoExamplesResponse = ResponseRows<readonly VideoExample[]>;
|
|
143
|
+
type VideoDetailResponse = ResponseData<VideoDetail>;
|
|
144
|
+
interface VideoSubject {
|
|
145
|
+
readonly id: string;
|
|
146
|
+
readonly urls: readonly string[];
|
|
147
|
+
}
|
|
148
|
+
interface GenerateAsyncVideoRequest extends Record<string, unknown> {
|
|
149
|
+
readonly subjects?: {
|
|
150
|
+
readonly images?: readonly VideoSubject[];
|
|
151
|
+
readonly videos?: readonly VideoSubject[];
|
|
152
|
+
readonly audios?: readonly VideoSubject[];
|
|
153
|
+
};
|
|
154
|
+
readonly nsfwFilter?: boolean;
|
|
155
|
+
readonly isPublic?: number;
|
|
156
|
+
readonly isTranslate?: boolean;
|
|
157
|
+
readonly style?: string;
|
|
158
|
+
readonly motions?: readonly {
|
|
159
|
+
readonly motionId?: string;
|
|
160
|
+
readonly strength?: number;
|
|
161
|
+
}[];
|
|
162
|
+
readonly imageEndUrl?: string;
|
|
163
|
+
readonly imageUrlList?: readonly string[];
|
|
164
|
+
readonly imageUrl?: string;
|
|
165
|
+
readonly audioUrl?: string;
|
|
166
|
+
readonly audioUrlList?: readonly string[];
|
|
167
|
+
readonly audioOrder?: string;
|
|
168
|
+
readonly model: string;
|
|
169
|
+
readonly negative_prompt?: string;
|
|
170
|
+
readonly platformType: number;
|
|
171
|
+
readonly prompt: string;
|
|
172
|
+
readonly videoUrlList?: readonly string[];
|
|
173
|
+
readonly videoUrl?: string;
|
|
174
|
+
readonly videoType?: string;
|
|
175
|
+
readonly width?: number;
|
|
176
|
+
readonly height?: number;
|
|
177
|
+
readonly templateId?: string;
|
|
178
|
+
readonly ratio?: string;
|
|
179
|
+
readonly mode?: string;
|
|
180
|
+
}
|
|
181
|
+
type GenerateAsyncVideoResponse = ResponseData<{
|
|
182
|
+
readonly traceId: string;
|
|
183
|
+
readonly credit?: number;
|
|
184
|
+
}>;
|
|
185
|
+
interface VideoStatisticsRequest extends Record<string, unknown> {
|
|
186
|
+
readonly startTimeStamp: number;
|
|
187
|
+
readonly endTimeStamp: number;
|
|
188
|
+
}
|
|
189
|
+
interface VideoStatisticsDatum {
|
|
190
|
+
readonly totalCredits: number;
|
|
191
|
+
readonly totalVideos: number;
|
|
192
|
+
readonly videoType: string;
|
|
193
|
+
}
|
|
194
|
+
interface VideoStatisticsPeriod {
|
|
195
|
+
readonly data: readonly VideoStatisticsDatum[];
|
|
196
|
+
readonly statisticsDate: number;
|
|
197
|
+
readonly totalCredits: number;
|
|
198
|
+
readonly totalVideos: number;
|
|
199
|
+
}
|
|
200
|
+
interface VideoStatisticsData {
|
|
201
|
+
readonly totalCredits: number;
|
|
202
|
+
readonly totalVideos: number;
|
|
203
|
+
readonly videoTypeDataList: readonly VideoStatisticsPeriod[];
|
|
204
|
+
}
|
|
205
|
+
type VideoStatisticsResponse = ResponseData<VideoStatisticsData>;
|
|
206
|
+
//#endregion
|
|
207
|
+
export { DeleteVideoRequest, DeleteVideoResponse, DeleteVideosRequest, ExtendVideoRequest, ExtendVideoResponse, GenerateAsyncVideoRequest, GenerateAsyncVideoResponse, GenerateMultiModelVideoRequest, GenerateMultiModelVideoResponse, GenerateVideoRequest, GenerateVideoResponse, GenerateVideoWithAudioRequest, GenerateVideoWithAudioResponse, PollVideoData, PollVideoRequest, PollVideoResponse, UpdateVideoVisibilityRequest, UpdateVideoVisibilityResponse, VideoDetail, VideoDetailRequest, VideoDetailResponse, VideoExample, VideoExamplesRequest, VideoExamplesResponse, VideoHistoryItem, VideoHistoryRequest, VideoHistoryResponse, VideoHistoryStatus, VideoModelRequest, VideoStatisticsData, VideoStatisticsDatum, VideoStatisticsPeriod, VideoStatisticsRequest, VideoStatisticsResponse, VideoSubject };
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@flaqai/network",
|
|
3
|
+
"version": "0.2.3",
|
|
4
|
+
"description": "Family-neutral JSON transport and client-safe backend contracts for Flaq products.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/flaqai/flaq_root.git",
|
|
8
|
+
"directory": "packages/network"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"type": "module",
|
|
14
|
+
"sideEffects": false,
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.mts",
|
|
18
|
+
"import": "./dist/index.mjs"
|
|
19
|
+
},
|
|
20
|
+
"./types": {
|
|
21
|
+
"types": "./dist/types.d.mts",
|
|
22
|
+
"import": "./dist/types.mjs"
|
|
23
|
+
},
|
|
24
|
+
"./client": {
|
|
25
|
+
"types": "./dist/client.d.mts",
|
|
26
|
+
"import": "./dist/client.mjs"
|
|
27
|
+
},
|
|
28
|
+
"./server": {
|
|
29
|
+
"types": "./dist/server.d.mts",
|
|
30
|
+
"import": "./dist/server.mjs"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/node": "22.20.1",
|
|
38
|
+
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
39
|
+
"tsdown": "0.22.7",
|
|
40
|
+
"typescript": "7.0.2"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "tsdown",
|
|
44
|
+
"dev": "tsdown --watch --no-clean --no-minify --no-report",
|
|
45
|
+
"dev:fast": "tsdown --watch --no-clean --no-minify --no-report --no-dts",
|
|
46
|
+
"typecheck": "tsgo --noEmit -p tsconfig.json"
|
|
47
|
+
}
|
|
48
|
+
}
|