@iflyrpa/actions 1.1.10 → 1.1.13

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.
Files changed (55) hide show
  1. package/dist/actions/baijiahaoPublish/index.d.ts +22 -0
  2. package/dist/actions/baijiahaoPublish/mock.d.ts +2 -0
  3. package/dist/actions/getBaijiahaoActivity/index.d.ts +12 -0
  4. package/dist/actions/getToutiaoConfig/index.d.ts +12 -0
  5. package/dist/actions/searchToutiaoTopicList/index.d.ts +8 -0
  6. package/dist/actions/searchXiaohongshuLocation/index.d.ts +12 -0
  7. package/dist/actions/toutiaoPublish/index.d.ts +28 -0
  8. package/dist/actions/toutiaoPublish/mock.d.ts +2 -0
  9. package/dist/actions/weitoutiaoPublish/index.d.ts +23 -0
  10. package/dist/actions/weitoutiaoPublish/mock.d.ts +2 -0
  11. package/dist/actions/weitoutiaoPublish/rpa.d.ts +2 -0
  12. package/dist/actions/weixinPublish/index.d.ts +25 -0
  13. package/dist/actions/weixinPublish/mock.d.ts +2 -0
  14. package/dist/actions/weixinmpPublish/index.d.ts +20 -0
  15. package/dist/actions/weixinmpPublish/mock.d.ts +2 -0
  16. package/dist/actions/weixinmpPublish/rpa.d.ts +2 -0
  17. package/dist/actions/xiaohongshuPublish/index.d.ts +30 -0
  18. package/dist/actions/xiaohongshuPublish/mock.d.ts +2 -0
  19. package/dist/actions/xiaohongshuPublish/rpa.d.ts +2 -0
  20. package/dist/index.d.ts +32 -0
  21. package/dist/index.js +14530 -0
  22. package/dist/index.js.LICENSE.txt +13 -0
  23. package/dist/index.js.map +1 -0
  24. package/dist/index.mjs +13071 -21761
  25. package/dist/index.mjs.LICENSE.txt +13 -0
  26. package/dist/index.mjs.map +1 -0
  27. package/dist/types.d.ts +63 -0
  28. package/dist/utils/index.d.ts +59 -0
  29. package/dist/utils/xhsXsEncrypt.d.ts +48 -0
  30. package/package.json +7 -9
  31. package/dist/index.cjs +0 -23231
  32. package/src/actions/baijiahaoPublish/index.ts +0 -30
  33. package/src/actions/baijiahaoPublish/mock.ts +0 -207
  34. package/src/actions/getBaijiahaoActivity/index.ts +0 -42
  35. package/src/actions/getToutiaoConfig/index.ts +0 -72
  36. package/src/actions/searchToutiaoTopicList/index.ts +0 -38
  37. package/src/actions/searchXiaohongshuLocation/index.ts +0 -48
  38. package/src/actions/toutiaoPublish/index.ts +0 -30
  39. package/src/actions/toutiaoPublish/mock.ts +0 -247
  40. package/src/actions/weitoutiaoPublish/index.ts +0 -42
  41. package/src/actions/weitoutiaoPublish/mock.ts +0 -97
  42. package/src/actions/weitoutiaoPublish/rpa.ts +0 -92
  43. package/src/actions/weixinPublish/index.ts +0 -34
  44. package/src/actions/weixinPublish/mock.ts +0 -401
  45. package/src/actions/weixinmpPublish/index.ts +0 -40
  46. package/src/actions/weixinmpPublish/mock.ts +0 -195
  47. package/src/actions/weixinmpPublish/rpa.ts +0 -93
  48. package/src/actions/xiaohongshuPublish/index.ts +0 -52
  49. package/src/actions/xiaohongshuPublish/mock.ts +0 -224
  50. package/src/actions/xiaohongshuPublish/rpa.ts +0 -226
  51. package/src/global.d.ts +0 -7
  52. package/src/index.ts +0 -76
  53. package/src/types.ts +0 -71
  54. package/src/utils/index.ts +0 -172
  55. package/src/utils/xhsXsEncrypt.ts +0 -103
