@perk-net/perk-pushplus-sdk 1.1.0 → 1.1.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.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -4
- package/dist/index.d.ts +19 -4
- package/dist/index.global.js +3 -1
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/config.ts +1 -1
- package/src/enums.ts +4 -0
- package/src/index.ts +1 -0
- package/src/models.ts +14 -2
package/dist/index.d.cts
CHANGED
|
@@ -178,7 +178,11 @@ declare enum Template {
|
|
|
178
178
|
/** 支付成功通知模板。 */
|
|
179
179
|
PAY = "pay",
|
|
180
180
|
/** 表单格式模板;发送时需传 pushId(表单编码)。 */
|
|
181
|
-
FORM = "form"
|
|
181
|
+
FORM = "form",
|
|
182
|
+
/** 文档格式模板(push 文档);发送时需传 pushId。 */
|
|
183
|
+
DOC = "doc",
|
|
184
|
+
/** 表格格式模板(push 表格);发送时需传 pushId。 */
|
|
185
|
+
EXCEL = "excel"
|
|
182
186
|
}
|
|
183
187
|
/**
|
|
184
188
|
* 消息投递状态。
|
|
@@ -310,7 +314,7 @@ interface SendRequest {
|
|
|
310
314
|
to?: string;
|
|
311
315
|
/** 预处理编码(仅会员)。 */
|
|
312
316
|
pre?: string;
|
|
313
|
-
/** push
|
|
317
|
+
/** push 编码;template 为 form/doc/excel 时必传。 */
|
|
314
318
|
pushId?: string;
|
|
315
319
|
}
|
|
316
320
|
declare class SendRequestBuilder {
|
|
@@ -350,7 +354,7 @@ interface BatchSendRequest {
|
|
|
350
354
|
timestamp?: number;
|
|
351
355
|
to?: string;
|
|
352
356
|
pre?: string;
|
|
353
|
-
/** push
|
|
357
|
+
/** push 编码;template 为 form/doc/excel 时必传。 */
|
|
354
358
|
pushId?: string;
|
|
355
359
|
}
|
|
356
360
|
/**
|
|
@@ -449,6 +453,13 @@ interface AccessKeyResult {
|
|
|
449
453
|
/** 过期时间(单位秒)。 */
|
|
450
454
|
expiresIn?: number;
|
|
451
455
|
}
|
|
456
|
+
/** 会员信息。 */
|
|
457
|
+
interface VipInfo {
|
|
458
|
+
/** 是否会员;0-否,1-是。 */
|
|
459
|
+
isVip?: number;
|
|
460
|
+
/** 会员到期日。 */
|
|
461
|
+
lastDay?: string;
|
|
462
|
+
}
|
|
452
463
|
interface UserInfo {
|
|
453
464
|
openId?: string;
|
|
454
465
|
unionId?: string;
|
|
@@ -461,6 +472,10 @@ interface UserInfo {
|
|
|
461
472
|
emailStatus?: number;
|
|
462
473
|
birthday?: string;
|
|
463
474
|
points?: number;
|
|
475
|
+
/** 会员信息。 */
|
|
476
|
+
vipInfo?: VipInfo;
|
|
477
|
+
/** 实名认证状态;0-未实名,1-已实名。 */
|
|
478
|
+
verifyStatus?: number;
|
|
464
479
|
}
|
|
465
480
|
interface SendCount {
|
|
466
481
|
wechatSendCount?: number;
|
|
@@ -1361,4 +1376,4 @@ declare const CallbackParser: {
|
|
|
1361
1376
|
parse: typeof parseCallback;
|
|
1362
1377
|
};
|
|
1363
1378
|
|
|
1364
|
-
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, ErrorCode, FetchHttpRequester, 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, 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, WebhookApi, type WebhookItem, type WebhookSaveRequest, WebhookType, WebhookTypeDescription, batchSendRequest, callExecuteRaw, errorCodeFromValue, isRateLimitedCode, isSuccessfulHttpStatus, parseCallback, resolveConfig, sendRequest };
|
|
1379
|
+
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, ErrorCode, FetchHttpRequester, 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, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -178,7 +178,11 @@ declare enum Template {
|
|
|
178
178
|
/** 支付成功通知模板。 */
|
|
179
179
|
PAY = "pay",
|
|
180
180
|
/** 表单格式模板;发送时需传 pushId(表单编码)。 */
|
|
181
|
-
FORM = "form"
|
|
181
|
+
FORM = "form",
|
|
182
|
+
/** 文档格式模板(push 文档);发送时需传 pushId。 */
|
|
183
|
+
DOC = "doc",
|
|
184
|
+
/** 表格格式模板(push 表格);发送时需传 pushId。 */
|
|
185
|
+
EXCEL = "excel"
|
|
182
186
|
}
|
|
183
187
|
/**
|
|
184
188
|
* 消息投递状态。
|
|
@@ -310,7 +314,7 @@ interface SendRequest {
|
|
|
310
314
|
to?: string;
|
|
311
315
|
/** 预处理编码(仅会员)。 */
|
|
312
316
|
pre?: string;
|
|
313
|
-
/** push
|
|
317
|
+
/** push 编码;template 为 form/doc/excel 时必传。 */
|
|
314
318
|
pushId?: string;
|
|
315
319
|
}
|
|
316
320
|
declare class SendRequestBuilder {
|
|
@@ -350,7 +354,7 @@ interface BatchSendRequest {
|
|
|
350
354
|
timestamp?: number;
|
|
351
355
|
to?: string;
|
|
352
356
|
pre?: string;
|
|
353
|
-
/** push
|
|
357
|
+
/** push 编码;template 为 form/doc/excel 时必传。 */
|
|
354
358
|
pushId?: string;
|
|
355
359
|
}
|
|
356
360
|
/**
|
|
@@ -449,6 +453,13 @@ interface AccessKeyResult {
|
|
|
449
453
|
/** 过期时间(单位秒)。 */
|
|
450
454
|
expiresIn?: number;
|
|
451
455
|
}
|
|
456
|
+
/** 会员信息。 */
|
|
457
|
+
interface VipInfo {
|
|
458
|
+
/** 是否会员;0-否,1-是。 */
|
|
459
|
+
isVip?: number;
|
|
460
|
+
/** 会员到期日。 */
|
|
461
|
+
lastDay?: string;
|
|
462
|
+
}
|
|
452
463
|
interface UserInfo {
|
|
453
464
|
openId?: string;
|
|
454
465
|
unionId?: string;
|
|
@@ -461,6 +472,10 @@ interface UserInfo {
|
|
|
461
472
|
emailStatus?: number;
|
|
462
473
|
birthday?: string;
|
|
463
474
|
points?: number;
|
|
475
|
+
/** 会员信息。 */
|
|
476
|
+
vipInfo?: VipInfo;
|
|
477
|
+
/** 实名认证状态;0-未实名,1-已实名。 */
|
|
478
|
+
verifyStatus?: number;
|
|
464
479
|
}
|
|
465
480
|
interface SendCount {
|
|
466
481
|
wechatSendCount?: number;
|
|
@@ -1361,4 +1376,4 @@ declare const CallbackParser: {
|
|
|
1361
1376
|
parse: typeof parseCallback;
|
|
1362
1377
|
};
|
|
1363
1378
|
|
|
1364
|
-
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, ErrorCode, FetchHttpRequester, 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, 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, WebhookApi, type WebhookItem, type WebhookSaveRequest, WebhookType, WebhookTypeDescription, batchSendRequest, callExecuteRaw, errorCodeFromValue, isRateLimitedCode, isSuccessfulHttpStatus, parseCallback, resolveConfig, sendRequest };
|
|
1379
|
+
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, ErrorCode, FetchHttpRequester, 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, 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 };
|
package/dist/index.global.js
CHANGED
|
@@ -24,6 +24,8 @@ var PerkPushPlus = (function (exports) {
|
|
|
24
24
|
Template2["ROUTE"] = "route";
|
|
25
25
|
Template2["PAY"] = "pay";
|
|
26
26
|
Template2["FORM"] = "form";
|
|
27
|
+
Template2["DOC"] = "doc";
|
|
28
|
+
Template2["EXCEL"] = "excel";
|
|
27
29
|
return Template2;
|
|
28
30
|
})(Template || {});
|
|
29
31
|
var SendStatus = /* @__PURE__ */ ((SendStatus2) => {
|
|
@@ -1137,7 +1139,7 @@ var PerkPushPlus = (function (exports) {
|
|
|
1137
1139
|
logRequest: (_g = cfg.logRequest) != null ? _g : false,
|
|
1138
1140
|
rateLimitGuardEnabled: (_h = cfg.rateLimitGuardEnabled) != null ? _h : true,
|
|
1139
1141
|
rateLimitCooldownMs: (_i = cfg.rateLimitCooldownMs) != null ? _i : 0,
|
|
1140
|
-
userAgent: (_j = cfg.userAgent) != null ? _j : `@perk-net/perk-pushplus-sdk/1.1.
|
|
1142
|
+
userAgent: (_j = cfg.userAgent) != null ? _j : `@perk-net/perk-pushplus-sdk/1.1.1`
|
|
1141
1143
|
};
|
|
1142
1144
|
}
|
|
1143
1145
|
|