返回 AiToEarn
response-code.enum.ts
根目录 / project / aitoearn-backend / libs / common / src / enums / response-code.enum.ts
1 export enum ResponseCode {
2 Success = 0,
3
4 // ========================================
5 // 10000-11999: 基础设施层 (libs)
6 // ========================================
7
8 // 10000-10099: common(公共库)
9 ValidationFailed = 10002,
10 DevOnlyEndpoint = 10005,
11
12 // 10100-10199: s3/aws-s3/gcs
13 S3DownloadFileFailed = 10100,
14 S3UploadFailed = 10101,
15 InvalidGcsUri = 10102,
16
17 // 10150-10199: config-editor(配置编辑)
18 ConfigEditorUnsupportedFormat = 10150,
19 ConfigEditorParseFailed = 10151,
20 ConfigEditorValidationFailed = 10152,
21 ConfigEditorReadFailed = 10153,
22 ConfigEditorWriteFailed = 10154,
23 ConfigEditorConfigPathMissing = 10155,
24 ConfigEditorPm2Unavailable = 10156,
25 ConfigEditorRestartFailed = 10157,
26
27 // ========================================
28 // 12000-12999: aitoearn-server(主服务)
29 // ========================================
30
31 // 12000-12099: user(用户模块)
32 UserNotFound = 12000,
33 UserStorageExceeded = 12002,
34 UserStatusError = 12003,
35
36 // 12300-12399: ai(AI 模块)
37 InvalidModel = 12300,
38 AiCallFailed = 12301,
39 InvalidAiTaskId = 12302,
40 AiLogNotFound = 12303,
41 VideoUploadInvalidInput = 12304,
42 VideoUploadJobIdNotFound = 12305,
43 VideoUploadTaskInfoNotFound = 12306,
44 VideoUploadVidNotFound = 12307,
45 VideoUploadFailed = 12308,
46 DraftGenerationMemoryNotFound = 12309,
47
48 // 12600-12699: account(社交账号)
49 AccountNotFound = 12600,
50 AccountGroupNotFound = 12601,
51 AccountStatisticsNotFound = 12602,
52 AccountGroupCountryCodeInvalid = 12603,
53 AccountCreateFailed = 12604,
54 AccountRefreshTooFrequent = 12605,
55 AccountRefreshNotSupported = 12606,
56
57 // 12700-12799: media(媒体文件)
58 MediaNotFound = 12700,
59 MediaGroupNotFound = 12701,
60 MediaGroupDefaultNotAllowed = 12702,
61
62 // 12750-12799: assets(资源模块)
63 AssetNotFound = 12750,
64 AssetUploadFailed = 12751,
65 AssetTooLarge = 12752,
66
67 // 12800-12899: material(素材)
68 MaterialNotFound = 12800,
69 MaterialGroupNotFound = 12801,
70 MaterialGroupDefaultNotAllowed = 12803,
71
72 // 12900-12999: content(内容组合)
73 MaterialGroupEmpty = 12900,
74 MaterialGroupTypeError = 12901,
75 MediaGroupTypeNotSupported = 12902,
76 GroupInfoNotFound = 12903,
77
78 // ========================================
79 // 13000-13999: aitoearn-admin-server(管理后台)
80 // ========================================
81
82 // 13200-13299: admin-operation(管理后台操作)
83 AdminOperationPasswordError = 13200,
84
85 // ========================================
86 // 15000-15999: aitoearn-channel(渠道服务)
87 // ========================================
88
89 // 15000-15099: channel/publish(渠道发布相关)
90 PublishRecordNotFound = 15000,
91 ChannelAccountNotAuthorized = 15001,
92 ChannelAuthorizationExpired = 15002,
93 ChannelAccountInfoFailed = 15003,
94 PublishTaskNotFound = 15004,
95 ChannelCredentialNotFound = 15006,
96 ChannelRefreshTokenNotFound = 15007,
97 ChannelRefreshTokenExpired = 15008,
98 ChannelRefreshTokenFailed = 15009,
99 ChannelAccessTokenFailed = 15010,
100 ChannelPlatformTokenNotFound = 15011,
101 ChannelAuthTaskFailed = 15012,
102 ChannelAuthorizationFailed = 15013,
103 ChannelNoAccountsFound = 15014,
104 PublishServiceNotFound = 15015,
105 PublishTaskFailed = 15016,
106 PublishTaskInProgress = 15017,
107 PublishTaskStatusInvalid = 15018,
108 PublishTimeInvalid = 15019,
109 EngagementTaskInProgress = 15020,
110 ChannelAccountNotFound = 15021,
111 InteractAccountTypeNotSupported = 15022,
112 InteractRecordNotFound = 15023,
113 DataCubeAccountTypeNotSupported = 15024,
114 ChannelPublishTaskAlreadyExists = 15025,
115 PublishTaskAlreadyPublishing = 15026,
116 PublishTaskAlreadyCompleted = 15027,
117 PublishTaskNotPublished = 15028,
118 PublishTaskAlreadyUpdating = 15029,
119 PublishTaskAlreadyWaitingForUpdate = 15030,
120 PostCategoryNotSupported = 15031,
121 PlatformNotSupported = 15032,
122 PublishTaskUpdateFailed = 15033,
123 DeletePostFailed = 15034,
124 PublishTaskInvalid = 15035,
125 // 解析链接,获取视频ID
126 InvalidWorkLink = 15036,
127 // 作品不属于该账号
128 WorkNotBelongToAccount = 15037,
129 PublishResourceUnavailable = 15038,
130 ChannelAuthSessionInvalid = 15039,
131 ChannelAuthPlatformMismatch = 15040,
132 ChannelAuthSessionCompleted = 15041,
133 ChannelAuthCsrfInvalid = 15042,
134 ChannelAuthSelectableAccountsNotFound = 15043,
135 ChannelAuthCodeMissing = 15045,
136 ChannelAuthRefreshTokenMissing = 15046,
137 ChannelAuthPlatformUidMissing = 15047,
138 ChannelAuthAccountAccessRevoked = 15048,
139 ChannelAuthCodeOrStateMissing = 15049,
140 PublishFlowNotFound = 15050,
141 ChannelPublishValidationFailed = 15051,
142 ChannelPublishDuplicateItem = 15052,
143 ChannelPublishQueueRemoveFailed = 15053,
144 ChannelPublishPlatformCancelFailed = 15054,
145 ChannelPublishCancelNotSupported = 15055,
146 ChannelPublishQueueFailed = 15056,
147 ChannelPublishTimeUpdateNotAllowed = 15057,
148 ChannelPublishNowNotAllowed = 15058,
149 ChannelPublishUpdateNotAllowed = 15059,
150 ChannelPublishPlatformWorkIdMissing = 15060,
151 ChannelPublishUpdateNotSupported = 15061,
152 ChannelPublishPlatformNotSupported = 15062,
153 ChannelPublishPlatformStatusFailed = 15063,
154 ChannelWebhookNotSupported = 15064,
155 ChannelWebhookChallengeNotSupported = 15065,
156 ChannelWebhookInvalidSignature = 15066,
157 ChannelWebhookInvalidVerifyToken = 15067,
158 ChannelWebhookChallengeCodeMissing = 15068,
159 ChannelWebhookPublishFailed = 15069,
160 ChannelPlatformApiFailed = 15070,
161 ChannelPlatformRateLimited = 15071,
162 ChannelPlatformResponseInvalid = 15072,
163 ChannelPlatformMediaUnsupported = 15073,
164 ChannelPlatformMediaProcessingFailed = 15074,
165 ChannelPlatformMediaProcessingTimeout = 15075,
166 ChannelPlatformAccountMissing = 15076,
167 ChannelPlatformPublishOptionMissing = 15077,
168 ChannelPlatformPermissionMissing = 15078,
169 ChannelPlatformWorkNotFound = 15079,
170 ChannelPlatformOperationNotSupported = 15080,
171 ChannelAccountCreateNotSupported = 15081,
172 ChannelAccountAlreadyConnectedToAnotherUser = 15082,
173 ChannelAuthSelectionRequired = 15083,
174 ChannelAuthSelectedAccountUnavailable = 15084,
175 ChannelOAuthIdentityAlreadyConnectedToAnotherUser = 15085,
176 ChannelOAuthUserAlreadyConnectedToAnotherIdentity = 15086,
177 ChannelPublishMixedRelayAndLocalAccounts = 15087,
178 ChannelPaginationModeNotSupported = 15088,
179 ChannelPaginationLimitExceeded = 15089,
180 ChannelPaginationPageSizeExceeded = 15090,
181 ChannelPaginationDirectionNotSupported = 15091,
182 ChannelAccountCreateRequiredFieldMissing = 15092,
183 ChannelPublishPermalinkMissing = 15093,
184 ChannelPlatformServiceUnavailable = 15094,
185 ChannelPublishRetryNotAllowed = 15095,
186
187 // 15100-15199: short-link(短链接)
188 ShortLinkNotFound = 15100,
189 ShortLinkExpired = 15101,
190
191 // 16000-16099: channel/work(作品辅助)
192 WorkDetailNotFound = 16026, // 作品详情未找到
193 AccountAuthRequired = 16037, // 该平台需要先授权账号
194
195 // 18100-18199: agent(代理服务)
196 AgentTaskNotFound = 18100,
197 AgentTaskStatusInvalid = 18101,
198 GenerateImagesFailed = 18102,
199 GenerateVideosFailed = 18103,
200 AgentTaskFailed = 18104,
201 DailyTaskQuotaExceeded = 18105,
202 GenerateContentFailed = 18106,
203 AgentTaskTimeout = 18107,
204 AgentTaskNotRunning = 18108,
205 AgentSessionRecoveryFailed = 18109,
206
207 // 18300-18399: place-draft(地点草稿)
208 PlaceDraftNotFound = 18300,
209
210 // ========================================
211 // 19000-19099: api-key / relay
212 // ========================================
213 ApiKeyInvalid = 19000,
214 RelayServerUnavailable = 19001,
215 }
216
216 lines TYPESCRIPT