@@ -0,0 +1,22 @@
1
+ import type { CommonAction, CookiesSetDetails } from "@iflyrpa/share";
2
+ import type { ActiomCommonParams } from "../../types";
3
+ export interface BaijiahaoPublishParams extends Omit<ActiomCommonParams, "cookies"> {
4
+ saveType: "draft" | "publish";
5
+ cookies: Partial<CookiesSetDetails>[];
6
+ token: string;
7
+ title: string;
8
+ content: string;
9
+ settingInfo: {
10
+ baijiahaoTitle: string;
11
+ baijiahaoCoverType: "single" | "multiple";
12
+ baijiahaoAbstract: string;
13
+ baijiahaoIsAi: string[];
14
+ baijiahaoSingleCover: string;
15
+ baijiahaoMultCover: string[];
16
+ baijiahaoVerticalCover: string;
17
+ baijiahaoActivity: unknown[];
18
+ baijiahaoSelectActivityCache: string[];
19
+ };
20
+ }
21
+ export type PublishAction = CommonAction<BaijiahaoPublishParams, string>;
22
+ export declare const baijiahaoPublish: PublishAction;
@@ -0,0 +1,2 @@
1
+ import type { PublishAction } from ".";
2
+ export declare const mockAction: PublishAction;
@@ -0,0 +1,12 @@
1
+ import type { CommonAction, CookiesSetDetails } from "@iflyrpa/share";
2
+ import type { ActiomCommonParams } from "../../types";
3
+ export interface GetBaijiahaoActivityParams extends Omit<ActiomCommonParams, "cookies"> {
4
+ cookies: Partial<CookiesSetDetails>[];
5
+ token: string;
6
+ }
7
+ export interface ActivityData {
8
+ id: string;
9
+ task_name: string;
10
+ }
11
+ export type PublishAction = CommonAction<GetBaijiahaoActivityParams, ActivityData[]>;
12
+ export declare const getBaijiahaoActivity: PublishAction;
@@ -0,0 +1,12 @@
1
+ import type { CommonAction, CookiesSetDetails } from "@iflyrpa/share";
2
+ import type { ActiomCommonParams, Toutiao } from "../../types";
3
+ export interface GetToutiaoConfigParams extends Omit<ActiomCommonParams, "cookies"> {
4
+ cookies: Partial<CookiesSetDetails>[];
5
+ }
6
+ export interface GetToutiaoConfigResult {
7
+ suggestWords: Toutiao.Topic[];
8
+ cityDistrict: Toutiao.CityDistrict | null;
9
+ userRights: Toutiao.UserRight[];
10
+ }
11
+ export type PublishAction = CommonAction<GetToutiaoConfigParams, GetToutiaoConfigResult>;
12
+ export declare const getToutiaoConfig: PublishAction;
@@ -0,0 +1,8 @@
1
+ import type { CommonAction, CookiesSetDetails } from "@iflyrpa/share";
2
+ import type { ActiomCommonParams, Toutiao } from "../../types";
3
+ export interface SearchToutiaoTopicListParams extends Omit<ActiomCommonParams, "cookies"> {
4
+ cookies: Partial<CookiesSetDetails>[];
5
+ searchValue: string;
6
+ }
7
+ export type PublishAction = CommonAction<SearchToutiaoTopicListParams, Toutiao.Topic[]>;
8
+ export declare const searchToutiaoTopicList: PublishAction;
@@ -0,0 +1,12 @@
1
+ import type { CommonAction, CookiesSetDetails } from "@iflyrpa/share";
2
+ import type { ActiomCommonParams, Xiaohongshu } from "../../types";
3
+ export interface searchXiaohongshuLocationParams extends Omit<ActiomCommonParams, "cookies"> {
4
+ cookies: Partial<CookiesSetDetails>[];
5
+ searchValue: string;
6
+ latitude?: number;
7
+ longitude?: number;
8
+ size?: number;
9
+ page?: number;
10
+ }
11
+ export type PublishAction = CommonAction<searchXiaohongshuLocationParams, Xiaohongshu.Location[]>;
12
+ export declare const searchXiaohongshuLocation: PublishAction;
@@ -0,0 +1,28 @@
1
+ import type { CommonAction, CookiesSetDetails } from "@iflyrpa/share";
2
+ import type { ActiomCommonParams } from "../../types";
3
+ export interface ToutiaoPublishParams extends Omit<ActiomCommonParams, "cookies"> {
4
+ saveType: "draft" | "publish";
5
+ cookies: Partial<CookiesSetDetails>[];
6
+ title: string;
7
+ content: string;
8
+ settingInfo: {
9
+ toutiaoCoverType: "single" | "multiple" | "no";
10
+ toutiaoTitleType: "single" | "multiple";
11
+ toutiaoSingleCover: string;
12
+ toutiaoMultCover: string[];
13
+ toutiaoAd: string;
14
+ toutiaoOriginal: string;
15
+ toutiaoLocation?: {
16
+ label: string;
17
+ value: string;
18
+ };
19
+ toutiaoTopic: {
20
+ id: string;
21
+ word: string;
22
+ }[];
23
+ cntWord: number;
24
+ subTitles: string[];
25
+ };
26
+ }
27
+ export type PublishAction = CommonAction<ToutiaoPublishParams, string>;
28
+ export declare const toutiaoPublish: PublishAction;
@@ -0,0 +1,2 @@
1
+ import type { PublishAction } from ".";
2
+ export declare const mockAction: PublishAction;
@@ -0,0 +1,23 @@
1
+ import type { CommonAction, CookiesSetDetails } from "@iflyrpa/share";
2
+ import type { ActiomCommonParams } from "../../types";
3
+ /**
4
+ * 作品声明
5
+ * 1:引用站内
6
+ * 3:引用AI
7
+ * 4:取材网络
8
+ * 5:个人观点,仅供参考
9
+ * 6:虚构演绎,故事经历
10
+ * 7:投资观点,仅供参考
11
+ * 8:健康医疗分享,仅供参考
12
+ */
13
+ type DeclarationType = 1 | 3 | 4 | 5 | 6 | 7 | 8;
14
+ export interface WeitoutiaoPublishParams extends Omit<ActiomCommonParams, "cookies"> {
15
+ cookies: Partial<CookiesSetDetails>[];
16
+ content: string;
17
+ banners?: string[];
18
+ address?: string;
19
+ declaration?: DeclarationType;
20
+ }
21
+ export type PublishAction = CommonAction<WeitoutiaoPublishParams>;
22
+ export declare const weitoutiaoPublish: PublishAction;
23
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { PublishAction } from ".";
2
+ export declare const mockAction: PublishAction;
@@ -0,0 +1,2 @@
1
+ import type { PublishAction } from "./index";
2
+ export declare const rpaAction: PublishAction;
@@ -0,0 +1,25 @@
1
+ import type { CommonAction, CookiesSetDetails } from "@iflyrpa/share";
2
+ import type { ActiomCommonParams } from "../../types";
3
+ export interface WeixinPublishParams extends Omit<ActiomCommonParams, "cookies"> {
4
+ saveType: "draft" | "publish";
5
+ token: string | number;
6
+ cookies: Partial<CookiesSetDetails>[];
7
+ title: string;
8
+ content: string;
9
+ uuid?: string;
10
+ appMsgId?: string;
11
+ operation_seq?: string;
12
+ settingInfo: {
13
+ wxCover: string;
14
+ wxAuthor?: string;
15
+ wxAbstract?: string;
16
+ wxOriginalText?: string;
17
+ wxFansMsg?: boolean;
18
+ wxQuickReprint?: boolean;
19
+ wxNotAllowRecommend?: boolean;
20
+ wxCreationSource?: string[];
21
+ };
22
+ safeQrcodeCallback?: (qrcodePath: string) => void;
23
+ }
24
+ export type PublishAction = CommonAction<WeixinPublishParams, string>;
25
+ export declare const weixinPublish: PublishAction;
@@ -0,0 +1,2 @@
1
+ import type { PublishAction } from ".";
2
+ export declare const mockAction: PublishAction;
@@ -0,0 +1,20 @@
1
+ import type { CommonAction, CookiesSetDetails } from "@iflyrpa/share";
2
+ import type { ActiomCommonParams } from "../../types";
3
+ export type Source = "ai" | "official" | "fictional" | "personal";
4
+ export interface WeixinmpPublishParams extends Omit<ActiomCommonParams, "cookies"> {
5
+ token: string | number;
6
+ cookies: Partial<CookiesSetDetails>[];
7
+ banners?: string[];
8
+ title: string;
9
+ content: string;
10
+ /**
11
+ * 内容由AI生成 - ai
12
+ * 素材来源官方媒体/网络新闻 - official
13
+ * 内容剧情演绎,仅供娱乐 - fictional
14
+ * 个人观点,仅供参考 - personal
15
+ */
16
+ source?: Source;
17
+ draft?: boolean;
18
+ }
19
+ export type PublishAction = CommonAction<WeixinmpPublishParams>;
20
+ export declare const weixinmpPublish: PublishAction;
@@ -0,0 +1,2 @@
1
+ import type { PublishAction } from ".";
2
+ export declare const mockAction: PublishAction;
@@ -0,0 +1,2 @@
1
+ import type { PublishAction } from "./index";
2
+ export declare const rpaAction: PublishAction;
@@ -0,0 +1,30 @@
1
+ import type { CommonAction, CookiesSetDetails } from "@iflyrpa/share";
2
+ import type { ActiomCommonParams, Xiaohongshu } from "../../types";
3
+ interface FictionalRendition {
4
+ type: "fictional-rendition";
5
+ }
6
+ interface AIGenerated {
7
+ type: "ai-generated";
8
+ }
9
+ interface SourceStatement {
10
+ type: "source-statement";
11
+ childType: "self-labeling" | "self-shooting" | "transshipment";
12
+ shootingLocation?: Xiaohongshu.Location;
13
+ shootingDate?: string;
14
+ sourceMedia?: string;
15
+ }
16
+ type SelfDeclaration = FictionalRendition | AIGenerated | SourceStatement;
17
+ export interface XiaohongshuPublishParams extends Omit<ActiomCommonParams, "cookies"> {
18
+ cookies: Partial<CookiesSetDetails>[];
19
+ banners: string[];
20
+ title: string;
21
+ content: string;
22
+ address?: Xiaohongshu.Location;
23
+ selfDeclaration?: SelfDeclaration;
24
+ visibleRange: "public" | "private";
25
+ isImmediatelyPublish?: boolean;
26
+ scheduledPublish?: string;
27
+ }
28
+ export type PublishAction = CommonAction<XiaohongshuPublishParams, string>;
29
+ export declare const xiaohongshuPublish: PublishAction;
30
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { PublishAction } from ".";
2
+ export declare const mockAction: PublishAction;
@@ -0,0 +1,2 @@
1
+ import type { PublishAction } from "./index";
2
+ export declare const rpaAction: PublishAction;
@@ -0,0 +1,32 @@
1
+ import type { AutomateTask } from "@iflyrpa/share";
2
+ import { type BaijiahaoPublishParams } from "./actions/baijiahaoPublish";
3
+ import { type GetBaijiahaoActivityParams } from "./actions/getBaijiahaoActivity";
4
+ import { type GetToutiaoConfigParams } from "./actions/getToutiaoConfig";
5
+ import { type SearchToutiaoTopicListParams } from "./actions/searchToutiaoTopicList";
6
+ import { type searchXiaohongshuLocationParams } from "./actions/searchXiaohongshuLocation";
7
+ import { type ToutiaoPublishParams } from "./actions/toutiaoPublish";
8
+ import { type WeitoutiaoPublishParams } from "./actions/weitoutiaoPublish";
9
+ import { type WeixinPublishParams } from "./actions/weixinPublish";
10
+ import { type WeixinmpPublishParams } from "./actions/weixinmpPublish";
11
+ import { type XiaohongshuPublishParams } from "./actions/xiaohongshuPublish";
12
+ export declare class Action {
13
+ private task;
14
+ constructor(task: AutomateTask);
15
+ private bindTask;
16
+ searchToutiaoTopicList(params: SearchToutiaoTopicListParams): Promise<any> | Promise<import("./types").Toutiao.Topic[]> | undefined;
17
+ getToutiaoConfig(params: GetToutiaoConfigParams): Promise<any> | Promise<import("./actions/getToutiaoConfig").GetToutiaoConfigResult> | undefined;
18
+ baijiahaoPublish(params: BaijiahaoPublishParams): Promise<string> | Promise<any> | undefined;
19
+ getBaijiahaoActivity(params: GetBaijiahaoActivityParams): Promise<any> | Promise<import("./actions/getBaijiahaoActivity").ActivityData[]> | undefined;
20
+ xiaohongshuPublish(params: XiaohongshuPublishParams): Promise<string> | Promise<any> | undefined;
21
+ searchXiaohongshuLocation(params: searchXiaohongshuLocationParams): Promise<any> | Promise<import("./types").Xiaohongshu.Location[]> | undefined;
22
+ weixinmpPublish(params: WeixinmpPublishParams): Promise<any> | undefined;
23
+ weitoutiaoPublish(params: WeitoutiaoPublishParams): Promise<any> | undefined;
24
+ toutiaoPublish(params: ToutiaoPublishParams): Promise<string> | Promise<any> | undefined;
25
+ weixinPublish(params: WeixinPublishParams): Promise<string> | Promise<any> | undefined;
26
+ }
27
+ type ActionInstance = InstanceType<typeof Action>;
28
+ type MethodParams<T> = {
29
+ [K in keyof T]: T[K] extends (...args: any[]) => unknown ? Parameters<T[K]>[0] : never;
30
+ };
31
+ export type ActionMethodParams = MethodParams<ActionInstance>;
32
+ export { version } from "../package.json";