@perk-net/perk-pushplus-sdk 1.0.1 → 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/README.md +10 -0
- package/dist/index.cjs +12 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -2
- package/dist/index.d.ts +25 -2
- package/dist/index.global.js +12 -1
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/config.ts +1 -1
- package/src/enums.ts +6 -0
- package/src/index.ts +1 -0
- package/src/models.ts +18 -0
package/dist/index.js
CHANGED
|
@@ -20,6 +20,9 @@ var Template = /* @__PURE__ */ ((Template2) => {
|
|
|
20
20
|
Template2["JENKINS"] = "jenkins";
|
|
21
21
|
Template2["ROUTE"] = "route";
|
|
22
22
|
Template2["PAY"] = "pay";
|
|
23
|
+
Template2["FORM"] = "form";
|
|
24
|
+
Template2["DOC"] = "doc";
|
|
25
|
+
Template2["EXCEL"] = "excel";
|
|
23
26
|
return Template2;
|
|
24
27
|
})(Template || {});
|
|
25
28
|
var SendStatus = /* @__PURE__ */ ((SendStatus2) => {
|
|
@@ -1133,7 +1136,7 @@ function resolveConfig(input) {
|
|
|
1133
1136
|
logRequest: (_g = cfg.logRequest) != null ? _g : false,
|
|
1134
1137
|
rateLimitGuardEnabled: (_h = cfg.rateLimitGuardEnabled) != null ? _h : true,
|
|
1135
1138
|
rateLimitCooldownMs: (_i = cfg.rateLimitCooldownMs) != null ? _i : 0,
|
|
1136
|
-
userAgent: (_j = cfg.userAgent) != null ? _j : `@perk-net/perk-pushplus-sdk/1.
|
|
1139
|
+
userAgent: (_j = cfg.userAgent) != null ? _j : `@perk-net/perk-pushplus-sdk/1.1.1`
|
|
1137
1140
|
};
|
|
1138
1141
|
}
|
|
1139
1142
|
|
|
@@ -1374,6 +1377,10 @@ var SendRequestBuilder = class {
|
|
|
1374
1377
|
this.req.pre = v;
|
|
1375
1378
|
return this;
|
|
1376
1379
|
}
|
|
1380
|
+
pushId(v) {
|
|
1381
|
+
this.req.pushId = v;
|
|
1382
|
+
return this;
|
|
1383
|
+
}
|
|
1377
1384
|
build() {
|
|
1378
1385
|
return { ...this.req };
|
|
1379
1386
|
}
|
|
@@ -1423,6 +1430,10 @@ var BatchSendRequestBuilder = class {
|
|
|
1423
1430
|
this.req.pre = v;
|
|
1424
1431
|
return this;
|
|
1425
1432
|
}
|
|
1433
|
+
pushId(v) {
|
|
1434
|
+
this.req.pushId = v;
|
|
1435
|
+
return this;
|
|
1436
|
+
}
|
|
1426
1437
|
/** 追加一个 channel。 */
|
|
1427
1438
|
channel(ch) {
|
|
1428
1439
|
this.channelList.push(typeof ch === "string" ? ch : ch);
|