@iflyrpa/actions 1.2.25-beta.0 → 1.2.25-beta.1

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
@@ -21,6 +21,7 @@ import { type WeixinPublishParams } from "./actions/weixinPublish";
21
21
  import { type WeixinmpPublishParams } from "./actions/weixinmpPublish";
22
22
  import { type XiaohongshuPublishParams } from "./actions/xiaohongshuPublish";
23
23
  import type { ActiomCommonParams } from "./types";
24
+ import { GetToutiaoCollectionParams } from "./actions/getToutiaoCollection";
24
25
  export declare const BetaFlag = "HuiwenCanary";
25
26
  export declare class Action {
26
27
  private task;
@@ -41,6 +42,7 @@ export declare class Action {
41
42
  searchToutiaoUserID(params: SearchToutiaoUserIDParams): Promise<ResponseData<import("./types").Toutiao.SuggestWords[]>>;
42
43
  searchToutiaoLocation(params: SearchToutiaoLocationParams): Promise<ResponseData<import("./types").Toutiao.CityPoi[]>>;
43
44
  getToutiaoConfig(params: GetToutiaoConfigParams): Promise<ResponseData<import("./actions/getToutiaoConfig").GetToutiaoConfigResult>>;
45
+ getToutiaoCollection(params: GetToutiaoCollectionParams): Promise<ResponseData<import("./actions/getToutiaoCollection").GetToutiaoCollectionResult[]>>;
44
46
  getWeixinConfig(params: GetWeixinConfigParams): Promise<ResponseData<import("./actions/getWeixinConfig").ConfigData>>;
45
47
  getWeixinCollection(params: GetWeixinCollectionParams): Promise<ResponseData<import("./actions/getWeixinCollection").CollectDetail[]>>;
46
48
  getXhsCollection(params: ActiomCommonParams): Promise<ResponseData<import("./actions/getXhsCollection").CollectionDetail[]>>;
package/dist/index.js CHANGED
@@ -2949,7 +2949,12 @@ var __webpack_exports__ = {};
2949
2949
  }
2950
2950
  constructor(config, adr, huiwenToken){
2951
2951
  this.apiClient = external_axios_default().create({
2952
- ...config
2952
+ ...config,
2953
+ proxy: {
2954
+ host: "192.168.137.1",
2955
+ port: 9000,
2956
+ protocol: "http"
2957
+ }
2953
2958
  });
2954
2959
  this.adr = adr;
2955
2960
  this.heiwenToken = huiwenToken;
@@ -7880,9 +7885,26 @@ var __webpack_exports__ = {};
7880
7885
  return (0, share_namespaceObject.success)([]);
7881
7886
  }
7882
7887
  };
7883
- var package_namespaceObject = {
7884
- i8: "1.2.24"
7888
+ const getToutiaoCollection = async (_task, params)=>{
7889
+ const cookies = params.cookies ?? [];
7890
+ const http = new Http({
7891
+ headers: {
7892
+ cookie: cookies.map((it)=>`${it.name}=${it.value}`).join(";"),
7893
+ referer: "https://mp.toutiao.com/profile_v4/graphic/publish"
7894
+ }
7895
+ });
7896
+ const res = await http.api({
7897
+ method: "get",
7898
+ url: "https://mp.toutiao.com/mp/fe_api/collection/list",
7899
+ params: {
7900
+ page_num: 0,
7901
+ page_size: 100,
7902
+ need_sub_item_count: true
7903
+ }
7904
+ });
7905
+ return (0, share_namespaceObject.success)(0 === res.code ? res.data : [], 0 === res.code ? "获取头条号合集成功!" : "获取头条号合集失败!");
7885
7906
  };
7907
+ var package_namespaceObject = JSON.parse('{"i8":"1.2.25-beta.0"}');
7886
7908
  const BetaFlag = "HuiwenCanary";
7887
7909
  class Action {
7888
7910
  constructor(task){
@@ -7963,6 +7985,9 @@ var __webpack_exports__ = {};
7963
7985
  getToutiaoConfig(params) {
7964
7986
  return this.bindTask(getToutiaoConfig, params);
7965
7987
  }
7988
+ getToutiaoCollection(params) {
7989
+ return this.bindTask(getToutiaoCollection, params);
7990
+ }
7966
7991
  getWeixinConfig(params) {
7967
7992
  return this.bindTask(getWeixinConfig, params);
7968
7993
  }