@iflyrpa/actions 1.2.30-beta.3 → 1.2.30-beta.5

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.
@@ -1,42 +1,64 @@
1
1
  import type { CommonAction } from "@iflyrpa/share";
2
- import type { ActiomCommonParams } from "../../types";
3
- interface ActivityData {
4
- id: string;
5
- task_name: string;
6
- [key: string]: any;
7
- }
8
- export interface BaijiahaoPublishParams extends ActiomCommonParams {
9
- saveType: "draft" | "publish";
10
- token: string;
11
- title: string;
12
- content: string;
13
- proxyLoc?: string;
14
- localIP?: string;
15
- huiwenToken?: string;
16
- settingInfo: {
17
- baijiahaoTitle: string;
18
- baijiahaoCoverType: "single" | "multiple";
19
- baijiahaoAbstract: string;
20
- baijiahaoIsAi: string[];
21
- baijiahaoSingleCover: string;
22
- baijiahaoMultCover: string[];
23
- baijiahaoVerticalCover?: string;
24
- baijiahaoActivity: ActivityData[];
25
- baijiahaoPublishConf?: {
26
- confName: string;
27
- isChecked: boolean;
28
- }[];
29
- baijiahaoTopic?: Record<string, any>;
30
- baijiahaoCms?: string[];
31
- baijiahaoEventSpec?: {
32
- time: string;
33
- pos: string;
34
- };
35
- baijiahaoEvent2News: boolean;
36
- baijiahaoSelectActivityCache: string[];
37
- timer?: number;
38
- };
39
- }
2
+ import { z } from "zod";
3
+ import { ActiomCommonParams } from "../../types";
4
+ export declare const BaijiahaoPublishParamsSchema: z.ZodObject<{
5
+ url: z.ZodOptional<z.ZodString>;
6
+ cookies: z.ZodArray<z.ZodObject<{
7
+ name: z.ZodString;
8
+ value: z.ZodString;
9
+ domain: z.ZodOptional<z.ZodString>;
10
+ path: z.ZodOptional<z.ZodString>;
11
+ expires: z.ZodOptional<z.ZodNumber>;
12
+ httpOnly: z.ZodOptional<z.ZodBoolean>;
13
+ secure: z.ZodOptional<z.ZodBoolean>;
14
+ }, z.core.$catchall<z.ZodUnknown>>>;
15
+ actionType: z.ZodOptional<z.ZodEnum<{
16
+ mockApi: "mockApi";
17
+ rpa: "rpa";
18
+ server: "server";
19
+ }>>;
20
+ accountId: z.ZodOptional<z.ZodNumber>;
21
+ articleId: z.ZodOptional<z.ZodString>;
22
+ saveType: z.ZodEnum<{
23
+ draft: "draft";
24
+ publish: "publish";
25
+ }>;
26
+ token: z.ZodString;
27
+ title: z.ZodString;
28
+ content: z.ZodString;
29
+ proxyLoc: z.ZodOptional<z.ZodString>;
30
+ localIP: z.ZodOptional<z.ZodString>;
31
+ huiwenToken: z.ZodOptional<z.ZodString>;
32
+ settingInfo: z.ZodObject<{
33
+ baijiahaoTitle: z.ZodString;
34
+ baijiahaoCoverType: z.ZodEnum<{
35
+ single: "single";
36
+ multiple: "multiple";
37
+ }>;
38
+ baijiahaoAbstract: z.ZodString;
39
+ baijiahaoIsAi: z.ZodArray<z.ZodString>;
40
+ baijiahaoSingleCover: z.ZodString;
41
+ baijiahaoMultCover: z.ZodArray<z.ZodString>;
42
+ baijiahaoVerticalCover: z.ZodOptional<z.ZodString>;
43
+ baijiahaoActivity: z.ZodArray<z.ZodObject<{
44
+ id: z.ZodString;
45
+ task_name: z.ZodString;
46
+ }, z.core.$catchall<z.ZodAny>>>;
47
+ baijiahaoPublishConf: z.ZodOptional<z.ZodArray<z.ZodObject<{
48
+ confName: z.ZodString;
49
+ isChecked: z.ZodBoolean;
50
+ }, z.core.$strip>>>;
51
+ baijiahaoTopic: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
52
+ baijiahaoCms: z.ZodOptional<z.ZodArray<z.ZodString>>;
53
+ baijiahaoEventSpec: z.ZodOptional<z.ZodObject<{
54
+ time: z.ZodOptional<z.ZodString>;
55
+ pos: z.ZodOptional<z.ZodString>;
56
+ }, z.core.$strip>>;
57
+ baijiahaoEvent2News: z.ZodBoolean;
58
+ baijiahaoSelectActivityCache: z.ZodArray<z.ZodString>;
59
+ timer: z.ZodOptional<z.ZodNumber>;
60
+ }, z.core.$strip>;
61
+ }, z.core.$strip>;
62
+ export type BaijiahaoPublishParams = ActiomCommonParams & z.infer<typeof BaijiahaoPublishParamsSchema>;
40
63
  export type PublishAction = CommonAction<BaijiahaoPublishParams, string>;
