FunyMeeAI/docs/new_app_config_template.md
2026-04-14 15:25:53 +08:00

523 lines
16 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 新应用配置模板
创建新应用时,请填写以下配置信息。
***
## 一、应用基本信息
| 配置项 | 值 | 说明 |
| ------------- | ------------------- | ------------------- |
| 应用名称 | `FunyMee AI` | 如FunyMee AI |
| Android 包名 | `com.funymeeai.app` | 如com.funymeeai.app |
| iOS Bundle ID | `com.funymeeai.app` | 如com.funymeeai.app |
| 应用 IDappId | `com.funymeeai.app` | 后台接口参数用 |
***
## 二、服务器配置
| 配置项 | 值 | 说明 |
| --------- | --------------------------------- | ------------------------------- |
| 预发布环境 URL | `pre-ai.funymee.space` | 如:<https://pre-api.example.com> |
| 生产环境 URL | `ai.funymee.space` | 如:<https://api.example.com> |
| 代理接口路径 | `/workshop/lounge/hub/playground` | 如:/v1/proxy |
***
## 三、代理请求体字段配置
| 配置项 | 值 | 说明 |
| ------------------- | ---------------------------------------------------------- | ----------------------------------------------------- |
| appId 明文 | `humor_level` | 如hero\_class |
| 原始path | `comedy_style` | 如pet\_species |
| "POST"或"GET" | `avatar_mode` | 如power\_level |
| 映射后的Header字段名构造JSON | `filter_type` | 如quest\_rank |
| 映射后的URL参数字段名构造JSON | `scene_id` | 如battle\_score |
| V2包装后的业务数据 | `clip_duration` | 如loyalty\_index |
| 噪音字段名列表 | `['sample_rate','watermark_id','geo_radius','accuracy_m']` | 如:\['billing\_addr', 'utm\_term', 'cluster\_id', ...] |
***
## 四、V2 包装配置
| 配置项 | 值 | 说明 |
| ------- | ------------------------------------------------------------------------------ | ---------------------------------------------------------- |
| V2 层级 | `shell` | 如arsenal |
| V2 层级值 | `2` | 如4 |
| V2 层级路径 | `['capsule','envelope','container']` | 如:\['vault', 'tome', 'codex', 'grimoire', 'sanctum'] |
| 噪音字段名列表 | `['shimmer','glimmer','flicker','sparkle','rustle','murmur','whisper','echo']` | 如:\['roar', 'clash', 'thunder', 'rumble', 'howl', 'growl'] |
***
## 五、安全配置
| 配置项 | 值 | 说明 |
| ------ | ------------------ | --------------- |
| AES 密钥 | `gLYeTRc2uNTcNH8e` | 用于请求加密,必须 16 字符 |
***
## 五点五、extConfig`skin_config.json`,换皮即配)
**`skin_config.json` 根级**增加 `extConfig` 后,无需改代码即可指定:
1. **逻辑字段** ↔ 线上下发 JSON **键名** 的候选列表(兼容多版本后端键名)。
2. **`defaults`**:本地默认对象(与 `common_info.extConfig` **同一套 wire 键**`common_info` 成功后会与服务器 JSON **浅合并****服务器顶层键覆盖同名键**。
典型结构见仓库内 `assets/skin_config.json``extConfig` 示例;框架内类型为 `ExtConfigKeySchema` / `SkinExtConfigSection``client_proxy_framework`)。
| 子节 | 说明 |
|------|------|
| `keys.showVideoMenu` | 字符串数组,如 `["go_run","need_wait"]`,依次为布尔字段候选键 |
| `keys.forbidScreenshot` | 线网为 `true` 时表示禁止截屏的键,如 `["screen"]`(兼容旧键名 `allowScreenshot` |
| `keys.blockScreenshot` | 为 `true` 时表示**禁止**截屏的键,如 `["safe_area"]` |
| `keys.allowThirdPartyPayment` | 如 `["san_fang","lucky"]` |
| `keys.privacyUrl` / `agreementUrl` / `items` | 隐私、协议 URL、items 数组所在键名 |
| `itemKeys` | **固定列表项字段**(不含业务上可省略的兜底图时,可不写 `imageFix`,框架默认 `image_fix``image``imgNeed``cost``title``params``detail``imageFix` 可选 |
| `defaults` | 与线上下发相同键名的对象,可放静态 `items` 列表供无网或后台未下发时使用 |
省略整个 `extConfig` 时,解析行为与内置默认键名一致(见 FunyMee 开发手册 §5.5)。
***
## 六、Adjust SDK 配置
| 配置项 | 值 | 说明 |
| ----------- | ------------------------ | -------------------------- |
| App Token | `chflzzr4x5hc` | Adjust Dashboard 获取 |
| Environment | `sandbox` / `production` | 测试用 sandbox正式用 production |
### Adjust 事件 Token如有自定义
| 事件名称 | 事件 Token |
| --------- | -------- |
| 首充 | `qlw4fp` |
| 购买 | `b2ms4n` |
| 注册 | `2k7vm5` |
| $5.99 档位 | `mtzzqk` |
| $9.99 档位 | `m9ivl1` |
| $19.99 档位 | `kp7a52` |
| $49.99 档位 | `ojlx1r` |
| $99.99 档位 | `hue6dt` |
***
## 七、Facebook SDK 配置
| 配置项 | 值 | 说明 |
| ------------ | -------------------- | ----------------------------- |
| App ID | `填写 Facebook App ID` | Facebook Developer Console 获取 |
| Client Token | `填写 Client Token` | Facebook Developer Console 获取 |
> MethodChannel 名称:框架自动使用 `{packageName}/facebook_sdk`,无需配置
***
## 八、字段映射配置(可选)
如有特殊字段映射需求请填写,默认使用框架默认映射。
| 原始字段 | V2字段 |
|----------|--------|
| User_token | comedy |
| accountId | meme |
| accountName | avatar |
| activityId | character |
| activitys | animate |
| actualAmount | sketch |
| addCredits | remix |
| adsTokenId | humor |
| age | intensity |
| amount | cartoon |
| animate | duration |
| app | sticker |
| appFbConfig | stylize |
| appType | reaction |
| appraise | render |
| approveState | clip |
| aspectRatio | caption |
| automaticRenewal | punchline |
| avatar | frequency |
| baseCredits | opacity |
| baseUrl | joke |
| begTime | gag |
| bonus | contrast |
| bonusCredits | saturation |
| bonusRatio | sharpness |
| businessId | angle |
| businessType | offset |
| campaignInfo | parody |
| card | spoof |
| categoryId | scale |
| categoryName | rotation |
| ch | satire |
| channel | skit |
| channelType | reel |
| client | filter |
| clientId | template |
| code | scene |
| coder | panel |
| config | edit |
| content | gradient |
| contentType | comic |
| count | bubble |
| countId | share |
| country | overlay |
| countryCode | publish |
| creatTime | palette |
| createTime | typography |
| createTimeText | layout |
| credit | export |
| creditPromotion | apply |
| credits | padding |
| creditsRecordUrl | swap |
| cryptoInvoiceUrl | merge |
| currency | mascot |
| current | blend |
| cvcCode | persona |
| data | costume |
| days | backdrop |
| department | resize |
| desc | kurtosis |
| description | crop |
| devId | frame |
| deviceId | stage |
| discountOff | margin |
| domain | theme |
| domains | adjust |
| dt | mood |
| duration | preview |
| email | draft |
| enable_music | vibe |
| enabled | customize |
| endTime | expression |
| event | gesture |
| expectedSize | pose |
| expireMonth | outfit |
| expireYear | trait |
| expiresIn | upload |
| ext | profile |
| extConfig | download |
| extJson | gallery |
| face | border |
| faceIndex | radius |
| faceInfos | discover |
| face_index | shadow |
| fbClientId | glow |
| fbClientToken | blur |
| feature | browse |
| features | explore |
| feedbackId | grain |
| feedbackIds | showcase |
| fileName | feed |
| fileName1 | trending |
| fileName2 | spotlight |
| filePath | search |
| filePath1 | generate |
| filePath2 | transform |
| fileUrls | texture |
| filterCountry | collection |
| filterDomain | badge |
| filterOwnerId | reward |
| filterStatus | quest |
| filterTaskType | caucus |
| filterVip | allowance |
| firstName | appendix |
| firstRegister | enhance |
| forcePayCenter | convert |
| fps | lineage |
| frameIndex | pattern |
| frame_index | motion |
| freeBlurTimes | tag |
| freeTimes | label |
| gender | speed |
| googleClientId | roster |
| h5UrlConfig | rank |
| hasNext | rate |
| hash | medallion |
| hashIsZero | member |
| headFaceIndex | entry |
| headImg | terminal |
| headPos | repository |
| headType | delegate |
| hint | vote |
| hlsUrl | precision |
| host | nominee |
| icon | delay |
| id | timing |
| imageCount | bounce |
| imageFaceIndex | digest |
| imageId | registration |
| imageInfos | elastic |
| img | circular |
| imgCount | indicator |
| imgId | histogram |
| imgList | easing |
| imgType | compressive |
| imgUrl | boost |
| index | weight |
| inviteBy | socket |
| invitedCnt | pin |
| isBlur | archive |
| isVip | restore |
| issuerUrl | duplicate |
| keepUserId | campus |
| label | density |
| lang | venture |
| lastName | council |
| lastUpdateTime | follow |
| launchImgUrl | coverage |
| link | capital |
| list | ordinance |
| lowUrl | durability |
| maxLimit | like |
| method | listing |
| methodActivitys | comment |
| methodChannels | collect |
| model | exhibit |
| msg | sprint |
| name | alignment |
| needCredits | colorize |
| needImage | edge |
| needUndress | authorization |
| needopt | team |
| negativePrompt | delegation |
| note | spacing |
| openType | morph |
| optimizeCountSql | reface |
| optimizeJoinOfCountSql | voice |
| orderId | franchise |
| orders | sync |
| originAmount | brochure |
| owner | heritage |
| p12KeyPath | tally |
| packageName | accolade |
| page | session |
| pages | loop |
| password | scope |
| payCenterUrl | schedule |
| payId | depth |
| payMethod | layer |
| payMethods | cluster |
| payStatus | submit |
| payTime | channel |
| payTypeList | introspect |
| payUrl | objectify |
| paylink | segment |
| paymentMethod | ledger |
| paymentMethods | invoke |
| permissions | terminate |
| phone | sponsor |
| pkg | stakeholder |
| platform | abstract |
| previewImage | slice |
| previewVideo | anchor |
| productType | pivot |
| progress | origin |
| prompt | appointment |
| publicKey | thread |
| purchaseData | gauge |
| queueCnt | endpoint |
| read | midpoint |
| receipt | funnel |
| recent | fabricate |
| recentlyUsed | breakpoint |
| recommend | threshold |
| records | create |
| redirectUrl | reformat |
| referer | link |
| refererType | complex |
| reply | amplitude |
| replyStatus | calendar |
| requiredHeaders | tokenize |
| resolution | consortium |
| resolution480p | span |
| resolution720p | factor |
| resulotion | correctness |
| rewardCredits | sigma |
| rewardRatio | gutter |
| role | transport |
| searchCount | transmit |
| selected | adaptive |
| serviceAccountEmail | balance |
| sharedSecret | stake |
| showName | constant |
| sign | mandate |
| signature | selection |
| size | seminar |
| sort | overtone |
| srcFaceImgBase64 | tournament |
| srcFaceIndex | circuit |
| srcImg | permission |
| srcImg1 | crew |
| srcImg1Url | consulate |
| srcImg2 | lease |
| srcImg2Url | glossary |
| srcImgBase64 | dynasty |
| srcImgUrl | logbook |
| srcVideo | commendation |
| state | bitrate |
| status | wallet |
| style | module |
| subBusinessType | keepalive |
| subPaymentMethod | bundle |
| subScribeValidTime | recognize |
| subscriptionActivitys | cap |
| subscriptionPeriod | unicast |
| sumCredits | assert |
| sys | load |
| t2IConfig | reboot |
| tag | remainder |
| tags | enqueue |
| targetId | manifest |
| targetInvitedCnt | unpack |
| taskId | exponential |
| taskIds | vendor |
| taskType | liaison |
| taskTypes | synopsis |
| templateFaceUrl | quantized |
| templateFifCredits | compressed |
| templateFifDuration | usability |
| templateFifUrl | tension |
| templateName | itinerary |
| templateTfCredits | capitalization |
| templateTfDuration | demodulation |
| templateTfUrl | convergence |
| templateType | ringing |
| templateTypes | dialogue |
| templateUrl | refractive |
| templates | microscopic |
| tgId | chart |
| tgName | spend |
| tgOrderId | microservice |
| theme | capacity |
| title | interval |
| token | attachment |
| total | insert |
| totalUnreadCount | promote |
| transactionId | installation |
| truePrompt | coalition |
| ts | debit |
| type | revenue |
| types | standard |
| unreadCountList | weigh |
| updateTime | overflow |
| uploadUrl | update |
| uploadUrl1 | harden |
| uploadUrl2 | complete |
| url | altitude |
| user | resistance |
| userApplePayList | variety |
| userId | symposium |
| userInfoType | carnival |
| userName | supplement |
| userToken | disambiguate |
| userType | resample |
| username | ring |
| usign | reauthenticate |
| val | compliance |
| value | platoon |
| verifyCode | taskforce |
| videoDuration | hue |
| videoFaceIndex | escrow |
| videoFrameIndex | periodical |
| videoSize | genealogy |
| videoUrl | postprocess |
| waitTime | acuity |
| x1 | angular |
| x2 | enthalpy |
| y1 | binormal |
| y2 | manifold |
***
## 九、其他配置(如有)
| 配置项 | 值 | 说明 |
| ----------- | ----------- | ---------- |
| 调试基础 URL 覆盖 | `填写调试用 URL` | 仅调试时使用,可留空 |
| <br /> | <br /> | <br /> |
***
## 十、填写完成后的配置示例
```dart
// app_config.dart
class NewAppConfig extends AppConfig {
@override
String get appId => 'your_app_id';
@override
String get packageName => 'com.example.app';
@override
String get aesKey => 'your_32_characters_key_here';
@override
String get preBaseUrl => 'https://pre-api.example.com';
@override
String get prodBaseUrl => 'https://api.example.com';
@override
String get proxyPath => '/v1/proxy';
@override
ProxyKeysConfig get proxyKeys => const ProxyKeysConfig(
appIdField: 'hero_class',
pathField: 'pet_species',
methodField: 'power_level',
headerField: 'quest_rank',
paramsField: 'battle_score',
bodyField: 'loyalty_index',
noiseKeys: ['billing_addr', 'utm_term', 'cluster_id', 'lsn_value', 'accuracy_val', 'dir_path'],
);
@override
String get v2LevelField => 'arsenal';
@override
int get v2LevelFixedValue => 4;
@override
List<String> get v2SanctumPath =>
const ['vault', 'tome', 'codex', 'grimoire', 'sanctum'];
@override
List<String> get v2NoiseKeys =>
const ['roar', 'clash', 'thunder', 'rumble', 'howl', 'growl'];
@override
FieldMapping get fieldMapping => _appFieldMapping;
/// 从上方「字段映射配置」表格中获取完整映射
/// ⚠️ 请务必将表格中的所有映射键值对复制到此处
static final _appFieldMapping = FieldMapping({
// 请将「八、字段映射配置」表格中的所有字段复制到此处
// 格式: '原始字段': 'V2字段',
// 例如: 'User_token': 'comedy',
});
}
// main.dart
await AnalyticsService.init(
AnalyticsConfig(
packageName: 'com.example.app',
adjustConfig: AdjustConfig(
appToken: 'your_adjust_app_token',
environment: AdjustEnv.sandbox,
),
facebookConfig: FacebookConfig(
appId: 'your_facebook_app_id',
clientToken: 'your_facebook_client_token',
),
),
);
```
***
**填写完成后发送给我,我将根据此配置创建完整的应用代码。**