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