41
64
  export declare const baijiahaoPublish: PublishAction;
42
- export {};
@@ -46,4 +46,3 @@ export interface SearchAccountInfoResponse {
46
46
  message: string;
47
47
  data: ttConfigData | xhsConfigData | wxConfigData | bjhConfigData | null;
48
48
  }
49
- export declare const errorResponse: (message: string, code?: number) => SearchAccountInfoResponse;
@@ -1,51 +1,68 @@
1
1
  import type { CommonAction } from "@iflyrpa/share";
2
- import type { ActiomCommonParams } from "../../types";
3
2
  type CoverType = "single" | "multiple" | "no";
4
- export interface ToutiaoPublishParams extends ActiomCommonParams {
5
- saveType: "draft" | "publish";
6
- title: string;
7
- content: string;
8
- proxyLoc?: string;
9
- localIP?: string;
10
- huiwenToken?: string;
11
- settingInfo: {
12
- toutiaoCoverType: CoverType;
13
- toutiaoTitleType: "single" | "multiple";
14
- toutiaoSingleCover: string;
15
- toutiaoMultCover: string[];
16
- toutiaoAd: string;
17
- toutiaoOriginal?: string;
18
- toutiaoExclusive?: number;
19
- toutiaoCollectionId?: string;
20
- toutiaoTransWtt?: boolean;
21
- toutiaoClaim?: {
22
- type: number;
23
- source_author_uid?: string;
24
- source_author_name?: string;
25
- time_format?: string;
26
- position?: {
27
- position: string;
28
- city: string;
29
- longitude: number;
30
- latitude: number;
31
- type_code: string;
32
- poi_id: string;
33
- };
34
- };
35
- toutiaoLocation?: {
36
- label: string;
37
- value: string;
38
- [key: string]: any;
39
- };
40
- toutiaoTopic: {
41
- id: string;
42
- word: string;
43
- }[];
44
- cntWord: number;
45
- subTitles: string[];
46
- timer?: number;
47
- };
48
- }
3
+ import { z } from "zod";
4
+ export declare const ToutiaoPublishParamsSchema: z.ZodObject<{
5
+ url: z.ZodOptional<z.ZodString>;
6
+ cookies: z.ZodArray<z.ZodObject<{
7
+ name: z.ZodString;
8
+ value: z.ZodString;
9
+ domain: z.ZodOptional<z.ZodString>;
10
+ path: z.ZodOptional<z.ZodString>;
11
+ expires: z.ZodOptional<z.ZodNumber>;
12
+ httpOnly: z.ZodOptional<z.ZodBoolean>;
13
+ secure: z.ZodOptional<z.ZodBoolean>;
14
+ }, z.core.$catchall<z.ZodUnknown>>>;
15
+ actionType: z.ZodOptional<z.ZodEnum<{
16
+ mockApi: "mockApi";
17
+ rpa: "rpa";
18
+ server: "server";
19
+ }>>;
20
+ accountId: z.ZodOptional<z.ZodNumber>;
21
+ articleId: z.ZodOptional<z.ZodString>;
22
+ saveType: z.ZodUnion<readonly [z.ZodLiteral<"draft">, z.ZodLiteral<"publish">]>;
23
+ title: z.ZodString;
24
+ content: z.ZodString;
25
+ proxyLoc: z.ZodOptional<z.ZodString>;
26
+ localIP: z.ZodOptional<z.ZodString>;
27
+ huiwenToken: z.ZodOptional<z.ZodString>;
28
+ settingInfo: z.ZodObject<{
29
+ toutiaoCoverType: z.ZodUnion<readonly [z.ZodLiteral<"single">, z.ZodLiteral<"multiple">, z.ZodLiteral<"no">]>;
30
+ toutiaoTitleType: z.ZodUnion<readonly [z.ZodLiteral<"single">, z.ZodLiteral<"multiple">]>;
31
+ toutiaoSingleCover: z.ZodString;
32
+ toutiaoMultCover: z.ZodArray<z.ZodString>;
33
+ toutiaoAd: z.ZodString;
34
+ toutiaoOriginal: z.ZodOptional<z.ZodString>;
35
+ toutiaoExclusive: z.ZodOptional<z.ZodNumber>;
36
+ toutiaoCollectionId: z.ZodOptional<z.ZodString>;
37
+ toutiaoTransWtt: z.ZodOptional<z.ZodBoolean>;
38
+ toutiaoClaim: z.ZodOptional<z.ZodObject<{
39
+ type: z.ZodNumber;
40
+ source_author_uid: z.ZodOptional<z.ZodString>;
41
+ source_author_name: z.ZodOptional<z.ZodString>;
42
+ time_format: z.ZodOptional<z.ZodString>;
43
+ position: z.ZodOptional<z.ZodObject<{
44
+ position: z.ZodString;
45
+ city: z.ZodString;
46
+ longitude: z.ZodNumber;
47
+ latitude: z.ZodNumber;
48
+ type_code: z.ZodString;
49
+ poi_id: z.ZodString;
50
+ }, z.core.$strip>>;
51
+ }, z.core.$strip>>;
52
+ toutiaoLocation: z.ZodOptional<z.ZodObject<{
53
+ label: z.ZodString;
54
+ value: z.ZodString;
55
+ }, z.core.$loose>>;
56
+ toutiaoTopic: z.ZodArray<z.ZodObject<{
57
+ id: z.ZodString;
58
+ word: z.ZodString;
59
+ }, z.core.$strip>>;
60
+ cntWord: z.ZodNumber;
61
+ subTitles: z.ZodArray<z.ZodString>;
62
+ timer: z.ZodOptional<z.ZodNumber>;
63
+ }, z.core.$strip>;
64
+ }, z.core.$strip>;
65
+ export type ToutiaoPublishParams = z.infer<typeof ToutiaoPublishParamsSchema>;
49
66
  export declare const COVER_TYPE: Record<CoverType, number>;
