@perk-net/perk-pushplus-sdk 1.2.0 → 1.2.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.cts CHANGED
@@ -645,6 +645,18 @@ interface TopicUserListQuery {
645
645
  /** 例如 { topicId }。 */
646
646
  params?: Record<string, unknown>;
647
647
  }
648
+ /** 群组订阅人黑名单列表项。 */
649
+ interface TopicUserBlacklistItem {
650
+ /** 黑名单记录 ID;解除黑名单时使用。 */
651
+ id?: number;
652
+ /** 被拉黑用户 ID。 */
653
+ userId?: number;
654
+ nickName?: string;
655
+ openId?: string;
656
+ headImgUrl?: string;
657
+ /** 拉黑时间。 */
658
+ createTime?: string;
659
+ }
648
660
  interface WebhookItem {
649
661
  id?: number;
650
662
  webhookCode?: string;
@@ -685,6 +697,17 @@ interface FriendItem {
685
697
  interface FriendQrCode {
686
698
  qrCodeImgUrl?: string;
687
699
  }
700
+ /** 好友黑名单列表项。 */
701
+ interface FriendBlacklistItem {
702
+ /** 黑名单记录 ID;解除黑名单时使用。 */
703
+ id?: number;
704
+ /** 被拉黑好友 ID。 */
705
+ friendId?: number;
706
+ nickName?: string;
707
+ headImgUrl?: string;
708
+ /** 拉黑时间。 */
709
+ createTime?: string;
710
+ }
688
711
  interface ClawBotInfo {
689
712
  createTime?: string;
690
713
  /** 是否有对话令牌(文档为字符串/数字混用,统一用 number 兼容)。 */
@@ -843,16 +866,19 @@ interface ImageItem {
843
866
  /** 创建时间。 */
844
867
  createTime?: string;
845
868
  }
846
- /** 我的表单分页查询。 */
869
+ /** 我的表单分页查询。官方结构为 `{current, pageSize, params:{keyword, status}}`。 */
847
870
  interface FormListQuery {
848
- /** 页码,从 1 开始。 */
849
- pageNum?: number;
850
- /** 每页条数。 */
871
+ /** 当前所在分页数,默认 1 */
872
+ current?: number;
873
+ /** 每页大小,默认 20,最大 50。 */
851
874
  pageSize?: number;
852
- /** 按标题关键词搜索。 */
853
- keyword?: string;
854
- /** 表单状态:0草稿 / 1收集中 / 2已停止。 */
855
- status?: number;
875
+ params?: {
876
+ /** 按标题关键词搜索。 */
877
+ keyword?: string;
878
+ /** 表单状态:0草稿 / 1收集中 / 2已停止。 */
879
+ status?: number;
880
+ [key: string]: unknown;
881
+ };
856
882
  }
857
883
  /** 表单封面页配置。 */
858
884
  interface FormCover {
@@ -956,13 +982,18 @@ interface FormPublishResult {
956
982
  publishDirty?: boolean;
957
983
  publishTime?: string;
958
984
  }
959
- /** 文档 / 表格分页查询。 */
985
+ /** 文档 / 表格分页查询。官方结构为 `{current, pageSize, params:{keyword, shareEnabled}}`。 */
960
986
  interface DocListQuery {
961
- pageNum?: number;
987
+ /** 当前所在分页数,默认 1。 */
988
+ current?: number;
989
+ /** 每页大小,默认 20,最大 50。 */
962
990
  pageSize?: number;
963
- keyword?: string;
964
- /** true 时仅返回已开启分享的记录。 */
965
- shareEnabled?: boolean;
991
+ params?: {
992
+ keyword?: string;
993
+ /** true 时仅返回已开启分享的记录。 */
994
+ shareEnabled?: boolean;
995
+ [key: string]: unknown;
996
+ };
966
997
  }
967
998
  /** 文档 / 表格列表项。 */
968
999
  interface DocListItem {
@@ -1022,6 +1053,11 @@ declare abstract class AbstractApi {
1022
1053
  * 执行请求并返回原始 ApiResponse(不进行 code 校验)。
1023
1054
  */
1024
1055
  protected execute<T>(method: string, path: string, headers: Record<string, string> | undefined | null, body: unknown): Promise<ApiResponse<T>>;
1056
+ /**
1057
+ * 执行带二进制请求体的请求并返回原始 ApiResponse(不进行 code 校验)。
1058
+ * 用于 multipart 上传等场景。
1059
+ */
1060
+ protected executeRaw<T>(method: string, path: string, headers: Record<string, string> | undefined | null, body: Uint8Array): Promise<ApiResponse<T>>;
1025
1061
  /** 执行请求并直接返回 data;非 200 抛出异常。 */
1026
1062
  protected executeForData<T>(method: string, path: string, headers: Record<string, string> | undefined | null, body: unknown): Promise<T>;
1027
1063
  }
@@ -1066,6 +1102,13 @@ declare class AccessKeyManager {
1066
1102
  private isValid;
1067
1103
  }
1068
1104
 
1105
+ /** 二进制文件输入。 */
1106
+ type FileInput = Uint8Array | ArrayBuffer | Blob;
1107
+ interface FileMultipart {
1108
+ contentType: string;
1109
+ body: Uint8Array;
1110
+ }
1111
+
1069
1112
  /**
1070
1113
  * 开放接口基类。会自动在 header 中带上 access-key,
1071
1114
  * 并在收到 401 类业务错误时尝试重试一次(刷新 AccessKey 后重试)。
@@ -1081,6 +1124,12 @@ declare abstract class OpenAbstractApi extends AbstractApi {
1081
1124
  * 执行带 access-key 的请求;当返回 code=401 时自动刷新 key 并重试一次。
1082
1125
  */
1083
1126
  protected executeOpen<T>(method: string, path: string, body?: unknown): Promise<T>;
1127
+ /** 以 multipart 上传文件(自动携带 access-key;code=401 时刷新后重试一次)。 */
1128
+ protected executeOpenMultipart<T>(path: string, multipart: FileMultipart): Promise<T>;
1129
+ /**
1130
+ * 执行带二进制 body 的开放接口请求;当返回 code=401 时自动刷新 key 并重试一次。
1131
+ */
1132
+ protected executeOpenRaw<T>(method: string, path: string, body: Uint8Array, extraHeaders?: Record<string, string>): Promise<T>;
1084
1133
  }
1085
1134
 
1086
1135
  /**
@@ -1120,6 +1169,9 @@ declare class ClawBotApi extends OpenAbstractApi {
1120
1169
  *
1121
1170
  * 文档:https://www.pushplus.plus/doc/ecosystem/doc/
1122
1171
  * 基础路径:`/push/api/open/doc`
1172
+ *
1173
+ * 文档开放接口不单独提供推送接口。发布后请通过 `client.send` 推送分享页:
1174
+ * `template=doc`,`pushId=docCode`。
1123
1175
  */
1124
1176
  declare class DocApi extends OpenAbstractApi {
1125
1177
  constructor(config: ResolvedPushPlusConfig, http: HttpRequester, mgr: AccessKeyManager);
@@ -1127,6 +1179,12 @@ declare class DocApi extends OpenAbstractApi {
1127
1179
  list(query?: DocListQuery): Promise<PageResult<DocListItem>>;
1128
1180
  /** 创建空白文档。 */
1129
1181
  create(title: string): Promise<DocVo>;
1182
+ /**
1183
+ * 导入 Word(.docx)创建文档。
1184
+ *
1185
+ * 标题默认取文件名;创建后默认关闭分享,需再调用 publish 才会同步到分享页。
1186
+ */
1187
+ importWord(file: FileInput, fileName?: string): Promise<DocVo>;
1130
1188
  /** 获取文档元信息与 HTML 草稿正文。 */
1131
1189
  content(docCode: string): Promise<DocContent>;
1132
1190
  /** 保存 HTML 草稿(不影响分享页,需再 publish)。 */
@@ -1151,6 +1209,9 @@ declare class DocApi extends OpenAbstractApi {
1151
1209
  *
1152
1210
  * 文档:https://www.pushplus.plus/doc/ecosystem/sheet/
1153
1211
  * 基础路径:`/push/api/open/excel`
1212
+ *
1213
+ * 表格开放接口不单独提供推送接口。发布后请通过 `client.send` 推送分享页:
1214
+ * `template=excel`,`pushId=docCode`。
1154
1215
  */
1155
1216
  declare class ExcelApi extends OpenAbstractApi {
1156
1217
  constructor(config: ResolvedPushPlusConfig, http: HttpRequester, mgr: AccessKeyManager);
@@ -1158,6 +1219,12 @@ declare class ExcelApi extends OpenAbstractApi {
1158
1219
  list(query?: DocListQuery): Promise<PageResult<DocListItem>>;
1159
1220
  /** 创建空白表格。 */
1160
1221
  create(title: string): Promise<ExcelVo>;
1222
+ /**
1223
+ * 导入 Excel(.xlsx / .xls)创建表格。
1224
+ *
1225
+ * 标题默认取文件名;创建后默认关闭分享,需再调用 publish 才会同步到分享页。
1226
+ */
1227
+ importExcel(file: FileInput, fileName?: string): Promise<ExcelVo>;
1161
1228
  /** 获取表格元信息与整表 JSON 草稿。 */
1162
1229
  content(docCode: string): Promise<ExcelContent>;
1163
1230
  /**
@@ -1194,6 +1261,9 @@ declare class ExcelApi extends OpenAbstractApi {
1194
1261
  *
1195
1262
  * 文档:https://www.pushplus.plus/doc/ecosystem/form/
1196
1263
  * 基础路径:`/push/api/open/form`
1264
+ *
1265
+ * 表单开放接口不单独提供推送接口。发布后请通过 `client.send` 推送填写页:
1266
+ * `template=form`,`pushId=formCode`。
1197
1267
  */
1198
1268
  declare class FormApi extends OpenAbstractApi {
1199
1269
  constructor(config: ResolvedPushPlusConfig, http: HttpRequester, mgr: AccessKeyManager);
@@ -1235,6 +1305,24 @@ declare class FriendApi extends OpenAbstractApi {
1235
1305
  delete(friendId: number): Promise<void>;
1236
1306
  /** 4. 修改好友备注。 */
1237
1307
  editRemark(id: number, remark: string): Promise<void>;
1308
+ /**
1309
+ * 5. 将好友加入黑名单。
1310
+ *
1311
+ * 加入后将解除双方好友关系,对方无法再添加你。不能将自己加入黑名单,仅可将已有好友加入黑名单。
1312
+ *
1313
+ * @param friendId 好友 id(好友列表中的 friendId 字段)
1314
+ */
1315
+ addBlacklist(friendId: number): Promise<void>;
1316
+ /** 6. 好友黑名单列表。 */
1317
+ blacklistList(query?: PageQuery): Promise<PageResult<FriendBlacklistItem>>;
1318
+ /**
1319
+ * 7. 解除好友黑名单。
1320
+ *
1321
+ * 解除后不会自动恢复好友关系,需重新扫码添加。
1322
+ *
1323
+ * @param id 黑名单记录 ID(黑名单列表中的 id 字段)
1324
+ */
1325
+ removeBlacklist(id: number): Promise<void>;
1238
1326
  }
1239
1327
 
1240
1328
  /**
@@ -1504,6 +1592,28 @@ declare class TopicUserApi extends OpenAbstractApi {
1504
1592
  deleteUser(topicRelationId: number): Promise<string>;
1505
1593
  /** 3. 修改订阅人备注。 */
1506
1594
  editRemark(id: number, remark: string): Promise<void>;
1595
+ /**
1596
+ * 4. 将订阅人加入黑名单。
1597
+ *
1598
+ * 加入后将移出群组,对方无法再加入该群组。积分群组不支持黑名单。不能将自己加入黑名单。
1599
+ *
1600
+ * @param topicRelationId 用户编号(订阅人列表中的 id 字段)
1601
+ */
1602
+ addBlacklist(topicRelationId: number): Promise<void>;
1603
+ /**
1604
+ * 5. 订阅人黑名单列表。
1605
+ *
1606
+ * `query.params.topicId` 必填。
1607
+ */
1608
+ blacklistList(query: TopicUserListQuery): Promise<PageResult<TopicUserBlacklistItem>>;
1609
+ /**
1610
+ * 6. 解除订阅人黑名单。
1611
+ *
1612
+ * 解除后不会自动恢复群组订阅,对方可重新加入该群组。
1613
+ *
1614
+ * @param id 黑名单记录 ID(黑名单列表中的 id 字段)
1615
+ */
1616
+ removeBlacklist(id: number): Promise<void>;
1507
1617
  }
1508
1618
 
1509
1619
  /**
@@ -1671,4 +1781,4 @@ declare const CallbackParser: {
1671
1781
  parse: typeof parseCallback;
1672
1782
  };
1673
1783
 
1674
- export { AbstractApi, AccessKeyApi, AccessKeyManager, type AccessKeyResult, type ApiResponse, type BatchSendRequest, BatchSendRequestBuilder, type BatchSendResult, CallbackEvent, CallbackParser, type CallbackPayload, Channel, ChannelApi, ClawBotApi, type ClawBotInfo, type ClawBotMessage, type ClawBotQrCode, type CpItem, DEFAULT_BASE_URL, DocApi, type DocContent, type DocListItem, type DocListQuery, type DocVo, ErrorCode, ExcelApi, type ExcelContent, type ExcelVo, type ExcelWriteCellsRequest, FetchHttpRequester, FormApi, type FormCover, type FormDetail, type FormItem, type FormListItem, type FormListQuery, type FormPublishDiff, type FormPublishResult, type FormSaveRequest, type FormSettings, FormStatus, FormStatusDescription, type FormTheme, FriendApi, type FriendInfo, type FriendItem, type FriendQrCode, type HttpRawBody, type HttpRawRequestOptions, type HttpRequestOptions, type HttpRequester, type HttpResponse, ImageApi, type ImageFileInput, type ImageItem, type ImageUploadOptions, type ImageUploadResult, type ImageUploadToken, type MailDetail, type MailItem, MessageApi, type MessageCompleteInfo, type MessageItem, type MessageTokenAddRequest, MessageTokenApi, type MessageTokenEditRequest, type MessageTokenItem, type MessageTokenOption, type MpItem, OpenAbstractApi, OpenMessageApi, type PageQuery, type PageResult, PreApi, type PreDetail, type PreItem, type PreSaveRequest, type PreTestRequest, PushPlusClient, PushPlusClientBuilder, type PushPlusClientOptions, type PushPlusConfig, PushPlusError, PushPlusException, RateLimitGuard, type ResolvedPushPlusConfig, type SendCount, type SendMessageResult, type SendRequest, SendRequestBuilder, SendStatus, SendStatusDescription, SettingApi, ShareLogin, SharePerm, Template, type TopicAddRequest, TopicApi, type TopicDetail, type TopicEditRequest, type TopicItem, type TopicListQuery, type TopicQrCode, TopicUserApi, type TopicUserInfo, type TopicUserItem, type TopicUserListQuery, UserApi, type UserDefaultDetail, type UserDefaultItem, type UserDefaultSaveRequest, type UserInfo, type UserLimitTime, type VipInfo, WebhookApi, type WebhookItem, type WebhookSaveRequest, WebhookType, WebhookTypeDescription, batchSendRequest, callExecuteRaw, errorCodeFromValue, isRateLimitedCode, isSuccessfulHttpStatus, parseCallback, resolveConfig, sendRequest };
1784
+ export { AbstractApi, AccessKeyApi, AccessKeyManager, type AccessKeyResult, type ApiResponse, type BatchSendRequest, BatchSendRequestBuilder, type BatchSendResult, CallbackEvent, CallbackParser, type CallbackPayload, Channel, ChannelApi, ClawBotApi, type ClawBotInfo, type ClawBotMessage, type ClawBotQrCode, type CpItem, DEFAULT_BASE_URL, DocApi, type DocContent, type DocListItem, type DocListQuery, type DocVo, ErrorCode, ExcelApi, type ExcelContent, type ExcelVo, type ExcelWriteCellsRequest, FetchHttpRequester, type FileInput, FormApi, type FormCover, type FormDetail, type FormItem, type FormListItem, type FormListQuery, type FormPublishDiff, type FormPublishResult, type FormSaveRequest, type FormSettings, FormStatus, FormStatusDescription, type FormTheme, FriendApi, type FriendBlacklistItem, type FriendInfo, type FriendItem, type FriendQrCode, type HttpRawBody, type HttpRawRequestOptions, type HttpRequestOptions, type HttpRequester, type HttpResponse, ImageApi, type ImageFileInput, type ImageItem, type ImageUploadOptions, type ImageUploadResult, type ImageUploadToken, type MailDetail, type MailItem, MessageApi, type MessageCompleteInfo, type MessageItem, type MessageTokenAddRequest, MessageTokenApi, type MessageTokenEditRequest, type MessageTokenItem, type MessageTokenOption, type MpItem, OpenAbstractApi, OpenMessageApi, type PageQuery, type PageResult, PreApi, type PreDetail, type PreItem, type PreSaveRequest, type PreTestRequest, PushPlusClient, PushPlusClientBuilder, type PushPlusClientOptions, type PushPlusConfig, PushPlusError, PushPlusException, RateLimitGuard, type ResolvedPushPlusConfig, type SendCount, type SendMessageResult, type SendRequest, SendRequestBuilder, SendStatus, SendStatusDescription, SettingApi, ShareLogin, SharePerm, Template, type TopicAddRequest, TopicApi, type TopicDetail, type TopicEditRequest, type TopicItem, type TopicListQuery, type TopicQrCode, TopicUserApi, type TopicUserBlacklistItem, type TopicUserInfo, type TopicUserItem, type TopicUserListQuery, UserApi, type UserDefaultDetail, type UserDefaultItem, type UserDefaultSaveRequest, type UserInfo, type UserLimitTime, type VipInfo, WebhookApi, type WebhookItem, type WebhookSaveRequest, WebhookType, WebhookTypeDescription, batchSendRequest, callExecuteRaw, errorCodeFromValue, isRateLimitedCode, isSuccessfulHttpStatus, parseCallback, resolveConfig, sendRequest };
package/dist/index.d.ts CHANGED
@@ -645,6 +645,18 @@ interface TopicUserListQuery {
645
645
  /** 例如 { topicId }。 */
646
646
  params?: Record<string, unknown>;
647
647
  }
648
+ /** 群组订阅人黑名单列表项。 */
649
+ interface TopicUserBlacklistItem {
650
+ /** 黑名单记录 ID;解除黑名单时使用。 */
651
+ id?: number;
652
+ /** 被拉黑用户 ID。 */
653
+ userId?: number;
654
+ nickName?: string;
655
+ openId?: string;
656
+ headImgUrl?: string;
657
+ /** 拉黑时间。 */
658
+ createTime?: string;
659
+ }
648
660
  interface WebhookItem {
649
661
  id?: number;
650
662
  webhookCode?: string;
@@ -685,6 +697,17 @@ interface FriendItem {
685
697
  interface FriendQrCode {
686
698
  qrCodeImgUrl?: string;
687
699
  }
700
+ /** 好友黑名单列表项。 */
701
+ interface FriendBlacklistItem {
702
+ /** 黑名单记录 ID;解除黑名单时使用。 */
703
+ id?: number;
704
+ /** 被拉黑好友 ID。 */
705
+ friendId?: number;
706
+ nickName?: string;
707
+ headImgUrl?: string;
708
+ /** 拉黑时间。 */
709
+ createTime?: string;
710
+ }
688
711
  interface ClawBotInfo {
689
712
  createTime?: string;
690
713
  /** 是否有对话令牌(文档为字符串/数字混用,统一用 number 兼容)。 */
@@ -843,16 +866,19 @@ interface ImageItem {
843
866
  /** 创建时间。 */
844
867
  createTime?: string;
845
868
  }
846
- /** 我的表单分页查询。 */
869
+ /** 我的表单分页查询。官方结构为 `{current, pageSize, params:{keyword, status}}`。 */
847
870
  interface FormListQuery {
848
- /** 页码,从 1 开始。 */
849
- pageNum?: number;
850
- /** 每页条数。 */
871
+ /** 当前所在分页数,默认 1 */
872
+ current?: number;
873
+ /** 每页大小,默认 20,最大 50。 */
851
874
  pageSize?: number;
852
- /** 按标题关键词搜索。 */
853
- keyword?: string;
854
- /** 表单状态:0草稿 / 1收集中 / 2已停止。 */
855
- status?: number;
875
+ params?: {
876
+ /** 按标题关键词搜索。 */
877
+ keyword?: string;
878
+ /** 表单状态:0草稿 / 1收集中 / 2已停止。 */
879
+ status?: number;
880
+ [key: string]: unknown;
881
+ };
856
882
  }
857
883
  /** 表单封面页配置。 */
858
884
  interface FormCover {
@@ -956,13 +982,18 @@ interface FormPublishResult {
956
982
  publishDirty?: boolean;
957
983
  publishTime?: string;
958
984
  }
959
- /** 文档 / 表格分页查询。 */
985
+ /** 文档 / 表格分页查询。官方结构为 `{current, pageSize, params:{keyword, shareEnabled}}`。 */
960
986
  interface DocListQuery {
961
- pageNum?: number;
987
+ /** 当前所在分页数,默认 1。 */
988
+ current?: number;
989
+ /** 每页大小,默认 20,最大 50。 */
962
990
  pageSize?: number;
963
- keyword?: string;
964
- /** true 时仅返回已开启分享的记录。 */
965
- shareEnabled?: boolean;
991
+ params?: {
992
+ keyword?: string;
993
+ /** true 时仅返回已开启分享的记录。 */
994
+ shareEnabled?: boolean;
995
+ [key: string]: unknown;
996
+ };
966
997
  }
967
998
  /** 文档 / 表格列表项。 */
968
999
  interface DocListItem {
@@ -1022,6 +1053,11 @@ declare abstract class AbstractApi {
1022
1053
  * 执行请求并返回原始 ApiResponse(不进行 code 校验)。
1023
1054
  */
1024
1055
  protected execute<T>(method: string, path: string, headers: Record<string, string> | undefined | null, body: unknown): Promise<ApiResponse<T>>;
1056
+ /**
1057
+ * 执行带二进制请求体的请求并返回原始 ApiResponse(不进行 code 校验)。
1058
+ * 用于 multipart 上传等场景。
1059
+ */
1060
+ protected executeRaw<T>(method: string, path: string, headers: Record<string, string> | undefined | null, body: Uint8Array): Promise<ApiResponse<T>>;
1025
1061
  /** 执行请求并直接返回 data;非 200 抛出异常。 */
1026
1062
  protected executeForData<T>(method: string, path: string, headers: Record<string, string> | undefined | null, body: unknown): Promise<T>;
1027
1063
  }
@@ -1066,6 +1102,13 @@ declare class AccessKeyManager {
1066
1102
  private isValid;
1067
1103
  }
1068
1104
 
1105
+ /** 二进制文件输入。 */
1106
+ type FileInput = Uint8Array | ArrayBuffer | Blob;
1107
+ interface FileMultipart {
1108
+ contentType: string;
1109
+ body: Uint8Array;
1110
+ }
1111
+
1069
1112
  /**
1070
1113
  * 开放接口基类。会自动在 header 中带上 access-key,
1071
1114
  * 并在收到 401 类业务错误时尝试重试一次(刷新 AccessKey 后重试)。
@@ -1081,6 +1124,12 @@ declare abstract class OpenAbstractApi extends AbstractApi {
1081
1124
  * 执行带 access-key 的请求;当返回 code=401 时自动刷新 key 并重试一次。
1082
1125
  */
1083
1126
  protected executeOpen<T>(method: string, path: string, body?: unknown): Promise<T>;
1127
+ /** 以 multipart 上传文件(自动携带 access-key;code=401 时刷新后重试一次)。 */
1128
+ protected executeOpenMultipart<T>(path: string, multipart: FileMultipart): Promise<T>;
1129
+ /**
1130
+ * 执行带二进制 body 的开放接口请求;当返回 code=401 时自动刷新 key 并重试一次。
1131
+ */
1132
+ protected executeOpenRaw<T>(method: string, path: string, body: Uint8Array, extraHeaders?: Record<string, string>): Promise<T>;
1084
1133
  }
1085
1134
 
1086
1135
  /**
@@ -1120,6 +1169,9 @@ declare class ClawBotApi extends OpenAbstractApi {
1120
1169
  *
1121
1170
  * 文档:https://www.pushplus.plus/doc/ecosystem/doc/
1122
1171
  * 基础路径:`/push/api/open/doc`
1172
+ *
1173
+ * 文档开放接口不单独提供推送接口。发布后请通过 `client.send` 推送分享页:
1174
+ * `template=doc`,`pushId=docCode`。
1123
1175
  */
1124
1176
  declare class DocApi extends OpenAbstractApi {
1125
1177
  constructor(config: ResolvedPushPlusConfig, http: HttpRequester, mgr: AccessKeyManager);
@@ -1127,6 +1179,12 @@ declare class DocApi extends OpenAbstractApi {
1127
1179
  list(query?: DocListQuery): Promise<PageResult<DocListItem>>;
1128
1180
  /** 创建空白文档。 */
1129
1181
  create(title: string): Promise<DocVo>;
1182
+ /**
1183
+ * 导入 Word(.docx)创建文档。
1184
+ *
1185
+ * 标题默认取文件名;创建后默认关闭分享,需再调用 publish 才会同步到分享页。
1186
+ */
1187
+ importWord(file: FileInput, fileName?: string): Promise<DocVo>;
1130
1188
  /** 获取文档元信息与 HTML 草稿正文。 */
1131
1189
  content(docCode: string): Promise<DocContent>;
1132
1190
  /** 保存 HTML 草稿(不影响分享页,需再 publish)。 */
@@ -1151,6 +1209,9 @@ declare class DocApi extends OpenAbstractApi {
1151
1209
  *
1152
1210
  * 文档:https://www.pushplus.plus/doc/ecosystem/sheet/
1153
1211
  * 基础路径:`/push/api/open/excel`
1212
+ *
1213
+ * 表格开放接口不单独提供推送接口。发布后请通过 `client.send` 推送分享页:
1214
+ * `template=excel`,`pushId=docCode`。
1154
1215
  */
1155
1216
  declare class ExcelApi extends OpenAbstractApi {
1156
1217
  constructor(config: ResolvedPushPlusConfig, http: HttpRequester, mgr: AccessKeyManager);
@@ -1158,6 +1219,12 @@ declare class ExcelApi extends OpenAbstractApi {
1158
1219
  list(query?: DocListQuery): Promise<PageResult<DocListItem>>;
1159
1220
  /** 创建空白表格。 */
1160
1221
  create(title: string): Promise<ExcelVo>;
1222
+ /**
1223
+ * 导入 Excel(.xlsx / .xls)创建表格。
1224
+ *
1225
+ * 标题默认取文件名;创建后默认关闭分享,需再调用 publish 才会同步到分享页。
1226
+ */
1227
+ importExcel(file: FileInput, fileName?: string): Promise<ExcelVo>;
1161
1228
  /** 获取表格元信息与整表 JSON 草稿。 */
1162
1229
  content(docCode: string): Promise<ExcelContent>;
1163
1230
  /**
@@ -1194,6 +1261,9 @@ declare class ExcelApi extends OpenAbstractApi {
1194
1261
  *
1195
1262
  * 文档:https://www.pushplus.plus/doc/ecosystem/form/
1196
1263
  * 基础路径:`/push/api/open/form`
1264
+ *
1265
+ * 表单开放接口不单独提供推送接口。发布后请通过 `client.send` 推送填写页:
1266
+ * `template=form`,`pushId=formCode`。
1197
1267
  */
1198
1268
  declare class FormApi extends OpenAbstractApi {
1199
1269
  constructor(config: ResolvedPushPlusConfig, http: HttpRequester, mgr: AccessKeyManager);
@@ -1235,6 +1305,24 @@ declare class FriendApi extends OpenAbstractApi {
1235
1305
  delete(friendId: number): Promise<void>;
1236
1306
  /** 4. 修改好友备注。 */
1237
1307
  editRemark(id: number, remark: string): Promise<void>;
1308
+ /**
1309
+ * 5. 将好友加入黑名单。
1310
+ *
1311
+ * 加入后将解除双方好友关系,对方无法再添加你。不能将自己加入黑名单,仅可将已有好友加入黑名单。
1312
+ *
1313
+ * @param friendId 好友 id(好友列表中的 friendId 字段)
1314
+ */
1315
+ addBlacklist(friendId: number): Promise<void>;
1316
+ /** 6. 好友黑名单列表。 */
1317
+ blacklistList(query?: PageQuery): Promise<PageResult<FriendBlacklistItem>>;
1318
+ /**
1319
+ * 7. 解除好友黑名单。
1320
+ *
1321
+ * 解除后不会自动恢复好友关系,需重新扫码添加。
1322
+ *
1323
+ * @param id 黑名单记录 ID(黑名单列表中的 id 字段)
1324
+ */
1325
+ removeBlacklist(id: number): Promise<void>;
1238
1326
  }
1239
1327
 
1240
1328
  /**
@@ -1504,6 +1592,28 @@ declare class TopicUserApi extends OpenAbstractApi {
1504
1592
  deleteUser(topicRelationId: number): Promise<string>;
1505
1593
  /** 3. 修改订阅人备注。 */
1506
1594
  editRemark(id: number, remark: string): Promise<void>;
1595
+ /**
1596
+ * 4. 将订阅人加入黑名单。
1597
+ *
1598
+ * 加入后将移出群组,对方无法再加入该群组。积分群组不支持黑名单。不能将自己加入黑名单。
1599
+ *
1600
+ * @param topicRelationId 用户编号(订阅人列表中的 id 字段)
1601
+ */
1602
+ addBlacklist(topicRelationId: number): Promise<void>;
1603
+ /**
1604
+ * 5. 订阅人黑名单列表。
1605
+ *
1606
+ * `query.params.topicId` 必填。
1607
+ */
1608
+ blacklistList(query: TopicUserListQuery): Promise<PageResult<TopicUserBlacklistItem>>;
1609
+ /**
1610
+ * 6. 解除订阅人黑名单。
1611
+ *
1612
+ * 解除后不会自动恢复群组订阅,对方可重新加入该群组。
1613
+ *
1614
+ * @param id 黑名单记录 ID(黑名单列表中的 id 字段)
1615
+ */
1616
+ removeBlacklist(id: number): Promise<void>;
1507
1617
  }
1508
1618
 
1509
1619
  /**
@@ -1671,4 +1781,4 @@ declare const CallbackParser: {
1671
1781
  parse: typeof parseCallback;
1672
1782
  };
1673
1783
 
1674
- export { AbstractApi, AccessKeyApi, AccessKeyManager, type AccessKeyResult, type ApiResponse, type BatchSendRequest, BatchSendRequestBuilder, type BatchSendResult, CallbackEvent, CallbackParser, type CallbackPayload, Channel, ChannelApi, ClawBotApi, type ClawBotInfo, type ClawBotMessage, type ClawBotQrCode, type CpItem, DEFAULT_BASE_URL, DocApi, type DocContent, type DocListItem, type DocListQuery, type DocVo, ErrorCode, ExcelApi, type ExcelContent, type ExcelVo, type ExcelWriteCellsRequest, FetchHttpRequester, FormApi, type FormCover, type FormDetail, type FormItem, type FormListItem, type FormListQuery, type FormPublishDiff, type FormPublishResult, type FormSaveRequest, type FormSettings, FormStatus, FormStatusDescription, type FormTheme, FriendApi, type FriendInfo, type FriendItem, type FriendQrCode, type HttpRawBody, type HttpRawRequestOptions, type HttpRequestOptions, type HttpRequester, type HttpResponse, ImageApi, type ImageFileInput, type ImageItem, type ImageUploadOptions, type ImageUploadResult, type ImageUploadToken, type MailDetail, type MailItem, MessageApi, type MessageCompleteInfo, type MessageItem, type MessageTokenAddRequest, MessageTokenApi, type MessageTokenEditRequest, type MessageTokenItem, type MessageTokenOption, type MpItem, OpenAbstractApi, OpenMessageApi, type PageQuery, type PageResult, PreApi, type PreDetail, type PreItem, type PreSaveRequest, type PreTestRequest, PushPlusClient, PushPlusClientBuilder, type PushPlusClientOptions, type PushPlusConfig, PushPlusError, PushPlusException, RateLimitGuard, type ResolvedPushPlusConfig, type SendCount, type SendMessageResult, type SendRequest, SendRequestBuilder, SendStatus, SendStatusDescription, SettingApi, ShareLogin, SharePerm, Template, type TopicAddRequest, TopicApi, type TopicDetail, type TopicEditRequest, type TopicItem, type TopicListQuery, type TopicQrCode, TopicUserApi, type TopicUserInfo, type TopicUserItem, type TopicUserListQuery, UserApi, type UserDefaultDetail, type UserDefaultItem, type UserDefaultSaveRequest, type UserInfo, type UserLimitTime, type VipInfo, WebhookApi, type WebhookItem, type WebhookSaveRequest, WebhookType, WebhookTypeDescription, batchSendRequest, callExecuteRaw, errorCodeFromValue, isRateLimitedCode, isSuccessfulHttpStatus, parseCallback, resolveConfig, sendRequest };
1784
+ export { AbstractApi, AccessKeyApi, AccessKeyManager, type AccessKeyResult, type ApiResponse, type BatchSendRequest, BatchSendRequestBuilder, type BatchSendResult, CallbackEvent, CallbackParser, type CallbackPayload, Channel, ChannelApi, ClawBotApi, type ClawBotInfo, type ClawBotMessage, type ClawBotQrCode, type CpItem, DEFAULT_BASE_URL, DocApi, type DocContent, type DocListItem, type DocListQuery, type DocVo, ErrorCode, ExcelApi, type ExcelContent, type ExcelVo, type ExcelWriteCellsRequest, FetchHttpRequester, type FileInput, FormApi, type FormCover, type FormDetail, type FormItem, type FormListItem, type FormListQuery, type FormPublishDiff, type FormPublishResult, type FormSaveRequest, type FormSettings, FormStatus, FormStatusDescription, type FormTheme, FriendApi, type FriendBlacklistItem, type FriendInfo, type FriendItem, type FriendQrCode, type HttpRawBody, type HttpRawRequestOptions, type HttpRequestOptions, type HttpRequester, type HttpResponse, ImageApi, type ImageFileInput, type ImageItem, type ImageUploadOptions, type ImageUploadResult, type ImageUploadToken, type MailDetail, type MailItem, MessageApi, type MessageCompleteInfo, type MessageItem, type MessageTokenAddRequest, MessageTokenApi, type MessageTokenEditRequest, type MessageTokenItem, type MessageTokenOption, type MpItem, OpenAbstractApi, OpenMessageApi, type PageQuery, type PageResult, PreApi, type PreDetail, type PreItem, type PreSaveRequest, type PreTestRequest, PushPlusClient, PushPlusClientBuilder, type PushPlusClientOptions, type PushPlusConfig, PushPlusError, PushPlusException, RateLimitGuard, type ResolvedPushPlusConfig, type SendCount, type SendMessageResult, type SendRequest, SendRequestBuilder, SendStatus, SendStatusDescription, SettingApi, ShareLogin, SharePerm, Template, type TopicAddRequest, TopicApi, type TopicDetail, type TopicEditRequest, type TopicItem, type TopicListQuery, type TopicQrCode, TopicUserApi, type TopicUserBlacklistItem, type TopicUserInfo, type TopicUserItem, type TopicUserListQuery, UserApi, type UserDefaultDetail, type UserDefaultItem, type UserDefaultSaveRequest, type UserInfo, type UserLimitTime, type VipInfo, WebhookApi, type WebhookItem, type WebhookSaveRequest, WebhookType, WebhookTypeDescription, batchSendRequest, callExecuteRaw, errorCodeFromValue, isRateLimitedCode, isSuccessfulHttpStatus, parseCallback, resolveConfig, sendRequest };