@eddyskywalker/dsh-chatgpt-subscription 1.5.0 → 1.6.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/lib/client.js +58 -24
- package/lib/client.js.map +1 -1
- package/lib/index.js +1759 -1243
- package/lib/types/client/locales-ru/qoder.d.ts.map +1 -1
- package/lib/types/client/providers/qoder/QoderCheckin.d.ts.map +1 -1
- package/lib/types/client/providers/qoder/api.d.ts.map +1 -1
- package/lib/types/client/providers/qoder/locales.d.ts +5 -1
- package/lib/types/client/providers/qoder/locales.d.ts.map +1 -1
- package/lib/types/compat.d.ts +1 -1
- package/lib/types/host/common/model-facts-data.d.ts.map +1 -1
- package/lib/types/host/common/reasoning-seed-replay.d.ts +4 -4
- package/lib/types/host/common/reasoning-seed-replay.d.ts.map +1 -1
- package/lib/types/host/common/stream-timing.d.ts +25 -0
- package/lib/types/host/common/stream-timing.d.ts.map +1 -0
- package/lib/types/host/providers/opendesign/mapper.d.ts +2 -2
- package/lib/types/host/providers/opendesign/mapper.d.ts.map +1 -1
- package/lib/types/host/providers/opendesign/types.d.ts.map +1 -1
- package/lib/types/host/providers/qianwen-token-plan/adapter.d.ts +3 -0
- package/lib/types/host/providers/qianwen-token-plan/adapter.d.ts.map +1 -1
- package/lib/types/host/providers/qoder/adapter.d.ts +3 -0
- package/lib/types/host/providers/qoder/adapter.d.ts.map +1 -1
- package/lib/types/host/providers/qoder/checkin.d.ts +22 -4
- package/lib/types/host/providers/qoder/checkin.d.ts.map +1 -1
- package/lib/types/host/providers/qoder/mapper.d.ts +12 -11
- package/lib/types/host/providers/qoder/mapper.d.ts.map +1 -1
- package/lib/types/host/providers/qoder/model-catalog.d.ts.map +1 -1
- package/lib/types/host/providers/qoder/queue-lifecycle.d.ts +61 -0
- package/lib/types/host/providers/qoder/queue-lifecycle.d.ts.map +1 -0
- package/lib/types/host/providers/qoder/routes.d.ts +2 -0
- package/lib/types/host/providers/qoder/routes.d.ts.map +1 -1
- package/lib/types/host/providers/qoder/token-store.d.ts.map +1 -1
- package/lib/types/host/providers/tencent-tokenhub/model-catalog.d.ts.map +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/qoder-contracts.d.ts +8 -0
- package/lib/types/shared/qoder-contracts.d.ts.map +1 -1
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -20489,6 +20489,8 @@ window.__ModuleLoader__.load({
|
|
|
20489
20489
|
claimSucceeded: "已提交领取",
|
|
20490
20490
|
checkinFailed: "签到请求失败,请稍后再试",
|
|
20491
20491
|
campaignClaimed: "已领取",
|
|
20492
|
+
campaignNotClaimable: "现在不能领取",
|
|
20493
|
+
campaignReward: "{count} Credits",
|
|
20492
20494
|
quotaBucketAddOn: "加购 Credits",
|
|
20493
20495
|
quotaBucketOrg: "组织资源包",
|
|
20494
20496
|
quotaRemaining: "剩余",
|
|
@@ -20626,6 +20628,8 @@ window.__ModuleLoader__.load({
|
|
|
20626
20628
|
claimSucceeded: "Claim submitted",
|
|
20627
20629
|
checkinFailed: "Check-in request failed, try again later",
|
|
20628
20630
|
campaignClaimed: "Claimed",
|
|
20631
|
+
campaignNotClaimable: "Not claimable right now",
|
|
20632
|
+
campaignReward: "{count} Credits",
|
|
20629
20633
|
quotaBucketAddOn: "Add-on Credits",
|
|
20630
20634
|
quotaBucketOrg: "Org package",
|
|
20631
20635
|
quotaRemaining: "remaining",
|
|
@@ -20709,6 +20713,8 @@ window.__ModuleLoader__.load({
|
|
|
20709
20713
|
* POST /connection/test → QoderConnectionDto(**裸 DTO,不走信封**)
|
|
20710
20714
|
* POST /quota { } → QoderStatusDto(强制刷新额度)
|
|
20711
20715
|
* POST /catalog/refresh { } → QoderStatusDto
|
|
20716
|
+
* GET /checkin → QoderCheckinListDto(默认关闭;关闭时一个上游请求都不发)
|
|
20717
|
+
* POST /checkin { campaignId } → { campaignId, grantId?, rewardCredits? }
|
|
20712
20718
|
*
|
|
20713
20719
|
* 除 /adopt 与 /connection/test 外全部走共享的 { ok, value } 信封,
|
|
20714
20720
|
* 因此答案都是裸 DTO——createLineApi 已经把信封拆掉了。
|
|
@@ -21286,9 +21292,17 @@ window.__ModuleLoader__.load({
|
|
|
21286
21292
|
try {
|
|
21287
21293
|
const list = (await get$11("/checkin")).campaigns ?? [];
|
|
21288
21294
|
setCampaigns(list);
|
|
21289
|
-
setResult(list.length === 0 ?
|
|
21290
|
-
|
|
21291
|
-
|
|
21295
|
+
setResult(list.length === 0 ? {
|
|
21296
|
+
text: t.campaignsEmpty,
|
|
21297
|
+
detail: null
|
|
21298
|
+
} : null);
|
|
21299
|
+
return true;
|
|
21300
|
+
} catch (cause) {
|
|
21301
|
+
setResult({
|
|
21302
|
+
text: t.checkinFailed,
|
|
21303
|
+
detail: messageOf$11(cause)
|
|
21304
|
+
});
|
|
21305
|
+
return false;
|
|
21292
21306
|
} finally {
|
|
21293
21307
|
setBusy(false);
|
|
21294
21308
|
}
|
|
@@ -21306,10 +21320,15 @@ window.__ModuleLoader__.load({
|
|
|
21306
21320
|
setResult(null);
|
|
21307
21321
|
try {
|
|
21308
21322
|
await post$11("/checkin", { campaignId });
|
|
21309
|
-
setResult(
|
|
21310
|
-
|
|
21311
|
-
|
|
21312
|
-
|
|
21323
|
+
if (await load()) setResult({
|
|
21324
|
+
text: t.claimSucceeded,
|
|
21325
|
+
detail: null
|
|
21326
|
+
});
|
|
21327
|
+
} catch (cause) {
|
|
21328
|
+
setResult({
|
|
21329
|
+
text: t.checkinFailed,
|
|
21330
|
+
detail: messageOf$11(cause)
|
|
21331
|
+
});
|
|
21313
21332
|
} finally {
|
|
21314
21333
|
setBusy(false);
|
|
21315
21334
|
}
|
|
@@ -21343,24 +21362,37 @@ window.__ModuleLoader__.load({
|
|
|
21343
21362
|
className: "dshqo-checkin-list",
|
|
21344
21363
|
children: [campaigns.map((campaign) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
21345
21364
|
className: "dsha-row",
|
|
21346
|
-
children: [
|
|
21347
|
-
|
|
21348
|
-
|
|
21349
|
-
|
|
21350
|
-
|
|
21351
|
-
|
|
21352
|
-
|
|
21353
|
-
|
|
21354
|
-
|
|
21355
|
-
|
|
21356
|
-
|
|
21357
|
-
|
|
21358
|
-
|
|
21359
|
-
|
|
21360
|
-
|
|
21365
|
+
children: [
|
|
21366
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
21367
|
+
className: "dsha-value",
|
|
21368
|
+
children: campaign.title
|
|
21369
|
+
}),
|
|
21370
|
+
campaign.rewardCredits !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
21371
|
+
className: "dsha-muted",
|
|
21372
|
+
children: t.campaignReward.replace("{count}", String(campaign.rewardCredits))
|
|
21373
|
+
}),
|
|
21374
|
+
campaign.claimed ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
21375
|
+
className: "dsha-muted",
|
|
21376
|
+
children: t.campaignClaimed
|
|
21377
|
+
}) : campaign.claimable === false ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
21378
|
+
className: "dsha-muted",
|
|
21379
|
+
children: t.campaignNotClaimable
|
|
21380
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
21381
|
+
className: "dsha-btn",
|
|
21382
|
+
disabled: busy,
|
|
21383
|
+
onClick: () => {
|
|
21384
|
+
claim(campaign.id);
|
|
21385
|
+
},
|
|
21386
|
+
children: busy ? t.claiming : t.claim
|
|
21387
|
+
})
|
|
21388
|
+
]
|
|
21389
|
+
}, campaign.id)), result !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21361
21390
|
className: "dsha-muted",
|
|
21362
|
-
children: result
|
|
21363
|
-
})
|
|
21391
|
+
children: result.text
|
|
21392
|
+
}), result.detail !== null && result.detail !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21393
|
+
className: "dsha-muted",
|
|
21394
|
+
children: result.detail
|
|
21395
|
+
})] })]
|
|
21364
21396
|
})
|
|
21365
21397
|
]
|
|
21366
21398
|
});
|
|
@@ -38709,8 +38741,10 @@ window.__ModuleLoader__.load({
|
|
|
38709
38741
|
claim: "Получить",
|
|
38710
38742
|
claiming: "Получение…",
|
|
38711
38743
|
claimSucceeded: "Запрос отправлен",
|
|
38744
|
+
campaignReward: "{count} Credits",
|
|
38712
38745
|
checkinFailed: "Не удалось выполнить запрос, повторите позже",
|
|
38713
38746
|
campaignClaimed: "Получено",
|
|
38747
|
+
campaignNotClaimable: "Сейчас получить нельзя",
|
|
38714
38748
|
quotaBucketAddOn: "Докупленные Credits",
|
|
38715
38749
|
quotaBucketOrg: "Пакет организации",
|
|
38716
38750
|
quotaRemaining: "остаток",
|