50
67
  export declare const getAddTypeValue: (toutiaoAd: ToutiaoPublishParams["settingInfo"]["toutiaoAd"]) => 2 | 3;
51
68
  export type PublishAction = CommonAction<ToutiaoPublishParams, string>;
@@ -1,5 +1,5 @@
1
1
  import type { CommonAction } from "@iflyrpa/share";
2
- import type { ActiomCommonParams } from "../../types";
2
+ import { ActiomCommonParams } from "../../types";
3
3
  /**
4
4
  * 作品声明
5
5
  * 1:引用站内
@@ -1,6 +1,4 @@
1
1
  import type { CommonAction } from "@iflyrpa/share";
2
- import type { ActiomCommonParams } from "../../types";
3
- import type { CollectDetail } from "../getWeixinCollection";
4
2
  export interface WxInteraction {
5
3
  Type: "public" | "private" | "off";
6
4
  Option?: {
@@ -10,37 +8,102 @@ export interface WxInteraction {
10
8
  elect_reply: boolean;
11
9
  };
12
10
  }
13
- export interface WeixinPublishParams extends ActiomCommonParams {
14
- saveType: "draft" | "publish";
15
- masssend?: boolean;
16
- token: string | number;
17
- title: string;
18
- content: string;
19
- uuid?: string;
20
- appMsgId?: string;
21
- operation_seq?: string;
22
- proxyLoc?: string;
23
- localIP?: string;
24
- huiwenToken?: string;
25
- settingInfo: {
26
- wxCover: string;
27
- wxAuthor?: string;
28
- wxAbstract?: string;
29
- wxOriginalText?: string;
30
- wxCopyright?: boolean;
31
- wxWhitelist?: string[];
32
- wxRewardTarget?: Record<string, string>;
33
- wxRewardText?: string;
34
- wxQuickReprint?: boolean;
35
- wxNotAllowRecommend?: boolean;
36
- wxCreationSource?: string[];
37
- wxInteraction?: WxInteraction;
38
- timer?: number;
39
- wxTopic?: string[];
40
- wxCollectionInfo?: CollectDetail;
41
- };
11
+ import { z } from "zod";
12
+ export declare const WxInteractionSchema: z.ZodObject<{
13
+ Type: z.ZodEnum<{
14
+ public: "public";
15
+ private: "private";
16
+ off: "off";
17
+ }>;
18
+ Option: z.ZodOptional<z.ZodObject<{
19
+ Comment: z.ZodEnum<{
20
+ 所有用户: "所有用户";
21
+ 已关注的用户: "已关注的用户";
22
+ 已关注7天及以上的用户: "已关注7天及以上的用户";
23
+ }>;
24
+ reply: z.ZodEnum<{
25
+ 所有用户: "所有用户";
26
+ 已关注的用户: "已关注的用户";
27
+ 已关注7天及以上的用户: "已关注7天及以上的用户";
28
+ }>;
29
+ elect_comment: z.ZodBoolean;
30
+ elect_reply: z.ZodBoolean;
31
+ }, z.core.$strip>>;
32
+ }, z.core.$strip>;
33
+ export declare const WeixinPublishParamsSchema: z.ZodObject<{
34
+ url: z.ZodOptional<z.ZodString>;
35
+ cookies: z.ZodArray<z.ZodObject<{
36
+ name: z.ZodString;
37
+ value: z.ZodString;
38
+ domain: z.ZodOptional<z.ZodString>;
39
+ path: z.ZodOptional<z.ZodString>;
40
+ expires: z.ZodOptional<z.ZodNumber>;
41
+ httpOnly: z.ZodOptional<z.ZodBoolean>;
42
+ secure: z.ZodOptional<z.ZodBoolean>;
43
+ }, z.core.$catchall<z.ZodUnknown>>>;
44
+ actionType: z.ZodOptional<z.ZodEnum<{
45
+ mockApi: "mockApi";
46
+ rpa: "rpa";
47
+ server: "server";
48
+ }>>;
49
+ accountId: z.ZodOptional<z.ZodNumber>;
50
+ articleId: z.ZodOptional<z.ZodString>;
51
+ saveType: z.ZodEnum<{
52
+ draft: "draft";
53
+ publish: "publish";
54
+ }>;
55
+ masssend: z.ZodOptional<z.ZodBoolean>;
56
+ token: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
57
+ title: z.ZodString;
58
+ content: z.ZodString;
59
+ uuid: z.ZodOptional<z.ZodString>;
60
+ appMsgId: z.ZodOptional<z.ZodString>;
61
+ operation_seq: z.ZodOptional<z.ZodString>;
62
+ proxyLoc: z.ZodOptional<z.ZodString>;
63
+ localIP: z.ZodOptional<z.ZodString>;
64
+ huiwenToken: z.ZodOptional<z.ZodString>;
65
+ settingInfo: z.ZodObject<{
66
+ wxCover: z.ZodString;
67
+ wxAuthor: z.ZodOptional<z.ZodString>;
68
+ wxAbstract: z.ZodOptional<z.ZodString>;
69
+ wxOriginalText: z.ZodOptional<z.ZodString>;
70
+ wxCopyright: z.ZodOptional<z.ZodBoolean>;
71
+ wxWhitelist: z.ZodOptional<z.ZodArray<z.ZodString>>;
72
+ wxRewardTarget: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
73
+ wxRewardText: z.ZodOptional<z.ZodString>;
74
+ wxQuickReprint: z.ZodOptional<z.ZodBoolean>;
75
+ wxNotAllowRecommend: z.ZodOptional<z.ZodBoolean>;
76
+ wxCreationSource: z.ZodOptional<z.ZodArray<z.ZodString>>;
77
+ wxInteraction: z.ZodOptional<z.ZodObject<{
78
+ Type: z.ZodEnum<{
79
+ public: "public";
80
+ private: "private";
81
+ off: "off";
82
+ }>;
83
+ Option: z.ZodOptional<z.ZodObject<{
84
+ Comment: z.ZodEnum<{
85
+ 所有用户: "所有用户";
86
+ 已关注的用户: "已关注的用户";
87
+ 已关注7天及以上的用户: "已关注7天及以上的用户";
88
+ }>;
89
+ reply: z.ZodEnum<{
90
+ 所有用户: "所有用户";
91
+ 已关注的用户: "已关注的用户";
92
+ 已关注7天及以上的用户: "已关注7天及以上的用户";
93
+ }>;
94
+ elect_comment: z.ZodBoolean;
95
+ elect_reply: z.ZodBoolean;
96
+ }, z.core.$strip>>;
97
+ }, z.core.$strip>>;
98
+ timer: z.ZodOptional<z.ZodNumber>;
99
+ wxTopic: z.ZodOptional<z.ZodArray<z.ZodString>>;
100
+ wxCollectionInfo: z.ZodOptional<z.ZodAny>;
101
+ }, z.core.$strip>;
102
+ }, z.core.$strip>;
103
+ export interface WeixinPublishRuntimeOptions {
42
104
  safeQrcodeCallback?: (qrcodePath: string) => void;
43
105
  }
106
+ export type WeixinPublishParams = z.infer<typeof WeixinPublishParamsSchema> & WeixinPublishRuntimeOptions;
44
107
  export interface WxWhitelistUserInfo {
45
108
  nickname: string;
46
109
  openid: string;