sahab-utils 1.8.2 → 1.8.3

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/ts/push.d.ts CHANGED
@@ -49,6 +49,15 @@ export type RegisterActivityTokenBody = {
49
49
  activityId: string;
50
50
  pushToken: string;
51
51
  };
52
+ /** `accepted` counts devices the provider took the message for; it is not proof the phone displayed it. */
53
+ export type TestPushResult = {
54
+ status: 'sent' | 'no_device' | 'failed';
55
+ transport: 'fcm' | 'onesignal';
56
+ devices: number;
57
+ accepted: number;
58
+ };
59
+ export declare const TEST_PUSH_COOLDOWN_S = 30;
60
+ export declare const TEST_PUSH_DAILY_LIMIT = 20;
52
61
  export declare const PUSH_TOKENS_COLLECTION = "pushTokens";
53
62
  export declare const ANDROID_CHANNEL: {
54
63
  readonly client: "orders";
package/dist/ts/push.js CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sanitizePushUids = exports.buildLiveNotificationData = exports.buildLiveNotification = exports.choosePushTransport = exports.pushTransportOf = exports.LIVE_NOTIFICATION_DATA_KEY = exports.APNS_LIVE_ACTIVITY_TOPIC_SUFFIX = exports.ANDROID_CHANNEL = exports.PUSH_TOKENS_COLLECTION = void 0;
3
+ exports.sanitizePushUids = exports.buildLiveNotificationData = exports.buildLiveNotification = exports.choosePushTransport = exports.pushTransportOf = exports.LIVE_NOTIFICATION_DATA_KEY = exports.APNS_LIVE_ACTIVITY_TOPIC_SUFFIX = exports.ANDROID_CHANNEL = exports.PUSH_TOKENS_COLLECTION = exports.TEST_PUSH_DAILY_LIMIT = exports.TEST_PUSH_COOLDOWN_S = void 0;
4
4
  const orderActivity_1 = require("./orderActivity");
5
+ exports.TEST_PUSH_COOLDOWN_S = 30;
6
+ exports.TEST_PUSH_DAILY_LIMIT = 20;
5
7
  exports.PUSH_TOKENS_COLLECTION = 'pushTokens';
6
8
  exports.ANDROID_CHANNEL = { client: 'orders', providerNewOrder: 'new-orders', provider: 'general' };
7
9
  exports.APNS_LIVE_ACTIVITY_TOPIC_SUFFIX = '.push-type.liveactivity';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sahab-utils",
3
- "version": "1.8.2",
3
+ "version": "1.8.3",
4
4
  "description": "This package contains types and utils functions",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",